id
int64 | text
string | metadata
dict | line_start_n_end_idx
dict | quality_signals
dict | eai_taxonomy
dict | pid
string |
|---|---|---|---|---|---|---|
7,050,470,597,905,272,000
|
1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
1. Beerzo
Beerzo Masa'warty 3200... Talk To Me!
1,242
0
36
Anyone good with this web stuff?
Need to learn it tomorrow for an interview? Anyone that can help me out would be much appreciated!
2. batwad
batwad Member
864
0
16
<reply sarcastic="true">
<author>batwad</author>
<answer>No</answer>
</reply>
3. ChriS3
ChriS3 hud at ye bam
2,239
27
38
<reply rofl="true">
<author>ChriS3</author>
<answer>hahahaha</answer>
</reply>
4. Beerzo
Beerzo Masa'warty 3200... Talk To Me!
1,242
0
36
You know it then form what i know that looks ok!!!! LOL
5. jcs356
jcs356 Brum brum
2,734
70
48
Yep, its just a question of putting some control <tags> around statements. Easy peasy.
6. Beerzo
Beerzo Masa'warty 3200... Talk To Me!
1,242
0
36
Think i need to demonstrate how to diaplay data across platforms using a mix of html and XML.
How do you embed XML into HTML?
7. auroan
auroan Active Member
1,669
5
38
XML is mainly used as a "meta" language. It's not really for presentation like html is. It's used more for providing config values to other OO / SOAP code
8. auroan
auroan Active Member
1,669
5
38
9. Beerzo
Beerzo Masa'warty 3200... Talk To Me!
1,242
0
36
Yeah I know i am pretty fecked, but i am going to try and fob them off like a know what i am talking about! LOL Worth a try!
10. benw123
benw123 Moderator
1,863
3
38
I also work in IT and a contractor I once worked with summed up XML perfectly. He described it as "CSV files on steroids", which is about right when you think about it.
XML is straightforward to understand, but pushing and pulling it across interfaces, such as SOAP or with SQL Server, is quite complex I think.
<benw123/>
11. Beerzo
Beerzo Masa'warty 3200... Talk To Me!
1,242
0
36
Think i managed to wing it pretty good thee day. Shall find out the night if i winged it enough or not!
Share This Page
|
{
"url": "http://www.audi-sport.net/xf/threads/xml.34483/",
"source_domain": "www.audi-sport.net",
"snapshot_id": "crawl=CC-MAIN-2017-43",
"warc_metadata": {
"Content-Length": "73463",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GYAH7AGRSBARYQBBA67ZV2UKIGGV7LF5",
"WARC-Concurrent-To": "<urn:uuid:8c7f5b69-cc4c-4a5c-882d-8f89f0aeda17>",
"WARC-Date": "2017-10-19T06:04:33Z",
"WARC-IP-Address": "176.56.63.154",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:NWNXLKKPOJR5D5WXVI73NLIR45S53ORX",
"WARC-Record-ID": "<urn:uuid:7e27147d-c57a-4307-a57c-ee685c4cda7c>",
"WARC-Target-URI": "http://www.audi-sport.net/xf/threads/xml.34483/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ce2b8a9a-11ae-45d2-97f5-e0c919e6d122>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-225-75-130.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,
1,
114,
126,
127,
169,
170,
180,
186,
193,
230,
231,
334,
340,
352,
353,
371,
372,
380,
386,
393,
422,
450,
474,
487,
493,
505,
506,
531,
532,
542,
549,
556,
580,
608,
638,
651,
657,
669,
670,
712,
713,
723,
729,
736,
796,
802,
814,
815,
836,
837,
847,
854,
861,
952,
958,
970,
971,
1013,
1014,
1024,
1030,
1037,
1135,
1136,
1172,
1178,
1190,
1191,
1216,
1217,
1227,
1233,
1240,
1399,
1405,
1417,
1418,
1443,
1444,
1454,
1460,
1467,
1479,
1480,
1522,
1523,
1533,
1539,
1546,
1675,
1681,
1695,
1696,
1718,
1719,
1729,
1735,
1742,
1915,
1916,
2063,
2064,
2079,
2085,
2098,
2099,
2141,
2142,
2152,
2158,
2165,
2273,
2279,
2280
],
"line_end_idx": [
1,
114,
126,
127,
169,
170,
180,
186,
193,
230,
231,
334,
340,
352,
353,
371,
372,
380,
386,
393,
422,
450,
474,
487,
493,
505,
506,
531,
532,
542,
549,
556,
580,
608,
638,
651,
657,
669,
670,
712,
713,
723,
729,
736,
796,
802,
814,
815,
836,
837,
847,
854,
861,
952,
958,
970,
971,
1013,
1014,
1024,
1030,
1037,
1135,
1136,
1172,
1178,
1190,
1191,
1216,
1217,
1227,
1233,
1240,
1399,
1405,
1417,
1418,
1443,
1444,
1454,
1460,
1467,
1479,
1480,
1522,
1523,
1533,
1539,
1546,
1675,
1681,
1695,
1696,
1718,
1719,
1729,
1735,
1742,
1915,
1916,
2063,
2064,
2079,
2085,
2098,
2099,
2141,
2142,
2152,
2158,
2165,
2273,
2279,
2280,
2295
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2295,
"ccnet_original_nlines": 114,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2836134433746338,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03781513124704361,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3361344635486603,
"rps_doc_frac_unique_words": 0.5472779273986816,
"rps_doc_mean_word_length": 4.163323879241943,
"rps_doc_num_sentences": 43,
"rps_doc_symbol_to_word_ratio": 0.010504200123250484,
"rps_doc_unigram_entropy": 4.956013202667236,
"rps_doc_word_count": 349,
"rps_doc_frac_chars_dupe_10grams": 0.1459050178527832,
"rps_doc_frac_chars_dupe_5grams": 0.1885753571987152,
"rps_doc_frac_chars_dupe_6grams": 0.1885753571987152,
"rps_doc_frac_chars_dupe_7grams": 0.1885753571987152,
"rps_doc_frac_chars_dupe_8grams": 0.1459050178527832,
"rps_doc_frac_chars_dupe_9grams": 0.1459050178527832,
"rps_doc_frac_chars_top_2gram": 0.04129387065768242,
"rps_doc_frac_chars_top_3gram": 0.07226427644491196,
"rps_doc_frac_chars_top_4gram": 0.08602891117334366,
"rps_doc_books_importance": -239.2760772705078,
"rps_doc_books_importance_length_correction": -239.2760772705078,
"rps_doc_openwebtext_importance": -121.53421783447266,
"rps_doc_openwebtext_importance_length_correction": -121.53421783447266,
"rps_doc_wikipedia_importance": -83.54544067382812,
"rps_doc_wikipedia_importance_length_correction": -83.54544067382812
},
"fasttext": {
"dclm": 0.12503665685653687,
"english": 0.8655336499214172,
"fineweb_edu_approx": 1.3123480081558228,
"eai_general_math": 0.0007255700184032321,
"eai_open_web_math": 0.16578012704849243,
"eai_web_code": -0.000003099999958067201
}
}
|
{
"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.7",
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,623,699,130,028,154,000
|
Slack Information
When a new user sends the first message, a Slack message with the user details and a button to join the user’s channel is sent to the main channel selected during the synchronisation, or to the channel linked to the conversation’s department. Only the Slack account used during the synchronization will automatically join the user’s channel, other Slack members will have to join it manually via the button.
When Settings > Slack > Agent linking is set, if the conversation is assigned to a department, only agents assigned to that department will receive the message, if the conversation is assigned to a single agent only that agent will receive the message.
Slack is free to use. Only large companies may need a paid subscription plan, more details here.
Push notifications are compatible with Slack, when agents send messages via Slack, Push notifications are sent to users.
If you’re using Dialogflow, no messages will be received in Slack if the chatbot knows the answer. Once the human takeover is active all conversation’s messages are sent to Slack.
The Slack app is compatible with email piping and the messaging apps.
Deleting or leaving a channel is not supported, only archiving a channel is supported.
When a conversation is archived in EBOT365 , the linked Slack channel is also archived.
When replying via Slack to a user, if the user is notified by email or text message, a Slack message is sent to notify you.
Use the Slack command /archive to archive a conversation from Slack.
|
{
"url": "https://ebot365.com/docs/integrations-knowledge-base/slack/slack-information-2/",
"source_domain": "ebot365.com",
"snapshot_id": "CC-MAIN-2024-10",
"warc_metadata": {
"Content-Length": "197639",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NV4HQCKPRAPQGBUVVSNDAWMBBEEZJBFF",
"WARC-Concurrent-To": "<urn:uuid:f57f0307-7e71-424a-bee9-f72ef730158d>",
"WARC-Date": "2024-02-25T04:20:21Z",
"WARC-IP-Address": "162.240.50.43",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:AUTG5KCCIPJQNNUQAGZ7SIXEXZ6LIMDY",
"WARC-Record-ID": "<urn:uuid:7fba882d-d118-463d-b6ad-84f42ba34f07>",
"WARC-Target-URI": "https://ebot365.com/docs/integrations-knowledge-base/slack/slack-information-2/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8504df0e-ae1d-4e4c-9ff9-dbacff2bbfb8>"
},
"warc_info": "isPartOf: CC-MAIN-2024-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2024\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-145\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,
18,
19,
427,
428,
681,
682,
779,
780,
901,
902,
1082,
1083,
1153,
1154,
1241,
1242,
1330,
1331,
1455,
1456
],
"line_end_idx": [
18,
19,
427,
428,
681,
682,
779,
780,
901,
902,
1082,
1083,
1153,
1154,
1241,
1242,
1330,
1331,
1455,
1456,
1524
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1524,
"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.4280821979045868,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0034246600698679686,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11986301094293594,
"rps_doc_frac_unique_words": 0.420634925365448,
"rps_doc_mean_word_length": 4.88095235824585,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.157261848449707,
"rps_doc_word_count": 252,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04878048971295357,
"rps_doc_frac_chars_dupe_6grams": 0.04878048971295357,
"rps_doc_frac_chars_dupe_7grams": 0.04878048971295357,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.0292682908475399,
"rps_doc_frac_chars_top_3gram": 0.021138209849596024,
"rps_doc_frac_chars_top_4gram": 0.03252033144235611,
"rps_doc_books_importance": -133.18649291992188,
"rps_doc_books_importance_length_correction": -122.5304946899414,
"rps_doc_openwebtext_importance": -84.6127700805664,
"rps_doc_openwebtext_importance_length_correction": -84.6127700805664,
"rps_doc_wikipedia_importance": -52.38175964355469,
"rps_doc_wikipedia_importance_length_correction": -39.495147705078125
},
"fasttext": {
"dclm": 0.02278047986328602,
"english": 0.9158002734184265,
"fineweb_edu_approx": 1.0992549657821655,
"eai_general_math": 0.23019474744796753,
"eai_open_web_math": 0.040095750242471695,
"eai_web_code": 0.8548263311386108
}
}
|
{
"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.401",
"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": "1",
"label": "Factual"
},
"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": "2",
"label": "Click Here References"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,872,421,956,626,157,000
|
How to handle different XML file with different namespace for same element in Fabric pipeline
Sethulakshmi Sambasivan 0 Reputation points
2023-09-01T16:36:06.4266667+00:00
I have multiple XML files with same data with different name space, so while performing the copy activity using pipeline its skipping records or not all copying anything. pipeline is not throwing any error, running successfully populating the table with blanks.
ample file1:
<ns7:Items>
<ns6:itemdetails>
<ns6:ID>123</ns6:ID>
<ns6:item>apple</ns6:item>
</ns6:itemdetails>
<ns6:itemdetails>
...................................
</ns6:itemdetails>
</ns7:Items>
sample file2:
<ns7:Items>
<ns3:itemdetails>
<ns3:ID>124</ns6:ID>
<ns3:item>orange</ns6:item>
</ns3:itemdetails>
</ns7:Items>
How to handle when there are different namespace for same elements inside pipeline or is there any other method to handle these kind a files?
Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
226 questions
{count} votes
|
{
"url": "https://learn.microsoft.com/en-us/answers/questions/1357021/how-to-handle-different-xml-file-with-different-na",
"source_domain": "learn.microsoft.com",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "45502",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4Y6VNYSZQOBN46LABDP6TTPJKO66AZWI",
"WARC-Concurrent-To": "<urn:uuid:92cecf8b-2b99-451a-a801-b25b81d36765>",
"WARC-Date": "2023-09-26T20:30:54Z",
"WARC-IP-Address": "104.72.158.90",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ZCKLJFXCL5V2AHLQI34EB5L7WKQEA7FW",
"WARC-Record-ID": "<urn:uuid:1648b2b2-b8e8-4f36-905d-5de79e76d127>",
"WARC-Target-URI": "https://learn.microsoft.com/en-us/answers/questions/1357021/how-to-handle-different-xml-file-with-different-na",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:6e08011f-bdc1-46e9-b75f-f8a0275d7bfb>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-221\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,
94,
95,
139,
173,
174,
436,
437,
450,
451,
463,
464,
484,
485,
517,
518,
556,
557,
578,
579,
599,
600,
636,
637,
656,
657,
673,
674,
688,
689,
701,
702,
724,
725,
759,
760,
802,
803,
825,
826,
840,
982,
1003,
1024,
1128,
1142
],
"line_end_idx": [
94,
95,
139,
173,
174,
436,
437,
450,
451,
463,
464,
484,
485,
517,
518,
556,
557,
578,
579,
599,
600,
636,
637,
656,
657,
673,
674,
688,
689,
701,
702,
724,
725,
759,
760,
802,
803,
825,
826,
840,
982,
1003,
1024,
1128,
1142,
1155
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1155,
"ccnet_original_nlines": 45,
"rps_doc_curly_bracket": 0.0017316000303253531,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20762711763381958,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.033898308873176575,
"rps_doc_frac_lines_end_with_ellipsis": 0.021739130839705467,
"rps_doc_frac_no_alph_words": 0.35169491171836853,
"rps_doc_frac_unique_words": 0.6793892979621887,
"rps_doc_mean_word_length": 6.29007625579834,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0.04661016911268234,
"rps_doc_unigram_entropy": 4.343276500701904,
"rps_doc_word_count": 131,
"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.029126210138201714,
"rps_doc_frac_chars_top_3gram": 0.02669903077185154,
"rps_doc_frac_chars_top_4gram": 0.060679610818624496,
"rps_doc_books_importance": -75.89891815185547,
"rps_doc_books_importance_length_correction": -75.89891815185547,
"rps_doc_openwebtext_importance": -49.412776947021484,
"rps_doc_openwebtext_importance_length_correction": -47.2614631652832,
"rps_doc_wikipedia_importance": -23.64130401611328,
"rps_doc_wikipedia_importance_length_correction": -23.64130401611328
},
"fasttext": {
"dclm": 0.9347783327102661,
"english": 0.6569015979766846,
"fineweb_edu_approx": 2.1467459201812744,
"eai_general_math": 0.12154293060302734,
"eai_open_web_math": 0.041997019201517105,
"eai_web_code": 0.4064369797706604
}
}
|
{
"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": "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": "8",
"label": "Documentation"
}
},
"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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,199,828,854,317,838,300
|
Windows messenger or Yahoo???
Discussion in 'Gaming and Software' started by The_ODP, Mar 10, 2008.
?
1. Messenger?
100.0%
2. Yahoo?
0 vote(s)
0.0%
Welcome to the Army Rumour Service, ARRSE
The UK's largest and busiest UNofficial military website.
The heart of the site is the forum area, including:
1. I am running both Windows messenger and Yahoo but just want to use one. Which is better and easier to use with both email accounts? Basically I want all my Yahoo emails and contacts to go to my Hotmail or vice versa for ease of use. Plus I need to know how to set this up.
Cheers,
THE_ODP
2. Download Pidgin - http://www.pidgin.im/
it's a messenger that supports quite a few protocols, such as Yahoo, MSN, ICQ, IRC, Google Talk etc...
I don't bother with anything else, this does the trick.
3. Cheers ubersoldat but I can't seem to get Pidgin working.
4. Try Trillian if using windows does the same as pidgeon but a bit easier to configure
Pidgeon if using Linux/BSD
|
{
"url": "https://www.arrse.co.uk/community/threads/windows-messenger-or-yahoo.80808/",
"source_domain": "www.arrse.co.uk",
"snapshot_id": "crawl=CC-MAIN-2017-04",
"warc_metadata": {
"Content-Length": "61020",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TGGQHTUZ5AK4XXULTOKXBABNXD36TSSP",
"WARC-Concurrent-To": "<urn:uuid:19b8100b-0082-4a7f-9133-fa26e89aebe1>",
"WARC-Date": "2017-01-20T10:37:53Z",
"WARC-IP-Address": "104.24.9.78",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:GQ3VMA5VX675553O5HR23JTLLT4KEUNE",
"WARC-Record-ID": "<urn:uuid:be2f1d5a-64f9-45cd-aeb3-dd6d2872fabf>",
"WARC-Target-URI": "https://www.arrse.co.uk/community/threads/windows-messenger-or-yahoo.80808/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:34fb2f29-0c83-4983-98e8-59b1f387fb19>"
},
"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,
30,
31,
101,
102,
104,
120,
121,
132,
144,
145,
159,
168,
169,
211,
212,
270,
271,
323,
324,
602,
603,
615,
616,
628,
634,
679,
680,
787,
788,
848,
854,
917,
923,
1013,
1014,
1045
],
"line_end_idx": [
30,
31,
101,
102,
104,
120,
121,
132,
144,
145,
159,
168,
169,
211,
212,
270,
271,
323,
324,
602,
603,
615,
616,
628,
634,
679,
680,
787,
788,
848,
854,
917,
923,
1013,
1014,
1045,
1050
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1050,
"ccnet_original_nlines": 36,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3549783527851105,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.051948048174381256,
"rps_doc_frac_lines_end_with_ellipsis": 0.027027029544115067,
"rps_doc_frac_no_alph_words": 0.268398255109787,
"rps_doc_frac_unique_words": 0.6725146174430847,
"rps_doc_mean_word_length": 4.32748556137085,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0.004329000134021044,
"rps_doc_unigram_entropy": 4.541627883911133,
"rps_doc_word_count": 171,
"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.04324324056506157,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -120.70783233642578,
"rps_doc_books_importance_length_correction": -120.70783233642578,
"rps_doc_openwebtext_importance": -71.43201446533203,
"rps_doc_openwebtext_importance_length_correction": -58.80713653564453,
"rps_doc_wikipedia_importance": -41.25276184082031,
"rps_doc_wikipedia_importance_length_correction": -41.25276184082031
},
"fasttext": {
"dclm": 0.7534108757972717,
"english": 0.9111812710762024,
"fineweb_edu_approx": 1.0888563394546509,
"eai_general_math": 0.11494094133377075,
"eai_open_web_math": 0.34404218196868896,
"eai_web_code": 0.0009187500108964741
}
}
|
{
"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": "005.4",
"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": "1",
"label": "No 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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,963,773,913,187,658,000
|
Anonymous Method
Definition - What does Anonymous Method mean?
An anonymous method is a a function or subroutine that is defined or called without being name-bound to an identifier.
Anonymous methods are used by many modern programming languages such as C#, and PHP.
Anonymous methods are more commonly known as anonymous functions.
Techopedia explains Anonymous Method
Anonymous methods derive from mathematics that dates back to the 1930s when Alonzo Church invented the lambda-calculus, the inspiration for functional programming which came much later. The first programming language to contain these types of functions was LISP in 1958.
The idea of anonymous methods is that a routine can have functions that exist within code blocks that can operate internally within that block of code and make computations whose purpose is usually to pass arguments to higher order functions, commonly found in languages that have first-class functions.
Anonymous classes are used in other languages such as Java which does not support anonymous methods.
Share this:
Recommended Resources
|
{
"url": "https://www.techopedia.com/definition/25581/anonymous-method",
"source_domain": "www.techopedia.com",
"snapshot_id": "crawl=CC-MAIN-2019-47",
"warc_metadata": {
"Content-Length": "128376",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:53DA4N6ZWNNBHF7BEFRPG24JGCF64HH2",
"WARC-Concurrent-To": "<urn:uuid:c56116d8-d891-4cd1-83c2-174f4f84ec4b>",
"WARC-Date": "2019-11-21T09:04:00Z",
"WARC-IP-Address": "104.26.15.163",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:64BFZFYLEIUC26ZZT6DRSB2MIGK2UAQH",
"WARC-Record-ID": "<urn:uuid:25953550-0344-4ea3-8c97-d46e361a9bcb>",
"WARC-Target-URI": "https://www.techopedia.com/definition/25581/anonymous-method",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ab0020c5-05b6-4dce-8467-292d0efe05fe>"
},
"warc_info": "isPartOf: CC-MAIN-2019-47\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November 2019\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-55.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,
17,
18,
64,
65,
184,
185,
270,
271,
337,
338,
375,
376,
647,
648,
952,
953,
1054,
1055,
1067,
1068
],
"line_end_idx": [
17,
18,
64,
65,
184,
185,
270,
271,
337,
338,
375,
376,
647,
648,
952,
953,
1054,
1055,
1067,
1068,
1089
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1089,
"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.42307692766189575,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.016483519226312637,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.09340658783912659,
"rps_doc_frac_unique_words": 0.6073619723320007,
"rps_doc_mean_word_length": 5.5153374671936035,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0.005494509823620319,
"rps_doc_unigram_entropy": 4.3392486572265625,
"rps_doc_word_count": 163,
"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.08898776024580002,
"rps_doc_frac_chars_top_3gram": 0.04226918891072273,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -78.9812240600586,
"rps_doc_books_importance_length_correction": -78.9812240600586,
"rps_doc_openwebtext_importance": -42.06391525268555,
"rps_doc_openwebtext_importance_length_correction": -32.20305633544922,
"rps_doc_wikipedia_importance": -27.301525115966797,
"rps_doc_wikipedia_importance_length_correction": -27.301525115966797
},
"fasttext": {
"dclm": 0.6320424675941467,
"english": 0.9640195965766907,
"fineweb_edu_approx": 3.618464708328247,
"eai_general_math": 0.9407042860984802,
"eai_open_web_math": 0.3469001054763794,
"eai_web_code": 0.1468968391418457
}
}
|
{
"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.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": "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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,743,392,452,049,532,000
|
Change Cell Color in HTML Table with PowerShell - Set-CellColor
(2 Ratings)
Description
Another advanced function similar to the ConvertTo-AdvHTML function I recently released here: http://community.spiceworks.com/scripts/show/2448-create-advanced-html-tables-in-powershell-convertto-advhtml
This function is much simpler to use, and is tightly focused on changing the color of just one column in an HTML table. The twist is you can choose the column and the criteria that will trigger the color change.
Usage:
1. Dot source the function, or include it in your script:
.".\Set-CellColor.ps1"
2. Pipe and HTML file into the function, telling the function which property to focus on, what color to change the cell to and the Filter criteria you want.
Example 1:
get-process | convertto-html | set-cellcolor -Propety cpu -Color red -Filter "cpu -gt 1000" | out-file c:\test\get-process.html
Assuming Set-CellColor has been dot sourced, run Get-Process and convert to HTML. Then change the CPU cell to red only if the CPU field is greater than 1000.
Example2:
get-process | convertto-html | set-cellcolor cpu red -filter "cpu -gt 1000 -and cpu -lt 2000" | out-file c:\dropbox\test\get-process.html
Same as Example 1, but now we will only turn a cell red if CPU is greater than 100 but less than 2000.
5/19/2014: Updated to now give you the ability to change the color of the entire row. Just add the -Row parameter to your line.
Source Code
This script has not been checked by Spiceworks. Please understand the risks before using it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
Function Set-CellColor
{ <#
.SYNOPSIS
Function that allows you to set individual cell colors in an HTML table
.DESCRIPTION
To be used inconjunction with ConvertTo-HTML this simple function allows you
to set particular colors for cells in an HTML table. You provide the criteria
the script uses to make the determination if a cell should be a particular
color (property -gt 5, property -like "*Apple*", etc).
You can add the function to your scripts, dot source it to load into your current
PowerShell session or add it to your $Profile so it is always available.
To dot source:
.".\Set-CellColor.ps1"
.PARAMETER Property
Property, or column that you will be keying on.
.PARAMETER Color
Name or 6-digit hex value of the color you want the cell to be
.PARAMETER InputObject
HTML you want the script to process. This can be entered directly into the
parameter or piped to the function.
.PARAMETER Filter
Specifies a query to determine if a cell should have its color changed. $true
results will make the color change while $false result will return nothing.
Syntax
<Property Name> <Operator> <Value>
<Property Name>::= the same as $Property. This must match exactly
<Operator>::= "-eq" | "-le" | "-ge" | "-ne" | "-lt" | "-gt"| "-approx" | "-like" | "-notlike"
<JoinOperator> ::= "-and" | "-or"
<NotOperator> ::= "-not"
The script first attempts to convert the cell to a number, and if it fails it will
cast it as a string. So 40 will be a number and you can use -lt, -gt, etc. But 40%
would be cast as a string so you could only use -eq, -ne, -like, etc.
.PARAMETER Row
Instructs the script to change the entire row to the specified color instead of the individual cell.
.INPUTS
HTML with table
.OUTPUTS
HTML
.EXAMPLE
get-process | convertto-html | set-cellcolor -Propety cpu -Color red -Filter "cpu -gt 1000" | out-file c:\test\get-process.html
Assuming Set-CellColor has been dot sourced, run Get-Process and convert to HTML.
Then change the CPU cell to red only if the CPU field is greater than 1000.
.EXAMPLE
get-process | convertto-html | set-cellcolor cpu red -filter "cpu -gt 1000 -and cpu -lt 2000" | out-file c:\test\get-process.html
Same as Example 1, but now we will only turn a cell red if CPU is greater than 100
but less than 2000.
.EXAMPLE
$HTML = $Data | sort server | ConvertTo-html -head $header | Set-CellColor cookedvalue red -Filter "cookedvalue -gt 1"
PS C:\> $HTML = $HTML | Set-CellColor Server green -Filter "server -eq 'dc2'"
PS C:\> $HTML | Set-CellColor Path Yellow -Filter "Path -like ""*memory*""" | Out-File c:\Test\colortest.html
Takes a collection of objects in $Data, sorts on the property Server and converts to HTML. From there
we set the "CookedValue" property to red if it's greater then 1. We then send the HTML through Set-CellColor
again, this time setting the Server cell to green if it's "dc2". One more time through Set-CellColor
turns the Path cell to Yellow if it contains the word "memory" in it.
.EXAMPLE
$HTML = $Data | sort server | ConvertTo-html -head $header | Set-CellColor cookedvalue red -Filter "cookedvalue -gt 1" -Row
Now, if the cookedvalue property is greater than 1 the function will highlight the entire row red.
.NOTES
Author: Martin Pugh
Twitter: @thesurlyadm1n
Spiceworks: Martin9700
Blog: www.thesurlyadmin.com
Changelog:
1.5 Added ability to set row color with -Row switch instead of the individual cell
1.03 Added error message in case the $Property field cannot be found in the table header
1.02 Added some additional text to help. Added some error trapping around $Filter
creation.
1.01 Added verbose output
1.0 Initial Release
.LINK
http://community.spiceworks.com/scripts/show/2450-change-cell-color-in-html-table-with-powershell-set-cellcolor
#>
[CmdletBinding()]
Param (
[Parameter(Mandatory,Position=0)]
[string]$Property,
[Parameter(Mandatory,Position=1)]
[string]$Color,
[Parameter(Mandatory,ValueFromPipeline)]
[Object[]]$InputObject,
[Parameter(Mandatory)]
[string]$Filter,
[switch]$Row
)
Begin {
Write-Verbose "$(Get-Date): Function Set-CellColor begins"
If ($Filter)
{ If ($Filter.ToUpper().IndexOf($Property.ToUpper()) -ge 0)
{ $Filter = $Filter.ToUpper().Replace($Property.ToUpper(),"`$Value")
Try {
[scriptblock]$Filter = [scriptblock]::Create($Filter)
}
Catch {
Write-Warning "$(Get-Date): ""$Filter"" caused an error, stopping script!"
Write-Warning $Error[0]
Exit
}
}
Else
{ Write-Warning "Could not locate $Property in the Filter, which is required. Filter: $Filter"
Exit
}
}
}
Process {
ForEach ($Line in $InputObject)
{ If ($Line.IndexOf("<tr><th") -ge 0)
{ Write-Verbose "$(Get-Date): Processing headers..."
$Search = $Line | Select-String -Pattern '<th ?[a-z\-:;"=]*>(.*?)<\/th>' -AllMatches
$Index = 0
ForEach ($Match in $Search.Matches)
{ If ($Match.Groups[1].Value -eq $Property)
{ Break
}
$Index ++
}
If ($Index -eq $Search.Matches.Count)
{ Write-Warning "$(Get-Date): Unable to locate property: $Property in table header"
Exit
}
Write-Verbose "$(Get-Date): $Property column found at index: $Index"
}
If ($Line -match "<tr( style=""background-color:.+?"")?><td")
{ $Search = $Line | Select-String -Pattern '<td ?[a-z\-:;"=]*>(.*?)<\/td>' -AllMatches
$Value = $Search.Matches[$Index].Groups[1].Value -as [double]
If (-not $Value)
{ $Value = $Search.Matches[$Index].Groups[1].Value
}
If (Invoke-Command $Filter)
{ If ($Row)
{ Write-Verbose "$(Get-Date): Criteria met! Changing row to $Color..."
If ($Line -match "<tr style=""background-color:(.+?)"">")
{ $Line = $Line -replace "<tr style=""background-color:$($Matches[1])","<tr style=""background-color:$Color"
}
Else
{ $Line = $Line.Replace("<tr>","<tr style=""background-color:$Color"">")
}
}
Else
{ Write-Verbose "$(Get-Date): Criteria met! Changing cell to $Color..."
$Line = $Line.Replace($Search.Matches[$Index].Value,"<td style=""background-color:$Color"">$Value</td>")
}
}
}
Write-Output $Line
}
}
End {
Write-Verbose "$(Get-Date): Function Set-CellColor completed"
}
}
Screenshots
Report Script
Join or Login to share what you think!
5 Comments
• Martin9700
Pure Capsaicin
Martin9700
New version now allows you to highlight the entire row instead of just the cell. Use the -Row parameter.
• adammcgill
Pimiento
adammcgill
The weird thing with the set color is if I have a table with the same value the color changes also even though I didn't call on that table with the function.
• xabi62
Pimiento
xabi62
This script is awesome ! But there's a bug in a line when there are 2 fields with the same value, the 2 cells are colored instead of colored only the cell with the field critiria. I do not know how to fix this bug. Someone would have an idea?
• andrewmccalla
Sonora
andrewmccalla
Hello, Are yellow and red our only options to be used with set-cellcolor? For example can I use "light blue" or "amber" or "light grey" as color options? Would like to know which colors are available to me. Thank you, Andrew
• andrewmccalla
Sonora
andrewmccalla
Disregard the above. Found the answer to my inquiry. yes!
|
{
"url": "https://community.spiceworks.com/scripts/show/2450-change-cell-color-in-html-table-with-powershell-set-cellcolor",
"source_domain": "community.spiceworks.com",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "72675",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZNHHCMVBAN5GJJ3HWX2PCCVCT6ZY24BV",
"WARC-Concurrent-To": "<urn:uuid:01d6dc98-f455-406f-9c67-bc9fff15aff8>",
"WARC-Date": "2017-03-26T13:44:21Z",
"WARC-IP-Address": "207.200.35.240",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:EBSVYNSAI6BJPYLOLESYBKQ6TGEXZHJM",
"WARC-Record-ID": "<urn:uuid:1293e448-9dcf-4e55-869d-c25285b8fe69>",
"WARC-Target-URI": "https://community.spiceworks.com/scripts/show/2450-change-cell-color-in-html-table-with-powershell-set-cellcolor",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:30b46278-cefe-4e0b-8cb9-58f4bac42193>"
},
"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,
64,
65,
77,
89,
90,
294,
295,
507,
508,
515,
573,
596,
753,
754,
765,
893,
894,
1052,
1053,
1063,
1201,
1202,
1305,
1306,
1434,
1435,
1447,
1448,
1541,
1542,
1544,
1545,
1547,
1548,
1550,
1551,
1553,
1554,
1556,
1557,
1559,
1560,
1562,
1563,
1565,
1566,
1568,
1569,
1572,
1573,
1576,
1577,
1580,
1581,
1584,
1585,
1588,
1589,
1592,
1593,
1596,
1597,
1600,
1601,
1604,
1605,
1608,
1609,
1612,
1613,
1616,
1617,
1620,
1621,
1624,
1625,
1628,
1629,
1632,
1633,
1636,
1637,
1640,
1641,
1644,
1645,
1648,
1649,
1652,
1653,
1656,
1657,
1660,
1661,
1664,
1665,
1668,
1669,
1672,
1673,
1676,
1677,
1680,
1681,
1684,
1685,
1688,
1689,
1692,
1693,
1696,
1697,
1700,
1701,
1704,
1705,
1708,
1709,
1712,
1713,
1716,
1717,
1720,
1721,
1724,
1725,
1728,
1729,
1732,
1733,
1736,
1737,
1740,
1741,
1744,
1745,
1748,
1749,
1752,
1753,
1756,
1757,
1760,
1761,
1764,
1765,
1768,
1769,
1772,
1773,
1776,
1777,
1780,
1781,
1784,
1785,
1788,
1789,
1792,
1793,
1796,
1797,
1800,
1801,
1804,
1805,
1808,
1809,
1812,
1813,
1816,
1817,
1820,
1821,
1824,
1825,
1828,
1829,
1832,
1833,
1836,
1837,
1840,
1841,
1844,
1845,
1848,
1849,
1852,
1853,
1856,
1857,
1860,
1861,
1864,
1865,
1868,
1869,
1872,
1873,
1876,
1877,
1880,
1881,
1884,
1885,
1888,
1889,
1892,
1893,
1896,
1897,
1900,
1901,
1904,
1905,
1908,
1909,
1912,
1913,
1916,
1917,
1920,
1921,
1924,
1925,
1928,
1929,
1933,
1934,
1938,
1939,
1943,
1944,
1948,
1949,
1953,
1954,
1958,
1959,
1963,
1964,
1968,
1969,
1973,
1974,
1978,
1979,
1983,
1984,
1988,
1989,
1993,
1994,
1998,
1999,
2003,
2004,
2008,
2009,
2013,
2014,
2018,
2019,
2023,
2024,
2028,
2029,
2033,
2034,
2038,
2039,
2043,
2044,
2048,
2049,
2053,
2054,
2058,
2059,
2063,
2064,
2068,
2069,
2073,
2074,
2078,
2079,
2083,
2084,
2088,
2089,
2093,
2094,
2098,
2099,
2103,
2104,
2108,
2109,
2113,
2114,
2118,
2119,
2123,
2124,
2128,
2129,
2133,
2134,
2138,
2139,
2143,
2144,
2148,
2149,
2153,
2154,
2158,
2159,
2163,
2164,
2168,
2169,
2173,
2174,
2178,
2179,
2183,
2184,
2188,
2189,
2193,
2194,
2198,
2199,
2203,
2204,
2208,
2209,
2213,
2214,
2218,
2219,
2223,
2224,
2228,
2229,
2233,
2234,
2238,
2239,
2243,
2244,
2248,
2249,
2253,
2254,
2258,
2259,
2263,
2264,
2268,
2269,
2273,
2274,
2278,
2279,
2283,
2284,
2288,
2289,
2312,
2319,
2333,
2413,
2430,
2515,
2602,
2686,
2749,
2758,
2848,
2929,
2938,
2961,
2996,
3009,
3033,
3091,
3112,
3183,
3210,
3294,
3338,
3360,
3447,
3531,
3540,
3555,
3598,
3607,
3682,
3785,
3831,
3868,
3877,
3968,
4061,
4141,
4160,
4269,
4281,
4305,
4318,
4331,
4344,
4480,
4481,
4573,
4657,
4666,
4679,
4817,
4826,
4918,
4946,
4955,
4968,
5095,
5181,
5299,
5308,
5420,
5538,
5648,
5726,
5735,
5748,
5880,
5889,
5996,
6005,
6016,
6056,
6099,
6138,
6188,
6199,
6218,
6325,
6437,
6543,
6581,
6630,
6674,
6684,
6804,
6811,
6812,
6834,
6846,
6888,
6915,
6957,
6981,
7030,
7062,
7093,
7118,
7139,
7145,
7150,
7162,
7229,
7250,
7320,
7403,
7425,
7499,
7517,
7541,
7636,
7680,
7705,
7723,
7737,
7754,
7864,
7885,
7899,
7909,
7915,
7920,
7934,
7974,
8022,
8089,
8190,
8217,
8269,
8331,
8361,
8383,
8413,
8431,
8485,
8587,
8612,
8630,
8715,
8729,
8803,
8904,
8982,
9015,
9084,
9102,
9146,
9176,
9270,
9352,
9487,
9513,
9542,
9641,
9667,
9689,
9714,
9809,
9938,
9960,
9978,
9992,
10023,
10033,
10039,
10044,
10054,
10124,
10130,
10132,
10133,
10145,
10146,
10160,
10199,
10200,
10211,
10212,
10227,
10246,
10261,
10262,
10371,
10372,
10387,
10400,
10415,
10416,
10578,
10579,
10590,
10603,
10614,
10615,
10862,
10863,
10881,
10892,
10910,
10911,
11140,
11141,
11159,
11170,
11188,
11189
],
"line_end_idx": [
64,
65,
77,
89,
90,
294,
295,
507,
508,
515,
573,
596,
753,
754,
765,
893,
894,
1052,
1053,
1063,
1201,
1202,
1305,
1306,
1434,
1435,
1447,
1448,
1541,
1542,
1544,
1545,
1547,
1548,
1550,
1551,
1553,
1554,
1556,
1557,
1559,
1560,
1562,
1563,
1565,
1566,
1568,
1569,
1572,
1573,
1576,
1577,
1580,
1581,
1584,
1585,
1588,
1589,
1592,
1593,
1596,
1597,
1600,
1601,
1604,
1605,
1608,
1609,
1612,
1613,
1616,
1617,
1620,
1621,
1624,
1625,
1628,
1629,
1632,
1633,
1636,
1637,
1640,
1641,
1644,
1645,
1648,
1649,
1652,
1653,
1656,
1657,
1660,
1661,
1664,
1665,
1668,
1669,
1672,
1673,
1676,
1677,
1680,
1681,
1684,
1685,
1688,
1689,
1692,
1693,
1696,
1697,
1700,
1701,
1704,
1705,
1708,
1709,
1712,
1713,
1716,
1717,
1720,
1721,
1724,
1725,
1728,
1729,
1732,
1733,
1736,
1737,
1740,
1741,
1744,
1745,
1748,
1749,
1752,
1753,
1756,
1757,
1760,
1761,
1764,
1765,
1768,
1769,
1772,
1773,
1776,
1777,
1780,
1781,
1784,
1785,
1788,
1789,
1792,
1793,
1796,
1797,
1800,
1801,
1804,
1805,
1808,
1809,
1812,
1813,
1816,
1817,
1820,
1821,
1824,
1825,
1828,
1829,
1832,
1833,
1836,
1837,
1840,
1841,
1844,
1845,
1848,
1849,
1852,
1853,
1856,
1857,
1860,
1861,
1864,
1865,
1868,
1869,
1872,
1873,
1876,
1877,
1880,
1881,
1884,
1885,
1888,
1889,
1892,
1893,
1896,
1897,
1900,
1901,
1904,
1905,
1908,
1909,
1912,
1913,
1916,
1917,
1920,
1921,
1924,
1925,
1928,
1929,
1933,
1934,
1938,
1939,
1943,
1944,
1948,
1949,
1953,
1954,
1958,
1959,
1963,
1964,
1968,
1969,
1973,
1974,
1978,
1979,
1983,
1984,
1988,
1989,
1993,
1994,
1998,
1999,
2003,
2004,
2008,
2009,
2013,
2014,
2018,
2019,
2023,
2024,
2028,
2029,
2033,
2034,
2038,
2039,
2043,
2044,
2048,
2049,
2053,
2054,
2058,
2059,
2063,
2064,
2068,
2069,
2073,
2074,
2078,
2079,
2083,
2084,
2088,
2089,
2093,
2094,
2098,
2099,
2103,
2104,
2108,
2109,
2113,
2114,
2118,
2119,
2123,
2124,
2128,
2129,
2133,
2134,
2138,
2139,
2143,
2144,
2148,
2149,
2153,
2154,
2158,
2159,
2163,
2164,
2168,
2169,
2173,
2174,
2178,
2179,
2183,
2184,
2188,
2189,
2193,
2194,
2198,
2199,
2203,
2204,
2208,
2209,
2213,
2214,
2218,
2219,
2223,
2224,
2228,
2229,
2233,
2234,
2238,
2239,
2243,
2244,
2248,
2249,
2253,
2254,
2258,
2259,
2263,
2264,
2268,
2269,
2273,
2274,
2278,
2279,
2283,
2284,
2288,
2289,
2312,
2319,
2333,
2413,
2430,
2515,
2602,
2686,
2749,
2758,
2848,
2929,
2938,
2961,
2996,
3009,
3033,
3091,
3112,
3183,
3210,
3294,
3338,
3360,
3447,
3531,
3540,
3555,
3598,
3607,
3682,
3785,
3831,
3868,
3877,
3968,
4061,
4141,
4160,
4269,
4281,
4305,
4318,
4331,
4344,
4480,
4481,
4573,
4657,
4666,
4679,
4817,
4826,
4918,
4946,
4955,
4968,
5095,
5181,
5299,
5308,
5420,
5538,
5648,
5726,
5735,
5748,
5880,
5889,
5996,
6005,
6016,
6056,
6099,
6138,
6188,
6199,
6218,
6325,
6437,
6543,
6581,
6630,
6674,
6684,
6804,
6811,
6812,
6834,
6846,
6888,
6915,
6957,
6981,
7030,
7062,
7093,
7118,
7139,
7145,
7150,
7162,
7229,
7250,
7320,
7403,
7425,
7499,
7517,
7541,
7636,
7680,
7705,
7723,
7737,
7754,
7864,
7885,
7899,
7909,
7915,
7920,
7934,
7974,
8022,
8089,
8190,
8217,
8269,
8331,
8361,
8383,
8413,
8431,
8485,
8587,
8612,
8630,
8715,
8729,
8803,
8904,
8982,
9015,
9084,
9102,
9146,
9176,
9270,
9352,
9487,
9513,
9542,
9641,
9667,
9689,
9714,
9809,
9938,
9960,
9978,
9992,
10023,
10033,
10039,
10044,
10054,
10124,
10130,
10132,
10133,
10145,
10146,
10160,
10199,
10200,
10211,
10212,
10227,
10246,
10261,
10262,
10371,
10372,
10387,
10400,
10415,
10416,
10578,
10579,
10590,
10603,
10614,
10615,
10862,
10863,
10881,
10892,
10910,
10911,
11140,
11141,
11159,
11170,
11188,
11189,
11250
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11250,
"ccnet_original_nlines": 578,
"rps_doc_curly_bracket": 0.003733329940587282,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20270879566669464,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.021670430898666382,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.40993228554725647,
"rps_doc_frac_unique_words": 0.41096919775009155,
"rps_doc_mean_word_length": 5.039819717407227,
"rps_doc_num_sentences": 111,
"rps_doc_symbol_to_word_ratio": 0.0022573398891836405,
"rps_doc_unigram_entropy": 5.675553798675537,
"rps_doc_word_count": 1331,
"rps_doc_frac_chars_dupe_10grams": 0.13893857598304749,
"rps_doc_frac_chars_dupe_5grams": 0.163685142993927,
"rps_doc_frac_chars_dupe_6grams": 0.13893857598304749,
"rps_doc_frac_chars_dupe_7grams": 0.13893857598304749,
"rps_doc_frac_chars_dupe_8grams": 0.13893857598304749,
"rps_doc_frac_chars_dupe_9grams": 0.13893857598304749,
"rps_doc_frac_chars_top_2gram": 0.007155640050768852,
"rps_doc_frac_chars_top_3gram": 0.009689919650554657,
"rps_doc_frac_chars_top_4gram": 0.008348239585757256,
"rps_doc_books_importance": -1017.070068359375,
"rps_doc_books_importance_length_correction": -1017.070068359375,
"rps_doc_openwebtext_importance": -605.894775390625,
"rps_doc_openwebtext_importance_length_correction": -605.894775390625,
"rps_doc_wikipedia_importance": -508.862060546875,
"rps_doc_wikipedia_importance_length_correction": -508.862060546875
},
"fasttext": {
"dclm": 0.7572694420814514,
"english": 0.6373975872993469,
"fineweb_edu_approx": 2.2707529067993164,
"eai_general_math": 0.6523821353912354,
"eai_open_web_math": 0.39788639545440674,
"eai_web_code": 0.3655169606208801
}
}
|
{
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,709,197,098,055,772,700
|
Encyclopedia > Talk:Mathematics
Article Content
Talk:Mathematics
Comments at the bottom, please. Eventually, we will have to refactor (probably just delete a lot of stuff from) this page. Some old talk has been moved to Mathematics/Old_Talk. See also Mathematics/Schemes.
On the question of capitalization in titles, I find a contradiction between the FAQ and somewhere else I can't remember. Should titles of articles be capitalized throughout, or only at the first word? rchase
Contradiction? What contradiction? How could that possibly be, in a collaborative website? :-)
Can I encourage you, mathematicians, to please use lowercase titles? When you use uppercase titles, that forces people to Capitalize Words that Wouldn't Usually be Capitalized in Ordinary Standard English. See naming conventions.
Why isn't there any coverage of K-12 Mathematics? The focus so far is on advanced undergraduate topics.
That's a hell of a good idea. --Juuitchan
I have a suggestion for a slight reorganization of the main page:
• "Methods" becomes "Foundations"
• "Miscellanea" becomes "History and Miscellanea"
• "History of Mathematics" (to be created) goes into "History and Miscellanea"
• "Special Functions" moves to "Change"
• "Fermat's little theorem" goes on a "Number theory" page (to be created under "Structure")
• Links to "Symbolic Logic" and "Set Theory" are placed under "Foundations and History" (Set Theory also remains under Finite Math)
• "Finite Math" moves down the list, after "Space"
• "Discrete Math" moves under "Finite Math"
What do you guys and gals think? --AxelBoldt
An alternative well thought out classification scheme for math is at http://www.math-atlas.org/index/beginners---- As one of the original autors of Math entries here, like Group, Field, Linear algebra, Trigonometric Functions, I think that the new group of articles, are too high level for the average reader, particularly without examples. Many college grads get out of college with a general math course. I think we have to begin to fill in the lower levels. In regard to your placement of Finite Mathematics under Space, I do not agree. We also need people to draw graphics for some of these entries, not to mention a way to do matrices. RoseParks
What should the policy on Greek letters be? I notice that the symbols on the Mathematical constants page appear as blocks in Opera 5.11. Perhaps it would be better just to write them out as pi, gamma, etc., so that they are at least readable.
Zundark, 2001-08-08
I think for now we shouldn't formulate a policy: it should be up to the individual author. If you are interested in widest readability, then spelling out the symbols is best. However, all entities we use (α, ∫, etc., see Howdoesoneeditapage/Quickreference[?]) are valid HTML 4.0 entities and browsers will sooner or later come around to supporting them. I believe the newest versions of Internet Explorer and Mozilla support almost all of them already; I'm not sure about Konqueror. --AxelBoldt
Yes, you're right. I didn't realise it was valid HTML 4.0. So it's Opera's fault for not understanding it. It works in IE4 anyway, and is at least comprehensible in Netscape 4, so I'll carry on doing it.
Zundark
----
Hadn't noticed it, but all the nice math symbols (including Σ, ∫, etc) that work fine w/ NS6.0 on Linux fail utterly w/ Opera 4. Latin-1 works fine with both (of course, latin-1 is the native char set).
So how about things like the inverted Δ (Del), inverted A, reversed E? Being an engineer, not a mathematician, these would provide all the symbols I am likely to need.
--Buz Cory
Found a pretty complete set of math symbols on how does one edit a page/Quick reference[?]. For instance ∇, ∀, ∃.
Also did some more browser checking. StarOffice 5.0 fails utterly on the Greek and Math entities, also. --Buz Cory
Um has any one thought of putting a chaos page on any where? Like the mandelbrot and the like. I don't know much about it but I would love to learn. Michael (Tas)
Apparently nobody has. There's a bit about the Mandelbrot set though, and a stub about fractals. I'll put a
link to "Dynamical systems and chaos theory" on the main mathematics home page under "Change", and hopefully someone will bite. --AxelBoldt
It's a shame the mathematics page still lacks a good general article about mathematics. With so many mathematicians about, you'd think a general discussion and characterization of mathematics would be forthcoming. --LMS
Shouldn't there be an article for Trigonometry? I know that we have the Trig Functions article, but general trig is more broad than that.
Also, shouldn't the number sets be combined under the auspices of one article so that they can have a logical overview and venn diagram to describe their structure?
A page like Numbers could certainly be put under "Quantity" and then it could have an overview and links to all the various number sets and explain their relationships. I would still want to keep links to the reals, complexes etc. right on the main page, so that they are easily accessible. --AxelBoldt
Shouldn't there be a page on transforms? I'm not a mathematician, and can't write it myself. Some transforms I would like to see described are: fourier, cosine, z (used in digital signal processing), laplace, chirp, hilbert, etc. The transforms should be compared regarding their use. --HelgeStenstrom--
I don't think I have ever seen an encyclopedia of mathematics, so I have a question about encyclopedias of mathematics. Would the entry about elementary group theory in such an encyclopedia consist, as it does here, of a system of group theory? Or would it just discuss such a system? Don't get me wrong--I think we should have mathematical systems in Wikipedia. I am asking whether there might be some other information that mathematicians might expect out of an encyclopedia, that we aren't supplying, in most cases, yet. --LMS
I'm only familiar with one Encyclopedia of Mathematics, which is a very large one translated from Russian. The entries usually contain definitions, discuss important results, and give a list of references to the literature. They certainly wouldn't have a article like elementary group theory, since any mathematician should know that anyway. (The article is probably misnamed; proofs of the most basic results in group theory[?] would be more accurate.) Note that we have another article, mathematical group, which discusses group theory. --Zundark
I took the section about Mathematical Books out of the main page. While it would be nice to have a bibliographical listing, right now we don't and it's premature to put it on the main page. --AxelBoldt
Somebody added that topology focuses on the concepts of continuity and direction. I don't see what topology has to do with direction, but I could be convinced. Generally, when I think "direction", I think "tangent space" and hence "differential geometry". How can you talk about direction in topology? --AxelBoldt
perhaps they meant orientable surfaces in algebraic topology. -- Tarquin
"Arithmetic does not count as a "foundation for mathematics"; it is part of elementary algebra"--AxelBoldt
Then why does the elementary algebra article begin: "For this introduction, knowledge of arithmetic (including the use of parentheses) is assumed." --BlackGriffen
No substantive knowledge, except of the English language common to an intelligent high school graduate, should be assumed--unless an exposition of the subject really does require such assumptions. In this case, since we introduce school children to arithmetic all the time, I should think we need a simpler article about arithmetic... In other words, Wikipedia's math articles should, while being maximally useful for mathematicians, also be very useful for non-mathematicians. --LMS
Yes, the elementary algebra article is incomplete and should start out very gently with introducing the order of operations, parentheses, commutativity and associativity etc. (or factor out to an arithmetic article and add a link to elementary algebra if that seems preferable). --AxelBoldt
Should there be a page for arithmetic? There's a page for modular arithmetic, defining it as "a modified system of arithmetic", without any definition of that term. Is it considered to be such a simple concept as to require only a dictionary definition? - Stuart Presnell
See the above discussion. I think we should have a separate article on arithmetic, but I'm not really sure how to write elementary stuff like this, so I haven't attempted it. --Zundark, 2002 Jan 5
What do you think about removing the link to trigonometric functions from the main math page. There's already a link to it under special functions. --Georg Muntingh
Yup, that makes sense. What we really need is a Trigonometry article though. --AxelBoldt
Okay. How can I be sure most people agree? Shall I remove it? (It looks very logical to me.) --Georg Muntingh
Just do it - you'll soon find out if someone doesn't agree. :-) --Zundark, 2002 Jan 12
A question for you all: is is the inequality
||u ± v|| ≥ | ||u|| - ||v|| |
(quoted from Normed vector space) known as the Cauchy-Schwartz Inequality, or am I thinking of something else? --Tarquin
I've found it in my notes, I'll answer my own question :-) -- The Cauchy-Schwartz Inequality is:
|<u , v>| ≤ ||u|| . ||v||
I just added the page mathematical symbols. I would like to hear your opinion on the idea of including a link to this page in each article that uses math. symbols and can potentially be made more readable for a mathematical beginner by inserting the link. --Rade
I like the symbols page; I think we don't need links from *all* articles that use math symbols, but certainly from those which are mainly directed at or will be read by beginners. Some articles are completely incomprehensible without some math background, and adding a link to the symbol page wouldn't make them any less so. AxelBoldt 18:14 Aug 20, 2002 (PDT)
Agreed. --Rade
I removed the text "2. -thematos" from the etymology part, because it's unclear: what is the two about, what is the hyphen, and because I couldn't verify it in the Oxford English Dictionary or in Merriam Webster. AxelBoldt 22:59 Sep 29, 2002 (UTC)
I noticed that the formating for the mathematical topics was changed. I liked the old style because it was more concise and it actually fits on one page. The new style is very cluttered on the screen. Am I the only one who thinks this? -- Ram-Man
I also liked the old style better. AxelBoldt 03:13 Oct 24, 2002 (UTC)
On the mathematical branch listing: Under "Finite Mathematics", "Basic Set Theory" is coined, but the article itself is called "Naive set theory", shouldn't one of these be changed? (213.8.129.12)
Going to revert "logically" to "naturally" as "naturally" has a specific meaning in mathematics - PML.
I have coloured the statements of the theorems in Pythagoras' theorem and Fermat's last theorem. The coloring could make the statements standing out in the article. If this practice is acceptable, I will do it for other theorems and conjectures (with different colour, maybe). -- User:Wshun
This seems like the kind of thing that could be very useful for many mathematical articles - does anyone else have suggestions or ideas about what format would be best? One with a white background may be necessary in order to accommodate our TeX markup; it also ensures a maximum amount of contrast for readability. I think a nice colored border would work well. For others who are interested, I have contributed an alternative formatting for theorem/formula highlighting. See Wikipedia talk:TeX markup for another example. (Actually, considering it now, maybe blue is not the best color - too similar to the link color - maybe green or orange or something?) -- Wapcaplet 02:50 17 Jun 2003 (UTC)
I've gone ahead and formatted several of the theorem article with dotted-outline purple boxes. See, for example, Pythagorean theorem, Fundamental theorem of calculus, and Fermat's last theorem. Sticking to traditions I'm familiar with in math textbooks, I've only done this with formal statements of theory (or sometimes hypothesis), and not just any old "suppose such-and-such..." Someone better versed in mathematics should probably take a look at them, since formality is not my strong suit :) I think these look quite a bit better, though. Before, there was a hodge-podge of styles for highlighting important theorems and other statements (bold, italic, indentation, etc.) Comments welcome! -- Wapcaplet 18:56 18 Jun 2003 (UTC)
The "outline" proposal seems to be an acceptable idea. Maybe we should submit a proposal on "styles of mathematics articles" before we proceed...-- Wshun
All Wikipedia text is available under the terms of the GNU Free Documentation License
Search Encyclopedia
Search over one million articles, find something about almost anything!
Featured Article
Bob Marley and the Wailers
... stable of both successful and diverse artists including, amongst others, such nascent luminaries of the music scene as Genesis, John Martyn and Nick Drake. Much of his ...
|
{
"url": "http://encyclopedia.kids.net.au/page/ta/Talk:Mathematics",
"source_domain": "encyclopedia.kids.net.au",
"snapshot_id": "crawl=CC-MAIN-2016-26",
"warc_metadata": {
"Content-Length": "32365",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:R42EC7GB2JVDTOQTRTICZYIWZWQVTVEY",
"WARC-Concurrent-To": "<urn:uuid:2f4ad058-e914-4e79-b02c-8d23f3b4deac>",
"WARC-Date": "2016-07-01T04:26:50Z",
"WARC-IP-Address": "65.111.169.237",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:3GP4H2RTDWRMGCQCTBCQZDGD4IAYWPBM",
"WARC-Record-ID": "<urn:uuid:19cb01c6-761b-442c-ad60-c4fc42fd4ec1>",
"WARC-Target-URI": "http://encyclopedia.kids.net.au/page/ta/Talk:Mathematics",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ee601e81-9e37-4c77-9892-ddc637925382>"
},
"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,
2,
3,
5,
7,
8,
40,
41,
59,
60,
77,
78,
285,
286,
494,
495,
590,
591,
821,
925,
926,
968,
969,
970,
1036,
1072,
1124,
1205,
1247,
1342,
1476,
1529,
1575,
1576,
1621,
1622,
1623,
2274,
2517,
2537,
2538,
3043,
3044,
3248,
3256,
3257,
3262,
3465,
3633,
3644,
3645,
3759,
3874,
3875,
3876,
4039,
4040,
4148,
4288,
4508,
4646,
4647,
4812,
4813,
5116,
5117,
5118,
5422,
5423,
5424,
5954,
6503,
6504,
6505,
6707,
6708,
6709,
7023,
7024,
7097,
7098,
7099,
7206,
7207,
7370,
7371,
7855,
7856,
8147,
8148,
8149,
8421,
8422,
8619,
8620,
8621,
8786,
8787,
8876,
8877,
8987,
8988,
9075,
9076,
9077,
9122,
9123,
9153,
9274,
9371,
9397,
9398,
9399,
9662,
9663,
10023,
10024,
10039,
10040,
10041,
10289,
10536,
10537,
10607,
10608,
10609,
10806,
10807,
10808,
10911,
10912,
10913,
11204,
11205,
11901,
11902,
12634,
12635,
12789,
12790,
12791,
12792,
12878,
12879,
12881,
12903,
12904,
12976,
12978,
12980,
12983,
13002,
13029,
13030,
13206,
13207,
13209,
13211
],
"line_end_idx": [
2,
3,
5,
7,
8,
40,
41,
59,
60,
77,
78,
285,
286,
494,
495,
590,
591,
821,
925,
926,
968,
969,
970,
1036,
1072,
1124,
1205,
1247,
1342,
1476,
1529,
1575,
1576,
1621,
1622,
1623,
2274,
2517,
2537,
2538,
3043,
3044,
3248,
3256,
3257,
3262,
3465,
3633,
3644,
3645,
3759,
3874,
3875,
3876,
4039,
4040,
4148,
4288,
4508,
4646,
4647,
4812,
4813,
5116,
5117,
5118,
5422,
5423,
5424,
5954,
6503,
6504,
6505,
6707,
6708,
6709,
7023,
7024,
7097,
7098,
7099,
7206,
7207,
7370,
7371,
7855,
7856,
8147,
8148,
8149,
8421,
8422,
8619,
8620,
8621,
8786,
8787,
8876,
8877,
8987,
8988,
9075,
9076,
9077,
9122,
9123,
9153,
9274,
9371,
9397,
9398,
9399,
9662,
9663,
10023,
10024,
10039,
10040,
10041,
10289,
10536,
10537,
10607,
10608,
10609,
10806,
10807,
10808,
10911,
10912,
10913,
11204,
11205,
11901,
11902,
12634,
12635,
12789,
12790,
12791,
12792,
12878,
12879,
12881,
12903,
12904,
12976,
12978,
12980,
12983,
13002,
13029,
13030,
13206,
13207,
13209,
13211,
13212
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 13212,
"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.40145984292030334,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02956203930079937,
"rps_doc_frac_lines_end_with_ellipsis": 0.006329109892249107,
"rps_doc_frac_no_alph_words": 0.21715328097343445,
"rps_doc_frac_unique_words": 0.3642384111881256,
"rps_doc_mean_word_length": 4.879848480224609,
"rps_doc_num_sentences": 147,
"rps_doc_symbol_to_word_ratio": 0.0018248199485242367,
"rps_doc_unigram_entropy": 5.860004901885986,
"rps_doc_word_count": 2114,
"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.004846840165555477,
"rps_doc_frac_chars_top_3gram": 0.0033927899785339832,
"rps_doc_frac_chars_top_4gram": 0.002520360052585602,
"rps_doc_books_importance": -1054.43212890625,
"rps_doc_books_importance_length_correction": -1054.43212890625,
"rps_doc_openwebtext_importance": -611.5325317382812,
"rps_doc_openwebtext_importance_length_correction": -611.5325317382812,
"rps_doc_wikipedia_importance": -522.0951538085938,
"rps_doc_wikipedia_importance_length_correction": -522.0951538085938
},
"fasttext": {
"dclm": 0.129552960395813,
"english": 0.9452272057533264,
"fineweb_edu_approx": 1.8716082572937012,
"eai_general_math": 0.9597264528274536,
"eai_open_web_math": 0.5014087557792664,
"eai_web_code": 0.14308518171310425
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "510",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": ""
}
},
"secondary": {
"code": "025.04",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "Library science",
"level_3": "Library administration"
}
}
},
"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": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "5",
"label": "Social/Forum"
}
},
"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": "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": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,590,557,656,671,092,000
|
Helpful tips
How to remove a previously stored piece of data?
How to remove a previously stored piece of data?
Description: Remove a previously-stored piece of data. A string naming the piece of data to delete. An array or space-separated string naming the pieces of data to delete. The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value.
How to delete split parts of a video?
To delete a certain split video part, just select it and then click the trash icon. To keep the separated clips for later editing, just click ADD TO TIMELINE, and the splitted clips will be imported to the timeline automatically like this:
Can You separate two pieces of PVC pipe?
Once a joint has become permanent, the pieces cannot be separated provided the pipes are straight, have enough glue and overlap a sufficient amount in the joint. If you need to separate the joint, the only option is to cut it.
What happens when there are too many pieces in Sep?
If sep is a character vector, this controls what happens when there are too many pieces. There are three valid options: “warn” (the default): emit a warning and drop extra values. “drop”: drop any extra values without a warning. If sep is a character vector, this controls what happens when there are not enough pieces.
When to remove a point from a piecewise function?
If there is a vertical asymptote, then you might still be able to find that area anyway… think about it again after you’ve studied convergent series. If it’s a removable discontinuity, then removing one point from the function is subtracting an area of 0 from the total, and it should still be the same answer as if it were defined at 0.
How to change the value of a pi point?
• Get the list of all the attributes of a selected PI Point; • Update the value of a point attribute; • Add a button that will display the standard Point Attributeswindow; • Add a functionality to let the user create a new PI Point; • Add a check box field that will create a random tag using these attributes:
Can you substitute sin for Picos in an integral?
Since we now have a pi as a coefficient, we can substitute in sin (pix) for picos (pix) and the 1/pi will just stay as a remnant from our earlier manipulation. It is a little bit more straightforward if you use actual u-substitution, so I definitely recommend tackling the integral that way if you know how to.
How do you remove IR filter from Raspberry Pi?
Using a pen top or similar soft plastic item, push down on the filter. The glue will break and the filter will detach from the lens mount. Replace the main housing over the circuit board.
|
{
"url": "https://www.nbccomedyplayground.com/how-to-remove-a-previously-stored-piece-of-data/",
"source_domain": "www.nbccomedyplayground.com",
"snapshot_id": "CC-MAIN-2024-26",
"warc_metadata": {
"Content-Length": "136033",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AY7DKIKRDK522SVX4RHJ6KQ6INWQAQD5",
"WARC-Concurrent-To": "<urn:uuid:f56e667b-da54-45f1-a5d7-185375bf8790>",
"WARC-Date": "2024-06-18T15:15:10Z",
"WARC-IP-Address": "172.67.184.120",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HD5SUOKTTH6UR4ZJZFRUSHRIGFBIUDDI",
"WARC-Record-ID": "<urn:uuid:912bcfa2-052f-4593-8e0f-095c50dbcaf1>",
"WARC-Target-URI": "https://www.nbccomedyplayground.com/how-to-remove-a-previously-stored-piece-of-data/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b33e754a-1794-4dac-8548-bd6fe9eb890a>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-80\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,
13,
14,
63,
64,
113,
114,
459,
460,
498,
499,
739,
740,
781,
782,
1009,
1010,
1062,
1063,
1383,
1384,
1434,
1435,
1773,
1774,
1813,
1814,
2125,
2126,
2175,
2176,
2487,
2488,
2535,
2536
],
"line_end_idx": [
13,
14,
63,
64,
113,
114,
459,
460,
498,
499,
739,
740,
781,
782,
1009,
1010,
1062,
1063,
1383,
1384,
1434,
1435,
1773,
1774,
1813,
1814,
2125,
2126,
2175,
2176,
2487,
2488,
2535,
2536,
2723
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2723,
"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.43309858441352844,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01584506966173649,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.14260563254356384,
"rps_doc_frac_unique_words": 0.4683026671409607,
"rps_doc_mean_word_length": 4.388547897338867,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0.0017605599714443088,
"rps_doc_unigram_entropy": 4.934990406036377,
"rps_doc_word_count": 489,
"rps_doc_frac_chars_dupe_10grams": 0.054054051637649536,
"rps_doc_frac_chars_dupe_5grams": 0.11323391646146774,
"rps_doc_frac_chars_dupe_6grams": 0.11323391646146774,
"rps_doc_frac_chars_dupe_7grams": 0.11323391646146774,
"rps_doc_frac_chars_dupe_8grams": 0.11323391646146774,
"rps_doc_frac_chars_dupe_9grams": 0.09040074795484543,
"rps_doc_frac_chars_top_2gram": 0.011649579741060734,
"rps_doc_frac_chars_top_3gram": 0.02050326019525528,
"rps_doc_frac_chars_top_4gram": 0.027958989143371582,
"rps_doc_books_importance": -291.9366149902344,
"rps_doc_books_importance_length_correction": -291.9366149902344,
"rps_doc_openwebtext_importance": -171.168212890625,
"rps_doc_openwebtext_importance_length_correction": -171.168212890625,
"rps_doc_wikipedia_importance": -124.12097930908203,
"rps_doc_wikipedia_importance_length_correction": -124.12097930908203
},
"fasttext": {
"dclm": 0.6127023100852966,
"english": 0.8958265781402588,
"fineweb_edu_approx": 2.645627737045288,
"eai_general_math": 0.7242449522018433,
"eai_open_web_math": 0.18450713157653809,
"eai_web_code": 0.7404326796531677
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.656",
"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": "-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": "18",
"label": "Q&A Forum"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,453,280,529,421,669,000
|
DEV Community
loading...
How to Use Excerpts in Eleventy
webbureaucrat
functional programming enthusiast and civic tech nerd.
Originally published at webbureaucrat.gitlab.io on ・3 min read
Recently, I added first-paragraph post excerpts to this Eleventy blog's homepage post list. I found it wasn't as easy as I expected. It wasn't all documented all in one place. Further, in order to use Markdown excerpts in HTML, I had to write a simple custom filter. I'd like to document the process here from end to end.
Enable grey-matter excerpts in .eleventy.js.
The first thing we need is to configure Eleventy to be able to see our excerpts. This is easily done by adding this line to the .eleventy.js configuration file into the main module.exports = function(eleventyConfig) { ... } function.
eleventyConfig.setFrontMatterParsingOptions({ excerpt: true });
Optional: Set the excerpt separator
The excerpt separator is some string which marks the end of the excerpt and the beginning of the rest of the article. By default, it is "---" but this default is easily overridden using the optional excerpt_separator property of the Front Matter parsing options object, like so:
eleventyConfig.setFrontMatterParsingOptions({ excerpt: true,
excerpt_separator: "--excerpt--"
});
Add excerpt separators into each post
Now you can mark each post with excerpt separators. I use the default "---", but you can use whatever excerpt_separator you may have overridden it within the previous step.
Write a simple custom filter to read Markdown excerpts
At this point, we need to reconcile a potential conflict. In my case at least,I am writing blog posts in markdown, but my post list on the homepage is a .njk that compiles to HTML. I don't want to change either of those things, but if I reference my markdown excerpts in HTML, they'll show up as raw markdown text. I need to write a bit of middleware to reconcile the two.
Start by locating your markdownIt options object. You'll find it in a block of code that looks something like this:
let markdownLibrary = markdownIt({ html: true,
breaks: false,
linkify: true
});
eleventyConfig.setLibrary("md", markdownLibrary);
You'll need to reuse this object, so it's a good practice to separate it into its own constant at the top of the file...
const MARKDOWN_OPTIONS = { html: true,
breaks: false,
linkify: true
};
...that can be referenced in multiple places
let markdownLibrary = markdownIt(MARKDOWN_OPTIONS);
eleventyConfig.setLibrary("md", markdownLibrary);
This is all in the service of writing a simple custom filters that can take markdown strings and turn them into HTML fragments. This will do it for us.
eleventyConfig.addFilter("toHTML", str =>
{
return new markdownIt(MARKDOWN_OPTIONS).renderInline(str);
});
Use the custom filter to display the HTML excerpts in your post lists
Now, finally, I can include this excerpt in my /_includes/postlist.njk,which iterates over the posts collection like so:
(Fair warning: I formatted this for readability. If you copy/paste this, you may see some whitespace issues to fix.)
{% for post in postslist | reverse %}
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<h2 class="h2-postlist">
<a href="{{ post.url | url }}"
class="postlist-link">
{% if post.data.title %}
{{ post.data.title }}
{% else %}
<code>{{ post.url }}</code>
{% endif %}
</a>
</h2>
<time class="postlist-date"
datetime="{{ post.date | htmlDateString }}">
{{ post.date | htmlDateString }}
</time>
{% for tag in post.data.tags %}
{%- if collections.tagList.indexOf(tag) != -1 -%}
{% set tagUrl %}/tags/{{ tag }}/{% endset %}
<a href="{{ tagUrl | url }}" class="tag">{{ tag }}</a>
{%- endif -%}
{% endfor %}
</li>
{% endfor %}
Let us pipe the post excerpt into our toHTML custom filter and then pipe the output of our filter to the built-in safe filter so that Eleventy treats the output as HTML instead of plain text.
{% for post in postslist | reverse %}
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<h2 class="h2-postlist">
<a href="{{ post.url | url }}"
class="postlist-link">
{% if post.data.title %}
{{ post.data.title }}
{% else %}
<code>{{ post.url }}</code>
{% endif %}
</a>
</h2>
<time class="postlist-date"
datetime="{{ post.date | htmlDateString }}">
{{ post.date | htmlDateString }}
</time>
{% for tag in post.data.tags %}
{%- if collections.tagList.indexOf(tag) != -1 -%}
{% set tagUrl %}/tags/{{ tag }}/{% endset %}
<a href="{{ tagUrl | url }}"
class="tag">{{ tag }}
</a>
{%- endif -%}
{% endfor %}
{%- if post.data.page.excerpt -%}
<p>{{ post.data.page.excerpt | toHTML | safe}}</p>
{%- endif -%}
</li>
{% endfor %}
And now when we run npx eleventy --serve we should see our excerpts everyplace we reference _includes/postlist.njk.
Click here for a live demo.
Discussion (0)
|
{
"url": "https://dev.to/webbureaucrat/how-to-use-excerpts-in-eleventy-1048",
"source_domain": "dev.to",
"snapshot_id": "crawl=CC-MAIN-2021-39",
"warc_metadata": {
"Content-Length": "105385",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PWCSW7FCIAXK2OHDBPFA6WITVYX2YPCS",
"WARC-Concurrent-To": "<urn:uuid:ffe849db-73b2-4f4d-820c-881eb9653d9b>",
"WARC-Date": "2021-09-19T20:13:15Z",
"WARC-IP-Address": "151.101.2.217",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:K3VNU5FR7ZJRZ3TX5JODMWUU5QZLHQVZ",
"WARC-Record-ID": "<urn:uuid:14fdde24-99f3-4cee-af9a-ea0bfa7536b7>",
"WARC-Target-URI": "https://dev.to/webbureaucrat/how-to-use-excerpts-in-eleventy-1048",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:01558592-4623-4613-aa74-164512c108c2>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-102\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,
14,
15,
26,
27,
59,
60,
74,
129,
192,
193,
515,
516,
561,
562,
796,
797,
861,
862,
898,
899,
1178,
1179,
1240,
1320,
1368,
1369,
1407,
1408,
1581,
1582,
1637,
1638,
2011,
2012,
2128,
2129,
2177,
2228,
2278,
2315,
2365,
2366,
2487,
2488,
2528,
2571,
2613,
2641,
2642,
2687,
2688,
2740,
2790,
2791,
2943,
2944,
2987,
2992,
3055,
3061,
3062,
3132,
3133,
3254,
3255,
3372,
3373,
3412,
3498,
3527,
3565,
3598,
3631,
3664,
3683,
3722,
3743,
3755,
3766,
3799,
3855,
3895,
3908,
3945,
4002,
4056,
4120,
4141,
4159,
4168,
4181,
4182,
4374,
4375,
4414,
4500,
4530,
4568,
4601,
4634,
4667,
4686,
4725,
4746,
4758,
4769,
4802,
4858,
4898,
4911,
4948,
5005,
5059,
5097,
5130,
5144,
5165,
5183,
5222,
5280,
5299,
5308,
5321,
5322,
5438,
5439,
5467,
5468
],
"line_end_idx": [
14,
15,
26,
27,
59,
60,
74,
129,
192,
193,
515,
516,
561,
562,
796,
797,
861,
862,
898,
899,
1178,
1179,
1240,
1320,
1368,
1369,
1407,
1408,
1581,
1582,
1637,
1638,
2011,
2012,
2128,
2129,
2177,
2228,
2278,
2315,
2365,
2366,
2487,
2488,
2528,
2571,
2613,
2641,
2642,
2687,
2688,
2740,
2790,
2791,
2943,
2944,
2987,
2992,
3055,
3061,
3062,
3132,
3133,
3254,
3255,
3372,
3373,
3412,
3498,
3527,
3565,
3598,
3631,
3664,
3683,
3722,
3743,
3755,
3766,
3799,
3855,
3895,
3908,
3945,
4002,
4056,
4120,
4141,
4159,
4168,
4181,
4182,
4374,
4375,
4414,
4500,
4530,
4568,
4601,
4634,
4667,
4686,
4725,
4746,
4758,
4769,
4802,
4858,
4898,
4911,
4948,
5005,
5059,
5097,
5130,
5144,
5165,
5183,
5222,
5280,
5299,
5308,
5321,
5322,
5438,
5439,
5467,
5468,
5482
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5482,
"ccnet_original_nlines": 128,
"rps_doc_curly_bracket": 0.024808460846543312,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.24605384469032288,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02042710967361927,
"rps_doc_frac_lines_end_with_ellipsis": 0.015503879636526108,
"rps_doc_frac_no_alph_words": 0.31940576434135437,
"rps_doc_frac_unique_words": 0.42146191000938416,
"rps_doc_mean_word_length": 5.443234920501709,
"rps_doc_num_sentences": 79,
"rps_doc_symbol_to_word_ratio": 0.003714019898325205,
"rps_doc_unigram_entropy": 5.162301540374756,
"rps_doc_word_count": 643,
"rps_doc_frac_chars_dupe_10grams": 0.21142856776714325,
"rps_doc_frac_chars_dupe_5grams": 0.24228571355342865,
"rps_doc_frac_chars_dupe_6grams": 0.22857142984867096,
"rps_doc_frac_chars_dupe_7grams": 0.21142856776714325,
"rps_doc_frac_chars_dupe_8grams": 0.21142856776714325,
"rps_doc_frac_chars_dupe_9grams": 0.21142856776714325,
"rps_doc_frac_chars_top_2gram": 0.014285709708929062,
"rps_doc_frac_chars_top_3gram": 0.011142860166728497,
"rps_doc_frac_chars_top_4gram": 0.012571429833769798,
"rps_doc_books_importance": -466.7294006347656,
"rps_doc_books_importance_length_correction": -466.7294006347656,
"rps_doc_openwebtext_importance": -297.4073181152344,
"rps_doc_openwebtext_importance_length_correction": -297.4073181152344,
"rps_doc_wikipedia_importance": -220.7935028076172,
"rps_doc_wikipedia_importance_length_correction": -220.7935028076172
},
"fasttext": {
"dclm": 0.04984300956130028,
"english": 0.6150268912315369,
"fineweb_edu_approx": 1.9237052202224731,
"eai_general_math": 0.2770513892173767,
"eai_open_web_math": 0.04827963933348656,
"eai_web_code": 0.4019899368286133
}
}
|
{
"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.7",
"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": "2",
"label": "Click Here References"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,546,932,874,338,196,000
|
C#中TreeView节点的自定义绘制方法_C#教程
分享到:
本文实例讲述了C#中TreeView节点的自定义绘制方法。分享给大家供大家参考。具体如下:
if ((e.State & TreeNodeStates.Selected) != 0)
{
//演示为绿底白字
e.Graphics.FillRectangle(Brushes.DeepSkyBlue, e.Node.Bounds);
Font nodeFont = e.Node.NodeFont;
if (nodeFont == null) nodeFont = ((TreeView)sender).Font;
e.Graphics.DrawString(e.Node.Text, nodeFont, Brushes.White, Rectangle.Inflate(e.Bounds, 2, 0));
}
else
{
e.DrawDefault = true;
}
if ((e.State & TreeNodeStates.Focused) != 0)
{
using (Pen focusPen = new Pen(Color.Black))
{
focusPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
Rectangle focusBounds = e.Node.Bounds;
focusBounds.Size = new Size(focusBounds.Width - 1,
focusBounds.Height - 1);
e.Graphics.DrawRectangle(focusPen, focusBounds);
}
}
希望本文所述对大家的C#程序设计有所帮助。
昵 称:
验证码:
相关文档:
|
{
"url": "http://webtag123.com/dotnet/22322.html",
"source_domain": "webtag123.com",
"snapshot_id": "crawl=CC-MAIN-2017-22",
"warc_metadata": {
"Content-Length": "18429",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NBPX7WZ3DPPQONSKFCDAFCPGDQAQCZ6Z",
"WARC-Concurrent-To": "<urn:uuid:90b9f568-e7e0-4947-aefc-22eab61596be>",
"WARC-Date": "2017-05-27T08:15:22Z",
"WARC-IP-Address": "115.47.26.138",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HUXRJTVTQC2AKPMQ36BAPJICKPBTFSIC",
"WARC-Record-ID": "<urn:uuid:135b5c5f-20ac-4da0-a4b5-64f7d778973c>",
"WARC-Target-URI": "http://webtag123.com/dotnet/22322.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:543963d3-748f-4f1c-8cc3-59bf1a377fa4>"
},
"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,
27,
28,
33,
34,
80,
81,
127,
129,
140,
203,
204,
238,
297,
394,
396,
401,
403,
426,
428,
429,
474,
476,
521,
524,
587,
628,
681,
708,
759,
762,
764,
765,
787,
788,
796,
801,
802
],
"line_end_idx": [
27,
28,
33,
34,
80,
81,
127,
129,
140,
203,
204,
238,
297,
394,
396,
401,
403,
426,
428,
429,
474,
476,
521,
524,
587,
628,
681,
708,
759,
762,
764,
765,
787,
788,
796,
801,
802,
807
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 807,
"ccnet_original_nlines": 37,
"rps_doc_curly_bracket": 0.009913260117173195,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.08866994827985764,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014778329990804195,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5862069129943848,
"rps_doc_frac_unique_words": 0.7777777910232544,
"rps_doc_mean_word_length": 10.962963104248047,
"rps_doc_num_sentences": 36,
"rps_doc_symbol_to_word_ratio": 0.019704429432749748,
"rps_doc_unigram_entropy": 3.63586688041687,
"rps_doc_word_count": 54,
"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.027027029544115067,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -77.9862060546875,
"rps_doc_books_importance_length_correction": -77.9862060546875,
"rps_doc_openwebtext_importance": -40.098876953125,
"rps_doc_openwebtext_importance_length_correction": -40.093223571777344,
"rps_doc_wikipedia_importance": -12.604036331176758,
"rps_doc_wikipedia_importance_length_correction": -12.604036331176758
},
"fasttext": {
"dclm": 0.9909415245056152,
"english": 0.16645941138267517,
"fineweb_edu_approx": 3.104548215866089,
"eai_general_math": 0.6521336436271667,
"eai_open_web_math": 0.04364347085356712,
"eai_web_code": 0.4933595657348633
}
}
|
{
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,721,446,524,729,739,000
|
แนวฉาก
จากวิกิพีเดีย สารานุกรมเสรี
(เปลี่ยนทางจาก Surface normal)
แนวฉากสำหรับจุดบนพื้นผิวหาได้จากเส้นแนวฉากของระนาบสัมผัสที่สัมผัสพื้นผิวตรงจุดนั้น
ภาพแสดงแนวฉากทั้งสองค่าของโพลีกอน
แนวฉาก (อังกฤษ: normal) ในทางเรขาคณิต หมายถึงวัตถุอย่างเช่นเส้นตรงหรือเวกเตอร์ที่ตั้งฉากกับวัตถุที่กำหนด ตัวอย่างเช่น กรณีสองมิติ เส้นแนวฉาก (normal line) ของเส้นโค้ง คือเส้นตรงที่ตั้งฉากกับเส้นสัมผัสเส้นโค้ง ณ จุดนั้น กรณีสามมิติ แนวฉากของพื้นผิว (surface normal) ที่จุด P คือเวกเตอร์ที่ตั้งฉากกับระนาบสัมผัสพื้นผิว ณ จุด P ซึ่งเรียกว่า เวกเตอร์แนวฉาก (normal vector)
ในคอมพิวเตอร์กราฟิกส์สามมิตินิยมใช้แนวฉากกำหนดมุมระหว่างทิศทางที่พื้นผิวหันไปทำกับทิศทางของต้นกำเนิดแสงเพื่อเพื่อคำนวณการสะท้อนแบบ flat shading หรือใช้กำหนดที่มุมแต่ละมุมของพื้นผิวโพลีกอน (vertex normal) เพื่อใช้เกลี่ยแนวฉากของสองพื้นผิวที่ติดกันเข้าหากัน ทำให้พื้นผิวที่ทำมุมกันสามารถสะท้อนแสดงได้เหมือนกับเป็นพื้นผิวเรียบโค้ง (phong shading)
การคำนวณหาแนวฉาก[แก้]
การหาแนวฉากของโพลีกอน สามารถหาได้จากผลคูณไขว้ของเวกเตอร์ขอบสองด้านที่ไม่ขนานกันของโพลีกอน แนวฉากจะมีสองแนวซึ่งชี้ไปในทิศทางตรงข้ามกัน จึงอาจใช้กฎมือขวาร่วมกำหนดทิศทางที่แนวฉากหรือหน้าของโพลีกอนหันไป
ถ้าระนาบเกิดจากสมการ เวกเตอร์ จะเป็นแนวฉากของระนาบ ถ้าพื้นผิว (ที่อาจไม่เรียบ) S ถูกพาราเมไทรซ์ในระบบพิกัดเชิงเส้นโค้ง x (s, t) โดยจำนวนจริง s และ t แนวฉากจะหาได้จากผลคูณไขว้ของอนุพันธ์บางส่วน
การใช้งาน[แก้]
คอมพิวเตอร์กราฟิกส์สามมิติ[แก้]
สนามเวกเตอร์ของแนวฉากบนพื้นผิว
vertex normal กับการเปลี่ยนแปลงการสะท้อนของพื้นผิว (a) vertex normal ชี้ไปทิศทางเดียวกับ surface normal (b) vertex normal ชี้ไปในทิศทางเดียวกับ vertex normal ของพื้นผิวข้างเคียง การสะท้อนแสงจึงต่อเนื่องเสมือนเป็นพื้นผิวเดียวกัน
ในงานคอมพิวเตอร์กราฟิกส์สามมิติ แนวฉากและกฎมือขวาใช้กำหนดว่าโพลีกอนจะหันไปในทิศทางใดและจะสะท้อนแสงอย่างไร ทั้งนี้แนวฉากจะถูกนำมาใช้ในการกำหนดการสะท้อนหรือหักเหแสงของพื้นผิว และอาจจะไม่ตั้งฉากกับพื้นผิวจริงก็ได้
• Vertex normal : ซอฟต์แวร์สำหรับเร็นเดอร์ภาพอาจคำนวณแนวฉากของพื้นผิวจากค่า vertex normal เช่นในโพลีกอนสามเหลี่ยมจะกำหนดค่า vertex normal สามค่าให้ vertex ทั้งสามมุม โดยจะเป็นค่าเวกเตอร์ที่ไม่จำเป็นต้องตั้งฉากกับพื้นผิวโพลีกอนเพื่อมาใช้คำนวณสนามเวกเตอร์ของแนวฉากของพื้นผิวโพลีกอน เช่นถ้ามีโพลีกอนสองชิ้นวางติดกัน แล้วกำหนด vertex normal ของทั้งสองชิ้นให้วิ่งไปทิศทางเดียวกับแนวฉากของพื้นผิว รอยต่อของโพลีกอนจะแสดงรอยหยักตามขอบ แต่ถ้า vertexให้ normal วิ่งไปทางเดียวกับ vertex normal ของพื้นผิวโพลีกอนข้างเคียง การสะท้อนของโพลีกอนชิ้นแรกจะถูกเกลี่ยเข้าหาการสะท้อนของโพลีกอนข้างเคียง ทำให้มองดูเสมือนเป็นพื้นผิวเรียบโค้ง
ทัศนศาสตร์เชิงเรขาคณิต[แก้]
แนวฉากกับการสะท้อน โดยมุมตกกระทบ (θi) จะมีค่าเท่ากับมุมสะท้อน (θr)
ใน ทัศนศาสตร์เชิงเรขาคณิต แนวฉาก คือเส้นที่ตั้งฉากกับพื้นผิว[1] ของตัวกลางต่างๆ คำว่า normal ในที่นี้ใช้ในแง่ของคณิตศาสตร์ หมายถึงการตั้งฉาก โดยในการสะท้อนของแสง มุมตกกระทบ หมายถึงมุมระหว่างแนวฉากกับทิศทางที่แสงวิ่งเข้า ขณะที่ มุมสะท้อน คือมุมระหว่างแนวฉากกับทิศทางที่แสงสะท้อนออกไป
ดูเพิ่ม[แก้]
อ้างอิง[แก้]
1. "The Law of Reflection". The Physics Classroom Tutorial. คลังข้อมูลเก่า เก็บจาก แหล่งเดิม (HTML) เมื่อ 2012-08-13. สืบค้นเมื่อ 2008-03-31.
|
{
"url": "https://th.wikipedia.org/wiki/Surface_normal",
"source_domain": "th.wikipedia.org",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "91621",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:HWXTVLD3HWAEEZ5YZDRON6XAKWPRN6P5",
"WARC-Concurrent-To": "<urn:uuid:196eb78d-4a07-4415-85ab-917d866a6609>",
"WARC-Date": "2022-07-01T23:22:04Z",
"WARC-IP-Address": "208.80.154.224",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:SIN2AOC56LZHPCC43WOIWIGWQY4UG7Q3",
"WARC-Record-ID": "<urn:uuid:206de315-6b49-4724-be9d-6184dc350e93>",
"WARC-Target-URI": "https://th.wikipedia.org/wiki/Surface_normal",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:83935060-83a5-427d-8387-23e975957556>"
},
"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 (info@commoncrawl.org)\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,
7,
8,
36,
67,
150,
184,
185,
554,
555,
899,
900,
922,
923,
1122,
1123,
1316,
1317,
1332,
1333,
1365,
1366,
1397,
1625,
1626,
1837,
1838,
2459,
2460,
2488,
2489,
2556,
2557,
2840,
2841,
2854,
2855,
2868,
2869
],
"line_end_idx": [
7,
8,
36,
67,
150,
184,
185,
554,
555,
899,
900,
922,
923,
1122,
1123,
1316,
1317,
1332,
1333,
1365,
1366,
1397,
1625,
1626,
1837,
1838,
2459,
2460,
2488,
2489,
2556,
2557,
2840,
2841,
2854,
2855,
2868,
2869,
3012
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3012,
"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.007736939936876297,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0038684699684381485,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.9419729113578796,
"rps_doc_frac_unique_words": 0.7594936490058899,
"rps_doc_mean_word_length": 17.57594871520996,
"rps_doc_num_sentences": 5,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.459920883178711,
"rps_doc_word_count": 158,
"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.043212100863456726,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -490.3815612792969,
"rps_doc_books_importance_length_correction": -490.3815612792969,
"rps_doc_openwebtext_importance": -272.53131103515625,
"rps_doc_openwebtext_importance_length_correction": -272.53131103515625,
"rps_doc_wikipedia_importance": -216.35755920410156,
"rps_doc_wikipedia_importance_length_correction": -216.35755920410156
},
"fasttext": {
"dclm": 0.2678431272506714,
"english": 0.000011310000445519108,
"fineweb_edu_approx": 1.9162397384643555,
"eai_general_math": 0.40404564142227173,
"eai_open_web_math": 0.2339458465576172,
"eai_web_code": 0.02717500925064087
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "516.15",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry, Algebraic"
}
},
"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": "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": "10",
"label": "Knowledge Article"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,790,876,994,616,800,000
|
Managing Time Machine
Top Previous Next
Having chosen the data source for the channel where you are going to back-test, press the "Time Machine On/Off" button to turn the simulation ON.
machine_on
If instead of turning on it opens the window with the tree of channels, it means the data source for this channel is still not selected.
Now start the channel by pressing the usual "Start/Stop" button. Time Machine will start feeding the data into the channel, and you will see the cards and prices appear on the screen. The speed of the game is shown next to the "Time Machine ON/OFF" button. Don't confuse speed and refresh rate. Roughly, the first one determines the length of each round, whereas the second one determines how many times the game data will be refreshed during that round. So for example, if the length of a round is 29 sec, the speed is 200, and the refresh rate is 3 sec., then in fact the round will last 14.5 sec, and the channel will be refreshed once in 1.5 sec.
If the speed you specified is high (over 50000), you might not be able to catch the cards and prices on the screen, as the channel will be refreshed very fast. To quickly slow it down or speed it up even more, use the slider.
If you stop the channel using the "Start/Stop" button, and later resume it, Time Machine will recommence the games from the place where it was stopped.
To restart it, press the "Restart Machine" text label in the "Game Info" panel.
restart_machine
If Time Machine has reached the end of file or it has played all the games that you told it to, it will stop the channel. If you then start it again, it will start playing the games from the very beginning.
When you are in simulation mode, "Test Mode" automatically turns on, as it is impossible to place real money bets when you are running Time Machine. But apart from that, you can use all other functions and tools of X-Feeder as if you were working with live BetFair data.
|
{
"url": "https://x-feeder.com/help/time-machine/eng/managing_time_machine.htm",
"source_domain": "x-feeder.com",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "5030",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:C4WZYI6JFG63CLQF6X6IUEPNSZZG5LDE",
"WARC-Concurrent-To": "<urn:uuid:797712bb-ca05-40f1-9d36-cd1ee254616e>",
"WARC-Date": "2024-05-18T14:38:20Z",
"WARC-IP-Address": "104.21.53.188",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EXFRHFYSDU35NVNW6X7LDW4J5UYCKARK",
"WARC-Record-ID": "<urn:uuid:a4b908a8-07c4-4edd-9679-a0b82bfa7b12>",
"WARC-Target-URI": "https://x-feeder.com/help/time-machine/eng/managing_time_machine.htm",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b6662504-9e7a-4b2a-b10c-414c3c366bb7>"
},
"warc_info": "isPartOf: CC-MAIN-2024-22\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2024\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-211\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,
22,
23,
43,
44,
190,
191,
193,
194,
205,
206,
208,
209,
346,
347,
349,
350,
1001,
1002,
1004,
1005,
1231,
1232,
1234,
1235,
1387,
1388,
1468,
1469,
1471,
1472,
1488,
1489,
1491,
1492,
1699,
1700,
1702,
1703,
1974,
1975
],
"line_end_idx": [
22,
23,
43,
44,
190,
191,
193,
194,
205,
206,
208,
209,
346,
347,
349,
350,
1001,
1002,
1004,
1005,
1231,
1232,
1234,
1235,
1387,
1388,
1468,
1469,
1471,
1472,
1488,
1489,
1491,
1492,
1699,
1700,
1702,
1703,
1974,
1975,
1976
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1976,
"ccnet_original_nlines": 40,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.44131454825401306,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.009389669634401798,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1619718372821808,
"rps_doc_frac_unique_words": 0.449438214302063,
"rps_doc_mean_word_length": 4.258427143096924,
"rps_doc_num_sentences": 19,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.539605140686035,
"rps_doc_word_count": 356,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06596305966377258,
"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.05079156160354614,
"rps_doc_frac_chars_top_3gram": 0.02968337945640087,
"rps_doc_frac_chars_top_4gram": 0.021108180284500122,
"rps_doc_books_importance": -171.1021270751953,
"rps_doc_books_importance_length_correction": -171.1021270751953,
"rps_doc_openwebtext_importance": -92.90764617919922,
"rps_doc_openwebtext_importance_length_correction": -92.90764617919922,
"rps_doc_wikipedia_importance": -72.69252014160156,
"rps_doc_wikipedia_importance_length_correction": -72.69252014160156
},
"fasttext": {
"dclm": 0.16595572233200073,
"english": 0.9184195399284363,
"fineweb_edu_approx": 2.17802357673645,
"eai_general_math": 0.3827696442604065,
"eai_open_web_math": 0.4059983491897583,
"eai_web_code": 0.21087157726287842
}
}
|
{
"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": "338.5",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Industries, Prices, and Microeconomics"
}
}
},
"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": "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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,164,759,243,425,496,600
|
Search Images Maps Play YouTube News Gmail Drive More »
Sign in
Screen reader users: click this link for accessible mode. Accessible mode has the same essential features but works better with your reader.
Patents
1. Advanced Patent Search
Publication numberUS5790891 A
Publication typeGrant
Application numberUS 08/585,335
Publication dateAug 4, 1998
Filing dateJan 11, 1996
Priority dateJan 11, 1996
Fee statusPaid
Publication number08585335, 585335, US 5790891 A, US 5790891A, US-A-5790891, US5790891 A, US5790891A
InventorsYosef Solt, Doron Shefert, David Shemla, Eyal Waldman
Original AssigneeGalileo Technology Ltd.
Export CitationBiBTeX, EndNote, RefMan
External Links: USPTO, USPTO Assignment, Espacenet
Synchronizing unit having two registers serially connected to one clocked elements and a latch unit for alternately activating the registers in accordance to clock signals
US 5790891 A
Abstract
A data transfer synchronizing unit is provided for generating flags indicating the fullness state of a data transfer element. The determining unit includes the first and second counters operating according to first and second clock signals, first and second registers, serially connected to the output of the second counter, a latch unit and a comparator. The first register is clocked by the second clock signal and the second register is clocked by the first clock signal. The latch unit alternately activates the first and second registers to receive data in accordance with the second and first clock signals, respectively. The comparator produces the flags by comparing the output of the first counter with the output of the second register.
Images(3)
Previous page
Next page
Claims(8)
We claim:
1. A fullness determining unit for generating flags indicating the fullness state of a data transfer element, the unit comprising:
a. a first counter incremented each time data is transferred into said data transfer element and operating in accordance with a first clock signal;
b. a second counter incremented each time data is removed from said data transfer element and operating in accordance with a second clock signal;
c. first and second registers, serially connected to the output of said second counter, said first register being clocked by said second clock signal and said second register being clocked by said first clock signal;
d. a latch unit for alternately activating said first and second registers to receive data in accordance with said second and first clock signals, respectively; and
e. a comparator for producing said flags by comparing the output of said first counter with the output of said second register.
2. A fullness determining unit according to claim 1 and wherein said latch unit comprises:
a. a first latch, active in the presence of a token, for transferring output of said second counter to said first register in accordance with said second clock signal;
b. a second latch, active in the presence of said token, for transferring output of said first register to said second register in accordance with said first clock signal; and
c. a token passer for passing said token back and forth between said first latch to said second latch.
3. A fullness determining unit according to claim 2 and wherein said token passer comprises at least one synchronizer operating in accordance with said first clock for passing said token from said first latch to said second latch and at least one synchronizer operating in accordance with said second clock for passing said token from said second latch to said first latch.
4. A fullness determining unit according to claim 1 and wherein said data transfer element is a first-in, first-out (FIFO) buffer.
5. A fullness determining unit for generating flags indicating the fullness state of a data transfer element, the unit comprising:
a. a binary counter incremented each time data is transferred into said data transfer element and operating in accordance with a first clock signal;
b. a grey level counter incremented each time data is removed from said data transfer element and operating in accordance with a second clock signal;
c. at least one synchronizer, operating in accordance with said first clock signal, for latching the output of said grey level counter;
d. a grey to binary converter for converting the output of said at least one synchronizer to a binary value; and
e. a comparator for producing said flags by comparing the output of said first counter with the output of said grey to binary converter.
6. A fullness determining unit according to claim 5 and wherein said data transfer element is a FIFO buffer.
7. A synchronizing unit for synchronizing the output of first and second clocked elements, wherein the clocked elements are clocked in accordance with first and second clocks, respectively, the synchronizing unit comprising:
a. first and second registers, serially connected to the output of said second clocked element, said first register being clocked by said second clock and said second register being clocked by said first clock, said second register providing the synchronized output; and
b. a latch unit for alternately activating said first and second registers to receive data in accordance with said second and first clock signals, respectively.
8. A synchronizing unit according to claim 7 and wherein said latch unit comprises:
a. a first latch, active in the presence of a token, for transferring output of said second counter to said first register in accordance with said second clock;
b. a second latch, active in the presence of said token, for transferring output of said first register to said second register in accordance with said first clock; and
c. a token passer for passing said token back and forth between said first latch to said second latch.
Description
FIELD OF THE INVENTION
The present invention relates generally to data transfer between two subsystems having different latencies, transfer rates and clock speeds and to synchronization of flags in such data transfer systems in particular.
BACKGROUND OF THE INVENTION
Computer systems are typically comprised of a plurality of subsystems operating at different clock speeds and different latencies. When one subsystem transfers data to a second subsystem, it is possible that the transfer rate of the two subsystems differ. In order for two such subsystems to communicate, some type of data transfer elements must be placed therebetween. For example, first-in, first-out (FIFO) buffers are placed between the two subsystems. The FIFO buffers receive the data from the transferring subsystem at its first transfer, clock and latency rates and provide the data to the receiving subsystem at its second transfer, clock and latency rates. Thus, the FIFO provides the two subsystems with the ability to communicate.
However, the two subsystems cannot continually fill the FIFO buffer; once the buffer is full, the faster subsystem has to stop sending data until the FIFO begins to empty out. Thus, the data transfer system has to measure the fullness of the FIFO. This is illustrated in FIG. 1, to which reference is now made.
FIG. 1 illustrates two subsystems 10 and 12, illustrated as busses, with a FIFO buffer 14 in between. System 10 operates according to clock B and system 12 operates according to clock A. The fullness determining unit 15 typically includes two wraparound counters, counter A and counter B, for counting the number of times data is transferred from subsystems 12 and to subsystem 10, respectively, and a fullness flag generator 16. The fullness flag generator 16 compares the values of counters A and B to the size of the FIFO 14 and activates a fullness flag whenever the values of counters A and B indicate that the FIFO 14 is full. Generator 16 can also indicate that the FIFO is empty and/or half-full.
For example, let the rate of clock A be 50Hz, the rate of clock B be 25Hz, the size of the FIFO buffer 14 be 100 bits long, the size of counter A be 200 and the size of counter B be 100. Also assume that subsystem 12, operating at clock A, is transferring the data to subsystem 10, operating at clock B. At an initial time, t=0, both counters A and B are at 0 and the FIFO buffer 14 is empty.
After one second, subsystem 12 will have performed 50 transfers into FIFO 14 and subsystem 10 will have performed 25 removals from FIFO buffer 14. The FIFO buffer 14 will contain 25 pieces of data. Counter A will have a value of 50 and counter B will have a value of 25. The process repeats and thus, after four seconds, subsystem 12 will have performed 200 transfers and subsystem 10 will have performed 100 removals. Counter A will have a value of 200 and counter B will have a value of 100. The FIFO buffer 14 will contain 100 pieces of data and will be completely full.
At this point, when fullness flag generator 16 compares the values of counters A and B, it will determine that they indicate that the FIFO buffer 14 is full. Generator 16 will activate the fullness flag which indicates to the transferring subsystem (in this case, system 12), to stop transferring. Counters B and A both wraparound to 0 and the above counting process is repeated until counter B reaches 100 (indicating that 100 removals have occurred). Counter A will not increment since subsystem 12 is not transferring anything.
At this point, generator 16 deactivates the fullness flag. Counter B will wraparound to 0 and both subsystems 10 and 12 can then operate as described previously.
Unfortunately, since the two subsystems operate at different clock rates which are not, necessarily, synchronized with each other, it is possible that the fullness flag generator 16 will sample the data in counters A and B just before one or the other of the counters is updated. Thus, generator 16 might make an incorrect decision. In order to ensure that fullness flag generator 16 operates properly, the latching of data from counters A and B have to be synchronized.
SUMMARY OF THE PRESENT INVENTION
It is therefore an object of the present invention to provide a fullness determining unit, for data transfer elements, which synchronizes the latching of data from two separately clocked counters.
In accordance with a preferred embodiment of the present invention, the fullness determining unit includes the first and second counters operating according to first and second clock signals, first and second registers, serially connected to the output of the second counter, a latch unit and a comparator. The first register is clocked by the second clock signal and the second register is clocked by the first clock signal. The latch unit alternately activates the first and second registers to receive data in accordance with the second and first clock signals, respectively. The comparator produces the flags by comparing the output of the first counter with the output of the second register.
Additionally, in accordance with a preferred embodiment of the present invention, the latch unit includes first and second latches and a token passer. The latches are only active when they receive the token. The first latch transfers the output of the second counter to the first register in accordance with the second clock signal. The second latch transfers the output of the first register to the second register in accordance with the first clock signal. The token passer passes the token back and forth between the first latch to the second latch.
Moreover, in accordance with a preferred embodiment of the present invention, the token passer includes at least one synchronizer operating in accordance with the first clock for passing the token from the first latch to the second latch and at least one synchronizer operating in accordance with the second clock for passing the token from the second latch to the first latch.
There is also provided, in accordance with a preferred embodiment of the present invention, a synchronizing unit for synchronizing the output of first and second separately clocked elements. The synchronizing unit includes first and second registers and a latch unit. The registers are serially connected to the output of the second clocked element, the first register is clocked by the second clock and the second register is clocked by the first clock. The second register provides the synchronized output. The latch unit alternately activates the first and second registers to receive data in accordance with the second and first clocks, respectively.
Since binary counters describe numbers with many bits (i.e. the number 15 is 0111), since incrementing by one can cause many bits to change states (i.e. the value 16 is 1000) and since all of the bits do not, necessarily, change state at exactly the same time, if one is sampling the binary counter with a clock different from that which increments the binary counter, it is possible to sample the output of a binary counter during the change of state. This produces an incorrect reading of the contents of the binary counter. In contrast, grey level counters change only one bit when incrementing.
Therefore, in accordance with a second preferred embodiment of the present invention, the fullness determining unit includes a binary counter, a grey level counter, a synchronizer, a grey to binary converter and a comparator. The binary counter is incremented each time data is transferred into the data transfer element and operates in accordance with the first clock signal. The grey level counter is incremented each time data is removed from the data transfer element and operates in accordance with a second clock signal. The synchronizer operates in accordance with the first clock signal, and latches the output of the grey level counter. The grey to binary converter converts the output of the at least one synchronizer to a binary value. The comparator produces the flags by comparing the output of the first counter with the output of the grey to binary converter.
BRIEF DESCRIPTION OF THE DRAWINGS
The present invention will be understood and appreciated more fully from the following detailed description taken in conjunction with the drawings in which:
FIG. 1 is a schematic illustration of prior art data transfer between two subsystems utilizing a first-in, first-out (FIFO) buffer and a fullness determining unit;
FIG. 2 is a schematic illustration of a fullness determining unit, constructed and operative in accordance with a first preferred embodiment of the present invention;
FIG. 3 is a timing diagram useful in understanding the operation of the unit of FIG. 2; and
FIG. 4 is a schematic illustration of a fullness determining unit, constructed and operative in accordance with the present invention.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
Reference is now made to FIGS. 2 and 3 which illustrate a fullness determining unit, constructed and operative in accordance with a first preferred embodiment of the present invention. The fullness determining unit, labeled 20, of the present invention comprises counters A and B, as in the prior art, a value latching unit 22, and a comparator 24.
It will be appreciated that the fullness determining unit 20 can operate with any type of data transfer element and that the FIFO 10 is provided herein as an example.
The counters A and B operate as in the prior art, counting the number of bits which their respective subsystems have transferred in or out. For the present discussion, counter A is associated with the transferring subsystem, such as subsystem 12, and counter B is associated with the receiving subsystem, such as subsystem 10.
Since counter A indicates the number of transfers into the FIFO buffer 14, comparator 24 operates on clock A and directly receives the output of counter A. The output of counter B, which might be changing at the moment that the value of counter A is being latched by comparator 24, is collected by the value latching unit 22 in accordance with clock B and is provided to comparator 24 in accordance with clock A.
Value latching unit 22 comprises two registers 30 and 32 and a switching unit 34. Register 30 latches the current value of counter B in accordance with clock B and register 32 latches the value in register 30 in accordance with clock A. Comparator 24 receives the value in register 32 in accordance with clock A.
To ensure that registers 30 and 32 do not latch data at the same time, switching unit 34 activates the two registers 30 and 32 alternatively. To do so, switch unit 34 comprises two latches 40 and 42, which activate registers 30 and 32, respectively, but only once they receive an internal "token" or "pulse". Since the token can exist in only one place at a time, registers 30 and 32 will be alternately activated.
Switch unit 34 comprises the two latches 40 and 42, two clock A synchronizers 44a and 44b and two clock B synchronizers 46a and 46b. The synchronizers 44 and 46 can be any suitable synchronizers such as are known in the art. Latch 40 operates on clock B and latch 42 operates on clock A.
The operation of switch unit 34 will now be described with respect to FIG. 3 which illustrates, in graphs (a)-(h), the activity levels respectively of clock B, clock A, signals B1-B3 and signals A1-A3, where signals B1-B3 and A1-A3 are marked on FIG. 2.
As shown in graph (e) of FIG. 3, latch 40 receives the token when clock B goes high. When latch 40 has the token, it activates register 30, via signal B3, to latch the value presently in counter B. The next time clock B goes high, latch 40 is deactivated and signal B3 goes low.
The next time that clock A goes high after signal B3 goes low, synchronizer 44a is activated (i.e. receives the token). Signal Al changes state. The next time that clock A goes high, synchronizer 44b and latch 42 are activated (i.e. they both receive the token). Signal A2 changes state and signal A3 goes high.
Signal A3, from latch 42, activates register 42 which then latches the data from register 30. Latch 42 is deactivated the next time that clock A goes high (i.e. when signal A3 goes low) thereby providing the token to synchronizer 46a. On that same clock A high, the data from register 32 is provided to comparator 24.
The next time that clock B goes high, signal B1 of synchronizer 46a changes state. On the following clock B high, the token passes to synchronizer 46b and to latch 40. Signal B2 (of synchronizer 46b) changes state and signal B3 (of latch 40) goes high. The process as described hereinabove is repeated. Latch 40 activates register 40 and, the next time clock B goes high, latch 40 is deactivated and signal B3 goes low. The token passes to synchronizer 44a which changes state the next time clock A goes high.
Comparator 24 can perform any suitable comparison operations in order to produce flags indicating the fullness state of the FIFO buffer 14. The flags which comparator 24 produces are provided externally to start and stop the transfer operations of subsystems 10 and 12 and/or to perform other operations.
It will be appreciated that the switch unit 22 adds delay between counter B and comparator 24. However, since counter B counts the number of bits removed from the FIFO buffer 14 and provided to the receiving subsystem 10, the delay just delays the deassertion of a fullness flag; it slows the operation of the transfer but does not cause any data loss.
It will be further appreciated that the switch unit 22 can be implemented in any situation wherein it is necessary to synchronize the output of two differently clocked elements and that the present invention incorporates all such situations.
Reference is now made to FIG. 4 which illustrates a second embodiment of the fullness determining unit of the present invention.
Since binary counters describe numbers with many bits (i.e. the number 15 is 0111), since incrementing by one can cause many bits to change states (i.e. the value 16 is 1000) and since all of the bits do not, necessarily, change state at exactly the same time, if one is sampling the binary counter with a clock different from that which increments the binary counter, it is possible to sample the output of a binary counter during the change of state. This produces an incorrect reading of the contents of the binary counter. In contrast, grey level counters change only one bit when incrementing.
Therefore, in this embodiment, the fullness determining unit, labeled 50, comprises comparator 24, a binary counter, counter A, which is sampled at the same clock (clock A) as the comparator, and a grey level counter 52 which is clocked in accordance with clock B and whose output is synchronized to clock A. Unit 50 additionally comprises at least one synchronizer 54 and a grey to binary converter 56. FIG. 4 illustrates two synchronizers 54, utilized in order to ensure metastability of the output read from grey counter 52.
Since grey counter 52 only increments one bit per clock of clock B, on the next clock A high signal, when the synchronizer 54 latches the data from grey level counter 52, the grey level counter 52 will most probably have finished incrementing the appropriate one bit. To increase metastability, two synchronizers 54 can be utilized.
The output of the synchronizer or synchronizers 54 is converted to a binary value by unit 56 and the result, which represents the number of transfers out of the FIFO buffer 14, is compared as described hereinabove.
It will be appreciated by persons skilled in the art that the present invention is not limited to what has been particularly shown and described hereinabove. Rather the scope of the present invention is defined only by the claims which follow:
Patent Citations
Cited PatentFiling datePublication dateApplicantTitle
US3633115 *Apr 22, 1970Jan 4, 1972IttDigital voltage controlled oscillator producing an output clock which follows the phase variation of an input clock
US4128832 *Jan 8, 1976Dec 5, 1978Ncr CorporationCombined encoder/decoder
US4285047 *Oct 12, 1979Aug 18, 1981Hitachi, Ltd.Digital adder circuit with a plurality of 1-bit adders and improved carry means
US4463443 *Oct 22, 1981Jul 31, 1984The United States Of America As Represented By The Secretary Of The Air ForceData buffer apparatus between subsystems which operate at differing or varying data rates
US4926424 *Jun 10, 1988May 15, 1990Mitsubishi Denki Kabushiki KaishaTest auxiliary circuit for testing semiconductor device
US5093809 *Mar 5, 1990Mar 3, 1992Siemens AktiengesellschaftStatic memory having pipeline registers
US5130976 *Feb 12, 1991Jul 14, 1992Bell Communications Research, Inc.Batcher and banyan switching elements
US5278865 *May 8, 1992Jan 11, 1994At&T Bell LaboratoriesTiming recovery scheme for a transceiver using a single sample clock source for transmitting and receiving signals
US5299237 *Dec 20, 1991Mar 29, 1994Honeywell Inc.Asymmetrical data tracking digital phase locked loop
US5587675 *Aug 12, 1993Dec 24, 1996At&T Global Information Solutions CompanyMulticlock controller
Non-Patent Citations
Reference
1"Gray Code Counter", IBM Technical Disclosure Bulletin, p.824, Sep. 1970.
2"High Speed On-Chip Addressable Memory Clock", IBM Technical Disclosure Bulletin, pp.5413-5416, May 1987.
3"Modified Gray Code Counters", IBM Technical Disclosure Bulletin, pp.460-462, Jul. 1980.
4"Modular Buffer Allocation Control Logic", IBM Technical Disclosure Bulletin, pp.6240-6243, May 1982.
5 *Gray Code Counter , IBM Technical Disclosure Bulletin, p.824, Sep. 1970.
6 *High Speed On Chip Addressable Memory Clock , IBM Technical Disclosure Bulletin, pp.5413 5416, May 1987.
7 *Modified Gray Code Counters , IBM Technical Disclosure Bulletin, pp.460 462, Jul. 1980.
8 *Modular Buffer Allocation Control Logic , IBM Technical Disclosure Bulletin, pp.6240 6243, May 1982.
Referenced by
Citing PatentFiling datePublication dateApplicantTitle
US6172538 *Jan 6, 1999Jan 9, 2001Chips & Technologies, L.L.C.Universal pulse synchronizer
US6324205 *May 9, 2000Nov 27, 2001Sony CorporationScalable method for generating long codes using gold sequences
US6369455Apr 7, 2000Apr 9, 2002Siliconware Precision Industries Co., Ltd.Externally-embedded heat-dissipating device for ball grid array integrated circuit package
US6647444 *Dec 29, 2000Nov 11, 2003Intel CorporationData synchronization interface
US6750693 *Apr 4, 2003Jun 15, 2004Cirrus Logic, Inc.Clock generation circuits and methods with minimal glitch generation and systems using the same
US6754295Apr 7, 2000Jun 22, 2004Comrex CorporationMethod and apparatus for synchronizing data transmission and reception over a network
US6845414 *Mar 15, 2002Jan 18, 2005Silicon Integrated Systems Corp.Apparatus and method of asynchronous FIFO control
US7613116Sep 29, 2004Nov 3, 2009Marvell Israel (M.I.S.L.) Ltd.Method and apparatus for preventing head of line blocking among ethernet switches
US7742412Sep 29, 2004Jun 22, 2010Marvell Israel (M.I.S.L.) Ltd.Method and apparatus for preventing head of line blocking in an ethernet system
US8385208Oct 29, 2009Feb 26, 2013Marvell Israel (M.I.S.L) Ltd.Method and apparatus for preventing head of line blocking among Ethernet switches
US8427947Jun 21, 2010Apr 23, 2013Marvell Israel (M.I.S.L) Ltd.Method and apparatus for preventing head of line blocking in an ethernet system
US9007902Apr 22, 2013Apr 14, 2015Marvell Israel (M.I.S.L.) Ltd.Method and apparatus for preventing head of line blocking in an Ethernet system
US20030177295 *Mar 15, 2002Sep 18, 2003Fu-Chou HsuApparatus and method of asynchronous FIFO control
US20040170142 *Mar 4, 2004Sep 2, 2004Laird Kevin MichaelMethod and apparatus for long code generation in synchronous, multi-chip rate systems
Classifications
U.S. Classification710/34, 327/153, 710/57, 327/160, 327/151, 710/29, 710/60, 713/502, 327/144
International ClassificationG06F5/10
Cooperative ClassificationG06F5/10
European ClassificationG06F5/10
Legal Events
DateCodeEventDescription
Mar 25, 1996ASAssignment
Owner name: GALILEO TECHNOLOGY LTD., ISRAEL
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:SOLT, YOSEF;SHEFER, DORON;SHEMLA, DAVID;AND OTHERS;REEL/FRAME:007814/0782
Effective date: 19960306
Jan 30, 2002FPAYFee payment
Year of fee payment: 4
May 1, 2003ASAssignment
Owner name: MARVELL SEMICONDUCTOR ISRAEL LTD., ISRAEL
Free format text: CHANGE OF NAME;ASSIGNOR:GALILEO TECHNOLOGY LTD.;REEL/FRAME:014015/0846
Effective date: 20021215
Feb 6, 2006FPAYFee payment
Year of fee payment: 8
Feb 4, 2010FPAYFee payment
Year of fee payment: 12
|
{
"url": "http://www.google.com/patents/US5790891?dq=U.S.+Patent+No.+4,528,643",
"source_domain": "www.google.com",
"snapshot_id": "crawl=CC-MAIN-2017-34",
"warc_metadata": {
"Content-Length": "68778",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:J5GJJNV5EIPSNAZNQPEQDR5LGGAMUE3T",
"WARC-Concurrent-To": "<urn:uuid:6246716d-0399-4f33-8f7b-592c7188cb17>",
"WARC-Date": "2017-08-22T11:02:42Z",
"WARC-IP-Address": "172.217.8.4",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:LCIV4YUCRCZY2XO5WLK7FQXFQJD5IJWM",
"WARC-Record-ID": "<urn:uuid:ad9b2fff-e421-485f-a3ad-bfd6c16922c9>",
"WARC-Target-URI": "http://www.google.com/patents/US5790891?dq=U.S.+Patent+No.+4,528,643",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:68e9d795-a574-4540-a86e-2cc3d22baa8f>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-164-4-238.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,
56,
64,
205,
206,
214,
215,
243,
273,
295,
327,
355,
379,
405,
420,
521,
584,
625,
664,
715,
887,
900,
909,
1656,
1666,
1680,
1690,
1700,
1710,
1841,
1989,
2135,
2352,
2517,
2645,
2736,
2904,
3080,
3183,
3557,
3688,
3819,
3968,
4118,
4254,
4367,
4504,
4613,
4838,
5109,
5270,
5354,
5515,
5684,
5787,
5799,
5822,
5823,
6040,
6041,
6069,
6070,
6813,
6814,
7125,
7126,
7831,
7832,
8225,
8226,
8800,
8801,
9332,
9333,
9495,
9496,
9967,
9968,
10001,
10002,
10199,
10200,
10898,
10899,
11452,
11453,
11831,
11832,
12487,
12488,
13087,
13088,
13963,
13964,
13998,
13999,
14156,
14157,
14321,
14322,
14489,
14490,
14582,
14583,
14718,
14719,
14765,
14766,
15115,
15116,
15283,
15284,
15611,
15612,
16025,
16026,
16339,
16340,
16755,
16756,
17044,
17045,
17299,
17300,
17579,
17580,
17892,
17893,
18211,
18212,
18722,
18723,
19028,
19029,
19382,
19383,
19625,
19626,
19755,
19756,
20355,
20356,
20884,
20885,
21218,
21219,
21434,
21435,
21679,
21680,
21697,
21751,
21904,
21977,
22105,
22307,
22431,
22530,
22637,
22808,
22910,
23008,
23029,
23039,
23114,
23221,
23311,
23414,
23490,
23598,
23689,
23793,
23807,
23862,
23952,
24065,
24229,
24312,
24460,
24596,
24713,
24857,
25000,
25144,
25286,
25429,
25529,
25671,
25687,
25782,
25819,
25854,
25886,
25899,
25924,
25949,
25993,
26128,
26153,
26181,
26204,
26228,
26282,
26371,
26396,
26423,
26446,
26473
],
"line_end_idx": [
56,
64,
205,
206,
214,
215,
243,
273,
295,
327,
355,
379,
405,
420,
521,
584,
625,
664,
715,
887,
900,
909,
1656,
1666,
1680,
1690,
1700,
1710,
1841,
1989,
2135,
2352,
2517,
2645,
2736,
2904,
3080,
3183,
3557,
3688,
3819,
3968,
4118,
4254,
4367,
4504,
4613,
4838,
5109,
5270,
5354,
5515,
5684,
5787,
5799,
5822,
5823,
6040,
6041,
6069,
6070,
6813,
6814,
7125,
7126,
7831,
7832,
8225,
8226,
8800,
8801,
9332,
9333,
9495,
9496,
9967,
9968,
10001,
10002,
10199,
10200,
10898,
10899,
11452,
11453,
11831,
11832,
12487,
12488,
13087,
13088,
13963,
13964,
13998,
13999,
14156,
14157,
14321,
14322,
14489,
14490,
14582,
14583,
14718,
14719,
14765,
14766,
15115,
15116,
15283,
15284,
15611,
15612,
16025,
16026,
16339,
16340,
16755,
16756,
17044,
17045,
17299,
17300,
17579,
17580,
17892,
17893,
18211,
18212,
18722,
18723,
19028,
19029,
19382,
19383,
19625,
19626,
19755,
19756,
20355,
20356,
20884,
20885,
21218,
21219,
21434,
21435,
21679,
21680,
21697,
21751,
21904,
21977,
22105,
22307,
22431,
22530,
22637,
22808,
22910,
23008,
23029,
23039,
23114,
23221,
23311,
23414,
23490,
23598,
23689,
23793,
23807,
23862,
23952,
24065,
24229,
24312,
24460,
24596,
24713,
24857,
25000,
25144,
25286,
25429,
25529,
25671,
25687,
25782,
25819,
25854,
25886,
25899,
25924,
25949,
25993,
26128,
26153,
26181,
26204,
26228,
26282,
26371,
26396,
26423,
26446,
26473,
26496
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 26496,
"ccnet_original_nlines": 207,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.35062074661254883,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05266319960355759,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1944333165884018,
"rps_doc_frac_unique_words": 0.1878557950258255,
"rps_doc_mean_word_length": 5.10815954208374,
"rps_doc_num_sentences": 237,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.451531410217285,
"rps_doc_word_count": 4216,
"rps_doc_frac_chars_dupe_10grams": 0.2885865569114685,
"rps_doc_frac_chars_dupe_5grams": 0.45273029804229736,
"rps_doc_frac_chars_dupe_6grams": 0.3862369954586029,
"rps_doc_frac_chars_dupe_7grams": 0.36144131422042847,
"rps_doc_frac_chars_dupe_8grams": 0.3312128484249115,
"rps_doc_frac_chars_dupe_9grams": 0.3067886233329773,
"rps_doc_frac_chars_top_2gram": 0.010911960154771805,
"rps_doc_frac_chars_top_3gram": 0.028231799602508545,
"rps_doc_frac_chars_top_4gram": 0.009101039730012417,
"rps_doc_books_importance": -1856.565185546875,
"rps_doc_books_importance_length_correction": -1856.565185546875,
"rps_doc_openwebtext_importance": -1038.457275390625,
"rps_doc_openwebtext_importance_length_correction": -1038.457275390625,
"rps_doc_wikipedia_importance": -698.6107788085938,
"rps_doc_wikipedia_importance_length_correction": -698.6107788085938
},
"fasttext": {
"dclm": 0.04036260023713112,
"english": 0.8944056630134583,
"fineweb_edu_approx": 1.732088327407837,
"eai_general_math": 0.12681472301483154,
"eai_open_web_math": 0.10308492183685303,
"eai_web_code": 0.016072869300842285
}
}
|
{
"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.395",
"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": "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": "11",
"label": "Legal Notices"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,334,118,916,281,795,600
|
Commit 9908aa4c authored by Michael Kohnen's avatar Michael Kohnen
added HOARemax, SHLinear2DegreeOrder and fixed elevation vs polar angle irritations in SH functions
parent 2801056f
......@@ -429,6 +429,12 @@ template< typename T > inline void linspace( std::vector< T >& dest, T a, T b, T
// (Note a and b must be powers of two, otherwise an exception is thrown)
ITA_BASE_API void pow2space( std::vector< int >& dest, const int a, const int b );
// returns the elevation angle (0 = frontal direction) in radians from a polar angle theta (0 = above)
ITA_BASE_API double theta2elevation(const double dThetaRAD);
// returns the polar angle theta (0 = above) in radians from a given elevation angle (0 = frontal direction)
ITA_BASE_API double elevation2theta(const double dElevationRAD);
// Calculates the factorial of an positive integer m
ITA_BASE_API int factorial( const int m );
......@@ -438,11 +444,17 @@ ITA_BASE_API double SHNormalizeConst( const int m, const int n );
//Calculates the Kronecker delta
ITA_BASE_API int SHKronecker( const int m );
// Returns the index of a basefunction with degree m and order n
// Returns the linear index of a basefunction with degree m and order n, linear indexing starts with 0
ITA_BASE_API int SHDegreeOrder2Linear( const int m, const int n );
// Returns degree and order of a basefunctions from a linear index, linear indexing starts with 0
ITA_BASE_API void SHLinear2DegreeOrder(const int iLinear, int &m, int &n);
// Calculates the remax weightings up to a given order
ITA_BASE_API std::vector<double> HOARemaxWeights(int iTruncationOrder);
//Calculates the realvalued Basefunctions of SH for e.g. Ambisonics
ITA_BASE_API std::vector<double> SHRealvaluedBasefunctions( const double elevation, const double azimuth, const int maxOrder );
ITA_BASE_API std::vector<double> SHRealvaluedBasefunctions( const double thetaRAD, const double azimuthRAD, const int maxOrder );
//Calculates the associated legendre polynomials
ITA_BASE_API std::vector<double> SHAssociatedLegendre( const int N, const double mu );
......
......@@ -434,6 +434,22 @@ void pow2space( std::vector<int>& dest, const int a, const int b )
}
}
double theta2elevation(const double dThetaRAD)
{
if (dThetaRAD<0 || dThetaRAD>ITAConstants::PI_D)
ITA_EXCEPT1(INVALID_PARAMETER, "thetaRAD is only valid between 0 and PI");
return ITAConstants::PI_D / 2 - dThetaRAD;
}
double elevation2theta(const double dElevationRAD)
{
if (abs(dElevationRAD)<ITAConstants::PI_D/2)
ITA_EXCEPT1(INVALID_PARAMETER, "elevationRAD is only valid between -PI/2 and PI/2");
return ITAConstants::PI_D / 2 - dElevationRAD;
}
int factorial( const int m )
{
if( m<0 )
......@@ -464,22 +480,25 @@ int SHKronecker( const int m )
return 0;
}
std::vector<double> SHRealvaluedBasefunctions( const double elevation, const double azimuth, const int maxOrder )
std::vector<double> SHRealvaluedBasefunctions(const double thetaRAD, const double azimuthRAD, const int maxOrder)
{
std::vector<double> Y;
Y.resize( ( maxOrder + 1 )*( maxOrder + 1 ) );
Y = SHAssociatedLegendre( maxOrder, cos( elevation ) );
//std::vector<double> dNormalizing;
int nmax = (maxOrder + 1)*(maxOrder + 1);
Y.resize(nmax);
//dNormalizing.resize(nmax);
//dNormalizing = SHNormalizeConst();
for( int n = 0; n <= maxOrder; n++ )
Y = SHAssociatedLegendre(maxOrder, cos(thetaRAD));
for (int n = 0; n <= maxOrder; n++)
{
//Y[SHDegreeOrder2Linear(0,n)]*=Y[SHDegreeOrder2Linear(0,n)]*SHNormalizeConst(0,n);
Y[ SHDegreeOrder2Linear( 0, n ) ] *= SHNormalizeConst( 0, n );
for( int m = 1; m <= n; m++ )
Y[SHDegreeOrder2Linear(0, n)] *= SHNormalizeConst(0, n);
for (int m = 1; m <= n; m++)
{
double Normalizing = SHNormalizeConst( m, n );
Y[ SHDegreeOrder2Linear( m, n ) ] *= cos( m*azimuth )*Normalizing;
Y[ SHDegreeOrder2Linear( -m, n ) ] *= sin( m*azimuth )*Normalizing;
double Normalizing = SHNormalizeConst(m, n);
Y[SHDegreeOrder2Linear(m, n)] *= cos(m*azimuthRAD)*Normalizing;
Y[SHDegreeOrder2Linear(-m, n)] *= sin(m*azimuthRAD)*Normalizing;
}
}
return Y;
......@@ -517,3 +536,31 @@ int SHDegreeOrder2Linear( const int m, const int n )
return ( n*n + n + m );
}
std::vector<double> HOARemaxWeights(int iTruncationOrder)
{
if (iTruncationOrder > 20)
ITA_EXCEPT1(INVALID_PARAMETER, "ReMAx decoding only implemented up to Truncatrion Order 20");
std::vector<double> vdRemax;
double dMaxRootTable[21] = { 0.993752, 0.993129, 0.992407, 0.991565, 0.990575, 0.989401, 0.987993, 0.986284, 0.984183, 0.978229, 0.978229, 0.973907, 0.96816, 0.96029, 0.949108, 0.93247, 0.90618, 0.861136, 0.774597, 0.57735, 0 };
double dMaxRoot = dMaxRootTable[21 - iTruncationOrder-1];
std::vector<double> vdAssoLegendre = (SHAssociatedLegendre(iTruncationOrder, dMaxRoot));
for (int k = 0; k <= iTruncationOrder; k++)
{
vdRemax.push_back(vdAssoLegendre[SHDegreeOrder2Linear(0,k)]);
}
return vdRemax;
}
void SHLinear2DegreeOrder(const int iLinear, int &m, int &n)
{
if (iLinear<0)
ITA_EXCEPT1(INVALID_PARAMETER, "The linear index has to be higher than one");
std::vector<int> nm;
n=(floor(sqrt(iLinear)));
m=(iLinear - n * n - n);
};
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment
|
{
"url": "https://git.rwth-aachen.de/ita/ITABase/-/commit/9908aa4ce7bd37be6c1c24a4254e5cd7871d0da7",
"source_domain": "git.rwth-aachen.de",
"snapshot_id": "crawl=CC-MAIN-2021-04",
"warc_metadata": {
"Content-Length": "255017",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4R4GOQ24C6F5ESWGNDV7ISZX3HI3C6E7",
"WARC-Concurrent-To": "<urn:uuid:1e12de91-2d80-451a-bb1a-d88eeef0e9f5>",
"WARC-Date": "2021-01-19T21:43:12Z",
"WARC-IP-Address": "134.130.122.52",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2ROJOPYFJ5JNQWETECMC3P5HU5UPBTRN",
"WARC-Record-ID": "<urn:uuid:a649017e-114a-4275-93bc-37ede72ed377>",
"WARC-Target-URI": "https://git.rwth-aachen.de/ita/ITABase/-/commit/9908aa4ce7bd37be6c1c24a4254e5cd7871d0da7",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cf65e7f2-79f4-4295-8ce0-edd82cc61de7>"
},
"warc_info": "isPartOf: CC-MAIN-2021-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2021\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-233.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,
67,
68,
168,
169,
185,
293,
367,
450,
553,
614,
723,
788,
841,
884,
978,
1011,
1056,
1121,
1224,
1291,
1389,
1464,
1519,
1591,
1659,
1787,
1917,
1966,
2053,
2060,
2154,
2156,
2158,
2205,
2207,
2256,
2331,
2374,
2376,
2427,
2429,
2474,
2559,
2606,
2608,
2637,
2639,
2649,
2708,
2718,
2720,
2834,
2948,
2950,
2973,
3020,
3076,
3112,
3154,
3170,
3199,
3236,
3273,
3324,
3360,
3362,
3446,
3509,
3539,
3596,
3625,
3627,
3674,
3741,
3809,
3854,
3918,
3983,
3985,
3987,
3997,
4077,
4101,
4103,
4161,
4163,
4190,
4284,
4313,
4542,
4600,
4689,
4733,
4735,
4797,
4799,
4815,
4817,
4878,
4880,
4895,
4973,
4994,
5020,
5045,
5048,
5076,
5098,
5106,
5177,
5212
],
"line_end_idx": [
67,
68,
168,
169,
185,
293,
367,
450,
553,
614,
723,
788,
841,
884,
978,
1011,
1056,
1121,
1224,
1291,
1389,
1464,
1519,
1591,
1659,
1787,
1917,
1966,
2053,
2060,
2154,
2156,
2158,
2205,
2207,
2256,
2331,
2374,
2376,
2427,
2429,
2474,
2559,
2606,
2608,
2637,
2639,
2649,
2708,
2718,
2720,
2834,
2948,
2950,
2973,
3020,
3076,
3112,
3154,
3170,
3199,
3236,
3273,
3324,
3360,
3362,
3446,
3509,
3539,
3596,
3625,
3627,
3674,
3741,
3809,
3854,
3918,
3983,
3985,
3987,
3997,
4077,
4101,
4103,
4161,
4163,
4190,
4284,
4313,
4542,
4600,
4689,
4733,
4735,
4797,
4799,
4815,
4817,
4878,
4880,
4895,
4973,
4994,
5020,
5045,
5048,
5076,
5098,
5106,
5177,
5212,
5241
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5241,
"ccnet_original_nlines": 111,
"rps_doc_curly_bracket": 0.004197670146822929,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.14546966552734375,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04073150083422661,
"rps_doc_frac_lines_end_with_ellipsis": 0.008928569965064526,
"rps_doc_frac_no_alph_words": 0.4846217930316925,
"rps_doc_frac_unique_words": 0.37137991189956665,
"rps_doc_mean_word_length": 6.545145034790039,
"rps_doc_num_sentences": 36,
"rps_doc_symbol_to_word_ratio": 0.009975059889256954,
"rps_doc_unigram_entropy": 4.753292560577393,
"rps_doc_word_count": 587,
"rps_doc_frac_chars_dupe_10grams": 0.06975533813238144,
"rps_doc_frac_chars_dupe_5grams": 0.2589797079563141,
"rps_doc_frac_chars_dupe_6grams": 0.19208745658397675,
"rps_doc_frac_chars_dupe_7grams": 0.16918271780014038,
"rps_doc_frac_chars_dupe_8grams": 0.1483602225780487,
"rps_doc_frac_chars_dupe_9grams": 0.06975533813238144,
"rps_doc_frac_chars_top_2gram": 0.03956272825598717,
"rps_doc_frac_chars_top_3gram": 0.016397710889577866,
"rps_doc_frac_chars_top_4gram": 0.010931810364127159,
"rps_doc_books_importance": -583.7505493164062,
"rps_doc_books_importance_length_correction": -583.7505493164062,
"rps_doc_openwebtext_importance": -275.68011474609375,
"rps_doc_openwebtext_importance_length_correction": -275.68011474609375,
"rps_doc_wikipedia_importance": -187.2357177734375,
"rps_doc_wikipedia_importance_length_correction": -187.2357177734375
},
"fasttext": {
"dclm": 0.4413277506828308,
"english": 0.43141722679138184,
"fineweb_edu_approx": 1.7573795318603516,
"eai_general_math": 0.9611537456512451,
"eai_open_web_math": 0.2675936222076416,
"eai_web_code": 0.853007972240448
}
}
|
{
"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": "519.4",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Probabilities; or, Mathematical statistics"
}
}
},
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,288,092,651,853,517,000
|
General discussion
Locked
Install SP1 without internet
By galehickey2 ·
Installed XP Pro on my pc with internet and was able to download SP1 with no problem. Have XP Pro on another machine without net access but do have a SP1.CAB file on the pc. I extracted same but do not know where to go from there - there are about four .exe files. Can I install SP1`from the cab file? Thank you.
This conversation is currently closed to new comments.
3 total posts (Page 1 of 1)
| Thread display: Collapse - | Expand +
All Comments
Collapse -
by TheChas In reply to Install SP1 without inter ...
The CAB file for SP1 that you found likely just has the various files and registry patches that Windows Update downloads to install SP1.
Assuming that you still have access to an internet connection, there are 2 ways to get a portable version of SP1 to install on computers that do not have an internet connection.
First, use the Windows Update Catalog page:
http://v4.windowsupdate.microsoft.com/catalog/en/
You can manually select and download all current updates for currently supported versions of Windows.
There are several listings for XP. If memory serves me well, the one listed as "XP Gold" gives you the most complete list of updates to download.
Just download the desired updates and burn them to a CD.
Next, you can order the Windows Security Update CD.
This CD was released this spring and includes SP 1 along with other updates and a 1 year license for anti virus software.
I could not find the link in a quick search of Microsoft's web site.
Chas
Collapse -
by TheChas In reply to
Oops,
The correct name for the version of XP with the long list of updates is Windows XP RTM
Chas
Collapse -
by Nacromancer9 In reply to Install SP1 without inter ...
http://www.microsoft.com/windowsxp/pro/downloads/servicepacks/sp1/default.asp
use this link to download the SP-1 to a disk, or disks if you do not have a CD burner. Then install on the other computer. The other ay is to connect the two computers together using a ethernet cable modem to modem and then download the SP-1 to a temp file that is an enabled shared file start/find computer/ enter other computers IP and it will connect to it transfer the file. To get your other computers IP address go to Start/run/type in"cmd"/ black window will open and where the cursor is flashing, type: ipconfig and it should show you what it is.
If it does not show a number but "0's", then type ipconfig /release then ipconfig /renew. and see if it gives it to you then. Without an internet connection it may or may not unless you create a static IP address. The first method of file transfer would be the easiest.
Back to Windows Forum
3 total posts (Page 1 of 1)
Related Forums
|
{
"url": "https://www.techrepublic.com/forums/discussions/install-sp1-without-internet/",
"source_domain": "www.techrepublic.com",
"snapshot_id": "crawl=CC-MAIN-2018-39",
"warc_metadata": {
"Content-Length": "280457",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:6SVWXM7FUHI7477YJ6FZE3S2BKB3GGKY",
"WARC-Concurrent-To": "<urn:uuid:82e77d54-1e22-43e8-b964-ed30ae16ac15>",
"WARC-Date": "2018-09-25T20:02:27Z",
"WARC-IP-Address": "23.217.199.70",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:NJXOS3NGCBHD3ALGV6GMPQTSKEK6GOQV",
"WARC-Record-ID": "<urn:uuid:a9d3622d-cf7c-47e1-86cc-60fd6854abd9>",
"WARC-Target-URI": "https://www.techrepublic.com/forums/discussions/install-sp1-without-internet/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ed713ddf-b168-41b4-a288-6d05e8f2cb6f>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-51-154-251.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,
19,
20,
27,
28,
57,
58,
75,
388,
389,
444,
445,
475,
515,
516,
529,
530,
541,
542,
595,
596,
733,
734,
912,
913,
957,
958,
1008,
1009,
1111,
1112,
1258,
1259,
1316,
1317,
1369,
1491,
1560,
1561,
1566,
1567,
1578,
1579,
1602,
1603,
1609,
1610,
1697,
1698,
1703,
1704,
1715,
1716,
1774,
1775,
1853,
1854,
2409,
2679,
2680,
2702,
2732,
2733
],
"line_end_idx": [
19,
20,
27,
28,
57,
58,
75,
388,
389,
444,
445,
475,
515,
516,
529,
530,
541,
542,
595,
596,
733,
734,
912,
913,
957,
958,
1008,
1009,
1111,
1112,
1258,
1259,
1316,
1317,
1369,
1491,
1560,
1561,
1566,
1567,
1578,
1579,
1602,
1603,
1609,
1610,
1697,
1698,
1703,
1704,
1715,
1716,
1774,
1775,
1853,
1854,
2409,
2679,
2680,
2702,
2732,
2733,
2747
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2747,
"ccnet_original_nlines": 62,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3889845013618469,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05335627868771553,
"rps_doc_frac_lines_end_with_ellipsis": 0.0317460298538208,
"rps_doc_frac_no_alph_words": 0.1652323603630066,
"rps_doc_frac_unique_words": 0.44915252923965454,
"rps_doc_mean_word_length": 4.536016941070557,
"rps_doc_num_sentences": 34,
"rps_doc_symbol_to_word_ratio": 0.003442340064793825,
"rps_doc_unigram_entropy": 4.939569473266602,
"rps_doc_word_count": 472,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.0826716497540474,
"rps_doc_frac_chars_dupe_6grams": 0.06679122149944305,
"rps_doc_frac_chars_dupe_7grams": 0.0467071495950222,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01868285983800888,
"rps_doc_frac_chars_top_3gram": 0.02382064051926136,
"rps_doc_frac_chars_top_4gram": 0.014012140221893787,
"rps_doc_books_importance": -275.31988525390625,
"rps_doc_books_importance_length_correction": -275.31988525390625,
"rps_doc_openwebtext_importance": -179.59425354003906,
"rps_doc_openwebtext_importance_length_correction": -179.59425354003906,
"rps_doc_wikipedia_importance": -149.43458557128906,
"rps_doc_wikipedia_importance_length_correction": -149.43458557128906
},
"fasttext": {
"dclm": 0.018741730600595474,
"english": 0.8948643207550049,
"fineweb_edu_approx": 1.5128843784332275,
"eai_general_math": 0.0657271072268486,
"eai_open_web_math": 0.12720626592636108,
"eai_web_code": 0.002849339973181486
}
}
|
{
"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": "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": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,320,001,500,975,391,000
|
Hi!
I have a problem with and text positions when using small and large fonts in CAknSettingsItemList when the application is in Landscape mode. The x coordinates seem to be correct, but the y coordinates seem to be lower then the box that should contain the text.
I've tried to call HandleResourceChange(KUidValueCoeFontChangeEvent) and I've also tried to RequestRelayout(NULL), but the text is still position incorrectly in this scenario.
Does anybody have some pointer about how to handle various font sizes in landscape mode.
I've been testing this on my N95.
Thanks in advance!
Best Regards!
//MAPo
|
{
"url": "http://developer.nokia.com/community/discussion/showthread.php/136635-Problems-with-small-and-large-font-size-in-CAknSettingsItemList-when-in-Landscapemode",
"source_domain": "developer.nokia.com",
"snapshot_id": "crawl=CC-MAIN-2014-10",
"warc_metadata": {
"Content-Length": "52686",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ICNTW2OWUQ7XNPGCQVUAUUKNQSW4G3LZ",
"WARC-Concurrent-To": "<urn:uuid:88182a79-5b1b-41b8-9206-341f1ad0e2ce>",
"WARC-Date": "2014-03-13T10:03:51Z",
"WARC-IP-Address": "96.16.75.80",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:JHRREKFAVRALCWI56DTT4CVIYO7G2BHX",
"WARC-Record-ID": "<urn:uuid:d50630fb-9594-4b83-8e48-3f2a614751d0>",
"WARC-Target-URI": "http://developer.nokia.com/community/discussion/showthread.php/136635-Problems-with-small-and-large-font-size-in-CAknSettingsItemList-when-in-Landscapemode",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ff13767e-6f43-4777-83fd-0c3c0827144d>"
},
"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,
4,
5,
266,
267,
443,
444,
533,
534,
568,
569,
588,
589,
603,
604
],
"line_end_idx": [
4,
5,
266,
267,
443,
444,
533,
534,
568,
569,
588,
589,
603,
604,
610
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 610,
"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.44915252923965454,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.050847459584474564,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.14406779408454895,
"rps_doc_frac_unique_words": 0.6875,
"rps_doc_mean_word_length": 5.09375,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.022872447967529,
"rps_doc_word_count": 96,
"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.044989779591560364,
"rps_doc_frac_chars_top_3gram": 0.061349689960479736,
"rps_doc_frac_chars_top_4gram": 0.0777096077799797,
"rps_doc_books_importance": -51.180782318115234,
"rps_doc_books_importance_length_correction": -64.42456817626953,
"rps_doc_openwebtext_importance": -36.454280853271484,
"rps_doc_openwebtext_importance_length_correction": -49.69806671142578,
"rps_doc_wikipedia_importance": -18.42484474182129,
"rps_doc_wikipedia_importance_length_correction": -31.668630599975586
},
"fasttext": {
"dclm": 0.0764998197555542,
"english": 0.9167314767837524,
"fineweb_edu_approx": 0.9457404017448425,
"eai_general_math": 0.9992275238037109,
"eai_open_web_math": 0.7569917440414429,
"eai_web_code": 0.9990726113319397
}
}
|
{
"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": "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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "2",
"label": "Partially Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,601,510,470,011,013,000
|
TU ANUNCIO / YOUR PUBLICITY
AQUÍ PODRÍA ESTAR TU ANUNCIO: / HERE COULD BE YOUR AD E-mail
domingo, 30 de marzo de 2014
Create a animated GIF and from this a movie to YOUTUBE / Crear un GIF animado y de éste una película para YOUTUBE
Varias veces en nuestro blog hemos realizado este truco:
Vamos a elegir un grupo de fotos en secuencia, con ello vamos a crear un gif animado y con el gif animado vamos a crear una película (un archivo avi)
Several times in our blog have done the trick:
We will choose a group of photos in sequence, thereby we will create an animated gif with animated gif we will create a movie (avi file)
El primer paso es tener las fotos:
The first step is to have the photos:
Hay varias opciones. La mas directa es con ImageImagick
The most direct way is with ImageImagick
convert -delay 1000 *.png animación.gif.
ó
convert -delay 1000 +repage *.png animación.gif.
La opción +repage puede ser necesaria si nos queda un gif que se salga de los límites que hemos pretendido.
Esta solución es directa y sencilla pero tiene un problema con el orden. A veces la secuencia no es la que quisiéramos.
Hay otra opción: usar GIMP. Tras la apertura por capas (archivo -> Abrir como capas):
The + repage option may be needed if we have a gif that is outside the limits we have tried.
This solution is simple and direct but has a problem with the order. Sometimes the sequence is not what we wanted.
There is another option: using GIMP. Following the opening of layers (File -> Open as layers):
Archivo -> Guardar como ... animación.gif. Nos aparecerán los siguientes diálogos:
File -> Save As ... animación.gif. We the following dialogs appear:
Y ya tenemos el gif animado como Animado.gif
And we already have the animated gif as Animado.gif
Y ahora la segunda parte. Pasar de gif a avi:
And now the second part. Convert gif to avi:
ffmpeg -i Animado.gif Animado.avi
Si esto falla hay otra solución más potente:
If this fails there is a more powerful solution:
mencoder Animado.gif -o Animado.avi.AVI -ovc lavc -lavcopts vcodec=mpeg4
El archivo Animado.avi se sube a YouTube y listo:
The Animado.avi file is uploaded to YouTube and you're done:
domingo, 23 de marzo de 2014
MEGA-MAIL, Sending large files by e-mail / MEGACORREO, Envío de ficheros grandes por correo
¿Quién no ha tenido que enviar un correo con un archivo adjunto voluminoso? Estamos hablando de decenas de MBs. Existe un sistema sencillo y gratuito online propiedad de la empresa ENMACOSA. También denominado "Pásame tu archivo".
El sistema es muy sencillo. Se entra a través de la página:
proyecto.enmacosa.com
Portal de I+D de Enmacosa
Se hace click en "Pásame tu archivo" (Menú superior izquierda). O si se prefiere se va directamente a la página:
proyecto.enmacosa.com/megacorreo
Portal del Megacorreo de Enmacosa
Para subir se siguen las instrucciones:
1º.- Se elige un archivo: C:/ruta/del/archivo/archivo.pdf
2º.- Se da un seudónimo: algo.pdf.
3º.- Se pincha en "Dar a este botoncito"
Dependiendo de tu conexión a internet irá más deprisa o despacio (suele ser de unos 5MB/minuto).
To upload the instructions are followed:
1º.- a file is chosen: C: /ruta/del/archivo/archivo.pdf
2º.- is given a pseudonym: Algo.pdf
3º.- is click on "Dar este botoncito"
Depending on your internet connection will go quickly or slowly (usually about 5MB / minute).
Para bajar hay varias opciones a elegir la más cómoda:
To download there are several options to choose the most comfortable:
1º.- Si se pincha en abrir el correo, se abrirá nuestro programa de envío de e-mails así:
1º.- If you click to open the mail, our program for sending e-mails and will open:
De esta manera se manda un correo con el enlace de descarga.
In this way an email is sent with the download link.
2º.- Otra opción el copiar el texto que hay bajo la frase "O darle este link" y
enviárselo por el método que mejor nos parezca.
2. Another option is copy the text under the phrase "O darle este link" and
send it by the method we see fit.
3º.- Y por último la opción más simple es que el destinatario abra por su cuenta el
megacorreo. En el cuadro de bajada pone el nombre del seudónimo. En nuestro
ejemplo: algo.pdf e inmediatamente se pondrá a descargar.
3. And finally, the simplest option is that the recipient opens his account
megacorreo. Table puts down the name of the alias. in our
example algo.pdf will immediately downloaded.
Debido a la quiebra de la empresa enmacosa, este servicio no está disponible en la actualidad.
Due to the bankruptcy of the company Enmacosa, this service is not available at present.
domingo, 16 de marzo de 2014
Cómo usar ZEND para modificar PDFs con PHP
1º Instalamos ZEND o lo colocamos en un directorio determindo:
En el ejemplo se situa en el subdiretorio zend dentro del directorio de trabajo de php:
require_once 'Zend/Pdf.php';
$pdf = Zend_Pdf::load($Archivo_a_modificar);
$page = $pdf->pages[0];
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);
$page->setFont($font,14);
$page->drawText($y_expediente, 450, 733);
$page2 = $pdf->pages[2];
$image = Zend_Pdf_Image::imageWithPath("/xxxx.png");
$font2 = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
$page2->setFont($font2,14);
$page2->drawText($variableString, 262, 734);
$page2->drawImage($image, $xx,$yy,$ancho,$alto);
… etc …
// $pdf->save("/destino.pdf");
$pdfData = $pdf->render();
header("Content-Disposition: inline; filename=result.pdf");
header("Content-type: application/x-pdf");
echo $pdfData;
LOS PROBLEMAS DE ZEND AL ABRIR ALGUNOS ARCHIVOS PDF
A veces, el framework de Zend tiene algún problema al abrir un archivo pdf. En nuestro programa de php:
<?php
...
$pdf1 = new Zend_Pdf();
$pdf2 = Zend_Pdf::load($archivo_pdf);
...
?>
No voy a preguntarme el motivo por lo que esto ocurre pero el caso es que es así. Por otra parte, si volvemos a imprimir el pdf en cualquier editor de pdf de nuevo en pdf (perdón por las redundancias) sí admite sin problemas el nuevo archivo. La idea que se ocurre es reimprimir el fichero pdf que da problemas en pdf y así eliminar el problema con el pdf original.
¿Cómo lo hacemos?
Como todo va a ser en línea de comandos lo mejor es disponer de una impresora y una impresión accesible en línea de comandos.
1º Impresora: ¿tenemos alguna impresora que emita pdfs?
ejecutamos:
lpstat -p -d
y el resultado es algo así:
la impresora XXXXX está inactiva. activada desde jue 20 oct 2011 12:01:46 CEST
destino predeterminado del sistema: XXXXX
En ese caso no tenemos algo reconocible en pdf.
2º Instalamos la impresora en pdf
sudo apt-get -y install cups-pdf
Después:
lpstat -p -d
la impresora XXXXX está inactiva. activada desde lun 04 mar 2013 12:46:05 CET
la impresora Generic-CUPS-PDF-Printer está inactiva. activada desde lun 04 mar 2013 12:42:31 CET
destino predeterminado del sistema: Generic-CUPS-PDF-Printer
3º Tenemos que controlar donde imprimirá el nuevo pdf:
sudo gedit /etc/cups/cups-pdf.conf
el alguna línea estará:
Out ${HOME}/PDF
se cambia por
#Out ${HOME}/PDF
Out $/directorio/salida/PDF
La razón es porque muchas veces no se tiene controlado cual el el directorio {home} para www-data (usuario de apache).
4º Modificamos nuestro programa
<?php
...
$pdf1 = new Zend_Pdf();
exec("lp -d Generic-CUPS-PDF-Printer $archivo_pdf");
$nuevo_pdf="/directorio/salida/PDF".basename($archivo_pdf);
sleep(10);
$pdf2 = Zend_Pdf::load($nuevo_pdf);
...
unlink($nuevo);
?>
Expliquemos la modificación del programa:
Tomamos el archivo que da problemas ($archivo_pdf). Lo imprimimos (comando lp) en la impresora CUPS-PDF. Le hacemos esperar 10 segundos (sleep) al programa para darle tiempo a crearlo y guardarlo en /directorio/salida/PDF/ con el mismo nombre (sin las coletillas de directorios). Abre el nuevo archivo ($nuevo_pdf) que no dará problemas y al final borramos el archivo que nos sirvió de puente(unlink).
para más seguridad se puede poner (en vez de sleep(10)):
do{sleep(1);}while (not is_file($nuevo));
domingo, 9 de marzo de 2014
How to prevent hackers who want to enter the VNC server from port 5900. / Parar los pies a los hackers que quieren entrar en el servidor desde VNC, puerto 5900.
Para acceder al servidor, a veces, utilizo VNC. El problema es que que noto que el archivo .xsession se crea y crece más y más hasta que llena el disco duro y el servidor deja de funcionar.
Una de las últimas entradas son del tipo:
To access the server, sometimes I use VNC. Have long noticed that the .xsession file is created and grows more and more until it fills the hard disk and the server goes down.
One of the latest entries are of the type:
vnc tat y tal desde tal Ip ,,,
Me fastidia porque me gusta entrar en el servidor por VNC y además soy un poco inutil en el tema de la informática.
Le dí al siguiente comando para saber cuales eran los puertos que tenía abiertos
What were the ports that were open?
socklist
y la respuesta fue:
This was the answer:
type port inode uid pid fd name
tcp 5900 12031 1000 1684 18 vino-server
tcp 80 10998 0 3867 3 apache2
...
No voy a decir aquí el resto de puertos que tengo. El caso es que algo tenía que hacer. Como ya he dicho soy un poco ignorante en estos temas. Por ello creé mi propio cortafuegos. Es muy sencillito y permite cerrar y/o abrir puertos a discreción.
Lo peor que puede ocurrir es que cierre algún puerto por demás pero son igualmente fáciles de reabrir
I will not say here other ports that I have. The fact is that something had to be done. As I said I'm a bit ignorant on these issues. So I created my own firewall. It's simple and allows close and / or open ports at will.
The worst that can happen is that you close any other port but equally easy to reopen
Secuencia de comandos:
Script:
ufw enable // El cortafuegos empieza a funcionar
ufw deny 5900 // Se cierra el puerto 5900
ufw allow 5900 // Se abre el puerto 5900
ufw status //Vemos lo que hemos cerrado y abierto y responde
Estado: activo
Hasta Acción Desde
----- ------------------------
5900 DENY Anywhere
1110 ALLOW Anywhere
80 ALLOW Anywhere
1111 DENY Anywhere
Ahora sé que nadie puede entrar por el puerto 5900 ni el 1111. Si pueden por el 1110 y el 80.
Sólo tengo que entrar por ssh (aconsejable que sea un puerto diferente al 20) y desde alli tecleo ufw allow 5900. Cuando acabemos, colocamos de nuevo el cortafuegos, ufw deny 5900 y listos.
Now I know that no one can enter the port 5900 or 1111. If they can by 1110 and 80.
Only I have to enter through ssh (advisable to be a different port 20) and from there click ufw allow 5900. When we're done, put back the firewall: ufw deny 5900.
Otra solución (aunque creo que es algo peor) la expongo a continuación:
.xsession: Un archivo que no para de crecer hasta llenar completamente el disco duro en Linux.
He buscado soluciones de lo más variopintas.
Una de ellas fue intentar particionar el disco duro de tal manera que el directorio /home/usuario fuera el de la partición. El problema estaba en que una vez instalado todo ya no podía dar marcha atras como en el caso de Windows con Parted Magic. (Ídem con Gparted para Linux. ). Había que tener y hacer una copia se seguridad previa. Aún así cuando se colmataba el directorio del usuario volvía a complicarse el tema y a bloquearse el ordenador.
La segunda solución que encontré era la de limitar el tamaño del directorio. Para ello se suele usar la aplicación quota. el problema es que por más que leía foros no me enteraba nada y una vez que creí entenderlo bloqueé el ordenador al reconfigurar /etc/ftab. ¡Los experimentos con gaseosa!
Y la tercera, y definitiva, fue la de limitar el tamaño máximo de archivo. Ocurre que no quiero de ninguna manera que ningún archivo sea mayor de varios Gigas. Y, si es ninguno, tampoco es .xsession. La forma es muy sencilla. Teclea:
sudo gedit /etc/security/limits.conf
Te saldrá un archivo de la forma:
# /etc/security/limits.conf
#
[...]
#@student - maxlogins 4
# End of file
Antes de # End of file colocamos una linea más:
# /etc/security/limits.conf
#
[...]
#@student - maxlogins 4
* hard fsize 4096000
# End of file
¿Qué hemos hecho?
Le hemos dicho al sistema que no pueda albergar ningún archivo mayor de 4GB.
Reiniciamos el equipo y fin.
Si quieres saber más yo me enteré desde esta página web:
http://magarto.com/blog/archivo/2007/12/11/cambiar-tamano-maximo-de-archivos-en-gnulinux/
lunes, 3 de marzo de 2014
Control de las termografías
Problemática inicial:
Cuando empezamos a hacer termografías, tuvimos los siguientes problemas:
• Algunas cámaras venían con programas que no permitían exportar termografías modificadas con falso color.
Ejemplo de programa de tratamiento termográfico sin opciones de exportación
• La termografías realizadas tenían un pobre contraste inicial
• Si realizaban el paso a falso color no se podían controlar los límites de temperatura.
• Por supuesto, no podría existir correlación entre los datos Lidar del láser escáner terrestre con las termografías.
Mejora del contraste:
Tras mucho buscar encontramos la forma más sencilla que consiste, o bien en utilizar la biblioteca CV de código abierto o las utilidades Image Imagick.
La orden es muy simple: convertir original -normalize destino. El resultado es el siguiente:
Aplicando patrones termográficos:
Ya al menos se puede ver. Ahora toco el hacerla interactuar con un patrón. Por ejemplo: azul, verde, rojo.
Ejemplo con azul-verde-rojo: dará tres grupos de temperaturas.
Ejemplo con violeta-azul-cyan-verde-amarillo-naranja-rojo: 7 grupos de temperaturas
Dado que estamos en Galicia podemos ajustar el rango de lectura de 0 a 35ºC. de esta manera que ayudaría a ver tres temperaturas diferentes
• .... 5ºC: violeta
• 5-10ºC: azul
• 15-20ºC: cyan
• 20-25ºC: verde
• 25-30ºC: amarillo
• 30-35ºC: naranja
• 35 ... ªC: rojo
De este modo, la imagen tratada no sólo será más vistosa:
Sino que además sabemos la temperatura de cada elemento por el color.
Esto además nos deja abiertos a cualquier otro tipo de patrón. Imaginemos un patrón un poco más amplio: negro, marrón, rojo, naranja, amarillo, verde, azul claro, azul oscuro, violeta, gris, blanco:
Ecd Vl resultado sería:
Pudiendo llegar a crear efectos que rayan la psicodelia:
Resumiendo, podemos tener una amplia tipología de espectros relacionados directamente con la temperatura real obtenida de una termografía:
Correlacionado datos lidar y termografías:
Partimos de datos lidar y sus proyecciones (se pueden obtener desde la aplicación web: http://sitegi.enmacosa.com)
Tenemos una nube de puntos proyectada ortogonalmente:
Y/o la imagen en color (aunque éste se note poco)
También tenemos las imágenes termográficas:
Si cruzamos los datos de falso color y posición real de los puntos Lidar:
Aquí mostramos tres opciones posibles:
Nos decantamos por la tercera opción y ésta fue la aplicabilidad que le unimos a nuestra aplicación web:
A continuación comentaremos como realizar estas nubes de puntos termográficas desde la aplicación de escritorio desarrollada por Extraco, Misturas, Logica y Enmacosa.
Utilizando nuestro programa MEEL
Las particularidades que debe tener son:
• Creación de cualquier espectro:
Si deseáramos cambiar por ejemplo a <rosa, violeta, rojo, naranja, amarillo verde cian, azul gris negro> (pink blueviolet red orange yellow green1 cyan blue gray black) el espectro sería:
• Lectura de un grupo de archivos: Fácil, con un obketo "file".
• Geolocalización de termografías:
Para la correlación de datos tenemos los siguientes puntos de partida:
1. Podemos tener un GPS y con sus datos guardar la posición y el tiempo en que se realiza la lectura.
2. Al guardar las fotografías ya tenemos el tiempos de su creación
3. Como ya utilizamos con el programa los datos del eje
Conclusión de cada punto del eje (pk) podemos tener las coordenadas de las coordenadas el momento más cercano de los datos tomados del GPS y del momento del GPS buscaremos la foto más cercana creada en el tiempo. Una "simple" triple relación.
Y por último:
• Previsualización de la foto normalizada y la relativa al espectro.
Veamos más de cerca estos ejemplos:
Claro está, podemos así variar más fácilmente el espectro:
Con el espectro convencional:
Como conclusión final, podremos tomar cualquier termografía, georreferencia o mezclar sus datos con una nube de puntos con la simple ayuda de un GPS.
domingo, 2 de marzo de 2014
Remote copy with LFTP / Copia remota con LFTP
Con FTP siempre ha habido un problema clásico de paciencia. Cuando se quiere subir algo (muchos archivo y carpetas) se hace la misma operación. Se abre un explorador de archivo. Se ven las carpetas y desde nuestro ordenador copiar y pegar. Las esperas pueden ser interminables. Aparecen las preguntas ¿quiere subtituir el anterior archivo? Y como no sabemos si ya estaba actualizado el anterior pues le decimos que sí a todo y durante dos horas se tira subiendo archivos como un campeón. A la mitad del negocio (tras una hora) se rompe la conexión y vuelta a empezar. Lo ideal sería tener una aplicación que le dijera desde donde, hasta donde y que no repitiera lo que ya estuviera y fuera igual. Es decir un back up vía ftp.
FTP has always been a classic problem of patience. When you want to upload something (many file and folders) and this operation is always the same. we opens the explorer files. They select files and copy-paste them. The waits can be interminable. Questions appear wants subtituir previous file? And since we do not know if it was already updated the previous because we say yes to everything and for two hours pulling up files like a champ. A half of the business (after one hour) connection and back again breaks. Ideally you want an application to tell you from where to where and not to repeat what was already well and out. Is a back up via ftp.
Esa aplicación existe. LFTP es un extraordinario comando que te permite hacer copias de seguridad en un directorio accesible por ftp. Sólo hay que tener cuidado con no confundir subir con bajar porque podríamos fastidiarla. Podríamos machacar lo nuevo por lo antiguo en vez de actualizar.
This application exists. LFTP is a special command that allows you to make backups in a directory accessible by ftp. Just be careful not to confuse up with down because we could mess. We could crush the new for the old instead of updating.
Ejemplos de lftp:
lftp examples:
DESTINO: ORDENADOR PROPIO
POSTING: OUR COMPUTER
lftp -f ftp_baja.lftp
→ buscará los ficheros modificados desde el ftp y los colocará en /home/usuario
DESTINO: FTP
POSTING: THE SERVER
lftp -f ftp_sube.lftp
→ buscará los ficheros modificados desde /home/usuario y los subirá al ftp
ftp_baja.lftp
open -u usuario,contraseña server.com
mirror --log=QueSeBajo.log /personal /home/usuario
exit
ftp_bajote.lftp
open -u usuario,contraseña server.com
mirror --log=QueBajote.log /www /directorio/de/backup
exit
#no toca el servidor sólo este ordenador
ftp_sube.lftp
open -u usuario,contraseña server.com
mirror -p -R --log=QueSeSubio.log /home/usuario /personal
exit
ftp_sube.lftp (EN WINDOWS)
open -u usuario,contraseña proyecto.enmacosa.com
mirror -p -R --log=Sube_a_illa.log /directorio/de/backup
exit
NOTA: /dir/directory es si se trata de c:\dir\directory
Si el programa está en el disco C. No hay opción de cambio de disco duro lee desde donde esté el programa instalado
|
{
"url": "https://carreteras-laser-escaner.blogspot.com/2014/03/",
"source_domain": "carreteras-laser-escaner.blogspot.com",
"snapshot_id": "crawl=CC-MAIN-2022-49",
"warc_metadata": {
"Content-Length": "169811",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TQYUM7FLSOANJWGCUNMWVT3ON2JCFNPC",
"WARC-Concurrent-To": "<urn:uuid:6176579f-4d93-497b-9506-a20b1623cedf>",
"WARC-Date": "2022-12-06T05:01:32Z",
"WARC-IP-Address": "172.217.164.161",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2UV674YJIVVEAYIJBQPEX5LCSGYFO3RH",
"WARC-Record-ID": "<urn:uuid:b7bf8e91-2edd-49b3-92f3-72e1c139a7b0>",
"WARC-Target-URI": "https://carreteras-laser-escaner.blogspot.com/2014/03/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b1722fb7-de8e-4383-bb88-6452ac3e4108>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-11\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,
28,
29,
90,
91,
120,
121,
235,
236,
293,
443,
444,
491,
628,
629,
664,
702,
703,
759,
800,
801,
846,
848,
849,
850,
903,
904,
905,
906,
1014,
1135,
1221,
1222,
1315,
1430,
1525,
1526,
1527,
1610,
1678,
1679,
1680,
1681,
1682,
1727,
1779,
1780,
1781,
1782,
1828,
1873,
1874,
1918,
1919,
1964,
2013,
2014,
2093,
2094,
2144,
2205,
2206,
2207,
2208,
2237,
2238,
2330,
2331,
2562,
2563,
2623,
2624,
2667,
2693,
2694,
2807,
2860,
2894,
2895,
2935,
3015,
3072,
3135,
3232,
3233,
3275,
3355,
3415,
3477,
3571,
3572,
3627,
3697,
3698,
3810,
3915,
3916,
4001,
4078,
4079,
4184,
4263,
4264,
4365,
4431,
4432,
4541,
4643,
4726,
4727,
4829,
4914,
4986,
4987,
5082,
5171,
5172,
5173,
5202,
5203,
5246,
5247,
5310,
5311,
5399,
5400,
5429,
5474,
5475,
5499,
5572,
5598,
5640,
5641,
5666,
5719,
5788,
5816,
5861,
5910,
5918,
5949,
5976,
5977,
6037,
6080,
6096,
6097,
6098,
6150,
6151,
6255,
6256,
6262,
6266,
6290,
6291,
6329,
6330,
6334,
6337,
6338,
6704,
6705,
6723,
6724,
6850,
6851,
6908,
6920,
6921,
6936,
6937,
6965,
7045,
7087,
7088,
7136,
7137,
7171,
7204,
7213,
7227,
7306,
7404,
7465,
7466,
7521,
7522,
7557,
7558,
7582,
7583,
7599,
7600,
7614,
7615,
7632,
7660,
7661,
7780,
7781,
7813,
7814,
7815,
7821,
7825,
7849,
7850,
7903,
7963,
7974,
8010,
8011,
8015,
8031,
8034,
8035,
8077,
8078,
8480,
8481,
8538,
8539,
8581,
8582,
8610,
8611,
8772,
8773,
8964,
9006,
9007,
9182,
9225,
9226,
9227,
9258,
9259,
9375,
9376,
9457,
9493,
9494,
9503,
9504,
9524,
9545,
9546,
9594,
9595,
9650,
9701,
9705,
9706,
9707,
9954,
9955,
10057,
10058,
10280,
10366,
10367,
10390,
10398,
10399,
10454,
10499,
10542,
10609,
10610,
10611,
10626,
10627,
10628,
10629,
10674,
10675,
10727,
10775,
10823,
10871,
10919,
10920,
11014,
11015,
11205,
11206,
11290,
11291,
11454,
11455,
11456,
11457,
11529,
11530,
11531,
11626,
11627,
11672,
11673,
12120,
12121,
12414,
12415,
12649,
12650,
12687,
12688,
12722,
12723,
12751,
12753,
12759,
12802,
12816,
12817,
12865,
12866,
12894,
12896,
12902,
12945,
12994,
13008,
13009,
13027,
13028,
13105,
13106,
13136,
13137,
13194,
13195,
13285,
13286,
13312,
13313,
13341,
13342,
13364,
13365,
13438,
13547,
13623,
13624,
13689,
13690,
13781,
13901,
13923,
14075,
14076,
14169,
14170,
14171,
14205,
14312,
14313,
14376,
14460,
14600,
14622,
14639,
14657,
14676,
14698,
14719,
14739,
14797,
14798,
14799,
14869,
14870,
15069,
15070,
15071,
15095,
15096,
15153,
15154,
15293,
15294,
15295,
15338,
15339,
15454,
15455,
15509,
15510,
15560,
15561,
15562,
15563,
15607,
15608,
15609,
15683,
15722,
15723,
15724,
15725,
15726,
15727,
15832,
15833,
15834,
15835,
15836,
16003,
16004,
16037,
16038,
16079,
16080,
16116,
16304,
16305,
16306,
16372,
16409,
16480,
16584,
16653,
16711,
16954,
16968,
17039,
17040,
17076,
17077,
17078,
17137,
17138,
17139,
17169,
17170,
17171,
17172,
17322,
17323,
17351,
17352,
17398,
17399,
18125,
18126,
18776,
18777,
19066,
19067,
19307,
19308,
19309,
19327,
19342,
19343,
19369,
19391,
19392,
19414,
19494,
19495,
19508,
19528,
19529,
19551,
19626,
19627,
19641,
19679,
19730,
19735,
19736,
19752,
19790,
19844,
19849,
19890,
19904,
19942,
20000,
20005,
20006,
20033,
20034,
20083,
20140,
20145,
20146,
20202
],
"line_end_idx": [
28,
29,
90,
91,
120,
121,
235,
236,
293,
443,
444,
491,
628,
629,
664,
702,
703,
759,
800,
801,
846,
848,
849,
850,
903,
904,
905,
906,
1014,
1135,
1221,
1222,
1315,
1430,
1525,
1526,
1527,
1610,
1678,
1679,
1680,
1681,
1682,
1727,
1779,
1780,
1781,
1782,
1828,
1873,
1874,
1918,
1919,
1964,
2013,
2014,
2093,
2094,
2144,
2205,
2206,
2207,
2208,
2237,
2238,
2330,
2331,
2562,
2563,
2623,
2624,
2667,
2693,
2694,
2807,
2860,
2894,
2895,
2935,
3015,
3072,
3135,
3232,
3233,
3275,
3355,
3415,
3477,
3571,
3572,
3627,
3697,
3698,
3810,
3915,
3916,
4001,
4078,
4079,
4184,
4263,
4264,
4365,
4431,
4432,
4541,
4643,
4726,
4727,
4829,
4914,
4986,
4987,
5082,
5171,
5172,
5173,
5202,
5203,
5246,
5247,
5310,
5311,
5399,
5400,
5429,
5474,
5475,
5499,
5572,
5598,
5640,
5641,
5666,
5719,
5788,
5816,
5861,
5910,
5918,
5949,
5976,
5977,
6037,
6080,
6096,
6097,
6098,
6150,
6151,
6255,
6256,
6262,
6266,
6290,
6291,
6329,
6330,
6334,
6337,
6338,
6704,
6705,
6723,
6724,
6850,
6851,
6908,
6920,
6921,
6936,
6937,
6965,
7045,
7087,
7088,
7136,
7137,
7171,
7204,
7213,
7227,
7306,
7404,
7465,
7466,
7521,
7522,
7557,
7558,
7582,
7583,
7599,
7600,
7614,
7615,
7632,
7660,
7661,
7780,
7781,
7813,
7814,
7815,
7821,
7825,
7849,
7850,
7903,
7963,
7974,
8010,
8011,
8015,
8031,
8034,
8035,
8077,
8078,
8480,
8481,
8538,
8539,
8581,
8582,
8610,
8611,
8772,
8773,
8964,
9006,
9007,
9182,
9225,
9226,
9227,
9258,
9259,
9375,
9376,
9457,
9493,
9494,
9503,
9504,
9524,
9545,
9546,
9594,
9595,
9650,
9701,
9705,
9706,
9707,
9954,
9955,
10057,
10058,
10280,
10366,
10367,
10390,
10398,
10399,
10454,
10499,
10542,
10609,
10610,
10611,
10626,
10627,
10628,
10629,
10674,
10675,
10727,
10775,
10823,
10871,
10919,
10920,
11014,
11015,
11205,
11206,
11290,
11291,
11454,
11455,
11456,
11457,
11529,
11530,
11531,
11626,
11627,
11672,
11673,
12120,
12121,
12414,
12415,
12649,
12650,
12687,
12688,
12722,
12723,
12751,
12753,
12759,
12802,
12816,
12817,
12865,
12866,
12894,
12896,
12902,
12945,
12994,
13008,
13009,
13027,
13028,
13105,
13106,
13136,
13137,
13194,
13195,
13285,
13286,
13312,
13313,
13341,
13342,
13364,
13365,
13438,
13547,
13623,
13624,
13689,
13690,
13781,
13901,
13923,
14075,
14076,
14169,
14170,
14171,
14205,
14312,
14313,
14376,
14460,
14600,
14622,
14639,
14657,
14676,
14698,
14719,
14739,
14797,
14798,
14799,
14869,
14870,
15069,
15070,
15071,
15095,
15096,
15153,
15154,
15293,
15294,
15295,
15338,
15339,
15454,
15455,
15509,
15510,
15560,
15561,
15562,
15563,
15607,
15608,
15609,
15683,
15722,
15723,
15724,
15725,
15726,
15727,
15832,
15833,
15834,
15835,
15836,
16003,
16004,
16037,
16038,
16079,
16080,
16116,
16304,
16305,
16306,
16372,
16409,
16480,
16584,
16653,
16711,
16954,
16968,
17039,
17040,
17076,
17077,
17078,
17137,
17138,
17139,
17169,
17170,
17171,
17172,
17322,
17323,
17351,
17352,
17398,
17399,
18125,
18126,
18776,
18777,
19066,
19067,
19307,
19308,
19309,
19327,
19342,
19343,
19369,
19391,
19392,
19414,
19494,
19495,
19508,
19528,
19529,
19551,
19626,
19627,
19641,
19679,
19730,
19735,
19736,
19752,
19790,
19844,
19849,
19890,
19904,
19942,
20000,
20005,
20006,
20033,
20034,
20083,
20140,
20145,
20146,
20202,
20317
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 20317,
"ccnet_original_nlines": 490,
"rps_doc_curly_bracket": 0.00039376001222990453,
"rps_doc_ldnoobw_words": 2,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.14860226213932037,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03187837079167366,
"rps_doc_frac_lines_end_with_ellipsis": 0.012219959869980812,
"rps_doc_frac_no_alph_words": 0.22363904118537903,
"rps_doc_frac_unique_words": 0.3802725374698639,
"rps_doc_mean_word_length": 4.95781946182251,
"rps_doc_num_sentences": 230,
"rps_doc_symbol_to_word_ratio": 0.005885240156203508,
"rps_doc_unigram_entropy": 6.28692626953125,
"rps_doc_word_count": 3082,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.02591622993350029,
"rps_doc_frac_chars_dupe_6grams": 0.013481680303812027,
"rps_doc_frac_chars_dupe_7grams": 0.008769630454480648,
"rps_doc_frac_chars_dupe_8grams": 0.004973819945007563,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.0023560200352221727,
"rps_doc_frac_chars_top_3gram": 0.0035340299364179373,
"rps_doc_frac_chars_top_4gram": 0.005104709882289171,
"rps_doc_books_importance": -1853.04736328125,
"rps_doc_books_importance_length_correction": -1853.04736328125,
"rps_doc_openwebtext_importance": -944.1185913085938,
"rps_doc_openwebtext_importance_length_correction": -944.1185913085938,
"rps_doc_wikipedia_importance": -635.1556396484375,
"rps_doc_wikipedia_importance_length_correction": -635.1556396484375
},
"fasttext": {
"dclm": 0.16505056619644165,
"english": 0.009540880098938942,
"fineweb_edu_approx": 1.372249960899353,
"eai_general_math": 0.00004755999907501973,
"eai_open_web_math": 0.648120105266571,
"eai_web_code": 0.9977126717567444
}
}
|
{
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,869,146,344,256,124,000
|
3
\$\begingroup\$
so I'm making a 2d Java game with the slick2d and MarteEngine libraries. This is the biggest project since I made checkers for my Java class. I am still pretty new to programming concepts and using optimal ways to get stuff done.
The basic structure of my game is you are a player/hero in a zombie apocalypse and you can gather survivors to help you. There are a many areas that I'm concerned about in my programming. I'm not sure if my methods are a good choice for what I want. This game also does not currently have a grid/tile system.
I've looked at some open source java games and they don't really answer my questions to my methods. So I'm going to make a list here of what I'm uncertain about and I hope you guys can confirm/deny if my methods are appropriate. Sorry if this list gets too long, I'm thinking of the questions as I type.
1. Targeting/Attacking - Survivors will automatically attack zombies once they get within the gun's target range. To do this, I have every survivor get the distance (using distance formula) to every zombie and find the closest one to attack. I check for this constantly so if a faster zombie gets closer, the survivor will change targets. For zombies, they acquire a target and stick to it (for now). The zombies constantly check if they are within the attack range (around 50 pixels) using the distance formula. If they are within range, stop and attack, otherwise, move towards the target.
2. 2D Camera - So a camera in a 2D environment moves the world around instead of you. My current method is have my zombies/survivors/any entities on the map stored in array lists. First the background is adjusted, then all the lists are cycled through and every entity's x and y values are modified. This seems to work alright but some stuff you can really notice sliding around on the background. Not really sure how to avoid this.
3. User Interface - I really have no clue how to work with UI. What I've been doing so far is simply using a background and then generating button objects and manually lining them up. Then, I check if the mouse is over any of the button's areas and if there is a click while moused over the button. I have three different backgrounds and buttons that I switch out with booleans. I'm going to recode that area though, using objects with the background and buttons. Is this the correct way to do UI?
4. Path Finding - I have no path finding system yet. Do I have to stick to a grid system? I really rather my entities move freely along the terrain and not in a weird square to square motion.
5. Selecting - I have it so you can select survivors, upgrade them, and other random stuff. My current method for selecting is constantly check where the mouse X and Y is. I get the distance from the mouse to every survivor and check if it is within 30 pixels. Then, I check if there is a click, if so, select the survivor and unselect all others. I'm still trying to figure out how to unselect all survivors if I click on open space. Is there a better way to go about doing this?
6. Picking stuff up - Same way as said before. I check the distance from the player to every item that can be picked up. If the item is within 30 pixels of the player, it picks it up. It seems to work fine for the moment I suppose. Maybe there really is no other way to do this.
7. Animations - I understand the how to animate with sprites, but I just want to make sure. So if I have 7 different guns to be shot, do I need to manually make functions that have precise timing on each sprite. Say if I have a shotgun, it needs a recoil, pump forward, brief pause, pump back, and ready again. For a pistol I need just the recoil really. So I'd have to make unique functions for each of these animations?
Sorry to type this long list of questions. I try to gather information on this stuff as much as possible and I haven't been able to find many examples on this stuff. I greatly appreciated any answers, even just a yes or no answer. Thanks in advance!
\$\endgroup\$
2 Answers 2
7
\$\begingroup\$
• Targeting/Attacking - That's fine. There are optimizations here, but don't worry about those yet.
• 2D Camera - No, that's not the way you do a camera. I'm sure your engine must have a camera class built in. If not, Slick2D has the option to translate. So before drawing your scene, you translate the scene by the 2D camera offset. Then draw your entities at their absolute positions. Don't modify your entity positions!
• Interface - That works OK, but it's hard to maintain. You can checkout some GUI libraries that utilize Slick2D. Many of them use XML files to define the layout of your UI and are easily modifiable. But only switch methods if this is causing problems for you.
• Path Finding - You seem to be confusing path finding with motion. They're not the same thing. You find the path, which will likely be "square to square", then you have your entities follow the path. If you want free motion, you can implement steering and have them steer between the nodes of the path you found. Check out A*, as that's a popular path finding algorithm.
• Selecting - It would probably be best to have an event system for this (and your other GUI commands). But basically you can do what you're doing now, poll the mouse, find out what's under it. You can either do this constantly, or just when a mouse click happens. Either way, you only want to change the selection when the mouse is clicked. If there's nothing under the mouse, deselect all the survivors.
• Picking stuff up - There are other ways to do this, but this is good enough for a first pass.
• Animations - No, you make one function that has inputs for fire speed, reload rate, etc. That one function calculates the time required to fire a gun. Don't make multiple "unique" functions.
I can tell already that this answer will likely be followed up by even more questions. This question is already border line a discussion, so don't follow up with more questions. Keep doing research. It sounds like you're new enough that looking at open source projects will be far less useful to you than reading through questions and answers on a site like this. So do more research here. Use the "related" links on the right to browse through related questions and just soak in some information. You have a lot to learn, so take your time. When you have more questions, really think about the problem you're facing, try to solve it yourself first and if you don't solve it post one question at a time here. Good luck!
\$\endgroup\$
1
• \$\begingroup\$ Thanks for the answer. I guess I misunderstood when I first researched/asked about a 2D camera. I will fix what I have now to not modify the X and Y positions, only render positions. Thanks! \$\endgroup\$
– Paha
Jul 12, 2012 at 15:32
2
\$\begingroup\$
1. Targeting/Attacking - Is ok for prototype, but later there could be a room for optimization as when you will have lots of units, performance could drop if you check everyone vs everyone. It may or may be not a problem. You will need to check and see :)
2. *2D Camera * - Don't modify entity's position coords.. modify your camera position and while drawing the view, calculate entity space to screen space coords and don't draw if they are outside of your viewport.
3. Animations - make an object that keeps info about current animation frame, start and end frames, and which can draw frames from a to b (for example 30 to 40) with given speed in milliseconds.
\$\endgroup\$
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged .
|
{
"url": "https://gamedev.stackexchange.com/questions/32149/are-my-programming-methods-for-java-games-sufficient",
"source_domain": "gamedev.stackexchange.com",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "157255",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:HRBSEALMYASDHNQX52UW4JQHBUP3KKAA",
"WARC-Concurrent-To": "<urn:uuid:1017d6d2-cc6c-4c78-a28b-42d36f19318c>",
"WARC-Date": "2023-10-03T20:04:49Z",
"WARC-IP-Address": "104.18.11.86",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:BIE72A6PYT2NHUQDSN3DYRW5TKY54DWF",
"WARC-Record-ID": "<urn:uuid:cd5deb76-512b-40e8-952e-549a87088f82>",
"WARC-Target-URI": "https://gamedev.stackexchange.com/questions/32149/are-my-programming-methods-for-java-games-sufficient",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:df6d6855-410d-465a-ae78-373d579473e4>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-221\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,
2,
18,
19,
249,
250,
559,
560,
864,
865,
1459,
1460,
1895,
1896,
2396,
2397,
2591,
2592,
3075,
3076,
3357,
3358,
3782,
3783,
4033,
4034,
4048,
4049,
4061,
4062,
4064,
4080,
4182,
4183,
4508,
4509,
4772,
4773,
5147,
5148,
5556,
5557,
5655,
5656,
5851,
5852,
6572,
6573,
6587,
6589,
6814,
6825,
6851,
6853,
6869,
7127,
7342,
7539,
7553,
7554,
7595,
7596
],
"line_end_idx": [
2,
18,
19,
249,
250,
559,
560,
864,
865,
1459,
1460,
1895,
1896,
2396,
2397,
2591,
2592,
3075,
3076,
3357,
3358,
3782,
3783,
4033,
4034,
4048,
4049,
4061,
4062,
4064,
4080,
4182,
4183,
4508,
4509,
4772,
4773,
5147,
5148,
5556,
5557,
5655,
5656,
5851,
5852,
6572,
6573,
6587,
6589,
6814,
6825,
6851,
6853,
6869,
7127,
7342,
7539,
7553,
7554,
7595,
7596,
7662
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7662,
"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.4547079801559448,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03873658925294876,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17282478511333466,
"rps_doc_frac_unique_words": 0.33405953645706177,
"rps_doc_mean_word_length": 4.294117450714111,
"rps_doc_num_sentences": 107,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.470595836639404,
"rps_doc_word_count": 1377,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.005073570180684328,
"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.00676475977525115,
"rps_doc_frac_chars_top_3gram": 0.00405884999781847,
"rps_doc_frac_chars_top_4gram": 0.004735330119729042,
"rps_doc_books_importance": -842.039794921875,
"rps_doc_books_importance_length_correction": -842.039794921875,
"rps_doc_openwebtext_importance": -495.51751708984375,
"rps_doc_openwebtext_importance_length_correction": -495.51751708984375,
"rps_doc_wikipedia_importance": -260.8970947265625,
"rps_doc_wikipedia_importance_length_correction": -260.8970947265625
},
"fasttext": {
"dclm": 0.46910572052001953,
"english": 0.9493486285209656,
"fineweb_edu_approx": 1.3824739456176758,
"eai_general_math": 0.7118998765945435,
"eai_open_web_math": 0.26247286796569824,
"eai_web_code": 0.5457367300987244
}
}
|
{
"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": "5",
"label": "Social/Forum"
},
"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": "-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": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-314,082,618,649,938,000
|
Comments on: Why Did Microsoft Change To Outlook.com? http://www.worldstart.com/why-did-microsoft-change-to-outlook-com/ Everyone, no matter how good you are, needs computer help every now and then. That's where Worldstart comes in. Mon, 25 Jul 2016 01:57:18 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Mark http://www.worldstart.com/why-did-microsoft-change-to-outlook-com/comment-page-1/#comment-246726 Tue, 23 Jul 2013 15:23:01 +0000 http://www.worldstart.com/?p=47190#comment-246726 Cynthia is probably right at least in part about the reson they changed, but here is another reason. Not everyone is like L. Elaine, personally I like outlook.com better than the old hotmail.
As for the whole cloud thing, the same thing is true at Google, signing up for their e-mail signs you up for lots of other stuff to.
Terrence so have a lot of other companies.
Darn I am beginning to sound like an MS employee or at least apologist but seriously I am neither, I just hate to see any company get ripped for stuff they aren’t the only ones doing.
]]>
By: Terrence Delgado http://www.worldstart.com/why-did-microsoft-change-to-outlook-com/comment-page-1/#comment-246678 Tue, 23 Jul 2013 04:52:31 +0000 http://www.worldstart.com/?p=47190#comment-246678 With all the privacy issues today, I really don’t want all my information and files in one place where Microsoft can make it “One stop shopping” for all your info to the government or anyone else for that matter. It’s already been in the news that Microsoft has been turning over records.
]]>
|
{
"url": "http://www.worldstart.com/why-did-microsoft-change-to-outlook-com/feed/",
"source_domain": "www.worldstart.com",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "4386",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DSECGQOJH3LUYLEGMLN7NEKYPW5LME72",
"WARC-Concurrent-To": "<urn:uuid:120506e4-1527-47b8-ac5c-0ceb91b2a872>",
"WARC-Date": "2016-07-25T02:32:19Z",
"WARC-IP-Address": "207.126.59.171",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:NBQVEGVX564F7NX3UTEQ4H3GLFI5VQWT",
"WARC-Record-ID": "<urn:uuid:06af983c-f80d-4e1a-93cb-2f6554916565>",
"WARC-Target-URI": "http://www.worldstart.com/why-did-microsoft-change-to-outlook-com/feed/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4e2e4e23-b31f-4da0-bfc5-dbb4ed117d46>"
},
"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,
684,
685,
818,
819,
862,
863,
1047,
1048,
1052,
1541,
1542
],
"line_end_idx": [
684,
685,
818,
819,
862,
863,
1047,
1048,
1052,
1541,
1542,
1545
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1545,
"ccnet_original_nlines": 11,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3435114622116089,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017811700701713562,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3460559844970703,
"rps_doc_frac_unique_words": 0.7149532437324524,
"rps_doc_mean_word_length": 5.621495246887207,
"rps_doc_num_sentences": 29,
"rps_doc_symbol_to_word_ratio": 0.010178119875490665,
"rps_doc_unigram_entropy": 4.869571208953857,
"rps_doc_word_count": 214,
"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.008312550373375416,
"rps_doc_frac_chars_top_3gram": 0.013300079852342606,
"rps_doc_frac_chars_top_4gram": 0.01995011977851391,
"rps_doc_books_importance": -167.9984130859375,
"rps_doc_books_importance_length_correction": -156.15089416503906,
"rps_doc_openwebtext_importance": -91.87028503417969,
"rps_doc_openwebtext_importance_length_correction": -91.87028503417969,
"rps_doc_wikipedia_importance": -76.40734100341797,
"rps_doc_wikipedia_importance_length_correction": -62.93424606323242
},
"fasttext": {
"dclm": 0.06454961746931076,
"english": 0.8553611636161804,
"fineweb_edu_approx": 1.0509012937545776,
"eai_general_math": 0.001178500009700656,
"eai_open_web_math": 0.039821088314056396,
"eai_web_code": 0.000015499999790336005
}
}
|
{
"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": "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": "16",
"label": "Personal Blog"
}
},
"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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,615,742,170,179,287,000
|
WordPress at a glance
get_translations_for_domain() WP 1.0
Return the Translations instance for a text domain.
If there isn't one, returns empty Translations instance.
Is the basis for: translate()
✈ 1 time = 0.000001s = speed of light | 50000 times = 0.43s = very fast | PHP 7.2.16, WP 5.1.1
No Hooks.
Return
Translations/NOOP_Translations. A Translations instance.
Usage
get_translations_for_domain( $domain );
$domain(string) (required)
Text domain. Unique identifier for retrieving translated strings.
Notes
• Global. MO[]. $l10n
• Static. NOOP_Translations. $noop_translations
Changelog
Since 2.8.0 Introduced.
Code of get translations for domain: wp-includes/l10n.php WP 5.4.2
<?php
function get_translations_for_domain( $domain ) {
global $l10n;
if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) {
return $l10n[ $domain ];
}
static $noop_translations = null;
if ( null === $noop_translations ) {
$noop_translations = new NOOP_Translations;
}
return $noop_translations;
}
Related Functions
From tag: textdomain (mo po files)
More from category: Localization
No comments
Log In . Register
|
{
"url": "https://wp-kama.com/function/get_translations_for_domain",
"source_domain": "wp-kama.com",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "102075",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VQ23LPYZAAWMPX3Y7YHSWHY6ER57YNPN",
"WARC-Concurrent-To": "<urn:uuid:732217b8-9975-45ad-adf6-86bf721fa994>",
"WARC-Date": "2020-08-10T09:15:34Z",
"WARC-IP-Address": "208.88.226.229",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:JEWOHF2OMKNBCCT6FGV4TTRPCN5ZLW5S",
"WARC-Record-ID": "<urn:uuid:b244abe1-983f-4ae3-8a43-ec6fdf7b3afb>",
"WARC-Target-URI": "https://wp-kama.com/function/get_translations_for_domain",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ea8f025c-e345-4989-9374-c227bca13888>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-111.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,
22,
23,
60,
61,
113,
114,
171,
172,
202,
297,
298,
308,
309,
316,
317,
374,
375,
381,
382,
422,
449,
515,
516,
522,
523,
547,
597,
598,
608,
609,
633,
634,
701,
702,
708,
758,
773,
886,
913,
916,
917,
952,
990,
1036,
1039,
1040,
1068,
1070,
1071,
1089,
1090,
1125,
1126,
1159,
1160,
1172
],
"line_end_idx": [
22,
23,
60,
61,
113,
114,
171,
172,
202,
297,
298,
308,
309,
316,
317,
374,
375,
381,
382,
422,
449,
515,
516,
522,
523,
547,
597,
598,
608,
609,
633,
634,
701,
702,
708,
758,
773,
886,
913,
916,
917,
952,
990,
1036,
1039,
1040,
1068,
1070,
1071,
1089,
1090,
1125,
1126,
1159,
1160,
1172,
1197
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1197,
"ccnet_original_nlines": 56,
"rps_doc_curly_bracket": 0.005012529902160168,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.07905138283967972,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023715419694781303,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4940711557865143,
"rps_doc_frac_unique_words": 0.6287878751754761,
"rps_doc_mean_word_length": 6.46212100982666,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.191939353942871,
"rps_doc_word_count": 132,
"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.07033997774124146,
"rps_doc_frac_chars_top_3gram": 0.03516998887062073,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -74.60340118408203,
"rps_doc_books_importance_length_correction": -74.60340118408203,
"rps_doc_openwebtext_importance": -51.59604263305664,
"rps_doc_openwebtext_importance_length_correction": -51.588871002197266,
"rps_doc_wikipedia_importance": -44.35136413574219,
"rps_doc_wikipedia_importance_length_correction": -44.35136413574219
},
"fasttext": {
"dclm": 0.027330460026860237,
"english": 0.5835530161857605,
"fineweb_edu_approx": 2.0099189281463623,
"eai_general_math": 0.015250800177454948,
"eai_open_web_math": 0.1264287829399109,
"eai_web_code": 0.5093042850494385
}
}
|
{
"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": "418.0285",
"labels": {
"level_1": "Philology; or, Language and languages",
"level_2": "Linguistics",
"level_3": "Language acquisition and Applied linguistics"
}
}
},
"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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-615,397,582,979,840,900
|
PC loads to Windows XP loading screen then restarts
By stensland
Sep 20, 2010
Post New Reply
1. Ok so I got into work today and an employee was having issues with their PC. It's a Compaq built machine with Windows XP. The machine boots up into the loading screen, says it's loading and then restarts and gives me the option to go into safemode and all that because the machine was not properly shut down.
I've been researching the problem for a few hours now, and the employee had said "the computer was acting up lately" but couldn't give me any information past that.
So far I have replaced the power supply, checked the fans, checked the RAM, checked the IDE cable to the HardDrive, and made sure nothing is overheating.
In short Im at a loss here and I can't seem to figure it out. He needs the PC back ASAP and I'm running low on time now.
Any ideas or suggestions?
2. JMMD
JMMD TechSpot Chancellor Posts: 1,177
Does choosing safe mode allow you to boot the PC to Windows? It may be that Windows is crashing or hitting a blue screen and restarting because it's configured to do that.
3. stensland
stensland Newcomer, in training Topic Starter Posts: 65
I can start the boot into safemode, but once it gets going on that the machine restarts just the same as when I pick any other option. I can't even use the option which sets back the machine to the last known working configuration.
I just talked to the employee and he said when he got into work the PC was on but frozen. He restarted it and the problem I described earlier began.
4. JMMD
JMMD TechSpot Chancellor Posts: 1,177
Boot with the XP setup CD and run CHKDSK on the boot drive. That may fix the issue.
5. stensland
stensland Newcomer, in training Topic Starter Posts: 65
So I put the disk in, it boots to that, and then it gives me the option of repairing the PC, it then starts into a process looking for previous versions of Microsoft Windows, and it seems to freeze there. I'm not sure if it is still looking for a previous version or if it's stuck and it's been about 10 minutes now.
6. JMMD
JMMD TechSpot Chancellor Posts: 1,177
You may want to try a drive diagnostic disk from the manufacturer of the hard drive. It sounds like a hard disk issue.
If there is data on the drive that you need to recover you might want to do that before doing anything else. You can either put the drive into an external enclosure or boot with a linux live CD (or something similar) to see if you can even access the file system on the drive.
7. stensland
stensland Newcomer, in training Topic Starter Posts: 65
I did the DSKCHK in the recovery console, it said all was fine, then attempted to boot into safemode, it loaded all the way to the user selection screen and rebooted again.
8. JMMD
JMMD TechSpot Chancellor Posts: 1,177
There's a way to stop the system from automatically rebooting using the setup CD but I can't recall what the option was called. It may be on the menu where safe mode is (accessed with F8). If you could see the error without the system restarting it may help to figure out what the issue is.
9. tipstir
tipstir TS Ambassador Posts: 4,487 +73
Give the end user a loaner laptop or desktop. How are your profiles manage on AD on domain. Are profiles floating type where the user can walk-up to any PC on your domain an start accessing data from profile over server? If so then give the user a loaner setup his email an etc on that loaner. Take the system with the issue and the user going to take a few days.
Now if the user profile is on your server, then you can backup the user:
desktop icons
cookies
my documents including txt, office files, pdf, jpg etc
favorites
shared folders
shared folders, files, printer over the LAN
Printer you need a list of printers the end user uses
You can backup these files over the service but that might take time. Best to use a external USB2 HDD large enough for data backup processor or another system you use for such backup.
To fix the issue after the backup of user data, rebuild the system, with new image (also ghost it)
See techs need to speed up the recovery time for end users system.
1. Blow off the profile on the system and replace it with a new one.
2. Users should not be allowed to save important data files to the system HDD
3. All user data should be on the server in their profile on. Server space.
4. Exception to this would be laptops, but a replication process you be implemented for such equipment
I don't know how your infrastructure policy is setup at your company
When the end user reports a problem saying the computer is slow, that's a dead giveaway meaning:
A: HDD out of space
B: HDD is fragmented badly where the R/W are slower
C: HDD is full of junk temp files
D: Registry Errors
E: File Errors
F: Pest
On the HDD side I would have ran:
CHKDSK C: /F /R
Defrag C:
On the Windows side some run CCleaner or Advanced System Care Pro.
ASCP will scan for pest and remove them, but still need to run the AVS on the system.
From this point you will need to determined how the system is running after all of the above.
If the concussion is to re-image the system with a new image then make sure everything is backup.
If the concussion is to give the user the loaner laptop or replace the prior system with a new desktop or system on hand.
Backup user data
Image
Join the system to domain
Login in as the end user
Recover user data back to the new or old system
Setup Email
Test all user access to shares, shared printers and etc..
Login off as the user reboot the system
Login back as the user and test again everything
Call up the user and tell them the system is ready, when would be a good time to bring it back to them.
Setup it back let the end user check out the system while your still there.
Most test seem to leave too quickly after this process.
10. stensland
stensland Newcomer, in training Topic Starter Posts: 65
Thank you all for the help,
it turns out the harddrive was bad, and to speed it all up i was given the go ahead to replace the PC with a new one and told to not worry about the lost files. We are currently not set up on a domain, but that's the next big project. We have things server backed up, but even that is only once a week.
Add New Comment
TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...
Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.
|
{
"url": "http://www.techspot.com/community/topics/pc-loads-to-windows-xp-loading-screen-then-restarts.153602/",
"source_domain": "www.techspot.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "63749",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7W7VZEPOFEUEME4QX7Y2YR5OPMXM4YUL",
"WARC-Concurrent-To": "<urn:uuid:668d1a4b-465e-4399-9e48-3083578eb096>",
"WARC-Date": "2014-04-18T21:30:24Z",
"WARC-IP-Address": "50.22.252.218",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:V5YTB4SPEKHLUDN3WBLXMHP6OEF6TBHS",
"WARC-Record-ID": "<urn:uuid:ffb244cd-267e-4c53-8074-fec300e3f56b>",
"WARC-Target-URI": "http://www.techspot.com/community/topics/pc-loads-to-windows-xp-loading-screen-then-restarts.153602/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d5976a41-5436-47fb-ba2c-5202a724384c>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-4-33.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-15\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for April 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,
52,
53,
66,
79,
94,
408,
409,
578,
579,
737,
738,
863,
864,
894,
904,
905,
947,
948,
1124,
1139,
1140,
1200,
1201,
1437,
1438,
1591,
1601,
1602,
1644,
1645,
1733,
1748,
1749,
1809,
1810,
2131,
2141,
2142,
2184,
2185,
2308,
2589,
2604,
2605,
2665,
2666,
2843,
2853,
2854,
2896,
2897,
3192,
3205,
3206,
3251,
3252,
3620,
3621,
3698,
3699,
3717,
3729,
3788,
3802,
3821,
3869,
3927,
3928,
4116,
4117,
4220,
4221,
4292,
4293,
4366,
4448,
4528,
4635,
4636,
4709,
4710,
4811,
4812,
4836,
4892,
4930,
4953,
4972,
4984,
4985,
5023,
5024,
5044,
5058,
5059,
5130,
5131,
5221,
5222,
5320,
5321,
5423,
5424,
5550,
5551,
5572,
5582,
5612,
5641,
5693,
5709,
5771,
5772,
5816,
5869,
5977,
5978,
6058,
6118,
6134,
6135,
6195,
6196,
6228,
6229,
6536,
6537,
6538,
6554,
6555,
6572,
6599,
6626,
6642,
6643,
6644
],
"line_end_idx": [
52,
53,
66,
79,
94,
408,
409,
578,
579,
737,
738,
863,
864,
894,
904,
905,
947,
948,
1124,
1139,
1140,
1200,
1201,
1437,
1438,
1591,
1601,
1602,
1644,
1645,
1733,
1748,
1749,
1809,
1810,
2131,
2141,
2142,
2184,
2185,
2308,
2589,
2604,
2605,
2665,
2666,
2843,
2853,
2854,
2896,
2897,
3192,
3205,
3206,
3251,
3252,
3620,
3621,
3698,
3699,
3717,
3729,
3788,
3802,
3821,
3869,
3927,
3928,
4116,
4117,
4220,
4221,
4292,
4293,
4366,
4448,
4528,
4635,
4636,
4709,
4710,
4811,
4812,
4836,
4892,
4930,
4953,
4972,
4984,
4985,
5023,
5024,
5044,
5058,
5059,
5130,
5131,
5221,
5222,
5320,
5321,
5423,
5424,
5550,
5551,
5572,
5582,
5612,
5641,
5693,
5709,
5771,
5772,
5816,
5869,
5977,
5978,
6058,
6118,
6134,
6135,
6195,
6196,
6228,
6229,
6536,
6537,
6538,
6554,
6555,
6572,
6599,
6626,
6642,
6643,
6644,
6842
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6842,
"ccnet_original_nlines": 136,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.44475921988487244,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04886686056852341,
"rps_doc_frac_lines_end_with_ellipsis": 0.007299270015209913,
"rps_doc_frac_no_alph_words": 0.1366855502128601,
"rps_doc_frac_unique_words": 0.3623778522014618,
"rps_doc_mean_word_length": 4.159609317779541,
"rps_doc_num_sentences": 68,
"rps_doc_symbol_to_word_ratio": 0.000708220002707094,
"rps_doc_unigram_entropy": 5.403114318847656,
"rps_doc_word_count": 1228,
"rps_doc_frac_chars_dupe_10grams": 0.021926390007138252,
"rps_doc_frac_chars_dupe_5grams": 0.07830853760242462,
"rps_doc_frac_chars_dupe_6grams": 0.07086922228336334,
"rps_doc_frac_chars_dupe_7grams": 0.04346124082803726,
"rps_doc_frac_chars_dupe_8grams": 0.04346124082803726,
"rps_doc_frac_chars_dupe_9grams": 0.04346124082803726,
"rps_doc_frac_chars_top_2gram": 0.022905249148607254,
"rps_doc_frac_chars_top_3gram": 0.009788569994270802,
"rps_doc_frac_chars_top_4gram": 0.020360220223665237,
"rps_doc_books_importance": -663.5369262695312,
"rps_doc_books_importance_length_correction": -663.5369262695312,
"rps_doc_openwebtext_importance": -375.7215576171875,
"rps_doc_openwebtext_importance_length_correction": -375.7215576171875,
"rps_doc_wikipedia_importance": -318.54248046875,
"rps_doc_wikipedia_importance_length_correction": -318.54248046875
},
"fasttext": {
"dclm": 0.05850857123732567,
"english": 0.9486217498779297,
"fineweb_edu_approx": 1.1605422496795654,
"eai_general_math": 0.2771117091178894,
"eai_open_web_math": 0.2007657289505005,
"eai_web_code": 0.13656622171401978
}
}
|
{
"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.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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,705,869,883,413,985,000
|
Bootcamp Install fails on Mojave
#1
Hello: I have spend the last three days tring to get Bootcamp and Win10 1809 installed. I found a great article from the Twocanoe’s team about large ISO’s causing the failure. This was after trying all sorts of suggested and incorrect approaches that are documented on the web.
Anyways, my system is a Macbook Pro, early 2015, recent 500gb NVMe SSD upgrade and APFS. Windows 10 ISO is from the Volume License Microsoft catalog.
What I read in the document makes perfect sense. I deleted all previous attempoted partitions. Used the tool to split the ISO making it Fat32 freindly. Loaded the resulting tool on a connected USB3.0 drive. I was very hopeful and BOOM - Same Error. Windows files could not be written.
I would like to buy Win7 clone (I was a previous customer but apparently my account is not recognized). I cannot buy until I get BC and Win10 working.
Any help would be appretiated. Specific questions are:
1. Should the ISO be on the MAC drive (APFS) or on an external USB drive (FATex)
2. Is there a way to avoid the 15-30 minutes Windows support software download. Its killing me after 15+ attempts.
Thanks in advance,
Kevin.
#2
Anyone please?
I spen 4 hours with Apple’s support today. Different ISO’s, same error. I mounted the ISO after using the WIM splitting tool and its split. I reloaded a brandnew MacOS from the recovery console 10.14.4 and same error.
Are apple kiulling off bootcamp? At this point, I’m heading out to Bestbuy to get a WIndows system to do my work. So flustrating.
#3
What is the error message you are getting? The issue with ISO / WIM size has been resolved in a Mojave update, so I suspect it is something else in your case.
tim
#4
The error is exact what you show in you WIM splitter document. Right after the downloading the Windows tool, it partitions and the error trying to write the files. It leaves two partitions, one called bootcamp, the other Fsxxxxx (should be OSXRRSERVED).
If you want me to call you, i can tll you everything I have done. Fresh OS load, load 1803, 1809, volume license, regular download. Drive is APFS.
OSX 10.14.2 and 10.14.3.
Thank in advance.
Excuse the brevity and typos, sent from my iPhone.
|
{
"url": "https://community.twocanoes.com/t/bootcamp-install-fails-on-mojave/2524",
"source_domain": "community.twocanoes.com",
"snapshot_id": "crawl=CC-MAIN-2019-09",
"warc_metadata": {
"Content-Length": "19156",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:3FPLTLDJKN33Q6XIDXOTSC2PZDIEQWTB",
"WARC-Concurrent-To": "<urn:uuid:f9869f03-044c-4814-8155-2d39ed42ce3c>",
"WARC-Date": "2019-02-23T15:56:34Z",
"WARC-IP-Address": "216.218.240.87",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:77KI5QIBJMAZ2CIRGMG3R4JQPGMKQ2IE",
"WARC-Record-ID": "<urn:uuid:41bcd13a-8b54-4382-b991-4e8a842c3506>",
"WARC-Target-URI": "https://community.twocanoes.com/t/bootcamp-install-fails-on-mojave/2524",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0fa52040-2d0a-4c8e-a645-55df3f017907>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-142-55-37.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,
33,
34,
35,
38,
39,
317,
318,
468,
469,
754,
755,
906,
907,
962,
963,
1046,
1163,
1164,
1183,
1184,
1191,
1192,
1193,
1196,
1197,
1212,
1213,
1431,
1432,
1562,
1563,
1564,
1567,
1568,
1727,
1728,
1732,
1733,
1734,
1737,
1738,
1992,
1993,
2140,
2141,
2166,
2167,
2185,
2186
],
"line_end_idx": [
33,
34,
35,
38,
39,
317,
318,
468,
469,
754,
755,
906,
907,
962,
963,
1046,
1163,
1164,
1183,
1184,
1191,
1192,
1193,
1196,
1197,
1212,
1213,
1431,
1432,
1562,
1563,
1564,
1567,
1568,
1727,
1728,
1732,
1733,
1734,
1737,
1738,
1992,
1993,
2140,
2141,
2166,
2167,
2185,
2186,
2236
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2236,
"ccnet_original_nlines": 49,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3347022533416748,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.07597535848617554,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2197125256061554,
"rps_doc_frac_unique_words": 0.5765306353569031,
"rps_doc_mean_word_length": 4.423469543457031,
"rps_doc_num_sentences": 45,
"rps_doc_symbol_to_word_ratio": 0.008213549852371216,
"rps_doc_unigram_entropy": 5.042880535125732,
"rps_doc_word_count": 392,
"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.012110729701817036,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -261.59002685546875,
"rps_doc_books_importance_length_correction": -261.59002685546875,
"rps_doc_openwebtext_importance": -130.7002716064453,
"rps_doc_openwebtext_importance_length_correction": -130.7002716064453,
"rps_doc_wikipedia_importance": -106.72962188720703,
"rps_doc_wikipedia_importance_length_correction": -106.72962188720703
},
"fasttext": {
"dclm": 0.033050838857889175,
"english": 0.9281015396118164,
"fineweb_edu_approx": 1.109183430671692,
"eai_general_math": 0.5591645240783691,
"eai_open_web_math": 0.2786535620689392,
"eai_web_code": 0.5435810089111328
}
}
|
{
"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.456",
"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": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,331,158,183,569,048,000
|
< Block Plugin
This article demonstrates the Block Plugin syntax.
On the Scratch Forums, code must be written between [scratchblocks]...[/scratchblocks] tags. (On the wiki, <scratchblocks>...</scratchblocks> tags are used.) For a simplified explanation, see here.
Every block goes on a new line and is written as the text on the block is shown on Scratch. For example:
Code Result
[scratchblocks]
when green flag clicked
forever
turn cw (15) degrees
say [Hello!] for (2) secs
if <mouse down?> then
change [mouse clicks v] by (1)
end
[/scratchblocks]
when green flag clicked
forever
turn cw (15) degrees
say [Hello!] for (2) secs
if <mouse down?> then
change [mouse clicks v] by (1)
end
end
Arguments
Arguments, or inputs to a block, are represented within the block with various codes.
Numerical Insert
The round numerical insert is used with parentheses: (10).
move (10) steps
move (10) steps
String Insert
String inputs are created with square brackets: [lorem ipsum]
say [Hi]
say [Hi]
think [bye]
think [bye]
Block Insert
Boolean Blocks and Reporter Blocks are created with <boolean> and (reporter), respectively.
if <<mouse down?> and <(costume #) = [1]>> then
stamp
end
if <<mouse down?> and <(costume #) = [1]>> then
stamp
end
Note that booleans appear like reporter blocks due to a technical limitation.
Color Picker
SandCastleIcon.png This page has links to websites or programs not hosted or created by Scratch or Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.
A color picker is represented with [#hexcode]. #hexcode is a hexadecimal color code.
set pen color to [#00FF00]
set pen color to [#00FF00]
colorpicker.com can be used to find hexadecimal colors.
Dropdown List
Dropdown lists are created with the code [selection v].
broadcast [start v]
broadcast [start v]
Special Blocks
Some blocks have different code based on their unique shapes and features, as well as technical limitations.
Hat Blocks
The When Green Flag Clicked block can be typed with any of the following syntax options:
when green flag clicked
when gf clicked
when flag clicked
when gf clicked
For the When () Clicked block, the old block plugin required the sprite's name to be surrounded by brackets. This is no longer necessary:
When this sprite clicked
when this sprite clicked
The When () key pressed block uses a drop-down menu:
when [space v] key pressed
when [space v] key pressed
Stack Blocks
The Turn () Degrees (clockwise) block can be written two ways:
turn cw () degrees
turn right () degrees
turn cw () degrees
The Turn () Degrees (counter-clockwise) block can be written two ways:
turn ccw () degrees
turn left () degrees
turn ccw () degrees
C Blocks
C blocks must be closed by typing "end" after the last stack block inside it. However, C blocks at the end of a script will close automatically. For example:
repeat (10)
move (5) steps
stamp
end
repeat (10)
move (10) steps
stamp
Makes:
repeat (10)
move (5) steps
stamp
end
repeat (10)
move (10) steps
stamp
Comments
Comments are created with two slashes: //comment after a block.
move (10) steps //is that too far?
move (10) steps //is that too far?
Custom Blocks
If one tries to show a custom block, it will appear obsolete (red) because it has not been defined.
jump
jump
A definition hat can be created by writing "define", and then the text of the block:
define jump
repeat (10)
change y by (4)
end
define jump
repeat (10)
change y by (4)
end
Number, boolean, and string arguments can be added:
define jump (height) <gravity on?> [message]
define jump (height) <gravity on?> [message]
Once a define hat has been made, one can then use the block inside the same <scratchblocks> tag, and it will no longer appear obsolete.
jump
define jump
repeat (10)
change y by (4)
end
jump
define jump
repeat (10)
change y by (4)
end
Custom Block Inputs
If one tries to use an input reporter without making a block definition first, it will appear as a variable.
say (height)
say (height)
But if it is put below a block definition, it will render as an input reporter:
define jump (height)
say (input)
define jump (height)
say (height)
List Reporters
If one tries to write a list reporter, it will look like a variable reporter, because the plugin has no way of telling them apart.
say (list of Scratch team members)
say (list of Scratch team members)
However, if one has used the list in a list block inside the same <scratchblocks> tag, then it will render correctly:
add [mres] to [list of Scratch team members v]
add [paddle2see] to [list of Scratch team members v]
add [harakou] to [list of Scratch team members v]
say (list of Scratch team members)
add [mres] to [list of Scratch team members v]
add [paddle2see] to [list of Scratch team members v]
add [harakou] to [list of Scratch team members v]
say (list of Scratch team members)
If a list block is not wanted or needed inside the same <scratchblocks> tag, :: list can be used:
say (list of Scratch team members :: list)
say (list of Scratch team members :: list)
Shortening Source Code
It is possible to make the source of ScratchBlocks code slightly shorter by removing unnecessary code. No spaces are necessary between an insert and the block text. Also, closing brackets (]) and parentheses ()) can be left off at the end of a line. Therefore, the following two snippets render identically, though the first is 226 characters, and the second only 183:
when gf clicked
ask [n=] and wait
set [n v] to (answer)
set [i v] to [0]
repeat until <(n) = [1]>
if <((n) mod (2)) = [0]> then
set [n v] to ((n) / (2))
else
set [n v] to (((3) * (n)) + (1))
end
change [i v] by (1)
end
say (i)
when gf clicked
ask[n=]and wait
set[n v]to(answer
set[i v]to[0
repeat until<(n)=[1
if<((n)mod(2))=[0]>then
set[n v]to((n)/(2
else
set[n v]to(((3)*(n))+(1
end
change[i v]by(1
end
say(i
when gf clicked
ask[n=]and wait
set[n v]to(answer
set[i v]to[0
repeat until<(n)=[1
if<((n)mod(2))=[0]>then
set[n v]to((n)/(2
else
set[n v]to(((3)*(n))+(1
end
change[i v]by(1
end
say(i
However, this is considered poor style and is not recommended.
Hacks
There are some hacks available in the plugin, in order to make it usable with Scratch Modifications. Most of these are now widely available on the forums, however, the wiki still uses an outdated version, so many hacks will not appear correctly.
For an in-depth tutorial on scratchblocks tricks that can only be used in the forums, please read through this topic: http://scratch.mit.edu/discuss/topic/55586
Color and Shape Changing
The color and shape of a block can be changed. This can be useful for forcing non-Scratch blocks to appear correctly. Note that only color changing with the legacy syntax works in the old version. The legacy syntax is obsolete (it no longer works since scratchblocks3).
Feature Code Result Link
Color legacy syntax (only worked at the end of a line)
abc :: looks
say [I'm not a Motion block!]:: motion
abc :: looks
say [I'm not a Motion block!]:: motion
Link
Feature Code Link
Color new syntax (works for reporters and booleans too)
abc :: looks
say [I'm not a Motion block!] :: motion
eat (pen color :: pen) :: control
if <touching [mouse pointer v] :: list> then
die :: grey
Link
Changing shape
abc :: events hat
def :: motion stack
ghi :: pen reporter
jkl :: operators boolean
Link
Changing C shape and adding color ("if")
mno {
...
} :: sensing
Link
C-shape with multiple branches ("if-else")
pqr {
...
} stu {
...
} vwx :: sound
Link
C-shape with cap ("forever")
yz {
...
} :: motion cap
Link
Snap!
See also: Snap!
The new plugin also supports features specific to Snap!, such as "rings". Other blocks in Snap! can be created using the color/shape hacks above.
run ({create clone :: control} @addInput :: grey ring) :: control
<() @addInput :: grey ring>
say (http:// [snap.berkeley.edu] :: sensing)
((6) × (7) :: operators)
(join [hello ] [world] @delInput @addInput :: operators)
script variables ((foo) :: grey) ((bar) :: grey) @delInput @addInput :: grey
(all but first of (list) :: list)
warp {
move (10) steps
} :: grey
report [Done!] :: control cap
(<> @addInput) // without even the :: grey ring
which produces these blocks:
run ({create clone :: control} @addInput :: grey ring) :: control
<() @addInput :: grey ring>
say (http:// [snap.berkeley.edu] :: sensing)
((6) × (7) :: operators)
(join [hello ] [world] @delInput @addInput :: operators)
script variables ((foo) :: grey) ((bar) :: grey) @delInput @addInput :: grey
(all but first of (list) :: list)
warp {
move (10) steps
} :: grey
report [Done!] :: control cap
(<> @addInput) // without even the :: grey ring
GP
This plugin also includes hacks to GP.
when tracking (mouse x :: variables) (mouse y :: variables) :: hat control
((1) != (0) :: operators)
define(a function :: motion) :: custom hat
return (1) :: control
say (pi :: operators) :: motion
when I receive [go] :: control
wait @addInput :: control
(isNil [obj v] :: operators)
(touching mouse :: sensing)
((--( :: #ffffff) :: operators) :: operators)
if (--( :: #ffffff) :: operators) {
} @addInput :: control
|
{
"url": "https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax",
"source_domain": "en.scratch-wiki.info",
"snapshot_id": "crawl=CC-MAIN-2018-34",
"warc_metadata": {
"Content-Length": "40170",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:25IY4EF43HVJZEIXP5Q5VAWDV4FAS4RX",
"WARC-Concurrent-To": "<urn:uuid:46514e29-a4c3-4744-9a6f-8800f81394c5>",
"WARC-Date": "2018-08-18T01:38:36Z",
"WARC-IP-Address": "195.30.85.240",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EFOAGXUHOJXWNEXX6NIU36TA2MXUJI3K",
"WARC-Record-ID": "<urn:uuid:d1cd36dc-7bd5-4378-97a4-5466f248da30>",
"WARC-Target-URI": "https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:059e34f6-0679-4a37-87f5-f8c81990a1a9>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-136-239-183.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,
15,
16,
67,
68,
266,
267,
372,
373,
385,
401,
425,
433,
457,
486,
511,
548,
555,
572,
596,
604,
628,
657,
682,
719,
726,
730,
731,
741,
742,
828,
829,
846,
847,
906,
907,
923,
939,
940,
954,
955,
1017,
1018,
1027,
1036,
1048,
1060,
1061,
1074,
1075,
1167,
1168,
1216,
1222,
1226,
1274,
1280,
1284,
1285,
1363,
1364,
1377,
1378,
1588,
1589,
1674,
1675,
1702,
1729,
1730,
1786,
1787,
1801,
1802,
1858,
1859,
1879,
1899,
1900,
1915,
1916,
2025,
2026,
2037,
2038,
2127,
2128,
2152,
2168,
2186,
2202,
2203,
2204,
2342,
2343,
2368,
2393,
2394,
2447,
2448,
2475,
2502,
2503,
2516,
2517,
2580,
2581,
2600,
2622,
2641,
2642,
2713,
2714,
2734,
2755,
2775,
2776,
2785,
2786,
2944,
2945,
2957,
2972,
2978,
2982,
2994,
3010,
3016,
3017,
3024,
3025,
3037,
3052,
3058,
3062,
3074,
3090,
3096,
3097,
3106,
3107,
3171,
3172,
3207,
3242,
3243,
3257,
3258,
3358,
3359,
3364,
3369,
3370,
3455,
3456,
3468,
3480,
3498,
3502,
3514,
3526,
3544,
3548,
3549,
3601,
3602,
3647,
3692,
3693,
3829,
3830,
3835,
3836,
3848,
3860,
3878,
3882,
3887,
3888,
3900,
3912,
3930,
3934,
3935,
3955,
3956,
4065,
4066,
4079,
4092,
4093,
4173,
4174,
4195,
4207,
4228,
4241,
4242,
4257,
4258,
4389,
4390,
4425,
4460,
4461,
4579,
4580,
4627,
4680,
4730,
4765,
4812,
4865,
4915,
4950,
4951,
5049,
5050,
5093,
5136,
5137,
5160,
5161,
5530,
5531,
5547,
5565,
5587,
5604,
5629,
5659,
5684,
5689,
5722,
5726,
5746,
5750,
5758,
5774,
5790,
5808,
5821,
5841,
5865,
5883,
5888,
5912,
5916,
5932,
5936,
5942,
5958,
5974,
5992,
6005,
6025,
6049,
6067,
6072,
6096,
6100,
6116,
6120,
6126,
6127,
6190,
6191,
6197,
6198,
6444,
6445,
6606,
6607,
6632,
6633,
6903,
6904,
6929,
6984,
6997,
7036,
7049,
7088,
7093,
7111,
7167,
7180,
7220,
7254,
7299,
7313,
7318,
7333,
7351,
7371,
7391,
7416,
7421,
7462,
7468,
7474,
7487,
7492,
7535,
7541,
7547,
7555,
7561,
7576,
7581,
7610,
7615,
7619,
7635,
7640,
7641,
7647,
7648,
7664,
7665,
7666,
7812,
7813,
7879,
7880,
7908,
7909,
7954,
7955,
7980,
7981,
8038,
8039,
8116,
8117,
8151,
8152,
8159,
8177,
8187,
8188,
8218,
8219,
8267,
8268,
8297,
8298,
8364,
8365,
8393,
8394,
8439,
8440,
8465,
8466,
8523,
8524,
8601,
8602,
8636,
8637,
8644,
8662,
8672,
8673,
8703,
8704,
8752,
8753,
8756,
8757,
8796,
8797,
8872,
8873,
8899,
8900,
8943,
8965,
8966,
8998,
8999,
9030,
9031,
9057,
9058,
9087,
9088,
9116,
9117,
9163,
9164,
9200
],
"line_end_idx": [
15,
16,
67,
68,
266,
267,
372,
373,
385,
401,
425,
433,
457,
486,
511,
548,
555,
572,
596,
604,
628,
657,
682,
719,
726,
730,
731,
741,
742,
828,
829,
846,
847,
906,
907,
923,
939,
940,
954,
955,
1017,
1018,
1027,
1036,
1048,
1060,
1061,
1074,
1075,
1167,
1168,
1216,
1222,
1226,
1274,
1280,
1284,
1285,
1363,
1364,
1377,
1378,
1588,
1589,
1674,
1675,
1702,
1729,
1730,
1786,
1787,
1801,
1802,
1858,
1859,
1879,
1899,
1900,
1915,
1916,
2025,
2026,
2037,
2038,
2127,
2128,
2152,
2168,
2186,
2202,
2203,
2204,
2342,
2343,
2368,
2393,
2394,
2447,
2448,
2475,
2502,
2503,
2516,
2517,
2580,
2581,
2600,
2622,
2641,
2642,
2713,
2714,
2734,
2755,
2775,
2776,
2785,
2786,
2944,
2945,
2957,
2972,
2978,
2982,
2994,
3010,
3016,
3017,
3024,
3025,
3037,
3052,
3058,
3062,
3074,
3090,
3096,
3097,
3106,
3107,
3171,
3172,
3207,
3242,
3243,
3257,
3258,
3358,
3359,
3364,
3369,
3370,
3455,
3456,
3468,
3480,
3498,
3502,
3514,
3526,
3544,
3548,
3549,
3601,
3602,
3647,
3692,
3693,
3829,
3830,
3835,
3836,
3848,
3860,
3878,
3882,
3887,
3888,
3900,
3912,
3930,
3934,
3935,
3955,
3956,
4065,
4066,
4079,
4092,
4093,
4173,
4174,
4195,
4207,
4228,
4241,
4242,
4257,
4258,
4389,
4390,
4425,
4460,
4461,
4579,
4580,
4627,
4680,
4730,
4765,
4812,
4865,
4915,
4950,
4951,
5049,
5050,
5093,
5136,
5137,
5160,
5161,
5530,
5531,
5547,
5565,
5587,
5604,
5629,
5659,
5684,
5689,
5722,
5726,
5746,
5750,
5758,
5774,
5790,
5808,
5821,
5841,
5865,
5883,
5888,
5912,
5916,
5932,
5936,
5942,
5958,
5974,
5992,
6005,
6025,
6049,
6067,
6072,
6096,
6100,
6116,
6120,
6126,
6127,
6190,
6191,
6197,
6198,
6444,
6445,
6606,
6607,
6632,
6633,
6903,
6904,
6929,
6984,
6997,
7036,
7049,
7088,
7093,
7111,
7167,
7180,
7220,
7254,
7299,
7313,
7318,
7333,
7351,
7371,
7391,
7416,
7421,
7462,
7468,
7474,
7487,
7492,
7535,
7541,
7547,
7555,
7561,
7576,
7581,
7610,
7615,
7619,
7635,
7640,
7641,
7647,
7648,
7664,
7665,
7666,
7812,
7813,
7879,
7880,
7908,
7909,
7954,
7955,
7980,
7981,
8038,
8039,
8116,
8117,
8151,
8152,
8159,
8177,
8187,
8188,
8218,
8219,
8267,
8268,
8297,
8298,
8364,
8365,
8393,
8394,
8439,
8440,
8465,
8466,
8523,
8524,
8601,
8602,
8636,
8637,
8644,
8662,
8672,
8673,
8703,
8704,
8752,
8753,
8756,
8757,
8796,
8797,
8872,
8873,
8899,
8900,
8943,
8965,
8966,
8998,
8999,
9030,
9031,
9057,
9058,
9087,
9088,
9116,
9117,
9163,
9164,
9200,
9222
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9222,
"ccnet_original_nlines": 392,
"rps_doc_curly_bracket": 0.0019518500193953514,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0.00012440999853424728,
"rps_doc_stop_word_fraction": 0.2706044018268585,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007326010148972273,
"rps_doc_frac_lines_end_with_ellipsis": 0.010178119875490665,
"rps_doc_frac_no_alph_words": 0.3342490792274475,
"rps_doc_frac_unique_words": 0.2811412811279297,
"rps_doc_mean_word_length": 4.594293594360352,
"rps_doc_num_sentences": 72,
"rps_doc_symbol_to_word_ratio": 0.00641026021912694,
"rps_doc_unigram_entropy": 5.442413330078125,
"rps_doc_word_count": 1437,
"rps_doc_frac_chars_dupe_10grams": 0.21993334591388702,
"rps_doc_frac_chars_dupe_5grams": 0.33777642250061035,
"rps_doc_frac_chars_dupe_6grams": 0.3126325309276581,
"rps_doc_frac_chars_dupe_7grams": 0.2799151837825775,
"rps_doc_frac_chars_dupe_8grams": 0.25507423281669617,
"rps_doc_frac_chars_dupe_9grams": 0.25507423281669617,
"rps_doc_frac_chars_top_2gram": 0.010905790142714977,
"rps_doc_frac_chars_top_3gram": 0.02362919971346855,
"rps_doc_frac_chars_top_4gram": 0.03089972957968712,
"rps_doc_books_importance": -888.0660400390625,
"rps_doc_books_importance_length_correction": -888.0660400390625,
"rps_doc_openwebtext_importance": -526.1063232421875,
"rps_doc_openwebtext_importance_length_correction": -526.1063232421875,
"rps_doc_wikipedia_importance": -454.50933837890625,
"rps_doc_wikipedia_importance_length_correction": -454.50933837890625
},
"fasttext": {
"dclm": 0.09748166799545288,
"english": 0.7280977964401245,
"fineweb_edu_approx": 2.4828808307647705,
"eai_general_math": 0.4304087162017822,
"eai_open_web_math": 0.22934037446975708,
"eai_web_code": 0.8198797702789307
}
}
|
{
"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": "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": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,895,356,905,015,384,300
|
fbpx
Big Data is Better Data…Right?
Is big data always better data? In other words, is it always helpful to have more data? Not necessarily — and here’s why.
From the time we first got excited about big data, we were told that the magic lies in the ability to find meaningful insights from large data sets, or data so voluminous that it was impossible to process it until modern computational and software tools became available. But when we examine this a little further, we need to consider whether we really get the best analytics simply because the data is large.
The sheer size of big data can make it difficult to handle. Sometimes the goals and expectations are too large, the effort to manage and process is too much, and the insights are hidden below too large a heap. Does smaller data make more sense in some situations?
The bigger the data, the bigger the effort to manage it. What does this mean? Large volumes of data may not be usable due to problems such as inconsistent formats, incomplete data, etc. Big data experts who are expected to uncover strategic insights for the business are forced to spend their time in data cleaning and management just to make it usable.
Larger volumes of data also mean that you need more security measures in place and will spend higher amounts on data storage.
Sometimes, less is more
There are some situations when it is far more helpful to have smaller data sets that are collected with the end objective in mind. Analysts then know the right models that should be applied in order to find patterns, trends, causes, and correlations.
Let’s consider companies that have implemented IoT systems and are receiving a large number of machine readings from equipment at frequent intervals. In the absence of a clear plan as to how these readings should be used, if they are simply stored with vague ideas of revealing transformational insights in the future, it is quite likely that no tangible result may be achieved.
On the other hand, if the IoT data is planned with specific questions and objectives in mind, then a smaller number of parameters can be collected. Analysts have a clear idea about what they are looking for so they can apply appropriate modeling techniques. So, as we see in this case, big data is not always better data.
If data collection and storage are not limited to such “smart data”, but rather gather huge volumes of big data, then a large chunk of it becomes “dark data” — i.e. data that is unlikely to ever be used.
There are other situations that require large data sets. For example, in public health, if the objective is to track the spread of a particular disease and stop it from spreading further, or in engineering, if the performance of a jet engine has to be studied, then big data analytics will prove to be extremely powerful. The key, then, is to use as large a dataset as appropriate for the specific objective, without drowning in data.
Machine learning algorithms need meaningful data
When we apply machine learning technology to uncover patterns, trends, and relationships or predict future events, we supply the machine learning algorithms with data. Larger data sets are not always more helpful in this situation. The algorithms need meaningful datasets which include those fields that are relevant for the specific objective. Feeding the algorithm with huge volumes of irrelevant data will not help build the right ML capabilities.
We see from the above examples that it is smarter, not bigger, data that is of critical importance. Huge volumes of data does not necessarily translate to business benefits if you don’t know what you’re looking for, not looking at the right data, or not using the right tools.
One solution is to create a data map — clearly mapping what data you are collecting, from which sources, for what purposes, how it is being stored, and who can access it. Businesses would be wise to focus on smart data that has a definite purpose and avoid investing time and resources on others.
Leave a Reply
Your email address will not be published. Required fields are marked *
|
{
"url": "https://treehousetechgroup.com/big-data-is-better-data-right/",
"source_domain": "treehousetechgroup.com",
"snapshot_id": "crawl=CC-MAIN-2020-50",
"warc_metadata": {
"Content-Length": "45069",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PPH5IQNTNSMTMVQG7PRO4EHM6XRTOTMO",
"WARC-Concurrent-To": "<urn:uuid:069e206b-b980-41e3-a841-43c3fa1fca81>",
"WARC-Date": "2020-11-27T17:15:34Z",
"WARC-IP-Address": "172.67.168.147",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:LNHSYVGEKLUNWK7ESV7D2EKWT6Z4MZWV",
"WARC-Record-ID": "<urn:uuid:94604f0c-c1e4-43fe-8111-248624cd2b71>",
"WARC-Target-URI": "https://treehousetechgroup.com/big-data-is-better-data-right/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:84571818-e0db-48f7-8bf8-0b8218d54a21>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-27.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,
5,
6,
37,
38,
161,
162,
573,
574,
839,
840,
1197,
1198,
1326,
1327,
1351,
1352,
1604,
1605,
1985,
1986,
2311,
2312,
2516,
2517,
2954,
2955,
3004,
3005,
3457,
3458,
3735,
3736,
4034,
4035,
4049,
4050
],
"line_end_idx": [
5,
6,
37,
38,
161,
162,
573,
574,
839,
840,
1197,
1198,
1326,
1327,
1351,
1352,
1604,
1605,
1985,
1986,
2311,
2312,
2516,
2517,
2954,
2955,
3004,
3005,
3457,
3458,
3735,
3736,
4034,
4035,
4049,
4050,
4120
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4120,
"ccnet_original_nlines": 36,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4749373495578766,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0012531300308182836,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11027569323778152,
"rps_doc_frac_unique_words": 0.4186704456806183,
"rps_doc_mean_word_length": 4.6690239906311035,
"rps_doc_num_sentences": 37,
"rps_doc_symbol_to_word_ratio": 0.0012531300308182836,
"rps_doc_unigram_entropy": 5.096322536468506,
"rps_doc_word_count": 707,
"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.016964560374617577,
"rps_doc_frac_chars_top_3gram": 0.011814599856734276,
"rps_doc_frac_chars_top_4gram": 0.010299909859895706,
"rps_doc_books_importance": -320.03680419921875,
"rps_doc_books_importance_length_correction": -320.03680419921875,
"rps_doc_openwebtext_importance": -196.85653686523438,
"rps_doc_openwebtext_importance_length_correction": -196.85653686523438,
"rps_doc_wikipedia_importance": -94.23579406738281,
"rps_doc_wikipedia_importance_length_correction": -94.23579406738281
},
"fasttext": {
"dclm": 0.20908695459365845,
"english": 0.9361922740936279,
"fineweb_edu_approx": 2.2215046882629395,
"eai_general_math": 0.28487563133239746,
"eai_open_web_math": 0.24237138032913208,
"eai_web_code": 0.2782368063926697
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.75",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.028",
"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": "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": "16",
"label": "Personal Blog"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,300,673,356,973,171,000
|
Elastic Load Balancer distributes traffic to instances that belong to the ELB group - generaly across multiple AZs. One nifty features it that it allows us to offload SSL certs to load balancers instead of webservers! ELB configuration requires a protocol, a front end port, and a back end port. ELB are NOT free - there is a charge by the hour and per GB of usage. Only one SSL Cert per ELB. The max number of requests that can be queued is 1024, can only use one subnet per AZ; can use up to 5 Security groups and also features deletion protection.
There are two version of ELB - Classic Load Balancer (only a few ports + TCP, HTTP, HTTPS, SSL; layer 4) and Application Load Balancer (any port - just HTTP, HTTPS; layer 7). ELBs do not have a defined IPV4 address but do support both IPV4 & IPV6.
Lots of differences between externally and internally facing load balancers:
• External = must be placed in a public subnet; public IP; external DNS
• Internal = no public IP; internal DNS name
Lots of times you will know there is more traffic a-coming. In these cases you can “pre-warm” the ELB by contacting AWS!
SSL on ELB
One of the key features of ELB is the ability to terminate SSL connections for instances in the load balancing group - SSL is still a highly compute intensive process for webservers. In this configuration, the HTTPS client uses port 443 to communicate with the ELB and the ELB communicates on port 80 to the web server instances in the autoscaling group. Although a great feature, end-to-end encryption is an important aspect to consider in system design.
Managing the certificate on the ELB is always the magic… In fact, managing certs in general, is the magic. There are three options.
1. Use the new AWS Certificate Manager service. Especially cool now that it is integrated with Elastic Beanstalk - nifty and FREE!
2. Use a certificate from IAM.
3. Upload your own.
In addition to a cert, you need to define an SSL Negotiation configuration, called a security policy, which is a combination of SSL protocols, SSL ciphers, and the Server Order Preference option.
If you have multiple ELB then multiple SSL Certs are required unless you use a wildcard certificate.
Health Checks
To enable removing unhealthy instances from the round robin, each ELB can do a health check of the instances in the load balancing group. The health check can use different ports, including port 80, and set a response timeout, a health check interval, an unhealthy threshold and a healthy threshold.
ELB health checks only determine if the instance will get traffic routed to it; optionally, an ASG can use ELB health checks in addition to the EC2 status checks it uses.
Metrics
Metrics are reported every 60 seconds but if there is no traffic, no metric will be reported. For the ELB there are two useful dimensions: the AvailabilityZone and LoadBalancerName; the ALB adds a TargetGroup dimension.
• SurgeQueueLength - Length of waiting queue - closer to zero the better (up to 1024)
• SpilloverCount - How many requests are NOT serviced by the load balancer in EXCESS of the QueueLength - closer to zero the better; This is a bad, bad thing. Avoid. ELB reports a 503 - Service Unavailable to the client in this scenario.
• Latency - How long a page takes to return
• BackendConnectionErrors - unsuccessful connection to the backend; Look at SUM and difference between min and max values
• HealthyHostCount, UnHealthyHostCount - how well the backend instances are holding up
• HTTPCode_Backend_XXX - response codes from the backend (2XX, 3XX, 4XX)
• HTTPCode_ELB_4XX - malformed on incomplete client requests
• HTTPCode_ELB_5XX - no healthy backend instance or request rate too high
• RequestCount - # of requests over 1 or 5 minute interval
Logging
Strangely ELB Logging is disabled by default and are generated on a best-case situation so data might be missing; logs are stored in S3 and delivered every hour OR every 5 minutes.
The log file name includes the end-time, ip address of the ELB and a random generated string. The logs themselves include a timestamp, client:port, backend:port, user_agent and the important:
• request_processing_time -
• for HTTP load balancer = complete request -> send to instance
• for TCP load balancer = TCP connect -> first byte to instance
• backend_processing_time
• for HTTP load balancer = completed send to backend server -> start of response
• for TCP load balancer = time until connect to backend server
• response_processing_time
• for HTTP load balancer = start of reponse head -> start of send response to client
• for TCP load balancer = time until first byte from instance started sending reponse to client
• Request - including verb, protocol version (http 1.1 or 2.0)
ALB can also forward X-Forwarded-For header so logging can occur at the instance layer NOT the ALB (because ALB routing is best effort to complete).
To accomplish the same thing with an ELB you need to enable the Proxy Protocol Headers which adds a header for the backend to parse but this does not enable sticky session or X-Forward-For header. This can only be configured from the command line.
The ALB can also add the custom “X-Amzn-Trace-Id” HTTP header on all requests to improve tracability.
Differences between ELB & ALB
Thingy ELB ALB
HTTP & HTTP Yes Yes
TCP/SSL (Layer 4) Yes No
Layer? 4 (forwards request) 7 (terminates; parses header; new request)
Layer 7 No Yes
Websockets No Yes
Path Routing No Yes
Host Routing No Yes
Cookie Stickiness Yes ELB Cookies only (called AWSALB)
Health Check TCP, ICMP, HTTP, HTTPS HTTP, HTTPS
Require MultiAZ? No Yes
ALB Facts
Path based routing & management - because the routing is based on URL matching target groups can be containers, different port on the same box or simply different target groups. This enables the ability to manage each target group individually.
Target groups are EC2 instances or containers managed as an entity and checks the health of the group automatically.
Listeners
ALB listeners supports HTTP & HTTPS only. Rules determine where the traffic gets forwarded. The default rule has no conditions and runs if no other rules are matched. Each rule has a priority, host and path and can only Forward to a target group.
ELB Facts
In a EC2-Classic situation, an ELB support ports, 25, 80, 443, 465, 587 and 1024-65535 (how is this on the test???) while in an EC2-VPC it support ports 1-65535. An Elastic IP can not be assigned to a ELB. DNS apex zone support is in the house while multiple non-wild card SSL certs will require multiple ELB. It also support IPv4 & IPv6. Can load balance the zone apex as well.
There are three Cookie Stickiness, also know as session affinity, with both enabled options end up with sticky sessions (so all sessions go back to the same server), options:
• Disable Stickiness - The disable stickiness option is what you want and then you need to implement ElastiCache or an Amazon RDS instance for session.
• Enable Load Balancer Generated Cookies - the ELB generates the cookie and manages the distribution of traffic; also know as “duration based”; can set the duration of the distribution with zero seconds disabling cookie expiration
• Enable Application Generated Cookie Stickiness - ELB generates a cookie that correlates to the application cookie - the duration is set by the application cookie; name the cookie in the setting.
Autoscaling and ELB Trouble Shooting
Improving Operations
• Install a web server on each instance, so the default health checks work well.
• Enable keep-alive timeout so the ELB to backend connection stays open
• Enable Path MTU Discovery
• Use TCP if your application does NOT use common HTTP codes
General Config Problems
1. Attempting to create instance in the wrong zone, subnet or security group or with the wrong key pair.
2. Instance is not supported in that AZ, region or is the wrong type for autoscaling.
3. The region is out of capacity.
4. There is an invalid EBS device mapping, or you are attaching a EBS block device to a instance store AMI.
5. An ELB will issues a HTTP 503 Error when it can process any more requests - call AWS if a huge traffic spike comes!
Dumbass Problems:
1. Autoscaling is not enabled on the account.
2. Autoscaling config is not working correctly. ie. there is a bug.
3. Autoscaling is in a “suspended state”
Patterns
Idle timeouts - decrease the connection idle timeouts from the front of the system to the back… this defaults to 60 seconds on the ELB. This does not apply to the ALB.
More than one AZ - always associate an ELB with more than one AZ
ELB routing results in AZ load in-balance - sometimes the lack of DNS servers causes an AZ to get hotter than others because some networks can’t service the requests and cached results are used; enable cross zone routing with Route 53
|
{
"url": "http://ric.mclaughlin.today/posts/aws-elastic-load-balancer",
"source_domain": "ric.mclaughlin.today",
"snapshot_id": "crawl=CC-MAIN-2021-49",
"warc_metadata": {
"Content-Length": "17907",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:53NET35MHAI4AIG3GXYZQ6SNCV44CFPB",
"WARC-Concurrent-To": "<urn:uuid:34aad11a-4f91-42ee-8320-81f4df6c9a0f>",
"WARC-Date": "2021-12-09T07:31:38Z",
"WARC-IP-Address": "185.199.109.153",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:7XHCUMSCGIYNELL4OIB252CQSUKTTJS7",
"WARC-Record-ID": "<urn:uuid:86fd82e7-da0a-44bb-9ce3-039faf7e5c3d>",
"WARC-Target-URI": "http://ric.mclaughlin.today/posts/aws-elastic-load-balancer",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5232cd97-d149-4a2b-8cf7-e1d669287e75>"
},
"warc_info": "isPartOf: CC-MAIN-2021-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2021\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-155\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,
551,
552,
800,
801,
878,
879,
953,
954,
1001,
1002,
1123,
1124,
1135,
1136,
1592,
1593,
1725,
1726,
1859,
1860,
1893,
1894,
1916,
1917,
2113,
2114,
2215,
2216,
2230,
2231,
2531,
2532,
2703,
2704,
2712,
2713,
2933,
2934,
3022,
3023,
3263,
3264,
3310,
3311,
3435,
3436,
3525,
3526,
3601,
3602,
3665,
3666,
3742,
3743,
3804,
3805,
3813,
3814,
3995,
3996,
4188,
4189,
4219,
4287,
4355,
4383,
4468,
4535,
4564,
4653,
4753,
4818,
4819,
4968,
4969,
5217,
5218,
5320,
5321,
5351,
5352,
5367,
5387,
5412,
5483,
5498,
5516,
5536,
5556,
5611,
5659,
5683,
5684,
5694,
5695,
5940,
5941,
6058,
6059,
6069,
6070,
6317,
6318,
6328,
6329,
6708,
6709,
6884,
6885,
7039,
7040,
7273,
7274,
7473,
7474,
7511,
7512,
7533,
7534,
7617,
7618,
7692,
7693,
7723,
7724,
7787,
7788,
7812,
7813,
7920,
7921,
8009,
8010,
8046,
8047,
8157,
8158,
8279,
8280,
8298,
8299,
8347,
8348,
8418,
8419,
8462,
8463,
8472,
8473,
8641,
8642,
8707,
8708
],
"line_end_idx": [
551,
552,
800,
801,
878,
879,
953,
954,
1001,
1002,
1123,
1124,
1135,
1136,
1592,
1593,
1725,
1726,
1859,
1860,
1893,
1894,
1916,
1917,
2113,
2114,
2215,
2216,
2230,
2231,
2531,
2532,
2703,
2704,
2712,
2713,
2933,
2934,
3022,
3023,
3263,
3264,
3310,
3311,
3435,
3436,
3525,
3526,
3601,
3602,
3665,
3666,
3742,
3743,
3804,
3805,
3813,
3814,
3995,
3996,
4188,
4189,
4219,
4287,
4355,
4383,
4468,
4535,
4564,
4653,
4753,
4818,
4819,
4968,
4969,
5217,
5218,
5320,
5321,
5351,
5352,
5367,
5387,
5412,
5483,
5498,
5516,
5536,
5556,
5611,
5659,
5683,
5684,
5694,
5695,
5940,
5941,
6058,
6059,
6069,
6070,
6317,
6318,
6328,
6329,
6708,
6709,
6884,
6885,
7039,
7040,
7273,
7274,
7473,
7474,
7511,
7512,
7533,
7534,
7617,
7618,
7692,
7693,
7723,
7724,
7787,
7788,
7812,
7813,
7920,
7921,
8009,
8010,
8046,
8047,
8157,
8158,
8279,
8280,
8298,
8299,
8347,
8348,
8418,
8419,
8462,
8463,
8472,
8473,
8641,
8642,
8707,
8708,
8942
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 8942,
"ccnet_original_nlines": 153,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.330296128988266,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.07630979269742966,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1845102459192276,
"rps_doc_frac_unique_words": 0.3504736125469208,
"rps_doc_mean_word_length": 4.732070446014404,
"rps_doc_num_sentences": 78,
"rps_doc_symbol_to_word_ratio": 0.0017084300052374601,
"rps_doc_unigram_entropy": 5.545735836029053,
"rps_doc_word_count": 1478,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.03445810824632645,
"rps_doc_frac_chars_dupe_6grams": 0.01715756021440029,
"rps_doc_frac_chars_dupe_7grams": 0.008006859570741653,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.018873320892453194,
"rps_doc_frac_chars_top_3gram": 0.0060051498003304005,
"rps_doc_frac_chars_top_4gram": 0.005147269926965237,
"rps_doc_books_importance": -647.77392578125,
"rps_doc_books_importance_length_correction": -647.77392578125,
"rps_doc_openwebtext_importance": -473.099609375,
"rps_doc_openwebtext_importance_length_correction": -473.099609375,
"rps_doc_wikipedia_importance": -316.6062927246094,
"rps_doc_wikipedia_importance_length_correction": -316.6062927246094
},
"fasttext": {
"dclm": 0.04061036929488182,
"english": 0.8631513714790344,
"fineweb_edu_approx": 2.024402379989624,
"eai_general_math": 0.22165024280548096,
"eai_open_web_math": 0.10364680737257004,
"eai_web_code": 0.7791959047317505
}
}
|
{
"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": "005.4",
"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": "-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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,766,054,233,867,065,000
|
Qlik Community
QlikView App Development
Discussion Board for collaboration related to QlikView App Development.
Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for
Search instead for
Did you mean:
Highlighted
Creator
Creator
Extract the multiple excel files with different sheetnames and different hearders
Hi All,
I need to extract the multiple excel file with different sheetNames and different headers.
Excel 1
Headers1,Headers2,Headers3,Headers4,Headers5 and sheetnames is Sheet1
Excel 2
Headers1,Headers2,Headers3,Headers4,Headers5 and sheetnames is Sheet1
Excel 3
Headers1,Headers3,Headers5 and sheetnames is Data
Excel 4
Headers1,Headers2,Headers3,Headers4,Headers5 and sheetnames is Sheet1
For the above scenario Excel 1, Excel 2 and Excel 4, Headers names and sheetNames are same
But Excel 3 doesn't have same headers and sheetName.
I am struck with the below code it is not executable please suggest me,
Let vPath = '.C:\Users\Pol\Desktop\Data\Xlsx';
for each vFile in FileList('$(vPath2)\*.Xlsx')
TableName:
load *,
'$(vFile)' as SourceFile
from [$(vFile)]
(ooxml, embedded labels);
Next
when running the above code it sows the error like :
Error.PNG
Thanks,
Srinivas
1 Reply
Highlighted
MVP
MVP
Re: Extract the multiple excel files with different sheetnames and different hearders
You can use a routine I developed two and a half years ago.
I have attached a working QlikView application for you along with an Excel workbook.
You can find some more explanation in this article: How to extract Sheet Names from an Excel XLSX-file without ODBC
The attached QlikView application has been modified so it illustrates how you can get the sheet names first and then iterate with a FOR NEXT loop to load the various sheets. I leave it to you to add an extra FOR NEXT loop to iterate through several Excel Workbook files.
|
{
"url": "https://community.qlik.com/t5/QlikView-App-Development/Extract-the-multiple-excel-files-with-different-sheetnames-and/m-p/129381",
"source_domain": "community.qlik.com",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "254519",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:K65L3VLD6RL4WHM3LEG5UDOC3WL4UIYN",
"WARC-Concurrent-To": "<urn:uuid:ff9dd307-ceeb-4065-9d08-f75ee9688678>",
"WARC-Date": "2020-08-12T12:57:08Z",
"WARC-IP-Address": "52.85.144.114",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:43EERYXBM2BQRNBHLU64OV5TVXEPJVN7",
"WARC-Record-ID": "<urn:uuid:d0da6576-178c-4ac4-bdaa-a3c69455642a>",
"WARC-Target-URI": "https://community.qlik.com/t5/QlikView-App-Development/Extract-the-multiple-excel-files-with-different-sheetnames-and/m-p/129381",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0dbc6144-c6a6-4d59-822f-70050f7a1c5d>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-25.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,
15,
16,
41,
42,
114,
115,
129,
229,
236,
257,
277,
292,
304,
312,
320,
321,
403,
404,
412,
413,
504,
505,
513,
514,
584,
585,
593,
594,
664,
665,
673,
674,
724,
725,
733,
734,
804,
805,
806,
897,
898,
951,
952,
1024,
1025,
1072,
1073,
1120,
1121,
1137,
1138,
1154,
1155,
1192,
1193,
1214,
1215,
1246,
1247,
1252,
1253,
1306,
1307,
1317,
1318,
1326,
1335,
1343,
1355,
1359,
1363,
1364,
1450,
1451,
1511,
1512,
1597,
1598,
1714,
1715
],
"line_end_idx": [
15,
16,
41,
42,
114,
115,
129,
229,
236,
257,
277,
292,
304,
312,
320,
321,
403,
404,
412,
413,
504,
505,
513,
514,
584,
585,
593,
594,
664,
665,
673,
674,
724,
725,
733,
734,
804,
805,
806,
897,
898,
951,
952,
1024,
1025,
1072,
1073,
1120,
1121,
1137,
1138,
1154,
1155,
1192,
1193,
1214,
1215,
1246,
1247,
1252,
1253,
1306,
1307,
1317,
1318,
1326,
1335,
1343,
1355,
1359,
1363,
1364,
1450,
1451,
1511,
1512,
1597,
1598,
1714,
1715,
1985
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1985,
"ccnet_original_nlines": 80,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3087431788444519,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04371584951877594,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17759563028812408,
"rps_doc_frac_unique_words": 0.5052264928817749,
"rps_doc_mean_word_length": 5.404181003570557,
"rps_doc_num_sentences": 11,
"rps_doc_symbol_to_word_ratio": 0.0027322398964315653,
"rps_doc_unigram_entropy": 4.623688220977783,
"rps_doc_word_count": 287,
"rps_doc_frac_chars_dupe_10grams": 0.09155383706092834,
"rps_doc_frac_chars_dupe_5grams": 0.23855577409267426,
"rps_doc_frac_chars_dupe_6grams": 0.1766602247953415,
"rps_doc_frac_chars_dupe_7grams": 0.09155383706092834,
"rps_doc_frac_chars_dupe_8grams": 0.09155383706092834,
"rps_doc_frac_chars_dupe_9grams": 0.09155383706092834,
"rps_doc_frac_chars_top_2gram": 0.04190845042467117,
"rps_doc_frac_chars_top_3gram": 0.03868471831083298,
"rps_doc_frac_chars_top_4gram": 0.04448743164539337,
"rps_doc_books_importance": -179.90248107910156,
"rps_doc_books_importance_length_correction": -179.90248107910156,
"rps_doc_openwebtext_importance": -109.38416290283203,
"rps_doc_openwebtext_importance_length_correction": -109.38416290283203,
"rps_doc_wikipedia_importance": -83.22882080078125,
"rps_doc_wikipedia_importance_length_correction": -83.22882080078125
},
"fasttext": {
"dclm": 0.05469990149140358,
"english": 0.8081591129302979,
"fineweb_edu_approx": 1.6273199319839478,
"eai_general_math": 0.02799922041594982,
"eai_open_web_math": 0.34820860624313354,
"eai_web_code": 0.0006548800156451762
}
}
|
{
"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.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": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,723,591,573,212,231,000
|
Questions tagged [caesar-cipher]
A very simple cipher in which the letters of the alphabet are substituted by a different letter that have a fixed distance to the original letter.
0
votes
3answers
32 views
CaesarCipher program that output a text file in java
I am trying to build a program that takes a text file, apply CaesarCipher method and returns and output file. import java.util.*; import java.io.*; class CaesarCipher { public static void main (...
1
vote
1answer
40 views
SQL Encrypt/Decrypt numbers
I wonder if that is possible in TSQL I know vigenere (cipher) encryption can encrypt values like "Hello, How are you" to become "Hfnlp, Jox crf aov" but the problem is that it keeps the numbers un-...
0
votes
1answer
33 views
Caesars Cipher in JavaScript - Why does 'A' turn into '[' here?
I'm currently going through a FreeCodeCamp challenge that requests you to create a ROT13 cipher (a very simple cipher that shifts each letter to be the letter 13 letters ahead of it in a never-ending ...
0
votes
0answers
22 views
How to find the shift number from a word and it's ciphered version in python?
So I'm currently stuck on this part of the challenge: If the command is decode, then the program should prompt for a string to decode and a plain-text word that appears in the text (decoded string). ...
0
votes
1answer
38 views
Caesar Cipher with capital letters
So currently my Caesar cipher program runs well whenever I use lowercase letters. I want it however to work when I input a word or phrase with uppercase. This is the code I have now. Hopefully y'all ...
-2
votes
1answer
29 views
Attempting to write a Caesar Cipher program - I am having a problem with the encryption method. [Java]
So for school I have to write a program that implements a Caesar Cipher. I was doing this and it was going well, however, the encryption method itself is not working out how I planned. For example, ...
0
votes
1answer
36 views
Adding a new list to a pre-defined list
I have a pre-defined list with two lists inside written as: passwords = [["yahoo","XqffoZeo"],["google","CoIushujSetu"]] Then I have a Caeser Cipher for encryption written as: encryptionKey = 16 ...
0
votes
1answer
25 views
Circular shift cipher
I have written a circular shift cipher for key -1 billion to +1 billion for encrypting messages of maximum 200 characters including 0 to 9, a to z and A to Z. #include <stdio.h> #include <...
0
votes
1answer
46 views
Caesar cipher : how to calculate with shifting value > 10 ( or larger )?
As i know , the " formula " of Caesar Shifting is (x + k ) % 26 , where k is the shifting value and decryption just replace " + " to " - ". but my code does not work when k > 10 (after i tested k = ...
0
votes
1answer
59 views
Python: AttributeError: 'int' object has no attribute 'isalpha'
I'm looking to create a Caesar's Cipher function in python using client/server. The client sends a message with a key and the server encrypts it. Server Code: import socket def getCaesar(message, ...
1
vote
1answer
36 views
Coverting java code to php with AES and Cipher
I am finding it difficult to convert a piece of code to php from java. I searched on the internet about the meaning of each line of code written in my java code example but I didn't find any. I want ...
0
votes
2answers
44 views
It's about implementing the Caesar-cipher code to encrypt the input given by the user
The code takes input(the string) to be encoded and a key from the user such that when the key is added to the input the input is increased by the amount of the given key . For ex. if the key is 2, so ...
0
votes
0answers
37 views
How to include punctuation and white space in Vigenere Cipher [Python]
I am trying to do a Vigenere Cipher decrypter. The message gets decrypted with the current code that I have written. However, it does not take punctuation and whitespace into consideration. How do I ...
1
vote
2answers
59 views
Cipher/Decipher Python Beginner Program
Question: Can someone edit my 2 lines of code? Just wanted to point out that this is for a school assignment so I don't want to post all my code to prevent copy/plagiarism issues. Since I'm only ...
0
votes
0answers
49 views
How do I fix my Caesar cipher codes for loop statement for encryption?
I'm trying to make a basic caesar cipher in Visual Basic 2010 Express (Console Application) but whenever it encrypts the string it correctly encrypts the first character and replaces all the others ...
-2
votes
1answer
184 views
Caesar cipher with all Unicode printable characters
I want to create a Caesar cipher that can encode/decode unicode printable characters (single- and multi codepoint grapheme clusters, emojis ect.) from the whole of Unicode (except the private use area)...
0
votes
1answer
31 views
Problems with Caesar Cipher Formula involving ASCII Conversion
After using the modifications from my last question, I ran into another problem using the formula for using a Caesar cipher: if letter x and shift n: En(x) = (x + n) mod. 26; However when I tried ...
0
votes
0answers
18 views
Does running aes_encrypt function within the query will let the server use lots of resources?
Is using the following will make my server have hard time, specially when I have 25 users adding simultaneously to my database: INSERT INTO patient(id, name, address) VALUES (1, aes_encrypt($name), ...
0
votes
2answers
45 views
How to leave punctuation unchanged in Caesar Cipher? - Python
I'm having trouble trying to leave the punctuation unchanged while encrypting or decrypting a message # encryption message = input("Enter a message to be encrypted: ") # user inputs message to be ...
0
votes
1answer
37 views
How to define textbox input as a string in JavaScript?
This is for a science project, which is due in a few months. Im a complete beginner and I really don't know whats wrong with this simple Caesar cipher program. Im using ascii to convert the characters ...
0
votes
3answers
30 views
How to include white space and n\ in this code
I'm making a caesar cipher program. I import a txt file, but all comes out as one big sentence. How do I get the spaces and new lines in there? with open("output.txt", "r") as results: data = ...
1
vote
3answers
57 views
Print Caesar Shift in C is printing the entered text of HELLO
I am trying to perform a Caesar cipher from text from user using modulo operation with the ascii characters. But, my code simply prints the entered test. For example, when the text entered is HELLO ...
1
vote
5answers
94 views
How can I replace multiple letters at the same time for Caesar cipher?
I'm currently working on a program that encrypts (using Caesar cipher) a user input string by replacing specific letters with custom preset letters. For instance A = R, B = T, C = O, etc. The ...
2
votes
1answer
36 views
Not getting output to file
Im trying to make a program that takes input and saves it to a file. Afterwards, I'd like for the information that's in the document to be encrypted using caesar shift with 6 shifts. Then I'd like to ...
-6
votes
1answer
73 views
Caesar Cipher not counting correctly C code
I need help with a cipher code. I have everything working fine until i run into the program needing to shift back to 'a' after it hits 'z'. I'm not sure how to approach this so any input is helpful. ...
0
votes
2answers
78 views
Caesar Cipher in C adds extra characters to 2d string array
I have seen similar answers on stack overflow, but none had the same problem as I do. My problem with this simple caesar cipher encryption function is that for the position [2] of my encrypted array (...
0
votes
1answer
18 views
how to change the character to the one before it using ascii
I have a problem in my code. It needs to change every character to the character before it. The problem here is that for the file: uif xiffmt po uif cvt hp spvoe boe spvoe uif xiffmt po uif cvt hp ...
-1
votes
2answers
33 views
How do I define an array of Strings using a method?
I wrote a method to encrypt messages (using CaesarCipher) and I want to use that method to encrypt one message with all possible 26 keys. So I want to iterate over each String array to define it. ...
0
votes
2answers
67 views
Spaces in caesar cipher in C
This code must encrypt all lowercase letters and show error messages if the input is anything but lowercase. If Key is zero, then the input will be reversed. It works good, but when it comes to ...
2
votes
0answers
88 views
Encrypting a word document changes the last byte
So I'm trying to encrypt / decrypt a word document using a Caesar cipher shift. My Caesar class works for images(.png) and (.txt) documents. However when I encrypt a word document (.docx) and decrypt ...
0
votes
1answer
28 views
Find end of characters in a string
I'm writing a caesar cipher, which shifts the value of each char in an array by a set amount. The issue I'm having is that the char values after my string are being shifted as well. I'm hoping to ...
1
vote
2answers
38 views
Caesar Cipher Encrypt, can't print final message
def message(): answer1 = input('Welcome to the Caesar Cipher! What do you want to encrypt?') key = input('Enter the key number that you want to encrypt with. (1 - 26)') def getMessage(): ...
0
votes
1answer
173 views
Caesar Cipher Frequency Analysis in Java
Caesar Cipher using Frequency Analysis** in Java: this is my code for the decode part: public static String decode (String code){ int key=0; final int ALPHABET_SIZE = 26; int[] freqs = ...
0
votes
3answers
103 views
Hashtable Lookup
The code below creates a hash table containing a reversed cipher. I am trying to preform a lookup on the hash table, and return the results. I am trying to decrypt the content inside of an XML file ...
2
votes
1answer
109 views
How to advance string 3 letters in the alphabet (Caesar cipher)?
I'm trying to make a program that encrypts a string the user submits. I want to use an encryption technique where the string is advanced 3 letters in the alphabet. Example: abc would become def. ...
0
votes
0answers
29 views
Python Caesar cipher: How to continue?
I have to finish and upgrade this code. It deals with a Caesar cipher, with a key to find the encrypted word. Here is the program, if you can help me with like tell me what to add or anything. (Sorry ...
-1
votes
2answers
48 views
C Caesar Cipher Function Call Not Behaving as Expected
I am trying to build a program that will do a simple caesar cipher on a text file with single strings with no spaces on each line. For some reason, my cipher function is not shifting text and I am ...
-3
votes
1answer
64 views
Searching item in a table in haskell [duplicate]
I am currently working in an exercise to make a caesar cipher, but for to finish that i need to find items in a table. It's a table which is offset to right by 3 elements. There is my table: table :...
0
votes
2answers
68 views
How do I put all those indexes to a char Array?
I can't find a way to be to able to put the encryptedChar to a char Array so that I can out put the message on one line. If anyone could give me a simple solution to the problem or help me in any way ...
1
vote
2answers
89 views
Issues with Caesar cipher
I have got a problem with decrypting a Caesar cipher in C#. We have to do it manually, encrypt and decrypt. I want it to write all possibilities shifting one by one (then it is easy to see the right ...
0
votes
0answers
16 views
When I run, I get the Type Error that the code is missing one positional argument “letter.” How do I resolve?
I've tried adding another function to call the text in the app. I've tried changing the variable lower_letter=letter.lower to letter=letter.lower and making letter the return object. The way the ...
1
vote
2answers
70 views
Caesar Cipher code only Ciphers one letter not entire string
So I'm in the middle of making a simple Caesar cipher for practice and I can't get it to decipher entire strings, just individual letters. symbol_add is the function in question. Here's the code: ...
-2
votes
1answer
36 views
Caesar Shift Decoder in python
I can't figure out what I'm doing wrong here. The shift works flawlessly excpet for it skips the first letter in the cipher code. What gives? It should translate to WELCOMETOCRYPTOGRAPHY but does ...
0
votes
1answer
84 views
Encrypting text with cesar cipher, str.replace gives TypeError: Can't convert 'NoneType' object to str implicitly
cipher.py: import argparse def parse_command_line(): parser=argparse.ArgumentParser() parser.add_argument("infile",type=str,help="input file to be encrypted or decrypted") parser....
1
vote
1answer
49 views
Single character mismatch in Caesar Cipher: Python
Essentially, the alphabets in the input string are cyclically rotated by k and the rest of the characters retains their form. I'm puzzled by a mismatch. For my code: import math import os import ...
0
votes
0answers
52 views
Caesar Cipher Java Module
I've been trying to make a caesar cipher module in java but for some reason the code doesn't seem to work. If I take out the if statements for checking if their ASCII number plus the key would be ...
0
votes
1answer
40 views
Java Caesar Shift Character Print Failure
I am trying to work on a very basic program (that I will later add to) to perform a Caesar Shift on user entered text. I have a lot of it working, but when I am trying to print out the "encrypted" ...
-1
votes
1answer
64 views
Caesar Cypher Uppercase Letter in python
I'm trying to code the Caesar Cypher but it's only working on lowercase letters and I'm trying to make it print back original capitalizations. def encrypt(message, key): alphabet_lower = ["a","b",...
-1
votes
1answer
52 views
I have written this ceaser cipher program in c,but everytime i run it it crashes
I have written this caesar cipher program in c language,it runs fine until I provide the integer value for key but after that it crashes. can anyone please correct this code? #include <stdio.h> ...
0
votes
0answers
28 views
Why does getline skip? [duplicate]
Ok for the past few days I have been working on my caesar cipher software and it is almost great except for a few issues. This is the encryption part of the software: E.cpp #include<iostream> ...
|
{
"url": "https://stackoverflow.com/questions/tagged/caesar-cipher",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2019-13",
"warc_metadata": {
"Content-Length": "212645",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DYOID5LXA4EYRWMINH2OWHIB2HOUSODY",
"WARC-Concurrent-To": "<urn:uuid:572c7636-8b4a-433b-aa32-540daaf7262d>",
"WARC-Date": "2019-03-23T14:06:11Z",
"WARC-IP-Address": "151.101.193.69",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:W77D6Z3S5GG5ZTKJ2PJUSQC2P5HICS3T",
"WARC-Record-ID": "<urn:uuid:d79dd4bf-6e4b-487c-af5b-7ea7828b5d20>",
"WARC-Target-URI": "https://stackoverflow.com/questions/tagged/caesar-cipher",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8c9a3f78-e92c-44f6-832b-95168aa30b5a>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-146-23-210.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,
33,
34,
181,
182,
184,
190,
199,
208,
209,
262,
263,
461,
463,
468,
476,
485,
486,
514,
515,
716,
718,
724,
732,
741,
742,
806,
807,
1011,
1013,
1019,
1028,
1037,
1038,
1116,
1117,
1320,
1322,
1328,
1336,
1345,
1346,
1381,
1382,
1585,
1588,
1594,
1602,
1611,
1612,
1715,
1716,
1918,
1920,
1926,
1934,
1943,
1944,
1984,
1985,
2184,
2186,
2192,
2200,
2209,
2210,
2232,
2233,
2425,
2427,
2433,
2441,
2450,
2451,
2524,
2525,
2727,
2729,
2735,
2743,
2752,
2753,
2817,
2818,
3018,
3020,
3025,
3033,
3042,
3043,
3090,
3091,
3294,
3296,
3302,
3311,
3320,
3321,
3407,
3408,
3612,
3614,
3620,
3629,
3638,
3639,
3710,
3711,
3914,
3916,
3921,
3930,
3939,
3940,
3980,
3981,
4180,
4182,
4188,
4197,
4206,
4207,
4278,
4279,
4481,
4484,
4490,
4498,
4508,
4509,
4561,
4562,
4767,
4769,
4775,
4783,
4792,
4793,
4856,
4857,
5057,
5059,
5065,
5074,
5083,
5084,
5178,
5179,
5381,
5383,
5389,
5398,
5407,
5408,
5470,
5471,
5671,
5673,
5679,
5687,
5696,
5697,
5752,
5753,
5958,
5960,
5966,
5975,
5984,
5985,
6032,
6033,
6229,
6231,
6236,
6245,
6254,
6255,
6317,
6318,
6520,
6522,
6527,
6536,
6545,
6546,
6617,
6618,
6814,
6816,
6822,
6830,
6839,
6840,
6867,
6868,
7072,
7075,
7081,
7089,
7098,
7099,
7143,
7144,
7347,
7349,
7355,
7364,
7373,
7374,
7434,
7435,
7639,
7641,
7647,
7655,
7664,
7665,
7726,
7727,
7928,
7931,
7937,
7946,
7955,
7956,
8008,
8009,
8209,
8211,
8217,
8226,
8235,
8236,
8265,
8266,
8464,
8466,
8472,
8481,
8490,
8491,
8540,
8541,
8745,
8747,
8753,
8761,
8770,
8771,
8806,
8807,
9007,
9009,
9014,
9023,
9032,
9033,
9082,
9083,
9274,
9276,
9282,
9290,
9300,
9301,
9342,
9343,
9532,
9534,
9540,
9549,
9559,
9560,
9577,
9578,
9780,
9782,
9788,
9796,
9806,
9807,
9872,
9873,
10072,
10074,
10080,
10089,
10098,
10099,
10138,
10139,
10343,
10346,
10352,
10361,
10370,
10371,
10426,
10427,
10628,
10631,
10637,
10645,
10654,
10655,
10704,
10705,
10907,
10909,
10915,
10924,
10933,
10934,
10982,
10983,
11187,
11189,
11194,
11203,
11212,
11213,
11239,
11240,
11443,
11445,
11451,
11460,
11469,
11470,
11580,
11581,
11780,
11782,
11787,
11796,
11805,
11806,
11867,
11868,
12068,
12071,
12077,
12085,
12094,
12095,
12126,
12127,
12327,
12329,
12335,
12343,
12352,
12353,
12467,
12468,
12651,
12653,
12658,
12666,
12675,
12676,
12727,
12728,
12927,
12929,
12935,
12944,
12953,
12954,
12980,
12981,
13181,
13183,
13189,
13197,
13206,
13207,
13249,
13250,
13451,
13454,
13460,
13468,
13477,
13478,
13519,
13520,
13720,
13723,
13729,
13737,
13746,
13747,
13828,
13829,
14027,
14029,
14035,
14044,
14053,
14054,
14089,
14090
],
"line_end_idx": [
33,
34,
181,
182,
184,
190,
199,
208,
209,
262,
263,
461,
463,
468,
476,
485,
486,
514,
515,
716,
718,
724,
732,
741,
742,
806,
807,
1011,
1013,
1019,
1028,
1037,
1038,
1116,
1117,
1320,
1322,
1328,
1336,
1345,
1346,
1381,
1382,
1585,
1588,
1594,
1602,
1611,
1612,
1715,
1716,
1918,
1920,
1926,
1934,
1943,
1944,
1984,
1985,
2184,
2186,
2192,
2200,
2209,
2210,
2232,
2233,
2425,
2427,
2433,
2441,
2450,
2451,
2524,
2525,
2727,
2729,
2735,
2743,
2752,
2753,
2817,
2818,
3018,
3020,
3025,
3033,
3042,
3043,
3090,
3091,
3294,
3296,
3302,
3311,
3320,
3321,
3407,
3408,
3612,
3614,
3620,
3629,
3638,
3639,
3710,
3711,
3914,
3916,
3921,
3930,
3939,
3940,
3980,
3981,
4180,
4182,
4188,
4197,
4206,
4207,
4278,
4279,
4481,
4484,
4490,
4498,
4508,
4509,
4561,
4562,
4767,
4769,
4775,
4783,
4792,
4793,
4856,
4857,
5057,
5059,
5065,
5074,
5083,
5084,
5178,
5179,
5381,
5383,
5389,
5398,
5407,
5408,
5470,
5471,
5671,
5673,
5679,
5687,
5696,
5697,
5752,
5753,
5958,
5960,
5966,
5975,
5984,
5985,
6032,
6033,
6229,
6231,
6236,
6245,
6254,
6255,
6317,
6318,
6520,
6522,
6527,
6536,
6545,
6546,
6617,
6618,
6814,
6816,
6822,
6830,
6839,
6840,
6867,
6868,
7072,
7075,
7081,
7089,
7098,
7099,
7143,
7144,
7347,
7349,
7355,
7364,
7373,
7374,
7434,
7435,
7639,
7641,
7647,
7655,
7664,
7665,
7726,
7727,
7928,
7931,
7937,
7946,
7955,
7956,
8008,
8009,
8209,
8211,
8217,
8226,
8235,
8236,
8265,
8266,
8464,
8466,
8472,
8481,
8490,
8491,
8540,
8541,
8745,
8747,
8753,
8761,
8770,
8771,
8806,
8807,
9007,
9009,
9014,
9023,
9032,
9033,
9082,
9083,
9274,
9276,
9282,
9290,
9300,
9301,
9342,
9343,
9532,
9534,
9540,
9549,
9559,
9560,
9577,
9578,
9780,
9782,
9788,
9796,
9806,
9807,
9872,
9873,
10072,
10074,
10080,
10089,
10098,
10099,
10138,
10139,
10343,
10346,
10352,
10361,
10370,
10371,
10426,
10427,
10628,
10631,
10637,
10645,
10654,
10655,
10704,
10705,
10907,
10909,
10915,
10924,
10933,
10934,
10982,
10983,
11187,
11189,
11194,
11203,
11212,
11213,
11239,
11240,
11443,
11445,
11451,
11460,
11469,
11470,
11580,
11581,
11780,
11782,
11787,
11796,
11805,
11806,
11867,
11868,
12068,
12071,
12077,
12085,
12094,
12095,
12126,
12127,
12327,
12329,
12335,
12343,
12352,
12353,
12467,
12468,
12651,
12653,
12658,
12666,
12675,
12676,
12727,
12728,
12927,
12929,
12935,
12944,
12953,
12954,
12980,
12981,
13181,
13183,
13189,
13197,
13206,
13207,
13249,
13250,
13451,
13454,
13460,
13468,
13477,
13478,
13519,
13520,
13720,
13723,
13729,
13737,
13746,
13747,
13828,
13829,
14027,
14029,
14035,
14044,
14053,
14054,
14089,
14090,
14285
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 14285,
"ccnet_original_nlines": 403,
"rps_doc_curly_bracket": 0.00014001000090502203,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3512082099914551,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04071500152349472,
"rps_doc_frac_lines_end_with_ellipsis": 0.12376237660646439,
"rps_doc_frac_no_alph_words": 0.1906653344631195,
"rps_doc_frac_unique_words": 0.26370969414711,
"rps_doc_mean_word_length": 4.430644989013672,
"rps_doc_num_sentences": 159,
"rps_doc_symbol_to_word_ratio": 0.018867919221520424,
"rps_doc_unigram_entropy": 5.4867353439331055,
"rps_doc_word_count": 2480,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.03412814065814018,
"rps_doc_frac_chars_dupe_6grams": 0.013287220150232315,
"rps_doc_frac_chars_dupe_7grams": 0.00982889998704195,
"rps_doc_frac_chars_dupe_8grams": 0.005096470005810261,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.045868221670389175,
"rps_doc_frac_chars_top_3gram": 0.01538040954619646,
"rps_doc_frac_chars_top_4gram": 0.008008739911019802,
"rps_doc_books_importance": -1534.133544921875,
"rps_doc_books_importance_length_correction": -1534.133544921875,
"rps_doc_openwebtext_importance": -894.8665161132812,
"rps_doc_openwebtext_importance_length_correction": -894.8665161132812,
"rps_doc_wikipedia_importance": -636.8863525390625,
"rps_doc_wikipedia_importance_length_correction": -636.8863525390625
},
"fasttext": {
"dclm": 0.6913028359413147,
"english": 0.9061824679374695,
"fineweb_edu_approx": 1.6127150058746338,
"eai_general_math": 0.17557686567306519,
"eai_open_web_math": 0.14986681938171387,
"eai_web_code": 0.031303051859140396
}
}
|
{
"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": "003.54",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "System theory"
}
}
},
"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": "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": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,642,377,914,961,885,000
|
COIN-OR::LEMON - Graph Library
source: lemon-0.x/lemon/lemon_reader.h @ 2390:8450951a8e2d
Last change on this file since 2390:8450951a8e2d was 2386:81b47fc5c444, checked in by Balazs Dezso, 13 years ago
Hard Warning checking
• based on the remark of the ZIB user
• we do not use -Winline
File size: 69.9 KB
Line
1/* -*- C++ -*-
2 *
3 * This file is a part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 *
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
12 *
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
15 * purpose.
16 *
17 */
18
19///\ingroup lemon_io
20///\file
21///\brief Lemon Format reader.
22
23
24#ifndef LEMON_LEMON_READER_H
25#define LEMON_LEMON_READER_H
26
27
28#include <iostream>
29#include <fstream>
30#include <string>
31#include <vector>
32#include <algorithm>
33#include <map>
34#include <memory>
35
36#include <lemon/error.h>
37#include <lemon/graph_utils.h>
38#include <lemon/bits/utility.h>
39#include <lemon/bits/item_reader.h>
40
41#include <lemon/dim2.h>
42
43#include <lemon/concept_check.h>
44#include <lemon/concepts/maps.h>
45
46namespace lemon {
47
48 namespace _reader_bits {
49
50 template <typename T>
51 bool operator<(T, T) {
52 throw DataFormatError("Label is not comparable");
53 }
54
55 template <typename T>
56 struct Less {
57 bool operator()(const T& p, const T& q) const {
58 return p < q;
59 }
60 };
61
62 template <typename Item>
63 class ItemLabelReader {
64 public:
65
66 bool isLabelReader() { return true; }
67
68 void readLabel(std::istream&, Item&) {}
69
70 template <class _ItemLabelReader>
71 struct Constraints {
72 void constraints() {
73 bool b = reader.isLabelReader();
74 ignore_unused_variable_warning(b);
75 Item item;
76 reader.readLabel(is, item);
77 }
78 _ItemLabelReader& reader;
79 std::istream& is;
80 };
81
82 };
83
84 template <typename Item>
85 class ItemReader {
86 public:
87 void read(std::istream&, Item&) {}
88
89 template <class _ItemReader>
90 struct Constraints {
91 void constraints() {
92 Item item;
93 reader.read(is, item);
94 }
95 _ItemReader& reader;
96 std::istream& is;
97 };
98
99 };
100
101 template <typename Map>
102 struct Ref { typedef Map& Type; };
103 template <typename Map>
104 struct Arg { typedef Map& Type; };
105
106 template <typename Graph, typename Map>
107 class ForwardComposeMap {
108 public:
109 typedef typename Graph::UEdge Key;
110 typedef typename Map::Value Value;
111
112 ForwardComposeMap(const Graph& _graph, typename Arg<Map>::Type _map)
113 : graph(_graph), map(_map) {}
114
115 void set(const Key& key, const Value& val) {
116 map.set(graph.direct(key, true), val);
117 }
118
119 private:
120 const Graph& graph;
121 typename Ref<Map>::Type map;
122 };
123
124 template <typename Graph, typename Map>
125 ForwardComposeMap<Graph, Map>
126 forwardComposeMap(const Graph& graph, const Map& map) {
127 return ForwardComposeMap<Graph, Map>(graph, map);
128 }
129
130 template <typename Graph, typename Map>
131 ForwardComposeMap<Graph, Map>
132 forwardComposeMap(const Graph& graph, Map& map) {
133 return ForwardComposeMap<Graph, Map>(graph, map);
134 }
135
136 template <typename Graph, typename Map>
137 class BackwardComposeMap {
138 public:
139 typedef typename Graph::UEdge Key;
140 typedef typename Map::Value Value;
141
142 BackwardComposeMap(const Graph& _graph, typename Arg<Map>::Type _map)
143 : graph(_graph), map(_map) {}
144
145 void set(const Key& key, const Value& val) {
146 map.set(graph.direct(key, false), val);
147 }
148
149 private:
150 const Graph& graph;
151 typename Ref<Map>::Type map;
152 };
153
154
155 template <typename Graph, typename Map>
156 BackwardComposeMap<Graph, Map>
157 backwardComposeMap(const Graph& graph, const Map& map) {
158 return BackwardComposeMap<Graph, Map>(graph, map);
159 }
160
161 template <typename Graph, typename Map>
162 BackwardComposeMap<Graph, Map>
163 backwardComposeMap(const Graph& graph, Map& map) {
164 return BackwardComposeMap<Graph, Map>(graph, map);
165 }
166
167 template <typename Graph, typename Map>
168 struct Ref<ForwardComposeMap<Graph, Map> > {
169 typedef ForwardComposeMap<Graph, Map> Type;
170 };
171 template <typename Graph, typename Map>
172 struct Arg<ForwardComposeMap<Graph, Map> > {
173 typedef const ForwardComposeMap<Graph, Map>& Type;
174 };
175
176 template <typename Graph, typename Map>
177 struct Ref<BackwardComposeMap<Graph, Map> > {
178 typedef BackwardComposeMap<Graph, Map> Type;
179 };
180 template <typename Graph, typename Map>
181 struct Arg<BackwardComposeMap<Graph, Map> > {
182 typedef const BackwardComposeMap<Graph, Map>& Type;
183 };
184
185 template <typename Map>
186 struct Ref<dim2::XMap<Map> > {
187 typedef dim2::XMap<Map> Type;
188 };
189 template <typename Map>
190 struct Arg<dim2::XMap<Map> > {
191 typedef const dim2::XMap<Map>& Type;
192 };
193
194 template <typename Map>
195 struct Ref<dim2::YMap<Map> > {
196 typedef dim2::YMap<Map> Type;
197 };
198 template <typename Map>
199 struct Arg<dim2::YMap<Map> > {
200 typedef const dim2::YMap<Map>& Type;
201 };
202
203
204 template <typename _Item>
205 class MapReaderBase;
206
207 template <typename _Item>
208 class MapInverterBase : public MapReaderBase<_Item> {
209 public:
210 typedef _Item Item;
211 virtual void read(std::istream&, const Item&) = 0;
212 virtual Item read(std::istream&) const = 0;
213
214 virtual MapInverterBase<_Item>* getInverter() {
215 return this;
216 }
217 };
218
219 template <typename _Item, typename _Map, typename _Reader>
220 class MapReaderInverter : public MapInverterBase<_Item> {
221 public:
222 typedef _Item Item;
223 typedef _Reader Reader;
224 typedef typename Reader::Value Value;
225 typedef _Map Map;
226 typedef std::map<Value, Item, _reader_bits::Less<Value> > Inverse;
227
228 typename _reader_bits::Ref<Map>::Type map;
229 Reader reader;
230 Inverse inverse;
231
232 MapReaderInverter(typename _reader_bits::Arg<Map>::Type _map,
233 const Reader& _reader)
234 : map(_map), reader(_reader) {}
235
236 virtual ~MapReaderInverter() {}
237
238 virtual void read(std::istream& is, const Item& item) {
239 Value value;
240 reader.read(is, value);
241 map.set(item, value);
242 typename Inverse::iterator it = inverse.find(value);
243 if (it == inverse.end()) {
244 inverse.insert(std::make_pair(value, item));
245 } else {
246 throw DataFormatError("Multiple label occurence");
247 }
248 }
249
250 virtual Item read(std::istream& is) const {
251 Value value;
252 reader.read(is, value);
253 typename Inverse::const_iterator it = inverse.find(value);
254 if (it != inverse.end()) {
255 return it->second;
256 } else {
257 throw DataFormatError("Invalid label error");
258 }
259 }
260 };
261
262 template <typename _Item, typename _Reader>
263 class SkipReaderInverter : public MapInverterBase<_Item> {
264 public:
265 typedef _Item Item;
266 typedef _Reader Reader;
267 typedef typename Reader::Value Value;
268 typedef std::map<Value, Item, _reader_bits::Less<Value> > Inverse;
269
270 Reader reader;
271
272 SkipReaderInverter(const Reader& _reader)
273 : reader(_reader) {}
274
275 virtual ~SkipReaderInverter() {}
276
277 virtual void read(std::istream& is, const Item& item) {
278 Value value;
279 reader.read(is, value);
280 typename Inverse::iterator it = inverse.find(value);
281 if (it == inverse.end()) {
282 inverse.insert(std::make_pair(value, item));
283 } else {
284 throw DataFormatError("Multiple label occurence error");
285 }
286 }
287
288 virtual Item read(std::istream& is) const {
289 Value value;
290 reader.read(is, value);
291 typename Inverse::const_iterator it = inverse.find(value);
292 if (it != inverse.end()) {
293 return it->second;
294 } else {
295 throw DataFormatError("Invalid label error");
296 }
297 }
298
299 private:
300 Inverse inverse;
301 };
302
303 template <typename _Item>
304 class MapReaderBase {
305 public:
306 typedef _Item Item;
307
308 MapReaderBase() { _touched = false; }
309
310 void touch() { _touched = true; }
311 bool touched() const { return _touched; }
312
313 virtual ~MapReaderBase() {}
314
315 virtual void read(std::istream& is, const Item& item) = 0;
316 virtual MapInverterBase<_Item>* getInverter() = 0;
317
318 private:
319 bool _touched;
320
321 };
322
323 template <typename _Item, typename _Map, typename _Reader>
324 class MapReader : public MapReaderBase<_Item> {
325 public:
326 typedef _Map Map;
327 typedef _Reader Reader;
328 typedef typename Reader::Value Value;
329 typedef _Item Item;
330
331 typename _reader_bits::Ref<Map>::Type map;
332 Reader reader;
333
334 MapReader(typename _reader_bits::Arg<Map>::Type _map,
335 const Reader& _reader)
336 : map(_map), reader(_reader) {}
337
338 virtual ~MapReader() {}
339
340 virtual void read(std::istream& is, const Item& item) {
341 Value value;
342 reader.read(is, value);
343 map.set(item, value);
344 }
345
346 virtual MapInverterBase<_Item>* getInverter() {
347 return new MapReaderInverter<Item, Map, Reader>(map, reader);
348 }
349 };
350
351
352 template <typename _Item, typename _Reader>
353 class SkipReader : public MapReaderBase<_Item> {
354 public:
355 typedef _Reader Reader;
356 typedef typename Reader::Value Value;
357 typedef _Item Item;
358
359 Reader reader;
360 SkipReader(const Reader& _reader) : reader(_reader) {}
361
362 virtual ~SkipReader() {}
363
364 virtual void read(std::istream& is, const Item&) {
365 Value value;
366 reader.read(is, value);
367 }
368
369 virtual MapInverterBase<Item>* getInverter() {
370 return new SkipReaderInverter<Item, Reader>(reader);
371 }
372 };
373
374 template <typename _Item>
375 class LabelReaderBase {
376 public:
377 typedef _Item Item;
378 virtual ~LabelReaderBase() {}
379 virtual Item read(std::istream& is) const = 0;
380 virtual bool isLabelReader() const = 0;
381 };
382
383 template <typename _Item, typename _BoxedLabelReader>
384 class LabelReader : public LabelReaderBase<_Item> {
385 public:
386 typedef _Item Item;
387 typedef _BoxedLabelReader BoxedLabelReader;
388
389 const BoxedLabelReader& boxedLabelReader;
390
391 LabelReader(const BoxedLabelReader& _boxedLabelReader)
392 : boxedLabelReader(_boxedLabelReader) {}
393
394 virtual Item read(std::istream& is) const {
395 Item item;
396 boxedLabelReader.readLabel(is, item);
397 return item;
398 }
399
400 virtual bool isLabelReader() const {
401 return boxedLabelReader.isLabelReader();
402 }
403 };
404
405 template <typename _Item>
406 class ItemStore {
407 public:
408
409 typedef _Item Item;
410
411 ItemStore(Item& _item) : item(&_item) {
412 _touched = false;
413 }
414
415 void touch() { _touched = true; }
416 bool touched() const { return _touched; }
417
418 void read(const Item& _item) {
419 *item = _item;
420 }
421
422 private:
423 Item* item;
424 bool _touched;
425 };
426
427 class ValueReaderBase {
428 public:
429 virtual void read(std::istream&) {};
430 ValueReaderBase() { _touched = false; }
431
432 void touch() { _touched = true; }
433 bool touched() const { return _touched; }
434
435 virtual ~ValueReaderBase() {}
436 private:
437 bool _touched;
438 };
439
440 template <typename _Value, typename _Reader>
441 class ValueReader : public ValueReaderBase {
442 public:
443 typedef _Value Value;
444 typedef _Reader Reader;
445
446 ValueReader(Value& _value, const Reader& _reader)
447 : value(_value), reader(_reader) {}
448
449 virtual void read(std::istream& is) {
450 reader.read(is, value);
451 }
452 private:
453 Value& value;
454 Reader reader;
455 };
456
457 }
458
459 /// \ingroup lemon_io
460 /// \brief Lemon Format reader class.
461 ///
462 /// The Lemon Format contains several sections. We do not want to
463 /// determine what sections are in a lemon file we give only a framework
464 /// to read a section oriented format.
465 ///
466 /// In the Lemon Format each section starts with a line containing a
467 /// \c \@ character on the first not white space position. This line
468 /// is the header line of the section. Each of the next lines belong
469 /// to this section until a line starting with \c \@ character is
470 /// found. This line can start a new section or it can close the
471 /// file with the \c \@end line. The file format ignores the empty
472 /// and comment lines. The line is comment line if it starts with a
473 /// \c # character.
474 ///
475 /// The framework provides an abstract LemonReader::SectionReader class
476 /// that defines the interface of a SectionReader. The SectionReader
477 /// has the \c header() member function that gets a header line string and
478 /// decides if it wants to process the next section. Several SectionReaders
479 /// can be attached to a LemonReader and the first attached that can
480 /// process the section will be used. Its \c read() member will be called
481 /// with a stream containing the section. From this stream the empty and
482 /// comment lines are filtered out.
483 ///
484 /// \relates GraphReader
485 /// \relates NodeSetReader
486 /// \relates EdgeSetReader
487 /// \relates NodesReader
488 /// \relates EdgesReader
489 /// \relates AttributeReader
490 class LemonReader {
491 private:
492
493 class FilterStreamBuf : public std::streambuf {
494 public:
495
496 typedef std::streambuf Parent;
497 typedef Parent::char_type char_type;
498 FilterStreamBuf(std::istream& is, int& num)
499 : _is(is), _base(0), _eptr(0),
500 _num(num), skip_state(after_endl) {}
501
502 protected:
503
504 enum skip_state_type {
505 no_skip,
506 after_endl,
507 comment_line
508 };
509
510 char_type small_buf[1];
511
512
513 std::istream& _is;
514
515 char_type* _base;
516 char_type* _eptr;
517
518 int& _num;
519
520 skip_state_type skip_state;
521
522
523 char_type* base() { return _base; }
524
525 char_type* eptr() { return _eptr; }
526
527 int_type blen() { return _eptr - _base; }
528
529 void setb(char_type* buf, int_type len) {
530 _base = buf;
531 _eptr = buf + len;
532 }
533
534 virtual std::streambuf* setbuf(char *buf, std::streamsize len) {
535 if (base()) return 0;
536 if (buf != 0 && len >= int(sizeof(small_buf))) {
537 setb(buf, len);
538 } else {
539 setb(small_buf, sizeof(small_buf));
540 }
541 setg(0, 0, 0);
542 return this;
543 }
544
545 bool put_char(char c) {
546 switch (skip_state) {
547 case no_skip:
548 switch (c) {
549 case '\n':
550 skip_state = after_endl;
551 return true;
552 default:
553 return true;
554 }
555 case after_endl:
556 switch (c) {
557 case '@':
558 return false;
559 case '\n':
560 return false;
561 case '#':
562 skip_state = comment_line;
563 return false;
564 default:
565 if (!isspace(c)) {
566 skip_state = no_skip;
567 return true;
568 } else {
569 return false;
570 }
571 }
572 break;
573 case comment_line:
574 switch (c) {
575 case '\n':
576 skip_state = after_endl;
577 return false;
578 default:
579 return false;
580 }
581 }
582 return false;
583 }
584
585 virtual int_type underflow() {
586 char c;
587 if (_is.read(&c, 1)) {
588 _is.putback(c);
589 if (c == '@') {
590 return EOF;
591 }
592 } else {
593 return EOF;
594 }
595 char_type *ptr;
596 for (ptr = base(); ptr != eptr(); ++ptr) {
597 if (_is.read(&c, 1)) {
598 if (c == '\n') ++_num;
599 if (put_char(c)) {
600 *ptr = c;
601 } else {
602 if (skip_state == after_endl && c == '@') {
603 _is.putback('@');
604 break;
605 }
606 --ptr;
607 }
608 } else {
609 break;
610 }
611 }
612 setg(base(), base(), ptr);
613 return *base();
614 }
615
616 virtual int_type sync() {
617 return EOF;
618 }
619 };
620
621 public:
622
623 /// \brief Abstract base class for reading a section.
624 ///
625 /// This class has an \c header() member function what get a
626 /// header line string and decides if it want to process the next
627 /// section. Several SectionReaders can be attached to an LemonReader
628 /// and the first attached what can process the section will be used.
629 /// Its \c read() member will called with a stream contains the section.
630 /// From this stream the empty lines and comments are filtered out.
631 class SectionReader {
632 friend class LemonReader;
633 protected:
634 /// \brief Constructor for SectionReader.
635 ///
636 /// Constructor for SectionReader. It attach this reader to
637 /// the given LemonReader.
638 SectionReader(LemonReader& reader) {
639 reader.attach(*this);
640 }
641
642 virtual ~SectionReader() {}
643
644 /// \brief Gives back true when the SectionReader can process
645 /// the section with the given header line.
646 ///
647 /// It gives back true when the SectionReader can process
648 /// the section with the given header line.
649 virtual bool header(const std::string& line) = 0;
650
651 /// \brief Reader function of the section.
652 ///
653 /// It reads the content of the section.
654 virtual void read(std::istream& is) = 0;
655
656 /// \brief The given section missing in the file.
657 ///
658 /// The given section missing in the file.
659 virtual void missing() {};
660 };
661
662 /// \brief Constructor for LemonReader.
663 ///
664 /// Constructor for LemonReader which reads from the given stream.
665 LemonReader(std::istream& _is)
666 : is(&_is), own_is(false) {}
667
668 /// \brief Constructor for LemonReader.
669 ///
670 /// Constructor for LemonReader which reads from the given file.
671 LemonReader(const std::string& filename)
672 : is(0), own_is(true) {
673 is = new std::ifstream(filename.c_str());
674 if (is->fail()) {
675 throw FileOpenError(filename);
676 }
677 }
678
679 /// \brief Desctructor for LemonReader.
680 ///
681 /// Desctructor for LemonReader.
682 ~LemonReader() {
683 if (own_is) {
684 delete is;
685 }
686 }
687
688 private:
689 LemonReader(const LemonReader&);
690 void operator=(const LemonReader&);
691
692 void attach(SectionReader& reader) {
693 readers.push_back(std::make_pair(&reader, false));
694 }
695
696 public:
697 /// \brief Executes the LemonReader.
698 ///
699 /// It executes the LemonReader.
700 void run() {
701 int line_num = 0;
702 std::string line;
703 try {
704 SectionReaders::iterator it;
705 while ((++line_num, getline(*is, line)) && line.find("@end") != 0) {
706 for (it = readers.begin(); it != readers.end(); ++it) {
707 if (it->first->header(line)) {
708 it->second = true;
709 char buf[2048];
710 FilterStreamBuf buffer(*is, line_num);
711 buffer.pubsetbuf(buf, sizeof(buf));
712 std::istream ss(&buffer);
713 it->first->read(ss);
714 break;
715 }
716 }
717 }
718 for (it = readers.begin(); it != readers.end(); ++it) {
719 if (!it->second) {
720 it->first->missing();
721 }
722 }
723 } catch (DataFormatError& error) {
724 error.line(line_num);
725 throw;
726 }
727 }
728
729
730 private:
731
732 std::istream* is;
733 bool own_is;
734
735 typedef std::vector<std::pair<SectionReader*, bool> > SectionReaders;
736 SectionReaders readers;
737
738 };
739
740 /// \ingroup section_io
741 /// \brief SectionReader for reading a graph's nodeset.
742 ///
743 /// The lemon format can store multiple graph nodesets with several
744 /// maps. The nodeset section's header line is \c \@nodeset \c
745 /// nodeset_name, but the \c nodeset_name may be empty.
746 ///
747 /// The first line of the section contains the names of the maps separated
748 /// with white spaces. Each next lines describes a node in the nodeset, and
749 /// contains the mapped values for each map.
750 ///
751 /// If the nodeset contains an \c "label" named map then it will be regarded
752 /// as id map. This map should contain only unique values and when the
753 /// \c readLabel() member will read a value from the given stream it will
754 /// give back that node which is mapped to this value.
755 ///
756 /// \relates LemonReader
757 template <typename _Graph, typename _Traits = DefaultReaderTraits>
758 class NodeSetReader : public LemonReader::SectionReader {
759 typedef LemonReader::SectionReader Parent;
760 public:
761
762 typedef _Graph Graph;
763 typedef _Traits Traits;
764 typedef typename Graph::Node Node;
765 typedef typename Traits::Skipper DefaultSkipper;
766
767 /// \brief Constructor.
768 ///
769 /// Constructor for NodeSetReader. It creates the NodeSetReader and
770 /// attach it into the given LemonReader. The nodeset reader will
771 /// add the read nodes to the given Graph. The reader will read
772 /// the section when the \c section_name and the \c _name are the same.
773 NodeSetReader(LemonReader& _reader,
774 Graph& _graph,
775 const std::string& _name = std::string(),
776 const DefaultSkipper& _skipper = DefaultSkipper())
777 : Parent(_reader), graph(_graph), name(_name), skipper(_skipper) {}
778
779
780 /// \brief Destructor.
781 ///
782 /// Destructor for NodeSetReader.
783 virtual ~NodeSetReader() {
784 for (typename MapReaders::iterator it = readers.begin();
785 it != readers.end(); ++it) {
786 delete it->second;
787 }
788 }
789
790 private:
791 NodeSetReader(const NodeSetReader&);
792 void operator=(const NodeSetReader&);
793
794 public:
795
796 /// \brief Add a new node map reader command for the reader.
797 ///
798 /// Add a new node map reader command for the reader.
799 template <typename Map>
800 NodeSetReader& readNodeMap(std::string label, Map& map) {
801 return _readMap<
802 typename Traits::template Reader<typename Map::Value>, Map,
803 typename _reader_bits::Arg<Map>::Type>(label, map);
804 }
805
806 template <typename Map>
807 NodeSetReader& readNodeMap(std::string label, const Map& map) {
808 return _readMap<
809 typename Traits::template Reader<typename Map::Value>, Map,
810 typename _reader_bits::Arg<Map>::Type>(label, map);
811 }
812
813 /// \brief Add a new node map reader command for the reader.
814 ///
815 /// Add a new node map reader command for the reader.
816 template <typename ItemReader, typename Map>
817 NodeSetReader& readNodeMap(std::string label, Map& map,
818 const ItemReader& ir = ItemReader()) {
819 return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
820 (label, map, ir);
821 }
822
823 template <typename ItemReader, typename Map>
824 NodeSetReader& readNodeMap(std::string label, const Map& map,
825 const ItemReader& ir = ItemReader()) {
826 return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
827 (label, map, ir);
828 }
829
830 private:
831
832 template <typename ItemReader, typename Map, typename MapParameter>
833 NodeSetReader& _readMap(std::string label, MapParameter map,
834 const ItemReader& ir = ItemReader()) {
835 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
836 checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
837 if (readers.find(label) != readers.end()) {
838 ErrorMessage msg;
839 msg << "Multiple read rule for node map: " << label;
840 throw IoParameterError(msg.message());
841 }
842 readers.insert(
843 make_pair(label, new _reader_bits::
844 MapReader<Node, Map, ItemReader>(map, ir)));
845 return *this;
846 }
847
848 public:
849
850 /// \brief Add a new node map skipper command for the reader.
851 ///
852 /// Add a new node map skipper command for the reader.
853 template <typename ItemReader>
854 NodeSetReader& skipNodeMap(std::string label,
855 const ItemReader& ir = ItemReader()) {
856 if (readers.find(label) != readers.end()) {
857 ErrorMessage msg;
858 msg << "Multiple read rule for node map: " << label;
859 throw IoParameterError(msg.message());
860 }
861 readers.insert(make_pair(label, new _reader_bits::
862 SkipReader<Node, ItemReader>(ir)));
863 return *this;
864 }
865
866 protected:
867
868 /// \brief Gives back true when the SectionReader can process
869 /// the section with the given header line.
870 ///
871 /// It gives back true when the header line starts with \c \@nodeset,
872 /// and the header line's name and the nodeset's name are the same.
873 virtual bool header(const std::string& line) {
874 std::istringstream ls(line);
875 std::string command;
876 std::string id;
877 ls >> command >> id;
878 return command == "@nodeset" && name == id;
879 }
880
881 /// \brief Reader function of the section.
882 ///
883 /// It reads the content of the section.
884 virtual void read(std::istream& is) {
885 std::vector<_reader_bits::MapReaderBase<Node>* > index;
886 std::string line;
887
888 {
889 getline(is, line);
890 std::istringstream ls(line);
891 std::string id;
892 while (ls >> id) {
893 typename MapReaders::iterator it = readers.find(id);
894 if (it != readers.end()) {
895 it->second->touch();
896 index.push_back(it->second);
897 } else {
898 index.push_back(&skipper);
899 }
900 if (id == "label") {
901 inverter.reset(index.back()->getInverter());
902 index.back() = inverter.get();
903 }
904 }
905 }
906 for (typename MapReaders::iterator it = readers.begin();
907 it != readers.end(); ++it) {
908 if (!it->second->touched()) {
909 ErrorMessage msg;
910 msg << "Map not found in file: " << it->first;
911 throw IoParameterError(msg.message());
912 }
913 }
914 while (getline(is, line)) {
915 Node node = graph.addNode();
916 std::istringstream ls(line);
917 for (int i = 0; i < int(index.size()); ++i) {
918 index[i]->read(ls, node);
919 }
920 }
921 }
922
923 virtual void missing() {
924 if (readers.empty()) return;
925 ErrorMessage msg;
926 msg << "NodeSet section not found in file: @nodeset " << name;
927 throw IoParameterError(msg.message());
928 }
929
930 public:
931
932 /// \brief Returns true if the nodeset can give back the node by its label.
933 ///
934 /// Returns true if the nodeset can give back the node by its label.
935 /// It is possible only if an "label" named map was read.
936 bool isLabelReader() const {
937 return inverter.get() != 0;
938 }
939
940 /// \brief Gives back the node by its label.
941 ///
942 /// It reads an id from the stream and gives back which node belongs to
943 /// it. It is possible only if there was read an "label" named map.
944 void readLabel(std::istream& is, Node& node) const {
945 node = inverter->read(is);
946 }
947
948 private:
949
950 typedef std::map<std::string, _reader_bits::MapReaderBase<Node>*> MapReaders;
951 MapReaders readers;
952
953 Graph& graph;
954 std::string name;
955 _reader_bits::SkipReader<Node, DefaultSkipper> skipper;
956
957 std::auto_ptr<_reader_bits::MapInverterBase<Node> > inverter;
958 };
959
960 /// \ingroup section_io
961 /// \brief SectionReader for reading a graph's edgeset.
962 ///
963 /// The lemon format can store multiple graph edgesets with several maps.
964 /// The edgeset section's header line is \c \@edgeset \c edgeset_name, but the
965 /// \c edgeset_name may be empty.
966 ///
967 /// The first line of the section contains the names of the maps separated
968 /// with white spaces. Each next lines describes an edge in the edgeset. The
969 /// line contains the source and the target nodes' id and the mapped
970 /// values for each map.
971 ///
972 /// If the edgeset contains an \c "label" named map then it will be regarded
973 /// as id map. This map should contain only unique values and when the
974 /// \c readLabel() member will read a value from the given stream it will
975 /// give back that edge which is mapped to this value.
976 ///
977 /// The edgeset reader needs a node id reader to identify which nodes
978 /// have to be connected. If a NodeSetReader reads an "label" named map,
979 /// it will be able to resolve the nodes by ids.
980 ///
981 /// \relates LemonReader
982 template <typename _Graph, typename _Traits = DefaultReaderTraits>
983 class EdgeSetReader : public LemonReader::SectionReader {
984 typedef LemonReader::SectionReader Parent;
985 public:
986
987 typedef _Graph Graph;
988 typedef _Traits Traits;
989 typedef typename Graph::Node Node;
990 typedef typename Graph::Edge Edge;
991 typedef typename Traits::Skipper DefaultSkipper;
992
993 /// \brief Constructor.
994 ///
995 /// Constructor for EdgeSetReader. It creates the EdgeSetReader and
996 /// attach it into the given LemonReader. The edgeset reader will
997 /// add the read edges to the given Graph. It will use the given
998 /// node id reader to read the source and target nodes of the edges.
999 /// The reader will read the section only if the \c _name and the
1000 /// \c edgset_name are the same.
1001 template <typename NodeLabelReader>
1002 EdgeSetReader(LemonReader& _reader,
1003 Graph& _graph,
1004 const NodeLabelReader& _nodeLabelReader,
1005 const std::string& _name = std::string(),
1006 const DefaultSkipper& _skipper = DefaultSkipper())
1007 : Parent(_reader), graph(_graph), name(_name), skipper(_skipper) {
1008 checkConcept<_reader_bits::ItemLabelReader<Node>, NodeLabelReader>();
1009 nodeLabelReader.reset(new _reader_bits::
1010 LabelReader<Node, NodeLabelReader>(_nodeLabelReader));
1011 }
1012 /// \brief Destructor.
1013 ///
1014 /// Destructor for EdgeSetReader.
1015 virtual ~EdgeSetReader() {
1016 for (typename MapReaders::iterator it = readers.begin();
1017 it != readers.end(); ++it) {
1018 delete it->second;
1019 }
1020 }
1021
1022 private:
1023 EdgeSetReader(const EdgeSetReader&);
1024 void operator=(const EdgeSetReader&);
1025
1026 public:
1027
1028 /// \brief Add a new edge map reader command for the reader.
1029 ///
1030 /// Add a new edge map reader command for the reader.
1031 template <typename Map>
1032 EdgeSetReader& readEdgeMap(std::string label, Map& map) {
1033 return _readMap<
1034 typename Traits::template Reader<typename Map::Value>, Map,
1035 typename _reader_bits::Arg<Map>::Type>(label, map);
1036 }
1037
1038 template <typename Map>
1039 EdgeSetReader& readEdgeMap(std::string label, const Map& map) {
1040 return _readMap<
1041 typename Traits::template Reader<typename Map::Value>, Map,
1042 typename _reader_bits::Arg<Map>::Type>(label, map);
1043 }
1044
1045 /// \brief Add a new edge map reader command for the reader.
1046 ///
1047 /// Add a new edge map reader command for the reader.
1048 template <typename ItemReader, typename Map>
1049 EdgeSetReader& readEdgeMap(std::string label, Map& map,
1050 const ItemReader& ir = ItemReader()) {
1051 return _readMap<ItemReader, Map,
1052 typename _reader_bits::Arg<Map>::Type>(label, map, ir);
1053 }
1054
1055 template <typename ItemReader, typename Map>
1056 EdgeSetReader& readEdgeMap(std::string label, const Map& map,
1057 const ItemReader& ir = ItemReader()) {
1058 return _readMap<ItemReader, Map,
1059 typename _reader_bits::Arg<Map>::Type>(label, map, ir);
1060 }
1061
1062 private:
1063
1064 template <typename ItemReader, typename Map, typename MapParameter>
1065 EdgeSetReader& _readMap(std::string label, MapParameter map,
1066 const ItemReader& ir = ItemReader()) {
1067 checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
1068 checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
1069 if (readers.find(label) != readers.end()) {
1070 ErrorMessage msg;
1071 msg << "Multiple read rule for edge map: " << label;
1072 throw IoParameterError(msg.message());
1073 }
1074 readers.insert(
1075 make_pair(label, new _reader_bits::
1076 MapReader<Edge, Map, ItemReader>(map, ir)));
1077 return *this;
1078 }
1079
1080 public:
1081
1082 /// \brief Add a new edge map skipper command for the reader.
1083 ///
1084 /// Add a new edge map skipper command for the reader.
1085 template <typename ItemReader>
1086 EdgeSetReader& skipEdgeMap(std::string label,
1087 const ItemReader& ir = ItemReader()) {
1088 if (readers.find(label) != readers.end()) {
1089 ErrorMessage msg;
1090 msg << "Multiple read rule for edge map: " << label;
1091 throw IoParameterError(msg.message());
1092 }
1093 readers.insert(make_pair(label, new _reader_bits::
1094 SkipReader<Edge, ItemReader>(ir)));
1095 return *this;
1096 }
1097
1098 protected:
1099
1100 /// \brief Gives back true when the SectionReader can process
1101 /// the section with the given header line.
1102 ///
1103 /// It gives back true when the header line starts with \c \@edgeset,
1104 /// and the header line's name and the edgeset's name are the same.
1105 virtual bool header(const std::string& line) {
1106 std::istringstream ls(line);
1107 std::string command;
1108 std::string id;
1109 ls >> command >> id;
1110 return command == "@edgeset" && name == id;
1111 }
1112
1113 /// \brief Reader function of the section.
1114 ///
1115 /// It reads the content of the section.
1116 virtual void read(std::istream& is) {
1117 if (!nodeLabelReader->isLabelReader()) {
1118 throw DataFormatError("Cannot find nodeset or label map");
1119 }
1120 std::vector<_reader_bits::MapReaderBase<Edge>* > index;
1121 std::string line;
1122
1123 {
1124 getline(is, line);
1125 std::istringstream ls(line);
1126 std::string id;
1127 while (ls >> id) {
1128 typename MapReaders::iterator it = readers.find(id);
1129 if (it != readers.end()) {
1130 index.push_back(it->second);
1131 it->second->touch();
1132 } else {
1133 index.push_back(&skipper);
1134 }
1135 if (id == "label") {
1136 inverter.reset(index.back()->getInverter());
1137 index.back() = inverter.get();
1138 }
1139 }
1140 }
1141 for (typename MapReaders::iterator it = readers.begin();
1142 it != readers.end(); ++it) {
1143 if (!it->second->touched()) {
1144 ErrorMessage msg;
1145 msg << "Map not found in file: " << it->first;
1146 throw IoParameterError(msg.message());
1147 }
1148 }
1149 while (getline(is, line)) {
1150 std::istringstream ls(line);
1151 Node from = nodeLabelReader->read(ls);
1152 Node to = nodeLabelReader->read(ls);
1153 Edge edge = graph.addEdge(from, to);
1154 for (int i = 0; i < int(index.size()); ++i) {
1155 index[i]->read(ls, edge);
1156 }
1157 }
1158 }
1159
1160 virtual void missing() {
1161 if (readers.empty()) return;
1162 ErrorMessage msg;
1163 msg << "EdgeSet section not found in file: @edgeset " << name;
1164 throw IoParameterError(msg.message());
1165 }
1166
1167 public:
1168
1169 /// \brief Returns true if the edgeset can give back the edge by its label.
1170 ///
1171 /// Returns true if the edgeset can give back the edge by its label.
1172 /// It is possible only if an "label" named map was read.
1173 bool isLabelReader() const {
1174 return inverter.get() != 0;
1175 }
1176
1177 /// \brief Gives back the edge by its label.
1178 ///
1179 /// It reads an id from the stream and gives back which edge belongs to
1180 /// it. It is possible only if there was read an "label" named map.
1181 void readLabel(std::istream& is, Edge& edge) const {
1182 edge = inverter->read(is);
1183 }
1184
1185 private:
1186
1187 typedef std::map<std::string, _reader_bits::MapReaderBase<Edge>*>
1188 MapReaders;
1189
1190 MapReaders readers;
1191
1192 Graph& graph;
1193 std::string name;
1194 _reader_bits::SkipReader<Edge, DefaultSkipper> skipper;
1195
1196 std::auto_ptr<_reader_bits::MapInverterBase<Edge> > inverter;
1197 std::auto_ptr<_reader_bits::LabelReaderBase<Node> > nodeLabelReader;
1198 };
1199
1200 /// \ingroup section_io
1201 /// \brief SectionReader for reading a undirected graph's edgeset.
1202 ///
1203 /// The lemon format can store multiple undirected edgesets with several
1204 /// maps. The undirected edgeset section's header line is \c \@uedgeset
1205 /// \c uedgeset_name, but the \c uedgeset_name may be empty.
1206 ///
1207 /// The first line of the section contains the names of the maps separated
1208 /// with white spaces. Each next lines describes an edge in the edgeset. The
1209 /// line contains the connected nodes' id and the mapped values for each map.
1210 ///
1211 /// The section can handle the directed as a syntactical sugar. Two
1212 /// undirected edge map describes one directed edge map. This two maps
1213 /// are the forward map and the backward map and the names of this map
1214 /// is near the same just with a prefix \c '+' or \c '-' character
1215 /// difference.
1216 ///
1217 /// If the edgeset contains an \c "label" named map then it will be regarded
1218 /// as id map. This map should contain only unique values and when the
1219 /// \c readLabel() member will read a value from the given stream it will
1220 /// give back that uicted edge which is mapped to this value.
1221 ///
1222 /// The undirected edgeset reader needs a node id reader to identify which
1223 /// nodes have to be connected. If a NodeSetReader reads an "label" named
1224 /// map, it will be able to resolve the nodes by ids.
1225 ///
1226 /// \relates LemonReader
1227 template <typename _Graph, typename _Traits = DefaultReaderTraits>
1228 class UEdgeSetReader : public LemonReader::SectionReader {
1229 typedef LemonReader::SectionReader Parent;
1230 public:
1231
1232 typedef _Graph Graph;
1233 typedef _Traits Traits;
1234 typedef typename Graph::Node Node;
1235 typedef typename Graph::Edge Edge;
1236 typedef typename Graph::UEdge UEdge;
1237 typedef typename Traits::Skipper DefaultSkipper;
1238
1239 /// \brief Constructor.
1240 ///
1241 /// Constructor for UEdgeSetReader. It creates the UEdgeSetReader
1242 /// and attach it into the given LemonReader. The undirected edgeset
1243 /// reader will add the read undirected edges to the given Graph. It
1244 /// will use the given node id reader to read the source and target
1245 /// nodes of the edges. The reader will read the section only if the
1246 /// \c _name and the \c uedgset_name are the same.
1247 template <typename NodeLabelReader>
1248 UEdgeSetReader(LemonReader& _reader,
1249 Graph& _graph,
1250 const NodeLabelReader& _nodeLabelReader,
1251 const std::string& _name = std::string(),
1252 const DefaultSkipper& _skipper = DefaultSkipper())
1253 : Parent(_reader), graph(_graph), name(_name), skipper(_skipper) {
1254 checkConcept<_reader_bits::ItemLabelReader<Node>, NodeLabelReader>();
1255 nodeLabelReader.reset(new _reader_bits::
1256 LabelReader<Node, NodeLabelReader>(_nodeLabelReader));
1257 }
1258 /// \brief Destructor.
1259 ///
1260 /// Destructor for UEdgeSetReader.
1261 virtual ~UEdgeSetReader() {
1262 for (typename MapReaders::iterator it = readers.begin();
1263 it != readers.end(); ++it) {
1264 delete it->second;
1265 }
1266 }
1267
1268 private:
1269 UEdgeSetReader(const UEdgeSetReader&);
1270 void operator=(const UEdgeSetReader&);
1271
1272 public:
1273
1274 /// \brief Add a new undirected edge map reader command for the reader.
1275 ///
1276 /// Add a new edge undirected map reader command for the reader.
1277 template <typename Map>
1278 UEdgeSetReader& readUEdgeMap(std::string label, Map& map) {
1279 return _readMap<
1280 typename Traits::template Reader<typename Map::Value>, Map,
1281 typename _reader_bits::Arg<Map>::Type>(label, map);
1282 }
1283
1284 template <typename Map>
1285 UEdgeSetReader& readUEdgeMap(std::string label, const Map& map) {
1286 return _readMap<
1287 typename Traits::template Reader<typename Map::Value>, Map,
1288 typename _reader_bits::Arg<Map>::Type>(label, map);
1289 }
1290
1291 /// \brief Add a new undirected edge map reader command for the reader.
1292 ///
1293 /// Add a new edge undirected map reader command for the reader.
1294 template <typename ItemReader, typename Map>
1295 UEdgeSetReader& readUEdgeMap(std::string label, Map& map,
1296 const ItemReader& ir = ItemReader()) {
1297 return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
1298 (label, map, ir);
1299 }
1300
1301 template <typename ItemReader, typename Map>
1302 UEdgeSetReader& readUEdgeMap(std::string label, const Map& map,
1303 const ItemReader& ir = ItemReader()) {
1304 return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type >
1305 (label, map, ir);
1306 }
1307
1308 private:
1309
1310 template <typename ItemReader, typename Map, typename MapParameter>
1311 UEdgeSetReader& _readMap(std::string label, MapParameter map,
1312 const ItemReader& ir = ItemReader()) {
1313 checkConcept<concepts::WriteMap<UEdge, typename Map::Value>, Map>();
1314 checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
1315 if (readers.find(label) != readers.end()) {
1316 ErrorMessage msg;
1317 msg << "Multiple read rule for edge map: " << label;
1318 throw IoParameterError(msg.message());
1319 }
1320 readers.insert(
1321 make_pair(label, new _reader_bits::
1322 MapReader<UEdge, Map, ItemReader>(map, ir)));
1323 return *this;
1324 }
1325
1326 public:
1327
1328 /// \brief Add a new undirected edge map skipper command for the reader.
1329 ///
1330 /// Add a new undirected edge map skipper command for the reader.
1331 template <typename ItemReader>
1332 UEdgeSetReader& skipUEdgeMap(std::string label,
1333 const ItemReader& ir = ItemReader()) {
1334 if (readers.find(label) != readers.end()) {
1335 ErrorMessage msg;
1336 msg << "Multiple read rule for node map: " << label;
1337 throw IoParameterError(msg.message());
1338 }
1339 readers.insert(make_pair(label, new _reader_bits::
1340 SkipReader<UEdge, ItemReader>(ir)));
1341 return *this;
1342 }
1343
1344 /// \brief Add a new directed edge map reader command for the reader.
1345 ///
1346 /// Add a new directed edge map reader command for the reader.
1347 template <typename Map>
1348 UEdgeSetReader& readEdgeMap(std::string label, Map& map) {
1349 return _readDirMap<
1350 typename Traits::template Reader<typename Map::Value>, Map,
1351 typename _reader_bits::Arg<Map>::Type>(label, map);
1352 }
1353
1354 template <typename Map>
1355 UEdgeSetReader& readEdgeMap(std::string label, const Map& map) {
1356 return _readDirMap<
1357 typename Traits::template Reader<typename Map::Value>, Map,
1358 typename _reader_bits::Arg<Map>::Type>(label, map);
1359 }
1360
1361 /// \brief Add a new directed edge map reader command for the reader.
1362 ///
1363 /// Add a new directed edge map reader command for the reader.
1364 template <typename ItemReader, typename Map>
1365 UEdgeSetReader& readEdgeMap(std::string label, Map& map,
1366 const ItemReader& ir = ItemReader()) {
1367 return _readDirMap<ItemReader, Map,
1368 typename _reader_bits::Arg<Map>::Type>(label, map, ir);
1369 }
1370
1371 template <typename ItemReader, typename Map>
1372 UEdgeSetReader& readEdgeMap(std::string label, const Map& map,
1373 const ItemReader& ir = ItemReader()) {
1374 return _readDirMap<ItemReader, Map,
1375 typename _reader_bits::Arg<Map>::Type>(label, map, ir);
1376 }
1377
1378 private:
1379
1380 template <typename ItemReader, typename Map, typename MapParameter>
1381 UEdgeSetReader& _readDirMap(std::string label, MapParameter map,
1382 const ItemReader& ir = ItemReader()) {
1383 checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
1384 checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
1385 readUEdgeMap("+" + label,
1386 _reader_bits::forwardComposeMap(graph, map), ir);
1387 readUEdgeMap("-" + label,
1388 _reader_bits::backwardComposeMap(graph, map), ir);
1389 return *this;
1390 }
1391
1392 public:
1393
1394 /// \brief Add a new directed edge map skipper command for the reader.
1395 ///
1396 /// Add a new directed edge map skipper command for the reader.
1397 template <typename ItemReader>
1398 UEdgeSetReader& skipEdgeMap(std::string label,
1399 const ItemReader& ir = ItemReader()) {
1400 skipUEdgeMap("+" + label, ir);
1401 skipUEdgeMap("-" + label, ir);
1402 return *this;
1403 }
1404
1405 protected:
1406
1407 /// \brief Gives back true when the SectionReader can process
1408 /// the section with the given header line.
1409 ///
1410 /// It gives back true when the header line starts with \c \@uedgeset,
1411 /// and the header line's name and the edgeset's name are the same.
1412 virtual bool header(const std::string& line) {
1413 std::istringstream ls(line);
1414 std::string command;
1415 std::string id;
1416 ls >> command >> id;
1417 return command == "@uedgeset" && name == id;
1418 }
1419
1420 /// \brief Reader function of the section.
1421 ///
1422 /// It reads the content of the section.
1423 virtual void read(std::istream& is) {
1424 if (!nodeLabelReader->isLabelReader()) {
1425 throw DataFormatError("Cannot find nodeset or label map");
1426 }
1427 std::vector<_reader_bits::MapReaderBase<UEdge>* > index;
1428 std::string line;
1429
1430 {
1431 getline(is, line);
1432 std::istringstream ls(line);
1433 std::string id;
1434 while (ls >> id) {
1435 typename MapReaders::iterator it = readers.find(id);
1436 if (it != readers.end()) {
1437 index.push_back(it->second);
1438 it->second->touch();
1439 } else {
1440 index.push_back(&skipper);
1441 }
1442 if (id == "label") {
1443 inverter.reset(index.back()->getInverter());
1444 index.back() = inverter.get();
1445 }
1446 }
1447 for (typename MapReaders::iterator it = readers.begin();
1448 it != readers.end(); ++it) {
1449 if (!it->second->touched()) {
1450 ErrorMessage msg;
1451 msg << "Map not found in file: " << it->first;
1452 throw IoParameterError(msg.message());
1453 }
1454 }
1455 }
1456 while (getline(is, line)) {
1457 std::istringstream ls(line);
1458 Node from = nodeLabelReader->read(ls);
1459 Node to = nodeLabelReader->read(ls);
1460 UEdge edge = graph.addEdge(from, to);
1461 for (int i = 0; i < int(index.size()); ++i) {
1462 index[i]->read(ls, edge);
1463 }
1464 }
1465 }
1466
1467 virtual void missing() {
1468 if (readers.empty()) return;
1469 ErrorMessage msg;
1470 msg << "UEdgeSet section not found in file: @uedgeset " << name;
1471 throw IoParameterError(msg.message());
1472 }
1473
1474 public:
1475
1476 /// \brief Returns true if the edgeset can give back the edge by its label.
1477 ///
1478 /// Returns true if the edgeset can give back the undirected edge by its
1479 /// id. It is possible only if an "label" named map was read.
1480 bool isLabelReader() const {
1481 return inverter.get() != 0;
1482 }
1483
1484 /// \brief Gives back the undirected edge by its label.
1485 ///
1486 /// It reads an id from the stream and gives back which undirected edge
1487 /// belongs to it. It is possible only if there was read an "label" named map.
1488 void readLabel(std::istream& is, UEdge& uEdge) const {
1489 uEdge = inverter->read(is);
1490 }
1491
1492 /// \brief Gives back the directed edge by its label.
1493 ///
1494 /// It reads an id from the stream and gives back which directed edge
1495 /// belongs to it. The directed edge id is the \c '+' or \c '-' character
1496 /// and the undirected edge id. It is possible only if there was read
1497 /// an "label" named map.
1498 void readLabel(std::istream& is, Edge& edge) const {
1499 char c;
1500 is >> c;
1501 UEdge uEdge = inverter->read(is);
1502 if (c == '+') {
1503 edge = graph.direct(uEdge, true);
1504 } else if (c == '-') {
1505 edge = graph.direct(uEdge, false);
1506 } else {
1507 throw DataFormatError("Wrong id format for edge "
1508 "in undirected edgeset");
1509 }
1510 }
1511
1512 private:
1513
1514 typedef std::map<std::string,
1515 _reader_bits::MapReaderBase<UEdge>*> MapReaders;
1516 MapReaders readers;
1517
1518 Graph& graph;
1519 std::string name;
1520 _reader_bits::SkipReader<UEdge, DefaultSkipper> skipper;
1521
1522 std::auto_ptr<_reader_bits::MapInverterBase<UEdge> > inverter;
1523 std::auto_ptr<_reader_bits::LabelReaderBase<Node> > nodeLabelReader;
1524 };
1525
1526 /// \ingroup section_io
1527 /// \brief SectionReader for reading labeled nodes.
1528 ///
1529 /// The nodes section's header line is \c \@nodes \c nodes_name, but the
1530 /// \c nodes_name may be empty.
1531 ///
1532 /// Each line in the section contains the name of the node
1533 /// and then the node id.
1534 ///
1535 /// \relates LemonReader
1536 template <typename _Graph>
1537 class NodeReader : public LemonReader::SectionReader {
1538 typedef LemonReader::SectionReader Parent;
1539 typedef _Graph Graph;
1540 typedef typename Graph::Node Node;
1541 public:
1542
1543 /// \brief Constructor.
1544 ///
1545 /// Constructor for NodeReader. It creates the NodeReader and
1546 /// attach it into the given LemonReader. It will use the given
1547 /// node id reader to give back the nodes. The reader will read the
1548 /// section only if the \c _name and the \c nodes_name are the same.
1549 template <typename _LabelReader>
1550 NodeReader(LemonReader& _reader, const _LabelReader& _labelReader,
1551 const std::string& _name = std::string())
1552 : Parent(_reader), name(_name) {
1553 checkConcept<_reader_bits::ItemLabelReader<Node>, _LabelReader>();
1554 nodeLabelReader.reset(new _reader_bits::
1555 LabelReader<Node, _LabelReader>(_labelReader));
1556 }
1557
1558 /// \brief Destructor.
1559 ///
1560 /// Destructor for NodeReader.
1561 virtual ~NodeReader() {}
1562
1563 private:
1564 NodeReader(const NodeReader&);
1565 void operator=(const NodeReader&);
1566
1567 public:
1568
1569 /// \brief Add a node reader command for the NodeReader.
1570 ///
1571 /// Add a node reader command for the NodeReader.
1572 void readNode(std::string label, Node& item) {
1573 if (readers.find(label) != readers.end()) {
1574 ErrorMessage msg;
1575 msg << "Multiple read rule for node: " << label;
1576 throw IoParameterError(msg.message());
1577 }
1578 readers.insert(make_pair(label, _reader_bits::ItemStore<Node>(item)));
1579 }
1580
1581 protected:
1582
1583 /// \brief Gives back true when the SectionReader can process
1584 /// the section with the given header line.
1585 ///
1586 /// It gives back true when the header line start with \c \@nodes,
1587 /// and the header line's name and the reader's name are the same.
1588 virtual bool header(const std::string& line) {
1589 std::istringstream ls(line);
1590 std::string command;
1591 std::string id;
1592 ls >> command >> id;
1593 return command == "@nodes" && name == id;
1594 }
1595
1596 /// \brief Reader function of the section.
1597 ///
1598 /// It reads the content of the section.
1599 virtual void read(std::istream& is) {
1600 if (!nodeLabelReader->isLabelReader()) {
1601 throw DataFormatError("Cannot find nodeset or label map");
1602 }
1603 std::string line;
1604 while (getline(is, line)) {
1605 std::istringstream ls(line);
1606 std::string id;
1607 ls >> id;
1608 typename NodeReaders::iterator it = readers.find(id);
1609 if (it != readers.end()) {
1610 it->second.read(nodeLabelReader->read(ls));
1611 it->second.touch();
1612 }
1613 }
1614 for (typename NodeReaders::iterator it = readers.begin();
1615 it != readers.end(); ++it) {
1616 if (!it->second.touched()) {
1617 ErrorMessage msg;
1618 msg << "Node not found in file: " << it->first;
1619 throw IoParameterError(msg.message());
1620 }
1621 }
1622 }
1623
1624 virtual void missing() {
1625 if (readers.empty()) return;
1626 ErrorMessage msg;
1627 msg << "Nodes section not found in file: @nodes " << name;
1628 throw IoParameterError(msg.message());
1629 }
1630
1631 private:
1632
1633 std::string name;
1634
1635 typedef std::map<std::string, _reader_bits::ItemStore<Node> > NodeReaders;
1636 NodeReaders readers;
1637 std::auto_ptr<_reader_bits::LabelReaderBase<Node> > nodeLabelReader;
1638 };
1639
1640 /// \ingroup section_io
1641 /// \brief SectionReader for reading labeled edges.
1642 ///
1643 /// The edges section's header line is \c \@edges \c edges_name, but the
1644 /// \c edges_name may be empty.
1645 ///
1646 /// Each line in the section contains the name of the edge
1647 /// and then the edge id.
1648 ///
1649 /// \relates LemonReader
1650 template <typename _Graph>
1651 class EdgeReader : public LemonReader::SectionReader {
1652 typedef LemonReader::SectionReader Parent;
1653 typedef _Graph Graph;
1654 typedef typename Graph::Edge Edge;
1655 public:
1656
1657 /// \brief Constructor.
1658 ///
1659 /// Constructor for EdgeReader. It creates the EdgeReader and
1660 /// attach it into the given LemonReader. It will use the given
1661 /// edge id reader to give back the edges. The reader will read the
1662 /// section only if the \c _name and the \c edges_name are the same.
1663 template <typename _LabelReader>
1664 EdgeReader(LemonReader& _reader, const _LabelReader& _labelReader,
1665 const std::string& _name = std::string())
1666 : Parent(_reader), name(_name) {
1667 checkConcept<_reader_bits::ItemLabelReader<Edge>, _LabelReader>();
1668 edgeLabelReader.reset(new _reader_bits::
1669 LabelReader<Edge, _LabelReader>(_labelReader));
1670 }
1671
1672 /// \brief Destructor.
1673 ///
1674 /// Destructor for EdgeReader.
1675 virtual ~EdgeReader() {}
1676 private:
1677 EdgeReader(const EdgeReader&);
1678 void operator=(const EdgeReader&);
1679
1680 public:
1681
1682 /// \brief Add an edge reader command for the EdgeReader.
1683 ///
1684 /// Add an edge reader command for the EdgeReader.
1685 void readEdge(std::string label, Edge& item) {
1686 if (readers.find(label) != readers.end()) {
1687 ErrorMessage msg;
1688 msg << "Multiple read rule for edge: " << label;
1689 throw IoParameterError(msg.message());
1690 }
1691 readers.insert(make_pair(label, _reader_bits::ItemStore<Edge>(item)));
1692 }
1693
1694 protected:
1695
1696 /// \brief Gives back true when the SectionReader can process
1697 /// the section with the given header line.
1698 ///
1699 /// It gives back true when the header line start with \c \@edges,
1700 /// and the header line's name and the reader's name are the same.
1701 virtual bool header(const std::string& line) {
1702 std::istringstream ls(line);
1703 std::string command;
1704 std::string id;
1705 ls >> command >> id;
1706 return command == "@edges" && name == id;
1707 }
1708
1709 /// \brief Reader function of the section.
1710 ///
1711 /// It reads the content of the section.
1712 virtual void read(std::istream& is) {
1713 if (!edgeLabelReader->isLabelReader()) {
1714 throw DataFormatError("Cannot find edgeset or label map");
1715 }
1716 std::string line;
1717 while (getline(is, line)) {
1718 std::istringstream ls(line);
1719 std::string id;
1720 ls >> id;
1721 typename EdgeReaders::iterator it = readers.find(id);
1722 if (it != readers.end()) {
1723 it->second.read(edgeLabelReader->read(ls));
1724 it->second.touch();
1725 }
1726 }
1727 for (typename EdgeReaders::iterator it = readers.begin();
1728 it != readers.end(); ++it) {
1729 if (!it->second.touched()) {
1730 ErrorMessage msg;
1731 msg << "Edge not found in file: " << it->first;
1732 throw IoParameterError(msg.message());
1733 }
1734 }
1735 }
1736
1737 virtual void missing() {
1738 if (readers.empty()) return;
1739 ErrorMessage msg;
1740 msg << "Edges section not found in file: @edges " << name;
1741 throw IoParameterError(msg.message());
1742 }
1743
1744 private:
1745
1746 std::string name;
1747
1748 typedef std::map<std::string, _reader_bits::ItemStore<Edge> > EdgeReaders;
1749 EdgeReaders readers;
1750 std::auto_ptr<_reader_bits::LabelReaderBase<Edge> > edgeLabelReader;
1751 };
1752
1753 /// \ingroup section_io
1754 /// \brief SectionReader for reading labeled undirected edges.
1755 ///
1756 /// The undirected edges section's header line is \c \@uedges
1757 /// \c uedges_name, but the \c uedges_name may be empty.
1758 ///
1759 /// Each line in the section contains the name of the undirected edge
1760 /// and then the undirected edge id.
1761 ///
1762 /// \relates LemonReader
1763 template <typename _Graph>
1764 class UEdgeReader : public LemonReader::SectionReader {
1765 typedef LemonReader::SectionReader Parent;
1766 typedef _Graph Graph;
1767 typedef typename Graph::Edge Edge;
1768 typedef typename Graph::UEdge UEdge;
1769 public:
1770
1771 /// \brief Constructor.
1772 ///
1773 /// Constructor for UEdgeReader. It creates the UEdgeReader and
1774 /// attach it into the given LemonReader. It will use the given
1775 /// undirected edge id reader to give back the edges. The reader will
1776 /// read the section only if the \c _name and the \c uedges_name are
1777 /// the same.
1778 template <typename _LabelReader>
1779 UEdgeReader(LemonReader& _reader, const _LabelReader& _labelReader,
1780 const std::string& _name = std::string())
1781 : Parent(_reader), name(_name) {
1782 checkConcept<_reader_bits::ItemLabelReader<UEdge>, _LabelReader>();
1783 checkConcept<_reader_bits::ItemLabelReader<Edge>, _LabelReader>();
1784 uEdgeLabelReader.reset(new _reader_bits::
1785 LabelReader<UEdge, _LabelReader>(_labelReader));
1786 edgeLabelReader.reset(new _reader_bits::
1787 LabelReader<Edge, _LabelReader>(_labelReader));
1788 }
1789
1790 /// \brief Destructor.
1791 ///
1792 /// Destructor for UEdgeReader.
1793 virtual ~UEdgeReader() {}
1794 private:
1795 UEdgeReader(const UEdgeReader&);
1796 void operator=(const UEdgeReader&);
1797
1798 public:
1799
1800 /// \brief Add an undirected edge reader command for the UEdgeReader.
1801 ///
1802 /// Add an undirected edge reader command for the UEdgeReader.
1803 void readUEdge(std::string label, UEdge& item) {
1804 if (uEdgeReaders.find(label) != uEdgeReaders.end()) {
1805 ErrorMessage msg;
1806 msg << "Multiple read rule for undirected edge: " << label;
1807 throw IoParameterError(msg.message());
1808 }
1809 uEdgeReaders.insert(make_pair(label, _reader_bits::
1810 ItemStore<UEdge>(item)));
1811 }
1812
1813 /// \brief Add an edge reader command for the UEdgeReader.
1814 ///
1815 /// Add an edge reader command for the UEdgeReader.
1816 void readEdge(std::string label, Edge& item) {
1817 if (edgeReaders.find(label) != edgeReaders.end()) {
1818 ErrorMessage msg;
1819 msg << "Multiple read rule for edge: " << label;
1820 throw IoParameterError(msg.message());
1821 }
1822 edgeReaders.insert(make_pair(label, _reader_bits::ItemStore<Edge>(item)));
1823 }
1824
1825 protected:
1826
1827 /// \brief Gives back true when the SectionReader can process
1828 /// the section with the given header line.
1829 ///
1830 /// It gives back true when the header line start with \c \@edges,
1831 /// and the header line's name and the reader's name are the same.
1832 virtual bool header(const std::string& line) {
1833 std::istringstream ls(line);
1834 std::string command;
1835 std::string id;
1836 ls >> command >> id;
1837 return command == "@uedges" && name == id;
1838 }
1839
1840 /// \brief Reader function of the section.
1841 ///
1842 /// It reads the content of the section.
1843 virtual void read(std::istream& is) {
1844 if (!edgeLabelReader->isLabelReader()) {
1845 throw DataFormatError("Cannot find undirected edgeset or label map");
1846 }
1847 if (!uEdgeLabelReader->isLabelReader()) {
1848 throw DataFormatError("Cannot find undirected edgeset or label map");
1849 }
1850 std::string line;
1851 while (getline(is, line)) {
1852 std::istringstream ls(line);
1853 std::string id;
1854 ls >> id;
1855 {
1856 typename UEdgeReaders::iterator it = uEdgeReaders.find(id);
1857 if (it != uEdgeReaders.end()) {
1858 it->second.read(uEdgeLabelReader->read(ls));
1859 it->second.touch();
1860 continue;
1861 }
1862 } {
1863 typename EdgeReaders::iterator it = edgeReaders.find(id);
1864 if (it != edgeReaders.end()) {
1865 it->second.read(edgeLabelReader->read(ls));
1866 it->second.touch();
1867 continue;
1868 }
1869 }
1870 }
1871 for (typename EdgeReaders::iterator it = edgeReaders.begin();
1872 it != edgeReaders.end(); ++it) {
1873 if (!it->second.touched()) {
1874 ErrorMessage msg;
1875 msg << "Edge not found in file: " << it->first;
1876 throw IoParameterError(msg.message());
1877 }
1878 }
1879 for (typename UEdgeReaders::iterator it = uEdgeReaders.begin();
1880 it != uEdgeReaders.end(); ++it) {
1881 if (!it->second.touched()) {
1882 ErrorMessage msg;
1883 msg << "UEdge not found in file: " << it->first;
1884 throw IoParameterError(msg.message());
1885 }
1886 }
1887 }
1888
1889 virtual void missing() {
1890 if (edgeReaders.empty() && uEdgeReaders.empty()) return;
1891 ErrorMessage msg;
1892 msg << "UEdges section not found in file: @uedges " << name;
1893 throw IoParameterError(msg.message());
1894 }
1895
1896 private:
1897
1898 std::string name;
1899
1900 typedef std::map<std::string,
1901 _reader_bits::ItemStore<UEdge> > UEdgeReaders;
1902 UEdgeReaders uEdgeReaders;
1903 std::auto_ptr<_reader_bits::LabelReaderBase<UEdge> > uEdgeLabelReader;
1904
1905 typedef std::map<std::string, _reader_bits::ItemStore<Edge> > EdgeReaders;
1906 EdgeReaders edgeReaders;
1907 std::auto_ptr<_reader_bits::LabelReaderBase<Edge> > edgeLabelReader;
1908 };
1909
1910 /// \ingroup section_io
1911 /// \brief SectionReader for attributes.
1912 ///
1913 /// The lemon format can store multiple attribute set. Each set has
1914 /// the header line \c \@attributes \c attributeset_name, but the
1915 /// attributeset_name may be empty.
1916 ///
1917 /// The attributeset section contains several lines. Each of them starts
1918 /// with an attribute and then a the value for the id.
1919 ///
1920 /// \relates LemonReader
1921 template <typename _Traits = DefaultReaderTraits>
1922 class AttributeReader : public LemonReader::SectionReader {
1923 typedef LemonReader::SectionReader Parent;
1924 typedef _Traits Traits;
1925 public:
1926 /// \brief Constructor.
1927 ///
1928 /// Constructor for AttributeReader. It creates the AttributeReader and
1929 /// attach it into the given LemonReader. The reader process a section
1930 /// only if the \c section_name and the \c _name are the same.
1931 AttributeReader(LemonReader& _reader,
1932 const std::string& _name = std::string())
1933 : Parent(_reader), name(_name) {}
1934
1935 /// \brief Destructor.
1936 ///
1937 /// Destructor for AttributeReader.
1938 virtual ~AttributeReader() {
1939 for (typename Readers::iterator it = readers.begin();
1940 it != readers.end(); ++it) {
1941 delete it->second;
1942 }
1943 }
1944
1945 private:
1946 AttributeReader(const AttributeReader&);
1947 void operator=(AttributeReader&);
1948
1949 public:
1950 /// \brief Add an attribute reader command for the reader.
1951 ///
1952 /// Add an attribute reader command for the reader.
1953 template <typename Value>
1954 AttributeReader& readAttribute(const std::string& id, Value& value) {
1955 return readAttribute<typename Traits::template Reader<Value> >
1956 (id, value);
1957 }
1958
1959 /// \brief Add an attribute reader command for the reader.
1960 ///
1961 /// Add an attribute reader command for the reader.
1962 template <typename ItemReader, typename Value>
1963 AttributeReader& readAttribute(std::string label, Value& value,
1964 const ItemReader& ir = ItemReader()) {
1965 checkConcept<_reader_bits::ItemReader<Value>, ItemReader>();
1966 if (readers.find(label) != readers.end()) {
1967 ErrorMessage msg;
1968 msg << "Multiple read rule for attribute: " << label;
1969 throw IoParameterError(msg.message());
1970 }
1971 readers.insert(make_pair(label, new _reader_bits::
1972 ValueReader<Value, ItemReader>(value, ir)));
1973 return *this;
1974 }
1975
1976 protected:
1977
1978 /// \brief Gives back true when the SectionReader can process
1979 /// the section with the given header line.
1980 ///
1981 /// It gives back true when the header line start with \c \@attributes,
1982 /// and the header line's id and the attributeset's id are the same.
1983 bool header(const std::string& line) {
1984 std::istringstream ls(line);
1985 std::string command;
1986 std::string id;
1987 ls >> command >> id;
1988 return command == "@attributes" && name == id;
1989 }
1990
1991 /// \brief Reader function of the section.
1992 ///
1993 /// It reads the content of the section.
1994 void read(std::istream& is) {
1995 std::string line;
1996 while (getline(is, line)) {
1997 std::istringstream ls(line);
1998 std::string id;
1999 ls >> id;
2000 typename Readers::iterator it = readers.find(id);
2001 if (it != readers.end()) {
2002 it->second->read(ls);
2003 it->second->touch();
2004 }
2005 }
2006 for (typename Readers::iterator it = readers.begin();
2007 it != readers.end(); ++it) {
2008 if (!it->second->touched()) {
2009 ErrorMessage msg;
2010 msg << "Attribute not found in file: " << it->first;
2011 throw IoParameterError(msg.message());
2012 }
2013 }
2014 }
2015
2016 virtual void missing() {
2017 if (readers.empty()) return;
2018 ErrorMessage msg;
2019 msg << "Attribute section not found in file: @attributes " << name;
2020 throw IoParameterError(msg.message());
2021 }
2022
2023 private:
2024 std::string name;
2025
2026 typedef std::map<std::string, _reader_bits::ValueReaderBase*> Readers;
2027 Readers readers;
2028 };
2029
2030 /// \ingroup section_io
2031 /// \brief SectionReader for retrieve what is in the file.
2032 ///
2033 /// SectionReader for retrieve what is in the file. If you want
2034 /// to know which sections, maps and items are in the file
2035 /// use the next code:
2036 ///\code
2037 /// LemonReader reader("input.lgf");
2038 /// ContentReader content(reader);
2039 /// reader.run();
2040 ///\endcode
2041 class ContentReader : public LemonReader::SectionReader {
2042 typedef LemonReader::SectionReader Parent;
2043 public:
2044 /// \brief Constructor.
2045 ///
2046 /// Constructor for
2047 ContentReader(LemonReader& _reader) : Parent(_reader) {}
2048
2049 /// \brief Desctructor.
2050 ///
2051 /// Desctructor.
2052 virtual ~ContentReader() {}
2053
2054 /// \brief Gives back how many nodesets are in the file.
2055 ///
2056 /// Gives back how many nodesets are in the file.
2057 int nodeSetNum() const {
2058 return nodesets.size();
2059 }
2060
2061 /// \brief Gives back the name of nodeset on the indiced position.
2062 ///
2063 /// Gives back the name of nodeset on the indiced position.
2064 std::string nodeSetName(int index) const {
2065 return nodesets[index].name;
2066 }
2067
2068 /// \brief Gives back the map names of nodeset on the indiced position.
2069 ///
2070 /// Gives back the map names of nodeset on the indiced position.
2071 const std::vector<std::string>& nodeSetMaps(int index) const {
2072 return nodesets[index].items;
2073 }
2074
2075 /// \brief Gives back how many edgesets are in the file.
2076 ///
2077 /// Gives back how many edgesets are in the file.
2078 int edgeSetNum() const {
2079 return edgesets.size();
2080 }
2081
2082 /// \brief Gives back the name of edgeset on the indiced position.
2083 ///
2084 /// Gives back the name of edgeset on the indiced position.
2085 std::string edgeSetName(int index) const {
2086 return edgesets[index].name;
2087 }
2088
2089 /// \brief Gives back the map names of edgeset on the indiced position.
2090 ///
2091 /// Gives back the map names of edgeset on the indiced position.
2092 const std::vector<std::string>& edgeSetMaps(int index) const {
2093 return edgesets[index].items;
2094 }
2095
2096 /// \brief Gives back how many undirected edgesets are in the file.
2097 ///
2098 /// Gives back how many undirected edgesets are in the file.
2099 int uEdgeSetNum() const {
2100 return uedgesets.size();
2101 }
2102
2103 /// \brief Gives back the name of undirected edgeset on the indiced
2104 /// position.
2105 ///
2106 /// Gives back the name of undirected edgeset on the indiced position.
2107 std::string uEdgeSetName(int index) const {
2108 return uedgesets[index].name;
2109 }
2110
2111 /// \brief Gives back the map names of undirected edgeset on the indiced
2112 /// position.
2113 ///
2114 /// Gives back the map names of undirected edgeset on the indiced position.
2115 const std::vector<std::string>& uEdgeSetMaps(int index) const {
2116 return uedgesets[index].items;
2117 }
2118
2119 /// \brief Gives back how many labeled nodes section are in the file.
2120 ///
2121 /// Gives back how many labeled nodes section are in the file.
2122 int nodesNum() const {
2123 return nodes.size();
2124 }
2125
2126 /// \brief Gives back the name of labeled nodes section on the indiced
2127 /// position.
2128 ///
2129 /// Gives back the name of labeled nodes section on the indiced position.
2130 std::string nodesName(int index) const {
2131 return nodes[index].name;
2132 }
2133
2134 /// \brief Gives back the names of the labeled nodes in the indiced
2135 /// section.
2136 ///
2137 /// Gives back the names of the labeled nodes in the indiced section.
2138 const std::vector<std::string>& nodesItems(int index) const {
2139 return nodes[index].items;
2140 }
2141
2142 /// \brief Gives back how many labeled edges section are in the file.
2143 ///
2144 /// Gives back how many labeled edges section are in the file.
2145 int edgesNum() const {
2146 return edges.size();
2147 }
2148
2149 /// \brief Gives back the name of labeled edges section on the indiced
2150 /// position.
2151 ///
2152 /// Gives back the name of labeled edges section on the indiced position.
2153 std::string edgesName(int index) const {
2154 return edges[index].name;
2155 }
2156
2157 /// \brief Gives back the names of the labeled edges in the indiced
2158 /// section.
2159 ///
2160 /// Gives back the names of the labeled edges in the indiced section.
2161 const std::vector<std::string>& edgesItems(int index) const {
2162 return edges[index].items;
2163 }
2164
2165 /// \brief Gives back how many labeled undirected edges section are
2166 /// in the file.
2167 ///
2168 /// Gives back how many labeled undirected edges section are in the file.
2169 int uEdgesNum() const {
2170 return uedges.size();
2171 }
2172
2173 /// \brief Gives back the name of labeled undirected edges section
2174 /// on the indiced position.
2175 ///
2176 /// Gives back the name of labeled undirected edges section on the
2177 /// indiced position.
2178 std::string uEdgesName(int index) const {
2179 return uedges[index].name;
2180 }
2181
2182 /// \brief Gives back the names of the labeled undirected edges in
2183 /// the indiced section.
2184 ///
2185 /// Gives back the names of the labeled undirected edges in the
2186 /// indiced section.
2187 const std::vector<std::string>& uEdgesItems(int index) const {
2188 return uedges[index].items;
2189 }
2190
2191
2192 /// \brief Gives back how many attributes section are in the file.
2193 ///
2194 /// Gives back how many attributes section are in the file.
2195 int attributesNum() const {
2196 return attributes.size();
2197 }
2198
2199 /// \brief Gives back the name of attributes section on the indiced
2200 /// position.
2201 ///
2202 /// Gives back the name of attributes section on the indiced position.
2203 std::string attributesName(int index) const {
2204 return attributes[index].name;
2205 }
2206
2207 /// \brief Gives back the names of the attributes in the indiced section.
2208 ///
2209 /// Gives back the names of the attributes in the indiced section.
2210 const std::vector<std::string>& attributesItems(int index) const {
2211 return attributes[index].items;
2212 }
2213
2214 const std::vector<std::string>& otherSections() const {
2215 return sections;
2216 }
2217
2218 protected:
2219
2220 /// \brief Gives back true when the SectionReader can process
2221 /// the section with the given header line.
2222 ///
2223 /// It gives back true when the section is common section.
2224 bool header(const std::string& line) {
2225 std::istringstream ls(line);
2226 std::string command, name;
2227 ls >> command >> name;
2228 if (command == "@nodeset") {
2229 current = command;
2230 nodesets.push_back(SectionInfo(name));
2231 } else if (command == "@edgeset") {
2232 current = command;
2233 edgesets.push_back(SectionInfo(name));
2234 } else if (command == "@uedgeset") {
2235 current = command;
2236 uedgesets.push_back(SectionInfo(name));
2237 } else if (command == "@nodes") {
2238 current = command;
2239 nodes.push_back(SectionInfo(name));
2240 } else if (command == "@edges") {
2241 current = command;
2242 edges.push_back(SectionInfo(name));
2243 } else if (command == "@uedges") {
2244 current = command;
2245 uedges.push_back(SectionInfo(name));
2246 } else if (command == "@attributes") {
2247 current = command;
2248 attributes.push_back(SectionInfo(name));
2249 } else {
2250 sections.push_back(line);
2251 return false;
2252 }
2253 return true;
2254 }
2255
2256 /// \brief Retrieve the items from various sections.
2257 ///
2258 /// Retrieve the items from various sections.
2259 void read(std::istream& is) {
2260 if (current == "@nodeset") {
2261 readMapNames(is, nodesets.back().items);
2262 } else if (current == "@edgeset") {
2263 readMapNames(is, edgesets.back().items);
2264 } else if (current == "@uedgeset") {
2265 readMapNames(is, uedgesets.back().items);
2266 } else if (current == "@nodes") {
2267 readItemNames(is, nodes.back().items);
2268 } else if (current == "@edges") {
2269 readItemNames(is, edges.back().items);
2270 } else if (current == "@uedges") {
2271 readItemNames(is, uedges.back().items);
2272 } else if (current == "@attributes") {
2273 readItemNames(is, attributes.back().items);
2274 }
2275 }
2276
2277 private:
2278
2279 void readMapNames(std::istream& is, std::vector<std::string>& maps) {
2280 std::string line, name;
2281 std::getline(is, line);
2282 std::istringstream ls(line);
2283 while (ls >> name) {
2284 maps.push_back(name);
2285 }
2286 while (getline(is, line));
2287 }
2288
2289 void readItemNames(std::istream& is, std::vector<std::string>& maps) {
2290 std::string line, name;
2291 while (std::getline(is, line)) {
2292 std::istringstream ls(line);
2293 ls >> name;
2294 maps.push_back(name);
2295 }
2296 }
2297
2298 struct SectionInfo {
2299 std::string name;
2300 std::vector<std::string> items;
2301
2302 SectionInfo(const std::string& _name) : name(_name) {}
2303 };
2304
2305 std::vector<SectionInfo> nodesets;
2306 std::vector<SectionInfo> edgesets;
2307 std::vector<SectionInfo> uedgesets;
2308
2309 std::vector<SectionInfo> nodes;
2310 std::vector<SectionInfo> edges;
2311 std::vector<SectionInfo> uedges;
2312
2313 std::vector<SectionInfo> attributes;
2314
2315 std::vector<std::string> sections;
2316
2317 std::string current;
2318
2319 };
2320
2321}
2322#endif
Note: See TracBrowser for help on using the repository browser.
|
{
"url": "http://lemon.cs.elte.hu/trac/lemon/browser/lemon-0.x/lemon/lemon_reader.h?rev=8450951a8e2d687dc2e56e401fef880a111500ea",
"source_domain": "lemon.cs.elte.hu",
"snapshot_id": "crawl=CC-MAIN-2019-43",
"warc_metadata": {
"Content-Length": "241000",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:S5EFBSXCVKK3BVGPGAVFE7VSAYEVMV3R",
"WARC-Concurrent-To": "<urn:uuid:b3f6ab3b-1885-4998-9bb7-ccba082a2b56>",
"WARC-Date": "2019-10-13T20:17:10Z",
"WARC-IP-Address": "157.181.227.195",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:7IGK7L7LHSY734OA3V3QC463OBHV2SYY",
"WARC-Record-ID": "<urn:uuid:2f9efe26-57aa-4942-82e8-8dba5cf986ba>",
"WARC-Target-URI": "http://lemon.cs.elte.hu/trac/lemon/browser/lemon-0.x/lemon/lemon_reader.h?rev=8450951a8e2d687dc2e56e401fef880a111500ea",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ac051448-f88e-430c-a141-074b5be4067b>"
},
"warc_info": "isPartOf: CC-MAIN-2019-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2019\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-207.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,
31,
32,
91,
92,
205,
206,
228,
229,
269,
296,
315,
321,
337,
341,
410,
414,
442,
504,
572,
576,
646,
714,
768,
773,
842,
915,
929,
934,
940,
943,
966,
977,
1010,
1013,
1016,
1047,
1078,
1081,
1084,
1106,
1127,
1147,
1167,
1190,
1207,
1227,
1230,
1257,
1290,
1324,
1362,
1365,
1391,
1394,
1429,
1464,
1467,
1487,
1490,
1519,
1522,
1550,
1579,
1637,
1645,
1648,
1676,
1696,
1752,
1776,
1786,
1795,
1798,
1829,
1859,
1873,
1876,
1922,
1925,
1973,
1981,
2023,
2052,
2083,
2128,
2175,
2198,
2238,
2250,
2286,
2314,
2325,
2328,
2337,
2340,
2371,
2396,
2410,
2453,
2461,
2498,
2527,
2558,
2581,
2616,
2628,
2659,
2687,
2698,
2701,
2710,
2714,
2745,
2787,
2818,
2860,
2864,
2911,
2944,
2959,
3003,
3047,
3051,
3129,
3170,
3179,
3233,
3283,
3294,
3298,
3314,
3343,
3381,
3391,
3395,
3442,
3479,
3542,
3601,
3610,
3614,
3661,
3698,
3755,
3814,
3823,
3827,
3874,
3908,
3923,
3967,
4011,
4015,
4094,
4135,
4144,
4198,
4249,
4260,
4264,
4280,
4309,
4347,
4357,
4361,
4365,
4412,
4450,
4514,
4574,
4583,
4587,
4634,
4672,
4730,
4790,
4799,
4803,
4850,
4902,
4955,
4965,
5012,
5064,
5124,
5134,
5138,
5185,
5238,
5292,
5302,
5349,
5402,
5463,
5473,
5477,
5508,
5546,
5585,
5595,
5626,
5664,
5710,
5720,
5724,
5755,
5793,
5832,
5842,
5873,
5911,
5957,
5967,
5971,
5975,
6008,
6036,
6043,
6076,
6137,
6152,
6181,
6241,
6294,
6298,
6355,
6379,
6390,
6400,
6404,
6470,
6535,
6550,
6579,
6612,
6659,
6686,
6762,
6766,
6818,
6842,
6868,
6872,
6943,
6993,
7036,
7040,
7081,
7085,
7150,
7174,
7209,
7242,
7306,
7344,
7402,
7422,
7486,
7499,
7510,
7514,
7567,
7591,
7626,
7696,
7734,
7766,
7786,
7845,
7858,
7874,
7884,
7888,
7939,
8005,
8020,
8049,
8082,
8129,
8205,
8209,
8233,
8237,
8288,
8320,
8324,
8366,
8370,
8435,
8459,
8494,
8558,
8596,
8654,
8674,
8744,
8757,
8768,
8772,
8825,
8849,
8884,
8954,
8992,
9024,
9044,
9103,
9116,
9127,
9131,
9147,
9173,
9183,
9187,
9223,
9252,
9267,
9296,
9300,
9347,
9356,
9399,
9450,
9454,
9491,
9495,
9563,
9623,
9627,
9648,
9672,
9676,
9686,
9690,
9756,
9811,
9826,
9853,
9886,
9933,
9962,
9971,
10023,
10047,
10051,
10114,
10156,
10199,
10203,
10236,
10240,
10305,
10329,
10364,
10397,
10408,
10412,
10469,
10542,
10553,
10563,
10567,
10571,
10622,
10678,
10693,
10726,
10773,
10802,
10806,
10830,
10894,
10898,
10932,
10936,
10996,
11020,
11055,
11071,
11075,
11131,
11195,
11206,
11216,
11220,
11253,
11284,
11299,
11328,
11367,
11423,
11472,
11482,
11486,
11547,
11606,
11621,
11650,
11703,
11712,
11763,
11767,
11831,
11883,
11887,
11940,
11962,
12011,
12035,
12046,
12050,
12096,
12148,
12159,
12169,
12173,
12206,
12231,
12246,
12250,
12279,
12283,
12332,
12361,
12372,
12381,
12424,
12475,
12479,
12519,
12545,
12556,
12565,
12581,
12602,
12626,
12636,
12640,
12671,
12686,
12732,
12781,
12785,
12828,
12879,
12883,
12922,
12938,
12962,
12972,
12976,
13028,
13080,
13095,
13126,
13159,
13163,
13222,
13269,
13273,
13320,
13355,
13366,
13382,
13405,
13429,
13439,
13443,
13450,
13454,
13481,
13524,
13533,
13604,
13682,
13726,
13735,
13809,
13883,
13957,
14028,
14098,
14171,
14244,
14269,
14278,
14355,
14429,
14509,
14590,
14664,
14743,
14821,
14862,
14871,
14901,
14933,
14965,
14995,
15025,
15059,
15084,
15098,
15105,
15160,
15175,
15179,
15219,
15265,
15318,
15360,
15410,
15414,
15432,
15436,
15468,
15488,
15511,
15535,
15547,
15551,
15584,
15588,
15592,
15620,
15624,
15651,
15678,
15682,
15702,
15706,
15743,
15747,
15751,
15796,
15800,
15845,
15849,
15900,
15904,
15955,
15979,
16009,
16020,
16025,
16099,
16132,
16192,
16221,
16241,
16290,
16303,
16329,
16353,
16364,
16368,
16401,
16434,
16459,
16485,
16509,
16549,
16577,
16599,
16627,
16642,
16670,
16696,
16719,
16748,
16772,
16801,
16824,
16866,
16895,
16917,
16951,
16990,
17020,
17044,
17075,
17092,
17107,
17127,
17157,
17183,
17207,
17247,
17276,
17298,
17327,
17342,
17355,
17380,
17391,
17395,
17435,
17454,
17488,
17517,
17546,
17573,
17588,
17608,
17633,
17646,
17673,
17727,
17763,
17801,
17835,
17862,
17886,
17947,
17984,
18010,
18029,
18053,
18070,
18092,
18114,
18129,
18142,
18180,
18207,
18218,
18222,
18257,
18280,
18291,
18301,
18305,
18318,
18322,
18383,
18394,
18462,
18535,
18612,
18689,
18769,
18844,
18873,
18908,
18926,
18977,
18990,
19059,
19095,
19141,
19174,
19185,
19189,
19226,
19230,
19301,
19354,
19367,
19434,
19487,
19546,
19550,
19602,
19615,
19665,
19715,
19719,
19778,
19791,
19843,
19879,
19889,
19893,
19940,
19951,
20025,
20063,
20101,
20105,
20152,
20163,
20235,
20283,
20316,
20367,
20394,
20436,
20447,
20456,
20460,
20507,
20518,
20558,
20582,
20605,
20627,
20638,
20647,
20651,
20665,
20705,
20748,
20752,
20796,
20856,
20865,
20869,
20882,
20926,
20937,
20977,
20997,
21024,
21051,
21066,
21106,
21186,
21255,
21301,
21337,
21370,
21426,
21479,
21522,
21560,
21584,
21601,
21616,
21629,
21696,
21728,
21765,
21780,
21793,
21837,
21870,
21888,
21899,
21908,
21912,
21916,
21930,
21934,
21959,
21979,
21983,
22060,
22091,
22095,
22103,
22107,
22136,
22197,
22206,
22279,
22348,
22409,
22418,
22498,
22579,
22629,
22638,
22720,
22796,
22875,
22935,
22944,
22974,
23046,
23109,
23159,
23172,
23176,
23205,
23236,
23278,
23334,
23338,
23369,
23380,
23455,
23528,
23599,
23678,
23721,
23757,
23820,
23892,
23969,
23973,
23977,
24007,
24018,
24059,
24093,
24159,
24202,
24232,
24243,
24252,
24256,
24270,
24314,
24359,
24364,
24377,
24381,
24449,
24460,
24521,
24552,
24617,
24643,
24714,
24777,
24786,
24790,
24821,
24892,
24918,
24989,
25052,
25061,
25065,
25133,
25144,
25205,
25257,
25320,
25393,
25474,
25503,
25512,
25516,
25568,
25637,
25710,
25791,
25820,
25829,
25833,
25847,
25851,
25926,
25994,
26064,
26141,
26225,
26278,
26307,
26371,
26421,
26437,
26462,
26509,
26575,
26598,
26607,
26611,
26624,
26628,
26697,
26708,
26770,
26808,
26861,
26934,
26987,
27016,
27080,
27130,
27141,
27201,
27271,
27294,
27303,
27307,
27323,
27327,
27396,
27447,
27458,
27535,
27610,
27664,
27702,
27732,
27757,
27787,
27840,
27849,
27853,
27903,
27914,
27962,
28007,
28072,
28099,
28103,
28114,
28144,
28184,
28211,
28241,
28307,
28347,
28383,
28427,
28449,
28491,
28506,
28540,
28600,
28646,
28661,
28674,
28685,
28751,
28794,
28835,
28866,
28926,
28978,
28991,
29002,
29046,
29086,
29126,
29183,
29222,
29235,
29246,
29255,
29259,
29291,
29329,
29356,
29428,
29476,
29485,
29489,
29502,
29506,
29589,
29600,
29676,
29741,
29777,
29814,
29823,
29827,
29879,
29890,
29969,
30044,
30104,
30140,
30149,
30153,
30167,
30171,
30256,
30283,
30290,
30314,
30339,
30402,
30406,
30475,
30483,
30487,
30516,
30577,
30586,
30665,
30749,
30788,
30797,
30877,
30959,
31033,
31063,
31072,
31154,
31230,
31309,
31369,
31378,
31453,
31531,
31585,
31594,
31624,
31696,
31759,
31809,
31822,
31826,
31855,
31886,
31928,
31970,
32026,
32030,
32061,
32072,
32147,
32220,
32292,
32368,
32441,
32482,
32526,
32570,
32607,
32670,
32734,
32807,
32884,
32964,
33015,
33099,
33109,
33140,
33152,
33194,
33229,
33296,
33340,
33371,
33383,
33393,
33398,
33413,
33458,
33504,
33509,
33523,
33528,
33597,
33609,
33671,
33703,
33769,
33796,
33868,
33932,
33942,
33947,
33979,
34051,
34078,
34150,
34214,
34224,
34229,
34298,
34310,
34372,
34425,
34489,
34563,
34606,
34674,
34684,
34689,
34742,
34812,
34886,
34929,
34997,
35007,
35012,
35027,
35032,
35108,
35177,
35248,
35326,
35411,
35465,
35495,
35560,
35611,
35623,
35649,
35697,
35764,
35788,
35798,
35803,
35817,
35822,
35892,
35904,
35967,
36006,
36060,
36134,
36188,
36218,
36283,
36334,
36346,
36407,
36478,
36502,
36512,
36517,
36534,
36539,
36609,
36661,
36673,
36751,
36827,
36882,
36921,
36952,
36978,
37009,
37063,
37073,
37078,
37129,
37141,
37190,
37236,
37287,
37358,
37370,
37436,
37464,
37469,
37481,
37512,
37556,
37584,
37615,
37682,
37723,
37768,
37805,
37828,
37871,
37887,
37922,
37983,
38030,
38046,
38060,
38072,
38139,
38183,
38225,
38257,
38318,
38371,
38385,
38397,
38442,
38483,
38534,
38583,
38632,
38690,
38730,
38744,
38756,
38766,
38771,
38804,
38843,
38871,
38944,
38993,
39003,
39008,
39022,
39027,
39111,
39123,
39200,
39266,
39303,
39341,
39351,
39356,
39409,
39421,
39501,
39577,
39638,
39675,
39685,
39690,
39705,
39710,
39784,
39804,
39812,
39840,
39848,
39873,
39899,
39963,
39968,
40038,
40115,
40124,
40129,
40159,
40232,
40242,
40321,
40399,
40466,
40476,
40557,
40640,
40724,
40734,
40808,
40885,
40962,
41035,
41057,
41067,
41150,
41227,
41307,
41375,
41385,
41466,
41546,
41606,
41616,
41647,
41720,
41785,
41836,
41850,
41855,
41885,
41917,
41960,
42003,
42048,
42105,
42110,
42142,
42154,
42228,
42305,
42382,
42458,
42535,
42594,
42638,
42683,
42725,
42793,
42862,
42940,
43017,
43097,
43148,
43232,
43242,
43273,
43285,
43328,
43364,
43431,
43475,
43506,
43518,
43528,
43533,
43548,
43595,
43642,
43647,
43661,
43666,
43746,
43758,
43831,
43863,
43931,
43958,
44030,
44094,
44104,
44109,
44141,
44215,
44242,
44314,
44378,
44388,
44393,
44473,
44485,
44558,
44611,
44677,
44753,
44835,
44865,
44875,
44880,
44933,
45005,
45081,
45164,
45194,
45204,
45209,
45224,
45229,
45305,
45375,
45447,
45526,
45611,
45665,
45695,
45760,
45811,
45823,
45849,
45897,
45965,
45989,
45999,
46004,
46018,
46023,
46104,
46116,
46190,
46229,
46285,
46361,
46415,
46445,
46510,
46561,
46573,
46634,
46706,
46730,
46740,
46745,
46823,
46835,
46906,
46938,
47005,
47035,
47107,
47171,
47181,
47186,
47218,
47291,
47321,
47393,
47457,
47467,
47472,
47550,
47562,
47633,
47686,
47751,
47830,
47876,
47944,
47954,
47959,
48012,
48083,
48162,
48208,
48276,
48286,
48291,
48306,
48311,
48387,
48460,
48539,
48624,
48702,
48738,
48811,
48847,
48921,
48950,
48960,
48965,
48979,
48984,
49063,
49075,
49147,
49186,
49241,
49316,
49357,
49398,
49422,
49432,
49437,
49454,
49459,
49529,
49581,
49593,
49672,
49748,
49803,
49842,
49873,
49899,
49930,
49985,
49995,
50000,
50051,
50063,
50112,
50158,
50209,
50280,
50292,
50359,
50387,
50392,
50404,
50435,
50479,
50507,
50538,
50605,
50646,
50691,
50728,
50751,
50794,
50810,
50845,
50906,
50953,
50969,
50983,
51052,
51098,
51142,
51176,
51239,
51294,
51310,
51324,
51336,
51381,
51422,
51473,
51522,
51572,
51630,
51670,
51684,
51696,
51706,
51711,
51744,
51783,
51811,
51886,
51935,
51945,
51950,
51964,
51969,
52053,
52065,
52146,
52216,
52253,
52291,
52301,
52306,
52370,
52382,
52462,
52549,
52612,
52650,
52660,
52665,
52727,
52739,
52817,
52899,
52977,
53011,
53072,
53090,
53109,
53153,
53179,
53225,
53258,
53305,
53324,
53386,
53446,
53458,
53468,
53473,
53488,
53493,
53531,
53605,
53633,
53641,
53666,
53692,
53757,
53762,
53833,
53910,
53919,
53924,
53954,
54012,
54022,
54101,
54139,
54149,
54214,
54246,
54256,
54287,
54320,
54381,
54432,
54462,
54505,
54519,
54527,
54559,
54571,
54641,
54713,
54789,
54866,
54907,
54982,
55043,
55086,
55163,
55214,
55291,
55301,
55306,
55337,
55349,
55388,
55421,
55426,
55441,
55480,
55523,
55528,
55542,
55547,
55612,
55624,
55682,
55737,
55791,
55821,
55882,
55933,
55945,
56026,
56036,
56041,
56058,
56063,
56133,
56185,
56197,
56272,
56347,
56402,
56441,
56472,
56498,
56529,
56581,
56591,
56596,
56647,
56659,
56708,
56754,
56805,
56876,
56888,
56916,
56954,
56995,
57023,
57045,
57111,
57150,
57208,
57242,
57263,
57275,
57343,
57387,
57428,
57460,
57522,
57575,
57589,
57601,
57611,
57616,
57649,
57688,
57716,
57785,
57834,
57844,
57852,
57867,
57872,
57898,
57903,
57986,
58015,
58092,
58101,
58106,
58136,
58194,
58204,
58283,
58321,
58331,
58396,
58428,
58438,
58469,
58502,
58563,
58614,
58644,
58687,
58701,
58709,
58741,
58753,
58823,
58895,
58971,
59048,
59089,
59164,
59225,
59268,
59345,
59396,
59473,
59483,
59488,
59519,
59531,
59570,
59603,
59618,
59657,
59700,
59705,
59719,
59724,
59790,
59802,
59861,
59916,
59970,
60000,
60061,
60112,
60124,
60205,
60215,
60220,
60237,
60242,
60312,
60364,
60376,
60451,
60526,
60581,
60620,
60651,
60677,
60708,
60760,
60770,
60775,
60826,
60838,
60887,
60933,
60984,
61055,
61067,
61095,
61133,
61174,
61202,
61224,
61290,
61329,
61387,
61421,
61442,
61454,
61522,
61566,
61607,
61639,
61701,
61754,
61768,
61780,
61790,
61795,
61828,
61867,
61895,
61964,
62013,
62023,
62031,
62046,
62051,
62077,
62082,
62165,
62194,
62271,
62280,
62285,
62315,
62384,
62394,
62462,
62525,
62535,
62611,
62654,
62664,
62695,
62728,
62790,
62841,
62871,
62914,
62959,
62973,
62981,
63013,
63025,
63097,
63169,
63247,
63324,
63346,
63387,
63463,
63524,
63567,
63645,
63722,
63774,
63857,
63908,
63985,
63995,
64000,
64031,
64043,
64083,
64117,
64132,
64173,
64217,
64222,
64236,
64241,
64319,
64331,
64402,
64459,
64523,
64553,
64625,
64676,
64688,
64750,
64820,
64830,
64835,
64902,
64914,
64974,
65029,
65091,
65121,
65182,
65233,
65245,
65330,
65340,
65345,
65362,
65367,
65437,
65489,
65501,
65576,
65651,
65706,
65745,
65776,
65802,
65833,
65886,
65896,
65901,
65952,
65964,
66013,
66059,
66110,
66192,
66204,
66256,
66338,
66350,
66378,
66416,
66457,
66485,
66507,
66521,
66595,
66641,
66702,
66738,
66764,
66785,
66801,
66873,
66918,
66978,
67014,
67040,
67061,
67075,
67087,
67159,
67207,
67248,
67280,
67342,
67395,
67409,
67421,
67495,
67544,
67585,
67617,
67680,
67733,
67747,
67759,
67769,
67774,
67807,
67874,
67902,
67973,
68022,
68032,
68040,
68055,
68060,
68086,
68091,
68129,
68201,
68236,
68315,
68320,
68403,
68436,
68513,
68522,
68527,
68557,
68604,
68614,
68688,
68760,
68802,
68812,
68891,
68952,
68962,
68993,
69049,
69115,
69166,
69198,
69212,
69244,
69256,
69336,
69415,
69486,
69532,
69598,
69642,
69647,
69678,
69690,
69734,
69771,
69835,
69879,
69910,
69922,
69932,
69937,
69952,
70001,
70043,
70048,
70062,
70129,
70141,
70201,
70235,
70313,
70386,
70411,
70421,
70426,
70493,
70505,
70565,
70620,
70692,
70770,
70841,
70895,
70925,
70991,
71042,
71054,
71115,
71195,
71219,
71229,
71234,
71251,
71256,
71326,
71378,
71390,
71470,
71547,
71594,
71633,
71664,
71690,
71721,
71778,
71788,
71793,
71844,
71856,
71905,
71943,
71971,
72009,
72050,
72078,
72100,
72162,
72201,
72237,
72272,
72286,
72298,
72362,
72406,
72448,
72480,
72547,
72600,
72621,
72633,
72646,
72651,
72684,
72723,
72751,
72829,
72878,
72888,
72893,
72908,
72934,
72939,
73018,
73044,
73053,
73058,
73088,
73153,
73163,
73233,
73298,
73327,
73342,
73385,
73426,
73450,
73468,
73532,
73583,
73597,
73629,
73641,
73669,
73734,
73739,
73771,
73783,
73808,
73844,
73849,
73914,
73926,
73984,
74017,
74051,
74061,
74066,
74141,
74153,
74221,
74272,
74311,
74321,
74326,
74406,
74418,
74491,
74562,
74602,
74612,
74617,
74682,
74694,
74752,
74785,
74819,
74829,
74834,
74909,
74921,
74989,
75040,
75079,
75089,
75094,
75174,
75186,
75259,
75330,
75370,
75380,
75385,
75461,
75473,
75542,
75576,
75611,
75621,
75626,
75702,
75724,
75736,
75815,
75867,
75907,
75917,
75922,
76003,
76025,
76037,
76121,
76193,
76234,
76244,
76249,
76327,
76339,
76410,
76441,
76472,
76482,
76487,
76566,
76588,
76600,
76682,
76731,
76767,
76777,
76782,
76858,
76879,
76891,
76969,
77039,
77076,
77086,
77091,
77169,
77181,
77252,
77283,
77314,
77324,
77329,
77408,
77430,
77442,
77524,
77573,
77609,
77619,
77624,
77700,
77721,
77733,
77811,
77881,
77918,
77928,
77934,
78010,
78035,
78047,
78129,
78161,
78193,
78203,
78208,
78283,
78320,
78332,
78407,
78437,
78487,
78524,
78534,
78539,
78614,
78647,
78659,
78731,
78760,
78831,
78869,
78879,
78884,
78890,
78965,
78977,
79045,
79081,
79117,
79127,
79132,
79208,
79230,
79242,
79321,
79375,
79416,
79426,
79431,
79513,
79525,
79600,
79675,
79717,
79727,
79732,
79796,
79823,
79833,
79838,
79855,
79863,
79933,
79985,
79997,
80064,
80111,
80150,
80187,
80220,
80259,
80290,
80341,
80387,
80418,
80469,
80516,
80547,
80599,
80643,
80674,
80722,
80766,
80797,
80845,
80890,
80921,
80970,
81019,
81050,
81103,
81122,
81160,
81186,
81198,
81221,
81231,
81236,
81297,
81309,
81363,
81401,
81440,
81493,
81539,
81592,
81639,
81693,
81737,
81788,
81832,
81883,
81928,
81980,
82029,
82085,
82097,
82110,
82115,
82130,
82135,
82213,
82247,
82281,
82320,
82351,
82385,
82397,
82434,
82444,
82449,
82528,
82562,
82605,
82646,
82670,
82704,
82716,
82726,
82731,
82760,
82788,
82830,
82835,
82900,
82911,
82916,
82959,
83002,
83046,
83051,
83091,
83131,
83172,
83177,
83222,
83227,
83270,
83275,
83304,
83309,
83318,
83323,
83329,
83340
],
"line_end_idx": [
31,
32,
91,
92,
205,
206,
228,
229,
269,
296,
315,
321,
337,
341,
410,
414,
442,
504,
572,
576,
646,
714,
768,
773,
842,
915,
929,
934,
940,
943,
966,
977,
1010,
1013,
1016,
1047,
1078,
1081,
1084,
1106,
1127,
1147,
1167,
1190,
1207,
1227,
1230,
1257,
1290,
1324,
1362,
1365,
1391,
1394,
1429,
1464,
1467,
1487,
1490,
1519,
1522,
1550,
1579,
1637,
1645,
1648,
1676,
1696,
1752,
1776,
1786,
1795,
1798,
1829,
1859,
1873,
1876,
1922,
1925,
1973,
1981,
2023,
2052,
2083,
2128,
2175,
2198,
2238,
2250,
2286,
2314,
2325,
2328,
2337,
2340,
2371,
2396,
2410,
2453,
2461,
2498,
2527,
2558,
2581,
2616,
2628,
2659,
2687,
2698,
2701,
2710,
2714,
2745,
2787,
2818,
2860,
2864,
2911,
2944,
2959,
3003,
3047,
3051,
3129,
3170,
3179,
3233,
3283,
3294,
3298,
3314,
3343,
3381,
3391,
3395,
3442,
3479,
3542,
3601,
3610,
3614,
3661,
3698,
3755,
3814,
3823,
3827,
3874,
3908,
3923,
3967,
4011,
4015,
4094,
4135,
4144,
4198,
4249,
4260,
4264,
4280,
4309,
4347,
4357,
4361,
4365,
4412,
4450,
4514,
4574,
4583,
4587,
4634,
4672,
4730,
4790,
4799,
4803,
4850,
4902,
4955,
4965,
5012,
5064,
5124,
5134,
5138,
5185,
5238,
5292,
5302,
5349,
5402,
5463,
5473,
5477,
5508,
5546,
5585,
5595,
5626,
5664,
5710,
5720,
5724,
5755,
5793,
5832,
5842,
5873,
5911,
5957,
5967,
5971,
5975,
6008,
6036,
6043,
6076,
6137,
6152,
6181,
6241,
6294,
6298,
6355,
6379,
6390,
6400,
6404,
6470,
6535,
6550,
6579,
6612,
6659,
6686,
6762,
6766,
6818,
6842,
6868,
6872,
6943,
6993,
7036,
7040,
7081,
7085,
7150,
7174,
7209,
7242,
7306,
7344,
7402,
7422,
7486,
7499,
7510,
7514,
7567,
7591,
7626,
7696,
7734,
7766,
7786,
7845,
7858,
7874,
7884,
7888,
7939,
8005,
8020,
8049,
8082,
8129,
8205,
8209,
8233,
8237,
8288,
8320,
8324,
8366,
8370,
8435,
8459,
8494,
8558,
8596,
8654,
8674,
8744,
8757,
8768,
8772,
8825,
8849,
8884,
8954,
8992,
9024,
9044,
9103,
9116,
9127,
9131,
9147,
9173,
9183,
9187,
9223,
9252,
9267,
9296,
9300,
9347,
9356,
9399,
9450,
9454,
9491,
9495,
9563,
9623,
9627,
9648,
9672,
9676,
9686,
9690,
9756,
9811,
9826,
9853,
9886,
9933,
9962,
9971,
10023,
10047,
10051,
10114,
10156,
10199,
10203,
10236,
10240,
10305,
10329,
10364,
10397,
10408,
10412,
10469,
10542,
10553,
10563,
10567,
10571,
10622,
10678,
10693,
10726,
10773,
10802,
10806,
10830,
10894,
10898,
10932,
10936,
10996,
11020,
11055,
11071,
11075,
11131,
11195,
11206,
11216,
11220,
11253,
11284,
11299,
11328,
11367,
11423,
11472,
11482,
11486,
11547,
11606,
11621,
11650,
11703,
11712,
11763,
11767,
11831,
11883,
11887,
11940,
11962,
12011,
12035,
12046,
12050,
12096,
12148,
12159,
12169,
12173,
12206,
12231,
12246,
12250,
12279,
12283,
12332,
12361,
12372,
12381,
12424,
12475,
12479,
12519,
12545,
12556,
12565,
12581,
12602,
12626,
12636,
12640,
12671,
12686,
12732,
12781,
12785,
12828,
12879,
12883,
12922,
12938,
12962,
12972,
12976,
13028,
13080,
13095,
13126,
13159,
13163,
13222,
13269,
13273,
13320,
13355,
13366,
13382,
13405,
13429,
13439,
13443,
13450,
13454,
13481,
13524,
13533,
13604,
13682,
13726,
13735,
13809,
13883,
13957,
14028,
14098,
14171,
14244,
14269,
14278,
14355,
14429,
14509,
14590,
14664,
14743,
14821,
14862,
14871,
14901,
14933,
14965,
14995,
15025,
15059,
15084,
15098,
15105,
15160,
15175,
15179,
15219,
15265,
15318,
15360,
15410,
15414,
15432,
15436,
15468,
15488,
15511,
15535,
15547,
15551,
15584,
15588,
15592,
15620,
15624,
15651,
15678,
15682,
15702,
15706,
15743,
15747,
15751,
15796,
15800,
15845,
15849,
15900,
15904,
15955,
15979,
16009,
16020,
16025,
16099,
16132,
16192,
16221,
16241,
16290,
16303,
16329,
16353,
16364,
16368,
16401,
16434,
16459,
16485,
16509,
16549,
16577,
16599,
16627,
16642,
16670,
16696,
16719,
16748,
16772,
16801,
16824,
16866,
16895,
16917,
16951,
16990,
17020,
17044,
17075,
17092,
17107,
17127,
17157,
17183,
17207,
17247,
17276,
17298,
17327,
17342,
17355,
17380,
17391,
17395,
17435,
17454,
17488,
17517,
17546,
17573,
17588,
17608,
17633,
17646,
17673,
17727,
17763,
17801,
17835,
17862,
17886,
17947,
17984,
18010,
18029,
18053,
18070,
18092,
18114,
18129,
18142,
18180,
18207,
18218,
18222,
18257,
18280,
18291,
18301,
18305,
18318,
18322,
18383,
18394,
18462,
18535,
18612,
18689,
18769,
18844,
18873,
18908,
18926,
18977,
18990,
19059,
19095,
19141,
19174,
19185,
19189,
19226,
19230,
19301,
19354,
19367,
19434,
19487,
19546,
19550,
19602,
19615,
19665,
19715,
19719,
19778,
19791,
19843,
19879,
19889,
19893,
19940,
19951,
20025,
20063,
20101,
20105,
20152,
20163,
20235,
20283,
20316,
20367,
20394,
20436,
20447,
20456,
20460,
20507,
20518,
20558,
20582,
20605,
20627,
20638,
20647,
20651,
20665,
20705,
20748,
20752,
20796,
20856,
20865,
20869,
20882,
20926,
20937,
20977,
20997,
21024,
21051,
21066,
21106,
21186,
21255,
21301,
21337,
21370,
21426,
21479,
21522,
21560,
21584,
21601,
21616,
21629,
21696,
21728,
21765,
21780,
21793,
21837,
21870,
21888,
21899,
21908,
21912,
21916,
21930,
21934,
21959,
21979,
21983,
22060,
22091,
22095,
22103,
22107,
22136,
22197,
22206,
22279,
22348,
22409,
22418,
22498,
22579,
22629,
22638,
22720,
22796,
22875,
22935,
22944,
22974,
23046,
23109,
23159,
23172,
23176,
23205,
23236,
23278,
23334,
23338,
23369,
23380,
23455,
23528,
23599,
23678,
23721,
23757,
23820,
23892,
23969,
23973,
23977,
24007,
24018,
24059,
24093,
24159,
24202,
24232,
24243,
24252,
24256,
24270,
24314,
24359,
24364,
24377,
24381,
24449,
24460,
24521,
24552,
24617,
24643,
24714,
24777,
24786,
24790,
24821,
24892,
24918,
24989,
25052,
25061,
25065,
25133,
25144,
25205,
25257,
25320,
25393,
25474,
25503,
25512,
25516,
25568,
25637,
25710,
25791,
25820,
25829,
25833,
25847,
25851,
25926,
25994,
26064,
26141,
26225,
26278,
26307,
26371,
26421,
26437,
26462,
26509,
26575,
26598,
26607,
26611,
26624,
26628,
26697,
26708,
26770,
26808,
26861,
26934,
26987,
27016,
27080,
27130,
27141,
27201,
27271,
27294,
27303,
27307,
27323,
27327,
27396,
27447,
27458,
27535,
27610,
27664,
27702,
27732,
27757,
27787,
27840,
27849,
27853,
27903,
27914,
27962,
28007,
28072,
28099,
28103,
28114,
28144,
28184,
28211,
28241,
28307,
28347,
28383,
28427,
28449,
28491,
28506,
28540,
28600,
28646,
28661,
28674,
28685,
28751,
28794,
28835,
28866,
28926,
28978,
28991,
29002,
29046,
29086,
29126,
29183,
29222,
29235,
29246,
29255,
29259,
29291,
29329,
29356,
29428,
29476,
29485,
29489,
29502,
29506,
29589,
29600,
29676,
29741,
29777,
29814,
29823,
29827,
29879,
29890,
29969,
30044,
30104,
30140,
30149,
30153,
30167,
30171,
30256,
30283,
30290,
30314,
30339,
30402,
30406,
30475,
30483,
30487,
30516,
30577,
30586,
30665,
30749,
30788,
30797,
30877,
30959,
31033,
31063,
31072,
31154,
31230,
31309,
31369,
31378,
31453,
31531,
31585,
31594,
31624,
31696,
31759,
31809,
31822,
31826,
31855,
31886,
31928,
31970,
32026,
32030,
32061,
32072,
32147,
32220,
32292,
32368,
32441,
32482,
32526,
32570,
32607,
32670,
32734,
32807,
32884,
32964,
33015,
33099,
33109,
33140,
33152,
33194,
33229,
33296,
33340,
33371,
33383,
33393,
33398,
33413,
33458,
33504,
33509,
33523,
33528,
33597,
33609,
33671,
33703,
33769,
33796,
33868,
33932,
33942,
33947,
33979,
34051,
34078,
34150,
34214,
34224,
34229,
34298,
34310,
34372,
34425,
34489,
34563,
34606,
34674,
34684,
34689,
34742,
34812,
34886,
34929,
34997,
35007,
35012,
35027,
35032,
35108,
35177,
35248,
35326,
35411,
35465,
35495,
35560,
35611,
35623,
35649,
35697,
35764,
35788,
35798,
35803,
35817,
35822,
35892,
35904,
35967,
36006,
36060,
36134,
36188,
36218,
36283,
36334,
36346,
36407,
36478,
36502,
36512,
36517,
36534,
36539,
36609,
36661,
36673,
36751,
36827,
36882,
36921,
36952,
36978,
37009,
37063,
37073,
37078,
37129,
37141,
37190,
37236,
37287,
37358,
37370,
37436,
37464,
37469,
37481,
37512,
37556,
37584,
37615,
37682,
37723,
37768,
37805,
37828,
37871,
37887,
37922,
37983,
38030,
38046,
38060,
38072,
38139,
38183,
38225,
38257,
38318,
38371,
38385,
38397,
38442,
38483,
38534,
38583,
38632,
38690,
38730,
38744,
38756,
38766,
38771,
38804,
38843,
38871,
38944,
38993,
39003,
39008,
39022,
39027,
39111,
39123,
39200,
39266,
39303,
39341,
39351,
39356,
39409,
39421,
39501,
39577,
39638,
39675,
39685,
39690,
39705,
39710,
39784,
39804,
39812,
39840,
39848,
39873,
39899,
39963,
39968,
40038,
40115,
40124,
40129,
40159,
40232,
40242,
40321,
40399,
40466,
40476,
40557,
40640,
40724,
40734,
40808,
40885,
40962,
41035,
41057,
41067,
41150,
41227,
41307,
41375,
41385,
41466,
41546,
41606,
41616,
41647,
41720,
41785,
41836,
41850,
41855,
41885,
41917,
41960,
42003,
42048,
42105,
42110,
42142,
42154,
42228,
42305,
42382,
42458,
42535,
42594,
42638,
42683,
42725,
42793,
42862,
42940,
43017,
43097,
43148,
43232,
43242,
43273,
43285,
43328,
43364,
43431,
43475,
43506,
43518,
43528,
43533,
43548,
43595,
43642,
43647,
43661,
43666,
43746,
43758,
43831,
43863,
43931,
43958,
44030,
44094,
44104,
44109,
44141,
44215,
44242,
44314,
44378,
44388,
44393,
44473,
44485,
44558,
44611,
44677,
44753,
44835,
44865,
44875,
44880,
44933,
45005,
45081,
45164,
45194,
45204,
45209,
45224,
45229,
45305,
45375,
45447,
45526,
45611,
45665,
45695,
45760,
45811,
45823,
45849,
45897,
45965,
45989,
45999,
46004,
46018,
46023,
46104,
46116,
46190,
46229,
46285,
46361,
46415,
46445,
46510,
46561,
46573,
46634,
46706,
46730,
46740,
46745,
46823,
46835,
46906,
46938,
47005,
47035,
47107,
47171,
47181,
47186,
47218,
47291,
47321,
47393,
47457,
47467,
47472,
47550,
47562,
47633,
47686,
47751,
47830,
47876,
47944,
47954,
47959,
48012,
48083,
48162,
48208,
48276,
48286,
48291,
48306,
48311,
48387,
48460,
48539,
48624,
48702,
48738,
48811,
48847,
48921,
48950,
48960,
48965,
48979,
48984,
49063,
49075,
49147,
49186,
49241,
49316,
49357,
49398,
49422,
49432,
49437,
49454,
49459,
49529,
49581,
49593,
49672,
49748,
49803,
49842,
49873,
49899,
49930,
49985,
49995,
50000,
50051,
50063,
50112,
50158,
50209,
50280,
50292,
50359,
50387,
50392,
50404,
50435,
50479,
50507,
50538,
50605,
50646,
50691,
50728,
50751,
50794,
50810,
50845,
50906,
50953,
50969,
50983,
51052,
51098,
51142,
51176,
51239,
51294,
51310,
51324,
51336,
51381,
51422,
51473,
51522,
51572,
51630,
51670,
51684,
51696,
51706,
51711,
51744,
51783,
51811,
51886,
51935,
51945,
51950,
51964,
51969,
52053,
52065,
52146,
52216,
52253,
52291,
52301,
52306,
52370,
52382,
52462,
52549,
52612,
52650,
52660,
52665,
52727,
52739,
52817,
52899,
52977,
53011,
53072,
53090,
53109,
53153,
53179,
53225,
53258,
53305,
53324,
53386,
53446,
53458,
53468,
53473,
53488,
53493,
53531,
53605,
53633,
53641,
53666,
53692,
53757,
53762,
53833,
53910,
53919,
53924,
53954,
54012,
54022,
54101,
54139,
54149,
54214,
54246,
54256,
54287,
54320,
54381,
54432,
54462,
54505,
54519,
54527,
54559,
54571,
54641,
54713,
54789,
54866,
54907,
54982,
55043,
55086,
55163,
55214,
55291,
55301,
55306,
55337,
55349,
55388,
55421,
55426,
55441,
55480,
55523,
55528,
55542,
55547,
55612,
55624,
55682,
55737,
55791,
55821,
55882,
55933,
55945,
56026,
56036,
56041,
56058,
56063,
56133,
56185,
56197,
56272,
56347,
56402,
56441,
56472,
56498,
56529,
56581,
56591,
56596,
56647,
56659,
56708,
56754,
56805,
56876,
56888,
56916,
56954,
56995,
57023,
57045,
57111,
57150,
57208,
57242,
57263,
57275,
57343,
57387,
57428,
57460,
57522,
57575,
57589,
57601,
57611,
57616,
57649,
57688,
57716,
57785,
57834,
57844,
57852,
57867,
57872,
57898,
57903,
57986,
58015,
58092,
58101,
58106,
58136,
58194,
58204,
58283,
58321,
58331,
58396,
58428,
58438,
58469,
58502,
58563,
58614,
58644,
58687,
58701,
58709,
58741,
58753,
58823,
58895,
58971,
59048,
59089,
59164,
59225,
59268,
59345,
59396,
59473,
59483,
59488,
59519,
59531,
59570,
59603,
59618,
59657,
59700,
59705,
59719,
59724,
59790,
59802,
59861,
59916,
59970,
60000,
60061,
60112,
60124,
60205,
60215,
60220,
60237,
60242,
60312,
60364,
60376,
60451,
60526,
60581,
60620,
60651,
60677,
60708,
60760,
60770,
60775,
60826,
60838,
60887,
60933,
60984,
61055,
61067,
61095,
61133,
61174,
61202,
61224,
61290,
61329,
61387,
61421,
61442,
61454,
61522,
61566,
61607,
61639,
61701,
61754,
61768,
61780,
61790,
61795,
61828,
61867,
61895,
61964,
62013,
62023,
62031,
62046,
62051,
62077,
62082,
62165,
62194,
62271,
62280,
62285,
62315,
62384,
62394,
62462,
62525,
62535,
62611,
62654,
62664,
62695,
62728,
62790,
62841,
62871,
62914,
62959,
62973,
62981,
63013,
63025,
63097,
63169,
63247,
63324,
63346,
63387,
63463,
63524,
63567,
63645,
63722,
63774,
63857,
63908,
63985,
63995,
64000,
64031,
64043,
64083,
64117,
64132,
64173,
64217,
64222,
64236,
64241,
64319,
64331,
64402,
64459,
64523,
64553,
64625,
64676,
64688,
64750,
64820,
64830,
64835,
64902,
64914,
64974,
65029,
65091,
65121,
65182,
65233,
65245,
65330,
65340,
65345,
65362,
65367,
65437,
65489,
65501,
65576,
65651,
65706,
65745,
65776,
65802,
65833,
65886,
65896,
65901,
65952,
65964,
66013,
66059,
66110,
66192,
66204,
66256,
66338,
66350,
66378,
66416,
66457,
66485,
66507,
66521,
66595,
66641,
66702,
66738,
66764,
66785,
66801,
66873,
66918,
66978,
67014,
67040,
67061,
67075,
67087,
67159,
67207,
67248,
67280,
67342,
67395,
67409,
67421,
67495,
67544,
67585,
67617,
67680,
67733,
67747,
67759,
67769,
67774,
67807,
67874,
67902,
67973,
68022,
68032,
68040,
68055,
68060,
68086,
68091,
68129,
68201,
68236,
68315,
68320,
68403,
68436,
68513,
68522,
68527,
68557,
68604,
68614,
68688,
68760,
68802,
68812,
68891,
68952,
68962,
68993,
69049,
69115,
69166,
69198,
69212,
69244,
69256,
69336,
69415,
69486,
69532,
69598,
69642,
69647,
69678,
69690,
69734,
69771,
69835,
69879,
69910,
69922,
69932,
69937,
69952,
70001,
70043,
70048,
70062,
70129,
70141,
70201,
70235,
70313,
70386,
70411,
70421,
70426,
70493,
70505,
70565,
70620,
70692,
70770,
70841,
70895,
70925,
70991,
71042,
71054,
71115,
71195,
71219,
71229,
71234,
71251,
71256,
71326,
71378,
71390,
71470,
71547,
71594,
71633,
71664,
71690,
71721,
71778,
71788,
71793,
71844,
71856,
71905,
71943,
71971,
72009,
72050,
72078,
72100,
72162,
72201,
72237,
72272,
72286,
72298,
72362,
72406,
72448,
72480,
72547,
72600,
72621,
72633,
72646,
72651,
72684,
72723,
72751,
72829,
72878,
72888,
72893,
72908,
72934,
72939,
73018,
73044,
73053,
73058,
73088,
73153,
73163,
73233,
73298,
73327,
73342,
73385,
73426,
73450,
73468,
73532,
73583,
73597,
73629,
73641,
73669,
73734,
73739,
73771,
73783,
73808,
73844,
73849,
73914,
73926,
73984,
74017,
74051,
74061,
74066,
74141,
74153,
74221,
74272,
74311,
74321,
74326,
74406,
74418,
74491,
74562,
74602,
74612,
74617,
74682,
74694,
74752,
74785,
74819,
74829,
74834,
74909,
74921,
74989,
75040,
75079,
75089,
75094,
75174,
75186,
75259,
75330,
75370,
75380,
75385,
75461,
75473,
75542,
75576,
75611,
75621,
75626,
75702,
75724,
75736,
75815,
75867,
75907,
75917,
75922,
76003,
76025,
76037,
76121,
76193,
76234,
76244,
76249,
76327,
76339,
76410,
76441,
76472,
76482,
76487,
76566,
76588,
76600,
76682,
76731,
76767,
76777,
76782,
76858,
76879,
76891,
76969,
77039,
77076,
77086,
77091,
77169,
77181,
77252,
77283,
77314,
77324,
77329,
77408,
77430,
77442,
77524,
77573,
77609,
77619,
77624,
77700,
77721,
77733,
77811,
77881,
77918,
77928,
77934,
78010,
78035,
78047,
78129,
78161,
78193,
78203,
78208,
78283,
78320,
78332,
78407,
78437,
78487,
78524,
78534,
78539,
78614,
78647,
78659,
78731,
78760,
78831,
78869,
78879,
78884,
78890,
78965,
78977,
79045,
79081,
79117,
79127,
79132,
79208,
79230,
79242,
79321,
79375,
79416,
79426,
79431,
79513,
79525,
79600,
79675,
79717,
79727,
79732,
79796,
79823,
79833,
79838,
79855,
79863,
79933,
79985,
79997,
80064,
80111,
80150,
80187,
80220,
80259,
80290,
80341,
80387,
80418,
80469,
80516,
80547,
80599,
80643,
80674,
80722,
80766,
80797,
80845,
80890,
80921,
80970,
81019,
81050,
81103,
81122,
81160,
81186,
81198,
81221,
81231,
81236,
81297,
81309,
81363,
81401,
81440,
81493,
81539,
81592,
81639,
81693,
81737,
81788,
81832,
81883,
81928,
81980,
82029,
82085,
82097,
82110,
82115,
82130,
82135,
82213,
82247,
82281,
82320,
82351,
82385,
82397,
82434,
82444,
82449,
82528,
82562,
82605,
82646,
82670,
82704,
82716,
82726,
82731,
82760,
82788,
82830,
82835,
82900,
82911,
82916,
82959,
83002,
83046,
83051,
83091,
83131,
83172,
83177,
83222,
83227,
83270,
83275,
83304,
83309,
83318,
83323,
83329,
83340,
83403
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 83403,
"ccnet_original_nlines": 2334,
"rps_doc_curly_bracket": 0.00803328026086092,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.130437433719635,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0014642199967056513,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4941736161708832,
"rps_doc_frac_unique_words": 0.3351863920688629,
"rps_doc_mean_word_length": 5.835622310638428,
"rps_doc_num_sentences": 583,
"rps_doc_symbol_to_word_ratio": 0.0011591699440032244,
"rps_doc_unigram_entropy": 6.5350823402404785,
"rps_doc_word_count": 9174,
"rps_doc_frac_chars_dupe_10grams": 0.10195008665323257,
"rps_doc_frac_chars_dupe_5grams": 0.27073371410369873,
"rps_doc_frac_chars_dupe_6grams": 0.2084391862154007,
"rps_doc_frac_chars_dupe_7grams": 0.17709578573703766,
"rps_doc_frac_chars_dupe_8grams": 0.14044755697250366,
"rps_doc_frac_chars_dupe_9grams": 0.12374851107597351,
"rps_doc_frac_chars_top_2gram": 0.020621640607714653,
"rps_doc_frac_chars_top_3gram": 0.008741780184209347,
"rps_doc_frac_chars_top_4gram": 0.009937239810824394,
"rps_doc_books_importance": -8229.052734375,
"rps_doc_books_importance_length_correction": -8229.052734375,
"rps_doc_openwebtext_importance": -3947.6298828125,
"rps_doc_openwebtext_importance_length_correction": -3947.6298828125,
"rps_doc_wikipedia_importance": -3022.24267578125,
"rps_doc_wikipedia_importance_length_correction": -3022.24267578125
},
"fasttext": {
"dclm": 0.043537259101867676,
"english": 0.12540970742702484,
"fineweb_edu_approx": 2.5043578147888184,
"eai_general_math": 0.0000011900000345121953,
"eai_open_web_math": 0.822936475276947,
"eai_web_code": 0.9553946852684021
}
}
|
{
"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": "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": "-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": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,460,526,865,802,863,000
|
Fyrimynd:Oiiint/doc
Frá Wikipedia, hin frælsa alfrøðin
Jump to navigation Jump to search
This template is used to include the triple closed integral, usually in a mathematical formula. It overcomes a limitation of the TeX rendering which cannot display this symbol without clumsy workarounds.
Arguments[rætta wikitekst]
• preintegral the text or formula immediately before the integral
• intsubscpt the subscript below the integral
• integrand the text or formula immediately after the formula
All parameters are optional.
Examples[rætta wikitekst]
Default:
{{oiiint
| preintegral = <math>\frac{1}{\sqrt{2\pi}}</math>
| intsubscpt = <math>{\scriptstyle \Omega}</math>
| integrand = <math>\frac{\partial F}{\partial s} {\rm d}\Sigma</math>
}}
\oiiint
Mode = mathjax:
{{oiiint
| mode = mathjax
| preintegral = <math>\frac{1}{\sqrt{2\pi}}</math>
| intsubscpt = <math>{\scriptstyle \Omega}</math>
| integrand = <math>\frac{\partial F}{\partial s} {\rm d}\Sigma</math>
}}
\oiiint
Mode = png:
{{oiiint
| mode = png
| preintegral = <math>\frac{1}{\sqrt{2\pi}}</math>
| intsubscpt = <math>{\scriptstyle \Omega}</math>
| integrand = <math>\frac{\partial F}{\partial s} {\rm d}\Sigma</math>
}}
\oiiint
See also[rætta wikitekst]
Oriented boundary integrals over a 2-surface and 3-surface can be implemented by:
|
{
"url": "https://fo.wikipedia.org/wiki/Fyrimynd:Oiiint/doc",
"source_domain": "fo.wikipedia.org",
"snapshot_id": "crawl=CC-MAIN-2020-29",
"warc_metadata": {
"Content-Length": "38497",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2F52EYO6ZMMH6DOHRSFZ725E5WRPTRYU",
"WARC-Concurrent-To": "<urn:uuid:c1f0e074-0abd-49ae-8d8f-10d9c321d333>",
"WARC-Date": "2020-07-06T20:32:00Z",
"WARC-IP-Address": "208.80.154.224",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:Q6XUS6H372SYSTZC4LVISKDTAAFATMEO",
"WARC-Record-ID": "<urn:uuid:b0777797-27dc-47b9-99e3-fc677f9301dc>",
"WARC-Target-URI": "https://fo.wikipedia.org/wiki/Fyrimynd:Oiiint/doc",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:90d90100-7579-4e36-8ce0-5dc5142734bc>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-134.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,
20,
21,
56,
90,
91,
295,
296,
323,
324,
392,
440,
504,
505,
534,
535,
561,
562,
571,
572,
581,
632,
682,
753,
756,
757,
765,
766,
782,
783,
792,
809,
860,
910,
981,
984,
985,
993,
994,
1006,
1007,
1016,
1029,
1080,
1130,
1201,
1204,
1205,
1213,
1214,
1240,
1241
],
"line_end_idx": [
20,
21,
56,
90,
91,
295,
296,
323,
324,
392,
440,
504,
505,
534,
535,
561,
562,
571,
572,
581,
632,
682,
753,
756,
757,
765,
766,
782,
783,
792,
809,
860,
910,
981,
984,
985,
993,
994,
1006,
1007,
1016,
1029,
1080,
1130,
1201,
1204,
1205,
1213,
1214,
1240,
1241,
1322
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1322,
"ccnet_original_nlines": 51,
"rps_doc_curly_bracket": 0.04084720090031624,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.13442623615264893,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.009836070239543915,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4229508340358734,
"rps_doc_frac_unique_words": 0.5744680762290955,
"rps_doc_mean_word_length": 6.794326305389404,
"rps_doc_num_sentences": 4,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.185200214385986,
"rps_doc_word_count": 141,
"rps_doc_frac_chars_dupe_10grams": 0.3716075122356415,
"rps_doc_frac_chars_dupe_5grams": 0.4279749393463135,
"rps_doc_frac_chars_dupe_6grams": 0.3716075122356415,
"rps_doc_frac_chars_dupe_7grams": 0.3716075122356415,
"rps_doc_frac_chars_dupe_8grams": 0.3716075122356415,
"rps_doc_frac_chars_dupe_9grams": 0.3716075122356415,
"rps_doc_frac_chars_top_2gram": 0.04175364971160889,
"rps_doc_frac_chars_top_3gram": 0.12839247286319733,
"rps_doc_frac_chars_top_4gram": 0.17536534368991852,
"rps_doc_books_importance": -98.31745910644531,
"rps_doc_books_importance_length_correction": -98.31745910644531,
"rps_doc_openwebtext_importance": -72.60581970214844,
"rps_doc_openwebtext_importance_length_correction": -72.60581970214844,
"rps_doc_wikipedia_importance": -50.567726135253906,
"rps_doc_wikipedia_importance_length_correction": -50.567440032958984
},
"fasttext": {
"dclm": 0.8649417757987976,
"english": 0.3368651568889618,
"fineweb_edu_approx": 3.3950083255767822,
"eai_general_math": 0.970441997051239,
"eai_open_web_math": 0.9622555375099182,
"eai_web_code": 0.025027990341186523
}
}
|
{
"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": "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": "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": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,836,700,980,458,376,000
|
Improving Data Processing Performance with Hadoop Data Locality
If you’re interested in this topic, please vote to see
Andrew Lazarev’s full talk, Performance of Hadoop on OpenStack, at the Spring OpenStack summit.
One of the major bottlenecks in data-intensive computing is cross-switch network traffic. Fortunately, having map code executing on the node where the data resides significantly reduces this problem. This technique, called “data locality”, is one of the key advantages of Hadoop Map/Reduce.
In this article, we’ll discuss the requirements for data locality, how the virtualized environment of OpenStack influences the Hadoop cluster topology, and how to achieve data locality using Hadoop with Savanna.
Requirements for Hadoop data locality
In order to get the benefit of all of the advantages of data-locality, you need to make sure that your system architecture satisfies several conditions.
First of all, the cluster should have the appropriate topology. Hadoop map code must have the ability to read data “locally”. Some popular solutions, such as networked storage (networked-attached storage [NAS] and storage-area networks [SANs]) will always cause network traffic, so in one sense you might not consider this “local”, but really, it’s a matter of perspective. Depending on your situation, you might define “local” as meaning “within a single datacenter” or “all on one rack”.
Second, Hadoop must be aware of the topology of the nodes where tasks are executed. Tasktracker nodes are used to execute map tasks, and so the Hadoop scheduler needs information about node topology for proper task assignment.
Last but not least, Hadoop must know where the data is located. This part can be a bit trickier because of the different storage engines supported by Hadoop. HDFS supports data locality out of the box, while other drivers (for example, Swift) need to be extended in order to provide data topology information to Hadoop.
Hadoop cluster topology on a virtualized infrastructure
Traditionally, Hadoop uses a three-layer network topology. These layers were originally specified as Data-Center, Rack, and Node, though the cross-Data-Center case isn’t common, and that layer is often used for defining top-level switches.
This topology works well for traditional hadoop cluster deployments, but it is hard to map a virtual environment into these three layers because there is no room for the hypervisor. Under certain circumstances, two virtual machines that are running on the same host can communicate much faster than they could on separate hosts, because there’s no network involved. That’s why starting with version 1.2.0, Hadoop supports the four-layer topology.
This new layer (called “node group”) corresponds to hypervisor that hosts virtual machines; several nodes may exist in individual VMs on a single host, controlled by a single hypervisor and thus able to communicate without having to go through the network.
Savanna and Hadoop Data Locality
OK, so knowing all that, how do you actually make it happen? One way is to use Savanna to set up your Hadoop clusters.
Savanna is an OpenStack project that allows you to deploy Hadoop clusters over OpenStack and execute tasks on it. The recent 0.3 release of Savanna added data locality support for the Vanilla plugin (the Hortonworks plugin will support data locality in the upcoming Icehouse release). With the improvement, Savanna can push the cluster topology configuration to Hadoop and enable data locality. In this way, Savanna supports both 3-layer and 4-layer network topologies. For 4-layer topology Savanna uses the compute node host ID as the Hadoop cluster node group identifier. (Note: You’ll want to be careful not to confuse Hadoop cluster node groups with Savanna node groups, which serve a different purpose.)
Savanna can also enable data locality for Swift input streams in Hadoop, but to do that, Hadoop needed to be enhanced with a specific Swift driver, because the Vanilla plugin uses Hadoop 1.2.1 without Swift support out of the box. The Swift driver was developed by Savanna team and has already been partially merged into Hadoop 2.4.0. The plan is to have it fully merged into the 2.x repo and then backported to 1.x.
Using data locality with Swift involves enabling it within Savanna, then specifying both the Compute and Swift topologies. Here’s a demonstration of how Savanna starts the Hadoop cluster and configures data locality on it:
Savanna Data Locality
Conclusion
Data processing on Hadoop in virtual environment is, perhaps, the next step in the evolution of Big Data. As clusters grow, it is extremely important to optimize consumed resources. Technologies like data locality can drastically decrease network use and allow you to work with large distributed clusters without losing the advantages of smaller, more local clusters. This gives you the opportunity for nearly infinite scaling on a Hadoop cluster.
Latest Tweets
WEBINAR
Mirantis and Ericsson on Edge Computing
|
{
"url": "https://www.mirantis.com/blog/improving-data-processing-performance-hadoop-data-locality/",
"source_domain": "www.mirantis.com",
"snapshot_id": "crawl=CC-MAIN-2018-51",
"warc_metadata": {
"Content-Length": "46162",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NY36VDSDQQJMO4BU4GAYE4NB7NCR5ZEB",
"WARC-Concurrent-To": "<urn:uuid:2ae6b1e0-0df0-4c29-96f2-f51e765185f1>",
"WARC-Date": "2018-12-12T08:09:11Z",
"WARC-IP-Address": "199.83.132.229",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:TZE2M2J6PNLRMODTRYQUAII35LADDGWF",
"WARC-Record-ID": "<urn:uuid:4dc50899-aa65-4e24-bd0f-96f5708b5cf6>",
"WARC-Target-URI": "https://www.mirantis.com/blog/improving-data-processing-performance-hadoop-data-locality/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:39e8b4bb-fe80-4a80-a303-fe60db64c136>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-81-186-35.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,
64,
65,
120,
216,
217,
510,
511,
723,
724,
762,
763,
916,
917,
1408,
1409,
1636,
1637,
1957,
1958,
2014,
2015,
2256,
2257,
2704,
2705,
2962,
2963,
2996,
2997,
3117,
3118,
3829,
3830,
4247,
4248,
4472,
4473,
4495,
4496,
4507,
4508,
4956,
4957,
4971,
4972,
4980
],
"line_end_idx": [
64,
65,
120,
216,
217,
510,
511,
723,
724,
762,
763,
916,
917,
1408,
1409,
1636,
1637,
1957,
1958,
2014,
2015,
2256,
2257,
2704,
2705,
2962,
2963,
2996,
2997,
3117,
3118,
3829,
3830,
4247,
4248,
4472,
4473,
4495,
4496,
4507,
4508,
4956,
4957,
4971,
4972,
4980,
5019
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5019,
"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.37985309958457947,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.00524658989161253,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.16054564714431763,
"rps_doc_frac_unique_words": 0.4559386968612671,
"rps_doc_mean_word_length": 5.217113494873047,
"rps_doc_num_sentences": 47,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.253072738647461,
"rps_doc_word_count": 783,
"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.0411260686814785,
"rps_doc_frac_chars_top_3gram": 0.013219090178608894,
"rps_doc_frac_chars_top_4gram": 0.005385559983551502,
"rps_doc_books_importance": -382.24700927734375,
"rps_doc_books_importance_length_correction": -382.24700927734375,
"rps_doc_openwebtext_importance": -235.09153747558594,
"rps_doc_openwebtext_importance_length_correction": -235.09153747558594,
"rps_doc_wikipedia_importance": -101.6142807006836,
"rps_doc_wikipedia_importance_length_correction": -101.6142807006836
},
"fasttext": {
"dclm": 0.0933789610862732,
"english": 0.9076852202415466,
"fineweb_edu_approx": 2.575599431991577,
"eai_general_math": 0.8251563310623169,
"eai_open_web_math": 0.49489980936050415,
"eai_web_code": 0.7809026837348938
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.44",
"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": "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": "10",
"label": "Knowledge Article"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,315,243,796,454,139,000
|
+1 (845) 317-8489 [email protected]
Tourism development is an important driver of growth for the future of Saudi Arabia. It is one of the key pillars at the heart of Vision 2030s plan to help diversify the economy and reduce reliance on oil.
The Saudi Tourism Authority is the official promoter of Visit Saudi. The Authority was established to support the growth of the travel and tourism sector. It developed VisitSaudi.com for information on Saudi Arabias diverse and fascinating tourism offer. You can easily discover events all around the kingdom from the Saudi Calendar.
Assuming that you are working on the back-end of this website, you will write a java program to store events data and process various requests. Your Java program should do the following:
Read the data from a text file and store it in a linked list (2 points)
Print all events around the kingdom (1 point)
Filter events by Date, City, Category, Audience or Fees (3 points)
Add, Remove or Edit an event (3 points)
Search for an event by name fully or partially (1 point)
|
{
"url": "https://intel-writers.com/add-remove-or-edit-an-event-3-points/",
"source_domain": "intel-writers.com",
"snapshot_id": "CC-MAIN-2024-18",
"warc_metadata": {
"Content-Length": "161007",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ANAH5KFUG6NE2YF6P2TWMSG6VTQ6TRTG",
"WARC-Concurrent-To": "<urn:uuid:4f956732-ce03-4729-8759-bb898b46312f>",
"WARC-Date": "2024-04-13T20:12:29Z",
"WARC-IP-Address": "104.21.87.9",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:KZRXILGIIETO36HOTMCYCSPD7QTOK4I4",
"WARC-Record-ID": "<urn:uuid:6bfbd4e0-1aca-42df-94b0-eed7efc32e8b>",
"WARC-Target-URI": "https://intel-writers.com/add-remove-or-edit-an-event-3-points/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:6ea01804-3c5e-408a-a0c2-282c8f458b97>"
},
"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 (info@commoncrawl.org)\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,
36,
37,
243,
577,
764,
836,
882,
949,
989
],
"line_end_idx": [
36,
37,
243,
577,
764,
836,
882,
949,
989,
1045
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1045,
"ccnet_original_nlines": 9,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.34112149477005005,
"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.18691588938236237,
"rps_doc_frac_unique_words": 0.6111111044883728,
"rps_doc_mean_word_length": 4.633333206176758,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.431350231170654,
"rps_doc_word_count": 180,
"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.011990410275757313,
"rps_doc_frac_chars_top_3gram": 0.038369301706552505,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -92.45531463623047,
"rps_doc_books_importance_length_correction": -92.45531463623047,
"rps_doc_openwebtext_importance": -50.30200958251953,
"rps_doc_openwebtext_importance_length_correction": -37.426368713378906,
"rps_doc_wikipedia_importance": -29.001405715942383,
"rps_doc_wikipedia_importance_length_correction": -29.001405715942383
},
"fasttext": {
"dclm": 0.020402969792485237,
"english": 0.9119178652763367,
"fineweb_edu_approx": 1.8515583276748657,
"eai_general_math": 0.014139589853584766,
"eai_open_web_math": 0.09506220370531082,
"eai_web_code": 0.0020751398988068104
}
}
|
{
"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": "952.02",
"labels": {
"level_1": "History and Geography",
"level_2": "Asia",
"level_3": "Japan"
}
}
},
"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": "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": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,729,578,313,957,657,000
|
Cutter's Crossing - WebManiacs http://www.cutterscrossing.com/index.cfm ColdFusion Development, Life, and Other Stuff en-us Sat, 19 Aug 2017 02:24:45 -0500 Tue, 29 Jul 2008 20:07:00 -0500 BlogCFC http://blogs.law.harvard.edu/tech/rss web.admin@cutterscrossing.com web.admin@cutterscrossing.com web.admin@cutterscrossing.com no Caught By The Bug http://www.cutterscrossing.com/index.cfm/2008/7/29/Caught-By-The-Bug The dreaded BlogCFC curse. After 30 days without a post you see the message 'Sorry, no post' (more or less). I'm busy. Way busy. Several side projects, fun at work with servers, and a few hush-hush things...I'm beat. I can't go into a ton of particulars on anything, but there are things coming. I am working on a custom asset manager written in <a href="http://www.adobe.com/products/coldfusion/" target="_blank">ColdFusion</a> and <a href="http://www.extjs.com" target="_blank">Ext</a>, that I'll be open sourcing, but it's taken a side burner for now. Ext is a blast, and I hope to continue to create and release Ext custom components, but I will always be using ColdFusion for my server-side code examples. Speaking of code, I still owe everyone my sample code from my <a href="http://www.webmaniacsconference.com" target="_blank">WebManiacs</a> Presentation. With all this activity, I am way behind the eight ball on rolling some of this up. I hope to get it out sometime within the week. I'm also hoping to get a chance, soon, to re-record the presentation. I had done it once before WebManiacs, for the <a href="http://www.ncfug.com" target="_blank">Nashville ColdFusion User Group</a>, but the recording was a wash. We'll try to get that scheduled soon, and get it out there for everyone. And, speaking of NCFUG, <a href="http://www.compoundtheory.com/" target="_blank">Mark Mandel</a> is presenting Thursday night, July 31<sup>st</sup> on <a href="http://www.transfer-orm.com/" target="_blank">Transfer</a>. Details can be found on the <a href="http://ncfug.com/index.cfm?fuseaction=dspMeetingInfo" target="_blank">NCFUG Meeting</a> page. That's all for now. I'll try not to let it go so long between posts this month. BlogCFC WebManiacs NCFUG ColdFusion 8 Development ColdFusion This Blog ExtJS Tue, 29 Jul 2008 20:07:00 -0500 http://www.cutterscrossing.com/index.cfm/2008/7/29/Caught-By-The-Bug WebManiacs Follow-Up http://www.cutterscrossing.com/index.cfm/2008/6/3/WebManiacs-FollowUp After <a href="http://www.webmaniacsconference.com" target="_blank">WebManiacs</a>, I thought it would be good to jot down some thoughts on conferences, and <a href="http://www.adobe.com/products/coldfusion/" target="_blank">ColdFusion</a> development in general. I was asked to speak at WebManiacs, which was my first conference speaking engagement, and although my session was somewhat small (last session that day), I had a great group who seemed to really enjoy my presentation, with a lot of questions, comments, and discussion afterwards. All in all a lot of fun. That being said, the conference was... lacking a little. Now, in all fairness, it was the first of it's kind, the first for <a href="http://www.figleaf.com/" target="_blank">FigLeaf</a> (of this size), and a learning experience for everyone involved.<h2>Quick Rundown</h2> It was an honor to be asked to speak at this conference. The list of speakers was impressive, and the breadth of the subject matter appeared to state a great, high end Adobe developers conference. What wasn't apparent was the level of sessions being run. On the face, it looked like there would be some very nice advanced tracks in multiple disciplines. In reality, most attendees came away feeling as if the material was overly introductory. What was the true target audience of the conference? Was it catering to advanced developers? Or was it more geared to those just entering the field? In this respect, the lines were really blurry. It has to be hard to peg this down, when two topics of major focus (<a href="http://www.adobe.com/products/flex/?promoid=BPDEQ" target="_blank">Flex</a> and <a href="http://www.adobe.com/products/air/" target="_blank">AIR</a>) are still mostly new disciplines. Flex has been around for a while, but has changed significantly since the 1.0-1.5 days. AIR is extremely new, but the majority of AIR development involves disciplines that web developers are typically already familiar with. My experience with Flex is very limited, so I got a lot out of my hands on session with Dave Watts (who I've known for a while on <a href="http://www.houseoffusion.com/groups/cf-talk/" target="_blank">CF-Talk</a>, and is a great teacher), as well as my session with <a href="http://www.simonfree.com" target="_blank">Simon Free</a>, who was a great last minute stand in for <a href="http://www.horwith.com" target="_blank">Simon Horwith</a> (who had to stay at the office with a project). Both of these session were very introductory, which is what I needed. There were other sessions, however, that I thought would be more advanced than they were. I wasn't alone in this perception. <h2>What Do You Want?</h2> I can never claim that I know everything about ColdFusion, or even programming as a whole. But, I have been doing this for a while. With the exception of some of the newer features of ColdFusion 8 (like the session I held on ColdFusion 8 Ajax and Extending Through ExtJS), and things like reports and graphing, there really isn't much in ColdFusion that I haven't learned in the last eight years of development. I've experimented with most of the major frameworks, dabbled in code generation, done heavy reading and experimentation with the JVM configs, and I'm pretty proficient in scoping my vars and writing CFCs. What does a conference hold for a developer at my level? Well, this one didn't have a lot, to be honest. I guess that's what I meant by "What's the target audience?" In my opinion, the difference between WebManiacs and <a href="http://www.cfunited.com" target="_blank">CFUnited</a> was a heavier focus on Flex and AIR. But, you could get those same sessions out of 360 Flex or Adobe MAX, given their introductory nature, so what really makes it different? Overwhelmingly it was agreed that next year FigLeaf would need to place a scale (beginner, intermediate, advanced) on sessions, and I'm fairly sure FigLeaf got that message. What I would like to see is a higher focus for advanced developers. Along with it's introductory tracks, I'd love to see some advanced hands on tracks for developing with the major frameworks. I had a lot of people asking me about using <a href="http://www.coldspringframework.org" target="_blank">ColdSpring</a>'s advanced features, like auto generation of <a href="http://coldspringframework.org/docs/Developing_w__ColdSpring.htm#Remote_Facades" target="_blank">RemoteProxy</a> objects. I also heard a lot of folks asking about JVM tuning, and JRun configuration, as well as server virtualization. These are the types of things we get into once we're way past mastering <em>cfloop</em> and <em>cfquery</em>, and the type of knowledge developers crave to get to the next level. How does one truly configure for localized development? Configure and use ISAPI re-write on different platforms for SES Urls? Advanced <a href="http://httpd.apache.org/" target="_blank">Apache</a> configuration? How does one define Business Process Models for their applications? How do you begin using <a href="http://subversion.tigris.org/" target="_blank">Subversion</a>? How can <a href="http://ant.apache.org/" target="_blank">Ant</a> assist your development cycle? How do you plan architecture for a high-traffic, high-availability application? When does it make sense to do code refactoring? What are some of the most common (and not so common) design patterns, and what scenarios make best for their use? How do you track down an apparent memory leak within your application? <h2>OK, What Else?</h2> Being my first conference gig, and in my nervousnous, I went through my slide presentation pretty quickly. Luckily I had a little sample app I had written for my presenetation, giving me plenty of sample code to show, explain, and answer questions on. In the end this was a really good thing, because that's what people really wanted to see, the code. I attended on session on Integrating Flex with <a href="http://www.adobe.com/products/livecycle/?promoid=BPDEO" target="_blank">Live Cycle</a>, in which I had to leave five minutes early to take a call from the office, but during my stay in the presentation the presenter didn't show one line of code. He wasn't the only one, and it was a comment I heard from a lot of the attendees. Most attendees were attending a session for which they already had some basic knowledge. What they were search of were concrete code examples, with detailed explanations, to reinforce what they already knew (letting them know they were doing it the right way), or to show them something new to them. It's a hard thing to do in a 50 minute presentation, but it's better than reading off the slides we can all download after the conference. <h2>Can A Conference Further Our Community?</h2> I was bouncing an idea off Simon Free one day over lunch. Speaking at this conference were some of the biggest names in the ColdFusion Community: <a href="http://www.coldfusionjedi.com/index.cfm" target="_blank">Ray Camden</a>, <a href="http://carehart.org/" target="_blank">Charlie Arehart</a>, <a href="http://www.mattwoodward.com/blog/" target="_blank">Matt Woodward</a>, <a href="http://www.pbell.com/" target="_blank">Peter Bell</a>, <a href="http://numtopia.com/terry" target="_blank">Terrance Ryan</a>, <a href="http://alagad.com/go/blog?createdBy=dhughes" target="_blank">Doug Hughes</a>, and many more (sorry if you weren't listed, but the list is extensive). With so much talent in the room, can't we put it to use? One of the big complaints I hear, about ColdFusion (in comparison to something like PHP, for instance), is the lack (or that perception) of complete enterprise level Open Source projects. No <a href="http://www.joomla.org" target="_blank">Joomla</a>, or <a href="http://www.drupal.org" target="_blank">Drupal</a>, or <a href="http://www.oscommerce.com" target="_blank">OSCommerce</a>, or <a href="http://www.phpbb.com" target="_blank">PHPBB</a>, or whatever. How cool would it be to watch and listen to some of these guys pick a project and plan it out. A two hour power session, where you watch the initial steps of project planning, definition of business process, outlining what the project should and shouldn't do (and why). There's no way it could be completely scoped in that short time frame, but imagine a session like this in the beginning of day one of a conference. All the notes get added to an online whiteboard, then people could contribute input, libraries, and pseudocode throughout the conference. Maybe, just maybe, people commit to the project by the time the conference ends, with a roadmap for the development of the project. <h2>Moving Forward</h2> I think FigLeaf is taking all feedback very seriously. And I don't want folks to get the wrong impression, I took away some great things from WebManiacs. I spent some time learning about PDF creation and manipulation. We learned, without a doubt, that <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS" target="_blank">BlazeDS</a> does not do true push via <a href="http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol" target="_blank">RTMP</a> (that was a revelation). With my limited knowledge of Flex, I was pleased to learn how similar it is to working with <a href="http://www.extjs.com" target="_blank">ExtJs</a>, in relation to it's component architecture and event driven model. I attended a fantastic session on scalability from <a href="http://jochem.vandieten.net/" target="_blank">Jochem Van Dieten</a>. I learned that internationalization is about much more than just a character set. I intentionally sat in on all of the frameworks intros to assess which might best serve our next generation apps (and learned that I still dislike <a href="http://www.fusebox.org" target="_blank">Fusebox</a>, but that's just me). I also got to meet a bunch of people who I've only emailed back and forth with for years, as well as talk to a few of my readers. Those conversations were the biggest take away. I've been a bit swamped with our datacenter migration project, but hopefully I'll get the opportunity to post my session slides and sample app sometime next week. Until then, what do you want from a developer's conference? CFManiacs WebManiacs ColdFusion 8 Development ColdFusion AIR ExtJS Tue, 03 Jun 2008 13:28:00 -0500 http://www.cutterscrossing.com/index.cfm/2008/6/3/WebManiacs-FollowUp Last Call For The WebManiacs Early Bird Pricing http://www.cutterscrossing.com/index.cfm/2008/3/14/Last-Call-For-The-WebManiacs-Early-Bird-Pricing Today is the last day for Early Bird Pricing for the <a href="http://www.webmaniacsconference.com" target="_blank">WebManiacs</a> conference in Washington, D.C. at the end of May. They have a truly impressive list of sessions on ColdFusion, Flex, and AIR development, including a small presentation from yours truly on the second day. Sign up today while you can still get the Early Bird Pricing! CFManiacs WebManiacs ColdFusion 8 ColdFusion Fri, 14 Mar 2008 14:27:00 -0500 http://www.cutterscrossing.com/index.cfm/2008/3/14/Last-Call-For-The-WebManiacs-Early-Bird-Pricing
|
{
"url": "http://www.cutterscrossing.com/rss.cfm?mode=full&mode2=cat&catid=AF36D138-3048-71C2-176B8CB44BA7B658",
"source_domain": "www.cutterscrossing.com",
"snapshot_id": "crawl=CC-MAIN-2017-34",
"warc_metadata": {
"Content-Length": "17788",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:56QCUUUQKDKSO3BN3VVVN3WDVL4Q3ZH7",
"WARC-Concurrent-To": "<urn:uuid:7a53f504-c238-464b-be73-8d4fd25cd7e0>",
"WARC-Date": "2017-08-19T05:24:45Z",
"WARC-IP-Address": "104.131.187.171",
"WARC-Identified-Payload-Type": "application/rss+xml",
"WARC-Payload-Digest": "sha1:JK7CWH4A7I6RADZO7FS6CGIGZCD4RERR",
"WARC-Record-ID": "<urn:uuid:1790515a-5946-483d-bed9-30227ad6e153>",
"WARC-Target-URI": "http://www.cutterscrossing.com/rss.cfm?mode=full&mode2=cat&catid=AF36D138-3048-71C2-176B8CB44BA7B658",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9069b73f-320b-45c5-9fa3-2c27dd247de6>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-164-105-233.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
],
"line_end_idx": [
13482
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 13482,
"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.32979387044906616,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025608990341424942,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.28169894218444824,
"rps_doc_frac_unique_words": 0.3829787075519562,
"rps_doc_mean_word_length": 5.532978534698486,
"rps_doc_num_sentences": 215,
"rps_doc_symbol_to_word_ratio": 0.0009369099861942232,
"rps_doc_unigram_entropy": 5.76865816116333,
"rps_doc_word_count": 1880,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.004229960031807423,
"rps_doc_frac_chars_dupe_6grams": 0.004229960031807423,
"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.004806770011782646,
"rps_doc_frac_chars_top_3gram": 0.002884059911593795,
"rps_doc_frac_chars_top_4gram": 0.0023072499316185713,
"rps_doc_books_importance": -1214.21875,
"rps_doc_books_importance_length_correction": -1214.21875,
"rps_doc_openwebtext_importance": -738.9456787109375,
"rps_doc_openwebtext_importance_length_correction": -738.9456787109375,
"rps_doc_wikipedia_importance": -631.189208984375,
"rps_doc_wikipedia_importance_length_correction": -631.189208984375
},
"fasttext": {
"dclm": 0.08896005153656006,
"english": 0.9211689829826355,
"fineweb_edu_approx": 1.1789904832839966,
"eai_general_math": 0.12552016973495483,
"eai_open_web_math": 0.25167959928512573,
"eai_web_code": 0.021875260397791862
}
}
|
{
"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": "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": "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": "9",
"label": "Personal/Misc"
},
"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": "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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
238,400,094,320,395,260
|
A Brief Introductory Guide To Know Everything About Roblox
0
55
You might or might not have probably heard of this unique gaming platform with 60+ Million users creating and playing games. Roblox is an independent platform to let gamers create their games or play games made by others. It provides a free platform for interaction, creation, and playing an infinite number of pastimes, but you’ll need to do Roblox top up (Roblox เติม เงิน, which is the term in Thai) to build games. And Robux is the platform that you’re looking to pay the membership fee and creating the games.
Popularity Reasons:
Through social media, people have connected so much through online portals, and you can find yourself getting referred to play on Roblox among your friends or might watch people streaming games on YouTube. And probably it is because you not only play but learn, interact, and many other things.
Can You Build Your Business Out Of Roblox?
There are so many players in the gaming industry that have not only be able to earn but build a full-fletched business. People are learning to collaborate and develop games on Roblox and now invest in their business plan. And for the gaming developers, it never feels like a job, and they can do it whenever they want.
Cost:
You get to download and play for free, but it contains in-app purchases in the name of Robux that is not compulsory to play, but you can use it to purchase accessories, clothes, avatars, and many others.
Facts You May Not Know:
1. Roblox is not a new platform but has been around since 2006 and has evolved with time, and originally it was named Dynablocks.
2. More than 60 million play it every month across the world.
3. You get paid for building games, and you get to learn while playing.
4. You get to learn a new programming language in their studio called Lua with advanced functioning.
5. So many games you play with tons of players for free.
Safety:
Most of us as parents are concerned about how our child is safe online, so Roblox has made sure to include parental controls under settings to keep them well informed. Make sure that the Date of Birth entered is correct so it will filter out those under 13 well in advance. You can monitor your child’s activity and interaction with the players. And developers of the Roblox game are working to secure these more for every user.
|
{
"url": "https://www.dtekcustoms.com/a-brief-introductory-guide-to-know-everything-about-roblox/",
"source_domain": "www.dtekcustoms.com",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "87643",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:J6RHU2FCDWS7J5MO2GWTNTJ3JL46CHAX",
"WARC-Concurrent-To": "<urn:uuid:23c86b8b-ecad-4dce-aea7-d88e4a18d1d3>",
"WARC-Date": "2021-05-08T01:42:16Z",
"WARC-IP-Address": "35.213.188.238",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EIN26KVCSFIDWCL252GYZR2EXS3MYZGD",
"WARC-Record-ID": "<urn:uuid:030aaa41-4a16-44f4-86a2-5a020202cab8>",
"WARC-Target-URI": "https://www.dtekcustoms.com/a-brief-introductory-guide-to-know-everything-about-roblox/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2e9bffb8-7766-4ec8-99e2-df53881e7f10>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-28.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,
59,
60,
62,
65,
66,
581,
582,
602,
603,
898,
899,
942,
943,
1262,
1263,
1269,
1270,
1474,
1475,
1499,
1500,
1632,
1696,
1770,
1873,
1932,
1933,
1941,
1942
],
"line_end_idx": [
59,
60,
62,
65,
66,
581,
582,
602,
603,
898,
899,
942,
943,
1262,
1263,
1269,
1270,
1474,
1475,
1499,
1500,
1632,
1696,
1770,
1873,
1932,
1933,
1941,
1942,
2370
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2370,
"ccnet_original_nlines": 29,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.44813278317451477,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.002074690070003271,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.14937758445739746,
"rps_doc_frac_unique_words": 0.5095694065093994,
"rps_doc_mean_word_length": 4.49521541595459,
"rps_doc_num_sentences": 25,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.952029228210449,
"rps_doc_word_count": 418,
"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.012772750109434128,
"rps_doc_frac_chars_top_3gram": 0.012772750109434128,
"rps_doc_frac_chars_top_4gram": 0.013837150298058987,
"rps_doc_books_importance": -224.62673950195312,
"rps_doc_books_importance_length_correction": -224.62673950195312,
"rps_doc_openwebtext_importance": -139.96958923339844,
"rps_doc_openwebtext_importance_length_correction": -139.96958923339844,
"rps_doc_wikipedia_importance": -103.03085327148438,
"rps_doc_wikipedia_importance_length_correction": -103.03085327148438
},
"fasttext": {
"dclm": 0.15254592895507812,
"english": 0.970032811164856,
"fineweb_edu_approx": 1.5459275245666504,
"eai_general_math": 0.015493630431592464,
"eai_open_web_math": 0.08813828229904175,
"eai_web_code": 0.02171807922422886
}
}
|
{
"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": "338.4",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Industries, Prices, and Microeconomics"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "1",
"label": "Factual"
},
"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": "10",
"label": "Knowledge Article"
},
"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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,209,925,255,113,283,600
|
Ludia Forums
I have no idea what happened
This is for reporting bugs only, if you are having trouble making a purchase or need help recovering your account please post in Help & Support here.
Please fill in the following fields!
Bug Description: some kind of major glitch in the player vs. Player Arena floor 9
Area is was found in: player vs. Player Arena floor 9
How do you reproduce the bug: I tried to fight a match
Step 1- I clicked on the button to find an opponent
Step 2 - it told me I had found an opponent and then proceeded to just glitch
(add more if needed)
How often does it happen: first and only time it has ever happened to me
What type of device are you using: Samsung Galaxy S10
Anything else? (add screenshots or additional information here)
https://linksharing.samsungcloud.com/nvMVMalQJcSI
https://linksharing.samsungcloud.com/qW9asRrDmjl2
I’m sorry that happened, Jeo6669. If you haven’t already, could you please reach out to our support team at support+forums@ludia.com with your support key and those screenshots? It’d help our team with their investigation.
If this happens again, please try quickly closing and relaunching the game and see if that helps.
|
{
"url": "https://forum.ludia.com/t/i-have-no-idea-what-happened/180027",
"source_domain": "forum.ludia.com",
"snapshot_id": "crawl=CC-MAIN-2021-17",
"warc_metadata": {
"Content-Length": "29215",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AX5JNGE6GKZWRGHHO5BYZ25O6KKCVKNX",
"WARC-Concurrent-To": "<urn:uuid:acc0ceab-244f-4f70-ab48-f7bec0784dbe>",
"WARC-Date": "2021-04-14T01:35:12Z",
"WARC-IP-Address": "216.218.159.27",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PP3BS6D6WLRM7MSBLJG63N3TK6HAGOG3",
"WARC-Record-ID": "<urn:uuid:b4ec5caa-691a-4255-bf53-20b279bded84>",
"WARC-Target-URI": "https://forum.ludia.com/t/i-have-no-idea-what-happened/180027",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4a06868f-2584-4b62-a984-4147f12c252a>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-199.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,
13,
14,
43,
44,
194,
195,
232,
233,
315,
316,
370,
371,
426,
478,
556,
577,
578,
651,
652,
706,
707,
771,
821,
871,
872,
1095,
1096
],
"line_end_idx": [
13,
14,
43,
44,
194,
195,
232,
233,
315,
316,
370,
371,
426,
478,
556,
577,
578,
651,
652,
706,
707,
771,
821,
871,
872,
1095,
1096,
1193
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1193,
"ccnet_original_nlines": 27,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4193548262119293,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024193549528717995,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1733870953321457,
"rps_doc_frac_unique_words": 0.6512820720672607,
"rps_doc_mean_word_length": 4.851282119750977,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.686249732971191,
"rps_doc_word_count": 195,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05285412073135376,
"rps_doc_frac_chars_dupe_6grams": 0.05285412073135376,
"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.010570820420980453,
"rps_doc_frac_chars_top_3gram": 0.029598310589790344,
"rps_doc_frac_chars_top_4gram": 0.0401691310107708,
"rps_doc_books_importance": -109.19339752197266,
"rps_doc_books_importance_length_correction": -109.19339752197266,
"rps_doc_openwebtext_importance": -49.71588134765625,
"rps_doc_openwebtext_importance_length_correction": -49.70109939575195,
"rps_doc_wikipedia_importance": -44.4146842956543,
"rps_doc_wikipedia_importance_length_correction": -44.4146842956543
},
"fasttext": {
"dclm": 0.11374372243881226,
"english": 0.9394227862358093,
"fineweb_edu_approx": 0.7696051597595215,
"eai_general_math": 0.01672285981476307,
"eai_open_web_math": 0.09023243188858032,
"eai_web_code": 0.006960330065339804
}
}
|
{
"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.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": "1",
"label": "Factual"
}
},
"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": "4",
"label": "Missing Images or Figures"
}
},
"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": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,137,997,761,234,753,500
|
Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!
Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×
Comment Stump the Chump (Score 1) 809
It seems pretty clear that your concept of competence is whether a developer has a question that can stump another. Therefore the test should be whether your interviewee has a question *you* don't have the answer to, not vice versa. As for encryption the test for expertise is whether a developer who is not a security specialist realizes that they don't know nearly enough to do it correctly and unless they've worked on that technology for years they're gonna do it wrong (and even the folks who've done it for years cannot escape making mistakes).
Comment Re:..that runs on the Java platform. (Score 2) 62
OCaml has been on the JVM for a long while ( http://www.ocamljava.org/ ). Although the OSS 1.x version did go closed there is a new 2.0 version that is OSS again. Kawa was one of the earliest LISPs for the JVM and has been used by plenty of folks for almost two decades. Per invented (although I don't think patented) many of the techniques folks have been using (or rediscovering) for other languages targeting the JVM.
Comment Re:It's called JTAG baby (Score 1) 270
The notion of security for a device for which someone has JTAG access is a joke, and I'm not being sarcastic. This article is purely trolling by putting "China" in the title. There is no chip of meaningful complexity made anywhere in the world that is safe from complete pwnage if JTAG access is available. Even if/when someone took the trouble to try and make sure there is no direct access to the key registers via JTAG, I guarantee that there are indirect means to read them. The fact that JTAG access to state elements is often added at synthesis from RTL means the functional designers often have no idea what can or can't be done via the JTAG for a particular chip. Absolutely no subterfuge needs to be imagined for manufacturer-generated JTAG elements to do arbitrary things besides the tiny subset they actually use which is testing. But back to my original point. If you've got JTAG access then there are any number of timing and/or RFI means that can be combined to read (and potentially write) any bit anywhere on the chip. There is no such thing as electronic security without physical security first.
Comment Re:Dates? (Score 1) 194
Yeah, that's what I was gonna say. Not to mention the many virtual worlds and many MPORPGs that preceded WoW. Very weird. But not really so weird when you consider Oracle thinks they have billions worth of damages from Android when OpenJDK is GPL. All it takes for a lawsuit is a lawyer who figures he can make a buck and plaintiff crazy enough to pay.
Comment That some serious myopia (Score 4, Informative) 364
Exactly how far back does your memory go? For decades while Microsoft held power over all computers that mattered the press was overwhelming pro-M$. A big part of that was of course because they poured an enormous amount of money into the publishers' coffers. Even whole publishers owed their existence to M$ and never would be heard a discouraging word (ever heard of Ziff-Davis?). Then there was this little thing of being convicted of illegal antitrust market manipulation and a few folks woke up to the idea that it is possible that not everything M$ puts out smells all that sweet.
Comment Calculus for Dummies rocks! (Score 1) 467
I had to wonder if my alter ego was posting this question, but I knew it couldn't be me since because I'd been out of school for 30 years before returning last fall. Statistics is now a required course for CS at my school and took it first thing (the academic adviser signed me up) and I did struggle a bit because I couldn't follow the proofs involving calculus without help, but I still got an A (we didn't have to know the proofs for the exams). But when I saw the text (Pattern Recognition by Bishop) for the Machine Learning & Data Mining class the next quarter I knew I had to seriously (re)learn some calculus. I looked through a number of books and when I found Calculus for Dummies by Mark Ryan I knew I'd found exactly what I needed, the workbook is helpful too but not essential. Don't bother with Calculus II for Dummies though, it just an ordinary (which is to say useless for the non-naturals) calculus text (although I did pick up PDE from it in a brief look through).
And as it happens, the rules on AP Calculus transfer have also changed and I'm probably gonna wind up taking first year calculus anyhow, although pretty much too late for it to do me much good (it would have been helpful to do that before those classes I mention above). I will probably take it online from a community college rather than at the university though, which is what I'm also doing for the foreign language requirement. Thirty years ago the university didn't make CS majors take a foreign language reasoning that computer languages were foreign. We knew that was a joke then, of course the joke on me is that they fixed it in the interim.
For free online resources, the Kahn Academy videos are pretty good if that form works for you. http://khanacademy.org/'
Don't listen to all the noise on in this thread. You're totally The Man for braving the slings and arrows in returning to school. It's actually pretty cool in a lot of ways. Among other things you get treated with a rather large measure of respect as a result of being old(er). That is probably on account of the kids thinking you're likely to be a professor or at least a grad student.
Comment Connexions (Score 1) 95
Connexions (http://cnx.org) is a project for open source book material that is designed to enable teachers to "mix & match" books that are then printed on demand. There are 2336 hits for "computer" in the catalog. No idea if any of that is useful to you. http://cnx.org/content/search?target=&words=computer&allterms=weakAND&search=Go There is also content on "open source in education": http://cnx.org/lenses/rgardler/foss
Slashdot Top Deals
Whom the gods would destroy, they first teach BASIC.
Working...
|
{
"url": "https://slashdot.org/~IQGQNAU",
"source_domain": "slashdot.org",
"snapshot_id": "crawl=CC-MAIN-2017-17",
"warc_metadata": {
"Content-Length": "108277",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:L37DUKUWMWEQ35BB3M2GNE5ZZYAIS3ZY",
"WARC-Concurrent-To": "<urn:uuid:15feb6a6-f628-4ed6-9a1f-a5b93a1245a8>",
"WARC-Date": "2017-04-25T19:34:11Z",
"WARC-IP-Address": "216.34.181.45",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:OUEJZZF6YCU3SV2Z3TO3U6OSTGEE4AAM",
"WARC-Record-ID": "<urn:uuid:6045144d-2177-488d-8c2c-8fb19e980d7c>",
"WARC-Target-URI": "https://slashdot.org/~IQGQNAU",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7a7853c5-6a5b-43d7-bf63-11460cfeee66>"
},
"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,
92,
93,
95,
96,
97,
98,
120,
134,
375,
376,
414,
415,
966,
967,
1025,
1026,
1447,
1448,
1495,
1496,
2610,
2611,
2643,
2644,
2997,
2998,
3058,
3059,
3646,
3647,
3697,
3698,
4682,
4683,
5334,
5335,
5455,
5456,
5843,
5844,
5876,
5877,
6301,
6302,
6321,
6322,
6375,
6376
],
"line_end_idx": [
92,
93,
95,
96,
97,
98,
120,
134,
375,
376,
414,
415,
966,
967,
1025,
1026,
1447,
1448,
1495,
1496,
2610,
2611,
2643,
2644,
2997,
2998,
3058,
3059,
3646,
3647,
3697,
3698,
4682,
4683,
5334,
5335,
5455,
5456,
5843,
5844,
5876,
5877,
6301,
6302,
6321,
6322,
6375,
6376,
6386
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6386,
"ccnet_original_nlines": 48,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.44044119119644165,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03970587998628616,
"rps_doc_frac_lines_end_with_ellipsis": 0.020408159121870995,
"rps_doc_frac_no_alph_words": 0.1558823436498642,
"rps_doc_frac_unique_words": 0.4719710648059845,
"rps_doc_mean_word_length": 4.550632953643799,
"rps_doc_num_sentences": 69,
"rps_doc_symbol_to_word_ratio": 0.0007352899992838502,
"rps_doc_unigram_entropy": 5.644587516784668,
"rps_doc_word_count": 1106,
"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.005960660055279732,
"rps_doc_frac_chars_top_3gram": 0.005364589858800173,
"rps_doc_frac_chars_top_4gram": 0.007550170179456472,
"rps_doc_books_importance": -690.5167236328125,
"rps_doc_books_importance_length_correction": -690.5167236328125,
"rps_doc_openwebtext_importance": -361.2851867675781,
"rps_doc_openwebtext_importance_length_correction": -361.2851867675781,
"rps_doc_wikipedia_importance": -238.45230102539062,
"rps_doc_wikipedia_importance_length_correction": -238.45230102539062
},
"fasttext": {
"dclm": 0.09998887777328491,
"english": 0.9642841815948486,
"fineweb_edu_approx": 1.4982759952545166,
"eai_general_math": 0.4599483013153076,
"eai_open_web_math": 0.3686198592185974,
"eai_web_code": 0.08331120014190674
}
}
|
{
"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": "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": "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": "16",
"label": "Personal Blog"
}
},
"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": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,836,230,210,546,963,000
|
Is WordPress Free? We Clear The Confusion
Published on September 6, 2022 by Simon Wright
There’s lots of misunderstanding over whether WordPress is free or not. Many folks may tell you that creating an excellent website for zero dollars is possible. Others will laugh at that notion and say you must spend tens, hundreds, or even thousands of greenbacks to get a site online.
However, fear not, as this article will clear things up once and for all. We’ll be looking at which elements of WordPress are free and which you might need to pay for. So, let’s plunge right in.
The Evolution of WordPress
One of the fundamental factors in understanding if WordPress is free or not is knowing its history and how it has since evolved.
WordPress is content management system (CMS) software for creating, editing, collaborating, storing, and publishing digital content. It first appeared in 2003 and was aimed specifically at the rapidly expanding blogging community.
Being completely free, WordPress quickly gained traction to become the number one choice for bloggers. Furthermore, being open-source, the software’s code was accessible, allowing developers (and tech-savvy users) to make deep customizations. However, it wasn’t long before people realized its potential outside of blogging, and they quickly began adapting it to other types of websites.
While in the early days, you needed a thorough understanding of coding to customize and adapt WordPress, numerous plugins and themes have since been developed. These are ‘bolt-ons’ that allow you to customize the platform to create almost any kind of website with no coding skills required.
Nowadays, WordPress is no longer just a blogging platform. In fact, the software currently drives over 43% of the websites on the Internet, ranging from simple single product pages through news channels to fancy corporate websites with lots of bells and whistles.
WordPress.org vs. WordPress.com – What’s the Difference?
Confusingly, two organizations offer WordPress – WordPress.org and WordPress.com, and we’ll now tell you about their differences.
• WordPress.org
WordPress.org is commonly known as self-hosted WordPress. It is the original free, open-source WordPress platform software distributed under what is known as the GNU General Public License, usually abbreviated to GPL.
Under the GPL, you can download, modify, customize, adapt, and use WordPress however you see fit, making it suitable for countless applications.
One crucial thing about WordPress.org is, provided you release it under the GPL, you are also at liberty to sell the code. That means if you are a developer, you can modify the platform’s code – for example, to create a specific type of website – and then sell it commercially.
• WordPress.com
Conversely, WordPress.com is a commercial hosted service that uses the WordPress.org software as its basis. Along with the software and hosting, you also get a domain name, making it very simple to get a site off the ground.
The downside of WordPress.com is it is not anywhere near as customizable as self-hosted WordPress, and adding features can get expensive.
Can I create a free website using WordPress.com?
The good news is you can use the free plan offered by WordPress.com to create a website for nothing. However, the bad news is that plan has limitations on storage, customizations, etc., making it suitable only for basic sites. Moreover, your domain name will have wordpress.com at the end. That looks awful and can impact how well your page ranks in searches.
To create a site that stands apart from the rest, you must invest in a premium WordPress.com plan. Depending on which you choose, these offer more features, customizations, a domain name, additional themes (which dictate how your site looks), and the ability to add plugins for extra functionality.
Currently, premium WordPress.com plans range from $4 per month for the ‘Personal’ to $45 per month if you want to build an eCommerce store. You can learn more about what each plan offers here.
So, what about creating a free website using WordPress.org?
Concerning WordPress.org, while the software is entirely free, there are some other things that you will need to pay for to get a website onto the www, namely:
The good news is that you can get hosting and a domain name for just a few bucks per month, so launching a website using WordPress.org is within the scope of virtually everyone.
For your site to work, you will also need to give it a theme. Themes are shortcuts to create the look of your website, and there are literally thousands (as opposed to WordPress.com’s hundreds) available from various sources, such as:
Don’t worry if you are on a tight budget, as plenty of free themes are available. However, if you have a few dollars to spare, a premium theme can help your site stand out, as they usually offer more features and customization possibilities than free ones.
Like WordPress.org, you can further extend the functionality of your WordPress.com website using plugins. Again, as with themes, there is a mind-boggling array of free and premium ones available via WordPress, third-party vendors, or directly from developers. However, WordPress.org has the upper hand over WordPress.com here, as you can add plugins to any site, whereas, to add them on WordPress.com, you will need at least the Business plan, which will add $25 per month to your budget. Ouch.
Which is easiest to use – WordPress.com or WordPress.org?
Creating a site using WordPress.com is quick and easy. Being fully hosted, everything is already set up for you, so all you must do is choose the plan and domain name you want and start adding content. Moreover, you won’t ever need to worry about backing up your website or updating the software, as WordPress.com does all of that for you.
On the other hand, using WordPress.org is a little more involved. For example, you must purchase hosting and a domain, link the two, install the WordPress software onto the host, add a theme and any plugins you are using, configure the settings, build the pages and menus, etc. You need to do all that before you can start adding your content. Moreover, you are responsible for implementing backups and software updates.
However, there are ways of making site creation on WordPress.org easier. For example:
• Companies like WP Bolt offer WordPress-specific hosting with single-click software installation. Such companies usually also install core WordPress updates automatically.
• Some companies offer both hosting and domain names. This can make linking the two more straightforward.
• You can use plugins to help automate backups. Furthermore, some hosting companies offer backups.
• Use drag-and-drop page builders and editors to assist with site, content, and even theme creation. Popular examples include Elementor, Beaver Builder, and Divi.
Which should you choose – WordPress.com or WordPress.org?
When choosing between WordPress.com and WordPress.org, there are some key questions you must ask yourself:
• How much technical expertise do you have?
If you are not tech-savvy, setting up a site using WordPress.com will be much easier than with WordPress.org, even if you must invest in a premium plan to add plugins. Moreover, should you opt for WordPress.org and have no technical knowledge, you may have to pay a coding specialist to create your site or fix things should they go wrong.
• How simple will the site be?
If you are looking for a basic one-page site or blog, the free or Personal WordPress.com plans may be the easiest option. However, if you want more freedom with the design, WordPress.org would be the one to choose, and it is unlikely to cost any more overall than the WordPress.com Personal plan.
• How much money are you happy to invest in your new site?
If you are building a basic site and aren’t overly worried about the domain having a wordpress.com extension, the free WordPress.com plan may suffice. However, suppose you are looking for something much fancier, with many customizations and functionality. In that case, you will need to compare the price of WordPress.com’s premium plans with the cost of adding premium themes and plugins to WordPress.org.
• How many features and customizations do you need?
A massive range of plugins and themes is available for WordPress.org. Furthermore, if you like getting your hands dirty, you can modify the platform’s code yourself. Conversely, WordPress.com does not have such an extensive range of plugins and themes, plus you cannot change the code.
• Do you plan on selling the site to a third party or managing it on their behalf?
If you are developing sites to sell commercially, WordPress.org is much more versatile and customizable than WordPress.com. Just be sure to follow the rules regarding the GPL.
• How concerned are you about security and where your data is stored?
With WordPress.com, your data is always stored on WordPress.com’s servers. Therefore, attacks on other people’s sites stored there can potentially spill over to yours. Conversely, with WordPress.org, you can choose where to keep everything, meaning you can opt for shared or cloud hosting. You can even put it on your own servers, although that is expensive.
Only when you have answered those questions will you be able to decide whether WordPress.com or .org is best for you.
Either way, unless you are building an elementary site, you’ll likely need to invest money to get the features and look you want. This is where things become a balancing act, as you must compare the cost of the WordPress.com plans with the cost of premium plugins and themes for WordPress.org.
Key Differences Between WordPress.com and WordPress.org
For your reference and to help you decide, here’s a table showing the key differences between WordPress.com and WordPress.org:
WordPress.com WordPress.org
Cost Free plan available, but with limited features. Premium plans cost from $4 to $59 monthly. Software is free, but at a minimum, you need to add hosting and a domain (starting from a few Dollars per month.)
Customization Possibilities Limited range of plugins and themes. Moreover, a more expensive plan is needed to add them. The core code is not accessible. Virtually limitless possibilities due to the range of available plugins and themes, plus the core code is accessible.
Support Varies depending on the plan purchased and is limited to email and live chat. A massive following means getting answers to problems is easy via forums, groups, YouTube, tutorials, etc.
Themes Over a hundred themes (free and premium) are available. Hundreds of themes (free and premium) are available. Furthermore, you can also create your own.
Plugins You can only add plugins if you purchase one of the more expensive plans. Thousands of plugins (free and premium) are available.
SEO Tools Advanced SEO tools only provided with more expensive plans Free SEO plugins are available, e.g., Yoast.
Backups and Updates Done by WordPress.com (except third-party plugins, if used) Your responsibility. However, some hosting providers will do core updates and/or backups, or you can use plugins to automate the process.
Security The user has no control over where the data is stored. The user has complete control over where the data is stored (depending on the hosting arrangements.)
Email accounts Requires a separate paid product called ‘Professional Email.’ Depending on your hosting company, you can create as many email accounts as you wish.
Migration It is possible to migrate websites from WordPress.org to WordPress.com. However, depending on plugin and theme availability, some functionality may be lost. Sites from WordPress.com can be migrated to WordPress.org relatively easily with little or no loss of functionality.
Some Final Words
As the old adage goes, there is no such thing as a free lunch. Sadly, this applies to the WordPress world also.
In fact, the only completely ‘free lunch’ available is with WordPress.com, but that is so basic that its range of applications is limited. As such, if you are looking to build a decent website that people will want to visit, you will have to pay for it. That is where you need to do your homework to see whether WordPress.com will work well for you or whether its .org counterpart would be better.
However, there’s a good reason why WordPress.org powers around 43% of websites – it’s so customizable that you can do virtually anything with it. Moreover, a vast range of plugins, themes, and a massive support network means you don’t need coding know-how to create a crowd-pleasing website or eCommerce store. But, of course, you’ll need hosting, and WP Bolt offers solutions to suit all budgets.
Stop leaving money on the table.
Speed up your WordPress site today by moving to WP Bolt.
Get Started
|
{
"url": "https://wpbolt.com/is-wordpress-free/",
"source_domain": "wpbolt.com",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "66924",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:YU2IU3Q26LWPDFSZCNKUHEZ4COK5LYOO",
"WARC-Concurrent-To": "<urn:uuid:75ce65dc-4523-427a-a922-2ce90cc0b207>",
"WARC-Date": "2024-07-15T20:25:48Z",
"WARC-IP-Address": "104.26.13.204",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GMUZDQTMFA6KOAK5B4RRNFURGUU2CJA2",
"WARC-Record-ID": "<urn:uuid:e426fc48-595d-41d5-900f-26538b72c602>",
"WARC-Target-URI": "https://wpbolt.com/is-wordpress-free/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:454221d5-6d7a-4394-bd4c-44db365bf162>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-148\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,
42,
43,
90,
91,
378,
379,
574,
575,
602,
603,
732,
733,
964,
965,
1353,
1354,
1645,
1646,
1910,
1911,
1968,
1969,
2099,
2100,
2118,
2119,
2337,
2338,
2483,
2484,
2762,
2763,
2781,
2782,
3007,
3008,
3146,
3147,
3196,
3197,
3557,
3558,
3857,
3858,
4051,
4052,
4112,
4113,
4273,
4274,
4452,
4453,
4688,
4689,
4946,
4947,
5442,
5443,
5501,
5502,
5842,
5843,
6264,
6265,
6351,
6352,
6527,
6635,
6736,
6901,
6902,
6960,
6961,
7068,
7069,
7115,
7116,
7456,
7457,
7490,
7491,
7788,
7789,
7850,
7851,
8258,
8259,
8313,
8314,
8600,
8601,
8686,
8687,
8863,
8864,
8936,
8937,
9296,
9297,
9415,
9416,
9710,
9711,
9767,
9768,
9895,
9896,
9924,
10134,
10405,
10598,
10757,
10894,
11008,
11226,
11391,
11554,
11838,
11839,
11856,
11857,
11969,
11970,
12368,
12369,
12767,
12768,
12801,
12802,
12859,
12860
],
"line_end_idx": [
42,
43,
90,
91,
378,
379,
574,
575,
602,
603,
732,
733,
964,
965,
1353,
1354,
1645,
1646,
1910,
1911,
1968,
1969,
2099,
2100,
2118,
2119,
2337,
2338,
2483,
2484,
2762,
2763,
2781,
2782,
3007,
3008,
3146,
3147,
3196,
3197,
3557,
3558,
3857,
3858,
4051,
4052,
4112,
4113,
4273,
4274,
4452,
4453,
4688,
4689,
4946,
4947,
5442,
5443,
5501,
5502,
5842,
5843,
6264,
6265,
6351,
6352,
6527,
6635,
6736,
6901,
6902,
6960,
6961,
7068,
7069,
7115,
7116,
7456,
7457,
7490,
7491,
7788,
7789,
7850,
7851,
8258,
8259,
8313,
8314,
8600,
8601,
8686,
8687,
8863,
8864,
8936,
8937,
9296,
9297,
9415,
9416,
9710,
9711,
9767,
9768,
9895,
9896,
9924,
10134,
10405,
10598,
10757,
10894,
11008,
11226,
11391,
11554,
11838,
11839,
11856,
11857,
11969,
11970,
12368,
12369,
12767,
12768,
12801,
12802,
12859,
12860,
12871
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 12871,
"ccnet_original_nlines": 131,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4326592981815338,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.005723009817302227,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17245325446128845,
"rps_doc_frac_unique_words": 0.29885056614875793,
"rps_doc_mean_word_length": 4.933907985687256,
"rps_doc_num_sentences": 198,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.548062324523926,
"rps_doc_word_count": 2088,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.051737528294324875,
"rps_doc_frac_chars_dupe_6grams": 0.031644340604543686,
"rps_doc_frac_chars_dupe_7grams": 0.006018249783664942,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.010483399964869022,
"rps_doc_frac_chars_top_3gram": 0.005435840226709843,
"rps_doc_frac_chars_top_4gram": 0.004950500093400478,
"rps_doc_books_importance": -1082.0557861328125,
"rps_doc_books_importance_length_correction": -1082.0557861328125,
"rps_doc_openwebtext_importance": -594.782470703125,
"rps_doc_openwebtext_importance_length_correction": -594.782470703125,
"rps_doc_wikipedia_importance": -245.02301025390625,
"rps_doc_wikipedia_importance_length_correction": -245.02301025390625
},
"fasttext": {
"dclm": 0.035055939108133316,
"english": 0.9307342767715454,
"fineweb_edu_approx": 1.7285758256912231,
"eai_general_math": 0.09521173685789108,
"eai_open_web_math": 0.08093816041946411,
"eai_web_code": 0.0332786999642849
}
}
|
{
"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": "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": "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": "10",
"label": "Knowledge Article"
},
"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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,094,349,134,616,486,000
|
Sideways: The Case For Turning Your Monitor Vertical
Much has been written in these pages of Unplggd about going vertical with your monitors. It's time we sat down and definitively find out if going vertical makes sense. Come check out our findings!Computer monitors used to be a 4x3 aspect ratio across the board, and when widescreen technology became all the craze we jumped to 16x9 to match HDTVs. As computer screen and TV technology started to merge, manufacturers seem to have settled on a weird 16x10 aspect ratio.
So what's the big deal about the widescreen aspect ratio, and why does every manufacturer insist on sticking with it? We run through several computer use cases in a battle of widescreen vs. vertical to see who the winner really is (or should be), starting with probably the single most time consuming thing we do on our computers, wasting time browsing the web.
Viewing Websites
According to w3schools.com, as of January 2011 14% of web browsers were running 1024x768 (a 4x3 aspect ratio), and 85% at a higher resolution.
Pin it button
*via w3schools.com
Having run a web design firm for the past 10 years, one of the things we pay careful attention to is the amount of real estate we have available. We want our websites to show up well on everyone's computer, and screen resolution is something we have to carefully consider. We've very slowly inched up the maximum dimensions of websites that we create, but believe it or not we're only now starting to use 1024x768 as a baseline. Taking into account user variables such as scrollbars and toolbars, we actually design for something just shy of 1000x700. That's a miniscule amount of space to work with before content starts to be deemed "below the fold" - where the user has to start to scroll to see more content. While users are extremely hesitant to scroll left and right, vertical scrolling is slightly more acceptable, and generally considered the norm for websites.
Since websites are designed for the lowest common denominator in this sense, let's consider websites designed to fit within a 1024x768 screen. Using our very own Unplggd as an example, it's designed at a snug 1017 pixels wide. In the following screen cap, on my own expansive 1920x1200 screen, you can see that the space on the sides is completely wasted, and we can see one visible article and an ad space.
Pin it button
Now take a look at Unplggd with the orientation flipped to portrait view at 1200x1920. We can see two articles and an ad, with a second ad peeking through. Much, much better!
Pin it button
Winner: Vertical
Watching Movies, TV, Widescreen Videos and Photos
Ok, so we get a screen that's formatted closer to modern HDTV content, widescreen movies to match the cinema experience. But let's face it, how is sitting hunched up at your desk watching your computer monitor anything close to an "experience." Eeven with a large monitor (23", 24", 27", 30" or what have you), that's still puny compared to the TV you have in your living room. Many of us consider 32" or even 42" small for the living room. Plus we get to sit on our comfy couch and relax.
Pin it button
For those streaming content to their computers, most modern video cards have HDMI outputs so you can hook up your computer to your TV anyway. So why suffer through a poor computer using experience for a widescreen monitor that only barely gets used for video content?
For photos and videos such as those from YouTube, we're all generally viewing them in tiny reduced formats as part of a website anyway, so unless we're busting out with the full screen view, the content isn't always going to require your full screen resolution anyway.
Winner: Widescreen, but really why are you watching content on your tiny computer monitor?
Word Processing and Spreadsheets
One of the arguments for widescreen monitors has always been the ability to have two documents open at one time. Admittedly, we don't edit very many documents, and when we do we're working on them one at a time. So there's probably a use case out there that this comes in handy for. Plus, spreadsheets work great for the widescreen format.
Pin it button
Winner: Widescreen
The Winner?
So the score's 1 to 2 in the battle of vertical versus widescreen. There are tons more use cases such as specific software, games, of course, so your mileage may vary. We guess widescreen still has its place, and that's why manufacturers keep making them the way they do. But with most our computer use focused around the web, it really does start to make sense to go vertical.
So what's a guy to do? How about dual monitors - one vertical, one widescreen? :)
More on aspect ratios and vertical monitors at Unplggd:
16 Comments
|
{
"url": "http://www.apartmenttherapy.com/going-vertical-154092",
"source_domain": "www.apartmenttherapy.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "78767",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VKK6TCN6RFJNP2MLUVBZHU2ERHKPM43L",
"WARC-Concurrent-To": "<urn:uuid:21b4530e-3077-4ec1-a390-10d4bcbf6fc1>",
"WARC-Date": "2014-04-19T21:11:43Z",
"WARC-IP-Address": "209.126.235.136",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:BWPPFZDTDRAT4AL7NYMRNKOOFRMOU7TP",
"WARC-Record-ID": "<urn:uuid:be0c148e-4084-4edb-93e6-0747e17ebea7>",
"WARC-Target-URI": "http://www.apartmenttherapy.com/going-vertical-154092",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9bcc001c-0955-4450-b8c0-5dbd93777d6a>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-4-33.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-15\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for April 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,
53,
54,
523,
524,
886,
887,
904,
905,
1048,
1049,
1063,
1082,
1083,
1953,
1954,
2362,
2363,
2377,
2378,
2553,
2554,
2568,
2569,
2586,
2587,
2637,
2638,
3128,
3129,
3143,
3411,
3412,
3681,
3682,
3773,
3774,
3807,
3808,
4148,
4149,
4163,
4164,
4183,
4184,
4196,
4197,
4575,
4576,
4658,
4659,
4715,
4716
],
"line_end_idx": [
53,
54,
523,
524,
886,
887,
904,
905,
1048,
1049,
1063,
1082,
1083,
1953,
1954,
2362,
2363,
2377,
2378,
2553,
2554,
2568,
2569,
2586,
2587,
2637,
2638,
3128,
3129,
3143,
3411,
3412,
3681,
3682,
3773,
3774,
3807,
3808,
4148,
4149,
4163,
4164,
4183,
4184,
4196,
4197,
4575,
4576,
4658,
4659,
4715,
4716,
4727
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4727,
"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.45652174949645996,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0062111797742545605,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.14492754638195038,
"rps_doc_frac_unique_words": 0.43329253792762756,
"rps_doc_mean_word_length": 4.588739395141602,
"rps_doc_num_sentences": 44,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.352514266967773,
"rps_doc_word_count": 817,
"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.006668440066277981,
"rps_doc_frac_chars_top_3gram": 0.014670579694211483,
"rps_doc_frac_chars_top_4gram": 0.008002130314707756,
"rps_doc_books_importance": -433.78582763671875,
"rps_doc_books_importance_length_correction": -433.78582763671875,
"rps_doc_openwebtext_importance": -286.547607421875,
"rps_doc_openwebtext_importance_length_correction": -286.547607421875,
"rps_doc_wikipedia_importance": -178.69737243652344,
"rps_doc_wikipedia_importance_length_correction": -178.69737243652344
},
"fasttext": {
"dclm": 0.6309794783592224,
"english": 0.9533397555351257,
"fineweb_edu_approx": 1.5000139474868774,
"eai_general_math": 0.1662369966506958,
"eai_open_web_math": 0.19683659076690674,
"eai_web_code": 0.1281794309616089
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.17",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"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": "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": "-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": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "16",
"label": "Personal Blog"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,105,988,091,421,837,000
|
Welcome to PyTables’ documentation!
PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data. You can download PyTables and use it for free. You can access documentation, some examples of use and presentations here.
PyTables is built on top of the HDF5 library, using the Python language and the NumPy package. It features an object-oriented interface that, combined with C extensions for the performance-critical parts of the code (generated using Cython), makes it a fast, yet extremely easy to use tool for interactively browsing, processing and searching very large amounts of data. One important feature of PyTables is that it optimizes memory and disk resources so that data takes much less space (specially if on-flight compression is used) than other solutions such as relational object oriented databases.
You can also find more information by reading the PyTables FAQ.
PyTables development is a continuing effort and we are always looking for more developers, testers, and users. If you are interested in being involved with this project, please contact us via github or the mailing list.
NumFocus Sponsored Stamp
Since August 2015, PyTables is a NumFOCUS project, which means that your donations are fiscally sponsored under the NumFOCUS umbrella. Please consider donating to NumFOCUS.
|
{
"url": "http://www.pytables.org/",
"source_domain": "www.pytables.org",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "10182",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LV43257FOKILZPI7NECEE7KIGP7IX2V4",
"WARC-Concurrent-To": "<urn:uuid:0eeb7733-5a82-4c7e-9ebf-9383d6317038>",
"WARC-Date": "2021-05-15T14:20:38Z",
"WARC-IP-Address": "185.199.110.153",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ECNKM6DGR3UATYURJOGM7K3HYM6YCJOG",
"WARC-Record-ID": "<urn:uuid:50eeea02-ec30-4ed5-bf26-af4167bbfb17>",
"WARC-Target-URI": "http://www.pytables.org/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ecd4e686-f780-41ab-ab62-df28d00768cb>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-245.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,
36,
37,
298,
299,
898,
899,
963,
964,
1184,
1185,
1210,
1211
],
"line_end_idx": [
36,
37,
298,
299,
898,
899,
963,
964,
1184,
1185,
1210,
1211,
1383
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1383,
"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.3983739912509918,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.012195119634270668,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1260162591934204,
"rps_doc_frac_unique_words": 0.6525821685791016,
"rps_doc_mean_word_length": 5.328638553619385,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.682514190673828,
"rps_doc_word_count": 213,
"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.035242289304733276,
"rps_doc_frac_chars_top_3gram": 0.019383259117603302,
"rps_doc_frac_chars_top_4gram": 0.03171806037425995,
"rps_doc_books_importance": -105.95513916015625,
"rps_doc_books_importance_length_correction": -105.9487075805664,
"rps_doc_openwebtext_importance": -76.14341735839844,
"rps_doc_openwebtext_importance_length_correction": -76.14341735839844,
"rps_doc_wikipedia_importance": -58.41444396972656,
"rps_doc_wikipedia_importance_length_correction": -56.911983489990234
},
"fasttext": {
"dclm": 0.15205109119415283,
"english": 0.9216290712356567,
"fineweb_edu_approx": 2.1307642459869385,
"eai_general_math": 0.44861340522766113,
"eai_open_web_math": 0.12409347295761108,
"eai_web_code": 0.06161307916045189
}
}
|
{
"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.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": "-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": "1",
"label": "About (Org.)"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,429,461,329,943,853,000
|
Passed
Push — master ( c0a3a7...3b84a4 )
by Jeroen
58:51
created
engine/classes/ElggDiskFilestore.php (1 issue)
1
<?php
2
/**
3
* A filestore that uses disk as storage.
4
*
5
* @warning This should be used by a wrapper class
6
* like {@link \ElggFile}.
7
*
8
* @package Elgg.Core
9
* @subpackage FileStore.Disk
10
*/
11
class ElggDiskFilestore extends \ElggFilestore {
12
/**
13
* Directory root.
14
*/
15
protected $dir_root;
16
17
/**
18
* Number of entries per matrix dir.
19
* You almost certainly don't want to change this.
20
*/
21
const BUCKET_SIZE = 5000;
22
23
/**
24
* Construct a disk filestore using the given directory root.
25
*
26
* @param string $directory_root Root directory, must end in "/"
27
*/
28 80
public function __construct($directory_root = "") {
29 80
if ($directory_root) {
30 78
$this->dir_root = $directory_root;
31
} else {
32 2
$this->dir_root = _elgg_config()->dataroot;
33
}
34 80
}
35
36
/**
37
* Open a file for reading, writing, or both.
38
*
39
* @note All files are opened binary safe.
40
* @note This will try to create the a directory if it doesn't exist and is opened
41
* in write or append mode.
42
*
43
* @param \ElggFile $file The file to open
44
* @param string $mode read, write, or append.
45
*
46
* @throws InvalidParameterException
47
* @return resource File pointer resource
48
*/
49 63
public function open(\ElggFile $file, $mode) {
50 63
$fullname = $this->getFilenameOnFilestore($file);
51
52
// Split into path and name
53 63
$ls = strrpos($fullname, "/");
54 63
if ($ls === false) {
55
$ls = 0;
56
}
57
58 63
$path = substr($fullname, 0, $ls);
59
60 63
if (($mode === 'read') && (!file_exists($fullname))) {
61
return false;
62
}
63
64
// Try to create the dir for valid write modes
65 63
if ($mode == 'write' || $mode == 'append') {
66
try {
67 63
$this->makeDirectoryRoot($path);
68
} catch (Exception $e) {
69
_elgg_services()->logger->warn("Couldn't create directory: $path");
70
return false;
0 ignored issues
show
Bug Best Practice introduced by
The expression return false returns the type false which is incompatible with the documented return type resource.
Loading history...
71
}
72
}
73
74 63
switch ($mode) {
75
case "read" :
76
$mode = "rb";
77
break;
78
case "write" :
79 63
$mode = "w+b";
80 63
break;
81
case "append" :
82
$mode = "a+b";
83
break;
84
default:
85
$msg = "Unrecognized file mode '" . $mode . "'";
86
throw new \InvalidParameterException($msg);
87
}
88
89 63
return fopen($fullname, $mode);
90
91
}
92
93
/**
94
* Write data to a file.
95
*
96
* @param resource $f File pointer resource
97
* @param mixed $data The data to write.
98
*
99
* @return false|int
100
*/
101 19
public function write($f, $data) {
102 19
return fwrite($f, $data);
103
}
104
105
/**
106
* Read data from a file.
107
*
108
* @param resource $f File pointer resource
109
* @param int $length The number of bytes to read
110
* @param int $offset The number of bytes to start after
111
*
112
* @return mixed Contents of file or false on fail.
113
*/
114
public function read($f, $length, $offset = 0) {
115
if ($offset) {
116
$this->seek($f, $offset);
117
}
118
119
return fread($f, $length);
120
}
121
122
/**
123
* Close a file pointer
124
*
125
* @param resource $f A file pointer resource
126
*
127
* @return bool
128
*/
129 63
public function close($f) {
130 63
return fclose($f);
131
}
132
133
/**
134
* Delete an \ElggFile file.
135
*
136
* @param \ElggFile $file File to delete
137
* @param bool $follow_symlinks If true, will also delete the target file if the current file is a symlink
138
* @return bool
139
*/
140 64
public function delete(\ElggFile $file, $follow_symlinks = true) {
141 64
$filename = $this->getFilenameOnFilestore($file);
142 64
if (file_exists($filename) || is_link($filename)) {
143 58
if ($follow_symlinks && is_link($filename) && file_exists($filename)) {
144
$target = readlink($filename);
145
file_exists($target) && unlink($target);
146
}
147 58
return unlink($filename);
148
} else {
149 51
return true;
150
}
151
}
152
153
/**
154
* Seek to the specified position.
155
*
156
* @param resource $f File resource
157
* @param int $position Position in bytes
158
*
159
* @return int 0 for success, or -1
160
*/
161
public function seek($f, $position) {
162
return fseek($f, $position);
163
}
164
165
/**
166
* Return the current location of the internal pointer
167
*
168
* @param resource $f File pointer resource
169
*
170
* @return int|false
171
*/
172
public function tell($f) {
173
return ftell($f);
174
}
175
176
/**
177
* Tests for end of file on a file pointer
178
*
179
* @param resource $f File pointer resource
180
*
181
* @return bool
182
*/
183
public function eof($f) {
184
return feof($f);
185
}
186
187
/**
188
* Returns the file size of an \ElggFile file.
189
*
190
* @param \ElggFile $file File object
191
*
192
* @return int The file size
193
*/
194 1
public function getFileSize(\ElggFile $file) {
195 1
return filesize($this->getFilenameOnFilestore($file));
196
}
197
198
/**
199
* Get the filename as saved on disk for an \ElggFile object
200
*
201
* Returns an empty string if no filename set
202
*
203
* @param \ElggFile $file File object
204
*
205
* @return string The full path of where the file is stored
206
* @throws InvalidParameterException
207
*/
208 91
public function getFilenameOnFilestore(\ElggFile $file) {
209 91
$owner_guid = $file->getOwnerGuid();
210 91
if (!$owner_guid) {
211
$owner_guid = _elgg_services()->session->getLoggedInUserGuid();
212
}
213
214 91
if (!$owner_guid) {
215
$msg = "File " . $file->getFilename() . " (file guid:" . $file->guid . ") is missing an owner!";
216
throw new \InvalidParameterException($msg);
217
}
218
219 91
$filename = $file->getFilename();
220 91
if (!$filename) {
221
return '';
222
}
223
224 91
$dir = new \Elgg\EntityDirLocator($owner_guid);
225
226 91
return $this->dir_root . $dir . $file->getFilename();
227
}
228
229
/**
230
* Returns the contents of the \ElggFile file.
231
*
232
* @param \ElggFile $file File object
233
*
234
* @return string
235
*/
236 7
public function grabFile(\ElggFile $file) {
237 7
return file_get_contents($file->getFilenameOnFilestore());
238
}
239
240
/**
241
* Tests if an \ElggFile file exists.
242
*
243
* @param \ElggFile $file File object
244
*
245
* @return bool
246
*/
247 89
public function exists(\ElggFile $file) {
248 89
if (!$file->getFilename()) {
249 3
return false;
250
}
251 88
return file_exists($this->getFilenameOnFilestore($file));
252
}
253
254
/**
255
* Returns the size of all data stored under a directory in the disk store.
256
*
257
* @param string $prefix The prefix to check under.
258
* @param string $container_guid The guid of the entity whose data you want to check.
259
*
260
* @return int|false
261
*/
262
public function getSize($prefix, $container_guid) {
263
if ($container_guid) {
264
$dir = new \Elgg\EntityDirLocator($container_guid);
265
return get_dir_size($this->dir_root . $dir . $prefix);
266
} else {
267
return false;
268
}
269
}
270
271
/**
272
* Create a directory $dirroot
273
*
274
* @param string $dirroot The full path of the directory to create
275
*
276
* @throws IOException
277
* @return true
278
*/
279 63
protected function makeDirectoryRoot($dirroot) {
280 63
if (!file_exists($dirroot)) {
281 52
if (!@mkdir($dirroot, 0700, true)) {
282
throw new \IOException("Could not make " . $dirroot);
283
}
284
}
285
286 63
return true;
287
}
288
289
/**
290
* Returns a list of attributes to save to the database when saving
291
* the \ElggFile object using this file store.
292
*
293
* @return array
294
*/
295
public function getParameters() {
296
return ["dir_root" => $this->dir_root];
297
}
298
299
/**
300
* Sets parameters that should be saved to database.
301
*
302
* @param array $parameters Set parameters to save to DB for this filestore.
303
*
304
* @return bool
305
*/
306
public function setParameters(array $parameters) {
307
if (isset($parameters['dir_root'])) {
308
$this->dir_root = $parameters['dir_root'];
309
return true;
310
}
311
312
return false;
313
}
314
}
315
|
{
"url": "https://scrutinizer-ci.com/g/Elgg/Elgg/inspections/3afa4f83-5a43-4310-9fb7-5f13f7565bd2/issues/files/engine/classes/ElggDiskFilestore.php?status=all&selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=5&selectedSeverities%5B1%5D=10&selectedAuthors%5B0%5D=beck24@gmail.com&selectedAuthors%5B1%5D=jrtilson@gmail.com&selectedAuthors%5B2%5D=brett.profitt@gmail.com&selectedAuthors%5B3%5D=jdalsem@coldtrick.com&orderField=issueCount&order=desc&fileId=engine/classes/Elgg/Database/Plugins.php&honorSelectedPaths=0",
"source_domain": "scrutinizer-ci.com",
"snapshot_id": "CC-MAIN-2024-26",
"warc_metadata": {
"Content-Length": "328984",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AFQDBKBGBBXULIJXIMHC6AR4ULQ6E4PH",
"WARC-Concurrent-To": "<urn:uuid:63080cb8-ac3f-479d-8539-6c806dde4421>",
"WARC-Date": "2024-06-25T15:09:48Z",
"WARC-IP-Address": "104.26.1.85",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:6V65FMWX3TTNTZMYBONUKQLTBHWEKBRO",
"WARC-Record-ID": "<urn:uuid:8a1ca915-2d9b-49cd-aabc-a2b9d806b8da>",
"WARC-Target-URI": "https://scrutinizer-ci.com/g/Elgg/Elgg/inspections/3afa4f83-5a43-4310-9fb7-5f13f7565bd2/issues/files/engine/classes/ElggDiskFilestore.php?status=all&selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=5&selectedSeverities%5B1%5D=10&selectedAuthors%5B0%5D=beck24@gmail.com&selectedAuthors%5B1%5D=jrtilson@gmail.com&selectedAuthors%5B2%5D=brett.profitt@gmail.com&selectedAuthors%5B3%5D=jdalsem@coldtrick.com&orderField=issueCount&order=desc&fileId=engine/classes/Elgg/Database/Plugins.php&honorSelectedPaths=0",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2e89f3ee-b659-4d08-bf3c-756bd0ce08de>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-116\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,
7,
41,
51,
57,
65,
66,
113,
114,
116,
122,
124,
128,
130,
172,
174,
177,
179,
230,
232,
259,
261,
264,
266,
291,
293,
323,
326,
330,
333,
382,
385,
390,
393,
413,
416,
421,
424,
446,
449,
452,
457,
460,
498,
501,
553,
556,
561,
564,
591,
594,
597,
602,
605,
668,
671,
675,
678,
744,
747,
752,
758,
811,
817,
842,
848,
886,
889,
900,
905,
952,
955,
959,
965,
968,
971,
974,
979,
982,
1029,
1032,
1036,
1039,
1083,
1086,
1170,
1173,
1202,
1205,
1209,
1212,
1256,
1259,
1310,
1313,
1317,
1320,
1358,
1361,
1404,
1407,
1412,
1418,
1466,
1472,
1524,
1527,
1530,
1560,
1566,
1599,
1605,
1628,
1631,
1643,
1646,
1650,
1653,
1659,
1696,
1699,
1705,
1762,
1765,
1782,
1785,
1789,
1792,
1795,
1844,
1850,
1897,
1900,
1909,
1915,
1952,
1955,
1983,
1986,
2058,
2061,
2079,
2096,
2101,
2133,
2248,
2267,
2270,
2275,
2278,
2282,
2285,
2291,
2310,
2313,
2330,
2333,
2351,
2354,
2365,
2368,
2386,
2392,
2411,
2417,
2428,
2431,
2450,
2453,
2472,
2475,
2486,
2489,
2501,
2504,
2557,
2560,
2608,
2611,
2615,
2618,
2624,
2658,
2661,
2664,
2667,
2670,
2673,
2678,
2681,
2707,
2710,
2714,
2717,
2765,
2768,
2813,
2816,
2820,
2823,
2845,
2849,
2854,
2861,
2897,
2904,
2932,
2936,
2939,
2943,
2947,
2952,
2956,
2983,
2987,
2991,
2995,
3045,
3049,
3105,
3109,
3172,
3176,
3180,
3184,
3237,
3241,
3246,
3250,
3300,
3304,
3321,
3325,
3354,
3358,
3362,
3366,
3370,
3399,
3403,
3406,
3410,
3414,
3419,
3423,
3448,
3452,
3456,
3460,
3507,
3511,
3515,
3519,
3536,
3540,
3545,
3552,
3581,
3588,
3609,
3613,
3616,
3620,
3624,
3629,
3633,
3663,
3667,
3671,
3675,
3728,
3732,
3845,
3849,
3866,
3870,
3875,
3882,
3950,
3957,
4009,
4016,
4070,
4077,
4152,
4156,
4191,
4195,
4240,
4244,
4249,
4256,
4285,
4289,
4300,
4307,
4323,
4327,
4331,
4335,
4338,
4342,
4346,
4351,
4355,
4391,
4395,
4399,
4403,
4447,
4451,
4499,
4503,
4507,
4511,
4548,
4552,
4557,
4561,
4600,
4604,
4635,
4639,
4642,
4646,
4650,
4655,
4659,
4715,
4719,
4723,
4727,
4772,
4776,
4780,
4784,
4806,
4810,
4815,
4819,
4847,
4851,
4871,
4875,
4878,
4882,
4886,
4891,
4895,
4939,
4943,
4947,
4951,
4996,
5000,
5004,
5008,
5025,
5029,
5034,
5038,
5065,
5069,
5088,
5092,
5095,
5099,
5103,
5108,
5112,
5160,
5164,
5168,
5172,
5211,
5215,
5219,
5223,
5253,
5257,
5262,
5268,
5316,
5322,
5379,
5383,
5386,
5390,
5394,
5399,
5403,
5465,
5469,
5473,
5477,
5524,
5528,
5532,
5536,
5575,
5579,
5583,
5587,
5648,
5652,
5690,
5694,
5699,
5706,
5765,
5772,
5811,
5818,
5840,
5844,
5911,
5915,
5919,
5923,
5930,
5952,
5956,
6056,
6060,
6107,
6111,
6115,
6119,
6126,
6162,
6169,
6189,
6193,
6207,
6211,
6215,
6219,
6226,
6276,
6280,
6287,
6343,
6347,
6350,
6354,
6358,
6363,
6367,
6415,
6419,
6423,
6427,
6466,
6470,
6474,
6478,
6497,
6501,
6506,
6512,
6557,
6563,
6624,
6628,
6631,
6635,
6639,
6644,
6648,
6687,
6691,
6695,
6699,
6738,
6742,
6746,
6750,
6767,
6771,
6776,
6783,
6826,
6833,
6864,
6870,
6887,
6891,
6895,
6902,
6962,
6966,
6969,
6973,
6977,
6982,
6986,
7063,
7067,
7071,
7075,
7136,
7140,
7227,
7231,
7235,
7239,
7261,
7265,
7270,
7274,
7327,
7331,
7356,
7360,
7415,
7419,
7477,
7481,
7492,
7496,
7513,
7517,
7521,
7525,
7528,
7532,
7536,
7541,
7545,
7577,
7581,
7585,
7589,
7657,
7661,
7665,
7669,
7693,
7697,
7714,
7718,
7723,
7730,
7780,
7787,
7819,
7826,
7866,
7870,
7928,
7932,
7937,
7941,
7945,
7949,
7956,
7971,
7975,
7978,
7982,
7986,
7991,
7995,
8064,
8068,
8116,
8120,
8124,
8128,
8146,
8150,
8155,
8159,
8194,
8198,
8240,
8244,
8247,
8251,
8255,
8260,
8264,
8318,
8322,
8326,
8330,
8408,
8412,
8416,
8420,
8437,
8441,
8446,
8450,
8502,
8506,
8546,
8550,
8596,
8600,
8616,
8620,
8624,
8628,
8632,
8648,
8652,
8655,
8659,
8661,
8665,
8666
],
"line_end_idx": [
7,
41,
51,
57,
65,
66,
113,
114,
116,
122,
124,
128,
130,
172,
174,
177,
179,
230,
232,
259,
261,
264,
266,
291,
293,
323,
326,
330,
333,
382,
385,
390,
393,
413,
416,
421,
424,
446,
449,
452,
457,
460,
498,
501,
553,
556,
561,
564,
591,
594,
597,
602,
605,
668,
671,
675,
678,
744,
747,
752,
758,
811,
817,
842,
848,
886,
889,
900,
905,
952,
955,
959,
965,
968,
971,
974,
979,
982,
1029,
1032,
1036,
1039,
1083,
1086,
1170,
1173,
1202,
1205,
1209,
1212,
1256,
1259,
1310,
1313,
1317,
1320,
1358,
1361,
1404,
1407,
1412,
1418,
1466,
1472,
1524,
1527,
1530,
1560,
1566,
1599,
1605,
1628,
1631,
1643,
1646,
1650,
1653,
1659,
1696,
1699,
1705,
1762,
1765,
1782,
1785,
1789,
1792,
1795,
1844,
1850,
1897,
1900,
1909,
1915,
1952,
1955,
1983,
1986,
2058,
2061,
2079,
2096,
2101,
2133,
2248,
2267,
2270,
2275,
2278,
2282,
2285,
2291,
2310,
2313,
2330,
2333,
2351,
2354,
2365,
2368,
2386,
2392,
2411,
2417,
2428,
2431,
2450,
2453,
2472,
2475,
2486,
2489,
2501,
2504,
2557,
2560,
2608,
2611,
2615,
2618,
2624,
2658,
2661,
2664,
2667,
2670,
2673,
2678,
2681,
2707,
2710,
2714,
2717,
2765,
2768,
2813,
2816,
2820,
2823,
2845,
2849,
2854,
2861,
2897,
2904,
2932,
2936,
2939,
2943,
2947,
2952,
2956,
2983,
2987,
2991,
2995,
3045,
3049,
3105,
3109,
3172,
3176,
3180,
3184,
3237,
3241,
3246,
3250,
3300,
3304,
3321,
3325,
3354,
3358,
3362,
3366,
3370,
3399,
3403,
3406,
3410,
3414,
3419,
3423,
3448,
3452,
3456,
3460,
3507,
3511,
3515,
3519,
3536,
3540,
3545,
3552,
3581,
3588,
3609,
3613,
3616,
3620,
3624,
3629,
3633,
3663,
3667,
3671,
3675,
3728,
3732,
3845,
3849,
3866,
3870,
3875,
3882,
3950,
3957,
4009,
4016,
4070,
4077,
4152,
4156,
4191,
4195,
4240,
4244,
4249,
4256,
4285,
4289,
4300,
4307,
4323,
4327,
4331,
4335,
4338,
4342,
4346,
4351,
4355,
4391,
4395,
4399,
4403,
4447,
4451,
4499,
4503,
4507,
4511,
4548,
4552,
4557,
4561,
4600,
4604,
4635,
4639,
4642,
4646,
4650,
4655,
4659,
4715,
4719,
4723,
4727,
4772,
4776,
4780,
4784,
4806,
4810,
4815,
4819,
4847,
4851,
4871,
4875,
4878,
4882,
4886,
4891,
4895,
4939,
4943,
4947,
4951,
4996,
5000,
5004,
5008,
5025,
5029,
5034,
5038,
5065,
5069,
5088,
5092,
5095,
5099,
5103,
5108,
5112,
5160,
5164,
5168,
5172,
5211,
5215,
5219,
5223,
5253,
5257,
5262,
5268,
5316,
5322,
5379,
5383,
5386,
5390,
5394,
5399,
5403,
5465,
5469,
5473,
5477,
5524,
5528,
5532,
5536,
5575,
5579,
5583,
5587,
5648,
5652,
5690,
5694,
5699,
5706,
5765,
5772,
5811,
5818,
5840,
5844,
5911,
5915,
5919,
5923,
5930,
5952,
5956,
6056,
6060,
6107,
6111,
6115,
6119,
6126,
6162,
6169,
6189,
6193,
6207,
6211,
6215,
6219,
6226,
6276,
6280,
6287,
6343,
6347,
6350,
6354,
6358,
6363,
6367,
6415,
6419,
6423,
6427,
6466,
6470,
6474,
6478,
6497,
6501,
6506,
6512,
6557,
6563,
6624,
6628,
6631,
6635,
6639,
6644,
6648,
6687,
6691,
6695,
6699,
6738,
6742,
6746,
6750,
6767,
6771,
6776,
6783,
6826,
6833,
6864,
6870,
6887,
6891,
6895,
6902,
6962,
6966,
6969,
6973,
6977,
6982,
6986,
7063,
7067,
7071,
7075,
7136,
7140,
7227,
7231,
7235,
7239,
7261,
7265,
7270,
7274,
7327,
7331,
7356,
7360,
7415,
7419,
7477,
7481,
7492,
7496,
7513,
7517,
7521,
7525,
7528,
7532,
7536,
7541,
7545,
7577,
7581,
7585,
7589,
7657,
7661,
7665,
7669,
7693,
7697,
7714,
7718,
7723,
7730,
7780,
7787,
7819,
7826,
7866,
7870,
7928,
7932,
7937,
7941,
7945,
7949,
7956,
7971,
7975,
7978,
7982,
7986,
7991,
7995,
8064,
8068,
8116,
8120,
8124,
8128,
8146,
8150,
8155,
8159,
8194,
8198,
8240,
8244,
8247,
8251,
8255,
8260,
8264,
8318,
8322,
8326,
8330,
8408,
8412,
8416,
8420,
8437,
8441,
8446,
8450,
8502,
8506,
8546,
8550,
8596,
8600,
8616,
8620,
8624,
8628,
8632,
8648,
8652,
8655,
8659,
8661,
8665,
8666,
8667
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 8667,
"ccnet_original_nlines": 611,
"rps_doc_curly_bracket": 0.009230409748852253,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.10934291779994965,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.002053390024229884,
"rps_doc_frac_lines_end_with_ellipsis": 0.001633989973925054,
"rps_doc_frac_no_alph_words": 0.5605749487876892,
"rps_doc_frac_unique_words": 0.5114638209342957,
"rps_doc_mean_word_length": 4.938271522521973,
"rps_doc_num_sentences": 52,
"rps_doc_symbol_to_word_ratio": 0.0010266900062561035,
"rps_doc_unigram_entropy": 5.7457098960876465,
"rps_doc_word_count": 1134,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.049285709857940674,
"rps_doc_frac_chars_dupe_6grams": 0.023571429774165154,
"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.03999999910593033,
"rps_doc_frac_chars_top_3gram": 0.018214289098978043,
"rps_doc_frac_chars_top_4gram": 0.01607142947614193,
"rps_doc_books_importance": -878.679443359375,
"rps_doc_books_importance_length_correction": -878.679443359375,
"rps_doc_openwebtext_importance": -521.7291870117188,
"rps_doc_openwebtext_importance_length_correction": -521.7291870117188,
"rps_doc_wikipedia_importance": -375.90948486328125,
"rps_doc_wikipedia_importance_length_correction": -375.90948486328125
},
"fasttext": {
"dclm": 0.9829806089401245,
"english": 0.2805074453353882,
"fineweb_edu_approx": 2.532714605331421,
"eai_general_math": 0.789203405380249,
"eai_open_web_math": 0.4738583564758301,
"eai_web_code": 0.9003395438194275
}
}
|
{
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,108,945,651,599,408,000
|
aspose file tools
The moose likes Testing and the fly likes Java using httpunit and junit Big Moose Saloon
Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Java using httpunit and junit" Watch "Java using httpunit and junit" New topic
Author
Java using httpunit and junit
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
Hi
I am trying to write a little application using httpunit and junit. I am trying to develop various test cases to test the continued functionality of our websites/applications. The problem I am having is in setting up httpunit and junit. I have followed all the instructions posted on both websites but I am encountering an error when I try and implement the code samples posted. The following is the error message I am receiving:
Rhino classes (js.jar) not found - Javascript disabled java.lang.RuntimeException: No HTML parser found. Make sure that either nekoHTML.jar or Tidy.jar is in the in classpath
I have placed both these files in my classpath and I am able to successfully import com.meterware.httpunit.*; but I cannot import junit.framework.TestCase.*;
I was hoping someone has had some success with these 2 packages and would be able to provide some assitance. I have posted links to both httpunit and junit below:
http://httpunit.sourceforge.net/index.html
http://www.junit.org/index.htm
If you require code to better understand what I am trying to do, I can provide what I have so far.
Thanks
Daniel Hoffman
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24189
34
JUnit is in junit.jar, not in either of the other files you mention. So you're going to need to add that as well.
[Jess in Action][AskingGoodQuestions]
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
Hi
I have added the junit.jar file to the classpath with no success. I have added all the required files according to the documentation but I still cannot import junit.framework.TestCase.*; and I still receive the no HTML parser found error. Perhaps you have some other suggestions?
Thanks
Daniel
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24189
34
I'm sorry, I didn't look carefully enough at your original post.
TestCase is a class, not a package; to use it, you'd say
import junit.framework.TestCase;
or, since you'll likely use a few other JUnit classes as well,
import junit.framework.*;
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
Hi
I tried using that line ( import junit.framework.*; ) in my code but I receive the following error when I compile:
package junit.framework does not exist
I have added junit.jar to the classpath and the path with no success. The entry I am using for the classpath\path is: c:\junit3\junit.jar; I am not sure if this error ( package junit.framework does not exist ) is linked to the other issue I am having with the HTML parser (nekohtml.jar or Tidy.jar).
Any other thoughts on this matter would be appreciated.
Thanks
Daniel
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
Moved to the Testing forum.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Christian Hargraves
Ranch Hand
Joined: Jul 01, 2003
Posts: 42
According to your original post, it seems like you got the code compiled or else you wouldn't have gotten to the part that says "javascript disabled" and "nekohtml or jtidy not found".
For starters, you don't need to add ANY class files or jar files to your PATH, only to your CLASSPATH. I am guessing that the classpath you are using to compile the files is different from the classpath you are using to execute the files or else, like I said above, you wouldn't even be at the point where HttpUnit is complaining about not being to find files.
How are you executing this files and how are you compiling them?
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
I use a java development tool called JCreator to develop, compile and execute my code. When I use the command line javac I get the following errors:
D:\Documents and Settings\Administrator\Desktop\Broker\broker>javac Broker.java
Broker.java:18: Package javax.swing not found in import.
import javax.swing.*;
^
Broker.java:19: Package com.meterware.httpunit not found in import.
import com.meterware.httpunit.*;
^
2 errors
However, when I compile the file using JCreator I get a class file and no complaints. The classpath variable I set are the Windows Envronment Variables for both the user(i.e. me) and the system. The classpath statement I am using looks like this: D:\junit3.8.1\junit.jar; this represent the exact path to this jar file. I have similar entries for httpunit: D:\httpunit-1.5.4\jars\Tidy.jar; and D:\httpunit-1.5.4\jars\nekohtml.jar;
Here is the code I have developed so far, any further assistance would be appreciated.
import java.awt.*;
import java.awt.event.*;
import java.awt.Container.*;
import java.awt.BorderLayout;
import java.io.*;
import java.io.File;
import java.io.FileReader;
import java.io.BufferedReader;
import java.lang.Exception.*;
import java.lang.Object.*;
import java.lang.Exception.*;
import java.net.*;
import java.util.*;
import javax.swing.*;
import com.meterware.httpunit.*;
import org.xml.sax.*;
//import junit.framework.TestCase.*;
public class Broker extends JFrame implements ActionListener
{
// Variable declaration
private Calendar cal;
private String dateFormat = "yyyy-MM-dd HH:mm:ss";
private JButton execute;
private JButton exit;
private JLabel currentTest;
private JPanel panel, buttonPanel;
private DataOutputStream logFile;
private DataOutputStream dataFile;
private static WebConversation wc = new WebConversation();
// Default constructor
public Broker()
{
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
dispose();
System.exit(0);
}
});
setupGUI();
setupPanel();
}
// Function to setup GUI components
public void setupGUI()
{
exit = new JButton( "Exit Test" );
exit.addActionListener( this );
execute = new JButton( "Execute Test" );
execute.addActionListener( this );
currentTest = new JLabel( "Please click Execute Test to begin" );
}
// Function to setup GUI Panels
public void setupPanel()
{
buttonPanel = new JPanel();
buttonPanel.setLayout( new GridLayout( 1, 2 ) );
buttonPanel.add( execute );
buttonPanel.add( exit );
panel = new JPanel();
panel.setLayout( new BorderLayout() );
panel.add( buttonPanel, BorderLayout.SOUTH );
panel.add( currentTest, BorderLayout.CENTER );
panel.setBorder( (BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder("Logon Test Application"),
BorderFactory.createEmptyBorder(5,5,5,5) ) ) );
Container c = new Container();
c = getContentPane();
c.add( panel, BorderLayout.CENTER );
setVisible( true );
}
// Function to write log entries
public void writeLog (String app, String entry)
{
//open file for writing request
try
{
logFile = new DataOutputStream( new FileOutputStream( "Test.log", true ) );
dataFile = new DataOutputStream(logFile);
}
catch (IOException ioException)
{
System.out.println( "Error opening the file" );
System.exit(1);
}
//write request to file
cal = Calendar.getInstance( TimeZone.getDefault() );
java.text.SimpleDateFormat simple = new java.text.SimpleDateFormat(dateFormat);
System.out.println( simple.format( cal.getTime() ) );
try
{
dataFile.writeBytes( simple.format( cal.getTime() ) + " " + app + "\r\n");
dataFile.writeBytes( entry + "\r\n\r\n" );
}
catch ( IOException e )
{
System.out.println( "Error opening the file" );
}
}
public void actionPerformed( ActionEvent e )
{
if ( e.getSource() == execute )
{
currentTest.setText( "Starting the Web Broker Test" );
try
{
WebResponse resp = wc.getResponse( "http://www.google.com" ); // read this page
WebLink link = resp.getLinkWith( "response" ); // find the link
link.click(); // follow it
WebResponse jdoc = wc.getCurrentPage();
}
catch ( SAXException s )
{
System.out.println( "There has been a SAX error" );
writeLog( "Connection", "There has been a SAX error" );
}
catch ( MalformedURLException m )
{
System.out.println( "Cannot reconcile website" );
writeLog( "Connection", "There has been a conneciton error" );
}
catch ( IOException i )
{
System.out.println( "Input/Output error" );
writeLog( "Connection", "There has been an I/O error" );
}
}
else
{
System.out.println( "Error connecting to Web Broker" );
writeLog( "Web Broker", "Error connecting to Web Broker");
}
if ( e.getSource() == exit )
{
System.out.println( "Test program closed" );
writeLog( "Test Exit","Test program closed" );
dispose();
System.exit(0);
}
}
// Main
public static void main(String args[]) throws Exception
{
Broker WB = new Broker();
WB.setSize( 400, 100 );
WB.setTitle( "Web Broker Logon Test" );
WB.setVisible( true );
WB.addWindowListener(new WindowAdapter()
{
public void windowClosing( WindowEvent event )
{ System.exit(0); }
}
);
}
}
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
You should add D:\httpunit-1.5.4\lib\httpunit.jar into your classpath (that's where the com.meterware packages are).
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
I have already added that line to my classpath. When I use JCreator to compile/execute my code I get no complaints about the httpunit package. I only get that error when I compile via the command line javac. As far as I can see I have all the required classpath statements for both httpunit and junit setup. The only thing that I can think of is when I use the command line javac it is using a different classpath then when I compile via JCreator. However, I believe that I have set all the classpath variables that I can find. Any further suggestions would be appreciated.
Thanks
Daniel
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
1) On Windows, type "SET CLASSPATH" at the command prompt. Post the result here, if it doesn't look strange to you.
2) Try the -cp option of the java command (which overrides the classpath environment variable).
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
Hi
Here is the result of the SET CLASSPATH command:
CLASSPATH=C:\httpunit-1.5.5-d-19Sep\jars;C:\httpunit-1.5.5-d19Sep\jars\nekohtml.jar;C:\httpunit-1.5.5-d-19Sep\jars\Tidy.jar;C:\httpunit-1.5.5-d-19Sep\jars\js.j
ar;c:\junit3\junit.jar;c:\junit3;C:\junit3\junit\tests;C:\junit3\junit.jar;C:\junit3\junit;
I am currently developing at work so my root dir is c:\. When I develop at home the root is d:\
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
CLASSPATH=C:\httpunit-1.5.5-d-19Sep\jars;C:\httpunit-1.5.5-d19Sep\jars\nekohtml.jar;C:\httpunit-1.5.5-d-19Sep\jars\Tidy.jar;C:\httpunit-1.5.5-d-19Sep\jars\js.j
ar;c:\junit3\junit.jar;c:\junit3;C:\junit3\junit\tests;C:\junit3\junit.jar;C:\junit3\junit;
Is this a typo in the post or in the classpath?
Daniel Hoffman
Greenhorn
Joined: Nov 05, 2003
Posts: 18
This is what the path is on my home system:
D:\>set classpath
CLASSPATH=D:\Program Files\Sybase\Shared\Sun\jdk117\lib\classes.zip;D:\Program F
iles\Sybase\Shared\PowerBuilder\classes.zip;D:\httpunit\jars\junit.jar;D:\junit\
junit.jar;D:\httpunit\jars\nekohtml.jar;D:\httpunit\jars\Tidy.jar;D:\httpunit\ja
rs\js.jar
I still have the same issue. I changed all my dirs to really simple paths.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
...\jdk117\lib\classes.zip;...
Could this be a reason? For example, it could be that JDK 1.1.7 doesn't include Swing (I can't remember that far ), which would explain the compilation error regarding import javax.swing.*
Christian Hargraves
Ranch Hand
Joined: Jul 01, 2003
Posts: 42
Is there a reason you are using jdk 1.1.7? Swing is not included in anything below jdk 1.2. The "Program Files" can also mess up your classpath and your path if that part of the CLASSPATH/PATH is not quoted.
For #2, your imports are all messed up.
import java.awt.*;//Ok
import java.awt.event.*;//Ok
import java.awt.Container.*; // NOT OKAY
//This is a class and should be "import java.awt.Container;"
import java.awt.BorderLayout; // Ok
import java.io.*;//Ok
import java.io.File;//Ok
import java.io.FileReader;//Ok
import java.io.BufferedReader;//Ok
import java.lang.Exception.*;//NOT OKAY
//No reason to import this as the java.lang package is already imported.
//If you really want to import this, then it should be
//import java.lang.Exception;
import java.lang.Object.*;//NOT OKAY -- Same as the above.
import java.lang.Exception.*;//NOT OKAY -- Second time to import same thing.
import java.net.*;//Ok
import java.util.*;//Ok
import javax.swing.*;//Ok -- but jdk 1.1.7 doesn't come with Swing.
//you'll need swing.jar in your classpath -- try using jdk >= 1.2
import com.meterware.httpunit.*;//Ok
import org.xml.sax.*;//Ok
//import junit.framework.TestCase.*;// NOT OKAY -- same as above
//TestCase is a class -- import junit.framework.TestCase;
I agree. Here's the link: http://aspose.com/file-tools
subject: Java using httpunit and junit
|
{
"url": "http://www.coderanch.com/t/94955/Testing/Java-httpunit-junit",
"source_domain": "www.coderanch.com",
"snapshot_id": "crawl=CC-MAIN-2015-22",
"warc_metadata": {
"Content-Length": "69644",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:6AIERFT3YM7P23L46XL46S2AWUXGANNL",
"WARC-Concurrent-To": "<urn:uuid:c14b9608-5874-431a-b6de-78858c6b893d>",
"WARC-Date": "2015-05-26T12:10:37Z",
"WARC-IP-Address": "204.144.184.130",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:4UW5URELEFU6OAPKF5FIIMJDTX7ZYN4B",
"WARC-Record-ID": "<urn:uuid:1d2d033a-820a-4193-a547-388eb22f8911>",
"WARC-Target-URI": "http://www.coderanch.com/t/94955/Testing/Java-httpunit-junit",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4ccdc558-0a5c-45b5-a54f-d2ca14b36046>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-180-206-219.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-22\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for May 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,
18,
107,
188,
205,
206,
207,
294,
342,
431,
438,
439,
469,
470,
485,
495,
496,
517,
527,
530,
960,
1135,
1293,
1456,
1499,
1530,
1629,
1636,
1651,
1672,
1694,
1702,
1703,
1724,
1737,
1742,
1747,
1748,
1862,
1863,
1864,
1902,
1917,
1927,
1928,
1949,
1959,
1962,
2242,
2249,
2256,
2277,
2299,
2307,
2308,
2329,
2342,
2347,
2352,
2353,
2418,
2475,
2508,
2571,
2597,
2612,
2622,
2623,
2644,
2654,
2657,
2772,
2811,
3111,
3167,
3174,
3181,
3193,
3204,
3212,
3213,
3234,
3246,
3274,
3275,
3276,
3343,
3363,
3374,
3375,
3396,
3406,
3591,
3952,
4017,
4032,
4042,
4043,
4064,
4074,
4223,
4303,
4360,
4382,
4384,
4452,
4485,
4487,
4496,
4927,
5014,
5033,
5058,
5087,
5117,
5135,
5156,
5183,
5214,
5244,
5271,
5301,
5320,
5340,
5362,
5395,
5417,
5454,
5515,
5517,
5541,
5563,
5614,
5639,
5661,
5689,
5724,
5758,
5793,
5852,
5853,
5876,
5892,
5894,
5932,
5934,
5975,
5977,
5988,
6004,
6006,
6010,
6022,
6036,
6038,
6039,
6075,
6098,
6100,
6135,
6167,
6208,
6243,
6309,
6311,
6312,
6344,
6369,
6371,
6399,
6448,
6476,
6501,
6502,
6524,
6563,
6609,
6656,
6657,
6711,
6771,
6819,
6820,
6851,
6873,
6910,
6930,
6932,
6933,
6966,
7014,
7016,
7048,
7052,
7054,
7130,
7172,
7174,
7206,
7208,
7256,
7272,
7274,
7275,
7299,
7352,
7432,
7486,
7490,
7492,
7567,
7610,
7612,
7636,
7638,
7686,
7688,
7690,
7691,
7736,
7738,
7770,
7772,
7827,
7831,
7833,
7913,
7977,
8004,
8044,
8046,
8071,
8073,
8125,
8181,
8183,
8217,
8219,
8269,
8332,
8334,
8358,
8360,
8404,
8461,
8463,
8465,
8470,
8472,
8528,
8587,
8589,
8618,
8620,
8665,
8712,
8723,
8739,
8741,
8743,
8751,
8807,
8809,
8835,
8859,
8899,
8922,
8963,
8965,
9012,
9032,
9034,
9037,
9039,
9041,
9055,
9062,
9070,
9071,
9092,
9105,
9110,
9116,
9233,
9234,
9235,
9336,
9351,
9361,
9362,
9383,
9393,
9967,
9974,
9981,
9993,
10000,
10008,
10009,
10030,
10043,
10159,
10255,
10256,
10257,
10570,
10585,
10595,
10596,
10617,
10627,
10630,
10679,
10839,
10931,
11027,
11041,
11048,
11056,
11057,
11078,
11091,
11096,
11102,
11262,
11354,
11355,
11403,
11418,
11428,
11429,
11450,
11460,
11504,
11522,
11603,
11684,
11765,
11775,
11850,
11864,
11871,
11879,
11880,
11901,
11914,
11919,
11925,
11956,
11957,
12146,
12166,
12177,
12178,
12199,
12209,
12417,
12457,
12480,
12509,
12550,
12611,
12647,
12669,
12694,
12725,
12760,
12800,
12873,
12928,
12958,
13017,
13094,
13117,
13141,
13209,
13275,
13312,
13338,
13403,
13461,
13463,
13518,
13520,
13559
],
"line_end_idx": [
18,
107,
188,
205,
206,
207,
294,
342,
431,
438,
439,
469,
470,
485,
495,
496,
517,
527,
530,
960,
1135,
1293,
1456,
1499,
1530,
1629,
1636,
1651,
1672,
1694,
1702,
1703,
1724,
1737,
1742,
1747,
1748,
1862,
1863,
1864,
1902,
1917,
1927,
1928,
1949,
1959,
1962,
2242,
2249,
2256,
2277,
2299,
2307,
2308,
2329,
2342,
2347,
2352,
2353,
2418,
2475,
2508,
2571,
2597,
2612,
2622,
2623,
2644,
2654,
2657,
2772,
2811,
3111,
3167,
3174,
3181,
3193,
3204,
3212,
3213,
3234,
3246,
3274,
3275,
3276,
3343,
3363,
3374,
3375,
3396,
3406,
3591,
3952,
4017,
4032,
4042,
4043,
4064,
4074,
4223,
4303,
4360,
4382,
4384,
4452,
4485,
4487,
4496,
4927,
5014,
5033,
5058,
5087,
5117,
5135,
5156,
5183,
5214,
5244,
5271,
5301,
5320,
5340,
5362,
5395,
5417,
5454,
5515,
5517,
5541,
5563,
5614,
5639,
5661,
5689,
5724,
5758,
5793,
5852,
5853,
5876,
5892,
5894,
5932,
5934,
5975,
5977,
5988,
6004,
6006,
6010,
6022,
6036,
6038,
6039,
6075,
6098,
6100,
6135,
6167,
6208,
6243,
6309,
6311,
6312,
6344,
6369,
6371,
6399,
6448,
6476,
6501,
6502,
6524,
6563,
6609,
6656,
6657,
6711,
6771,
6819,
6820,
6851,
6873,
6910,
6930,
6932,
6933,
6966,
7014,
7016,
7048,
7052,
7054,
7130,
7172,
7174,
7206,
7208,
7256,
7272,
7274,
7275,
7299,
7352,
7432,
7486,
7490,
7492,
7567,
7610,
7612,
7636,
7638,
7686,
7688,
7690,
7691,
7736,
7738,
7770,
7772,
7827,
7831,
7833,
7913,
7977,
8004,
8044,
8046,
8071,
8073,
8125,
8181,
8183,
8217,
8219,
8269,
8332,
8334,
8358,
8360,
8404,
8461,
8463,
8465,
8470,
8472,
8528,
8587,
8589,
8618,
8620,
8665,
8712,
8723,
8739,
8741,
8743,
8751,
8807,
8809,
8835,
8859,
8899,
8922,
8963,
8965,
9012,
9032,
9034,
9037,
9039,
9041,
9055,
9062,
9070,
9071,
9092,
9105,
9110,
9116,
9233,
9234,
9235,
9336,
9351,
9361,
9362,
9383,
9393,
9967,
9974,
9981,
9993,
10000,
10008,
10009,
10030,
10043,
10159,
10255,
10256,
10257,
10570,
10585,
10595,
10596,
10617,
10627,
10630,
10679,
10839,
10931,
11027,
11041,
11048,
11056,
11057,
11078,
11091,
11096,
11102,
11262,
11354,
11355,
11403,
11418,
11428,
11429,
11450,
11460,
11504,
11522,
11603,
11684,
11765,
11775,
11850,
11864,
11871,
11879,
11880,
11901,
11914,
11919,
11925,
11956,
11957,
12146,
12166,
12177,
12178,
12199,
12209,
12417,
12457,
12480,
12509,
12550,
12611,
12647,
12669,
12694,
12725,
12760,
12800,
12873,
12928,
12958,
13017,
13094,
13117,
13141,
13209,
13275,
13312,
13338,
13403,
13461,
13463,
13518,
13520,
13559,
13560
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 13560,
"ccnet_original_nlines": 384,
"rps_doc_curly_bracket": 0.0032448400743305683,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.21648836135864258,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.040906231850385666,
"rps_doc_frac_lines_end_with_ellipsis": 0.002597399987280369,
"rps_doc_frac_no_alph_words": 0.3483322858810425,
"rps_doc_frac_unique_words": 0.3411028981208801,
"rps_doc_mean_word_length": 5.848777770996094,
"rps_doc_num_sentences": 321,
"rps_doc_symbol_to_word_ratio": 0.0009439900168217719,
"rps_doc_unigram_entropy": 5.71268892288208,
"rps_doc_word_count": 1759,
"rps_doc_frac_chars_dupe_10grams": 0.06512442231178284,
"rps_doc_frac_chars_dupe_5grams": 0.1322900503873825,
"rps_doc_frac_chars_dupe_6grams": 0.0917573869228363,
"rps_doc_frac_chars_dupe_7grams": 0.07465007901191711,
"rps_doc_frac_chars_dupe_8grams": 0.06940124183893204,
"rps_doc_frac_chars_dupe_9grams": 0.06940124183893204,
"rps_doc_frac_chars_top_2gram": 0.0037908200174570084,
"rps_doc_frac_chars_top_3gram": 0.013996889814734459,
"rps_doc_frac_chars_top_4gram": 0.01905132085084915,
"rps_doc_books_importance": -1383.470947265625,
"rps_doc_books_importance_length_correction": -1383.470947265625,
"rps_doc_openwebtext_importance": -701.5982666015625,
"rps_doc_openwebtext_importance_length_correction": -701.5982666015625,
"rps_doc_wikipedia_importance": -521.9835815429688,
"rps_doc_wikipedia_importance_length_correction": -521.9835815429688
},
"fasttext": {
"dclm": 0.03693437948822975,
"english": 0.7216435670852661,
"fineweb_edu_approx": 1.3403185606002808,
"eai_general_math": 0.7748556733131409,
"eai_open_web_math": 0.20426690578460693,
"eai_web_code": 0.15261757373809814
}
}
|
{
"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.1332",
"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": "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": "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": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,005,508,699,047,609,000
|
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]
Re: How many people need locales?
[ In reply to Henrique de Moraes ]
Ooops! Sorry. The bug I refer is really #110980 (I happen to submit
two i18n-related bugs the same day and confused them).
The bug basically says "/etc/locale.gen should not be a conffile
because most people will need to modify it" but Ben does not agree
that people using locales is "most people".
Reply to:
|
{
"url": "https://lists.debian.org/debian-devel/2001/09/msg00198.html",
"source_domain": "lists.debian.org",
"snapshot_id": "crawl=CC-MAIN-2017-09",
"warc_metadata": {
"Content-Length": "5559",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KNQYALNAHQ5FKIIAW3DC4TVZ7VTTYXT3",
"WARC-Concurrent-To": "<urn:uuid:4991ecf3-3b58-40a0-830f-49122f01d78c>",
"WARC-Date": "2017-02-20T12:36:08Z",
"WARC-IP-Address": "82.195.75.100",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:2JDDOUEBQNOZYTSN4JFF4KJDJ573RV6I",
"WARC-Record-ID": "<urn:uuid:c8ca5da9-ba71-4008-bdd3-88c7886b401a>",
"WARC-Target-URI": "https://lists.debian.org/debian-devel/2001/09/msg00198.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0808d144-bc31-4ed9-83e2-6bb38484780d>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-171-10-108.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-09\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for February 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,
1,
79,
80,
114,
115,
116,
117,
152,
153,
221,
276,
277,
342,
409,
453,
454,
455,
456
],
"line_end_idx": [
1,
79,
80,
114,
115,
116,
117,
152,
153,
221,
276,
277,
342,
409,
453,
454,
455,
456,
465
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 465,
"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.28703704476356506,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018518520519137383,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.25925925374031067,
"rps_doc_frac_unique_words": 0.7368420958518982,
"rps_doc_mean_word_length": 4.552631378173828,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0.009259260259568691,
"rps_doc_unigram_entropy": 3.9225528240203857,
"rps_doc_word_count": 76,
"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.0404624305665493,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -31.75713348388672,
"rps_doc_books_importance_length_correction": -34.98432159423828,
"rps_doc_openwebtext_importance": -24.628583908081055,
"rps_doc_openwebtext_importance_length_correction": -27.855772018432617,
"rps_doc_wikipedia_importance": -7.554502487182617,
"rps_doc_wikipedia_importance_length_correction": -10.781689643859863
},
"fasttext": {
"dclm": 0.04329496994614601,
"english": 0.9392971992492676,
"fineweb_edu_approx": 1.4584509134292603,
"eai_general_math": 0.003046570112928748,
"eai_open_web_math": 0.6399850845336914,
"eai_web_code": -0.00000869999985297909
}
}
|
{
"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": "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": "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": "-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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,045,051,878,949,310,000
|
4,619,925 traffic visualizations have been made!
Jizzonline.com
Visualized
Updated 72 days ago | Update Now
If Jizzonline.com was a country, it would be larger than Palau with its 20,473 daily visitors!
Nr. Country Population World Percent
207 Monaco 33,000 0.0005%
209 San Marino 31,794 0.0005%
210 Gibraltar 31,000 0.0005%
211 British Virgin Islands 23,000 N/A
212 Jizzonline.com 20,473 -
214 Palau 20,000 N/A
213 Cook Islands 20,000 N/A
215 Anguilla 15,000 N/A
217 Nauru 10,000 N/A
So these 20,473 daily visitors,
lets put them in perspective!
1 in every 81,408 internet users visit Jizzonline.com daily. Jizzonline.com gets 20,473 internet visitors per day, now imagine that they would all come together.
This means you would need at least 3 Croatia Spaladium Arena's to seat the visitors.
Croatia Spaladium Arena - Showing: 10,000 People
Spaladium Arena is a new multi-purpose sports and entertainment arena located in Split. The 10,000 seat venue can be configured to seat anywhere from 1,246 people to 12,339.
If these 20,473 daily visitors stand hand in hand and form one long straight line, it would be 23 kilometers long.
Jizzonline.com Demographics
Showing the top: 1
Nr. Country Percentage
1 India 22.2% ID
Server & Power Consumption Information
The average Jizzonline.com visitor visits about 6.1 pages before leaving again, this means that their servers handle about 124,885 page views per day and in term a total of 1 page views per second.
We estimate that this website uses 1 server(s), and with the average internet server using about 2,400 kWh of electricity per year, Jizzonline.com will use more or less 2,400 kWh of power in that time span. Looking at the average cost of 0,17c per kWh, this website uses an estimated total of $408 USD on electricity per year.
|
{
"url": "http://jizzonline.com.visualizetraffic.com/",
"source_domain": "jizzonline.com.visualizetraffic.com",
"snapshot_id": "crawl=CC-MAIN-2014-10",
"warc_metadata": {
"Content-Length": "14370",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:3UJNIDJNDC5UHVWFDVOOCES4SRRCFCVT",
"WARC-Concurrent-To": "<urn:uuid:e6778348-6786-43cd-862f-f64da0c31570>",
"WARC-Date": "2014-03-09T03:40:01Z",
"WARC-IP-Address": "54.235.146.225",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:ZSLEQD6ZYWAETYTKC2MUEF756CGQAIPW",
"WARC-Record-ID": "<urn:uuid:142ffb16-010f-4c83-af84-4453f0cf57da>",
"WARC-Target-URI": "http://jizzonline.com.visualizetraffic.com/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:821b9dba-e113-4770-b157-61f7c9328710>"
},
"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,
49,
50,
65,
66,
77,
110,
205,
242,
268,
298,
327,
365,
393,
414,
442,
466,
487,
519,
549,
711,
712,
797,
846,
1020,
1135,
1163,
1182,
1205,
1222,
1261,
1459,
1460
],
"line_end_idx": [
49,
50,
65,
66,
77,
110,
205,
242,
268,
298,
327,
365,
393,
414,
442,
466,
487,
519,
549,
711,
712,
797,
846,
1020,
1135,
1163,
1182,
1205,
1222,
1261,
1459,
1460,
1786
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1786,
"ccnet_original_nlines": 32,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2487804889678955,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0292682908475399,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3707317113876343,
"rps_doc_frac_unique_words": 0.6132404208183289,
"rps_doc_mean_word_length": 4.92334508895874,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.967805862426758,
"rps_doc_word_count": 287,
"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.02123142033815384,
"rps_doc_frac_chars_top_3gram": 0.03821656107902527,
"rps_doc_frac_chars_top_4gram": 0.03255484998226166,
"rps_doc_books_importance": -170.64353942871094,
"rps_doc_books_importance_length_correction": -164.6473846435547,
"rps_doc_openwebtext_importance": -105.65568542480469,
"rps_doc_openwebtext_importance_length_correction": -105.65568542480469,
"rps_doc_wikipedia_importance": -73.20907592773438,
"rps_doc_wikipedia_importance_length_correction": -72.12213897705078
},
"fasttext": {
"dclm": 0.07793408632278442,
"english": 0.8666687607765198,
"fineweb_edu_approx": 2.3111326694488525,
"eai_general_math": 0.02425229921936989,
"eai_open_web_math": 0.20842903852462769,
"eai_web_code": 0.0022340400610119104
}
}
|
{
"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": "300",
"labels": {
"level_1": "Social sciences",
"level_2": "",
"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": "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": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "20",
"label": "Structured Data"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,735,327,854,976,294,700
|
Introducing Classes
In C++ we define our own data structure by defining a class. The class mechanism is one of the most important features in C++. In fact, a primary focus of the design of C++ is to make it possible to define class types that behave as naturally as the built-in types themselves. The library types that we’ve seen already, such as istream and ostream, are all defined as classesthat is, they are not strictly speaking part of the language.
Complete understanding of the class mechanism requires mastering a lot of information. Fortunately, it is possible to use a class that someone else has written without knowing how to define a class ourselves.
To use a class we need to know three things:
1. What is its name?
2. Where is it defined?
3. What operations does it support?
Share
You may also like...
|
{
"url": "http://loopandbreak.com/introducing-classes/",
"source_domain": "loopandbreak.com",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "75794",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:45EUPAOPOC22MZEMZ7UUMCTTP5YMVC5B",
"WARC-Concurrent-To": "<urn:uuid:fb93528f-69b7-40b5-9498-3c461b6b39df>",
"WARC-Date": "2022-05-27T19:49:19Z",
"WARC-IP-Address": "3.17.140.95",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WLE57XQLKFJVS5ANH2PR4P7I2CIEKXOD",
"WARC-Record-ID": "<urn:uuid:90cb63bc-be27-47f7-a064-d059e9c1e664>",
"WARC-Target-URI": "http://loopandbreak.com/introducing-classes/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9704cd3c-e5cb-44fb-bfe2-fde36e4cecd0>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-22\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,
20,
21,
458,
460,
669,
671,
716,
717,
740,
766,
804,
810,
811
],
"line_end_idx": [
20,
21,
458,
460,
669,
671,
716,
717,
740,
766,
804,
810,
811,
831
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 831,
"ccnet_original_nlines": 13,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4588235318660736,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01764705963432789,
"rps_doc_frac_lines_end_with_ellipsis": 0.0714285671710968,
"rps_doc_frac_no_alph_words": 0.15294118225574493,
"rps_doc_frac_unique_words": 0.6206896305084229,
"rps_doc_mean_word_length": 4.455172538757324,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0.005882349796593189,
"rps_doc_unigram_entropy": 4.235226154327393,
"rps_doc_word_count": 145,
"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.037151701748371124,
"rps_doc_frac_chars_top_3gram": 0.05263157933950424,
"rps_doc_frac_chars_top_4gram": 0.03405572846531868,
"rps_doc_books_importance": -64.74034881591797,
"rps_doc_books_importance_length_correction": -64.74034881591797,
"rps_doc_openwebtext_importance": -40.74140167236328,
"rps_doc_openwebtext_importance_length_correction": -40.257080078125,
"rps_doc_wikipedia_importance": -40.3508186340332,
"rps_doc_wikipedia_importance_length_correction": -40.3508186340332
},
"fasttext": {
"dclm": 0.9065808653831482,
"english": 0.9634554386138916,
"fineweb_edu_approx": 3.2638306617736816,
"eai_general_math": 0.7297366261482239,
"eai_open_web_math": 0.5720787644386292,
"eai_web_code": 0.013670380227267742
}
}
|
{
"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": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"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": "-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": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-606,767,685,030,155,000
|
MAC Spoofing Attack
A MAC spoofing attack is where the intruder sniffs the network for valid MAC addresses and attempts to act as one of the valid MAC addresses. The intruder then presents itself as the default gateway and copies all of the data forwarded to the default gateway without being detected. This provides the intruder valuable details about applications in use and destination host IP addresses. This enables the spoofed CAM entry on the switch to be overwritten as well. This is best illustrated in Figure 3-9.
Figure 3-9 MAC Spoof Attack
Figure 3-9 MAC Spoof Attack
MAC C
CAM Table Port 1 Empty Port 2 B Port 3 AC
Step 1 in Figure 3-9 demonstrates the three discovered devices (Devices A, B, and C) in the CAM table. Device C is an intruder. After spoofing the MAC address of Device A (remember, the initial frame when a CAM table is empty is sent to all ports except the source port), Device C sends out a frame with the source address of MAC A, with a new spoofed IP address. The switch relearns the MAC address and changes the CAM table entries in Step 2 of the attack. Now when Device B wishes to communicate to the legitimate Device A, the switch sends the packet according to the CAM table, which is now Port 3 or the attacking PC. Until Device A resends packets, the data flow will remain and the attacker will receive and view active data. By ensuring that any ARP requests are replied to, the intruder can maintain the connection until manual intervention occurs from the network administrator.
Mitigating this form of attack takes a little more design because the attacker is far more intelligent. To start with, you must enable port security. Example 3-41, earlier in the chapter, displays how this can be achieved.
However, as with the CAM table overflow attack mitigation, specifying a MAC address on every port is an unmanageable solution. Another solution would be to use private VLANs to help mitigate these network attacks.
Using private VLANs is a common mechanism to restrict communications between systems on the same logical IP subnet. This is not a fool-proof mechanism. Private VLANs work by limiting the ports within a VLAN that can communicate with other ports in the same VLAN. To configure a private VLAN on switch-based Cisco IOS or Catalyst OS, follow these steps:
Step 1 Create the primary private VLAN.
Switch_CatOS> (enable) set vlan primary_vlan_id pvlan-type primary name primary_vlan
Switch_IOS(config)#vlan primary_vlan_id
Step 2 Create the isolated VLAN(s).
Switch_CatOS> (enable) set vlan secondary_vlan_id pvlan-type isolated name isolated_pvlan Switch_CatOS> (enable) set pvlan primary_vlan_id secondary_vlan_id
Step 3 Bind the isolated VLAN(s) to the primary VLAN.
Switch_CatOS> (enable) set pvlan primary_vlan_id secondary_vlan_id Switch_IOS(config)#vlan primary_vlan_id
Switch_IOS(config-vlan)#private-vlan association secondary_vlan_id
Switch_IOS(config-vlan)#exit
The best method, in conjunction with port security, is to use DHCP snooping mechanisms to ensure that only valid DHCP servers are enabled across your network. One DHCP snooping mechanism is to permit only trusted DHCP messages to flow between client PC and authorized DHCP servers. The ideal solution to mitigate various ARP-based network exploits is the use of DHCP snooping along with Dynamic ARP Inspection (DAI).
When a client sends out a broadcast message for an IP address, the intruder's PC also sees the request, of course, because broadcasts are sent out to all interfaces or ports except the source port. So, in effect, the network must not allow DHCP offers, acknowledgements, or negative acknowledgements (DHCPOffer, DHCPAck, or DHCPNak) to be sent from untrusted sources.
Illegal DHCP messages are messages received from outside the network or firewall. The DHCP snooping binding table contains the MAC address, IP address, lease time, binding type, VLAN number, and interface information corresponding to the local untrusted interfaces of a switch; it does not, however, contain information regarding hosts interconnected with a trusted interface. By configuring trusted and untrusted DHCP sources, the switch can be configured to drop illegal frames immediately. DHCP snooping will still not stop an intruder sniffing for MAC addresses.
DAI determines the validity of an ARP packet based on the valid MAC address—to—IP address bindings stored in a DHCP snooping database. This means that only valid MAC addresses are permitted to reply to authorized devices on the network. Some really crafty attackers are out there waiting to pounce on networks, and for a majority of them these features are not enabled, so it is a gold mine in many parts of the world even in today's climate.
To enable DHCP snooping, the following commands are required. Example 3-44 enables DHCP snooping. Notice that the only supported platforms are switches with Cisco IOS-based software.
Example 3-44 Enabling MAC Spoofing on Cisco IOS Switches
!Catalyst IOS switches CatIOS(config)# ip dhcp snooping
CatIOS (config)# ip dhcp snooping vlan number [number] CatIOS (config)# ip dhcp snooping information option ! Enable trusted ports on the DHCP server interface CatIOS (config-if)# ip dhcp snooping trust
Was this article helpful?
+6 0
Responses
• callum
What is MAC spoofing attack?
4 months ago
Post a comment
|
{
"url": "https://www.ccexpert.us/ccie-security/mac-spoofing-attack.html",
"source_domain": "www.ccexpert.us",
"snapshot_id": "crawl=CC-MAIN-2019-43",
"warc_metadata": {
"Content-Length": "18806",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:JLVDKZUZGN6IDCSIBNA5GIUYY2HYJSTO",
"WARC-Concurrent-To": "<urn:uuid:4e597d5d-7872-46b7-80c7-c212c2742e36>",
"WARC-Date": "2019-10-18T08:19:36Z",
"WARC-IP-Address": "104.24.125.88",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2AGQ4C2YHGSZ5NNF6PUNSC2KUKOFBWI3",
"WARC-Record-ID": "<urn:uuid:82f8c409-e12b-4e8d-a7aa-d777ee248b2a>",
"WARC-Target-URI": "https://www.ccexpert.us/ccie-security/mac-spoofing-attack.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:59caa2c7-0902-4cfa-93d3-71b904a20e41>"
},
"warc_info": "isPartOf: CC-MAIN-2019-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2019\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-166.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,
20,
21,
525,
526,
554,
555,
583,
584,
590,
591,
633,
634,
1524,
1525,
1748,
1749,
1963,
1964,
2317,
2318,
2358,
2359,
2444,
2445,
2485,
2486,
2522,
2523,
2680,
2681,
2735,
2736,
2843,
2844,
2911,
2912,
2941,
2942,
3359,
3360,
3728,
3729,
4296,
4297,
4740,
4741,
4924,
4925,
4982,
4983,
5039,
5040,
5243,
5244,
5270,
5271,
5276,
5277,
5287,
5288,
5299,
5332,
5349,
5350
],
"line_end_idx": [
20,
21,
525,
526,
554,
555,
583,
584,
590,
591,
633,
634,
1524,
1525,
1748,
1749,
1963,
1964,
2317,
2318,
2358,
2359,
2444,
2445,
2485,
2486,
2522,
2523,
2680,
2681,
2735,
2736,
2843,
2844,
2911,
2912,
2941,
2942,
3359,
3360,
3728,
3729,
4296,
4297,
4740,
4741,
4924,
4925,
4982,
4983,
5039,
5040,
5243,
5244,
5270,
5271,
5276,
5277,
5287,
5288,
5299,
5332,
5349,
5350,
5364
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5364,
"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.31133005023002625,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.07980296015739441,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1665024608373642,
"rps_doc_frac_unique_words": 0.4007134437561035,
"rps_doc_mean_word_length": 5.116528034210205,
"rps_doc_num_sentences": 43,
"rps_doc_symbol_to_word_ratio": 0.00788176991045475,
"rps_doc_unigram_entropy": 5.232144355773926,
"rps_doc_word_count": 841,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05809900164604187,
"rps_doc_frac_chars_dupe_6grams": 0.02463397942483425,
"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.03346502035856247,
"rps_doc_frac_chars_top_3gram": 0.010225419886410236,
"rps_doc_frac_chars_top_4gram": 0.007436669897288084,
"rps_doc_books_importance": -437.34228515625,
"rps_doc_books_importance_length_correction": -437.34228515625,
"rps_doc_openwebtext_importance": -240.93817138671875,
"rps_doc_openwebtext_importance_length_correction": -240.93817138671875,
"rps_doc_wikipedia_importance": -163.97491455078125,
"rps_doc_wikipedia_importance_length_correction": -163.97491455078125
},
"fasttext": {
"dclm": 0.0728568434715271,
"english": 0.8522450923919678,
"fineweb_edu_approx": 2.5537755489349365,
"eai_general_math": 0.45621705055236816,
"eai_open_web_math": 0.148972749710083,
"eai_web_code": 0.7006252408027649
}
}
|
{
"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.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": "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": "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": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,517,507,575,623,406,000
|
0
votes
1answer
244 views
How to add a graphic table element in Python without Production Mapping extension?
I'd like to add a table in the Map Layout that includes only items visible at the current extent of the dataset. I know that the Production Mapping Extension lets you insert a Graphic Table Element ...
|
{
"url": "http://gis.stackexchange.com/questions/tagged/arcpy-mapping+arcgis",
"source_domain": "gis.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "42273",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:M6YBGEFA6FKO22X4EXVRD5I5FXKR4AHW",
"WARC-Concurrent-To": "<urn:uuid:8f66880b-78c7-4f9c-954b-5f8fa57c2e0c>",
"WARC-Date": "2014-04-24T08:58:00Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:FIYXMDSK7XKCBKBT6MY7QKCITHKKORJ2",
"WARC-Record-ID": "<urn:uuid:1d4db437-9fc4-425e-baaf-e31869f7b923>",
"WARC-Target-URI": "http://gis.stackexchange.com/questions/tagged/arcpy-mapping+arcgis",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4e10b7c8-6851-4027-9fe8-6672263df71d>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-4-33.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-15\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for April 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,
2,
8,
16,
26,
27,
110,
111
],
"line_end_idx": [
2,
8,
16,
26,
27,
110,
111,
312
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 312,
"ccnet_original_nlines": 7,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.35593220591545105,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.033898308873176575,
"rps_doc_frac_lines_end_with_ellipsis": 0.125,
"rps_doc_frac_no_alph_words": 0.10169491916894913,
"rps_doc_frac_unique_words": 0.7037037014961243,
"rps_doc_mean_word_length": 4.629629611968994,
"rps_doc_num_sentences": 3,
"rps_doc_symbol_to_word_ratio": 0.01694915071129799,
"rps_doc_unigram_entropy": 3.5331785678863525,
"rps_doc_word_count": 54,
"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.03999999910593033,
"rps_doc_frac_chars_top_3gram": 0.04800000041723251,
"rps_doc_frac_chars_top_4gram": 0.1599999964237213,
"rps_doc_books_importance": -26.648786544799805,
"rps_doc_books_importance_length_correction": -26.648786544799805,
"rps_doc_openwebtext_importance": -20.10496711730957,
"rps_doc_openwebtext_importance_length_correction": -20.10496711730957,
"rps_doc_wikipedia_importance": -16.973691940307617,
"rps_doc_wikipedia_importance_length_correction": -16.973691940307617
},
"fasttext": {
"dclm": 0.17882400751113892,
"english": 0.8385335206985474,
"fineweb_edu_approx": 1.2694512605667114,
"eai_general_math": 0.01822561025619507,
"eai_open_web_math": 0.22092103958129883,
"eai_web_code": 0.000018119999367627315
}
}
|
{
"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": "910.28",
"labels": {
"level_1": "History and Geography",
"level_2": "Geography and Voyages and travels",
"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": "-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": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,501,738,951,481,897,500
|
iPhone Wife and I on the same iCloud account??
Discussion in 'iOS 9' started by Warhawk15, Feb 24, 2016.
1. Warhawk15, Feb 24, 2016
Last edited: Feb 24, 2016
Warhawk15 macrumors regular
Warhawk15
Joined:
Feb 1, 2012
#1
Sorry if this is a stupid question, but I'm looking through the settings on her phone and can't figure out how to have her use my apple account for iCloud instead of hers.
Is there any way I can have my wife using my iCloud account on her iPhone?
I want pictures we both take on our iPhones to be on iCloud together so we don't have separate accounts.
Plus we can have the same notes in iCloud, etc.
I should add we are using Family Sharing, but thats for purchases and not for shared pictures, etc.
2. I7guy macrumors P6
I7guy
Joined:
Nov 30, 2013
Location:
Gotta be in it to win it
#2
Go to settings->icloud. Scroll down and sign out. Then sign in with what ever id you want to use. Make sure the phone has a password set.
3. aldrinjtauro macrumors regular
Joined:
Jul 3, 2014
Location:
Birmingham, AL
#3
Just turn on Photo Stream for Family Sharing.
4. AlliFlowers Contributor
AlliFlowers
Joined:
Jan 1, 2011
Location:
L.A. (Lower Alabama)
#5
You want to use the same iTunes account, but not the same iCloud account or you'll wind up with each other's mail, texts, and FaceTime calls.
5. Small White Car macrumors G4
Small White Car
Joined:
Aug 29, 2006
Location:
Washington DC
#6
Sadly, this is the correct answer. When iCloud was new it was possible to share accounts but they kept putting more and more functionality into iCloud so now it's a nightmare to share accounts. Do not do it.
I say "sadly" because there STILL isn't a good solution for merging photos automatically. I, too, want a better way to do it but iCloud isn't interested in helping.
I gave up on iCloud photos and use Dropbox's auto-upload feature on my family's phones. I have to remember to launch Dropbox once a week or so, but after that it's all automatic.
6. aldrinjtauro macrumors regular
Joined:
Jul 3, 2014
Location:
Birmingham, AL
#7
Family Sharing + Shared Photo Stream?
7. Small White Car macrumors G4
Small White Car
Joined:
Aug 29, 2006
Location:
Washington DC
#8
I wish, but there's really no such thing.
A "shared photostream" that merged all photos would be perfect, but that's not what Apple built.
The sharing option you're talking about is a feature which allows family members to manually upload specific photos to an album that the other family members can see. Really, it's more like Facebook than photostream.
A fine enough feature, but not useful for what I need.
8. AndyK macrumors 65816
AndyK
Joined:
Jan 10, 2008
Location:
Terra
#9
Surely you organise photos you take? Why not just take photos then organise them once/week or after a trip and manage them all in one large family shared gallery?
Also the Dropbox camera upload can run in the background when you change location & are connected to wifi (or cellular if you don't care about data usage), so you never really need to think about uploading them yourself.
Share This Page
|
{
"url": "https://forums.macrumors.com/threads/wife-and-i-on-the-same-icloud-account.1958156/",
"source_domain": "forums.macrumors.com",
"snapshot_id": "crawl=CC-MAIN-2019-13",
"warc_metadata": {
"Content-Length": "180559",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:U6CZNBAHF4T4HPVATNLPHPKKWHVC6UT6",
"WARC-Concurrent-To": "<urn:uuid:73ebf3d3-7790-4672-a332-4fe0c1602c0d>",
"WARC-Date": "2019-03-22T01:45:17Z",
"WARC-IP-Address": "162.254.116.248",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:QVYUVDBGL5CSXDDMKJ6QIXALHTW5KFBE",
"WARC-Record-ID": "<urn:uuid:30b16678-5101-4e69-8b73-43383788bd79>",
"WARC-Target-URI": "https://forums.macrumors.com/threads/wife-and-i-on-the-same-icloud-account.1958156/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1675b401-939c-477c-a589-74d751891f72>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-143-92-167.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,
47,
48,
106,
107,
136,
166,
167,
199,
200,
214,
215,
227,
243,
250,
426,
427,
506,
615,
667,
668,
772,
778,
802,
803,
813,
814,
826,
843,
857,
886,
893,
1035,
1041,
1077,
1078,
1090,
1106,
1120,
1139,
1146,
1196,
1202,
1231,
1232,
1248,
1249,
1261,
1277,
1291,
1316,
1323,
1469,
1475,
1509,
1510,
1530,
1531,
1543,
1560,
1574,
1592,
1599,
1811,
1812,
1981,
1982,
2165,
2171,
2207,
2208,
2220,
2236,
2250,
2269,
2276,
2318,
2324,
2358,
2359,
2379,
2380,
2392,
2409,
2423,
2441,
2448,
2494,
2495,
2596,
2597,
2818,
2819,
2878,
2884,
2911,
2912,
2922,
2923,
2935,
2952,
2966,
2976,
2983,
3150,
3151,
3376,
3382,
3383
],
"line_end_idx": [
47,
48,
106,
107,
136,
166,
167,
199,
200,
214,
215,
227,
243,
250,
426,
427,
506,
615,
667,
668,
772,
778,
802,
803,
813,
814,
826,
843,
857,
886,
893,
1035,
1041,
1077,
1078,
1090,
1106,
1120,
1139,
1146,
1196,
1202,
1231,
1232,
1248,
1249,
1261,
1277,
1291,
1316,
1323,
1469,
1475,
1509,
1510,
1530,
1531,
1543,
1560,
1574,
1592,
1599,
1811,
1812,
1981,
1982,
2165,
2171,
2207,
2208,
2220,
2236,
2250,
2269,
2276,
2318,
2324,
2358,
2359,
2379,
2380,
2392,
2409,
2423,
2441,
2448,
2494,
2495,
2596,
2597,
2818,
2819,
2878,
2884,
2911,
2912,
2922,
2923,
2935,
2952,
2966,
2976,
2983,
3150,
3151,
3376,
3382,
3383,
3398
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3398,
"ccnet_original_nlines": 108,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.37755101919174194,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03352769836783409,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.23906706273555756,
"rps_doc_frac_unique_words": 0.4797047972679138,
"rps_doc_mean_word_length": 4.394834041595459,
"rps_doc_num_sentences": 40,
"rps_doc_symbol_to_word_ratio": 0.011661809869110584,
"rps_doc_unigram_entropy": 5.250417232513428,
"rps_doc_word_count": 542,
"rps_doc_frac_chars_dupe_10grams": 0.11251050233840942,
"rps_doc_frac_chars_dupe_5grams": 0.11251050233840942,
"rps_doc_frac_chars_dupe_6grams": 0.11251050233840942,
"rps_doc_frac_chars_dupe_7grams": 0.11251050233840942,
"rps_doc_frac_chars_dupe_8grams": 0.11251050233840942,
"rps_doc_frac_chars_dupe_9grams": 0.11251050233840942,
"rps_doc_frac_chars_top_2gram": 0.011754830367863178,
"rps_doc_frac_chars_top_3gram": 0.02183038927614689,
"rps_doc_frac_chars_top_4gram": 0.01679261028766632,
"rps_doc_books_importance": -285.9255065917969,
"rps_doc_books_importance_length_correction": -285.9255065917969,
"rps_doc_openwebtext_importance": -176.49343872070312,
"rps_doc_openwebtext_importance_length_correction": -176.49343872070312,
"rps_doc_wikipedia_importance": -116.47038269042969,
"rps_doc_wikipedia_importance_length_correction": -116.47038269042969
},
"fasttext": {
"dclm": 0.046426478773355484,
"english": 0.9436435103416443,
"fineweb_edu_approx": 1.0115519762039185,
"eai_general_math": 0.00928283017128706,
"eai_open_web_math": 0.10546963661909103,
"eai_web_code": 0.0003473800024949014
}
}
|
{
"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": "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": "2",
"label": "Partially Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-9,147,795,199,216,053,000
|
1,601 reputation
615
bio website suitdummy.blogspot.com
location Cambridge, MA
age
visits member for 2 years, 5 months
seen yesterday
I once launched swi-prolog and asked it a question:
ely:~/home$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.10.1)
Copyright (c) 1990-2010 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- love(math) is unrequited.
true.
Apr
22
revised Cluster Analysis Terminology question
edited body
Apr
21
comment Cluster Analysis Terminology question
In the applied machine learning literature, 'hypergraph' is the appropriate term for most applications, and it is meant in the full mathematical sense. You see that in everything from stats papers to computer vision to social networks. See my answer below.
Apr
21
answered Cluster Analysis Terminology question
Apr
21
answered Solving $Ax = B$ when $A$ has a large condition number.
Apr
21
answered Weird conclusion about variance/covariance from differentiating
Apr
21
comment Weird conclusion about variance/covariance from differentiating
I think something is being lost in translation in the OP. The question should be asking: suppose $a$ is chosen to optimize portfolio risk between $X$ and $Y$, and is chosen such that $\text{COV}(X,Y) = a\text{Var}(X)$. Then show that $a$ must be 1.
Apr
18
answered Books for Understanding Bayesian probability from the Beginning
Apr
18
comment Can't see how $e^{\operatorname{Log}(z)} = z$ in these notes
What is $Re[z]$ and $Im[z]$ in terms of $|z|$ and the angle $z$ makes with the positive real axis? It's just polar coordinates, basically.
Apr
16
comment How can Radon-Nikodym and Borel-Cantelli be used to calculate Probability distribution?
The paragraph on the Radon-Nikodym connection makes sense to me. After all, that's the precise way in which the Cantor function (which is a valid CDF) is shown to have no PDF.
Apr
15
comment How to expand undifferential function as power series?
Check out the basics linked here. Your question was something that spurred decades of math research and resulted in radically changing the notion of a function. Fourier series is one method to get some kinds of convergence properties for series expansions of non-differentiable functions, when the points causing non-differentiability are sufficiently well-behaved.
Apr
15
comment How to expand undifferential function as power series?
Re-derive Fourier series?
Apr
15
comment Why bother with Mathematics, if Gödel's Incompleteness Theorem is true?
@CarlMummert I totally agree. If you follow my link to the answer to the other question, you'll see a long passage that discusses a rebuttal to Penrose's ideas. Actually, Penrose took that idea from Lucas, who proposed it much earlier, I think in the 60s, without all of the quantum gravity hoopla.
Apr
15
comment Why bother with Mathematics, if Gödel's Incompleteness Theorem is true?
@Didier, I agree with you 100%. That component of this question should be isolated from question that the title of the post asks. Godel himself asked the question that is in the title and the only answered that seemed to satisfy him was "well, let's hope $P\neq{NP}$". But the stuff about approximating absolute truth, etc., is not appropriate for Godel's theorems. That's a whole different philosophical beast and the analogy with Newtonian-to-Quantum physics isn't a good one given the state of the art in the philosophy of truth.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
Be closed-minded about it if you want to, but the bulk of the uses of Godel's theorems in philosophy come from mathematicians, especially decision theorists. It's a non-trivial part of the philosophy of mathematics. You are certainly free to disagree with it if you want, but it's nothing but disingenuous to claim that there are virtually no philosophical ramifications of Godel's theorem.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
Look, you argued above that because GIT is a theorem, what matters here is actually verifying that its hypotheses are met by aspects of reality before we can say it has philosophical ramifications. Yet, with respect to things like Aumann's Agreement Theorem (the hypotheses of which are surely not met by non-Bayesian human brains), experts in decision theory and the epistemology of probability still argue that it has serious philosophical ramifications. I'm sorry if you didn't understand why my critique of your theorem comment was valid, but it was.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
@IasafroMaesman This is very similar to the kinds of things that decision theorists study. I love both the logical approach to it, mentioned with your naive example, and also the practical approach, via things like the Kahneman and Tversky work on cognitive biases (scope insensitivity seems relevant to your specific question). I'm glad that you clarified your thoughts. It is a useful contribution to this thread.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
And I willfully admit that I haven't read Franzen's book. I should do so given what you are saying, but all my peers who study decision theory laugh about that book. They essentially consider it a useless straw-man type argument against really dumb uses of the incompleteness theorems. I'm not advocating dumb uses; I'm advocating legit uses (legit in the sense that they have been deemed legit by the same peer review process that deems any other math research legit).
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
I'm not referring to creationists. I was more referring to the arguments that a pure Bayesian reasoner could be viewed (just philosophically, not biologically, due to computability arguments) as a fixed point of Darwinian evolution. I do not consider creationist claims valid enough to even merit a response. And you still haven't responded on points about Kritchman and Raz except to say that you don't think it's philosophical. Well, that's great, but doesn't jive with the math community at large.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
Also, Arrow's Impossibility Theorem and Aumann's Agreement Theorem are also theorems, but it is widely accepted that these have many philosophical ramifications. The agreement theorem in particular has many interesting consequences in Bayesian decision theory, which is a branch of formal philosophy. Status as a theorem doesn't preclude something from being relevant to philosophy. See this for example.
Apr
14
comment What philosophical consequence of Goedel's incompleteness theorems?
Maybe don't use quotes if you're not inventive enough to look for things that Google can't hand you directly. Here's a useful link to get you started. You may want to read the sequence on reductionism first to get anything out of the sequence on metaethics.
|
{
"url": "http://math.stackexchange.com/users/26927/ems?tab=activity&sort=all&page=4",
"source_domain": "math.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2014-35",
"warc_metadata": {
"Content-Length": "52044",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FJRWHMBMOFHEHYAH4ZRRSWXUNKQJACRA",
"WARC-Concurrent-To": "<urn:uuid:2803b6be-4704-4a34-9b0a-88570138aa12>",
"WARC-Date": "2014-08-22T04:10:48Z",
"WARC-IP-Address": "198.252.206.16",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:WU7HXDWNLQ5PDQXPCXP6CPXDJZP3EK7Z",
"WARC-Record-ID": "<urn:uuid:093c1315-c5cb-4b1e-a6d9-06cc790106b7>",
"WARC-Target-URI": "http://math.stackexchange.com/users/26927/ems?tab=activity&sort=all&page=4",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7b31fb26-88e2-495d-8df2-a02af516ac80>"
},
"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,
17,
21,
56,
79,
83,
119,
134,
135,
187,
188,
207,
271,
333,
402,
467,
519,
520,
571,
572,
601,
607,
608,
612,
615,
661,
673,
677,
680,
726,
983,
987,
990,
1037,
1041,
1044,
1109,
1113,
1116,
1189,
1193,
1196,
1268,
1517,
1521,
1524,
1597,
1601,
1604,
1673,
1812,
1816,
1819,
1915,
2091,
2095,
2098,
2161,
2527,
2531,
2534,
2597,
2623,
2627,
2630,
2710,
3009,
3013,
3016,
3096,
3629,
3633,
3636,
3712,
4103,
4107,
4110,
4186,
4741,
4745,
4748,
4824,
5240,
5244,
5247,
5323,
5793,
5797,
5800,
5876,
6377,
6381,
6384,
6460,
6865,
6869,
6872,
6948
],
"line_end_idx": [
17,
21,
56,
79,
83,
119,
134,
135,
187,
188,
207,
271,
333,
402,
467,
519,
520,
571,
572,
601,
607,
608,
612,
615,
661,
673,
677,
680,
726,
983,
987,
990,
1037,
1041,
1044,
1109,
1113,
1116,
1189,
1193,
1196,
1268,
1517,
1521,
1524,
1597,
1601,
1604,
1673,
1812,
1816,
1819,
1915,
2091,
2095,
2098,
2161,
2527,
2531,
2534,
2597,
2623,
2627,
2630,
2710,
3009,
3013,
3016,
3096,
3629,
3633,
3636,
3712,
4103,
4107,
4110,
4186,
4741,
4745,
4748,
4824,
5240,
5244,
5247,
5323,
5793,
5797,
5800,
5876,
6377,
6381,
6384,
6460,
6865,
6869,
6872,
6948,
7205
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7205,
"ccnet_original_nlines": 97,
"rps_doc_curly_bracket": 0.0013879300095140934,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.374827116727829,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02558783069252968,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.19778700172901154,
"rps_doc_frac_unique_words": 0.44021737575531006,
"rps_doc_mean_word_length": 5.261775493621826,
"rps_doc_num_sentences": 77,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.559622764587402,
"rps_doc_word_count": 1104,
"rps_doc_frac_chars_dupe_10grams": 0.13031503558158875,
"rps_doc_frac_chars_dupe_5grams": 0.14993974566459656,
"rps_doc_frac_chars_dupe_6grams": 0.14993974566459656,
"rps_doc_frac_chars_dupe_7grams": 0.13031503558158875,
"rps_doc_frac_chars_dupe_8grams": 0.13031503558158875,
"rps_doc_frac_chars_dupe_9grams": 0.13031503558158875,
"rps_doc_frac_chars_top_2gram": 0.030297810211777687,
"rps_doc_frac_chars_top_3gram": 0.01446031965315342,
"rps_doc_frac_chars_top_4gram": 0.019280429929494858,
"rps_doc_books_importance": -749.8380126953125,
"rps_doc_books_importance_length_correction": -749.8380126953125,
"rps_doc_openwebtext_importance": -483.537353515625,
"rps_doc_openwebtext_importance_length_correction": -483.537353515625,
"rps_doc_wikipedia_importance": -355.3423156738281,
"rps_doc_wikipedia_importance_length_correction": -355.3423156738281
},
"fasttext": {
"dclm": 0.2985966205596924,
"english": 0.9422322511672974,
"fineweb_edu_approx": 1.7728270292282104,
"eai_general_math": 0.9536389112472534,
"eai_open_web_math": 0.6019700169563293,
"eai_web_code": 0.28326869010925293
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "510",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": ""
}
},
"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": "3",
"label": "Procedural"
}
},
"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": "10",
"label": "Knowledge Article"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,827,305,363,261,935,000
|
redux-saga 的 fork model
redux-saga 的世界里,你可以使用 2 个 Effects 在后台动态地 fork task
• fork 用来创建 attached forks
• spawn 用来创建 detached forks
Attached forks (using fork)
Attached forks 通过以下规则继续附加在它们的 parent
结论
• Saga 只会在这之后终止:
• 它终止了自己的指令
• 所有附加的 forks 本身被终止
假如我们有以下情形:
import { delay } from 'redux-saga'
import { fork, call, put } from 'redux-saga/effects'
import api from './somewhere/api' // app specific
import { receiveData } from './somewhere/actions' // app specific
function* fetchAll() {
const task1 = yield fork(fetchResource, 'users')
const task2 = yield fork(fetchResource, 'comments')
yield call(delay, 1000)
}
function* fetchResource(resource) {
const {data} = yield call(api.fetch, resource)
yield put(receiveData(data))
}
function* main() {
yield call(fetchAll)
}
call(fetchAll) 将在这之后终止:
• fetchAll 本身终止了, 意味着这 3 个 effect 都会被执行. 由于 fork effects 是非阻塞的, task 将被阻塞在 call(delay, 1000)
• 这 2 个被 fork 的 task 终止, 意思是在 fetch 所需的资源之后放入对应的 receiveData action
所以整个 task 将阻塞直到一个 1000 毫秒的 delay 被传送,并且 task1 和 task2 完成了他们的任务。
比方说,1000 毫秒的 delay 和这两个 task 还沒有完成,然后 fetchAll 在终止整个 task 之前,将一直等待直到所有被 fork 的 task 完成。
细心的读者可能会注意到 fetchAll saga 可以使用平行 Effect 来重写。
function* fetchAll() {
yield all([
call(fetchResource, 'users'), // task1
call(fetchResource, 'comments'), // task2,
call(delay, 1000)
])
}
事实上,被附加的 fork 与平行 Effect 共享相同的语意:
• 在平行情況下我们执行 task
• 在所有被 launch 的 task 终止后,parent 将会终止
这也适用于其他语意(错误和取消传播)。你可以简单地把它考虑作为一个动态平行 Effect,来理解附加 fork 的行为。
Error 传播
按照同样的比喻,让我们来详细的检查在平行的 Effect 中是如何处理错误的
例如,假设我们有这么一个 Effect:
yield all([
call(fetchResource, 'users'),
call(fetchResource, 'comments'),
call(delay, 1000)
])
一旦其中一个子 Effect 失敗,上方的 Effect 就会失敗。 此外,未捕获的错误将会造成平行 Effect 取消所有其他 pending 中的 Effect。例如,如果 call(fetchResource, 'users') 发出了一个未捕获的错误,平行 Effect 将会取消其他两个 task(如果它们依然在 pending),然后从失败的调用中,以错误终止它本身。
类似于被 attach 的 forks,Saga 会在以下情况马上终止:
• 指令的 main body 拋出了一个错误
• 一个未捕获的错误通过其中一个被 attach 的 forks 抛出
所以在先前的例子中:
//... imports
function* fetchAll() {
const task1 = yield fork(fetchResource, 'users')
const task2 = yield fork(fetchResource, 'comments')
yield call(delay, 1000)
}
function* fetchResource(resource) {
const {data} = yield call(api.fetch, resource)
yield put(receiveData(data))
}
function* main() {
try {
yield call(fetchAll)
} catch (e) {
// handle fetchAll errors
}
}
If at a moment, for example, fetchAll is blocked on the call(delay, 1000) Effect, and say, task1 failed, then the whole fetchAll task will fail causing
• Cancellation of all other pending tasks. This includes:
• The main task (the body of fetchAll): cancelling it means cancelling the current Effect call(delay, 1000)
• The other forked tasks which are still pending. i.e. task2 in our example.
• The call(fetchAll) will raise itself an error which will be caught in the catch body of main
Note we're able to catch the error from call(fetchAll) inside main only because we're using a blocking call. And that we can't catch the error directly from fetchAll. This is a rule of thumb, you can't catch errors from forked tasks. A failure in an attached fork will cause the forking parent to abort (Just like there is no way to catch an error inside a parallel Effect, only from outside by blocking on the parallel Effect).
如果在这样的情況下,例如 fetchAll 被阻塞在 call(delay, 1000) Effect,假如 task1 失败了,然后整个 fetchAll task 将会因此失敗
• 取消所有其他在 pending 的 task。包含:
• main taskfetchAll 的本身):取消的意思是,取消目前的 call(delay, 1000) 的 Effect
• 其他被 fork 的 task 仍然在 pending。例如我们例子中的 task2
• maincatch 内将会捕获由 call(fetchAll) 抛出的错误
注意,因为我们使用了一个阻塞的 call,所以我们只能从 main 內部 catch call(fetchAll) 的错误,而且我们不能直接从 fetchAll 捕获错误。这是首要的原则,你不能从被 fork 的 task 捕获错误。在一个被附加的 fork 中的错误将会导致被 fork 的 parent 被终止(就像没有方法在一个平行 Effect 捕捉错误一样,只能从外部通过被阻塞的平行 Effect)。
Cancellation
取消 Saga 导致:
• main task 意思是当 Saga 被阻塞时,取消当前的 Effect
• 所有被附加的 fork 仍然继续执行
WIP
Detached forks (using spawn)
Detached forks live in their own execution context. A parent doesn't wait for detached forks to terminate. Uncaught errors from spawned tasks are not bubbled up to the parent. And cancelling a parent doesn't automatically cancel detached forks (you need to cancel them explicitly).
In short, detached forks behave like root Sagas started directly using the middleware.run API.
Detached forks(使用 spawn
被分离的 fork 存活在它们本身的执行上下文中。parent 不会等待被分离的 fork 终止。从被 spawn 的 task 抛出的未捕获的错误不会冒泡到 parent,而且取消一个 parent 不会自动取消被分离的 fork(你需要明确地取消它们)。
简单来说,被分离的 fork 的行为像是使用 middleware.run API 直接启动 root Saga。
WIP
results matching ""
No results matching ""
|
{
"url": "https://redux-saga-in-chinese.js.org/docs/advanced/ForkModel.html",
"source_domain": "redux-saga-in-chinese.js.org",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "37090",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:O7QODS25VHZYP2JVOYEGAUZDC3ENA4UA",
"WARC-Concurrent-To": "<urn:uuid:6097884b-0a91-45cf-bfb3-b9b9bf43570c>",
"WARC-Date": "2020-08-04T14:32:54Z",
"WARC-IP-Address": "104.26.9.84",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PRAC4OMAQCZKSCMLC4DT7AN73L2CIQGH",
"WARC-Record-ID": "<urn:uuid:af8a519c-bff8-4031-9239-46e986d2ed6b>",
"WARC-Target-URI": "https://redux-saga-in-chinese.js.org/docs/advanced/ForkModel.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:984c84cf-621d-44f9-bce7-4fe4c25074e1>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-214.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,
24,
25,
76,
77,
106,
136,
137,
165,
166,
203,
204,
207,
208,
227,
243,
267,
268,
279,
280,
315,
368,
418,
484,
485,
508,
559,
613,
639,
641,
642,
678,
727,
758,
760,
761,
780,
803,
805,
806,
830,
831,
926,
927,
997,
998,
1062,
1063,
1151,
1152,
1197,
1198,
1221,
1235,
1282,
1330,
1352,
1357,
1359,
1360,
1394,
1395,
1415,
1454,
1455,
1516,
1517,
1526,
1527,
1566,
1567,
1588,
1589,
1601,
1633,
1668,
1688,
1691,
1692,
1883,
1884,
1921,
1922,
1948,
1949,
1987,
1988,
1999,
2000,
2014,
2015,
2038,
2089,
2143,
2169,
2171,
2172,
2208,
2257,
2288,
2290,
2291,
2310,
2318,
2343,
2359,
2389,
2393,
2395,
2396,
2548,
2549,
2609,
2610,
2722,
2803,
2900,
2901,
3330,
3331,
3422,
3423,
3454,
3455,
3524,
3573,
3615,
3616,
3823,
3824,
3837,
3838,
3850,
3851,
3893,
3894,
3917,
3918,
3922,
3923,
3952,
3953,
4235,
4236,
4331,
4332,
4356,
4357,
4487,
4488,
4546,
4547,
4551,
4552,
4572,
4573
],
"line_end_idx": [
24,
25,
76,
77,
106,
136,
137,
165,
166,
203,
204,
207,
208,
227,
243,
267,
268,
279,
280,
315,
368,
418,
484,
485,
508,
559,
613,
639,
641,
642,
678,
727,
758,
760,
761,
780,
803,
805,
806,
830,
831,
926,
927,
997,
998,
1062,
1063,
1151,
1152,
1197,
1198,
1221,
1235,
1282,
1330,
1352,
1357,
1359,
1360,
1394,
1395,
1415,
1454,
1455,
1516,
1517,
1526,
1527,
1566,
1567,
1588,
1589,
1601,
1633,
1668,
1688,
1691,
1692,
1883,
1884,
1921,
1922,
1948,
1949,
1987,
1988,
1999,
2000,
2014,
2015,
2038,
2089,
2143,
2169,
2171,
2172,
2208,
2257,
2288,
2290,
2291,
2310,
2318,
2343,
2359,
2389,
2393,
2395,
2396,
2548,
2549,
2609,
2610,
2722,
2803,
2900,
2901,
3330,
3331,
3422,
3423,
3454,
3455,
3524,
3573,
3615,
3616,
3823,
3824,
3837,
3838,
3850,
3851,
3893,
3894,
3917,
3918,
3922,
3923,
3952,
3953,
4235,
4236,
4331,
4332,
4356,
4357,
4487,
4488,
4546,
4547,
4551,
4552,
4572,
4573,
4599
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4599,
"ccnet_original_nlines": 155,
"rps_doc_curly_bracket": 0.006088280119001865,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.11971104145050049,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0061919498257339,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.47987616062164307,
"rps_doc_frac_unique_words": 0.454849511384964,
"rps_doc_mean_word_length": 5.894649028778076,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0.0010319900466129184,
"rps_doc_unigram_entropy": 5.119408130645752,
"rps_doc_word_count": 598,
"rps_doc_frac_chars_dupe_10grams": 0.11858156323432922,
"rps_doc_frac_chars_dupe_5grams": 0.11858156323432922,
"rps_doc_frac_chars_dupe_6grams": 0.11858156323432922,
"rps_doc_frac_chars_dupe_7grams": 0.11858156323432922,
"rps_doc_frac_chars_dupe_8grams": 0.11858156323432922,
"rps_doc_frac_chars_dupe_9grams": 0.11858156323432922,
"rps_doc_frac_chars_top_2gram": 0.0331914909183979,
"rps_doc_frac_chars_top_3gram": 0.010212769731879234,
"rps_doc_frac_chars_top_4gram": 0.014751769602298737,
"rps_doc_books_importance": -384.7889709472656,
"rps_doc_books_importance_length_correction": -384.7889709472656,
"rps_doc_openwebtext_importance": -190.67984008789062,
"rps_doc_openwebtext_importance_length_correction": -190.67984008789062,
"rps_doc_wikipedia_importance": -192.29283142089844,
"rps_doc_wikipedia_importance_length_correction": -192.29283142089844
},
"fasttext": {
"dclm": 0.7136078476905823,
"english": 0.14243310689926147,
"fineweb_edu_approx": 2.7076706886291504,
"eai_general_math": 0.21321141719818115,
"eai_open_web_math": 0.08341901749372482,
"eai_web_code": 0.7135248184204102
}
}
|
{
"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": "6",
"label": "Indeterminate"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,735,476,435,277,269,000
|
Swift Developer Rates
How much does it cost to hire an offshore Swift developer?
Swift
Average cost of Swift
development (USD)
hourly $ 43.32
monthly $ 6931.2
The average rates for offshore software development services based on the YouTeam platforms’s data: 300+ outsourcing companies with a joint talent pool of 20,000+ software engineers.
Senior Swift Developer Rate Swift
$ 25 Min
$ 46 Mediana
$ 85 Max
Last update: July 2022
Swift Developer Salary vs. Rates on Swift Software Development Services: what’s the difference? Our data includes not only salary itself, but bonuses, non-financial benefits, paid vacations, office costs, and taxes for each developer. So you can see the final amount that should be paid for the work of an outsourced senior Swift developer.
Looking for a Swift Engineer? We can source the best matching candidates for your team in 48 hours or less. Hire developers
YouTeam is the #1 solution for on-demand engineering staff augmentation in the world. Our YCombinator-backed platform unites resources of 300+ top development agencies of Eastern Europe and Latin America in one talent tool. This makes us first who can find the best available matches for each project.
Why hire engineers with YouTeam
Our model is trusted by Y Combinator
Each engineer passed a multi-stage vetting procedure
You can request an add-on skills verification via HackerRank for Work
We provide the right matches in a matter of hours
Contact us
Related Technologies
Java logo
Java
Java is a high-level, class-based, object-oriented programming language that is used for back-end development. Cost of Java development
Flutter logo
Flutter
Flutter is an open-source UI software dev kit that is used for the creation of cross-platform apps and the web from a single codebase. Cost of Flutter development
React Native Logo
React Native
React Native is an open-source UI framework for cross-platform app development. Cost of React Native development
More technologies More technologies
Read about Work with Swift Developers
10 Things to Keep in Mind about iOS Development in 2022
Outsourcing
YouTeam Editorial Team
March 03, 2021 9 mins read
More articles on our blog More articles on our blog
Understanding Swift as a
programming language
Swift is a programming language developed by Apple to create iOS, iPadOS, macOS, tvOS, watchOS applications. It was initially released in 2014 and has since been used by iOS developers extensively. The language follows the Objective-C runtime library, enabling Objective-C, C, C++, and Swift code to run in the same program.
Swift is very easy to learn and is extremely powerful and efficient for app development. In fact, it is simple enough to be someone's first development language, so there is a pool of Swift developers for hire.
It is safe, concise, and runs very fast. Swift is built with the LLVM compiler and has been a part of Xcode since version 6.
By using Swift, the object-oriented and procedural parts of the language are combined. So, no separate library is needed to support functions such as string handling or input/output.
Objective-C was the first language that was used to develop software for Apple devices. But it was introduced in the 1980s. Since then, a lot of alternatives have come up. Swift was released in 2014 to make programming easier with the inclusion of a lot of modern features. And since then, it has become a vital part of iOS engineers' workflow. Here is a brief description of how Swift is used.
iPhone and iPad app development:
Objective-C and Swift are the top two languages that you can choose from for iOS development. Because of the modern features, most developers choose Swift over Objective-C.
Apple TV development
tvOS is the operating system that is used to power Apple TV. Swift is used for game development on tvOS, creating appealing visuals and powering the Apple TV app that is used for streaming.
macOS app development
Mobile development is not the only benefit of using Swift. It also caters to Apple's desktop and laptop operating systems. A large number of apps in the App Store for macOS are written in Swift.
A number of tools in Swift are used to help build scalable, functional, and robust iOS apps. Here are some of the most popular tools and frameworks:
XCode
XCode is the first choice for most mobile engineers looking to develop apps for Apple. It is one of the most reliable tools on the market in terms of Swift development.
AppCode
Launched by JetBrains, this framework is compatible with several other programming languages such as C++, JavaScript, and Objective-C. AppCode helps make writing and analyzing code very easy and seamless.
Mockingbird
The Mockingbird tool allows developers to conveniently outline the development process. It allows engineers to create visual prototypes very easily and share them with designers.
Essentially, a Swift developer uses this programming language to develop a web or mobile app for Apple's line of products. Here is a brief description of the tasks and responsibilities of Swift engineers:
• Create web and mobile apps and software for Apple devices.
• Work with a team to develop new features of the apps and identify shortcomings.
• Fix errors and bugs in the apps regularly.
• Ensure the responsiveness and operability of the developed applications.
• Prepare training manuals for the users of the apps.
Depending on the developers' years of experience, and their skillset and knowledge, they can be classified into three categories:
Junior developer
Junior Swift developers need to have a basic understanding of how development in Swift works and be able to work with basic tasks on Swift projects. Entry-level engineers usually work in collaboration with other team members and have to be mentored by senior developers in order to get a better understanding of programming and get new development skills.
Middle developer
Usually, you can find developers with the word middle in their job title, but middle developers are considered as engineers who have experience of 2-3 years focusing on using Swift on their projects. They are usually the ones coming up with ideas and working to execute them. Middle engineers also know other languages such as C++, Java, or Python and use them to build more efficient software solutions.
Senior developer
Senior software engineers usually have more than 5 years of experience, but it more depends on skills and knowledge. Senior developers need to have expert-level knowledge of Swift and be aware of other frameworks and tools that can be used to improve the project. Moreover, they should also have a list of soft skills like management and responsibility to lead the project and mentor junior team members, proactiveness to come up with new ideas of product improvement, etc.
Swift engineers work on developing web or mobile applications. They are responsible for the development stage and for adding new features and making the software more user-friendly.
As Swift can be used for both back-end and front-end development, Swift engineers are considered full-stack developers and can create apps without additional help.
When you are recruiting a Swift developer, here is a list of requirements to consider in your applicants:
• Understanding software development life-cycle procedures and software development environment.
• Knowing software architecture and knowing how to use the technology at the front-end and back-end of app development.
• Being thorough with the concepts of Objective-C, Swift, Cocoa Touch, and the principles of object-oriented programming.
• Using Core Data to ensure that the apps save the user data on Apple devices. This ensures that data isn't lost whenever the app is opened.
• Being familiar with spatial reasoning, which means the ability to visualize in 3D. The use of spatial enjoying allows you to make the same app usable on multiple jobs.
• Proficiency in code versioning tools, including Mercurial, Git, and SVN.
• Experience with push notifications, cloud messaging, APIs, and continuous integration.
• Knowledge of RESTful APIs to connect to back-end services.
According to your needs, there are three main types of software developers that you can hire.
Freelancers
These programmers are usually not associated with any software development companies and work independently. They will be signed on only for the project, and their contract will end when the project is completed. So, you don't need to worry about firing them when they are no longer needed. Freelancers are quite common in the startup scene since they are often cheaper. However, they are not a good solution for long-term projects, as they can leave at any moment. Also, it usually takes some time to find a really quality developer among all freelancers.
In-house engineers
If your company needs developers to create a software/app from scratch or to have a full-time development team for a long-term project, then hiring in-house engineers is a great idea. They are dedicated and more interested in a project, devoting all their time to your product and helping to create the best software solution for your business.
Outsourced developers
Outsourced software developers are usually hired from software development agencies and can work as a dedicated outsourced team of developers or as a contractor to help your in-house team. Hiring developers from reliable agencies abroad is not only a chance to get quality tech talent, but it also helps to save costs as offshore engineers are usually cheaper than in-house hires.
When you're planning out the Swift project, you need to identify your needs to understand what you require from a developer.
When you write a project description for candidates, try to briefly explain your business model and the industry of your project – it can help to find a developer with experience in your area (e.g., healthtech, fintech, real estate, eCommerce). The developer needs to understand the business problem and the solution they need to create. And shortly notify if the project is on the early development stage, or it is already launched and needs support and improvements.
Then, specify the product they need to develop and the responsibilities the developer will have on a project. Then, list the needed previous experience and skills.
It's always important to evaluate the candidate's tech skills during the interview. You can provide online code tests and also ask basic questions that can help identify the developer's level. Here are some hard skills questions that you can ask to ensure that the job candidate is competent enough to work with you:
• What are the differences between Swift and Objective-C?
• Where can the apple iPhone apps be tested in the absence of iOS devices?
• In which iOS version was multitasking introduced?
• What are the collection types available in Swift?
• Explain what optional chaining is?
• Explain what Lazy stored properties are and when it is useful?
• Output-based questions where the candidate examines a block of code and finds out the output that the code will give.
Tell us about your plans on a brief intro call and we’ll start the matching process.
FAQ about Hiring Swift Developers
Why hire Swift coders with YouTeam?
YouTeam is a fast and secure way of engineering staff augmentation. With our platform, you can hire multiple top-notch developers from reliable offshore dev agencies in a week. We ensure that you only speak to the developers that are suitable for your needs and have all the required skills.
How does YouTeam vet Swift software developers?
YouTeam pre-vets each candidate through pre-interviews to ensure their quality and competence. Their tech and soft skills are both evaluated thoroughly to ensure that they are a good match due to requirements. Then, only top candidates are provided to the client for the interview.
How much does it cost to hire the best Swift developers using YouTeam?<
Depending on your tech and soft skills, the years of experience, and the location of the candidate, the average hourly rate of a Swift developer on YouTeam is $55.
Where are the best offshore Swift engineers are located?
The best offshore Swift engineers are located in Latin America and Eastern Europe. Countries such as Poland, Ukraine, Belarus, in East Europe are becoming popular offshore destinations due to their growing IT hubs and the quality of their developers. The same situation in Colombia, Argentina, Costa Rica, and Brazil – these countries can provide a wide pool of top engineers for hire, which is a great solution for countries like the US facing a tech talent shortage.
The number of developers in Latin America and Eastern Europe is continuously increasing. Moreover, hiring from these locations is also a cost-effective solution, as the average salary range in these offshore destinations is much lower than engineer salaries in the US or Western Europe.
How is YouTeam different from freelancer portals for hiring Swift developers?
YouTeam does not offer freelance developers. Instead, we have a pool of 20,000+ top-quality engineers from reliable dev agencies in Latin America and Eastern Europe. By hiring with YouTeam, you can be sure that the developer is dedicated to your project, and YouTeam works as a support during the entire cooperation process to help with all questions and ensure smooth collaboration.
Why hire a team of Swift developers?
Hiring a team of Swift developers can help you achieve much better results for your software development project. With a number of engineers collectively working together, it will take much less time to complete the development. Moreover, the developers will also be more motivated since they have other team members and can feel a competition.
It's also a more secure solution, as in case one of the developers wants to leave, you have other engineers who can replace them and continue the development while you are looking for a new suitable candidate.
How is a Swift developer salary different, and why?
There are two main factors that affect iOS developer salaries. First, their level of expertise, and next, their location.
The average yearly salary of a Swift developer, according to Glassdoor, is around $91K per year in the USA. This rate is much lower in countries in Eastern Europe and Latin America, where the cost of living is much lower, but the quality of tech talent is really high. For example, the average base salary of a Swift developer in Ukraine is $26K per year, in Poland – $33K, in Romania – $20K per year. If you are considering outsourcing development to LATAM, the national average salary of the Swift developer in Colombia is $16K per year, in Brazil – $17K, in Costa Rica – $28K.
|
{
"url": "https://youteam.io/blog/rates/swift-developer-rates/",
"source_domain": "youteam.io",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "710293",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:G2RSMYPQUZZOY5FAQNROO4LYIDE6GCVB",
"WARC-Concurrent-To": "<urn:uuid:321edf07-ae8a-45f7-b87d-30c7d37cdf47>",
"WARC-Date": "2022-07-06T06:20:47Z",
"WARC-IP-Address": "99.84.108.77",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:B3AEBJDGIU2U4TLJ7LPDL7OXPZHRH45U",
"WARC-Record-ID": "<urn:uuid:546c936c-1e7e-45af-b321-a29cf7dbc741>",
"WARC-Target-URI": "https://youteam.io/blog/rates/swift-developer-rates/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a03a21ba-6881-4c21-8126-1ed748c2265b>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-178\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,
22,
23,
82,
83,
89,
90,
112,
130,
131,
146,
163,
164,
347,
348,
382,
391,
404,
413,
436,
437,
778,
779,
903,
904,
1206,
1207,
1239,
1240,
1277,
1330,
1400,
1450,
1461,
1462,
1483,
1484,
1494,
1495,
1500,
1501,
1637,
1650,
1651,
1659,
1660,
1823,
1841,
1842,
1855,
1856,
1969,
2005,
2006,
2044,
2045,
2101,
2113,
2114,
2137,
2138,
2165,
2217,
2218,
2243,
2264,
2265,
2590,
2591,
2802,
2803,
2928,
2929,
3112,
3113,
3508,
3509,
3542,
3543,
3716,
3717,
3738,
3739,
3929,
3930,
3952,
3953,
4148,
4149,
4298,
4299,
4305,
4306,
4475,
4476,
4484,
4485,
4690,
4691,
4703,
4704,
4883,
4884,
5089,
5090,
5153,
5237,
5284,
5361,
5417,
5418,
5548,
5549,
5566,
5567,
5923,
5924,
5941,
5942,
6347,
6348,
6365,
6366,
6840,
6841,
7023,
7024,
7188,
7189,
7295,
7296,
7395,
7517,
7641,
7784,
7956,
8033,
8124,
8187,
8188,
8283,
8284,
8296,
8297,
8854,
8855,
8874,
8875,
9220,
9221,
9243,
9244,
9625,
9626,
9751,
9752,
10221,
10222,
10386,
10387,
10704,
10705,
10765,
10842,
10896,
10950,
10989,
11056,
11178,
11179,
11264,
11265,
11299,
11300,
11336,
11337,
11629,
11630,
11678,
11679,
11961,
11962,
12034,
12035,
12199,
12200,
12257,
12258,
12727,
12728,
13015,
13016,
13094,
13095,
13479,
13480,
13517,
13518,
13863,
13864,
14074,
14075,
14127,
14128,
14250,
14251
],
"line_end_idx": [
22,
23,
82,
83,
89,
90,
112,
130,
131,
146,
163,
164,
347,
348,
382,
391,
404,
413,
436,
437,
778,
779,
903,
904,
1206,
1207,
1239,
1240,
1277,
1330,
1400,
1450,
1461,
1462,
1483,
1484,
1494,
1495,
1500,
1501,
1637,
1650,
1651,
1659,
1660,
1823,
1841,
1842,
1855,
1856,
1969,
2005,
2006,
2044,
2045,
2101,
2113,
2114,
2137,
2138,
2165,
2217,
2218,
2243,
2264,
2265,
2590,
2591,
2802,
2803,
2928,
2929,
3112,
3113,
3508,
3509,
3542,
3543,
3716,
3717,
3738,
3739,
3929,
3930,
3952,
3953,
4148,
4149,
4298,
4299,
4305,
4306,
4475,
4476,
4484,
4485,
4690,
4691,
4703,
4704,
4883,
4884,
5089,
5090,
5153,
5237,
5284,
5361,
5417,
5418,
5548,
5549,
5566,
5567,
5923,
5924,
5941,
5942,
6347,
6348,
6365,
6366,
6840,
6841,
7023,
7024,
7188,
7189,
7295,
7296,
7395,
7517,
7641,
7784,
7956,
8033,
8124,
8187,
8188,
8283,
8284,
8296,
8297,
8854,
8855,
8874,
8875,
9220,
9221,
9243,
9244,
9625,
9626,
9751,
9752,
10221,
10222,
10386,
10387,
10704,
10705,
10765,
10842,
10896,
10950,
10989,
11056,
11178,
11179,
11264,
11265,
11299,
11300,
11336,
11337,
11629,
11630,
11678,
11679,
11961,
11962,
12034,
12035,
12199,
12200,
12257,
12258,
12727,
12728,
13015,
13016,
13094,
13095,
13479,
13480,
13517,
13518,
13863,
13864,
14074,
14075,
14127,
14128,
14250,
14251,
14830
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 14830,
"ccnet_original_nlines": 205,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3922198414802551,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013204850256443024,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13882941007614136,
"rps_doc_frac_unique_words": 0.2933333218097687,
"rps_doc_mean_word_length": 4.982500076293945,
"rps_doc_num_sentences": 133,
"rps_doc_symbol_to_word_ratio": 0.0003568899992387742,
"rps_doc_unigram_entropy": 5.617486476898193,
"rps_doc_word_count": 2400,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.037798959761857986,
"rps_doc_frac_chars_dupe_6grams": 0.022077269852161407,
"rps_doc_frac_chars_dupe_7grams": 0.010369629599153996,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.014049169607460499,
"rps_doc_frac_chars_top_3gram": 0.007526339963078499,
"rps_doc_frac_chars_top_4gram": 0.0032614099327474833,
"rps_doc_books_importance": -966.6380004882812,
"rps_doc_books_importance_length_correction": -966.6380004882812,
"rps_doc_openwebtext_importance": -554.4246826171875,
"rps_doc_openwebtext_importance_length_correction": -554.4246826171875,
"rps_doc_wikipedia_importance": -418.1009216308594,
"rps_doc_wikipedia_importance_length_correction": -418.1009216308594
},
"fasttext": {
"dclm": 0.22944551706314087,
"english": 0.9451723098754883,
"fineweb_edu_approx": 2.065091848373413,
"eai_general_math": 0.049767669290304184,
"eai_open_web_math": 0.09479445219039917,
"eai_web_code": 0.3779066801071167
}
}
|
{
"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": "658.403",
"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": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "9",
"label": "FAQ"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,996,503,419,888,850,400
|
blob: a53bd8728d0d3e2bc7fb95309b7c5f2bdff672e1 [file] [log] [blame]
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) Microsoft Corporation.
*
* Author:
* Jake Oshins <jakeo@microsoft.com>
*
* This driver acts as a paravirtual front-end for PCI Express root buses.
* When a PCI Express function (either an entire device or an SR-IOV
* Virtual Function) is being passed through to the VM, this driver exposes
* a new bus to the guest VM. This is modeled as a root PCI bus because
* no bridges are being exposed to the VM. In fact, with a "Generation 2"
* VM within Hyper-V, there may seem to be no PCI bus at all in the VM
* until a device as been exposed using this driver.
*
* Each root PCI bus has its own PCI domain, which is called "Segment" in
* the PCI Firmware Specifications. Thus while each device passed through
* to the VM using this front-end will appear at "device 0", the domain will
* be unique. Typically, each bus will have one PCI function on it, though
* this driver does support more than one.
*
* In order to map the interrupts from the device through to the guest VM,
* this driver also implements an IRQ Domain, which handles interrupts (either
* MSI or MSI-X) associated with the functions on the bus. As interrupts are
* set up, torn down, or reaffined, this driver communicates with the
* underlying hypervisor to adjust the mappings in the I/O MMU so that each
* interrupt will be delivered to the correct virtual processor at the right
* vector. This driver does not support level-triggered (line-based)
* interrupts, and will report that the Interrupt Line register in the
* function's configuration space is zero.
*
* The rest of this driver mostly maps PCI concepts onto underlying Hyper-V
* facilities. For instance, the configuration space of a function exposed
* by Hyper-V is mapped into a single page of memory space, and the
* read and write handlers for config space must be aware of this mechanism.
* Similarly, device setup and teardown involves messages sent to and from
* the PCI back-end driver in Hyper-V.
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/semaphore.h>
#include <linux/irqdomain.h>
#include <asm/irqdomain.h>
#include <asm/apic.h>
#include <linux/irq.h>
#include <linux/msi.h>
#include <linux/hyperv.h>
#include <linux/refcount.h>
#include <asm/mshyperv.h>
/*
* Protocol versions. The low word is the minor version, the high word the
* major version.
*/
#define PCI_MAKE_VERSION(major, minor) ((u32)(((major) << 16) | (minor)))
#define PCI_MAJOR_VERSION(version) ((u32)(version) >> 16)
#define PCI_MINOR_VERSION(version) ((u32)(version) & 0xff)
enum pci_protocol_version_t {
PCI_PROTOCOL_VERSION_1_1 = PCI_MAKE_VERSION(1, 1), /* Win10 */
PCI_PROTOCOL_VERSION_1_2 = PCI_MAKE_VERSION(1, 2), /* RS1 */
PCI_PROTOCOL_VERSION_1_3 = PCI_MAKE_VERSION(1, 3), /* Vibranium */
};
#define CPU_AFFINITY_ALL -1ULL
/*
* Supported protocol versions in the order of probing - highest go
* first.
*/
static enum pci_protocol_version_t pci_protocol_versions[] = {
PCI_PROTOCOL_VERSION_1_3,
PCI_PROTOCOL_VERSION_1_2,
PCI_PROTOCOL_VERSION_1_1,
};
#define PCI_CONFIG_MMIO_LENGTH 0x2000
#define CFG_PAGE_OFFSET 0x1000
#define CFG_PAGE_SIZE (PCI_CONFIG_MMIO_LENGTH - CFG_PAGE_OFFSET)
#define MAX_SUPPORTED_MSI_MESSAGES 0x400
#define STATUS_REVISION_MISMATCH 0xC0000059
/* space for 32bit serial number as string */
#define SLOT_NAME_SIZE 11
/*
* Message Types
*/
enum pci_message_type {
/*
* Version 1.1
*/
PCI_MESSAGE_BASE = 0x42490000,
PCI_BUS_RELATIONS = PCI_MESSAGE_BASE + 0,
PCI_QUERY_BUS_RELATIONS = PCI_MESSAGE_BASE + 1,
PCI_POWER_STATE_CHANGE = PCI_MESSAGE_BASE + 4,
PCI_QUERY_RESOURCE_REQUIREMENTS = PCI_MESSAGE_BASE + 5,
PCI_QUERY_RESOURCE_RESOURCES = PCI_MESSAGE_BASE + 6,
PCI_BUS_D0ENTRY = PCI_MESSAGE_BASE + 7,
PCI_BUS_D0EXIT = PCI_MESSAGE_BASE + 8,
PCI_READ_BLOCK = PCI_MESSAGE_BASE + 9,
PCI_WRITE_BLOCK = PCI_MESSAGE_BASE + 0xA,
PCI_EJECT = PCI_MESSAGE_BASE + 0xB,
PCI_QUERY_STOP = PCI_MESSAGE_BASE + 0xC,
PCI_REENABLE = PCI_MESSAGE_BASE + 0xD,
PCI_QUERY_STOP_FAILED = PCI_MESSAGE_BASE + 0xE,
PCI_EJECTION_COMPLETE = PCI_MESSAGE_BASE + 0xF,
PCI_RESOURCES_ASSIGNED = PCI_MESSAGE_BASE + 0x10,
PCI_RESOURCES_RELEASED = PCI_MESSAGE_BASE + 0x11,
PCI_INVALIDATE_BLOCK = PCI_MESSAGE_BASE + 0x12,
PCI_QUERY_PROTOCOL_VERSION = PCI_MESSAGE_BASE + 0x13,
PCI_CREATE_INTERRUPT_MESSAGE = PCI_MESSAGE_BASE + 0x14,
PCI_DELETE_INTERRUPT_MESSAGE = PCI_MESSAGE_BASE + 0x15,
PCI_RESOURCES_ASSIGNED2 = PCI_MESSAGE_BASE + 0x16,
PCI_CREATE_INTERRUPT_MESSAGE2 = PCI_MESSAGE_BASE + 0x17,
PCI_DELETE_INTERRUPT_MESSAGE2 = PCI_MESSAGE_BASE + 0x18, /* unused */
PCI_BUS_RELATIONS2 = PCI_MESSAGE_BASE + 0x19,
PCI_MESSAGE_MAXIMUM
};
/*
* Structures defining the virtual PCI Express protocol.
*/
union pci_version {
struct {
u16 minor_version;
u16 major_version;
} parts;
u32 version;
} __packed;
/*
* Function numbers are 8-bits wide on Express, as interpreted through ARI,
* which is all this driver does. This representation is the one used in
* Windows, which is what is expected when sending this back and forth with
* the Hyper-V parent partition.
*/
union win_slot_encoding {
struct {
u32 dev:5;
u32 func:3;
u32 reserved:24;
} bits;
u32 slot;
} __packed;
/*
* Pretty much as defined in the PCI Specifications.
*/
struct pci_function_description {
u16 v_id; /* vendor ID */
u16 d_id; /* device ID */
u8 rev;
u8 prog_intf;
u8 subclass;
u8 base_class;
u32 subsystem_id;
union win_slot_encoding win_slot;
u32 ser; /* serial number */
} __packed;
enum pci_device_description_flags {
HV_PCI_DEVICE_FLAG_NONE = 0x0,
HV_PCI_DEVICE_FLAG_NUMA_AFFINITY = 0x1,
};
struct pci_function_description2 {
u16 v_id; /* vendor ID */
u16 d_id; /* device ID */
u8 rev;
u8 prog_intf;
u8 subclass;
u8 base_class;
u32 subsystem_id;
union win_slot_encoding win_slot;
u32 ser; /* serial number */
u32 flags;
u16 virtual_numa_node;
u16 reserved;
} __packed;
/**
* struct hv_msi_desc
* @vector: IDT entry
* @delivery_mode: As defined in Intel's Programmer's
* Reference Manual, Volume 3, Chapter 8.
* @vector_count: Number of contiguous entries in the
* Interrupt Descriptor Table that are
* occupied by this Message-Signaled
* Interrupt. For "MSI", as first defined
* in PCI 2.2, this can be between 1 and
* 32. For "MSI-X," as first defined in PCI
* 3.0, this must be 1, as each MSI-X table
* entry would have its own descriptor.
* @reserved: Empty space
* @cpu_mask: All the target virtual processors.
*/
struct hv_msi_desc {
u8 vector;
u8 delivery_mode;
u16 vector_count;
u32 reserved;
u64 cpu_mask;
} __packed;
/**
* struct hv_msi_desc2 - 1.2 version of hv_msi_desc
* @vector: IDT entry
* @delivery_mode: As defined in Intel's Programmer's
* Reference Manual, Volume 3, Chapter 8.
* @vector_count: Number of contiguous entries in the
* Interrupt Descriptor Table that are
* occupied by this Message-Signaled
* Interrupt. For "MSI", as first defined
* in PCI 2.2, this can be between 1 and
* 32. For "MSI-X," as first defined in PCI
* 3.0, this must be 1, as each MSI-X table
* entry would have its own descriptor.
* @processor_count: number of bits enabled in array.
* @processor_array: All the target virtual processors.
*/
struct hv_msi_desc2 {
u8 vector;
u8 delivery_mode;
u16 vector_count;
u16 processor_count;
u16 processor_array[32];
} __packed;
/**
* struct tran_int_desc
* @reserved: unused, padding
* @vector_count: same as in hv_msi_desc
* @data: This is the "data payload" value that is
* written by the device when it generates
* a message-signaled interrupt, either MSI
* or MSI-X.
* @address: This is the address to which the data
* payload is written on interrupt
* generation.
*/
struct tran_int_desc {
u16 reserved;
u16 vector_count;
u32 data;
u64 address;
} __packed;
/*
* A generic message format for virtual PCI.
* Specific message formats are defined later in the file.
*/
struct pci_message {
u32 type;
} __packed;
struct pci_child_message {
struct pci_message message_type;
union win_slot_encoding wslot;
} __packed;
struct pci_incoming_message {
struct vmpacket_descriptor hdr;
struct pci_message message_type;
} __packed;
struct pci_response {
struct vmpacket_descriptor hdr;
s32 status; /* negative values are failures */
} __packed;
struct pci_packet {
void (*completion_func)(void *context, struct pci_response *resp,
int resp_packet_size);
void *compl_ctxt;
struct pci_message message[];
};
/*
* Specific message types supporting the PCI protocol.
*/
/*
* Version negotiation message. Sent from the guest to the host.
* The guest is free to try different versions until the host
* accepts the version.
*
* pci_version: The protocol version requested.
* is_last_attempt: If TRUE, this is the last version guest will request.
* reservedz: Reserved field, set to zero.
*/
struct pci_version_request {
struct pci_message message_type;
u32 protocol_version;
} __packed;
/*
* Bus D0 Entry. This is sent from the guest to the host when the virtual
* bus (PCI Express port) is ready for action.
*/
struct pci_bus_d0_entry {
struct pci_message message_type;
u32 reserved;
u64 mmio_base;
} __packed;
struct pci_bus_relations {
struct pci_incoming_message incoming;
u32 device_count;
struct pci_function_description func[];
} __packed;
struct pci_bus_relations2 {
struct pci_incoming_message incoming;
u32 device_count;
struct pci_function_description2 func[];
} __packed;
struct pci_q_res_req_response {
struct vmpacket_descriptor hdr;
s32 status; /* negative values are failures */
u32 probed_bar[PCI_STD_NUM_BARS];
} __packed;
struct pci_set_power {
struct pci_message message_type;
union win_slot_encoding wslot;
u32 power_state; /* In Windows terms */
u32 reserved;
} __packed;
struct pci_set_power_response {
struct vmpacket_descriptor hdr;
s32 status; /* negative values are failures */
union win_slot_encoding wslot;
u32 resultant_state; /* In Windows terms */
u32 reserved;
} __packed;
struct pci_resources_assigned {
struct pci_message message_type;
union win_slot_encoding wslot;
u8 memory_range[0x14][6]; /* not used here */
u32 msi_descriptors;
u32 reserved[4];
} __packed;
struct pci_resources_assigned2 {
struct pci_message message_type;
union win_slot_encoding wslot;
u8 memory_range[0x14][6]; /* not used here */
u32 msi_descriptor_count;
u8 reserved[70];
} __packed;
struct pci_create_interrupt {
struct pci_message message_type;
union win_slot_encoding wslot;
struct hv_msi_desc int_desc;
} __packed;
struct pci_create_int_response {
struct pci_response response;
u32 reserved;
struct tran_int_desc int_desc;
} __packed;
struct pci_create_interrupt2 {
struct pci_message message_type;
union win_slot_encoding wslot;
struct hv_msi_desc2 int_desc;
} __packed;
struct pci_delete_interrupt {
struct pci_message message_type;
union win_slot_encoding wslot;
struct tran_int_desc int_desc;
} __packed;
/*
* Note: the VM must pass a valid block id, wslot and bytes_requested.
*/
struct pci_read_block {
struct pci_message message_type;
u32 block_id;
union win_slot_encoding wslot;
u32 bytes_requested;
} __packed;
struct pci_read_block_response {
struct vmpacket_descriptor hdr;
u32 status;
u8 bytes[HV_CONFIG_BLOCK_SIZE_MAX];
} __packed;
/*
* Note: the VM must pass a valid block id, wslot and byte_count.
*/
struct pci_write_block {
struct pci_message message_type;
u32 block_id;
union win_slot_encoding wslot;
u32 byte_count;
u8 bytes[HV_CONFIG_BLOCK_SIZE_MAX];
} __packed;
struct pci_dev_inval_block {
struct pci_incoming_message incoming;
union win_slot_encoding wslot;
u64 block_mask;
} __packed;
struct pci_dev_incoming {
struct pci_incoming_message incoming;
union win_slot_encoding wslot;
} __packed;
struct pci_eject_response {
struct pci_message message_type;
union win_slot_encoding wslot;
u32 status;
} __packed;
static int pci_ring_size = (4 * PAGE_SIZE);
/*
* Driver specific state.
*/
enum hv_pcibus_state {
hv_pcibus_init = 0,
hv_pcibus_probed,
hv_pcibus_installed,
hv_pcibus_removing,
hv_pcibus_maximum
};
struct hv_pcibus_device {
struct pci_sysdata sysdata;
/* Protocol version negotiated with the host */
enum pci_protocol_version_t protocol_version;
enum hv_pcibus_state state;
struct hv_device *hdev;
resource_size_t low_mmio_space;
resource_size_t high_mmio_space;
struct resource *mem_config;
struct resource *low_mmio_res;
struct resource *high_mmio_res;
struct completion *survey_event;
struct pci_bus *pci_bus;
spinlock_t config_lock; /* Avoid two threads writing index page */
spinlock_t device_list_lock; /* Protect lists below */
void __iomem *cfg_addr;
struct list_head resources_for_children;
struct list_head children;
struct list_head dr_list;
struct msi_domain_info msi_info;
struct irq_domain *irq_domain;
spinlock_t retarget_msi_interrupt_lock;
struct workqueue_struct *wq;
/* Highest slot of child device with resources allocated */
int wslot_res_allocated;
/* hypercall arg, must not cross page boundary */
struct hv_retarget_device_interrupt retarget_msi_interrupt_params;
/*
* Don't put anything here: retarget_msi_interrupt_params must be last
*/
};
/*
* Tracks "Device Relations" messages from the host, which must be both
* processed in order and deferred so that they don't run in the context
* of the incoming packet callback.
*/
struct hv_dr_work {
struct work_struct wrk;
struct hv_pcibus_device *bus;
};
struct hv_pcidev_description {
u16 v_id; /* vendor ID */
u16 d_id; /* device ID */
u8 rev;
u8 prog_intf;
u8 subclass;
u8 base_class;
u32 subsystem_id;
union win_slot_encoding win_slot;
u32 ser; /* serial number */
u32 flags;
u16 virtual_numa_node;
};
struct hv_dr_state {
struct list_head list_entry;
u32 device_count;
struct hv_pcidev_description func[];
};
enum hv_pcichild_state {
hv_pcichild_init = 0,
hv_pcichild_requirements,
hv_pcichild_resourced,
hv_pcichild_ejecting,
hv_pcichild_maximum
};
struct hv_pci_dev {
/* List protected by pci_rescan_remove_lock */
struct list_head list_entry;
refcount_t refs;
enum hv_pcichild_state state;
struct pci_slot *pci_slot;
struct hv_pcidev_description desc;
bool reported_missing;
struct hv_pcibus_device *hbus;
struct work_struct wrk;
void (*block_invalidate)(void *context, u64 block_mask);
void *invalidate_context;
/*
* What would be observed if one wrote 0xFFFFFFFF to a BAR and then
* read it back, for each of the BAR offsets within config space.
*/
u32 probed_bar[PCI_STD_NUM_BARS];
};
struct hv_pci_compl {
struct completion host_event;
s32 completion_status;
};
static void hv_pci_onchannelcallback(void *context);
/**
* hv_pci_generic_compl() - Invoked for a completion packet
* @context: Set up by the sender of the packet.
* @resp: The response packet
* @resp_packet_size: Size in bytes of the packet
*
* This function is used to trigger an event and report status
* for any message for which the completion packet contains a
* status and nothing else.
*/
static void hv_pci_generic_compl(void *context, struct pci_response *resp,
int resp_packet_size)
{
struct hv_pci_compl *comp_pkt = context;
if (resp_packet_size >= offsetofend(struct pci_response, status))
comp_pkt->completion_status = resp->status;
else
comp_pkt->completion_status = -1;
complete(&comp_pkt->host_event);
}
static struct hv_pci_dev *get_pcichild_wslot(struct hv_pcibus_device *hbus,
u32 wslot);
static void get_pcichild(struct hv_pci_dev *hpdev)
{
refcount_inc(&hpdev->refs);
}
static void put_pcichild(struct hv_pci_dev *hpdev)
{
if (refcount_dec_and_test(&hpdev->refs))
kfree(hpdev);
}
/*
* There is no good way to get notified from vmbus_onoffer_rescind(),
* so let's use polling here, since this is not a hot path.
*/
static int wait_for_response(struct hv_device *hdev,
struct completion *comp)
{
while (true) {
if (hdev->channel->rescind) {
dev_warn_once(&hdev->device, "The device is gone.\n");
return -ENODEV;
}
if (wait_for_completion_timeout(comp, HZ / 10))
break;
}
return 0;
}
/**
* devfn_to_wslot() - Convert from Linux PCI slot to Windows
* @devfn: The Linux representation of PCI slot
*
* Windows uses a slightly different representation of PCI slot.
*
* Return: The Windows representation
*/
static u32 devfn_to_wslot(int devfn)
{
union win_slot_encoding wslot;
wslot.slot = 0;
wslot.bits.dev = PCI_SLOT(devfn);
wslot.bits.func = PCI_FUNC(devfn);
return wslot.slot;
}
/**
* wslot_to_devfn() - Convert from Windows PCI slot to Linux
* @wslot: The Windows representation of PCI slot
*
* Windows uses a slightly different representation of PCI slot.
*
* Return: The Linux representation
*/
static int wslot_to_devfn(u32 wslot)
{
union win_slot_encoding slot_no;
slot_no.slot = wslot;
return PCI_DEVFN(slot_no.bits.dev, slot_no.bits.func);
}
/*
* PCI Configuration Space for these root PCI buses is implemented as a pair
* of pages in memory-mapped I/O space. Writing to the first page chooses
* the PCI function being written or read. Once the first page has been
* written to, the following page maps in the entire configuration space of
* the function.
*/
/**
* _hv_pcifront_read_config() - Internal PCI config read
* @hpdev: The PCI driver's representation of the device
* @where: Offset within config space
* @size: Size of the transfer
* @val: Pointer to the buffer receiving the data
*/
static void _hv_pcifront_read_config(struct hv_pci_dev *hpdev, int where,
int size, u32 *val)
{
unsigned long flags;
void __iomem *addr = hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET + where;
/*
* If the attempt is to read the IDs or the ROM BAR, simulate that.
*/
if (where + size <= PCI_COMMAND) {
memcpy(val, ((u8 *)&hpdev->desc.v_id) + where, size);
} else if (where >= PCI_CLASS_REVISION && where + size <=
PCI_CACHE_LINE_SIZE) {
memcpy(val, ((u8 *)&hpdev->desc.rev) + where -
PCI_CLASS_REVISION, size);
} else if (where >= PCI_SUBSYSTEM_VENDOR_ID && where + size <=
PCI_ROM_ADDRESS) {
memcpy(val, (u8 *)&hpdev->desc.subsystem_id + where -
PCI_SUBSYSTEM_VENDOR_ID, size);
} else if (where >= PCI_ROM_ADDRESS && where + size <=
PCI_CAPABILITY_LIST) {
/* ROM BARs are unimplemented */
*val = 0;
} else if (where >= PCI_INTERRUPT_LINE && where + size <=
PCI_INTERRUPT_PIN) {
/*
* Interrupt Line and Interrupt PIN are hard-wired to zero
* because this front-end only supports message-signaled
* interrupts.
*/
*val = 0;
} else if (where + size <= CFG_PAGE_SIZE) {
spin_lock_irqsave(&hpdev->hbus->config_lock, flags);
/* Choose the function to be read. (See comment above) */
writel(hpdev->desc.win_slot.slot, hpdev->hbus->cfg_addr);
/* Make sure the function was chosen before we start reading. */
mb();
/* Read from that function's config space. */
switch (size) {
case 1:
*val = readb(addr);
break;
case 2:
*val = readw(addr);
break;
default:
*val = readl(addr);
break;
}
/*
* Make sure the read was done before we release the spinlock
* allowing consecutive reads/writes.
*/
mb();
spin_unlock_irqrestore(&hpdev->hbus->config_lock, flags);
} else {
dev_err(&hpdev->hbus->hdev->device,
"Attempt to read beyond a function's config space.\n");
}
}
static u16 hv_pcifront_get_vendor_id(struct hv_pci_dev *hpdev)
{
u16 ret;
unsigned long flags;
void __iomem *addr = hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET +
PCI_VENDOR_ID;
spin_lock_irqsave(&hpdev->hbus->config_lock, flags);
/* Choose the function to be read. (See comment above) */
writel(hpdev->desc.win_slot.slot, hpdev->hbus->cfg_addr);
/* Make sure the function was chosen before we start reading. */
mb();
/* Read from that function's config space. */
ret = readw(addr);
/*
* mb() is not required here, because the spin_unlock_irqrestore()
* is a barrier.
*/
spin_unlock_irqrestore(&hpdev->hbus->config_lock, flags);
return ret;
}
/**
* _hv_pcifront_write_config() - Internal PCI config write
* @hpdev: The PCI driver's representation of the device
* @where: Offset within config space
* @size: Size of the transfer
* @val: The data being transferred
*/
static void _hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where,
int size, u32 val)
{
unsigned long flags;
void __iomem *addr = hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET + where;
if (where >= PCI_SUBSYSTEM_VENDOR_ID &&
where + size <= PCI_CAPABILITY_LIST) {
/* SSIDs and ROM BARs are read-only */
} else if (where >= PCI_COMMAND && where + size <= CFG_PAGE_SIZE) {
spin_lock_irqsave(&hpdev->hbus->config_lock, flags);
/* Choose the function to be written. (See comment above) */
writel(hpdev->desc.win_slot.slot, hpdev->hbus->cfg_addr);
/* Make sure the function was chosen before we start writing. */
wmb();
/* Write to that function's config space. */
switch (size) {
case 1:
writeb(val, addr);
break;
case 2:
writew(val, addr);
break;
default:
writel(val, addr);
break;
}
/*
* Make sure the write was done before we release the spinlock
* allowing consecutive reads/writes.
*/
mb();
spin_unlock_irqrestore(&hpdev->hbus->config_lock, flags);
} else {
dev_err(&hpdev->hbus->hdev->device,
"Attempt to write beyond a function's config space.\n");
}
}
/**
* hv_pcifront_read_config() - Read configuration space
* @bus: PCI Bus structure
* @devfn: Device/function
* @where: Offset from base
* @size: Byte/word/dword
* @val: Value to be read
*
* Return: PCIBIOS_SUCCESSFUL on success
* PCIBIOS_DEVICE_NOT_FOUND on failure
*/
static int hv_pcifront_read_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 *val)
{
struct hv_pcibus_device *hbus =
container_of(bus->sysdata, struct hv_pcibus_device, sysdata);
struct hv_pci_dev *hpdev;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(devfn));
if (!hpdev)
return PCIBIOS_DEVICE_NOT_FOUND;
_hv_pcifront_read_config(hpdev, where, size, val);
put_pcichild(hpdev);
return PCIBIOS_SUCCESSFUL;
}
/**
* hv_pcifront_write_config() - Write configuration space
* @bus: PCI Bus structure
* @devfn: Device/function
* @where: Offset from base
* @size: Byte/word/dword
* @val: Value to be written to device
*
* Return: PCIBIOS_SUCCESSFUL on success
* PCIBIOS_DEVICE_NOT_FOUND on failure
*/
static int hv_pcifront_write_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{
struct hv_pcibus_device *hbus =
container_of(bus->sysdata, struct hv_pcibus_device, sysdata);
struct hv_pci_dev *hpdev;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(devfn));
if (!hpdev)
return PCIBIOS_DEVICE_NOT_FOUND;
_hv_pcifront_write_config(hpdev, where, size, val);
put_pcichild(hpdev);
return PCIBIOS_SUCCESSFUL;
}
/* PCIe operations */
static struct pci_ops hv_pcifront_ops = {
.read = hv_pcifront_read_config,
.write = hv_pcifront_write_config,
};
/*
* Paravirtual backchannel
*
* Hyper-V SR-IOV provides a backchannel mechanism in software for
* communication between a VF driver and a PF driver. These
* "configuration blocks" are similar in concept to PCI configuration space,
* but instead of doing reads and writes in 32-bit chunks through a very slow
* path, packets of up to 128 bytes can be sent or received asynchronously.
*
* Nearly every SR-IOV device contains just such a communications channel in
* hardware, so using this one in software is usually optional. Using the
* software channel, however, allows driver implementers to leverage software
* tools that fuzz the communications channel looking for vulnerabilities.
*
* The usage model for these packets puts the responsibility for reading or
* writing on the VF driver. The VF driver sends a read or a write packet,
* indicating which "block" is being referred to by number.
*
* If the PF driver wishes to initiate communication, it can "invalidate" one or
* more of the first 64 blocks. This invalidation is delivered via a callback
* supplied by the VF driver by this driver.
*
* No protocol is implied, except that supplied by the PF and VF drivers.
*/
struct hv_read_config_compl {
struct hv_pci_compl comp_pkt;
void *buf;
unsigned int len;
unsigned int bytes_returned;
};
/**
* hv_pci_read_config_compl() - Invoked when a response packet
* for a read config block operation arrives.
* @context: Identifies the read config operation
* @resp: The response packet itself
* @resp_packet_size: Size in bytes of the response packet
*/
static void hv_pci_read_config_compl(void *context, struct pci_response *resp,
int resp_packet_size)
{
struct hv_read_config_compl *comp = context;
struct pci_read_block_response *read_resp =
(struct pci_read_block_response *)resp;
unsigned int data_len, hdr_len;
hdr_len = offsetof(struct pci_read_block_response, bytes);
if (resp_packet_size < hdr_len) {
comp->comp_pkt.completion_status = -1;
goto out;
}
data_len = resp_packet_size - hdr_len;
if (data_len > 0 && read_resp->status == 0) {
comp->bytes_returned = min(comp->len, data_len);
memcpy(comp->buf, read_resp->bytes, comp->bytes_returned);
} else {
comp->bytes_returned = 0;
}
comp->comp_pkt.completion_status = read_resp->status;
out:
complete(&comp->comp_pkt.host_event);
}
/**
* hv_read_config_block() - Sends a read config block request to
* the back-end driver running in the Hyper-V parent partition.
* @pdev: The PCI driver's representation for this device.
* @buf: Buffer into which the config block will be copied.
* @len: Size in bytes of buf.
* @block_id: Identifies the config block which has been requested.
* @bytes_returned: Size which came back from the back-end driver.
*
* Return: 0 on success, -errno on failure
*/
static int hv_read_config_block(struct pci_dev *pdev, void *buf,
unsigned int len, unsigned int block_id,
unsigned int *bytes_returned)
{
struct hv_pcibus_device *hbus =
container_of(pdev->bus->sysdata, struct hv_pcibus_device,
sysdata);
struct {
struct pci_packet pkt;
char buf[sizeof(struct pci_read_block)];
} pkt;
struct hv_read_config_compl comp_pkt;
struct pci_read_block *read_blk;
int ret;
if (len == 0 || len > HV_CONFIG_BLOCK_SIZE_MAX)
return -EINVAL;
init_completion(&comp_pkt.comp_pkt.host_event);
comp_pkt.buf = buf;
comp_pkt.len = len;
memset(&pkt, 0, sizeof(pkt));
pkt.pkt.completion_func = hv_pci_read_config_compl;
pkt.pkt.compl_ctxt = &comp_pkt;
read_blk = (struct pci_read_block *)&pkt.pkt.message;
read_blk->message_type.type = PCI_READ_BLOCK;
read_blk->wslot.slot = devfn_to_wslot(pdev->devfn);
read_blk->block_id = block_id;
read_blk->bytes_requested = len;
ret = vmbus_sendpacket(hbus->hdev->channel, read_blk,
sizeof(*read_blk), (unsigned long)&pkt.pkt,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret)
return ret;
ret = wait_for_response(hbus->hdev, &comp_pkt.comp_pkt.host_event);
if (ret)
return ret;
if (comp_pkt.comp_pkt.completion_status != 0 ||
comp_pkt.bytes_returned == 0) {
dev_err(&hbus->hdev->device,
"Read Config Block failed: 0x%x, bytes_returned=%d\n",
comp_pkt.comp_pkt.completion_status,
comp_pkt.bytes_returned);
return -EIO;
}
*bytes_returned = comp_pkt.bytes_returned;
return 0;
}
/**
* hv_pci_write_config_compl() - Invoked when a response packet for a write
* config block operation arrives.
* @context: Identifies the write config operation
* @resp: The response packet itself
* @resp_packet_size: Size in bytes of the response packet
*/
static void hv_pci_write_config_compl(void *context, struct pci_response *resp,
int resp_packet_size)
{
struct hv_pci_compl *comp_pkt = context;
comp_pkt->completion_status = resp->status;
complete(&comp_pkt->host_event);
}
/**
* hv_write_config_block() - Sends a write config block request to the
* back-end driver running in the Hyper-V parent partition.
* @pdev: The PCI driver's representation for this device.
* @buf: Buffer from which the config block will be copied.
* @len: Size in bytes of buf.
* @block_id: Identifies the config block which is being written.
*
* Return: 0 on success, -errno on failure
*/
static int hv_write_config_block(struct pci_dev *pdev, void *buf,
unsigned int len, unsigned int block_id)
{
struct hv_pcibus_device *hbus =
container_of(pdev->bus->sysdata, struct hv_pcibus_device,
sysdata);
struct {
struct pci_packet pkt;
char buf[sizeof(struct pci_write_block)];
u32 reserved;
} pkt;
struct hv_pci_compl comp_pkt;
struct pci_write_block *write_blk;
u32 pkt_size;
int ret;
if (len == 0 || len > HV_CONFIG_BLOCK_SIZE_MAX)
return -EINVAL;
init_completion(&comp_pkt.host_event);
memset(&pkt, 0, sizeof(pkt));
pkt.pkt.completion_func = hv_pci_write_config_compl;
pkt.pkt.compl_ctxt = &comp_pkt;
write_blk = (struct pci_write_block *)&pkt.pkt.message;
write_blk->message_type.type = PCI_WRITE_BLOCK;
write_blk->wslot.slot = devfn_to_wslot(pdev->devfn);
write_blk->block_id = block_id;
write_blk->byte_count = len;
memcpy(write_blk->bytes, buf, len);
pkt_size = offsetof(struct pci_write_block, bytes) + len;
/*
* This quirk is required on some hosts shipped around 2018, because
* these hosts don't check the pkt_size correctly (new hosts have been
* fixed since early 2019). The quirk is also safe on very old hosts
* and new hosts, because, on them, what really matters is the length
* specified in write_blk->byte_count.
*/
pkt_size += sizeof(pkt.reserved);
ret = vmbus_sendpacket(hbus->hdev->channel, write_blk, pkt_size,
(unsigned long)&pkt.pkt, VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret)
return ret;
ret = wait_for_response(hbus->hdev, &comp_pkt.host_event);
if (ret)
return ret;
if (comp_pkt.completion_status != 0) {
dev_err(&hbus->hdev->device,
"Write Config Block failed: 0x%x\n",
comp_pkt.completion_status);
return -EIO;
}
return 0;
}
/**
* hv_register_block_invalidate() - Invoked when a config block invalidation
* arrives from the back-end driver.
* @pdev: The PCI driver's representation for this device.
* @context: Identifies the device.
* @block_invalidate: Identifies all of the blocks being invalidated.
*
* Return: 0 on success, -errno on failure
*/
static int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
void (*block_invalidate)(void *context,
u64 block_mask))
{
struct hv_pcibus_device *hbus =
container_of(pdev->bus->sysdata, struct hv_pcibus_device,
sysdata);
struct hv_pci_dev *hpdev;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(pdev->devfn));
if (!hpdev)
return -ENODEV;
hpdev->block_invalidate = block_invalidate;
hpdev->invalidate_context = context;
put_pcichild(hpdev);
return 0;
}
/* Interrupt management hooks */
static void hv_int_desc_free(struct hv_pci_dev *hpdev,
struct tran_int_desc *int_desc)
{
struct pci_delete_interrupt *int_pkt;
struct {
struct pci_packet pkt;
u8 buffer[sizeof(struct pci_delete_interrupt)];
} ctxt;
memset(&ctxt, 0, sizeof(ctxt));
int_pkt = (struct pci_delete_interrupt *)&ctxt.pkt.message;
int_pkt->message_type.type =
PCI_DELETE_INTERRUPT_MESSAGE;
int_pkt->wslot.slot = hpdev->desc.win_slot.slot;
int_pkt->int_desc = *int_desc;
vmbus_sendpacket(hpdev->hbus->hdev->channel, int_pkt, sizeof(*int_pkt),
(unsigned long)&ctxt.pkt, VM_PKT_DATA_INBAND, 0);
kfree(int_desc);
}
/**
* hv_msi_free() - Free the MSI.
* @domain: The interrupt domain pointer
* @info: Extra MSI-related context
* @irq: Identifies the IRQ.
*
* The Hyper-V parent partition and hypervisor are tracking the
* messages that are in use, keeping the interrupt redirection
* table up to date. This callback sends a message that frees
* the IRT entry and related tracking nonsense.
*/
static void hv_msi_free(struct irq_domain *domain, struct msi_domain_info *info,
unsigned int irq)
{
struct hv_pcibus_device *hbus;
struct hv_pci_dev *hpdev;
struct pci_dev *pdev;
struct tran_int_desc *int_desc;
struct irq_data *irq_data = irq_domain_get_irq_data(domain, irq);
struct msi_desc *msi = irq_data_get_msi_desc(irq_data);
pdev = msi_desc_to_pci_dev(msi);
hbus = info->data;
int_desc = irq_data_get_irq_chip_data(irq_data);
if (!int_desc)
return;
irq_data->chip_data = NULL;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(pdev->devfn));
if (!hpdev) {
kfree(int_desc);
return;
}
hv_int_desc_free(hpdev, int_desc);
put_pcichild(hpdev);
}
static int hv_set_affinity(struct irq_data *data, const struct cpumask *dest,
bool force)
{
struct irq_data *parent = data->parent_data;
return parent->chip->irq_set_affinity(parent, dest, force);
}
static void hv_irq_mask(struct irq_data *data)
{
pci_msi_mask_irq(data);
}
/**
* hv_irq_unmask() - "Unmask" the IRQ by setting its current
* affinity.
* @data: Describes the IRQ
*
* Build new a destination for the MSI and make a hypercall to
* update the Interrupt Redirection Table. "Device Logical ID"
* is built out of this PCI bus's instance GUID and the function
* number of the device.
*/
static void hv_irq_unmask(struct irq_data *data)
{
struct msi_desc *msi_desc = irq_data_get_msi_desc(data);
struct irq_cfg *cfg = irqd_cfg(data);
struct hv_retarget_device_interrupt *params;
struct hv_pcibus_device *hbus;
struct cpumask *dest;
cpumask_var_t tmp;
struct pci_bus *pbus;
struct pci_dev *pdev;
unsigned long flags;
u32 var_size = 0;
int cpu, nr_bank;
u64 res;
dest = irq_data_get_effective_affinity_mask(data);
pdev = msi_desc_to_pci_dev(msi_desc);
pbus = pdev->bus;
hbus = container_of(pbus->sysdata, struct hv_pcibus_device, sysdata);
spin_lock_irqsave(&hbus->retarget_msi_interrupt_lock, flags);
params = &hbus->retarget_msi_interrupt_params;
memset(params, 0, sizeof(*params));
params->partition_id = HV_PARTITION_ID_SELF;
params->int_entry.source = HV_INTERRUPT_SOURCE_MSI;
hv_set_msi_entry_from_desc(¶ms->int_entry.msi_entry, msi_desc);
params->device_id = (hbus->hdev->dev_instance.b[5] << 24) |
(hbus->hdev->dev_instance.b[4] << 16) |
(hbus->hdev->dev_instance.b[7] << 8) |
(hbus->hdev->dev_instance.b[6] & 0xf8) |
PCI_FUNC(pdev->devfn);
params->int_target.vector = cfg->vector;
/*
* Honoring apic->delivery_mode set to APIC_DELIVERY_MODE_FIXED by
* setting the HV_DEVICE_INTERRUPT_TARGET_MULTICAST flag results in a
* spurious interrupt storm. Not doing so does not seem to have a
* negative effect (yet?).
*/
if (hbus->protocol_version >= PCI_PROTOCOL_VERSION_1_2) {
/*
* PCI_PROTOCOL_VERSION_1_2 supports the VP_SET version of the
* HVCALL_RETARGET_INTERRUPT hypercall, which also coincides
* with >64 VP support.
* ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED
* is not sufficient for this hypercall.
*/
params->int_target.flags |=
HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET;
if (!alloc_cpumask_var(&tmp, GFP_ATOMIC)) {
res = 1;
goto exit_unlock;
}
cpumask_and(tmp, dest, cpu_online_mask);
nr_bank = cpumask_to_vpset(¶ms->int_target.vp_set, tmp);
free_cpumask_var(tmp);
if (nr_bank <= 0) {
res = 1;
goto exit_unlock;
}
/*
* var-sized hypercall, var-size starts after vp_mask (thus
* vp_set.format does not count, but vp_set.valid_bank_mask
* does).
*/
var_size = 1 + nr_bank;
} else {
for_each_cpu_and(cpu, dest, cpu_online_mask) {
params->int_target.vp_mask |=
(1ULL << hv_cpu_number_to_vp_number(cpu));
}
}
res = hv_do_hypercall(HVCALL_RETARGET_INTERRUPT | (var_size << 17),
params, NULL);
exit_unlock:
spin_unlock_irqrestore(&hbus->retarget_msi_interrupt_lock, flags);
/*
* During hibernation, when a CPU is offlined, the kernel tries
* to move the interrupt to the remaining CPUs that haven't
* been offlined yet. In this case, the below hv_do_hypercall()
* always fails since the vmbus channel has been closed:
* refer to cpu_disable_common() -> fixup_irqs() ->
* irq_migrate_all_off_this_cpu() -> migrate_one_irq().
*
* Suppress the error message for hibernation because the failure
* during hibernation does not matter (at this time all the devices
* have been frozen). Note: the correct affinity info is still updated
* into the irqdata data structure in migrate_one_irq() ->
* irq_do_set_affinity() -> hv_set_affinity(), so later when the VM
* resumes, hv_pci_restore_msi_state() is able to correctly restore
* the interrupt with the correct affinity.
*/
if (!hv_result_success(res) && hbus->state != hv_pcibus_removing)
dev_err(&hbus->hdev->device,
"%s() failed: %#llx", __func__, res);
pci_msi_unmask_irq(data);
}
struct compose_comp_ctxt {
struct hv_pci_compl comp_pkt;
struct tran_int_desc int_desc;
};
static void hv_pci_compose_compl(void *context, struct pci_response *resp,
int resp_packet_size)
{
struct compose_comp_ctxt *comp_pkt = context;
struct pci_create_int_response *int_resp =
(struct pci_create_int_response *)resp;
comp_pkt->comp_pkt.completion_status = resp->status;
comp_pkt->int_desc = int_resp->int_desc;
complete(&comp_pkt->comp_pkt.host_event);
}
static u32 hv_compose_msi_req_v1(
struct pci_create_interrupt *int_pkt, struct cpumask *affinity,
u32 slot, u8 vector)
{
int_pkt->message_type.type = PCI_CREATE_INTERRUPT_MESSAGE;
int_pkt->wslot.slot = slot;
int_pkt->int_desc.vector = vector;
int_pkt->int_desc.vector_count = 1;
int_pkt->int_desc.delivery_mode = APIC_DELIVERY_MODE_FIXED;
/*
* Create MSI w/ dummy vCPU set, overwritten by subsequent retarget in
* hv_irq_unmask().
*/
int_pkt->int_desc.cpu_mask = CPU_AFFINITY_ALL;
return sizeof(*int_pkt);
}
static u32 hv_compose_msi_req_v2(
struct pci_create_interrupt2 *int_pkt, struct cpumask *affinity,
u32 slot, u8 vector)
{
int cpu;
int_pkt->message_type.type = PCI_CREATE_INTERRUPT_MESSAGE2;
int_pkt->wslot.slot = slot;
int_pkt->int_desc.vector = vector;
int_pkt->int_desc.vector_count = 1;
int_pkt->int_desc.delivery_mode = APIC_DELIVERY_MODE_FIXED;
/*
* Create MSI w/ dummy vCPU set targeting just one vCPU, overwritten
* by subsequent retarget in hv_irq_unmask().
*/
cpu = cpumask_first_and(affinity, cpu_online_mask);
int_pkt->int_desc.processor_array[0] =
hv_cpu_number_to_vp_number(cpu);
int_pkt->int_desc.processor_count = 1;
return sizeof(*int_pkt);
}
/**
* hv_compose_msi_msg() - Supplies a valid MSI address/data
* @data: Everything about this MSI
* @msg: Buffer that is filled in by this function
*
* This function unpacks the IRQ looking for target CPU set, IDT
* vector and mode and sends a message to the parent partition
* asking for a mapping for that tuple in this partition. The
* response supplies a data value and address to which that data
* should be written to trigger that interrupt.
*/
static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
{
struct irq_cfg *cfg = irqd_cfg(data);
struct hv_pcibus_device *hbus;
struct vmbus_channel *channel;
struct hv_pci_dev *hpdev;
struct pci_bus *pbus;
struct pci_dev *pdev;
struct cpumask *dest;
struct compose_comp_ctxt comp;
struct tran_int_desc *int_desc;
struct {
struct pci_packet pci_pkt;
union {
struct pci_create_interrupt v1;
struct pci_create_interrupt2 v2;
} int_pkts;
} __packed ctxt;
u32 size;
int ret;
pdev = msi_desc_to_pci_dev(irq_data_get_msi_desc(data));
dest = irq_data_get_effective_affinity_mask(data);
pbus = pdev->bus;
hbus = container_of(pbus->sysdata, struct hv_pcibus_device, sysdata);
channel = hbus->hdev->channel;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(pdev->devfn));
if (!hpdev)
goto return_null_message;
/* Free any previous message that might have already been composed. */
if (data->chip_data) {
int_desc = data->chip_data;
data->chip_data = NULL;
hv_int_desc_free(hpdev, int_desc);
}
int_desc = kzalloc(sizeof(*int_desc), GFP_ATOMIC);
if (!int_desc)
goto drop_reference;
memset(&ctxt, 0, sizeof(ctxt));
init_completion(&comp.comp_pkt.host_event);
ctxt.pci_pkt.completion_func = hv_pci_compose_compl;
ctxt.pci_pkt.compl_ctxt = ∁
switch (hbus->protocol_version) {
case PCI_PROTOCOL_VERSION_1_1:
size = hv_compose_msi_req_v1(&ctxt.int_pkts.v1,
dest,
hpdev->desc.win_slot.slot,
cfg->vector);
break;
case PCI_PROTOCOL_VERSION_1_2:
case PCI_PROTOCOL_VERSION_1_3:
size = hv_compose_msi_req_v2(&ctxt.int_pkts.v2,
dest,
hpdev->desc.win_slot.slot,
cfg->vector);
break;
default:
/* As we only negotiate protocol versions known to this driver,
* this path should never hit. However, this is it not a hot
* path so we print a message to aid future updates.
*/
dev_err(&hbus->hdev->device,
"Unexpected vPCI protocol, update driver.");
goto free_int_desc;
}
ret = vmbus_sendpacket(hpdev->hbus->hdev->channel, &ctxt.int_pkts,
size, (unsigned long)&ctxt.pci_pkt,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret) {
dev_err(&hbus->hdev->device,
"Sending request for interrupt failed: 0x%x",
comp.comp_pkt.completion_status);
goto free_int_desc;
}
/*
* Prevents hv_pci_onchannelcallback() from running concurrently
* in the tasklet.
*/
tasklet_disable_in_atomic(&channel->callback_event);
/*
* Since this function is called with IRQ locks held, can't
* do normal wait for completion; instead poll.
*/
while (!try_wait_for_completion(&comp.comp_pkt.host_event)) {
unsigned long flags;
/* 0xFFFF means an invalid PCI VENDOR ID. */
if (hv_pcifront_get_vendor_id(hpdev) == 0xFFFF) {
dev_err_once(&hbus->hdev->device,
"the device has gone\n");
goto enable_tasklet;
}
/*
* Make sure that the ring buffer data structure doesn't get
* freed while we dereference the ring buffer pointer. Test
* for the channel's onchannel_callback being NULL within a
* sched_lock critical section. See also the inline comments
* in vmbus_reset_channel_cb().
*/
spin_lock_irqsave(&channel->sched_lock, flags);
if (unlikely(channel->onchannel_callback == NULL)) {
spin_unlock_irqrestore(&channel->sched_lock, flags);
goto enable_tasklet;
}
hv_pci_onchannelcallback(hbus);
spin_unlock_irqrestore(&channel->sched_lock, flags);
if (hpdev->state == hv_pcichild_ejecting) {
dev_err_once(&hbus->hdev->device,
"the device is being ejected\n");
goto enable_tasklet;
}
udelay(100);
}
tasklet_enable(&channel->callback_event);
if (comp.comp_pkt.completion_status < 0) {
dev_err(&hbus->hdev->device,
"Request for interrupt failed: 0x%x",
comp.comp_pkt.completion_status);
goto free_int_desc;
}
/*
* Record the assignment so that this can be unwound later. Using
* irq_set_chip_data() here would be appropriate, but the lock it takes
* is already held.
*/
*int_desc = comp.int_desc;
data->chip_data = int_desc;
/* Pass up the result. */
msg->address_hi = comp.int_desc.address >> 32;
msg->address_lo = comp.int_desc.address & 0xffffffff;
msg->data = comp.int_desc.data;
put_pcichild(hpdev);
return;
enable_tasklet:
tasklet_enable(&channel->callback_event);
free_int_desc:
kfree(int_desc);
drop_reference:
put_pcichild(hpdev);
return_null_message:
msg->address_hi = 0;
msg->address_lo = 0;
msg->data = 0;
}
/* HW Interrupt Chip Descriptor */
static struct irq_chip hv_msi_irq_chip = {
.name = "Hyper-V PCIe MSI",
.irq_compose_msi_msg = hv_compose_msi_msg,
.irq_set_affinity = hv_set_affinity,
.irq_ack = irq_chip_ack_parent,
.irq_mask = hv_irq_mask,
.irq_unmask = hv_irq_unmask,
};
static struct msi_domain_ops hv_msi_ops = {
.msi_prepare = pci_msi_prepare,
.msi_free = hv_msi_free,
};
/**
* hv_pcie_init_irq_domain() - Initialize IRQ domain
* @hbus: The root PCI bus
*
* This function creates an IRQ domain which will be used for
* interrupts from devices that have been passed through. These
* devices only support MSI and MSI-X, not line-based interrupts
* or simulations of line-based interrupts through PCIe's
* fabric-layer messages. Because interrupts are remapped, we
* can support multi-message MSI here.
*
* Return: '0' on success and error value on failure
*/
static int hv_pcie_init_irq_domain(struct hv_pcibus_device *hbus)
{
hbus->msi_info.chip = &hv_msi_irq_chip;
hbus->msi_info.ops = &hv_msi_ops;
hbus->msi_info.flags = (MSI_FLAG_USE_DEF_DOM_OPS |
MSI_FLAG_USE_DEF_CHIP_OPS | MSI_FLAG_MULTI_PCI_MSI |
MSI_FLAG_PCI_MSIX);
hbus->msi_info.handler = handle_edge_irq;
hbus->msi_info.handler_name = "edge";
hbus->msi_info.data = hbus;
hbus->irq_domain = pci_msi_create_irq_domain(hbus->sysdata.fwnode,
&hbus->msi_info,
x86_vector_domain);
if (!hbus->irq_domain) {
dev_err(&hbus->hdev->device,
"Failed to build an MSI IRQ domain\n");
return -ENODEV;
}
return 0;
}
/**
* get_bar_size() - Get the address space consumed by a BAR
* @bar_val: Value that a BAR returned after -1 was written
* to it.
*
* This function returns the size of the BAR, rounded up to 1
* page. It has to be rounded up because the hypervisor's page
* table entry that maps the BAR into the VM can't specify an
* offset within a page. The invariant is that the hypervisor
* must place any BARs of smaller than page length at the
* beginning of a page.
*
* Return: Size in bytes of the consumed MMIO space.
*/
static u64 get_bar_size(u64 bar_val)
{
return round_up((1 + ~(bar_val & PCI_BASE_ADDRESS_MEM_MASK)),
PAGE_SIZE);
}
/**
* survey_child_resources() - Total all MMIO requirements
* @hbus: Root PCI bus, as understood by this driver
*/
static void survey_child_resources(struct hv_pcibus_device *hbus)
{
struct hv_pci_dev *hpdev;
resource_size_t bar_size = 0;
unsigned long flags;
struct completion *event;
u64 bar_val;
int i;
/* If nobody is waiting on the answer, don't compute it. */
event = xchg(&hbus->survey_event, NULL);
if (!event)
return;
/* If the answer has already been computed, go with it. */
if (hbus->low_mmio_space || hbus->high_mmio_space) {
complete(event);
return;
}
spin_lock_irqsave(&hbus->device_list_lock, flags);
/*
* Due to an interesting quirk of the PCI spec, all memory regions
* for a child device are a power of 2 in size and aligned in memory,
* so it's sufficient to just add them up without tracking alignment.
*/
list_for_each_entry(hpdev, &hbus->children, list_entry) {
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
if (hpdev->probed_bar[i] & PCI_BASE_ADDRESS_SPACE_IO)
dev_err(&hbus->hdev->device,
"There's an I/O BAR in this list!\n");
if (hpdev->probed_bar[i] != 0) {
/*
* A probed BAR has all the upper bits set that
* can be changed.
*/
bar_val = hpdev->probed_bar[i];
if (bar_val & PCI_BASE_ADDRESS_MEM_TYPE_64)
bar_val |=
((u64)hpdev->probed_bar[++i] << 32);
else
bar_val |= 0xffffffff00000000ULL;
bar_size = get_bar_size(bar_val);
if (bar_val & PCI_BASE_ADDRESS_MEM_TYPE_64)
hbus->high_mmio_space += bar_size;
else
hbus->low_mmio_space += bar_size;
}
}
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
complete(event);
}
/**
* prepopulate_bars() - Fill in BARs with defaults
* @hbus: Root PCI bus, as understood by this driver
*
* The core PCI driver code seems much, much happier if the BARs
* for a device have values upon first scan. So fill them in.
* The algorithm below works down from large sizes to small,
* attempting to pack the assignments optimally. The assumption,
* enforced in other parts of the code, is that the beginning of
* the memory-mapped I/O space will be aligned on the largest
* BAR size.
*/
static void prepopulate_bars(struct hv_pcibus_device *hbus)
{
resource_size_t high_size = 0;
resource_size_t low_size = 0;
resource_size_t high_base = 0;
resource_size_t low_base = 0;
resource_size_t bar_size;
struct hv_pci_dev *hpdev;
unsigned long flags;
u64 bar_val;
u32 command;
bool high;
int i;
if (hbus->low_mmio_space) {
low_size = 1ULL << (63 - __builtin_clzll(hbus->low_mmio_space));
low_base = hbus->low_mmio_res->start;
}
if (hbus->high_mmio_space) {
high_size = 1ULL <<
(63 - __builtin_clzll(hbus->high_mmio_space));
high_base = hbus->high_mmio_res->start;
}
spin_lock_irqsave(&hbus->device_list_lock, flags);
/*
* Clear the memory enable bit, in case it's already set. This occurs
* in the suspend path of hibernation, where the device is suspended,
* resumed and suspended again: see hibernation_snapshot() and
* hibernation_platform_enter().
*
* If the memory enable bit is already set, Hyper-V silently ignores
* the below BAR updates, and the related PCI device driver can not
* work, because reading from the device register(s) always returns
* 0xFFFFFFFF.
*/
list_for_each_entry(hpdev, &hbus->children, list_entry) {
_hv_pcifront_read_config(hpdev, PCI_COMMAND, 2, &command);
command &= ~PCI_COMMAND_MEMORY;
_hv_pcifront_write_config(hpdev, PCI_COMMAND, 2, command);
}
/* Pick addresses for the BARs. */
do {
list_for_each_entry(hpdev, &hbus->children, list_entry) {
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
bar_val = hpdev->probed_bar[i];
if (bar_val == 0)
continue;
high = bar_val & PCI_BASE_ADDRESS_MEM_TYPE_64;
if (high) {
bar_val |=
((u64)hpdev->probed_bar[i + 1]
<< 32);
} else {
bar_val |= 0xffffffffULL << 32;
}
bar_size = get_bar_size(bar_val);
if (high) {
if (high_size != bar_size) {
i++;
continue;
}
_hv_pcifront_write_config(hpdev,
PCI_BASE_ADDRESS_0 + (4 * i),
4,
(u32)(high_base & 0xffffff00));
i++;
_hv_pcifront_write_config(hpdev,
PCI_BASE_ADDRESS_0 + (4 * i),
4, (u32)(high_base >> 32));
high_base += bar_size;
} else {
if (low_size != bar_size)
continue;
_hv_pcifront_write_config(hpdev,
PCI_BASE_ADDRESS_0 + (4 * i),
4,
(u32)(low_base & 0xffffff00));
low_base += bar_size;
}
}
if (high_size <= 1 && low_size <= 1) {
/* Set the memory enable bit. */
_hv_pcifront_read_config(hpdev, PCI_COMMAND, 2,
&command);
command |= PCI_COMMAND_MEMORY;
_hv_pcifront_write_config(hpdev, PCI_COMMAND, 2,
command);
break;
}
}
high_size >>= 1;
low_size >>= 1;
} while (high_size || low_size);
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
}
/*
* Assign entries in sysfs pci slot directory.
*
* Note that this function does not need to lock the children list
* because it is called from pci_devices_present_work which
* is serialized with hv_eject_device_work because they are on the
* same ordered workqueue. Therefore hbus->children list will not change
* even when pci_create_slot sleeps.
*/
static void hv_pci_assign_slots(struct hv_pcibus_device *hbus)
{
struct hv_pci_dev *hpdev;
char name[SLOT_NAME_SIZE];
int slot_nr;
list_for_each_entry(hpdev, &hbus->children, list_entry) {
if (hpdev->pci_slot)
continue;
slot_nr = PCI_SLOT(wslot_to_devfn(hpdev->desc.win_slot.slot));
snprintf(name, SLOT_NAME_SIZE, "%u", hpdev->desc.ser);
hpdev->pci_slot = pci_create_slot(hbus->pci_bus, slot_nr,
name, NULL);
if (IS_ERR(hpdev->pci_slot)) {
pr_warn("pci_create slot %s failed\n", name);
hpdev->pci_slot = NULL;
}
}
}
/*
* Remove entries in sysfs pci slot directory.
*/
static void hv_pci_remove_slots(struct hv_pcibus_device *hbus)
{
struct hv_pci_dev *hpdev;
list_for_each_entry(hpdev, &hbus->children, list_entry) {
if (!hpdev->pci_slot)
continue;
pci_destroy_slot(hpdev->pci_slot);
hpdev->pci_slot = NULL;
}
}
/*
* Set NUMA node for the devices on the bus
*/
static void hv_pci_assign_numa_node(struct hv_pcibus_device *hbus)
{
struct pci_dev *dev;
struct pci_bus *bus = hbus->pci_bus;
struct hv_pci_dev *hv_dev;
list_for_each_entry(dev, &bus->devices, bus_list) {
hv_dev = get_pcichild_wslot(hbus, devfn_to_wslot(dev->devfn));
if (!hv_dev)
continue;
if (hv_dev->desc.flags & HV_PCI_DEVICE_FLAG_NUMA_AFFINITY)
set_dev_node(&dev->dev, hv_dev->desc.virtual_numa_node);
put_pcichild(hv_dev);
}
}
/**
* create_root_hv_pci_bus() - Expose a new root PCI bus
* @hbus: Root PCI bus, as understood by this driver
*
* Return: 0 on success, -errno on failure
*/
static int create_root_hv_pci_bus(struct hv_pcibus_device *hbus)
{
/* Register the device */
hbus->pci_bus = pci_create_root_bus(&hbus->hdev->device,
0, /* bus number is always zero */
&hv_pcifront_ops,
&hbus->sysdata,
&hbus->resources_for_children);
if (!hbus->pci_bus)
return -ENODEV;
pci_lock_rescan_remove();
pci_scan_child_bus(hbus->pci_bus);
hv_pci_assign_numa_node(hbus);
pci_bus_assign_resources(hbus->pci_bus);
hv_pci_assign_slots(hbus);
pci_bus_add_devices(hbus->pci_bus);
pci_unlock_rescan_remove();
hbus->state = hv_pcibus_installed;
return 0;
}
struct q_res_req_compl {
struct completion host_event;
struct hv_pci_dev *hpdev;
};
/**
* q_resource_requirements() - Query Resource Requirements
* @context: The completion context.
* @resp: The response that came from the host.
* @resp_packet_size: The size in bytes of resp.
*
* This function is invoked on completion of a Query Resource
* Requirements packet.
*/
static void q_resource_requirements(void *context, struct pci_response *resp,
int resp_packet_size)
{
struct q_res_req_compl *completion = context;
struct pci_q_res_req_response *q_res_req =
(struct pci_q_res_req_response *)resp;
int i;
if (resp->status < 0) {
dev_err(&completion->hpdev->hbus->hdev->device,
"query resource requirements failed: %x\n",
resp->status);
} else {
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
completion->hpdev->probed_bar[i] =
q_res_req->probed_bar[i];
}
}
complete(&completion->host_event);
}
/**
* new_pcichild_device() - Create a new child device
* @hbus: The internal struct tracking this root PCI bus.
* @desc: The information supplied so far from the host
* about the device.
*
* This function creates the tracking structure for a new child
* device and kicks off the process of figuring out what it is.
*
* Return: Pointer to the new tracking struct
*/
static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
struct hv_pcidev_description *desc)
{
struct hv_pci_dev *hpdev;
struct pci_child_message *res_req;
struct q_res_req_compl comp_pkt;
struct {
struct pci_packet init_packet;
u8 buffer[sizeof(struct pci_child_message)];
} pkt;
unsigned long flags;
int ret;
hpdev = kzalloc(sizeof(*hpdev), GFP_KERNEL);
if (!hpdev)
return NULL;
hpdev->hbus = hbus;
memset(&pkt, 0, sizeof(pkt));
init_completion(&comp_pkt.host_event);
comp_pkt.hpdev = hpdev;
pkt.init_packet.compl_ctxt = &comp_pkt;
pkt.init_packet.completion_func = q_resource_requirements;
res_req = (struct pci_child_message *)&pkt.init_packet.message;
res_req->message_type.type = PCI_QUERY_RESOURCE_REQUIREMENTS;
res_req->wslot.slot = desc->win_slot.slot;
ret = vmbus_sendpacket(hbus->hdev->channel, res_req,
sizeof(struct pci_child_message),
(unsigned long)&pkt.init_packet,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret)
goto error;
if (wait_for_response(hbus->hdev, &comp_pkt.host_event))
goto error;
hpdev->desc = *desc;
refcount_set(&hpdev->refs, 1);
get_pcichild(hpdev);
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_add_tail(&hpdev->list_entry, &hbus->children);
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
return hpdev;
error:
kfree(hpdev);
return NULL;
}
/**
* get_pcichild_wslot() - Find device from slot
* @hbus: Root PCI bus, as understood by this driver
* @wslot: Location on the bus
*
* This function looks up a PCI device and returns the internal
* representation of it. It acquires a reference on it, so that
* the device won't be deleted while somebody is using it. The
* caller is responsible for calling put_pcichild() to release
* this reference.
*
* Return: Internal representation of a PCI device
*/
static struct hv_pci_dev *get_pcichild_wslot(struct hv_pcibus_device *hbus,
u32 wslot)
{
unsigned long flags;
struct hv_pci_dev *iter, *hpdev = NULL;
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_for_each_entry(iter, &hbus->children, list_entry) {
if (iter->desc.win_slot.slot == wslot) {
hpdev = iter;
get_pcichild(hpdev);
break;
}
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
return hpdev;
}
/**
* pci_devices_present_work() - Handle new list of child devices
* @work: Work struct embedded in struct hv_dr_work
*
* "Bus Relations" is the Windows term for "children of this
* bus." The terminology is preserved here for people trying to
* debug the interaction between Hyper-V and Linux. This
* function is called when the parent partition reports a list
* of functions that should be observed under this PCI Express
* port (bus).
*
* This function updates the list, and must tolerate being
* called multiple times with the same information. The typical
* number of child devices is one, with very atypical cases
* involving three or four, so the algorithms used here can be
* simple and inefficient.
*
* It must also treat the omission of a previously observed device as
* notification that the device no longer exists.
*
* Note that this function is serialized with hv_eject_device_work(),
* because both are pushed to the ordered workqueue hbus->wq.
*/
static void pci_devices_present_work(struct work_struct *work)
{
u32 child_no;
bool found;
struct hv_pcidev_description *new_desc;
struct hv_pci_dev *hpdev;
struct hv_pcibus_device *hbus;
struct list_head removed;
struct hv_dr_work *dr_wrk;
struct hv_dr_state *dr = NULL;
unsigned long flags;
dr_wrk = container_of(work, struct hv_dr_work, wrk);
hbus = dr_wrk->bus;
kfree(dr_wrk);
INIT_LIST_HEAD(&removed);
/* Pull this off the queue and process it if it was the last one. */
spin_lock_irqsave(&hbus->device_list_lock, flags);
while (!list_empty(&hbus->dr_list)) {
dr = list_first_entry(&hbus->dr_list, struct hv_dr_state,
list_entry);
list_del(&dr->list_entry);
/* Throw this away if the list still has stuff in it. */
if (!list_empty(&hbus->dr_list)) {
kfree(dr);
continue;
}
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
if (!dr)
return;
/* First, mark all existing children as reported missing. */
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_for_each_entry(hpdev, &hbus->children, list_entry) {
hpdev->reported_missing = true;
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
/* Next, add back any reported devices. */
for (child_no = 0; child_no < dr->device_count; child_no++) {
found = false;
new_desc = &dr->func[child_no];
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_for_each_entry(hpdev, &hbus->children, list_entry) {
if ((hpdev->desc.win_slot.slot == new_desc->win_slot.slot) &&
(hpdev->desc.v_id == new_desc->v_id) &&
(hpdev->desc.d_id == new_desc->d_id) &&
(hpdev->desc.ser == new_desc->ser)) {
hpdev->reported_missing = false;
found = true;
}
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
if (!found) {
hpdev = new_pcichild_device(hbus, new_desc);
if (!hpdev)
dev_err(&hbus->hdev->device,
"couldn't record a child device.\n");
}
}
/* Move missing children to a list on the stack. */
spin_lock_irqsave(&hbus->device_list_lock, flags);
do {
found = false;
list_for_each_entry(hpdev, &hbus->children, list_entry) {
if (hpdev->reported_missing) {
found = true;
put_pcichild(hpdev);
list_move_tail(&hpdev->list_entry, &removed);
break;
}
}
} while (found);
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
/* Delete everything that should no longer exist. */
while (!list_empty(&removed)) {
hpdev = list_first_entry(&removed, struct hv_pci_dev,
list_entry);
list_del(&hpdev->list_entry);
if (hpdev->pci_slot)
pci_destroy_slot(hpdev->pci_slot);
put_pcichild(hpdev);
}
switch (hbus->state) {
case hv_pcibus_installed:
/*
* Tell the core to rescan bus
* because there may have been changes.
*/
pci_lock_rescan_remove();
pci_scan_child_bus(hbus->pci_bus);
hv_pci_assign_numa_node(hbus);
hv_pci_assign_slots(hbus);
pci_unlock_rescan_remove();
break;
case hv_pcibus_init:
case hv_pcibus_probed:
survey_child_resources(hbus);
break;
default:
break;
}
kfree(dr);
}
/**
* hv_pci_start_relations_work() - Queue work to start device discovery
* @hbus: Root PCI bus, as understood by this driver
* @dr: The list of children returned from host
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_start_relations_work(struct hv_pcibus_device *hbus,
struct hv_dr_state *dr)
{
struct hv_dr_work *dr_wrk;
unsigned long flags;
bool pending_dr;
if (hbus->state == hv_pcibus_removing) {
dev_info(&hbus->hdev->device,
"PCI VMBus BUS_RELATIONS: ignored\n");
return -ENOENT;
}
dr_wrk = kzalloc(sizeof(*dr_wrk), GFP_NOWAIT);
if (!dr_wrk)
return -ENOMEM;
INIT_WORK(&dr_wrk->wrk, pci_devices_present_work);
dr_wrk->bus = hbus;
spin_lock_irqsave(&hbus->device_list_lock, flags);
/*
* If pending_dr is true, we have already queued a work,
* which will see the new dr. Otherwise, we need to
* queue a new work.
*/
pending_dr = !list_empty(&hbus->dr_list);
list_add_tail(&dr->list_entry, &hbus->dr_list);
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
if (pending_dr)
kfree(dr_wrk);
else
queue_work(hbus->wq, &dr_wrk->wrk);
return 0;
}
/**
* hv_pci_devices_present() - Handle list of new children
* @hbus: Root PCI bus, as understood by this driver
* @relations: Packet from host listing children
*
* Process a new list of devices on the bus. The list of devices is
* discovered by VSP and sent to us via VSP message PCI_BUS_RELATIONS,
* whenever a new list of devices for this bus appears.
*/
static void hv_pci_devices_present(struct hv_pcibus_device *hbus,
struct pci_bus_relations *relations)
{
struct hv_dr_state *dr;
int i;
dr = kzalloc(struct_size(dr, func, relations->device_count),
GFP_NOWAIT);
if (!dr)
return;
dr->device_count = relations->device_count;
for (i = 0; i < dr->device_count; i++) {
dr->func[i].v_id = relations->func[i].v_id;
dr->func[i].d_id = relations->func[i].d_id;
dr->func[i].rev = relations->func[i].rev;
dr->func[i].prog_intf = relations->func[i].prog_intf;
dr->func[i].subclass = relations->func[i].subclass;
dr->func[i].base_class = relations->func[i].base_class;
dr->func[i].subsystem_id = relations->func[i].subsystem_id;
dr->func[i].win_slot = relations->func[i].win_slot;
dr->func[i].ser = relations->func[i].ser;
}
if (hv_pci_start_relations_work(hbus, dr))
kfree(dr);
}
/**
* hv_pci_devices_present2() - Handle list of new children
* @hbus: Root PCI bus, as understood by this driver
* @relations: Packet from host listing children
*
* This function is the v2 version of hv_pci_devices_present()
*/
static void hv_pci_devices_present2(struct hv_pcibus_device *hbus,
struct pci_bus_relations2 *relations)
{
struct hv_dr_state *dr;
int i;
dr = kzalloc(struct_size(dr, func, relations->device_count),
GFP_NOWAIT);
if (!dr)
return;
dr->device_count = relations->device_count;
for (i = 0; i < dr->device_count; i++) {
dr->func[i].v_id = relations->func[i].v_id;
dr->func[i].d_id = relations->func[i].d_id;
dr->func[i].rev = relations->func[i].rev;
dr->func[i].prog_intf = relations->func[i].prog_intf;
dr->func[i].subclass = relations->func[i].subclass;
dr->func[i].base_class = relations->func[i].base_class;
dr->func[i].subsystem_id = relations->func[i].subsystem_id;
dr->func[i].win_slot = relations->func[i].win_slot;
dr->func[i].ser = relations->func[i].ser;
dr->func[i].flags = relations->func[i].flags;
dr->func[i].virtual_numa_node =
relations->func[i].virtual_numa_node;
}
if (hv_pci_start_relations_work(hbus, dr))
kfree(dr);
}
/**
* hv_eject_device_work() - Asynchronously handles ejection
* @work: Work struct embedded in internal device struct
*
* This function handles ejecting a device. Windows will
* attempt to gracefully eject a device, waiting 60 seconds to
* hear back from the guest OS that this completed successfully.
* If this timer expires, the device will be forcibly removed.
*/
static void hv_eject_device_work(struct work_struct *work)
{
struct pci_eject_response *ejct_pkt;
struct hv_pcibus_device *hbus;
struct hv_pci_dev *hpdev;
struct pci_dev *pdev;
unsigned long flags;
int wslot;
struct {
struct pci_packet pkt;
u8 buffer[sizeof(struct pci_eject_response)];
} ctxt;
hpdev = container_of(work, struct hv_pci_dev, wrk);
hbus = hpdev->hbus;
WARN_ON(hpdev->state != hv_pcichild_ejecting);
/*
* Ejection can come before or after the PCI bus has been set up, so
* attempt to find it and tear down the bus state, if it exists. This
* must be done without constructs like pci_domain_nr(hbus->pci_bus)
* because hbus->pci_bus may not exist yet.
*/
wslot = wslot_to_devfn(hpdev->desc.win_slot.slot);
pdev = pci_get_domain_bus_and_slot(hbus->sysdata.domain, 0, wslot);
if (pdev) {
pci_lock_rescan_remove();
pci_stop_and_remove_bus_device(pdev);
pci_dev_put(pdev);
pci_unlock_rescan_remove();
}
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_del(&hpdev->list_entry);
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
if (hpdev->pci_slot)
pci_destroy_slot(hpdev->pci_slot);
memset(&ctxt, 0, sizeof(ctxt));
ejct_pkt = (struct pci_eject_response *)&ctxt.pkt.message;
ejct_pkt->message_type.type = PCI_EJECTION_COMPLETE;
ejct_pkt->wslot.slot = hpdev->desc.win_slot.slot;
vmbus_sendpacket(hbus->hdev->channel, ejct_pkt,
sizeof(*ejct_pkt), (unsigned long)&ctxt.pkt,
VM_PKT_DATA_INBAND, 0);
/* For the get_pcichild() in hv_pci_eject_device() */
put_pcichild(hpdev);
/* For the two refs got in new_pcichild_device() */
put_pcichild(hpdev);
put_pcichild(hpdev);
/* hpdev has been freed. Do not use it any more. */
}
/**
* hv_pci_eject_device() - Handles device ejection
* @hpdev: Internal device tracking struct
*
* This function is invoked when an ejection packet arrives. It
* just schedules work so that we don't re-enter the packet
* delivery code handling the ejection.
*/
static void hv_pci_eject_device(struct hv_pci_dev *hpdev)
{
struct hv_pcibus_device *hbus = hpdev->hbus;
struct hv_device *hdev = hbus->hdev;
if (hbus->state == hv_pcibus_removing) {
dev_info(&hdev->device, "PCI VMBus EJECT: ignored\n");
return;
}
hpdev->state = hv_pcichild_ejecting;
get_pcichild(hpdev);
INIT_WORK(&hpdev->wrk, hv_eject_device_work);
queue_work(hbus->wq, &hpdev->wrk);
}
/**
* hv_pci_onchannelcallback() - Handles incoming packets
* @context: Internal bus tracking struct
*
* This function is invoked whenever the host sends a packet to
* this channel (which is private to this root PCI bus).
*/
static void hv_pci_onchannelcallback(void *context)
{
const int packet_size = 0x100;
int ret;
struct hv_pcibus_device *hbus = context;
u32 bytes_recvd;
u64 req_id;
struct vmpacket_descriptor *desc;
unsigned char *buffer;
int bufferlen = packet_size;
struct pci_packet *comp_packet;
struct pci_response *response;
struct pci_incoming_message *new_message;
struct pci_bus_relations *bus_rel;
struct pci_bus_relations2 *bus_rel2;
struct pci_dev_inval_block *inval;
struct pci_dev_incoming *dev_message;
struct hv_pci_dev *hpdev;
buffer = kmalloc(bufferlen, GFP_ATOMIC);
if (!buffer)
return;
while (1) {
ret = vmbus_recvpacket_raw(hbus->hdev->channel, buffer,
bufferlen, &bytes_recvd, &req_id);
if (ret == -ENOBUFS) {
kfree(buffer);
/* Handle large packet */
bufferlen = bytes_recvd;
buffer = kmalloc(bytes_recvd, GFP_ATOMIC);
if (!buffer)
return;
continue;
}
/* Zero length indicates there are no more packets. */
if (ret || !bytes_recvd)
break;
/*
* All incoming packets must be at least as large as a
* response.
*/
if (bytes_recvd <= sizeof(struct pci_response))
continue;
desc = (struct vmpacket_descriptor *)buffer;
switch (desc->type) {
case VM_PKT_COMP:
/*
* The host is trusted, and thus it's safe to interpret
* this transaction ID as a pointer.
*/
comp_packet = (struct pci_packet *)req_id;
response = (struct pci_response *)buffer;
comp_packet->completion_func(comp_packet->compl_ctxt,
response,
bytes_recvd);
break;
case VM_PKT_DATA_INBAND:
new_message = (struct pci_incoming_message *)buffer;
switch (new_message->message_type.type) {
case PCI_BUS_RELATIONS:
bus_rel = (struct pci_bus_relations *)buffer;
if (bytes_recvd <
struct_size(bus_rel, func,
bus_rel->device_count)) {
dev_err(&hbus->hdev->device,
"bus relations too small\n");
break;
}
hv_pci_devices_present(hbus, bus_rel);
break;
case PCI_BUS_RELATIONS2:
bus_rel2 = (struct pci_bus_relations2 *)buffer;
if (bytes_recvd <
struct_size(bus_rel2, func,
bus_rel2->device_count)) {
dev_err(&hbus->hdev->device,
"bus relations v2 too small\n");
break;
}
hv_pci_devices_present2(hbus, bus_rel2);
break;
case PCI_EJECT:
dev_message = (struct pci_dev_incoming *)buffer;
hpdev = get_pcichild_wslot(hbus,
dev_message->wslot.slot);
if (hpdev) {
hv_pci_eject_device(hpdev);
put_pcichild(hpdev);
}
break;
case PCI_INVALIDATE_BLOCK:
inval = (struct pci_dev_inval_block *)buffer;
hpdev = get_pcichild_wslot(hbus,
inval->wslot.slot);
if (hpdev) {
if (hpdev->block_invalidate) {
hpdev->block_invalidate(
hpdev->invalidate_context,
inval->block_mask);
}
put_pcichild(hpdev);
}
break;
default:
dev_warn(&hbus->hdev->device,
"Unimplemented protocol message %x\n",
new_message->message_type.type);
break;
}
break;
default:
dev_err(&hbus->hdev->device,
"unhandled packet type %d, tid %llx len %d\n",
desc->type, req_id, bytes_recvd);
break;
}
}
kfree(buffer);
}
/**
* hv_pci_protocol_negotiation() - Set up protocol
* @hdev: VMBus's tracking struct for this root PCI bus.
* @version: Array of supported channel protocol versions in
* the order of probing - highest go first.
* @num_version: Number of elements in the version array.
*
* This driver is intended to support running on Windows 10
* (server) and later versions. It will not run on earlier
* versions, as they assume that many of the operations which
* Linux needs accomplished with a spinlock held were done via
* asynchronous messaging via VMBus. Windows 10 increases the
* surface area of PCI emulation so that these actions can take
* place by suspending a virtual processor for their duration.
*
* This function negotiates the channel protocol version,
* failing if the host doesn't support the necessary protocol
* level.
*/
static int hv_pci_protocol_negotiation(struct hv_device *hdev,
enum pci_protocol_version_t version[],
int num_version)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct pci_version_request *version_req;
struct hv_pci_compl comp_pkt;
struct pci_packet *pkt;
int ret;
int i;
/*
* Initiate the handshake with the host and negotiate
* a version that the host can support. We start with the
* highest version number and go down if the host cannot
* support it.
*/
pkt = kzalloc(sizeof(*pkt) + sizeof(*version_req), GFP_KERNEL);
if (!pkt)
return -ENOMEM;
init_completion(&comp_pkt.host_event);
pkt->completion_func = hv_pci_generic_compl;
pkt->compl_ctxt = &comp_pkt;
version_req = (struct pci_version_request *)&pkt->message;
version_req->message_type.type = PCI_QUERY_PROTOCOL_VERSION;
for (i = 0; i < num_version; i++) {
version_req->protocol_version = version[i];
ret = vmbus_sendpacket(hdev->channel, version_req,
sizeof(struct pci_version_request),
(unsigned long)pkt, VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (!ret)
ret = wait_for_response(hdev, &comp_pkt.host_event);
if (ret) {
dev_err(&hdev->device,
"PCI Pass-through VSP failed to request version: %d",
ret);
goto exit;
}
if (comp_pkt.completion_status >= 0) {
hbus->protocol_version = version[i];
dev_info(&hdev->device,
"PCI VMBus probing: Using version %#x\n",
hbus->protocol_version);
goto exit;
}
if (comp_pkt.completion_status != STATUS_REVISION_MISMATCH) {
dev_err(&hdev->device,
"PCI Pass-through VSP failed version request: %#x",
comp_pkt.completion_status);
ret = -EPROTO;
goto exit;
}
reinit_completion(&comp_pkt.host_event);
}
dev_err(&hdev->device,
"PCI pass-through VSP failed to find supported version");
ret = -EPROTO;
exit:
kfree(pkt);
return ret;
}
/**
* hv_pci_free_bridge_windows() - Release memory regions for the
* bus
* @hbus: Root PCI bus, as understood by this driver
*/
static void hv_pci_free_bridge_windows(struct hv_pcibus_device *hbus)
{
/*
* Set the resources back to the way they looked when they
* were allocated by setting IORESOURCE_BUSY again.
*/
if (hbus->low_mmio_space && hbus->low_mmio_res) {
hbus->low_mmio_res->flags |= IORESOURCE_BUSY;
vmbus_free_mmio(hbus->low_mmio_res->start,
resource_size(hbus->low_mmio_res));
}
if (hbus->high_mmio_space && hbus->high_mmio_res) {
hbus->high_mmio_res->flags |= IORESOURCE_BUSY;
vmbus_free_mmio(hbus->high_mmio_res->start,
resource_size(hbus->high_mmio_res));
}
}
/**
* hv_pci_allocate_bridge_windows() - Allocate memory regions
* for the bus
* @hbus: Root PCI bus, as understood by this driver
*
* This function calls vmbus_allocate_mmio(), which is itself a
* bit of a compromise. Ideally, we might change the pnp layer
* in the kernel such that it comprehends either PCI devices
* which are "grandchildren of ACPI," with some intermediate bus
* node (in this case, VMBus) or change it such that it
* understands VMBus. The pnp layer, however, has been declared
* deprecated, and not subject to change.
*
* The workaround, implemented here, is to ask VMBus to allocate
* MMIO space for this bus. VMBus itself knows which ranges are
* appropriate by looking at its own ACPI objects. Then, after
* these ranges are claimed, they're modified to look like they
* would have looked if the ACPI and pnp code had allocated
* bridge windows. These descriptors have to exist in this form
* in order to satisfy the code which will get invoked when the
* endpoint PCI function driver calls request_mem_region() or
* request_mem_region_exclusive().
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_allocate_bridge_windows(struct hv_pcibus_device *hbus)
{
resource_size_t align;
int ret;
if (hbus->low_mmio_space) {
align = 1ULL << (63 - __builtin_clzll(hbus->low_mmio_space));
ret = vmbus_allocate_mmio(&hbus->low_mmio_res, hbus->hdev, 0,
(u64)(u32)0xffffffff,
hbus->low_mmio_space,
align, false);
if (ret) {
dev_err(&hbus->hdev->device,
"Need %#llx of low MMIO space. Consider reconfiguring the VM.\n",
hbus->low_mmio_space);
return ret;
}
/* Modify this resource to become a bridge window. */
hbus->low_mmio_res->flags |= IORESOURCE_WINDOW;
hbus->low_mmio_res->flags &= ~IORESOURCE_BUSY;
pci_add_resource(&hbus->resources_for_children,
hbus->low_mmio_res);
}
if (hbus->high_mmio_space) {
align = 1ULL << (63 - __builtin_clzll(hbus->high_mmio_space));
ret = vmbus_allocate_mmio(&hbus->high_mmio_res, hbus->hdev,
0x100000000, -1,
hbus->high_mmio_space, align,
false);
if (ret) {
dev_err(&hbus->hdev->device,
"Need %#llx of high MMIO space. Consider reconfiguring the VM.\n",
hbus->high_mmio_space);
goto release_low_mmio;
}
/* Modify this resource to become a bridge window. */
hbus->high_mmio_res->flags |= IORESOURCE_WINDOW;
hbus->high_mmio_res->flags &= ~IORESOURCE_BUSY;
pci_add_resource(&hbus->resources_for_children,
hbus->high_mmio_res);
}
return 0;
release_low_mmio:
if (hbus->low_mmio_res) {
vmbus_free_mmio(hbus->low_mmio_res->start,
resource_size(hbus->low_mmio_res));
}
return ret;
}
/**
* hv_allocate_config_window() - Find MMIO space for PCI Config
* @hbus: Root PCI bus, as understood by this driver
*
* This function claims memory-mapped I/O space for accessing
* configuration space for the functions on this bus.
*
* Return: 0 on success, -errno on failure
*/
static int hv_allocate_config_window(struct hv_pcibus_device *hbus)
{
int ret;
/*
* Set up a region of MMIO space to use for accessing configuration
* space.
*/
ret = vmbus_allocate_mmio(&hbus->mem_config, hbus->hdev, 0, -1,
PCI_CONFIG_MMIO_LENGTH, 0x1000, false);
if (ret)
return ret;
/*
* vmbus_allocate_mmio() gets used for allocating both device endpoint
* resource claims (those which cannot be overlapped) and the ranges
* which are valid for the children of this bus, which are intended
* to be overlapped by those children. Set the flag on this claim
* meaning that this region can't be overlapped.
*/
hbus->mem_config->flags |= IORESOURCE_BUSY;
return 0;
}
static void hv_free_config_window(struct hv_pcibus_device *hbus)
{
vmbus_free_mmio(hbus->mem_config->start, PCI_CONFIG_MMIO_LENGTH);
}
static int hv_pci_bus_exit(struct hv_device *hdev, bool keep_devs);
/**
* hv_pci_enter_d0() - Bring the "bus" into the D0 power state
* @hdev: VMBus's tracking struct for this root PCI bus
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_enter_d0(struct hv_device *hdev)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct pci_bus_d0_entry *d0_entry;
struct hv_pci_compl comp_pkt;
struct pci_packet *pkt;
int ret;
/*
* Tell the host that the bus is ready to use, and moved into the
* powered-on state. This includes telling the host which region
* of memory-mapped I/O space has been chosen for configuration space
* access.
*/
pkt = kzalloc(sizeof(*pkt) + sizeof(*d0_entry), GFP_KERNEL);
if (!pkt)
return -ENOMEM;
init_completion(&comp_pkt.host_event);
pkt->completion_func = hv_pci_generic_compl;
pkt->compl_ctxt = &comp_pkt;
d0_entry = (struct pci_bus_d0_entry *)&pkt->message;
d0_entry->message_type.type = PCI_BUS_D0ENTRY;
d0_entry->mmio_base = hbus->mem_config->start;
ret = vmbus_sendpacket(hdev->channel, d0_entry, sizeof(*d0_entry),
(unsigned long)pkt, VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (!ret)
ret = wait_for_response(hdev, &comp_pkt.host_event);
if (ret)
goto exit;
if (comp_pkt.completion_status < 0) {
dev_err(&hdev->device,
"PCI Pass-through VSP failed D0 Entry with status %x\n",
comp_pkt.completion_status);
ret = -EPROTO;
goto exit;
}
ret = 0;
exit:
kfree(pkt);
return ret;
}
/**
* hv_pci_query_relations() - Ask host to send list of child
* devices
* @hdev: VMBus's tracking struct for this root PCI bus
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_query_relations(struct hv_device *hdev)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct pci_message message;
struct completion comp;
int ret;
/* Ask the host to send along the list of child devices */
init_completion(&comp);
if (cmpxchg(&hbus->survey_event, NULL, &comp))
return -ENOTEMPTY;
memset(&message, 0, sizeof(message));
message.type = PCI_QUERY_BUS_RELATIONS;
ret = vmbus_sendpacket(hdev->channel, &message, sizeof(message),
0, VM_PKT_DATA_INBAND, 0);
if (!ret)
ret = wait_for_response(hdev, &comp);
return ret;
}
/**
* hv_send_resources_allocated() - Report local resource choices
* @hdev: VMBus's tracking struct for this root PCI bus
*
* The host OS is expecting to be sent a request as a message
* which contains all the resources that the device will use.
* The response contains those same resources, "translated"
* which is to say, the values which should be used by the
* hardware, when it delivers an interrupt. (MMIO resources are
* used in local terms.) This is nice for Windows, and lines up
* with the FDO/PDO split, which doesn't exist in Linux. Linux
* is deeply expecting to scan an emulated PCI configuration
* space. So this message is sent here only to drive the state
* machine on the host forward.
*
* Return: 0 on success, -errno on failure
*/
static int hv_send_resources_allocated(struct hv_device *hdev)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct pci_resources_assigned *res_assigned;
struct pci_resources_assigned2 *res_assigned2;
struct hv_pci_compl comp_pkt;
struct hv_pci_dev *hpdev;
struct pci_packet *pkt;
size_t size_res;
int wslot;
int ret;
size_res = (hbus->protocol_version < PCI_PROTOCOL_VERSION_1_2)
? sizeof(*res_assigned) : sizeof(*res_assigned2);
pkt = kmalloc(sizeof(*pkt) + size_res, GFP_KERNEL);
if (!pkt)
return -ENOMEM;
ret = 0;
for (wslot = 0; wslot < 256; wslot++) {
hpdev = get_pcichild_wslot(hbus, wslot);
if (!hpdev)
continue;
memset(pkt, 0, sizeof(*pkt) + size_res);
init_completion(&comp_pkt.host_event);
pkt->completion_func = hv_pci_generic_compl;
pkt->compl_ctxt = &comp_pkt;
if (hbus->protocol_version < PCI_PROTOCOL_VERSION_1_2) {
res_assigned =
(struct pci_resources_assigned *)&pkt->message;
res_assigned->message_type.type =
PCI_RESOURCES_ASSIGNED;
res_assigned->wslot.slot = hpdev->desc.win_slot.slot;
} else {
res_assigned2 =
(struct pci_resources_assigned2 *)&pkt->message;
res_assigned2->message_type.type =
PCI_RESOURCES_ASSIGNED2;
res_assigned2->wslot.slot = hpdev->desc.win_slot.slot;
}
put_pcichild(hpdev);
ret = vmbus_sendpacket(hdev->channel, &pkt->message,
size_res, (unsigned long)pkt,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (!ret)
ret = wait_for_response(hdev, &comp_pkt.host_event);
if (ret)
break;
if (comp_pkt.completion_status < 0) {
ret = -EPROTO;
dev_err(&hdev->device,
"resource allocated returned 0x%x",
comp_pkt.completion_status);
break;
}
hbus->wslot_res_allocated = wslot;
}
kfree(pkt);
return ret;
}
/**
* hv_send_resources_released() - Report local resources
* released
* @hdev: VMBus's tracking struct for this root PCI bus
*
* Return: 0 on success, -errno on failure
*/
static int hv_send_resources_released(struct hv_device *hdev)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct pci_child_message pkt;
struct hv_pci_dev *hpdev;
int wslot;
int ret;
for (wslot = hbus->wslot_res_allocated; wslot >= 0; wslot--) {
hpdev = get_pcichild_wslot(hbus, wslot);
if (!hpdev)
continue;
memset(&pkt, 0, sizeof(pkt));
pkt.message_type.type = PCI_RESOURCES_RELEASED;
pkt.wslot.slot = hpdev->desc.win_slot.slot;
put_pcichild(hpdev);
ret = vmbus_sendpacket(hdev->channel, &pkt, sizeof(pkt), 0,
VM_PKT_DATA_INBAND, 0);
if (ret)
return ret;
hbus->wslot_res_allocated = wslot - 1;
}
hbus->wslot_res_allocated = -1;
return 0;
}
#define HVPCI_DOM_MAP_SIZE (64 * 1024)
static DECLARE_BITMAP(hvpci_dom_map, HVPCI_DOM_MAP_SIZE);
/*
* PCI domain number 0 is used by emulated devices on Gen1 VMs, so define 0
* as invalid for passthrough PCI devices of this driver.
*/
#define HVPCI_DOM_INVALID 0
/**
* hv_get_dom_num() - Get a valid PCI domain number
* Check if the PCI domain number is in use, and return another number if
* it is in use.
*
* @dom: Requested domain number
*
* return: domain number on success, HVPCI_DOM_INVALID on failure
*/
static u16 hv_get_dom_num(u16 dom)
{
unsigned int i;
if (test_and_set_bit(dom, hvpci_dom_map) == 0)
return dom;
for_each_clear_bit(i, hvpci_dom_map, HVPCI_DOM_MAP_SIZE) {
if (test_and_set_bit(i, hvpci_dom_map) == 0)
return i;
}
return HVPCI_DOM_INVALID;
}
/**
* hv_put_dom_num() - Mark the PCI domain number as free
* @dom: Domain number to be freed
*/
static void hv_put_dom_num(u16 dom)
{
clear_bit(dom, hvpci_dom_map);
}
/**
* hv_pci_probe() - New VMBus channel probe, for a root PCI bus
* @hdev: VMBus's tracking struct for this root PCI bus
* @dev_id: Identifies the device itself
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_probe(struct hv_device *hdev,
const struct hv_vmbus_device_id *dev_id)
{
struct hv_pcibus_device *hbus;
u16 dom_req, dom;
char *name;
bool enter_d0_retry = true;
int ret;
/*
* hv_pcibus_device contains the hypercall arguments for retargeting in
* hv_irq_unmask(). Those must not cross a page boundary.
*/
BUILD_BUG_ON(sizeof(*hbus) > HV_HYP_PAGE_SIZE);
/*
* With the recent 59bb47985c1d ("mm, sl[aou]b: guarantee natural
* alignment for kmalloc(power-of-two)"), kzalloc() is able to allocate
* a 4KB buffer that is guaranteed to be 4KB-aligned. Here the size and
* alignment of hbus is important because hbus's field
* retarget_msi_interrupt_params must not cross a 4KB page boundary.
*
* Here we prefer kzalloc to get_zeroed_page(), because a buffer
* allocated by the latter is not tracked and scanned by kmemleak, and
* hence kmemleak reports the pointer contained in the hbus buffer
* (i.e. the hpdev struct, which is created in new_pcichild_device() and
* is tracked by hbus->children) as memory leak (false positive).
*
* If the kernel doesn't have 59bb47985c1d, get_zeroed_page() *must* be
* used to allocate the hbus buffer and we can avoid the kmemleak false
* positive by using kmemleak_alloc() and kmemleak_free() to ask
* kmemleak to track and scan the hbus buffer.
*/
hbus = kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
if (!hbus)
return -ENOMEM;
hbus->state = hv_pcibus_init;
hbus->wslot_res_allocated = -1;
/*
* The PCI bus "domain" is what is called "segment" in ACPI and other
* specs. Pull it from the instance ID, to get something usually
* unique. In rare cases of collision, we will find out another number
* not in use.
*
* Note that, since this code only runs in a Hyper-V VM, Hyper-V
* together with this guest driver can guarantee that (1) The only
* domain used by Gen1 VMs for something that looks like a physical
* PCI bus (which is actually emulated by the hypervisor) is domain 0.
* (2) There will be no overlap between domains (after fixing possible
* collisions) in the same VM.
*/
dom_req = hdev->dev_instance.b[5] << 8 | hdev->dev_instance.b[4];
dom = hv_get_dom_num(dom_req);
if (dom == HVPCI_DOM_INVALID) {
dev_err(&hdev->device,
"Unable to use dom# 0x%hx or other numbers", dom_req);
ret = -EINVAL;
goto free_bus;
}
if (dom != dom_req)
dev_info(&hdev->device,
"PCI dom# 0x%hx has collision, using 0x%hx",
dom_req, dom);
hbus->sysdata.domain = dom;
hbus->hdev = hdev;
INIT_LIST_HEAD(&hbus->children);
INIT_LIST_HEAD(&hbus->dr_list);
INIT_LIST_HEAD(&hbus->resources_for_children);
spin_lock_init(&hbus->config_lock);
spin_lock_init(&hbus->device_list_lock);
spin_lock_init(&hbus->retarget_msi_interrupt_lock);
hbus->wq = alloc_ordered_workqueue("hv_pci_%x", 0,
hbus->sysdata.domain);
if (!hbus->wq) {
ret = -ENOMEM;
goto free_dom;
}
ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
hv_pci_onchannelcallback, hbus);
if (ret)
goto destroy_wq;
hv_set_drvdata(hdev, hbus);
ret = hv_pci_protocol_negotiation(hdev, pci_protocol_versions,
ARRAY_SIZE(pci_protocol_versions));
if (ret)
goto close;
ret = hv_allocate_config_window(hbus);
if (ret)
goto close;
hbus->cfg_addr = ioremap(hbus->mem_config->start,
PCI_CONFIG_MMIO_LENGTH);
if (!hbus->cfg_addr) {
dev_err(&hdev->device,
"Unable to map a virtual address for config space\n");
ret = -ENOMEM;
goto free_config;
}
name = kasprintf(GFP_KERNEL, "%pUL", &hdev->dev_instance);
if (!name) {
ret = -ENOMEM;
goto unmap;
}
hbus->sysdata.fwnode = irq_domain_alloc_named_fwnode(name);
kfree(name);
if (!hbus->sysdata.fwnode) {
ret = -ENOMEM;
goto unmap;
}
ret = hv_pcie_init_irq_domain(hbus);
if (ret)
goto free_fwnode;
retry:
ret = hv_pci_query_relations(hdev);
if (ret)
goto free_irq_domain;
ret = hv_pci_enter_d0(hdev);
/*
* In certain case (Kdump) the pci device of interest was
* not cleanly shut down and resource is still held on host
* side, the host could return invalid device status.
* We need to explicitly request host to release the resource
* and try to enter D0 again.
* Since the hv_pci_bus_exit() call releases structures
* of all its child devices, we need to start the retry from
* hv_pci_query_relations() call, requesting host to send
* the synchronous child device relations message before this
* information is needed in hv_send_resources_allocated()
* call later.
*/
if (ret == -EPROTO && enter_d0_retry) {
enter_d0_retry = false;
dev_err(&hdev->device, "Retrying D0 Entry\n");
/*
* Hv_pci_bus_exit() calls hv_send_resources_released()
* to free up resources of its child devices.
* In the kdump kernel we need to set the
* wslot_res_allocated to 255 so it scans all child
* devices to release resources allocated in the
* normal kernel before panic happened.
*/
hbus->wslot_res_allocated = 255;
ret = hv_pci_bus_exit(hdev, true);
if (ret == 0)
goto retry;
dev_err(&hdev->device,
"Retrying D0 failed with ret %d\n", ret);
}
if (ret)
goto free_irq_domain;
ret = hv_pci_allocate_bridge_windows(hbus);
if (ret)
goto exit_d0;
ret = hv_send_resources_allocated(hdev);
if (ret)
goto free_windows;
prepopulate_bars(hbus);
hbus->state = hv_pcibus_probed;
ret = create_root_hv_pci_bus(hbus);
if (ret)
goto free_windows;
return 0;
free_windows:
hv_pci_free_bridge_windows(hbus);
exit_d0:
(void) hv_pci_bus_exit(hdev, true);
free_irq_domain:
irq_domain_remove(hbus->irq_domain);
free_fwnode:
irq_domain_free_fwnode(hbus->sysdata.fwnode);
unmap:
iounmap(hbus->cfg_addr);
free_config:
hv_free_config_window(hbus);
close:
vmbus_close(hdev->channel);
destroy_wq:
destroy_workqueue(hbus->wq);
free_dom:
hv_put_dom_num(hbus->sysdata.domain);
free_bus:
kfree(hbus);
return ret;
}
static int hv_pci_bus_exit(struct hv_device *hdev, bool keep_devs)
{
struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
struct {
struct pci_packet teardown_packet;
u8 buffer[sizeof(struct pci_message)];
} pkt;
struct hv_pci_compl comp_pkt;
struct hv_pci_dev *hpdev, *tmp;
unsigned long flags;
int ret;
/*
* After the host sends the RESCIND_CHANNEL message, it doesn't
* access the per-channel ringbuffer any longer.
*/
if (hdev->channel->rescind)
return 0;
if (!keep_devs) {
/* Delete any children which might still exist. */
spin_lock_irqsave(&hbus->device_list_lock, flags);
list_for_each_entry_safe(hpdev, tmp, &hbus->children, list_entry) {
list_del(&hpdev->list_entry);
if (hpdev->pci_slot)
pci_destroy_slot(hpdev->pci_slot);
/* For the two refs got in new_pcichild_device() */
put_pcichild(hpdev);
put_pcichild(hpdev);
}
spin_unlock_irqrestore(&hbus->device_list_lock, flags);
}
ret = hv_send_resources_released(hdev);
if (ret) {
dev_err(&hdev->device,
"Couldn't send resources released packet(s)\n");
return ret;
}
memset(&pkt.teardown_packet, 0, sizeof(pkt.teardown_packet));
init_completion(&comp_pkt.host_event);
pkt.teardown_packet.completion_func = hv_pci_generic_compl;
pkt.teardown_packet.compl_ctxt = &comp_pkt;
pkt.teardown_packet.message[0].type = PCI_BUS_D0EXIT;
ret = vmbus_sendpacket(hdev->channel, &pkt.teardown_packet.message,
sizeof(struct pci_message),
(unsigned long)&pkt.teardown_packet,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret)
return ret;
if (wait_for_completion_timeout(&comp_pkt.host_event, 10 * HZ) == 0)
return -ETIMEDOUT;
return 0;
}
/**
* hv_pci_remove() - Remove routine for this VMBus channel
* @hdev: VMBus's tracking struct for this root PCI bus
*
* Return: 0 on success, -errno on failure
*/
static int hv_pci_remove(struct hv_device *hdev)
{
struct hv_pcibus_device *hbus;
int ret;
hbus = hv_get_drvdata(hdev);
if (hbus->state == hv_pcibus_installed) {
tasklet_disable(&hdev->channel->callback_event);
hbus->state = hv_pcibus_removing;
tasklet_enable(&hdev->channel->callback_event);
destroy_workqueue(hbus->wq);
hbus->wq = NULL;
/*
* At this point, no work is running or can be scheduled
* on hbus-wq. We can't race with hv_pci_devices_present()
* or hv_pci_eject_device(), it's safe to proceed.
*/
/* Remove the bus from PCI's point of view. */
pci_lock_rescan_remove();
pci_stop_root_bus(hbus->pci_bus);
hv_pci_remove_slots(hbus);
pci_remove_root
|
{
"url": "https://android-kvm.googlesource.com/linux/+/refs/heads/ardb/arm32-ti-in-task/drivers/pci/controller/pci-hyperv.c",
"source_domain": "android-kvm.googlesource.com",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "1049349",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:B3BFYZ6MBR6L7ORSQG2KAUM6AHUQE344",
"WARC-Concurrent-To": "<urn:uuid:1c4eb8ff-f8f7-40fd-bce7-19121bfa0ede>",
"WARC-Date": "2023-03-27T00:05:30Z",
"WARC-IP-Address": "142.251.16.82",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:Y4RDMDBF3OZWTGKMXDX4LUGLGCSJCBLT",
"WARC-Record-ID": "<urn:uuid:30448c8b-2949-48f9-9831-ccc080eb69c0>",
"WARC-Target-URI": "https://android-kvm.googlesource.com/linux/+/refs/heads/ardb/arm32-ti-in-task/drivers/pci/controller/pci-hyperv.c",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ce2132d5-4b29-47dd-b57c-c9778bf6be40>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-24\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,
104,
107,
146,
148,
158,
194,
196,
270,
338,
413,
484,
557,
627,
679,
681,
754,
827,
903,
977,
1019,
1021,
1095,
1173,
1249,
1318,
1393,
1469,
1537,
1607,
1649,
1651,
1726,
1800,
1867,
1943,
2017,
2055,
2058,
2084,
2110,
2133,
2158,
2187,
2216,
2243,
2265,
2288,
2311,
2337,
2365,
2391,
2394,
2468,
2485,
2488,
2562,
2620,
2679,
2709,
2772,
2833,
2900,
2903,
2934,
2937,
3004,
3013,
3016,
3079,
3105,
3131,
3157,
3160,
3198,
3229,
3294,
3335,
3379,
3425,
3451,
3454,
3470,
3473,
3497,
3500,
3514,
3517,
3548,
3590,
3638,
3685,
3741,
3794,
3834,
3873,
3912,
3954,
3990,
4031,
4070,
4118,
4166,
4216,
4266,
4314,
4368,
4424,
4480,
4531,
4588,
4658,
4704,
4724,
4727,
4730,
4786,
4789,
4809,
4818,
4837,
4856,
4865,
4878,
4890,
4893,
4968,
5040,
5115,
5147,
5150,
5176,
5185,
5196,
5208,
5225,
5233,
5243,
5255,
5258,
5310,
5313,
5347,
5373,
5399,
5407,
5421,
5434,
5449,
5467,
5501,
5530,
5542,
5578,
5609,
5649,
5652,
5687,
5713,
5739,
5747,
5761,
5774,
5789,
5807,
5841,
5870,
5881,
5904,
5918,
5930,
5934,
5955,
5976,
6029,
6070,
6123,
6161,
6197,
6238,
6278,
6321,
6364,
6403,
6428,
6476,
6479,
6500,
6511,
6529,
6547,
6561,
6575,
6587,
6591,
6642,
6663,
6716,
6757,
6810,
6848,
6884,
6925,
6965,
7008,
7051,
7090,
7143,
7198,
7201,
7223,
7234,
7252,
7270,
7291,
7316,
7328,
7332,
7355,
7384,
7424,
7474,
7516,
7559,
7571,
7621,
7655,
7669,
7672,
7695,
7709,
7727,
7737,
7750,
7762,
7765,
7809,
7867,
7870,
7891,
7901,
7913,
7940,
7973,
8004,
8016,
8046,
8078,
8111,
8123,
8145,
8177,
8224,
8236,
8256,
8322,
8345,
8363,
8393,
8396,
8399,
8453,
8456,
8459,
8523,
8584,
8607,
8609,
8656,
8729,
8771,
8774,
8803,
8836,
8858,
8870,
8873,
8946,
8992,
8995,
9021,
9054,
9068,
9083,
9095,
9122,
9160,
9178,
9218,
9230,
9258,
9296,
9314,
9355,
9367,
9399,
9431,
9478,
9512,
9524,
9547,
9580,
9611,
9651,
9665,
9677,
9709,
9741,
9788,
9819,
9863,
9877,
9889,
9921,
9954,
9985,
10031,
10052,
10069,
10081,
10114,
10147,
10178,
10224,
10250,
10267,
10279,
10309,
10342,
10373,
10402,
10414,
10447,
10477,
10491,
10522,
10534,
10565,
10598,
10629,
10659,
10671,
10701,
10734,
10765,
10796,
10808,
10811,
10881,
10884,
10908,
10941,
10955,
10986,
11007,
11019,
11052,
11084,
11096,
11132,
11144,
11147,
11212,
11215,
11240,
11273,
11287,
11318,
11334,
11370,
11382,
11411,
11449,
11480,
11496,
11508,
11534,
11572,
11603,
11615,
11643,
11676,
11707,
11719,
11731,
11775,
11778,
11803,
11806,
11829,
11849,
11867,
11888,
11908,
11926,
11929,
11955,
11983,
12031,
12077,
12105,
12129,
12161,
12194,
12223,
12254,
12286,
12319,
12344,
12411,
12466,
12490,
12531,
12558,
12584,
12617,
12648,
12688,
12717,
12777,
12802,
12852,
12919,
12922,
12992,
12995,
12998,
13001,
13072,
13144,
13179,
13182,
13202,
13226,
13256,
13259,
13290,
13316,
13342,
13350,
13364,
13377,
13392,
13410,
13444,
13473,
13484,
13507,
13510,
13531,
13560,
13578,
13615,
13618,
13643,
13665,
13691,
13714,
13736,
13756,
13759,
13779,
13826,
13855,
13872,
13902,
13929,
13964,
13987,
14018,
14042,
14099,
14125,
14128,
14195,
14260,
14263,
14297,
14300,
14322,
14352,
14375,
14378,
14431,
14435,
14494,
14542,
14571,
14620,
14622,
14684,
14745,
14772,
14775,
14850,
14872,
14874,
14915,
14981,
15025,
15030,
15064,
15097,
15099,
15175,
15187,
15238,
15240,
15268,
15270,
15321,
15323,
15364,
15378,
15380,
15383,
15452,
15511,
15514,
15567,
15592,
15594,
15609,
15639,
15694,
15710,
15712,
15760,
15767,
15769,
15779,
15781,
15785,
15845,
15892,
15894,
15958,
15960,
15997,
16000,
16037,
16039,
16070,
16086,
16120,
16155,
16174,
16176,
16180,
16240,
16289,
16291,
16355,
16357,
16392,
16395,
16432,
16434,
16467,
16489,
16544,
16546,
16549,
16625,
16698,
16769,
16844,
16860,
16863,
16867,
16923,
16979,
17016,
17046,
17095,
17098,
17172,
17192,
17194,
17215,
17285,
17288,
17355,
17358,
17393,
17447,
17505,
17528,
17575,
17602,
17665,
17684,
17738,
17770,
17825,
17848,
17881,
17891,
17949,
17970,
17973,
18031,
18087,
18101,
18104,
18114,
18158,
18211,
18269,
18327,
18392,
18398,
18444,
18460,
18468,
18488,
18495,
18503,
18523,
18530,
18539,
18559,
18566,
18568,
18571,
18632,
18669,
18672,
18678,
18736,
18745,
18781,
18837,
18839,
18841,
18904,
18906,
18915,
18936,
18999,
19014,
19067,
19125,
19183,
19248,
19254,
19300,
19319,
19322,
19388,
19404,
19407,
19465,
19477,
19479,
19483,
19541,
19597,
19634,
19664,
19699,
19702,
19777,
19796,
19798,
19819,
19889,
19929,
19968,
20007,
20075,
20128,
20189,
20247,
20312,
20319,
20364,
20380,
20388,
20407,
20414,
20422,
20441,
20448,
20457,
20476,
20483,
20485,
20488,
20550,
20587,
20590,
20596,
20654,
20663,
20699,
20756,
20758,
20760,
20764,
20819,
20845,
20871,
20898,
20923,
20948,
20950,
20990,
21028,
21031,
21107,
21138,
21140,
21172,
21234,
21260,
21317,
21329,
21362,
21413,
21434,
21461,
21463,
21467,
21524,
21550,
21576,
21603,
21628,
21666,
21668,
21708,
21746,
21749,
21826,
21856,
21858,
21890,
21952,
21978,
22035,
22047,
22080,
22132,
22153,
22180,
22182,
22204,
22246,
22279,
22314,
22317,
22320,
22346,
22348,
22414,
22473,
22549,
22626,
22701,
22703,
22779,
22852,
22929,
23003,
23005,
23080,
23154,
23213,
23215,
23295,
23372,
23416,
23418,
23491,
23494,
23524,
23554,
23565,
23583,
23612,
23615,
23619,
23681,
23726,
23775,
23811,
23869,
23872,
23951,
23973,
23975,
24020,
24064,
24104,
24136,
24195,
24229,
24268,
24278,
24280,
24319,
24365,
24414,
24473,
24482,
24508,
24510,
24564,
24569,
24607,
24609,
24613,
24677,
24740,
24798,
24857,
24887,
24954,
25020,
25022,
25064,
25067,
25132,
25173,
25203,
25205,
25237,
25295,
25305,
25314,
25337,
25378,
25385,
25423,
25456,
25465,
25513,
25529,
25577,
25597,
25617,
25647,
25699,
25731,
25785,
25831,
25883,
25914,
25947,
26001,
26045,
26065,
26111,
26120,
26132,
26200,
26209,
26221,
26269,
26301,
26330,
26385,
26422,
26448,
26461,
26463,
26506,
26516,
26518,
26522,
26597,
26631,
26681,
26717,
26775,
26778,
26858,
26880,
26882,
26923,
26967,
27000,
27002,
27006,
27076,
27135,
27193,
27252,
27282,
27347,
27349,
27391,
27394,
27460,
27501,
27503,
27535,
27593,
27603,
27612,
27635,
27677,
27691,
27698,
27728,
27763,
27777,
27786,
27834,
27850,
27889,
27919,
27972,
28004,
28060,
28108,
28161,
28193,
28222,
28258,
28316,
28319,
28387,
28457,
28525,
28594,
28632,
28635,
28669,
28734,
28779,
28825,
28834,
28846,
28905,
28914,
28926,
28965,
28994,
29031,
29060,
29073,
29075,
29085,
29087,
29091,
29167,
29203,
29261,
29296,
29365,
29367,
29409,
29412,
29489,
29529,
29546,
29548,
29580,
29638,
29648,
29674,
29737,
29749,
29765,
29809,
29846,
29867,
29877,
29879,
29912,
29967,
29999,
30001,
30039,
30048,
30071,
30119,
30127,
30159,
30219,
30248,
30278,
30327,
30358,
30430,
30480,
30497,
30499,
30503,
30535,
30575,
30610,
30638,
30640,
30703,
30765,
30826,
30873,
30876,
30957,
30975,
30977,
31008,
31034,
31056,
31088,
31154,
31210,
31243,
31262,
31311,
31326,
31334,
31362,
31425,
31439,
31456,
31464,
31466,
31501,
31522,
31524,
31602,
31614,
31616,
31661,
31721,
31723,
31770,
31772,
31796,
31798,
31802,
31862,
31874,
31901,
31903,
31965,
32027,
32091,
32115,
32118,
32167,
32169,
32226,
32264,
32309,
32340,
32362,
32381,
32403,
32425,
32446,
32464,
32482,
32491,
32542,
32580,
32598,
32668,
32730,
32777,
32813,
32858,
32910,
32978,
33038,
33078,
33117,
33158,
33181,
33222,
33225,
33291,
33360,
33425,
33451,
33454,
33512,
33515,
33577,
33637,
33660,
33718,
33758,
33761,
33789,
33831,
33875,
33884,
33902,
33904,
33945,
34006,
34029,
34049,
34058,
34076,
34078,
34081,
34140,
34199,
34208,
34211,
34235,
34244,
34291,
34321,
34364,
34366,
34368,
34436,
34451,
34464,
34531,
34534,
34597,
34656,
34719,
34775,
34826,
34881,
34883,
34948,
35015,
35085,
35143,
35210,
35277,
35320,
35323,
35389,
35418,
35456,
35482,
35484,
35511,
35541,
35572,
35575,
35650,
35672,
35674,
35720,
35763,
35803,
35856,
35897,
35939,
35941,
35975,
36039,
36060,
36062,
36121,
36149,
36184,
36220,
36280,
36283,
36353,
36372,
36375,
36422,
36447,
36449,
36483,
36548,
36569,
36571,
36580,
36640,
36668,
36703,
36739,
36799,
36802,
36870,
36915,
36918,
36970,
37009,
37042,
37081,
37106,
37108,
37112,
37171,
37206,
37256,
37258,
37322,
37384,
37445,
37509,
37556,
37559,
37634,
37636,
37674,
37705,
37736,
37762,
37784,
37806,
37828,
37859,
37891,
37900,
37927,
37935,
37967,
38000,
38012,
38029,
38039,
38048,
38105,
38156,
38174,
38244,
38275,
38338,
38350,
38376,
38447,
38470,
38498,
38522,
38557,
38559,
38610,
38625,
38646,
38678,
38722,
38775,
38808,
38842,
38873,
38921,
38927,
38954,
38968,
38975,
39006,
39037,
39085,
39091,
39118,
39132,
39139,
39148,
39212,
39272,
39324,
39327,
39356,
39401,
39421,
39423,
39490,
39526,
39546,
39592,
39603,
39632,
39678,
39712,
39732,
39734,
39737,
39801,
39819,
39822,
39875,
39878,
39937,
39984,
39987,
40049,
40070,
40115,
40165,
40199,
40225,
40246,
40248,
40251,
40311,
40370,
40429,
40489,
40520,
40523,
40571,
40624,
40677,
40698,
40700,
40732,
40785,
40829,
40863,
40897,
40918,
40920,
40933,
40935,
40977,
41020,
41049,
41087,
41121,
41141,
41143,
41146,
41211,
41282,
41301,
41304,
41331,
41359,
41385,
41432,
41486,
41518,
41539,
41547,
41563,
41605,
41620,
41637,
41653,
41674,
41695,
41716,
41737,
41752,
41754,
41789,
41832,
41860,
41903,
41940,
41972,
41997,
42026,
42029,
42073,
42105,
42130,
42133,
42137,
42189,
42215,
42217,
42278,
42341,
42405,
42462,
42523,
42561,
42563,
42615,
42618,
42684,
42686,
42726,
42760,
42811,
42864,
42884,
42926,
42964,
42992,
43059,
43076,
43096,
43121,
43150,
43190,
43206,
43208,
43218,
43220,
43224,
43283,
43342,
43351,
43353,
43414,
43476,
43537,
43598,
43655,
43678,
43680,
43732,
43735,
43772,
43774,
43836,
43848,
43850,
43854,
43911,
43963,
43966,
44032,
44034,
44060,
44090,
44111,
44137,
44150,
44157,
44217,
44258,
44270,
44278,
44337,
44390,
44407,
44415,
44417,
44468,
44471,
44537,
44606,
44675,
44678,
44736,
44777,
44831,
44860,
44899,
44932,
44935,
44982,
45000,
45003,
45035,
45079,
45090,
45127,
45132,
45166,
45200,
45244,
45279,
45284,
45318,
45320,
45322,
45324,
45380,
45397,
45399,
45403,
45453,
45505,
45507,
45571,
45632,
45692,
45756,
45820,
45881,
45893,
45896,
45956,
45958,
45989,
46019,
46050,
46080,
46106,
46132,
46153,
46166,
46179,
46190,
46197,
46225,
46290,
46328,
46330,
46359,
46379,
46426,
46466,
46468,
46519,
46522,
46591,
46660,
46722,
46754,
46756,
46824,
46891,
46958,
46972,
46975,
47033,
47092,
47124,
47183,
47185,
47220,
47225,
47283,
47324,
47356,
47374,
47384,
47431,
47443,
47454,
47485,
47493,
47502,
47534,
47536,
47570,
47582,
47611,
47616,
47626,
47628,
47661,
47691,
47694,
47726,
47731,
47764,
47794,
47822,
47845,
47854,
47880,
47890,
47923,
47953,
47956,
47987,
48009,
48011,
48013,
48052,
48085,
48133,
48144,
48175,
48224,
48234,
48241,
48243,
48245,
48262,
48278,
48311,
48367,
48369,
48372,
48418,
48420,
48486,
48545,
48611,
48683,
48719,
48722,
48785,
48787,
48813,
48840,
48853,
48911,
48932,
48942,
49005,
49060,
49118,
49131,
49162,
49208,
49232,
49234,
49236,
49238,
49241,
49287,
49290,
49353,
49355,
49381,
49439,
49461,
49471,
49506,
49530,
49532,
49534,
49537,
49580,
49583,
49650,
49652,
49673,
49710,
49737,
49789,
49852,
49865,
49875,
49934,
49991,
50013,
50015,
50017,
50021,
50076,
50128,
50130,
50172,
50175,
50240,
50242,
50268,
50325,
50360,
50378,
50394,
50426,
50446,
50462,
50488,
50523,
50554,
50595,
50622,
50658,
50686,
50721,
50731,
50733,
50758,
50788,
50814,
50817,
50821,
50879,
50915,
50962,
51010,
51012,
51073,
51096,
51099,
51177,
51199,
51201,
51247,
51290,
51329,
51336,
51360,
51408,
51452,
51467,
51476,
51517,
51552,
51578,
51580,
51582,
51617,
51619,
51623,
51675,
51732,
51787,
51807,
51809,
51872,
51935,
51937,
51982,
51985,
52062,
52098,
52100,
52126,
52161,
52194,
52203,
52234,
52279,
52286,
52307,
52316,
52361,
52373,
52386,
52406,
52436,
52475,
52499,
52539,
52598,
52662,
52724,
52767,
52820,
52854,
52887,
52907,
52953,
52962,
52974,
53031,
53043,
53064,
53095,
53116,
53167,
53219,
53275,
53289,
53296,
53310,
53323,
53325,
53329,
53376,
53428,
53458,
53460,
53523,
53586,
53648,
53710,
53728,
53730,
53780,
53783,
53859,
53870,
53872,
53893,
53933,
53984,
54041,
54082,
54096,
54117,
54124,
54126,
54128,
54184,
54198,
54200,
54204,
54268,
54319,
54321,
54381,
54444,
54500,
54562,
54624,
54638,
54640,
54698,
54761,
54820,
54882,
54908,
54910,
54979,
55028,
55030,
55099,
55160,
55163,
55226,
55228,
55242,
55254,
55294,
55320,
55351,
55377,
55404,
55435,
55456,
55509,
55529,
55544,
55570,
55639,
55690,
55728,
55786,
55799,
55826,
55883,
55918,
55929,
55939,
55941,
55943,
55999,
56008,
56016,
56077,
56128,
56186,
56218,
56220,
56276,
56319,
56381,
56396,
56428,
56479,
56537,
56599,
56639,
56679,
56717,
56750,
56764,
56766,
56768,
56824,
56838,
56883,
56895,
56924,
56962,
56964,
56966,
57018,
57069,
57074,
57089,
57147,
57178,
57192,
57213,
57259,
57266,
57268,
57270,
57287,
57343,
57396,
57428,
57482,
57495,
57525,
57546,
57581,
57602,
57604,
57627,
57653,
57656,
57686,
57725,
57728,
57754,
57789,
57820,
57847,
57875,
57882,
57903,
57926,
57956,
57963,
57972,
57979,
57981,
57992,
57994,
57998,
58069,
58121,
58168,
58170,
58212,
58215,
58285,
58309,
58311,
58338,
58359,
58376,
58417,
58447,
58486,
58502,
58504,
58551,
58564,
58580,
58631,
58651,
58702,
58705,
58761,
58812,
58832,
58835,
58877,
58925,
58981,
58997,
59012,
59017,
59053,
59063,
59065,
59069,
59126,
59178,
59226,
59228,
59295,
59365,
59420,
59423,
59489,
59526,
59528,
59552,
59559,
59620,
59633,
59642,
59650,
59694,
59735,
59779,
59823,
59865,
59919,
59971,
60027,
60087,
60139,
60181,
60183,
60226,
60237,
60239,
60243,
60301,
60353,
60401,
60403,
60465,
60468,
60535,
60573,
60575,
60599,
60606,
60667,
60680,
60689,
60697,
60741,
60782,
60826,
60870,
60912,
60966,
61018,
61074,
61134,
61186,
61228,
61274,
61306,
61344,
61346,
61389,
61400,
61402,
61406,
61465,
61521,
61523,
61579,
61641,
61705,
61767,
61770,
61829,
61831,
61868,
61899,
61925,
61947,
61968,
61979,
61988,
62011,
62057,
62065,
62117,
62137,
62184,
62187,
62255,
62324,
62392,
62435,
62438,
62489,
62557,
62569,
62595,
62633,
62652,
62680,
62682,
62733,
62763,
62819,
62840,
62875,
62907,
62966,
63019,
63069,
63117,
63162,
63186,
63240,
63261,
63313,
63334,
63355,
63407,
63409,
63413,
63463,
63505,
63507,
63570,
63629,
63668,
63671,
63729,
63731,
63776,
63813,
63854,
63909,
63917,
63919,
63956,
63977,
64023,
64058,
64060,
64064,
64120,
64161,
64163,
64226,
64282,
64285,
64337,
64339,
64370,
64379,
64420,
64437,
64449,
64483,
64506,
64535,
64567,
64598,
64640,
64675,
64712,
64747,
64785,
64811,
64852,
64865,
64873,
64885,
64941,
64976,
64999,
65014,
65040,
65065,
65108,
65121,
65129,
65139,
65141,
65196,
65221,
65228,
65231,
65285,
65297,
65300,
65348,
65358,
65403,
65425,
65443,
65446,
65501,
65537,
65540,
65583,
65625,
65679,
65689,
65703,
65710,
65735,
65788,
65830,
65854,
65900,
65918,
65945,
65971,
66000,
66030,
66037,
66039,
66078,
66085,
66110,
66158,
66176,
66204,
66231,
66260,
66293,
66300,
66302,
66343,
66350,
66366,
66415,
66448,
66474,
66487,
66515,
66536,
66538,
66545,
66572,
66618,
66651,
66671,
66684,
66715,
66740,
66767,
66787,
66789,
66810,
66812,
66819,
66828,
66858,
66897,
66930,
66937,
66939,
66946,
66955,
66984,
67031,
67065,
67072,
67074,
67076,
67091,
67093,
67097,
67147,
67203,
67263,
67306,
67363,
67365,
67424,
67482,
67543,
67605,
67666,
67729,
67791,
67793,
67850,
67911,
67920,
67923,
67986,
68025,
68042,
68044,
68098,
68139,
68169,
68193,
68202,
68209,
68212,
68265,
68322,
68378,
68392,
68395,
68459,
68469,
68485,
68524,
68569,
68598,
68657,
68718,
68754,
68798,
68849,
68885,
68925,
68971,
68981,
69034,
69045,
69068,
69122,
69128,
69139,
69141,
69180,
69217,
69241,
69283,
69308,
69319,
69321,
69383,
69406,
69458,
69487,
69502,
69513,
69515,
69556,
69558,
69581,
69639,
69654,
69660,
69672,
69684,
69686,
69690,
69754,
69760,
69812,
69815,
69885,
69887,
69890,
69948,
69999,
70002,
70052,
70098,
70141,
70177,
70179,
70231,
70278,
70322,
70359,
70361,
70363,
70367,
70428,
70442,
70494,
70496,
70559,
70621,
70681,
70745,
70800,
70863,
70904,
70906,
70970,
71033,
71095,
71158,
71217,
71280,
71343,
71404,
71438,
71440,
71482,
71485,
71558,
71560,
71583,
71592,
71620,
71682,
71744,
71766,
71788,
71803,
71814,
71843,
71909,
71932,
71944,
71946,
72000,
72048,
72095,
72143,
72164,
72166,
72195,
72258,
72318,
72335,
72365,
72373,
72384,
72413,
72480,
72504,
72527,
72529,
72583,
72632,
72680,
72728,
72750,
72752,
72762,
72780,
72806,
72849,
72885,
72887,
72899,
72901,
72905,
72968,
73020,
73022,
73083,
73136,
73138,
73180,
73183,
73251,
73253,
73262,
73265,
73332,
73341,
73344,
73408,
73448,
73457,
73469,
73472,
73542,
73610,
73677,
73742,
73790,
73793,
73837,
73847,
73849,
73914,
73916,
73982,
73984,
74052,
74056,
74118,
74173,
74175,
74217,
74220,
74271,
74273,
74327,
74362,
74392,
74416,
74425,
74428,
74493,
74557,
74626,
74636,
74639,
74700,
74710,
74726,
74765,
74810,
74839,
74892,
74939,
74986,
75053,
75093,
75139,
75149,
75202,
75211,
75222,
75260,
75283,
75340,
75369,
75384,
75395,
75397,
75406,
75412,
75424,
75436,
75438,
75442,
75502,
75512,
75567,
75569,
75611,
75614,
75672,
75674,
75728,
75756,
75780,
75789,
75848,
75872,
75919,
75938,
75976,
76016,
76081,
76108,
76118,
76156,
76168,
76170,
76174,
76238,
76293,
76295,
76356,
76417,
76476,
76534,
76597,
76660,
76722,
76782,
76844,
76875,
76877,
76919,
76922,
76985,
76987,
77041,
77086,
77133,
77163,
77189,
77213,
77230,
77241,
77250,
77313,
77363,
77415,
77425,
77441,
77450,
77490,
77531,
77543,
77553,
77594,
77633,
77678,
77707,
77764,
77779,
77827,
77861,
77885,
77939,
77948,
77964,
78013,
78048,
78073,
78128,
78130,
78151,
78204,
78234,
78254,
78300,
78310,
78363,
78372,
78379,
78417,
78432,
78455,
78491,
78520,
78527,
78529,
78564,
78566,
78578,
78590,
78592,
78596,
78652,
78663,
78718,
78720,
78762,
78765,
78827,
78829,
78883,
78913,
78939,
78950,
78959,
79022,
79063,
79075,
79085,
79115,
79163,
79207,
79228,
79288,
79312,
79321,
79333,
79372,
79374,
79406,
79416,
79418,
79457,
79515,
79518,
79593,
79650,
79653,
79681,
79685,
79736,
79809,
79825,
79827,
79859,
79861,
79926,
79929,
79964,
79966,
79982,
80029,
80041,
80100,
80145,
80155,
80157,
80183,
80185,
80189,
80245,
80279,
80282,
80318,
80320,
80351,
80353,
80357,
80420,
80475,
80515,
80517,
80559,
80562,
80610,
80651,
80653,
80684,
80702,
80714,
80742,
80751,
80754,
80825,
80882,
80885,
80933,
80936,
81001,
81072,
81143,
81197,
81265,
81267,
81331,
81401,
81467,
81539,
81604,
81606,
81677,
81748,
81812,
81858,
81861,
81907,
81918,
81934,
81964,
81996,
81999,
82068,
82132,
82202,
82216,
82218,
82282,
82348,
82415,
82485,
82555,
82585,
82588,
82654,
82685,
82717,
82740,
82795,
82810,
82825,
82827,
82847,
82871,
82916,
82931,
82959,
82978,
83011,
83043,
83090,
83126,
83167,
83219,
83270,
83293,
83310,
83325,
83340,
83342,
83413,
83446,
83455,
83472,
83500,
83563,
83599,
83608,
83620,
83659,
83668,
83680,
83730,
83755,
83778,
83801,
83856,
83871,
83889,
83891,
83950,
83963,
83978,
83990,
83992,
84052,
84065,
84094,
84109,
84121,
84123,
84160,
84169,
84187,
84194,
84230,
84239,
84261,
84290,
84293,
84350,
84409,
84462,
84523,
84552,
84607,
84667,
84724,
84785,
84842,
84856,
84859,
84899,
84923,
84970,
84973,
85028,
85073,
85114,
85165,
85213,
85252,
85255,
85288,
85323,
85337,
85349,
85372,
85414,
85416,
85425,
85447,
85491,
85500,
85514,
85555,
85564,
85583,
85607,
85639,
85675,
85684,
85703,
85713,
85727,
85761,
85770,
85806,
85823,
85860,
85873,
85919,
85926,
85951,
85964,
85993,
86000,
86028,
86040,
86069,
86079,
86117,
86127,
86140,
86152,
86154,
86221,
86223,
86277,
86286,
86321,
86360,
86367,
86397,
86429,
86450,
86459,
86462,
86525,
86573,
86576,
86604,
86614,
86632,
86683,
86734,
86802,
86832,
86853,
86888,
86940,
86961,
86982,
86984,
87040,
87042,
87082,
87093,
87116,
87165,
87177,
87179,
87241,
87280,
87340,
87384,
87438,
87506,
87534,
87571,
87591,
87637,
87646,
87658,
87727,
87746,
87756,
87758,
87762,
87820,
87875,
87877,
87919,
87922,
87971,
87973,
88004,
88013,
88042,
88084,
88133,
88167,
88215,
88244,
88261,
88264,
88320,
88378,
88428,
88431,
88478,
88504,
88538,
88565
],
"line_end_idx": [
68,
104,
107,
146,
148,
158,
194,
196,
270,
338,
413,
484,
557,
627,
679,
681,
754,
827,
903,
977,
1019,
1021,
1095,
1173,
1249,
1318,
1393,
1469,
1537,
1607,
1649,
1651,
1726,
1800,
1867,
1943,
2017,
2055,
2058,
2084,
2110,
2133,
2158,
2187,
2216,
2243,
2265,
2288,
2311,
2337,
2365,
2391,
2394,
2468,
2485,
2488,
2562,
2620,
2679,
2709,
2772,
2833,
2900,
2903,
2934,
2937,
3004,
3013,
3016,
3079,
3105,
3131,
3157,
3160,
3198,
3229,
3294,
3335,
3379,
3425,
3451,
3454,
3470,
3473,
3497,
3500,
3514,
3517,
3548,
3590,
3638,
3685,
3741,
3794,
3834,
3873,
3912,
3954,
3990,
4031,
4070,
4118,
4166,
4216,
4266,
4314,
4368,
4424,
4480,
4531,
4588,
4658,
4704,
4724,
4727,
4730,
4786,
4789,
4809,
4818,
4837,
4856,
4865,
4878,
4890,
4893,
4968,
5040,
5115,
5147,
5150,
5176,
5185,
5196,
5208,
5225,
5233,
5243,
5255,
5258,
5310,
5313,
5347,
5373,
5399,
5407,
5421,
5434,
5449,
5467,
5501,
5530,
5542,
5578,
5609,
5649,
5652,
5687,
5713,
5739,
5747,
5761,
5774,
5789,
5807,
5841,
5870,
5881,
5904,
5918,
5930,
5934,
5955,
5976,
6029,
6070,
6123,
6161,
6197,
6238,
6278,
6321,
6364,
6403,
6428,
6476,
6479,
6500,
6511,
6529,
6547,
6561,
6575,
6587,
6591,
6642,
6663,
6716,
6757,
6810,
6848,
6884,
6925,
6965,
7008,
7051,
7090,
7143,
7198,
7201,
7223,
7234,
7252,
7270,
7291,
7316,
7328,
7332,
7355,
7384,
7424,
7474,
7516,
7559,
7571,
7621,
7655,
7669,
7672,
7695,
7709,
7727,
7737,
7750,
7762,
7765,
7809,
7867,
7870,
7891,
7901,
7913,
7940,
7973,
8004,
8016,
8046,
8078,
8111,
8123,
8145,
8177,
8224,
8236,
8256,
8322,
8345,
8363,
8393,
8396,
8399,
8453,
8456,
8459,
8523,
8584,
8607,
8609,
8656,
8729,
8771,
8774,
8803,
8836,
8858,
8870,
8873,
8946,
8992,
8995,
9021,
9054,
9068,
9083,
9095,
9122,
9160,
9178,
9218,
9230,
9258,
9296,
9314,
9355,
9367,
9399,
9431,
9478,
9512,
9524,
9547,
9580,
9611,
9651,
9665,
9677,
9709,
9741,
9788,
9819,
9863,
9877,
9889,
9921,
9954,
9985,
10031,
10052,
10069,
10081,
10114,
10147,
10178,
10224,
10250,
10267,
10279,
10309,
10342,
10373,
10402,
10414,
10447,
10477,
10491,
10522,
10534,
10565,
10598,
10629,
10659,
10671,
10701,
10734,
10765,
10796,
10808,
10811,
10881,
10884,
10908,
10941,
10955,
10986,
11007,
11019,
11052,
11084,
11096,
11132,
11144,
11147,
11212,
11215,
11240,
11273,
11287,
11318,
11334,
11370,
11382,
11411,
11449,
11480,
11496,
11508,
11534,
11572,
11603,
11615,
11643,
11676,
11707,
11719,
11731,
11775,
11778,
11803,
11806,
11829,
11849,
11867,
11888,
11908,
11926,
11929,
11955,
11983,
12031,
12077,
12105,
12129,
12161,
12194,
12223,
12254,
12286,
12319,
12344,
12411,
12466,
12490,
12531,
12558,
12584,
12617,
12648,
12688,
12717,
12777,
12802,
12852,
12919,
12922,
12992,
12995,
12998,
13001,
13072,
13144,
13179,
13182,
13202,
13226,
13256,
13259,
13290,
13316,
13342,
13350,
13364,
13377,
13392,
13410,
13444,
13473,
13484,
13507,
13510,
13531,
13560,
13578,
13615,
13618,
13643,
13665,
13691,
13714,
13736,
13756,
13759,
13779,
13826,
13855,
13872,
13902,
13929,
13964,
13987,
14018,
14042,
14099,
14125,
14128,
14195,
14260,
14263,
14297,
14300,
14322,
14352,
14375,
14378,
14431,
14435,
14494,
14542,
14571,
14620,
14622,
14684,
14745,
14772,
14775,
14850,
14872,
14874,
14915,
14981,
15025,
15030,
15064,
15097,
15099,
15175,
15187,
15238,
15240,
15268,
15270,
15321,
15323,
15364,
15378,
15380,
15383,
15452,
15511,
15514,
15567,
15592,
15594,
15609,
15639,
15694,
15710,
15712,
15760,
15767,
15769,
15779,
15781,
15785,
15845,
15892,
15894,
15958,
15960,
15997,
16000,
16037,
16039,
16070,
16086,
16120,
16155,
16174,
16176,
16180,
16240,
16289,
16291,
16355,
16357,
16392,
16395,
16432,
16434,
16467,
16489,
16544,
16546,
16549,
16625,
16698,
16769,
16844,
16860,
16863,
16867,
16923,
16979,
17016,
17046,
17095,
17098,
17172,
17192,
17194,
17215,
17285,
17288,
17355,
17358,
17393,
17447,
17505,
17528,
17575,
17602,
17665,
17684,
17738,
17770,
17825,
17848,
17881,
17891,
17949,
17970,
17973,
18031,
18087,
18101,
18104,
18114,
18158,
18211,
18269,
18327,
18392,
18398,
18444,
18460,
18468,
18488,
18495,
18503,
18523,
18530,
18539,
18559,
18566,
18568,
18571,
18632,
18669,
18672,
18678,
18736,
18745,
18781,
18837,
18839,
18841,
18904,
18906,
18915,
18936,
18999,
19014,
19067,
19125,
19183,
19248,
19254,
19300,
19319,
19322,
19388,
19404,
19407,
19465,
19477,
19479,
19483,
19541,
19597,
19634,
19664,
19699,
19702,
19777,
19796,
19798,
19819,
19889,
19929,
19968,
20007,
20075,
20128,
20189,
20247,
20312,
20319,
20364,
20380,
20388,
20407,
20414,
20422,
20441,
20448,
20457,
20476,
20483,
20485,
20488,
20550,
20587,
20590,
20596,
20654,
20663,
20699,
20756,
20758,
20760,
20764,
20819,
20845,
20871,
20898,
20923,
20948,
20950,
20990,
21028,
21031,
21107,
21138,
21140,
21172,
21234,
21260,
21317,
21329,
21362,
21413,
21434,
21461,
21463,
21467,
21524,
21550,
21576,
21603,
21628,
21666,
21668,
21708,
21746,
21749,
21826,
21856,
21858,
21890,
21952,
21978,
22035,
22047,
22080,
22132,
22153,
22180,
22182,
22204,
22246,
22279,
22314,
22317,
22320,
22346,
22348,
22414,
22473,
22549,
22626,
22701,
22703,
22779,
22852,
22929,
23003,
23005,
23080,
23154,
23213,
23215,
23295,
23372,
23416,
23418,
23491,
23494,
23524,
23554,
23565,
23583,
23612,
23615,
23619,
23681,
23726,
23775,
23811,
23869,
23872,
23951,
23973,
23975,
24020,
24064,
24104,
24136,
24195,
24229,
24268,
24278,
24280,
24319,
24365,
24414,
24473,
24482,
24508,
24510,
24564,
24569,
24607,
24609,
24613,
24677,
24740,
24798,
24857,
24887,
24954,
25020,
25022,
25064,
25067,
25132,
25173,
25203,
25205,
25237,
25295,
25305,
25314,
25337,
25378,
25385,
25423,
25456,
25465,
25513,
25529,
25577,
25597,
25617,
25647,
25699,
25731,
25785,
25831,
25883,
25914,
25947,
26001,
26045,
26065,
26111,
26120,
26132,
26200,
26209,
26221,
26269,
26301,
26330,
26385,
26422,
26448,
26461,
26463,
26506,
26516,
26518,
26522,
26597,
26631,
26681,
26717,
26775,
26778,
26858,
26880,
26882,
26923,
26967,
27000,
27002,
27006,
27076,
27135,
27193,
27252,
27282,
27347,
27349,
27391,
27394,
27460,
27501,
27503,
27535,
27593,
27603,
27612,
27635,
27677,
27691,
27698,
27728,
27763,
27777,
27786,
27834,
27850,
27889,
27919,
27972,
28004,
28060,
28108,
28161,
28193,
28222,
28258,
28316,
28319,
28387,
28457,
28525,
28594,
28632,
28635,
28669,
28734,
28779,
28825,
28834,
28846,
28905,
28914,
28926,
28965,
28994,
29031,
29060,
29073,
29075,
29085,
29087,
29091,
29167,
29203,
29261,
29296,
29365,
29367,
29409,
29412,
29489,
29529,
29546,
29548,
29580,
29638,
29648,
29674,
29737,
29749,
29765,
29809,
29846,
29867,
29877,
29879,
29912,
29967,
29999,
30001,
30039,
30048,
30071,
30119,
30127,
30159,
30219,
30248,
30278,
30327,
30358,
30430,
30480,
30497,
30499,
30503,
30535,
30575,
30610,
30638,
30640,
30703,
30765,
30826,
30873,
30876,
30957,
30975,
30977,
31008,
31034,
31056,
31088,
31154,
31210,
31243,
31262,
31311,
31326,
31334,
31362,
31425,
31439,
31456,
31464,
31466,
31501,
31522,
31524,
31602,
31614,
31616,
31661,
31721,
31723,
31770,
31772,
31796,
31798,
31802,
31862,
31874,
31901,
31903,
31965,
32027,
32091,
32115,
32118,
32167,
32169,
32226,
32264,
32309,
32340,
32362,
32381,
32403,
32425,
32446,
32464,
32482,
32491,
32542,
32580,
32598,
32668,
32730,
32777,
32813,
32858,
32910,
32978,
33038,
33078,
33117,
33158,
33181,
33222,
33225,
33291,
33360,
33425,
33451,
33454,
33512,
33515,
33577,
33637,
33660,
33718,
33758,
33761,
33789,
33831,
33875,
33884,
33902,
33904,
33945,
34006,
34029,
34049,
34058,
34076,
34078,
34081,
34140,
34199,
34208,
34211,
34235,
34244,
34291,
34321,
34364,
34366,
34368,
34436,
34451,
34464,
34531,
34534,
34597,
34656,
34719,
34775,
34826,
34881,
34883,
34948,
35015,
35085,
35143,
35210,
35277,
35320,
35323,
35389,
35418,
35456,
35482,
35484,
35511,
35541,
35572,
35575,
35650,
35672,
35674,
35720,
35763,
35803,
35856,
35897,
35939,
35941,
35975,
36039,
36060,
36062,
36121,
36149,
36184,
36220,
36280,
36283,
36353,
36372,
36375,
36422,
36447,
36449,
36483,
36548,
36569,
36571,
36580,
36640,
36668,
36703,
36739,
36799,
36802,
36870,
36915,
36918,
36970,
37009,
37042,
37081,
37106,
37108,
37112,
37171,
37206,
37256,
37258,
37322,
37384,
37445,
37509,
37556,
37559,
37634,
37636,
37674,
37705,
37736,
37762,
37784,
37806,
37828,
37859,
37891,
37900,
37927,
37935,
37967,
38000,
38012,
38029,
38039,
38048,
38105,
38156,
38174,
38244,
38275,
38338,
38350,
38376,
38447,
38470,
38498,
38522,
38557,
38559,
38610,
38625,
38646,
38678,
38722,
38775,
38808,
38842,
38873,
38921,
38927,
38954,
38968,
38975,
39006,
39037,
39085,
39091,
39118,
39132,
39139,
39148,
39212,
39272,
39324,
39327,
39356,
39401,
39421,
39423,
39490,
39526,
39546,
39592,
39603,
39632,
39678,
39712,
39732,
39734,
39737,
39801,
39819,
39822,
39875,
39878,
39937,
39984,
39987,
40049,
40070,
40115,
40165,
40199,
40225,
40246,
40248,
40251,
40311,
40370,
40429,
40489,
40520,
40523,
40571,
40624,
40677,
40698,
40700,
40732,
40785,
40829,
40863,
40897,
40918,
40920,
40933,
40935,
40977,
41020,
41049,
41087,
41121,
41141,
41143,
41146,
41211,
41282,
41301,
41304,
41331,
41359,
41385,
41432,
41486,
41518,
41539,
41547,
41563,
41605,
41620,
41637,
41653,
41674,
41695,
41716,
41737,
41752,
41754,
41789,
41832,
41860,
41903,
41940,
41972,
41997,
42026,
42029,
42073,
42105,
42130,
42133,
42137,
42189,
42215,
42217,
42278,
42341,
42405,
42462,
42523,
42561,
42563,
42615,
42618,
42684,
42686,
42726,
42760,
42811,
42864,
42884,
42926,
42964,
42992,
43059,
43076,
43096,
43121,
43150,
43190,
43206,
43208,
43218,
43220,
43224,
43283,
43342,
43351,
43353,
43414,
43476,
43537,
43598,
43655,
43678,
43680,
43732,
43735,
43772,
43774,
43836,
43848,
43850,
43854,
43911,
43963,
43966,
44032,
44034,
44060,
44090,
44111,
44137,
44150,
44157,
44217,
44258,
44270,
44278,
44337,
44390,
44407,
44415,
44417,
44468,
44471,
44537,
44606,
44675,
44678,
44736,
44777,
44831,
44860,
44899,
44932,
44935,
44982,
45000,
45003,
45035,
45079,
45090,
45127,
45132,
45166,
45200,
45244,
45279,
45284,
45318,
45320,
45322,
45324,
45380,
45397,
45399,
45403,
45453,
45505,
45507,
45571,
45632,
45692,
45756,
45820,
45881,
45893,
45896,
45956,
45958,
45989,
46019,
46050,
46080,
46106,
46132,
46153,
46166,
46179,
46190,
46197,
46225,
46290,
46328,
46330,
46359,
46379,
46426,
46466,
46468,
46519,
46522,
46591,
46660,
46722,
46754,
46756,
46824,
46891,
46958,
46972,
46975,
47033,
47092,
47124,
47183,
47185,
47220,
47225,
47283,
47324,
47356,
47374,
47384,
47431,
47443,
47454,
47485,
47493,
47502,
47534,
47536,
47570,
47582,
47611,
47616,
47626,
47628,
47661,
47691,
47694,
47726,
47731,
47764,
47794,
47822,
47845,
47854,
47880,
47890,
47923,
47953,
47956,
47987,
48009,
48011,
48013,
48052,
48085,
48133,
48144,
48175,
48224,
48234,
48241,
48243,
48245,
48262,
48278,
48311,
48367,
48369,
48372,
48418,
48420,
48486,
48545,
48611,
48683,
48719,
48722,
48785,
48787,
48813,
48840,
48853,
48911,
48932,
48942,
49005,
49060,
49118,
49131,
49162,
49208,
49232,
49234,
49236,
49238,
49241,
49287,
49290,
49353,
49355,
49381,
49439,
49461,
49471,
49506,
49530,
49532,
49534,
49537,
49580,
49583,
49650,
49652,
49673,
49710,
49737,
49789,
49852,
49865,
49875,
49934,
49991,
50013,
50015,
50017,
50021,
50076,
50128,
50130,
50172,
50175,
50240,
50242,
50268,
50325,
50360,
50378,
50394,
50426,
50446,
50462,
50488,
50523,
50554,
50595,
50622,
50658,
50686,
50721,
50731,
50733,
50758,
50788,
50814,
50817,
50821,
50879,
50915,
50962,
51010,
51012,
51073,
51096,
51099,
51177,
51199,
51201,
51247,
51290,
51329,
51336,
51360,
51408,
51452,
51467,
51476,
51517,
51552,
51578,
51580,
51582,
51617,
51619,
51623,
51675,
51732,
51787,
51807,
51809,
51872,
51935,
51937,
51982,
51985,
52062,
52098,
52100,
52126,
52161,
52194,
52203,
52234,
52279,
52286,
52307,
52316,
52361,
52373,
52386,
52406,
52436,
52475,
52499,
52539,
52598,
52662,
52724,
52767,
52820,
52854,
52887,
52907,
52953,
52962,
52974,
53031,
53043,
53064,
53095,
53116,
53167,
53219,
53275,
53289,
53296,
53310,
53323,
53325,
53329,
53376,
53428,
53458,
53460,
53523,
53586,
53648,
53710,
53728,
53730,
53780,
53783,
53859,
53870,
53872,
53893,
53933,
53984,
54041,
54082,
54096,
54117,
54124,
54126,
54128,
54184,
54198,
54200,
54204,
54268,
54319,
54321,
54381,
54444,
54500,
54562,
54624,
54638,
54640,
54698,
54761,
54820,
54882,
54908,
54910,
54979,
55028,
55030,
55099,
55160,
55163,
55226,
55228,
55242,
55254,
55294,
55320,
55351,
55377,
55404,
55435,
55456,
55509,
55529,
55544,
55570,
55639,
55690,
55728,
55786,
55799,
55826,
55883,
55918,
55929,
55939,
55941,
55943,
55999,
56008,
56016,
56077,
56128,
56186,
56218,
56220,
56276,
56319,
56381,
56396,
56428,
56479,
56537,
56599,
56639,
56679,
56717,
56750,
56764,
56766,
56768,
56824,
56838,
56883,
56895,
56924,
56962,
56964,
56966,
57018,
57069,
57074,
57089,
57147,
57178,
57192,
57213,
57259,
57266,
57268,
57270,
57287,
57343,
57396,
57428,
57482,
57495,
57525,
57546,
57581,
57602,
57604,
57627,
57653,
57656,
57686,
57725,
57728,
57754,
57789,
57820,
57847,
57875,
57882,
57903,
57926,
57956,
57963,
57972,
57979,
57981,
57992,
57994,
57998,
58069,
58121,
58168,
58170,
58212,
58215,
58285,
58309,
58311,
58338,
58359,
58376,
58417,
58447,
58486,
58502,
58504,
58551,
58564,
58580,
58631,
58651,
58702,
58705,
58761,
58812,
58832,
58835,
58877,
58925,
58981,
58997,
59012,
59017,
59053,
59063,
59065,
59069,
59126,
59178,
59226,
59228,
59295,
59365,
59420,
59423,
59489,
59526,
59528,
59552,
59559,
59620,
59633,
59642,
59650,
59694,
59735,
59779,
59823,
59865,
59919,
59971,
60027,
60087,
60139,
60181,
60183,
60226,
60237,
60239,
60243,
60301,
60353,
60401,
60403,
60465,
60468,
60535,
60573,
60575,
60599,
60606,
60667,
60680,
60689,
60697,
60741,
60782,
60826,
60870,
60912,
60966,
61018,
61074,
61134,
61186,
61228,
61274,
61306,
61344,
61346,
61389,
61400,
61402,
61406,
61465,
61521,
61523,
61579,
61641,
61705,
61767,
61770,
61829,
61831,
61868,
61899,
61925,
61947,
61968,
61979,
61988,
62011,
62057,
62065,
62117,
62137,
62184,
62187,
62255,
62324,
62392,
62435,
62438,
62489,
62557,
62569,
62595,
62633,
62652,
62680,
62682,
62733,
62763,
62819,
62840,
62875,
62907,
62966,
63019,
63069,
63117,
63162,
63186,
63240,
63261,
63313,
63334,
63355,
63407,
63409,
63413,
63463,
63505,
63507,
63570,
63629,
63668,
63671,
63729,
63731,
63776,
63813,
63854,
63909,
63917,
63919,
63956,
63977,
64023,
64058,
64060,
64064,
64120,
64161,
64163,
64226,
64282,
64285,
64337,
64339,
64370,
64379,
64420,
64437,
64449,
64483,
64506,
64535,
64567,
64598,
64640,
64675,
64712,
64747,
64785,
64811,
64852,
64865,
64873,
64885,
64941,
64976,
64999,
65014,
65040,
65065,
65108,
65121,
65129,
65139,
65141,
65196,
65221,
65228,
65231,
65285,
65297,
65300,
65348,
65358,
65403,
65425,
65443,
65446,
65501,
65537,
65540,
65583,
65625,
65679,
65689,
65703,
65710,
65735,
65788,
65830,
65854,
65900,
65918,
65945,
65971,
66000,
66030,
66037,
66039,
66078,
66085,
66110,
66158,
66176,
66204,
66231,
66260,
66293,
66300,
66302,
66343,
66350,
66366,
66415,
66448,
66474,
66487,
66515,
66536,
66538,
66545,
66572,
66618,
66651,
66671,
66684,
66715,
66740,
66767,
66787,
66789,
66810,
66812,
66819,
66828,
66858,
66897,
66930,
66937,
66939,
66946,
66955,
66984,
67031,
67065,
67072,
67074,
67076,
67091,
67093,
67097,
67147,
67203,
67263,
67306,
67363,
67365,
67424,
67482,
67543,
67605,
67666,
67729,
67791,
67793,
67850,
67911,
67920,
67923,
67986,
68025,
68042,
68044,
68098,
68139,
68169,
68193,
68202,
68209,
68212,
68265,
68322,
68378,
68392,
68395,
68459,
68469,
68485,
68524,
68569,
68598,
68657,
68718,
68754,
68798,
68849,
68885,
68925,
68971,
68981,
69034,
69045,
69068,
69122,
69128,
69139,
69141,
69180,
69217,
69241,
69283,
69308,
69319,
69321,
69383,
69406,
69458,
69487,
69502,
69513,
69515,
69556,
69558,
69581,
69639,
69654,
69660,
69672,
69684,
69686,
69690,
69754,
69760,
69812,
69815,
69885,
69887,
69890,
69948,
69999,
70002,
70052,
70098,
70141,
70177,
70179,
70231,
70278,
70322,
70359,
70361,
70363,
70367,
70428,
70442,
70494,
70496,
70559,
70621,
70681,
70745,
70800,
70863,
70904,
70906,
70970,
71033,
71095,
71158,
71217,
71280,
71343,
71404,
71438,
71440,
71482,
71485,
71558,
71560,
71583,
71592,
71620,
71682,
71744,
71766,
71788,
71803,
71814,
71843,
71909,
71932,
71944,
71946,
72000,
72048,
72095,
72143,
72164,
72166,
72195,
72258,
72318,
72335,
72365,
72373,
72384,
72413,
72480,
72504,
72527,
72529,
72583,
72632,
72680,
72728,
72750,
72752,
72762,
72780,
72806,
72849,
72885,
72887,
72899,
72901,
72905,
72968,
73020,
73022,
73083,
73136,
73138,
73180,
73183,
73251,
73253,
73262,
73265,
73332,
73341,
73344,
73408,
73448,
73457,
73469,
73472,
73542,
73610,
73677,
73742,
73790,
73793,
73837,
73847,
73849,
73914,
73916,
73982,
73984,
74052,
74056,
74118,
74173,
74175,
74217,
74220,
74271,
74273,
74327,
74362,
74392,
74416,
74425,
74428,
74493,
74557,
74626,
74636,
74639,
74700,
74710,
74726,
74765,
74810,
74839,
74892,
74939,
74986,
75053,
75093,
75139,
75149,
75202,
75211,
75222,
75260,
75283,
75340,
75369,
75384,
75395,
75397,
75406,
75412,
75424,
75436,
75438,
75442,
75502,
75512,
75567,
75569,
75611,
75614,
75672,
75674,
75728,
75756,
75780,
75789,
75848,
75872,
75919,
75938,
75976,
76016,
76081,
76108,
76118,
76156,
76168,
76170,
76174,
76238,
76293,
76295,
76356,
76417,
76476,
76534,
76597,
76660,
76722,
76782,
76844,
76875,
76877,
76919,
76922,
76985,
76987,
77041,
77086,
77133,
77163,
77189,
77213,
77230,
77241,
77250,
77313,
77363,
77415,
77425,
77441,
77450,
77490,
77531,
77543,
77553,
77594,
77633,
77678,
77707,
77764,
77779,
77827,
77861,
77885,
77939,
77948,
77964,
78013,
78048,
78073,
78128,
78130,
78151,
78204,
78234,
78254,
78300,
78310,
78363,
78372,
78379,
78417,
78432,
78455,
78491,
78520,
78527,
78529,
78564,
78566,
78578,
78590,
78592,
78596,
78652,
78663,
78718,
78720,
78762,
78765,
78827,
78829,
78883,
78913,
78939,
78950,
78959,
79022,
79063,
79075,
79085,
79115,
79163,
79207,
79228,
79288,
79312,
79321,
79333,
79372,
79374,
79406,
79416,
79418,
79457,
79515,
79518,
79593,
79650,
79653,
79681,
79685,
79736,
79809,
79825,
79827,
79859,
79861,
79926,
79929,
79964,
79966,
79982,
80029,
80041,
80100,
80145,
80155,
80157,
80183,
80185,
80189,
80245,
80279,
80282,
80318,
80320,
80351,
80353,
80357,
80420,
80475,
80515,
80517,
80559,
80562,
80610,
80651,
80653,
80684,
80702,
80714,
80742,
80751,
80754,
80825,
80882,
80885,
80933,
80936,
81001,
81072,
81143,
81197,
81265,
81267,
81331,
81401,
81467,
81539,
81604,
81606,
81677,
81748,
81812,
81858,
81861,
81907,
81918,
81934,
81964,
81996,
81999,
82068,
82132,
82202,
82216,
82218,
82282,
82348,
82415,
82485,
82555,
82585,
82588,
82654,
82685,
82717,
82740,
82795,
82810,
82825,
82827,
82847,
82871,
82916,
82931,
82959,
82978,
83011,
83043,
83090,
83126,
83167,
83219,
83270,
83293,
83310,
83325,
83340,
83342,
83413,
83446,
83455,
83472,
83500,
83563,
83599,
83608,
83620,
83659,
83668,
83680,
83730,
83755,
83778,
83801,
83856,
83871,
83889,
83891,
83950,
83963,
83978,
83990,
83992,
84052,
84065,
84094,
84109,
84121,
84123,
84160,
84169,
84187,
84194,
84230,
84239,
84261,
84290,
84293,
84350,
84409,
84462,
84523,
84552,
84607,
84667,
84724,
84785,
84842,
84856,
84859,
84899,
84923,
84970,
84973,
85028,
85073,
85114,
85165,
85213,
85252,
85255,
85288,
85323,
85337,
85349,
85372,
85414,
85416,
85425,
85447,
85491,
85500,
85514,
85555,
85564,
85583,
85607,
85639,
85675,
85684,
85703,
85713,
85727,
85761,
85770,
85806,
85823,
85860,
85873,
85919,
85926,
85951,
85964,
85993,
86000,
86028,
86040,
86069,
86079,
86117,
86127,
86140,
86152,
86154,
86221,
86223,
86277,
86286,
86321,
86360,
86367,
86397,
86429,
86450,
86459,
86462,
86525,
86573,
86576,
86604,
86614,
86632,
86683,
86734,
86802,
86832,
86853,
86888,
86940,
86961,
86982,
86984,
87040,
87042,
87082,
87093,
87116,
87165,
87177,
87179,
87241,
87280,
87340,
87384,
87438,
87506,
87534,
87571,
87591,
87637,
87646,
87658,
87727,
87746,
87756,
87758,
87762,
87820,
87875,
87877,
87919,
87922,
87971,
87973,
88004,
88013,
88042,
88084,
88133,
88167,
88215,
88244,
88261,
88264,
88320,
88378,
88428,
88431,
88478,
88504,
88538,
88565,
88580
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 88580,
"ccnet_original_nlines": 2889,
"rps_doc_curly_bracket": 0.005147890187799931,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.14056357741355896,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.030725790187716484,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4184243977069855,
"rps_doc_frac_unique_words": 0.22551077604293823,
"rps_doc_mean_word_length": 7.102484703063965,
"rps_doc_num_sentences": 615,
"rps_doc_symbol_to_word_ratio": 0.0017715799622237682,
"rps_doc_unigram_entropy": 6.477210521697998,
"rps_doc_word_count": 9055,
"rps_doc_frac_chars_dupe_10grams": 0.12230809032917023,
"rps_doc_frac_chars_dupe_5grams": 0.2309175431728363,
"rps_doc_frac_chars_dupe_6grams": 0.20299161970615387,
"rps_doc_frac_chars_dupe_7grams": 0.17676052451133728,
"rps_doc_frac_chars_dupe_8grams": 0.15796184539794922,
"rps_doc_frac_chars_dupe_9grams": 0.14401443302631378,
"rps_doc_frac_chars_top_2gram": 0.010635489597916603,
"rps_doc_frac_chars_top_3gram": 0.003731749951839447,
"rps_doc_frac_chars_top_4gram": 0.004478100221604109,
"rps_doc_books_importance": -8489.076171875,
"rps_doc_books_importance_length_correction": -8489.076171875,
"rps_doc_openwebtext_importance": -5847.5458984375,
"rps_doc_openwebtext_importance_length_correction": -5847.5458984375,
"rps_doc_wikipedia_importance": -3814.902587890625,
"rps_doc_wikipedia_importance_length_correction": -3814.902587890625
},
"fasttext": {
"dclm": 0.9784687757492065,
"english": 0.5483153462409973,
"fineweb_edu_approx": 2.6587576866149902,
"eai_general_math": 0.4130433201789856,
"eai_open_web_math": 0.19184821844100952,
"eai_web_code": 0.7938557267189026
}
}
|
{
"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": "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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-639,011,176,710,136,000
|
Pattu Pattu - 1 year ago 87
Python Question
Sort a nested dictionary in Python
I have the following dictionary.
var = a = {
'Black': { 'grams': 1906, 'price': 2.05},
'Blue': { 'grams': 9526, 'price': 22.88},
'Gold': { 'grams': 194, 'price': 8.24},
'Magenta': { 'grams': 6035, 'price': 56.69},
'Maroon': { 'grams': 922, 'price': 18.76},
'Mint green': { 'grams': 9961, 'price': 63.89},
'Orchid': { 'grams': 4970, 'price': 10.78},
'Tan': { 'grams': 6738, 'price': 50.54},
'Yellow': { 'grams': 6045, 'price': 54.19}
}
How can I sort it based on the
price
. So the resulting dictionary will look like below.
result = {
'Black': { 'grams': 1906, 'price': 2.05},
'Gold': { 'grams': 194, 'price': 8.24},
'Orchid': { 'grams': 4970, 'price': 10.78},
'Maroon': { 'grams': 922, 'price': 18.76},
'Blue': { 'grams': 9526, 'price': 22.88},
'Tan': { 'grams': 6738, 'price': 50.54},
'Magenta': { 'grams': 6035, 'price': 56.69},
'Mint green': { 'grams': 9961, 'price': 63.89},
}
Answer Source
Construct an OrderedDict from a list of ordered item tuples:
from collections import OrderedDict
ordered = OrderedDict(sorted(a.items(), key=lambda i: i[1]['price']))
(.items() assumes Python 3, in Python 2 iteritems should do the same.)
|
{
"url": "https://codedump.io/share/axasC5n1k4zR/1/sort-a-nested-dictionary-in-python",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2017-47",
"warc_metadata": {
"Content-Length": "41501",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:37EUFAEOUQ4QTQN272JCT4ZR3BUCTQFY",
"WARC-Concurrent-To": "<urn:uuid:c9acfa65-785d-4603-8d0d-43eb06a4b140>",
"WARC-Date": "2017-11-24T15:29:49Z",
"WARC-IP-Address": "50.112.74.85",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:3TXBCQ5FKJEUMUP3ES57QOB3A3EZBHHI",
"WARC-Record-ID": "<urn:uuid:3856f41a-962f-4e13-ac60-334100709a2c>",
"WARC-Target-URI": "https://codedump.io/share/axasC5n1k4zR/1/sort-a-nested-dictionary-in-python",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c425fb02-6c76-4a8d-8924-d183a72ec7d7>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-169-239-161.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-47\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for November 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,
28,
44,
45,
80,
81,
114,
115,
127,
169,
211,
251,
296,
339,
387,
431,
472,
515,
517,
518,
519,
550,
556,
608,
609,
620,
662,
702,
746,
789,
831,
872,
917,
965,
967,
968,
982,
983,
1044,
1045,
1081,
1082,
1152,
1153
],
"line_end_idx": [
28,
44,
45,
80,
81,
114,
115,
127,
169,
211,
251,
296,
339,
387,
431,
472,
515,
517,
518,
519,
550,
556,
608,
609,
620,
662,
702,
746,
789,
831,
872,
917,
965,
967,
968,
982,
983,
1044,
1045,
1081,
1082,
1152,
1153,
1223
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1223,
"ccnet_original_nlines": 43,
"rps_doc_curly_bracket": 0.031071139499545097,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.07407406717538834,
"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.6666666865348816,
"rps_doc_frac_unique_words": 0.5220125913619995,
"rps_doc_mean_word_length": 4.742138385772705,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.036550045013428,
"rps_doc_word_count": 159,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.48806366324424744,
"rps_doc_frac_chars_dupe_6grams": 0.07161804288625717,
"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.021220160648226738,
"rps_doc_frac_chars_top_3gram": 0.037135280668735504,
"rps_doc_frac_chars_top_4gram": 0.050397880375385284,
"rps_doc_books_importance": -165.00132751464844,
"rps_doc_books_importance_length_correction": -165.00132751464844,
"rps_doc_openwebtext_importance": -102.03292083740234,
"rps_doc_openwebtext_importance_length_correction": -102.03287506103516,
"rps_doc_wikipedia_importance": -83.16192626953125,
"rps_doc_wikipedia_importance_length_correction": -83.16192626953125
},
"fasttext": {
"dclm": 0.9998868703842163,
"english": 0.2967800199985504,
"fineweb_edu_approx": 2.904984712600708,
"eai_general_math": 0.2268829345703125,
"eai_open_web_math": 0.0822608470916748,
"eai_web_code": 0.5178727507591248
}
}
|
{
"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": "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": "-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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
714,421,962,837,814,400
|
Clicky
Imessage Video Limit
Imessage Video Limit
The maximum duration of a video you can share over iMessage is currently roughly 4 minutes and 20 seconds on iOS 14.4 [1], which is an improvement over previous versions. This is due to the file size limit of 100MB for iMessages. If the video is larger than this, it will not be sent.
For iPhones, the Mail Drop feature allows users to send photos and small video files up to 20 megabytes. Any larger video files will be sent through the email app instead, which has a 100-megabyte limit on attachments. To transfer huge files, users can use Apple’s AirDrop service or use a cloud service like Google Drive or iCloud. The Messages app also has limits on what content it can send, as it caps messages content at 20 megabytes.
If you want to send large video files, the best way is to use cloud storage. Upload the file to your preferred storage platform like Google Drive, Dropbox, or iCloud and then share it with someone else. They can then download the file from your cloud storage account. Another option is to use a third-party platform like Google Drive and mail drop. This allows you to adjust file permissions so that someone else can access and download the file easily. Alternatively, you can email the file but depending on your mail provider there may be a limit on how large of a file size you can send. Make sure you have enough storage space for long videos or multiple files when using this method.
If you’re interested in Ipad Drawing Stand then you can check that article.
Imessage Video Limit allows users to share large videos with friends and family. You can send a large video file or send long videos without having to worry about the size limit. You can even upload files directly from your computer or phone, which makes it much easier to store large videos. Additionally, you can use cloud service to generate a sharing link for others to access the video. Cloud storage services are also a popular way of sending large files, and this is available on both iPhone and Android devices.
The main advantage of using cloud storage services is that it allows you to compress video files before sending them, thereby reducing the file size and making them easier to send. Services like iCloud, Telegram, Viber, Whatsapp, and Imessage are all popular services for quick sharing of large video files. Imessage is a particularly good service for sending large videos as it provides hassle free mediums for doing so.
You can simply attach video files to your messages and send them off to your contacts. Imessage compresses the video into a suitable filesize that is more manageable for sending through its internet messaging app. Alternatively, you can use the share sheet to select an app like mail and send your videos via email if you need a larger file size. To attach videos, just follow our previous instructions for attaching files in messages and select the videos from your camera roll.
AspectDetails
iMessageApple’s proprietary messaging app
Video limit100MB (megabytes)
Resolution limit720p (1280×720 pixels)
Frame rate limit30 frames per second
Length limitVaries based on video quality and storage availability
iMessage video limit
If you’re using Apple’s Messages app, the iMessage video limit is actually pretty generous. You can send videos up to 100MB with iMessage. If you are sending really large files, then email clients like Gmail offer a way to attach your large file by taking advantage of a paid cloud service. Google Drive offers a free version that you can use to compress really large files and then attach them to your new email message. With Google Drive, you can add files from any folder on your computer or mobile device, and then add recipient addresses and click send.
This is a good way to share many videos at once, and it is also a great way to back up your iPhone files. However, the iMessage video limit means that you can only send short videos using the app. You can use other methods such as Apple’s Airdrop function, Microsoft OneDrive, and Google Drive to send larger video files. If you want to share large video files or many videos at once, then using a computer is a better option than using your phone. To do this, you can use Microsoft OneDrive or Google Drive to upload the files and then click send. You can also use Mail Drop if you’re sending from an iPhone. The main advantage of these methods is that they are faster and more reliable than sending from an Android device. With cloud storage apps such as Google Drive or Microsoft OneDrive, you can easily upload multiple videos and share them with anyone who has access to the same account.
However, when it comes to sending your video using iMessage, the files are limited to 4 minutes and 20 seconds in length. While sharing videos using AirDrop does not have any size or length cap, users tests conducted by Apple showed that large videos tend to lose video quality. If you want to send bigger files with better quality, the approximate maximum length is 4K and 4 minutes long – any longer than this and you may experience poor quality video. To avoid this, you can use an extension such as MPEG Streamclip to reduce the file size and length of your videos.
The new iOS 16 release has increased the maximum video length for messages from 20 seconds to roughly around 4 minutes. Earlier iOS versions had a maximum video length of just 20 seconds. With the recent iOS version, the maximum video length is now around 4 minutes. Apple doesn’t officially state the maximum duration of videos on iMessage, but through trial methods and a few experiments, it seems that the maximum length is roughly 4 minutes long. To find out official information about this feature you can check Apple’s website or contact their customer service representatives. iMessage videos have a much longer maximum length than other versions of media such as GIFs and images which have a 30 second limit, and audio files which have a 1 minute limit.
The limit for sending video via iMessage is 20 megabytes (MB). This means that most videos can be sent via iMessage, however if the video you want to share is bigger than 20 MB, it will need to be compressed in order to lower its quality. If you try to send a file bigger than 25 MB via email it will not go through. To share bigger videos, you have the option of moving them from your device onto another device such as iCloud or Dropbox and then sending them to someone else. It’s important to keep in mind that if the file size is too large, it will take a long time for someone else to receive the file. If your file is more than 100 MB then it could take several minutes or even hours depending on their internet connection speed.
If you’re interested in Ios 9 Emojis Cydia, take a look at my other article
IMessage is a user video software that allows you to send videos up to 128 MB in size. This means that the size of your video file does not go beyond this limit, and you will be able to send it quickly and without any extra charge on many phone contracts.
What is the video limit for sending via iMessage?
iMessage allows you to send videos up to 100 MB in size. However, keep in mind that longer videos will have larger file sizes, so the actual duration of the video you can send may vary depending on its resolution and other factors.
Can I send longer videos via iMessage?
If your video is too long to send via iMessage, you can try compressing it before sending. Alternatively, you can use a cloud storage service like iCloud or Dropbox to share the video with your contacts.
Leave a Comment
Your email address will not be published. Required fields are marked *
Scroll to Top
Skip to content
|
{
"url": "https://howtoitech.com/imessage-video-limit/",
"source_domain": "howtoitech.com",
"snapshot_id": "CC-MAIN-2024-26",
"warc_metadata": {
"Content-Length": "139546",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BTFSHMLSI5ICDIYU4NQYURAAWUJM2TRW",
"WARC-Concurrent-To": "<urn:uuid:7441ae8e-a50b-4fc5-a79d-ccf20553ada5>",
"WARC-Date": "2024-06-22T11:57:22Z",
"WARC-IP-Address": "162.159.136.54",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:OCQMHYR6THHKUTU57HILQX5XEQKKZLE3",
"WARC-Record-ID": "<urn:uuid:4db290bf-42a1-4c0f-8887-a18f2ab2deec>",
"WARC-Target-URI": "https://howtoitech.com/imessage-video-limit/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:47b99536-a9ae-4f18-ab3f-e3d24b0b82b0>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-37\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,
7,
8,
29,
30,
51,
52,
337,
338,
339,
779,
780,
1469,
1470,
1546,
1547,
2067,
2068,
2490,
2491,
2971,
2972,
2986,
3028,
3057,
3096,
3133,
3200,
3221,
3222,
3781,
3782,
4676,
4677,
5247,
5248,
6010,
6011,
6747,
6748,
6824,
6825,
7081,
7082,
7132,
7133,
7365,
7366,
7405,
7406,
7610,
7611,
7627,
7628,
7699,
7700,
7714
],
"line_end_idx": [
7,
8,
29,
30,
51,
52,
337,
338,
339,
779,
780,
1469,
1470,
1546,
1547,
2067,
2068,
2490,
2491,
2971,
2972,
2986,
3028,
3057,
3096,
3133,
3200,
3221,
3222,
3781,
3782,
4676,
4677,
5247,
5248,
6010,
6011,
6747,
6748,
6824,
6825,
7081,
7082,
7132,
7133,
7365,
7366,
7405,
7406,
7610,
7611,
7627,
7628,
7699,
7700,
7714,
7729
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7729,
"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.4381578862667084,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007236840203404427,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1092105284333229,
"rps_doc_frac_unique_words": 0.2785087823867798,
"rps_doc_mean_word_length": 4.538742542266846,
"rps_doc_num_sentences": 67,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.215385913848877,
"rps_doc_word_count": 1368,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01932677999138832,
"rps_doc_frac_chars_dupe_6grams": 0.008052829653024673,
"rps_doc_frac_chars_dupe_7grams": 0.008052829653024673,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.021259460598230362,
"rps_doc_frac_chars_top_3gram": 0.01014656014740467,
"rps_doc_frac_chars_top_4gram": 0.0053148698061704636,
"rps_doc_books_importance": -838.61474609375,
"rps_doc_books_importance_length_correction": -838.61474609375,
"rps_doc_openwebtext_importance": -373.9356384277344,
"rps_doc_openwebtext_importance_length_correction": -373.9356384277344,
"rps_doc_wikipedia_importance": -373.1973571777344,
"rps_doc_wikipedia_importance_length_correction": -373.1973571777344
},
"fasttext": {
"dclm": 0.21788817644119263,
"english": 0.9190383553504944,
"fineweb_edu_approx": 1.3620253801345825,
"eai_general_math": 0.03989225998520851,
"eai_open_web_math": 0.08091943711042404,
"eai_web_code": 0.0722993016242981
}
}
|
{
"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.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": "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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,817,898,641,761,706,500
|
Koodo Community
Question
iPhone 4 from TELUS 3G getting extremely slow and sometimes no data connection
• 1 September 2013
• 6 replies
• 41 views
I moved from TELUS over to Koodo a year ago, using the iPhone I had with TELUS. Over the past few months I've noticed that the 3G data has been getting incredibly slow and a lot of times won't even connect. Went to several kiosks and they were of no help unfortunately. Has anyone experienced the same issue? Searching for similar topics reveals that removing the APN proxy seems to work, but I'm not sure how to do it on the iPhone. Thanks!
6 replies
Userlevel 7
Badge +4
You can try clearing the cache and cookies, and resetting the network settings.
Userlevel 2
Hey John, can you let us know if this resolved the issue? Thanks.
________________________
If you see a good answer, give it a star.
I don't think resetting network settings is going to help as according to the Apple support page, it just resets saved networks, wifi passwords, and vpn settings, ... not really related to my issue. As for clearing the cache and cookies, I tried that, but the issue persists. I also did a software update, as suggested by a Koodo kiosk employee, but that didn't help either. I will try what Tyler_C suggested on this thread and see if syncing the phone with iTunes to update the carrier settings resolves the issue (although I believe I did that before).
Looks like my carrier settings are up to date. Does anyone have any other suggestions? Thanks!
Same here 3g sloooow since couple weeks..tried reseting network settings, power off for a couple minutes nothing worked so far 😞 Iphone4s with Koodo Prepaid
I am experiencing the same on iphone 5c and 5s. Only in indoors when i have 3 bars on 3G its just painfully slow or just doesnt work. If i enable airplane mode and off again, it fixes it for a few minutes then same thing. Im getting really annoyed.
Reply
|
{
"url": "https://community.koodomobile.com/iphone-81489/iphone-4-from-telus-3g-getting-extremely-slow-and-sometimes-no-data-connection-5604653",
"source_domain": "community.koodomobile.com",
"snapshot_id": "crawl=CC-MAIN-2020-24",
"warc_metadata": {
"Content-Length": "113854",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LWQLIOW5JEJO6GSE3QKCIGMNFZYHEV5L",
"WARC-Concurrent-To": "<urn:uuid:6d550ec1-9bf8-4a37-b20a-24c9e8b3c07f>",
"WARC-Date": "2020-05-29T17:03:14Z",
"WARC-IP-Address": "99.84.191.101",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UFYWBDWCM5OM5EG3X6FL3PNNDUIO6IO2",
"WARC-Record-ID": "<urn:uuid:8814ab66-0985-4a09-9f75-a181c9fed5cc>",
"WARC-Target-URI": "https://community.koodomobile.com/iphone-81489/iphone-4-from-telus-3g-getting-extremely-slow-and-sometimes-no-data-connection-5604653",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e297831c-4b4a-4794-bd24-97e7d73cfa18>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-5.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,
16,
25,
26,
105,
106,
127,
141,
154,
155,
597,
598,
608,
609,
621,
630,
710,
722,
788,
789,
814,
856,
857,
1412,
1507,
1664,
1913,
1914
],
"line_end_idx": [
16,
25,
26,
105,
106,
127,
141,
154,
155,
597,
598,
608,
609,
621,
630,
710,
722,
788,
789,
814,
856,
857,
1412,
1507,
1664,
1913,
1914,
1919
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1919,
"ccnet_original_nlines": 27,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4314720928668976,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04568528011441231,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15228426456451416,
"rps_doc_frac_unique_words": 0.5789473652839661,
"rps_doc_mean_word_length": 4.350877285003662,
"rps_doc_num_sentences": 24,
"rps_doc_symbol_to_word_ratio": 0.0025380700826644897,
"rps_doc_unigram_entropy": 4.989253044128418,
"rps_doc_word_count": 342,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.03494624048471451,
"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.030241940170526505,
"rps_doc_frac_chars_top_3gram": 0.021505380049347878,
"rps_doc_frac_chars_top_4gram": 0.025537630543112755,
"rps_doc_books_importance": -209.17750549316406,
"rps_doc_books_importance_length_correction": -209.177490234375,
"rps_doc_openwebtext_importance": -110.08692169189453,
"rps_doc_openwebtext_importance_length_correction": -110.08692169189453,
"rps_doc_wikipedia_importance": -75.9909439086914,
"rps_doc_wikipedia_importance_length_correction": -75.9909439086914
},
"fasttext": {
"dclm": 0.021153630688786507,
"english": 0.968296229839325,
"fineweb_edu_approx": 0.8748398423194885,
"eai_general_math": 0.38989555835723877,
"eai_open_web_math": 0.3080507516860962,
"eai_web_code": 0.1452273726463318
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.68",
"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": "-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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,970,180,712,734,984,000
|
Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
PerlMonks
Re: Use radio noise to make (non-critical) decisions...
by insensate (Hermit)
on Jan 09, 2003 at 03:25 UTC ( #225424=note: print w/ replies, xml ) Need Help??
in reply to Use radio noise to make (non-critical) decisions...
Or...
use strict; use Quantum::Entanglement; $|++; print "Welcome to the magic 8 ball...type 'leave' to exit\n"; for(;;){ my $answer = entangle(1, 'Outlook Good', 1, 'Outlook Not So Good', 1, 'My Reply Is No', 1, 'Don\'t Count On It', 1, 'You May Rely On It', 1, 'Ask Again Later', 1, 'Most Likely', 1, 'Cannot Predict Now', 1, 'Yes', 1, 'Yes Definately', 1, 'Better Not Tell You Now', 1, 'It Is Certain', 1, 'Very Doubtful', 1, 'It Is Decidedly So', 1, 'Concentrate and Ask Again', 1, 'Signs Point to Yes', 1, 'My Sources Say No', 1, 'Without A doubt', 1, 'Reply Hazy, Try Again', 1, 'As I See It, Yes'); print "What is your question: "; my $ans = <STDIN>; chomp $ans; exit if $ans=~/^leave$/i; print "Rolling"; for(1..4) { sleep 1; print "."; } print "\n$answer\n"; }
Replies are listed 'Best First'.
Re^2: Use radio noise to make (non-critical) decisions...
by Aristotle (Chancellor) on Jan 11, 2003 at 20:28 UTC
exit if $ans=~/^leave$/i;
Hmm? Seems overly convoluted to me. exit if "leave" eq lc $ans;
Update: Also:
my $answer = entangle(map { 1 => $_ } 'Outlook Good', 'Outlook Not So Good', 'My Reply Is No', "Don't Count On It", 'You May Rely On It', 'Ask Again Later', 'Most Likely', 'Cannot Predict Now', 'Yes', 'Yes Definately', 'Better Not Tell You Now', 'It Is Certain', 'Very Doubtful', 'It Is Decidedly So', 'Concentrate and Ask Again', 'Signs Point to Yes', 'My Sources Say No', 'Without A doubt', 'Reply Hazy, Try Again', 'As I See It, Yes', );
Just minor niggles of course.
Makeshifts last the longest.
Log In?
Username:
Password:
What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://225424]
help
Chatterbox?
and the web crawler heard nothing...
How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2016-07-28 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What is your favorite alternate name for a (specific) keyboard key?
Results (258 votes). Check out past polls.
|
{
"url": "http://www.perlmonks.org/?node_id=225424",
"source_domain": "www.perlmonks.org",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "24765",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4LPOXQAOPH3NS4ETP6TSBIFTRSMYUIIP",
"WARC-Concurrent-To": "<urn:uuid:4544d7aa-5337-42ff-83ad-d331c843361e>",
"WARC-Date": "2016-07-28T20:37:32Z",
"WARC-IP-Address": "216.92.34.251",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:WIZVDNABLYLAZMVK6PVIQMB45E6TLREM",
"WARC-Record-ID": "<urn:uuid:bf1c925e-3665-4b8a-9e3d-ca974bedd276>",
"WARC-Target-URI": "http://www.perlmonks.org/?node_id=225424",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:965114a6-58d2-4e3c-9181-d09eec5cc55d>"
},
"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,
63,
83,
85,
97,
98,
154,
155,
177,
258,
259,
260,
324,
325,
331,
1095,
1096,
1129,
1187,
1242,
1272,
1340,
1358,
1803,
1837,
1838,
1871,
1872,
1880,
1890,
1900,
1901,
1921,
1939,
1952,
1965,
1995,
2000,
2012,
2049,
2050,
2088,
2101,
2143,
2170,
2180,
2193,
2205,
2216,
2234,
2306,
2307,
2308,
2309,
2310,
2311,
2312,
2313,
2314,
2315,
2316,
2317,
2318,
2319,
2320,
2321,
2322,
2323,
2324
],
"line_end_idx": [
63,
83,
85,
97,
98,
154,
155,
177,
258,
259,
260,
324,
325,
331,
1095,
1096,
1129,
1187,
1242,
1272,
1340,
1358,
1803,
1837,
1838,
1871,
1872,
1880,
1890,
1900,
1901,
1921,
1939,
1952,
1965,
1995,
2000,
2012,
2049,
2050,
2088,
2101,
2143,
2170,
2180,
2193,
2205,
2216,
2234,
2306,
2307,
2308,
2309,
2310,
2311,
2312,
2313,
2314,
2315,
2316,
2317,
2318,
2319,
2320,
2321,
2322,
2323,
2324,
2370
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2370,
"ccnet_original_nlines": 68,
"rps_doc_curly_bracket": 0.002531650010496378,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.11198738217353821,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0189274400472641,
"rps_doc_frac_lines_end_with_ellipsis": 0.07246377319097519,
"rps_doc_frac_no_alph_words": 0.44006308913230896,
"rps_doc_frac_unique_words": 0.5040431022644043,
"rps_doc_mean_word_length": 4.28840970993042,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0.011041009798645973,
"rps_doc_unigram_entropy": 4.909487724304199,
"rps_doc_word_count": 371,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.1313639134168625,
"rps_doc_frac_chars_dupe_6grams": 0.07605279982089996,
"rps_doc_frac_chars_dupe_7grams": 0.07605279982089996,
"rps_doc_frac_chars_dupe_8grams": 0.05153990909457207,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.010056570172309875,
"rps_doc_frac_chars_top_3gram": 0.024512879550457,
"rps_doc_frac_chars_top_4gram": 0.0282841008156538,
"rps_doc_books_importance": -250.92559814453125,
"rps_doc_books_importance_length_correction": -250.92559814453125,
"rps_doc_openwebtext_importance": -139.3421630859375,
"rps_doc_openwebtext_importance_length_correction": -139.3421630859375,
"rps_doc_wikipedia_importance": -112.05316925048828,
"rps_doc_wikipedia_importance_length_correction": -112.05316925048828
},
"fasttext": {
"dclm": 0.04017746075987816,
"english": 0.712753415107727,
"fineweb_edu_approx": 1.5099276304244995,
"eai_general_math": 0.002302889944985509,
"eai_open_web_math": 0.054864998906850815,
"eai_web_code": 0.00002587000017229002
}
}
|
{
"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": "530.12",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Physics",
"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": "4",
"label": "Code/Software"
},
"secondary": {
"code": "5",
"label": "Social/Forum"
}
},
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,539,012,853,436,572,000
|
Formation Perl - Formateur Perl
Formation de qualité par un spécialiste Perl
Sylvain Lhullier
Version 1.3.20
septembre 2016
Guide Perl - débuter et progresser en Perl
Dernière version sur http://formation-perl.fr/guide-perl.html
© 2002-2016 Sylvain Lhullier - Permission est accordée de copier et distribuer ce document sans modification et à condition de fournir un lien vers la page http://formation-perl.fr/guide-perl.html
> Envie d'une formation Perl ? Sylvain Lhullier propose des formations au langage Perl, contactez-le.
4. Listes et tableaux
Les scalaires et les expressions de base n'ont maintenant plus aucun secret pour vous. Des notions plus complexes et des fonctions plus puissantes sont alors à notre portée. C'est le cas des listes, des tableaux et de l'impressionnant arsenal de fonctions Perl permettant de les manipuler ; vous verrez tout ce qu'il est possible de faire en Perl avec ces deux concepts a priori anodins.
Une liste est une suite (donc ordonnée) de valeurs scalaires. Nous verrons comment créer une liste, la manipuler, la parcourir, etc.
Une variable de type tableau peut contenir plusieurs valeurs scalaires. Cette notion est présente dans de nombreux langages de programmation et ne posera sans doute problème à personne.
Les passerelles entre listes et tableaux sont nombreuses et très intuitives en Perl. C'est pour cela que nous n'entrerons pas ici dans les détails de la distinction entre liste et tableau. Dans ce document, j'utiliserai chacun des deux termes à bon escient sans forcement indiquer explicitement pourquoi j'utilise l'un plutôt que l'autre, mais les notions pourront apparaître naturelles au lecteur sans qu'il ne soit nécessaire de préciser les choses formellement.
4.1. Valeurs de listes
En Perl, une liste peut être représentée par les valeurs qu'elle doit contenir encadrées par un couple de parenthèses. Par exemple (2,5,-3) est une liste de trois scalaires : 2, 5 et -3. Autre exemple (2,'age',"Bonjour $prenom") est aussi une liste ; en effet les listes contenant des scalaires, rien ne nous empêche d'en constituer une comportant des nombres et des chaînes de caractères mêlés. La liste vide se représente sous la forme suivante : ()
L'opérateur d'intervalle .. permet de créer une liste comportant des valeurs successives entre deux bornes. La liste (1..10) comporte tous les entiers de 1 à 10 ; on aurait pu aussi écrire (1,2,3,4,5,6,7,8,9,10), mais cette dernière notation est bien plus lourde. Il faut savoir que les valeurs des bornes ne doivent pas obligatoirement être des nombres : par exemple, la liste ('a'..'z') comporte toutes les lettres de l'alphabet, en minuscules et dans l'ordre. Il est aussi possible de spécifier les bornes à l'aide de variables : ($debut..$fin) On comprendra qu'il n'est pas toujours possible de résoudre ce type de liste (par exemple si $debut vaut 1 et $fin vaut 'a'), dans ce cas la liste est vide. Dernier exemple, la liste (1..10, "age", "a".."z") comporte 37 éléments (10+1+26).
La liste (1,2,("nom",12),"aaa",-1) n'est pas une liste à cinq éléments dont le troisième serait une autre liste, c'est en fait une liste à six éléments. On aurait pu écrire (1,2,"nom",12,"aaa",-1) et on aurait obtenu la même liste. On appelle cela l'aplatissement (ou la linéarisation) des listes. Pour constituer une liste de listes, il faudra faire usage de références (notion que nous aborderons plus tard).
L'opérateur de répétition (x), que l'on a déjà appliqué aux chaînes de caractères précédemment, s'applique aussi aux listes : (2,10) x 3 est une liste à six éléments valant (2,10,2,10,2,10).
4.2. Manipulation de tableaux
Pour simplifier les choses, un tableau est une variable qui peut avoir une liste pour valeur. Une telle variable se déclare de la sorte : my @t; On a alors un tableau vide, c'est-à-dire sans élément. De manière plus explicite, voici comment déclarer un tableau vide :
my @t = ();
Pour lui donner une valeur lors de sa déclaration, il faut faire ainsi :
my @t = (3,'chaine',"bonjour $prenom");
On a alors déclaré ce tableau en l'initialisant au moyen d'une liste.
On peut accéder directement à un élément d'un tableau grâce à son indice : $t[indice] représente l'élément d'indice indice du tableau @t. Notez bien que la globalité du tableau se représente au moyen d'une arobase @t alors qu'un élément particulier est désigné à l'aide d'un dollar $t[indice], cette dernière expression étant bien une variable de type scalaire (le dollar est réservé aux scalaires en Perl).
Les indices des tableaux en Perl commencent à 0 (comme en C), ce qui signifie que le premier élément du tableau @t est $t[0] et le deuxième $t[1], etc. Voici un petit exemple d'utilisation de tableau :
my @t = (3,5); # déclaration et initialisation
$t[1] = 4; # affectation d'un élément
print "$t[0]\n"; # affichage d'un élément
Il est intéressant de savoir qu'il est possible d'accéder au dernier élément d'un tableau en utilisant l'indice -1 : $t[-1] est le dernier élément de @t. De la même façon, $t[-2] est l'avant-dernier, etc.
Il est possible de connaître l'indice du dernier élément d'un tableau @t grâce à la variable $#t On a donc $t[$#t]. équivalent à $t[-1] (ce dernier étant bien plus lisible). Il peut être utile de savoir que l'expression scalar(@t) (c'est-à-dire l'utilisation d'un tableau en contexte scalaire) donne le nombre d'éléments du tableau @t (ce qui vaut 1 de plus que $#t) ; $x=@t donnerait la même chose.
Il faut savoir que vous ne générerez pas d'erreur (débordement ou autre) si vous tentez d'accéder à un élément au-delà du dernier. La valeur de cet élément sera simplement undef et le programme continuera. Depuis la version 5.6 de Perl, l'instruction exists (que l'on retrouvera pour les tables de hachage) permet de tester l'existence d'un élément d'un tableau :
if( exists( $t[100] ) ) {
...
}
Ce test sera vrai si l'élément d'indice 100 du tableau @t existe. Ce qui est différent du test suivant :
if( defined( $t[100] ) ) {
...
}
Car on teste ici si l'expression $t[100] vaut undef ou non, ce qui peut être vrai dans deux cas : soit l'élément existe et vaut undef, soit l'élément n'existe pas...
Voici une autre illustration du fait que vous n'avez pas à vous soucier de problèmes d'allocation mémoire :
my @t = (3,23.4,"as");
$t[1000] = 8;
Ce programme est correct et fonctionne parfaitement : l'affectation à l'indice 1000 agrandit le tableau d'autant... Les éléments d'indice compris entre 3 et 999 valent undef et scalar(@t) vaut 1001. C'est si facile finalement !
Un tableau qu'il est utile de connaître est @ARGV. Cette variable spéciale est toujours définie (même dans les fonctions) et ne nécessite pas de déclaration. Elle contient les arguments de la ligne de commande du programme. Les trois façons de lancer un programme en Perl sont susceptibles d'utiliser @ARGV:
perl -e '... code perl ...' arg1 arg2 arg3
perl script.pl arg1 arg2 arg3
./script.pl arg1 arg2 arg3
Ces trois programmes sont lancés avec les trois mêmes arguments. Sachez que, contrairement au langage C, le nom du programme n'est pas contenu dans @ARGV qui ne comporte donc que les arguments au sens strict. La variable spéciale $0 (comme en shell) contient le nom du programme (nul besoin de déclarer cette variable pour l'utiliser).
4.3. Affectations
Il est possible d'affecter un tableau à un autre tableau en une seule instruction :
@t = @s;
Cette instruction copie le tableau @s dans le tableau @t. Le tableau @t perd ses anciennes valeurs, prend celles de @s et sa taille devient celle de @s : on obtient bien deux tableaux tout à fait identiques (et distincts, la modification de l'un n'entraînant nullement la modification de l'autre).
Voici d'autres instructions d'affectation mêlant tableaux et listes :
• ($a,$b) = (1,2); Cette instruction affecte une valeur à chacune des variables de la liste de gauche : $a reçoit 1 et $b reçoit 2 ;
• ($a,$b) = (1,2,3); Les mêmes affectations sont effectuées ici, la valeur 3 n'étant d'aucune utilité ;
• ($a,$b) = (1); L'affectation à $a de la valeur 1 est effectuée et $b est mis à undef (son ancienne valeur est perdue) ;
• ($a,$b) = @t; Les variables citées à gauche reçoivent les premières valeurs du tableau @t : $a en reçoit le premier élément ou undef si @t est vide ; $b reçoit le deuxième élément ou undef si @t il ne contient qu'un élément ;
• @t = (1,2); Cette instruction réinitialise le tableau @t (dont les anciennes valeurs sont toutes perdues, y compris celles d'indice différent de 0 et 1) en lui affectant les valeurs de droite : on obtient donc un tableau à deux éléments ;
• ($a,$b) = Fonction(); Nous verrons un peu plus loin comment écrire une fonction, et comment lui faire renvoyer une liste : ici l'affectation se fait dans les mêmes conditions que pour les trois premiers cas ;
• ($a,$b) = ($b,$a); Cette instruction est la plus savoureuse : on peut échanger deux variables Perl sans avoir à en utiliser une troisième... (Ai-je déjà dit que Perl s'occupe lui-même de la mémoire ?).
4.4. Multi-déclaration
Pour déclarer plusieurs variables avec un seul my, le débutant aurait tendance à écrire la chose suivante (il n'y a pas de honte !) :
my $a,$b; # Incorrect !
Ceci est incorrect. Pour pouvoir faire cela, il nous faut utiliser une liste :
my ($a,$b);
Les variables $a et $b sont créées et valent undef. Pour leur affecter des valeurs, il faut là aussi utiliser une liste (ou un tableau) :
my ($a,$b) = (1,2);
my ($c,$d) = @t;
Les mêmes règles que pour l'affectation de listes s'appliquent ici.
4.5. Retour sur l'aplatissement des listes
On retrouve la notion d'aplatissement des listes avec les tableaux :
@t = (1,2,"age");
@t2 = (10,@t,20);
Le tableau @t2 ne comporte pas trois éléments dont celui du milieu serait lui-même un tableau, mais contient les cinq éléments, résultat de l'aplatissement du tableau @t dans la liste de droite lors de l'affectation de @t2. Cette affectation a eu le même résultat qu'aurait eu la suivante :
@t2 = (10,1,2,"age",20);
4.6. Absorption d'une liste par un tableau
La syntaxe suivante est intéressante à connaître :
($a,@t) = @s;
Le membre gauche de l'affectation est constitué d'une liste comportant une variable scalaire et un tableau. Il n'y a pas à proprement parler d'aplatissement de liste, car il s'agit ici d'une l-value (membre gauche d'une affectation), mais la variable $a reçoit le premier élément du tableau @s et le tableau @t absorbe tous les autres (@s n'étant bien sûr pas modifié).
En fait dans cette syntaxe, le premier tableau rencontré dans la liste de gauche reçoit tous les éléments restant de la liste de droite. D'éventuelles autres variables qui le suivraient (cas idiot, mais bon...) seraient mises à undef s'il s'agit de scalaires et à vide s'il s'agit de tableaux. Par exemple, l'affectation suivante :
@s = (10,1,2,"age",20);
($a, @t, @u, $b) = @s;
équivaut à :
@s = (10,1,2,"age",20);
$a = 10;
@t = (1,2,"age",20);
@u = ();
$b = undef;
Simple et intuitif.
4.7. La structure de boucle foreach
Cette instruction permet de parcourir une liste. Son implémentation optimisée dans l'interpréteur Perl rend son usage bien plus efficace qu'un parcours qui utiliserait une variable indicielle incrémentée à chaque tour d'une boucle for. Sa syntaxe est la suivante :
foreach variable ( liste ) { instructions }
À chaque tour de boucle, la variable aura pour valeur un élément de la liste, la liste étant parcourue dans l'ordre. Aucune modification ni suppression dans la liste n'est effectuée par défaut dans ce type de boucle. Il vous est possible de modifier la variable de boucle (ce qui aura pour effet de modifier l'élément en question), mais, par défaut, le parcours n'est pas destructif.
Par exemple :
foreach $v (1,43,"toto") {
print "$v\n";
}
Ce petit programme affiche chaque élément de la liste sur une ligne. Ces autres exemples sont valides eux aussi :
foreach $v (@t) { .... }
foreach $v (32,@t,"age",@t2) { .... }
Dans le premier cas, les éléments du tableau @t sont parcourus. Le second exemple illustre les phénomènes d'aplatissement des listes qui se retrouvent ici aussi.
Il est possible de déclarer la variable de boucle dans le foreach de la manière suivante :
foreach my $v (@t) {
print "$v\n";
}
Il est aussi possible de ne pas utiliser explicitement de variable de boucle ; dans ce cas c'est la variable spéciale $_ qui sera automatiquement utilisée :
foreach (@t) {
print "$_\n";
}
Comme pour les autres boucles, l'instruction next passe à la valeur suivante sans exécuter les instructions qui la suivent dans le bloc. L'instruction last met fin à la boucle.
Voici un petit exemple d'utilisation de foreach affichant des tables de multiplication :
#!/usr/bin/perl
use strict;
use warnings;
die("Usage: $0 <n> <n>\n")
if( !defined( $ARGV[1] ) );
foreach my $i (1..$ARGV[0]) {
foreach my $j (1..$ARGV[1]) {
printf( "%4d", $i*$j );
}
print "\n";
}
Et le voici à l'œuvre :
./mult.pl
Usage: ./mult.pl <n> <n>
./mult.pl 5 3
1 2 3
2 4 6
3 6 9
4 8 12
5 10 15
Passons à la suite.
4.8. Fonctions de manipulation de tableaux
Il existe de nombreuses fonctions permettant de manipuler les tableaux. Pour chacun des exemples qui vont suivre, je suppose que nous avons un tableau @t déclaré de la sorte :
my @t = (1,2,3,4);
• Ajout et suppression à gauche
• La fonction unshift prend en arguments un tableau et une liste de valeurs scalaires ; ces valeurs sont ajoutées au début du tableau :
unshift(@t,5,6);
@t vaut alors la liste (5,6,1,2,3,4).
• La fonction shift prend un tableau en argument ; elle supprime son premier élément (les autres sont alors décalés) et renvoie cet élément :
$v = shift(@t);
$v vaut alors 1 et @t la liste (2,3,4).
• Ajout et suppression à droite
• La fonction push prend en argument un tableau et une liste de valeurs scalaires ; ces valeurs sont ajoutées à la fin du tableau :
push(@t,5,6);
@t vaut alors la liste (1,2,3,4,5,6).
• La fonction pop prend un tableau en argument ; elle supprime son dernier élément et renvoie cet élément :
$v = pop(@t);
$v vaut alors 4 et @t la liste (1,2,3).
• Inversion
En contexte de liste, la fonction reverse prend en argument une liste et renvoie la liste inversée, c'est-à-dire celle dont les éléments sont pris dans le sens opposé :
@s = reverse(@t);
@s vaut alors la liste (4,3,2,1) et @t n'est pas modifiée.
Avec de telles fonctions, il est alors envisageable de manipuler des objets algorithmiques tels que les piles et les files. Une pile est un lieu de stockage ayant pour particularité que le dernier élément à y être entré sera le premier à en sortir (last in-first out) comme pour une pile d'assiettes sur une étagère de placard. On peut utiliser pour cela un tableau, avec les fonctions push pour ajouter un élément et pop pour en prendre un. De façon analogue, une file est un endroit où le premier entré est le premier à sortir (first in-first out) comme pour une file à une caisse de magasin. On peut par exemple utiliser les fonctions push pour ajouter un élément et shift pour en prendre un.
D'autres manipulations plus complexes du contenu d'un tableau sont possibles avec la fonction splice, mais je vous renvoie à la documentation pour les détails.
4.9. L'opérateur qw
L'opérateur qw nous permet de créer facilement une liste de chaînes de caractères. En effet, il peut sembler pénible de constituer une longue liste de tels éléments en raison du fait qu'il faut délimiter chacun d'entre eux au moyen de simples ou de doubles-quotes :
@t = ( 'Ceci', 'est', 'quelque', 'peu', 'pénible',
'à', 'écrire', ',', 'non', '?' );
Avec qw, ceci devient tout à coup plus lisible :
@t = qw(Cela est bien plus facile à faire non ?);
La chaîne de caractères sera découpée selon les espaces, les tabulations et les retours à la ligne.
Les délimiteurs les plus souvent utilisés sont les parenthèses (comme dans l'exemple précédent) ainsi que les slashs :
@t = qw/Ou alors comme cela .../;
Cette fonction est bien pratique, mais peut être source d'erreurs, voyez l'exemple suivant :
@t = qw/ attention 'aux erreurs' bêtes /;
Les simples quotes (') semblent indiquer que le programmeur souhaite constituer un seul élément comportant les mots aux et erreurs ; ce n'est pas ce qui est fait ici. En effet, ni les simples quotes ni les doubles-quotes ne constituent un moyen de regrouper des mots pour l'opérateur qw. La liste ainsi créée comporte donc quatre éléments ; on aurait pu écrire : ("attention","'aux","erreurs'","bêtes").
4.10. Joindre les éléments dans une chaîne avec join
La fonction join prend en paramètre un scalaire et une liste ; elle renvoie une chaîne de caractères comportant les éléments de la liste, concaténés et séparés par ce premier paramètre scalaire. Les arguments passés ne sont pas modifiés.
scalaire = join( séparateur, liste );
Voici quelques exemples :
• $s = join(" ",1,2,3); La variable $s vaut alors la chaîne "1 2 3" ;
• $s = join(',',$x,$y,$y); Les valeurs des trois variables sont jointes en les alternant avec des virgules. Le résultat est affecté à $s ;
• $s = join(" : ",@t); La variable vaut alors la concaténation des valeurs du tableau @t avec " : " pour séparateur.
4.11. Découper une chaîne de caractères en liste avec split
La fonction split prend en paramètres un séparateur et une chaîne de caractères ; elle renvoie la liste des éléments de la chaîne de caractères délimités par le séparateur. Le séparateur est une expression régulière, notion que nous aborderons dans la suite, mais dont le minimum de connaissances suffit à cette fonction ; admettez ici qu'une telle expression est à placer entre slashs (/). Les arguments passés ne sont pas modifiés.
liste = split( /séparateur/, chaîne );
Voici quelques exemples :
• @t = split(/-/,"4-12-455"); Le tableau comporte alors les éléments 4, 12 et 455.
• ($x,$y) = split(/==/,$v); Les deux variables auront pour valeur les deux premières chaînes de caractères qui soient séparées par deux signes d'égalité.
• print join(':',split(/ /,'salut ici')); Affiche salut:ici (il existe des méthodes plus efficaces et plus lisibles de faire cela...).
4.12. Trier une liste avec sort
La fonction sort prend en paramètres un bloc d'instructions optionnel et une liste ; elle renvoie une liste triée conformément au critère de tri constitué par le bloc d'instructions. La liste passée en argument n'est pas modifiée.
liste2 = sort( liste1 );
liste2 = sort( { comparaison } liste1 ); (attention à ne pas mettre de virgule entre le bloc d'instructions et la liste).
Tout au long du tri, le bloc d'instructions sera évalué pour comparer deux valeurs de la liste ; ces deux valeurs sont localement affectées aux variables spéciales $a et $b qui ne sont définies que dans le bloc et sur lesquelles il faut donc effectuer la comparaison. Il faut faire particulièrement attention au fait que s'il existe des variables $a et $b dans le programme elles seront localement masquées par ces variables spéciales (source courante d'erreurs). Le bloc doit être composé d'une expression dont la valeur est :
• négative, si $a doit être avant $b dans la liste résultat ;
• positive, si $b doit être avant $a ;
• nulle, s'ils sont équivalents.
C'est là qu'entrent en jeu les opérateurs de comparaison cmp et <=> : ils permettent de comparer respectivement les chaînes de caractères selon l'ordre lexical et les nombres selon l'ordre numérique. Si la fonction sort est appelée sans bloc d'instructions, la liste est triée selon l'ordre lexical.
Voici quelques exemples :
• @s = sort( {$a cmp $b} @t ); La liste @s a pour valeur la liste @t triée selon l'ordre lexical.
• @s = sort( @t ); Le fonctionnement est identique à l'exemple précédent.
• @s = sort( {$a <=> $b} @t ); Le critère de tri est ici numérique.
• @s = sort( {length($b) <=> length($a) or $a cmp $b} @t ); Une expression composée peut bien sûr servir de critère : le tri est ici d'abord numérique inverse sur la longueur puis lexical. Cela permet d'effectuer un second tri pour les éléments égaux selon le critère du premier tri.
• @s = sort( { fonction($a,$b) } @t ); Vous pouvez écrire votre propre fonction de tri (à deux arguments) ; elle doit renvoyer un nombre dont la valeur dépend de l'ordre voulu (voir juste avant).
4.13. Sélectionner des éléments avec grep
La fonction grep prend en paramètres un critère de sélection et une liste ; elle renvoie la liste des éléments correspondant au critère. La liste passée en argument n'est pas modifiée.
Le critère de sélection peut être soit une expression régulière (cas sur lequel nous reviendrons plus tard), soit un bloc d'instructions (cas sur lequel nous allons nous étendre) :
liste2 = grep { sélection } liste1; (attention : pas de parenthèses ni de virgule).
Les éléments renvoyés sont ceux pour lesquels l'évaluation du bloc d'instructions a pour valeur vrai. Durant cette évaluation, chacune des valeurs sera localement affectée à la variable spéciale $_ sur laquelle les tests devront donc être effectués.
Voici quelques exemples :
• @t = grep { $_<0 } $x,$y,$z; Affecte à @t les éléments négatifs de la liste.
• @s = grep { $_!=8 and $_!=4 } @t; Met dans @s les éléments de @t différents de 4 et de 8.
• @s = grep { fonction($_) } @t; Vous pouvez écrire votre propre fonction de sélection ; elle doit renvoyer vrai ou faux selon que l'élément est à garder ou non.
En contexte scalaire, la fonction grep renvoie le nombre d'éléments qui correspondent au critère : $n = grep { .... } @t;
La syntaxe de grep comportant une expression régulière est la suivante :
liste2 = grep( /regexp/, liste1 );
En quelques mots, les éléments renvoyés seront ceux qui correspondront à l'expression régulière. Par exemple @s = grep( /^aa/, @t ); affecte à @s les éléments de @t qui commencent par deux lettres a. Plus d'explications sur les expressions régulières seront données dans la suite.
J'ai affirmé que la liste d'origine n'était pas modifiée, mais il vous est possible de le faire. Si, durant la sélection, vous affectez une valeur à $_, la liste sera modifiée. Mais cela est sans doute une mauvaise idée de modifier la liste passée en paramètre d'un grep, car la fonction map est faite pour cela.
4.14. Appliquer un traitement à tous les éléments avec map
La fonction map prend en paramètres un bloc d'instructions et une liste ; elle applique le bloc à chacun des éléments de la liste (modification possible de la liste) et renvoie la liste constituée des valeurs successives de l'expression évaluée.
liste2 = map( { expression } liste1 ); (attention à ne pas mettre de virgule entre le bloc d'instructions et la liste).
La variable spéciale $_ vaut localement (dans le bloc d'instructions) chaque élément de la liste. La valeur de la dernière expression du bloc sera placée dans la liste résultat.
Voici quelques exemples :
• @s = map( { -$_ } @t ); Le tableau @s aura pour valeurs les opposés des valeurs de @t.
• @p = map( { $_."s" } @t ); Tous les mots de @t sont mis au pluriel dans @p.
• @s = map( { substr($_,0,2) } @t ); Le tableau @s aura pour valeurs les deux premiers caractères des valeurs de @t.
• @s = map( { fonction($_) } @t ); Vous pouvez écrire votre propre fonction ; les valeurs qu'elle renverra seront placées dans @s.
Dans les exemples qui précèdent, la liste d'origine n'est pas modifiée (sauf dans le dernier exemple où elle peut l'être dans la fonction). Voici un exemple de modification de liste :
map( { $_*=4 } @t ); Tous les éléments de @t sont multipliés par quatre.
Contact © 1999-2018 formation-perl.fr
Formation Perl - Formation Perl intra entreprise - Formation Perl inter entreprise - Formateur Perl - Formateur Perl délégation
Formation Perl Formateur Perl Appartement à louer à Noisy-le-Grand Bric-à-Brac
|
{
"url": "http://formation-perl.fr/guide-perl-04.html",
"source_domain": "formation-perl.fr",
"snapshot_id": "crawl=CC-MAIN-2018-17",
"warc_metadata": {
"Content-Length": "50063",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MRJM42HZRBF2INQ5ONFQOGCCE2JMRHUF",
"WARC-Concurrent-To": "<urn:uuid:aa75155f-0a2f-44a5-ac8a-e7ec794c0a08>",
"WARC-Date": "2018-04-20T10:18:26Z",
"WARC-IP-Address": "213.186.33.4",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:4TY2VV6WFTYOU4LT55RQKA5JG4HUZIPO",
"WARC-Record-ID": "<urn:uuid:c88c6453-eb9b-4455-b600-6c061ae77dfe>",
"WARC-Target-URI": "http://formation-perl.fr/guide-perl-04.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fe3c58c9-f3b1-4610-86d3-843bfdbd2a38>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-185-176-92.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-17\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for April 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,
32,
33,
78,
79,
96,
97,
112,
127,
128,
129,
172,
173,
236,
433,
434,
536,
537,
559,
560,
948,
949,
1082,
1083,
1269,
1270,
1735,
1736,
1759,
1760,
2212,
2213,
3001,
3002,
3413,
3414,
3605,
3606,
3636,
3637,
3905,
3906,
3918,
3919,
3992,
3993,
4033,
4034,
4104,
4105,
4513,
4514,
4716,
4717,
4766,
4810,
4852,
4853,
5058,
5059,
5459,
5460,
5824,
5825,
5851,
5858,
5860,
5861,
5966,
5967,
5994,
6001,
6003,
6004,
6170,
6171,
6279,
6280,
6303,
6317,
6318,
6546,
6547,
6855,
6856,
6899,
6929,
6956,
6957,
7293,
7294,
7312,
7313,
7397,
7398,
7407,
7408,
7706,
7707,
7777,
7778,
7913,
7914,
8020,
8021,
8145,
8146,
8376,
8377,
8620,
8621,
8834,
8835,
9041,
9042,
9065,
9066,
9200,
9201,
9226,
9227,
9306,
9307,
9319,
9320,
9458,
9459,
9479,
9496,
9497,
9565,
9566,
9609,
9610,
9679,
9680,
9698,
9716,
9717,
10008,
10009,
10034,
10035,
10078,
10079,
10130,
10131,
10145,
10146,
10516,
10517,
10849,
10850,
10874,
10897,
10898,
10911,
10912,
10936,
10945,
10966,
10975,
10987,
10988,
11008,
11009,
11045,
11046,
11311,
11312,
11356,
11357,
11741,
11742,
11756,
11757,
11784,
11801,
11803,
11804,
11918,
11919,
11944,
11982,
11983,
12145,
12146,
12237,
12238,
12259,
12276,
12278,
12279,
12436,
12437,
12452,
12469,
12471,
12472,
12649,
12650,
12739,
12740,
12756,
12768,
12782,
12809,
12840,
12870,
12903,
12933,
12938,
12953,
12955,
12956,
12980,
12981,
12991,
13016,
13030,
13043,
13056,
13069,
13082,
13095,
13096,
13116,
13117,
13160,
13161,
13337,
13338,
13357,
13391,
13392,
13532,
13533,
13556,
13563,
13564,
13608,
13609,
13755,
13756,
13778,
13785,
13786,
13832,
13833,
13867,
13868,
14004,
14005,
14025,
14032,
14033,
14077,
14078,
14190,
14191,
14211,
14218,
14219,
14265,
14266,
14280,
14281,
14454,
14455,
14477,
14482,
14483,
14546,
14547,
15243,
15244,
15404,
15405,
15425,
15426,
15692,
15693,
15744,
15785,
15786,
15835,
15836,
15886,
15887,
15987,
15988,
16107,
16108,
16142,
16143,
16236,
16237,
16279,
16280,
16684,
16685,
16738,
16739,
16977,
16978,
17016,
17017,
17043,
17044,
17116,
17117,
17258,
17259,
17378,
17379,
17439,
17440,
17874,
17875,
17914,
17915,
17941,
17942,
18027,
18028,
18184,
18185,
18322,
18323,
18355,
18356,
18587,
18588,
18613,
18614,
18736,
18737,
19265,
19266,
19330,
19331,
19372,
19373,
19408,
19409,
19709,
19710,
19736,
19737,
19837,
19838,
19914,
19915,
19985,
19986,
20272,
20273,
20471,
20472,
20514,
20515,
20700,
20701,
20882,
20883,
20967,
20968,
21218,
21219,
21245,
21246,
21327,
21328,
21422,
21423,
21587,
21588,
21710,
21711,
21784,
21785,
21820,
21821,
22102,
22103,
22416,
22417,
22476,
22477,
22723,
22724,
22844,
22845,
23023,
23024,
23050,
23051,
23142,
23143,
23223,
23224,
23343,
23344,
23477,
23478,
23662,
23663,
23736,
23737,
23738,
23776,
23904
],
"line_end_idx": [
32,
33,
78,
79,
96,
97,
112,
127,
128,
129,
172,
173,
236,
433,
434,
536,
537,
559,
560,
948,
949,
1082,
1083,
1269,
1270,
1735,
1736,
1759,
1760,
2212,
2213,
3001,
3002,
3413,
3414,
3605,
3606,
3636,
3637,
3905,
3906,
3918,
3919,
3992,
3993,
4033,
4034,
4104,
4105,
4513,
4514,
4716,
4717,
4766,
4810,
4852,
4853,
5058,
5059,
5459,
5460,
5824,
5825,
5851,
5858,
5860,
5861,
5966,
5967,
5994,
6001,
6003,
6004,
6170,
6171,
6279,
6280,
6303,
6317,
6318,
6546,
6547,
6855,
6856,
6899,
6929,
6956,
6957,
7293,
7294,
7312,
7313,
7397,
7398,
7407,
7408,
7706,
7707,
7777,
7778,
7913,
7914,
8020,
8021,
8145,
8146,
8376,
8377,
8620,
8621,
8834,
8835,
9041,
9042,
9065,
9066,
9200,
9201,
9226,
9227,
9306,
9307,
9319,
9320,
9458,
9459,
9479,
9496,
9497,
9565,
9566,
9609,
9610,
9679,
9680,
9698,
9716,
9717,
10008,
10009,
10034,
10035,
10078,
10079,
10130,
10131,
10145,
10146,
10516,
10517,
10849,
10850,
10874,
10897,
10898,
10911,
10912,
10936,
10945,
10966,
10975,
10987,
10988,
11008,
11009,
11045,
11046,
11311,
11312,
11356,
11357,
11741,
11742,
11756,
11757,
11784,
11801,
11803,
11804,
11918,
11919,
11944,
11982,
11983,
12145,
12146,
12237,
12238,
12259,
12276,
12278,
12279,
12436,
12437,
12452,
12469,
12471,
12472,
12649,
12650,
12739,
12740,
12756,
12768,
12782,
12809,
12840,
12870,
12903,
12933,
12938,
12953,
12955,
12956,
12980,
12981,
12991,
13016,
13030,
13043,
13056,
13069,
13082,
13095,
13096,
13116,
13117,
13160,
13161,
13337,
13338,
13357,
13391,
13392,
13532,
13533,
13556,
13563,
13564,
13608,
13609,
13755,
13756,
13778,
13785,
13786,
13832,
13833,
13867,
13868,
14004,
14005,
14025,
14032,
14033,
14077,
14078,
14190,
14191,
14211,
14218,
14219,
14265,
14266,
14280,
14281,
14454,
14455,
14477,
14482,
14483,
14546,
14547,
15243,
15244,
15404,
15405,
15425,
15426,
15692,
15693,
15744,
15785,
15786,
15835,
15836,
15886,
15887,
15987,
15988,
16107,
16108,
16142,
16143,
16236,
16237,
16279,
16280,
16684,
16685,
16738,
16739,
16977,
16978,
17016,
17017,
17043,
17044,
17116,
17117,
17258,
17259,
17378,
17379,
17439,
17440,
17874,
17875,
17914,
17915,
17941,
17942,
18027,
18028,
18184,
18185,
18322,
18323,
18355,
18356,
18587,
18588,
18613,
18614,
18736,
18737,
19265,
19266,
19330,
19331,
19372,
19373,
19408,
19409,
19709,
19710,
19736,
19737,
19837,
19838,
19914,
19915,
19985,
19986,
20272,
20273,
20471,
20472,
20514,
20515,
20700,
20701,
20882,
20883,
20967,
20968,
21218,
21219,
21245,
21246,
21327,
21328,
21422,
21423,
21587,
21588,
21710,
21711,
21784,
21785,
21820,
21821,
22102,
22103,
22416,
22417,
22476,
22477,
22723,
22724,
22844,
22845,
23023,
23024,
23050,
23051,
23142,
23143,
23223,
23224,
23343,
23344,
23477,
23478,
23662,
23663,
23736,
23737,
23738,
23776,
23904,
23982
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 23982,
"ccnet_original_nlines": 411,
"rps_doc_curly_bracket": 0.0021682900842279196,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1153017207980156,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.003951149992644787,
"rps_doc_frac_lines_end_with_ellipsis": 0.007281550206243992,
"rps_doc_frac_no_alph_words": 0.316989928483963,
"rps_doc_frac_unique_words": 0.24644677340984344,
"rps_doc_mean_word_length": 4.912308692932129,
"rps_doc_num_sentences": 212,
"rps_doc_symbol_to_word_ratio": 0.0037715500220656395,
"rps_doc_unigram_entropy": 5.790493965148926,
"rps_doc_word_count": 3729,
"rps_doc_frac_chars_dupe_10grams": 0.01419369038194418,
"rps_doc_frac_chars_dupe_5grams": 0.09597118198871613,
"rps_doc_frac_chars_dupe_6grams": 0.055191610008478165,
"rps_doc_frac_chars_dupe_7grams": 0.04154384136199951,
"rps_doc_frac_chars_dupe_8grams": 0.03750409185886383,
"rps_doc_frac_chars_dupe_9grams": 0.01419369038194418,
"rps_doc_frac_chars_top_2gram": 0.01643192023038864,
"rps_doc_frac_chars_top_3gram": 0.004913200158625841,
"rps_doc_frac_chars_top_4gram": 0.006005019880831242,
"rps_doc_books_importance": -2052.6953125,
"rps_doc_books_importance_length_correction": -2052.6953125,
"rps_doc_openwebtext_importance": -1138.39453125,
"rps_doc_openwebtext_importance_length_correction": -1138.39453125,
"rps_doc_wikipedia_importance": -964.4293212890625,
"rps_doc_wikipedia_importance_length_correction": -964.4293212890625
},
"fasttext": {
"dclm": 0.9622226357460022,
"english": 0.0010045199887827039,
"fineweb_edu_approx": 1.3653451204299927,
"eai_general_math": 0.00998103991150856,
"eai_open_web_math": 0.41458988189697266,
"eai_web_code": 0.9579371213912964
}
}
|
{
"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": "-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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,954,466,133,051,718,000
|
ABAP Tips and Tricks
ABAP Tips and Tricks
Retrieving the deleted program
I recently deleted a custom program (which is already transported to production) accidentally and was wondering if there is any method of retrieving the program back. After some research, I found a way of getting back the program. Following are the steps in getting back the program:
1) Create a program with the same name as earlier (which is deleted)
2) Click on “Utilities” –> “Versions” –> “Version Management”
3) Select the version of your earlier program and click on display.
4) Your earlier program is displayed here
Find out in what all Tables a specified field is available.
You can find out through transaction code SE15.
1) Give SE15 on command prompt.
2) Select ABAP Dictionary
3) Select “fields” folder
4) Click on table fields
5) Then you can enter the desired field name (In your case EKGRP)
6) Run OR pres
剩余80%内容付费后可查看
如若转载,请注明出处:https://www.gavindong.com/164.html
微信沟通
|
{
"url": "https://www.gavindong.com/164.html",
"source_domain": "www.gavindong.com",
"snapshot_id": "crawl=CC-MAIN-2021-04",
"warc_metadata": {
"Content-Length": "65373",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:B6X6H3PVSPFCUNGB5KS6C3SP42USRVLN",
"WARC-Concurrent-To": "<urn:uuid:f54f4933-1d27-4349-ba1e-761d62767e2e>",
"WARC-Date": "2021-01-24T08:55:51Z",
"WARC-IP-Address": "8.129.76.207",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DVLKXNZKSHCNFGU5VLA5J7L4UO7MKLPQ",
"WARC-Record-ID": "<urn:uuid:70095fde-2615-47cb-846e-b603bed43ed7>",
"WARC-Target-URI": "https://www.gavindong.com/164.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ab747f37-0abd-4c22-8474-84afa651a2ba>"
},
"warc_info": "isPartOf: CC-MAIN-2021-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2021\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-52.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,
21,
22,
43,
44,
75,
76,
360,
429,
491,
559,
601,
602,
662,
663,
711,
743,
769,
795,
820,
886,
901,
902,
916,
917,
963,
964
],
"line_end_idx": [
21,
22,
43,
44,
75,
76,
360,
429,
491,
559,
601,
602,
662,
663,
711,
743,
769,
795,
820,
886,
901,
902,
916,
917,
963,
964,
968
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 968,
"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.3009708821773529,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04368932172656059,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.28155338764190674,
"rps_doc_frac_unique_words": 0.6012658476829529,
"rps_doc_mean_word_length": 4.867088794708252,
"rps_doc_num_sentences": 10,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.350129127502441,
"rps_doc_word_count": 158,
"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.039011698216199875,
"rps_doc_frac_chars_top_3gram": 0.02860857918858528,
"rps_doc_frac_chars_top_4gram": 0.04421326145529747,
"rps_doc_books_importance": -129.9184112548828,
"rps_doc_books_importance_length_correction": -129.9184112548828,
"rps_doc_openwebtext_importance": -58.59516525268555,
"rps_doc_openwebtext_importance_length_correction": -44.949371337890625,
"rps_doc_wikipedia_importance": -65.58213806152344,
"rps_doc_wikipedia_importance_length_correction": -65.58213806152344
},
"fasttext": {
"dclm": 0.28785014152526855,
"english": 0.8555734753608704,
"fineweb_edu_approx": 1.3981921672821045,
"eai_general_math": 0.25277042388916016,
"eai_open_web_math": 0.08120107650756836,
"eai_web_code": 0.43883854150772095
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.435",
"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": "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": "1",
"label": "Truncated Snippets"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,776,458,731,260,980,000
|
3
I would like to open a specific folder (not a file) in the file manager by pushing a button in a Tkinter frame. Does anyone know the function?
• 3
This question is a programming question (“how to interact with the UI of another program from within a Python program”) which should be asked elsewhere as it is not specific to the Raspberry Pi. – Phil B. Dec 15 '19 at 13:21
7
For asynch :
import os
myfolder="/home/pi/Desktop"
def onMyButtonClick():
os.system("pcmanfm \"%s\"" % myfolder)
For asynch or ̶s̶y̶n̶c̶h̶ use python subprocess Popen :
import subprocess
myfolder="/home/pi/Desktop"
def onMyButtonClick():
p = subprocess.Popen(["pcmanfm", "%s" % myfolder], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.communicate()
subprocess ref.
PCMan File Manager (PCManFM) ref.
| improve this answer | |
• 1
Thank you very much! The first option works fine – Stan Eskin Dec 14 '19 at 17:52
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://raspberrypi.stackexchange.com/questions/106310/open-a-folder-in-the-file-manager-by-a-python-script",
"source_domain": "raspberrypi.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2020-45",
"warc_metadata": {
"Content-Length": "145390",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7RCLOYGACFC7I2YBOXHEBEUSGE4EF2AD",
"WARC-Concurrent-To": "<urn:uuid:66b152b2-60f7-48de-89cf-68fa5fbb1d5b>",
"WARC-Date": "2020-10-29T00:10:48Z",
"WARC-IP-Address": "151.101.1.69",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:TBL7WCUKP7HEECU5MQQ3L2DXHQ34VBK7",
"WARC-Record-ID": "<urn:uuid:aeaaf228-b0ff-4120-89b6-00dc9922a48b>",
"WARC-Target-URI": "https://raspberrypi.stackexchange.com/questions/106310/open-a-folder-in-the-file-manager-by-a-python-script",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:312d709b-8d46-400a-b3df-9780a72500dc>"
},
"warc_info": "isPartOf: CC-MAIN-2020-45\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2020\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-124.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,
2,
3,
146,
147,
153,
382,
384,
385,
398,
399,
410,
438,
439,
462,
506,
507,
563,
564,
582,
583,
611,
612,
643,
745,
765,
766,
782,
783,
817,
818,
844,
850,
936,
937,
949,
950,
1050,
1051
],
"line_end_idx": [
2,
3,
146,
147,
153,
382,
384,
385,
398,
399,
410,
438,
439,
462,
506,
507,
563,
564,
582,
583,
611,
612,
643,
745,
765,
766,
782,
783,
817,
818,
844,
850,
936,
937,
949,
950,
1050,
1051,
1141
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1141,
"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.2705882489681244,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.019607840105891228,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.32156863808631897,
"rps_doc_frac_unique_words": 0.688622772693634,
"rps_doc_mean_word_length": 5.029940128326416,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.6103620529174805,
"rps_doc_word_count": 167,
"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.02619048021733761,
"rps_doc_frac_chars_top_3gram": 0.09285713732242584,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -87.74799346923828,
"rps_doc_books_importance_length_correction": -87.74799346923828,
"rps_doc_openwebtext_importance": -53.41801834106445,
"rps_doc_openwebtext_importance_length_correction": -49.38835144042969,
"rps_doc_wikipedia_importance": -53.231266021728516,
"rps_doc_wikipedia_importance_length_correction": -53.231266021728516
},
"fasttext": {
"dclm": 0.26658403873443604,
"english": 0.8041827082633972,
"fineweb_edu_approx": 1.786325216293335,
"eai_general_math": -0.0000015499999790336005,
"eai_open_web_math": 0.015642400830984116,
"eai_web_code": -0.000009890000001178123
}
}
|
{
"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.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": "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": "-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": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,702,392,003,494,712,000
|
Preskoči na glavno vsebino
Zadnja posodobitev strani: 22. april 2024
Blockchain bridges
Web3 has evolved into an ecosystem of L1 blockchains and L2 scaling solutions, each designed with unique capabilities and trade-offs. As the number of blockchain protocols increases, so does the demand to move assets across chains. To fulfill this demand, we need bridges.
What are bridges?
Blockchain bridges work just like the bridges we know in the physical world. Just as a physical bridge connects two physical locations, a blockchain bridge connects two blockchain ecosystems. Bridges facilitate communication between blockchains through the transfer of information and assets.
Let's consider an example:
You're from the USA and are planning a trip to Europe. You have USD, but you need EUR to spend. To exchange your USD for EUR you can use a currency exchange for a small fee.
But, what do you do if you want to make a similar exchange to use a different ? Let's say you want to exchange on Ethereum Mainnet for ETH on Arbitrum(opens in a new tab). Like the currency exchange we made for EUR, we need a mechanism to move our ETH from Ethereum to Arbitrum. Bridges make such a transaction possible. In this case, Arbitrum has a native bridge(opens in a new tab) that can transfer ETH from Mainnet onto Arbitrum.
Why do we need bridges?
All blockchains have their limitations. For Ethereum to scale and keep up with demand, it has required . Alternatively, L1s like Solana and Avalanche are designed differently to enable higher throughput but at the cost of decentralization.
However, all blockchains develop in isolated environments and have different rules and mechanisms. This means they cannot natively communicate, and tokens cannot move freely between blockchains.
Bridges exist to connect blockchains, allowing the transfer of information and tokens between them.
Bridges enable:
• the cross-chain transfer of assets and information.
• to access the strengths of various blockchains – thus enhancing their capabilities (as protocols now have more design space for innovation).
• users to access new platforms and leverage the benefits of different chains.
• developers from different blockchain ecosystems to collaborate and build new platforms for the users.
How to bridge tokens to layer 2
Bridge use cases
The following are some scenarios where you can use a bridge:
Lower transaction fees
Let’s say you have ETH on Ethereum Mainnet but want cheaper transaction fees to explore different dapps. By bridging your ETH from the Mainnet to an Ethereum L2 rollup, you can enjoy lower transaction fees.
Dapps on other blockchains
If you’ve been using Aave on Ethereum Mainnet to lend USDT but the interest rate for lending USDT using Aave on Polygon is higher.
Explore blockchain ecosystems
If you have ETH on Ethereum Mainnet and you want to explore an alt L1 to try out their native dapps. You can use a bridge to transfer your ETH from Ethereum Mainnet to the alt L1.
Own native crypto assets
Let’s say you want to own native Bitcoin (BTC), but you only have funds on Ethereum Mainnet. To gain exposure to BTC on Ethereum, you can buy Wrapped Bitcoin (WBTC). However, WBTC is an token native to the Ethereum network, which means it’s an Ethereum version of Bitcoin and not the original asset on the Bitcoin blockchain. To own native BTC, you would have to bridge your assets from Ethereum to Bitcoin using a bridge. This will bridge your WBTC and convert it into native BTC. Alternatively, you might own BTC and want to use it in Ethereum protocols. This would require bridging the other way, from BTC to WBTC which can then be used as an asset on Ethereum.
You can also do all of the above using a centralized exchange. However, unless your funds are already on an exchange, it would involve multiple steps, and you’d likely be better off using a bridge.
Types of bridge
Bridges have many types of designs and intricacies. Generally, bridges fall into two categories: trusted and trustless bridges.
Trusted BridgesTrustless Bridges
Trusted bridges depend upon a central entity or system for their operations.Trustless bridges operate using smart contracts and algorithms.
They have trust assumptions with respect to the custody of funds and the security of the bridge. Users mostly rely on the bridge operator's reputation.They are trustless, i.e., the security of the bridge is the same as that of the underlying blockchain.
Users need to give up control of their crypto assets.Through , trustless bridges enable users to remain in control of their funds.
In a nutshell, we can say that trusted bridges have trust assumptions, whereas trustless bridges are trust-minimized and don’t make new trust assumptions beyond those of the underlying domains. Here’s how these terms can be described:
• Trustless: having equivalent security to the underlying domains. As described by Arjun Bhuptani in this article.(opens in a new tab)
• Trust assumptions: moving away from the security of the underlying domains by adding external verifiers in the system, thus making it less crypto-economically secure.
To develop a better understanding of the key differences between the two approaches, let’s take an example:
Imagine you’re at the airport security checkpoint. There are two types of checkpoints:
1. Manual Checkpoints — operated by officials who manually check all the details of your ticket and identity before handing over the boarding pass.
2. Self Check-In — operated by a machine where you put in your flight details and receive the boarding pass if everything checks out.
A manual checkpoint is similar to a trusted model as it depends upon a third party, i.e., the officials, for its operations. As a user, you trust the officials to make the right decisions and use your private information correctly.
Self check-in is similar to a trustless model as it removes the operator's role and uses technology for its operations. Users always remain in control of their data and don’t have to trust a third party with their private information.
Many bridging solutions adopt models between these two extremes with varying degrees of trustlessness.
Risk using bridges
Bridges are in the early stages of development. It is likely that the optimal bridge design has not yet been discovered. Interacting with any type of bridge carries risk:
• Smart Contract Risk — the risk of a bug in the code that can cause user funds to be lost
• Technology Risk — software failure, buggy code, human error, spam, and malicious attacks can possibly disrupt user operations
Moreover, since trusted bridges add trust assumptions, they carry additional risks such as:
• Censorship Risk — bridge operators can theoretically stop users from transferring their assets using the bridge
• Custodial Risk — bridge operators can collude to steal the users’ funds
User's funds are at risk if:
• there is a bug in the smart contract
• the user makes an error
• the underlying blockchain is hacked
• the bridge operators have malicious intent in a trusted bridge
• the bridge gets hacked
One recent hack was Solana’s Wormhole bridge, where 120k wETH ($325 million USD) was stolen during the hack(opens in a new tab). Many of the top hacks in blockchains involved bridges(opens in a new tab).
Bridges are crucial to onboarding users onto Ethereum L2s, and even for users who want to explore different ecosystems. However, given the risks involved in interacting with bridges, users must understand the trade-offs the bridges are making. These are some strategies for cross-chain security(opens in a new tab).
Further reading
Je bil ta članek uporaben?
|
{
"url": "https://ethereum.org/sl/bridges/",
"source_domain": "ethereum.org",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "279010",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:R76N7DPWEUWIB7X4OPK6LVKLG46GIF5Y",
"WARC-Concurrent-To": "<urn:uuid:12f181d9-101a-4272-84a4-7629871aaed6>",
"WARC-Date": "2024-05-21T22:45:23Z",
"WARC-IP-Address": "44.219.53.183",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2Y66FXX6SPQW2R6V2PFDZUSBOYZ2PNCB",
"WARC-Record-ID": "<urn:uuid:0db1ff63-1b89-44e5-b623-e24c98c2736b>",
"WARC-Target-URI": "https://ethereum.org/sl/bridges/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5d7ad6ae-d8d7-4ce4-bbd9-ef9908d60feb>"
},
"warc_info": "isPartOf: CC-MAIN-2024-22\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2024\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-96\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,
27,
28,
70,
71,
90,
91,
364,
365,
383,
384,
677,
678,
705,
706,
880,
881,
1315,
1316,
1340,
1341,
1581,
1582,
1777,
1778,
1878,
1879,
1895,
1896,
1952,
2097,
2178,
2284,
2285,
2317,
2318,
2335,
2336,
2397,
2398,
2421,
2422,
2629,
2630,
2657,
2658,
2789,
2790,
2820,
2821,
3001,
3002,
3027,
3028,
3693,
3694,
3892,
3893,
3909,
3910,
4038,
4039,
4072,
4212,
4466,
4597,
4598,
4833,
4834,
4971,
5142,
5143,
5251,
5252,
5339,
5340,
5490,
5626,
5627,
5859,
5860,
6095,
6096,
6199,
6200,
6219,
6220,
6391,
6392,
6485,
6615,
6616,
6708,
6709,
6825,
6901,
6902,
6931,
6932,
6973,
7001,
7041,
7108,
7135,
7136,
7340,
7341,
7657,
7658,
7674,
7675
],
"line_end_idx": [
27,
28,
70,
71,
90,
91,
364,
365,
383,
384,
677,
678,
705,
706,
880,
881,
1315,
1316,
1340,
1341,
1581,
1582,
1777,
1778,
1878,
1879,
1895,
1896,
1952,
2097,
2178,
2284,
2285,
2317,
2318,
2335,
2336,
2397,
2398,
2421,
2422,
2629,
2630,
2657,
2658,
2789,
2790,
2820,
2821,
3001,
3002,
3027,
3028,
3693,
3694,
3892,
3893,
3909,
3910,
4038,
4039,
4072,
4212,
4466,
4597,
4598,
4833,
4834,
4971,
5142,
5143,
5251,
5252,
5339,
5340,
5490,
5626,
5627,
5859,
5860,
6095,
6096,
6199,
6200,
6219,
6220,
6391,
6392,
6485,
6615,
6616,
6708,
6709,
6825,
6901,
6902,
6931,
6932,
6973,
7001,
7041,
7108,
7135,
7136,
7340,
7341,
7657,
7658,
7674,
7675,
7701
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7701,
"ccnet_original_nlines": 110,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.41409993171691895,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.021902810782194138,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13620808720588684,
"rps_doc_frac_unique_words": 0.3548644185066223,
"rps_doc_mean_word_length": 4.940191268920898,
"rps_doc_num_sentences": 76,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.406679630279541,
"rps_doc_word_count": 1254,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04422922059893608,
"rps_doc_frac_chars_dupe_6grams": 0.008716709911823273,
"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.0038740900345146656,
"rps_doc_frac_chars_top_3gram": 0.005811139941215515,
"rps_doc_frac_chars_top_4gram": 0.008716709911823273,
"rps_doc_books_importance": -469.7859191894531,
"rps_doc_books_importance_length_correction": -469.7859191894531,
"rps_doc_openwebtext_importance": -352.9775695800781,
"rps_doc_openwebtext_importance_length_correction": -352.9775695800781,
"rps_doc_wikipedia_importance": -252.34458923339844,
"rps_doc_wikipedia_importance_length_correction": -252.34458923339844
},
"fasttext": {
"dclm": 0.37627363204956055,
"english": 0.929075300693512,
"fineweb_edu_approx": 2.2244184017181396,
"eai_general_math": 0.5940445065498352,
"eai_open_web_math": 0.2534632086753845,
"eai_web_code": 0.1837487816810608
}
}
|
{
"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": "332.87",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Finance"
}
}
},
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,477,073,005,799,693,000
|
TECH DIGITAL RESOURCE LIBRARY
Masergy
Latest Content From Masergy
Whitepaper: Service-Embedded Network Management
by MasergyJan 01, 2008
Enterprise network executives face several challenges in successfully migrating to advanced IP services. They must connect large, distributed organizations with optimized bandwidth to facilitate application performance. They must lower the number of circuits they support while dramatically reducing latency. They must respond to pressure to implement a voice over IP (VoIP) solution to add functionality and lower telecommunications costs, without any perceptible impact on the quality of the enterprise?s voice capabilities. They must also train and retain IT staff, often with insufficient budgets.
|
{
"url": "http://www.informationweek.com/whitepaper/company/detail/7822?gset=yes",
"source_domain": "www.informationweek.com",
"snapshot_id": "crawl=CC-MAIN-2017-22",
"warc_metadata": {
"Content-Length": "24808",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RULUHSVOJMMYOFFJEXZNFUWQRD66XEZ3",
"WARC-Concurrent-To": "<urn:uuid:c6e1c75c-9246-40b7-806e-67bb69ecbd8c>",
"WARC-Date": "2017-05-25T05:23:15Z",
"WARC-IP-Address": "192.155.48.81",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EIH7GS3HJF4JX7PYOJQALRFJAJO7OPFM",
"WARC-Record-ID": "<urn:uuid:2fb12d27-0665-4f8c-b698-68dfef0795ef>",
"WARC-Target-URI": "http://www.informationweek.com/whitepaper/company/detail/7822?gset=yes",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a2eb3e36-dc57-4d6e-8211-64dc11e5e794>"
},
"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,
30,
31,
39,
40,
41,
69,
70,
118,
119,
142,
143
],
"line_end_idx": [
30,
31,
39,
40,
41,
69,
70,
118,
119,
142,
143,
744
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 744,
"ccnet_original_nlines": 11,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.26724138855934143,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06034483015537262,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13793103396892548,
"rps_doc_frac_unique_words": 0.7900000214576721,
"rps_doc_mean_word_length": 6.25,
"rps_doc_num_sentences": 6,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.244912624359131,
"rps_doc_word_count": 100,
"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.05119999870657921,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -59.33341598510742,
"rps_doc_books_importance_length_correction": -59.33361053466797,
"rps_doc_openwebtext_importance": -25.7133846282959,
"rps_doc_openwebtext_importance_length_correction": -25.713579177856445,
"rps_doc_wikipedia_importance": -21.52446746826172,
"rps_doc_wikipedia_importance_length_correction": -21.524662017822266
},
"fasttext": {
"dclm": 0.21581542491912842,
"english": 0.9161470532417297,
"fineweb_edu_approx": 2.516216993331909,
"eai_general_math": 0.16387414932250977,
"eai_open_web_math": 0.19127529859542847,
"eai_web_code": 0.02749193087220192
}
}
|
{
"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": "658.4038",
"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": "-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": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-827,758,979,582,817,200
|
Строки. Интернационализация
На этом шаге мы рассмотрим более подробно понятие интернационализации.
Как уже упоминалось во вводном описании строковых классов, шаблон строкового класса basic_string<> параметризуется по типу
символов, трактовкам типа символов и модели памяти. Тип string представляет собой специализированную версию шаблона для символов
типа char, а тип wstring предназначен для символов типа wchar_t.
Трактовки типа символов представляют собой информацию о том, как следует поступать в зависимости от представления типа символов.
Необходимость в дополнительном классе объясняется тем, что интерфейс встроенных типов (таких, как char и wchar_t) изменять
нельзя, но один символьный тип может трактоваться по-разному.
В следующем фрагменте определяется специальный класс трактовок для строк, благодаря которому операции со строками выполняются без учета
регистра символов:
#ifndef ICSTRING_HPP
#define ICSTRING_HPP
#include <string>
#include <iostream>
#include <cctype>
// Замена функций стандартного класса char_traits<char>
// для того, чтобы операции со строками
// выполнялись без учета регистра символов
struct ignorecase_traits : public std::char_traits<char> {
// Проверка равенства c1 и c2
static bool eq(const char& c1, const char& c2) {
return std::toupper(c1)==std::toupper(c2);
}
// Проверка условия "с1 меньше c2"
static bool lt(const char& c1, const char& c2) {
return std::toupper(c1)<std::toupper(c2);
}
// Сравнение до n символов s1 и s2
static int compare(const char* s1, const char* s2,
std::size_t n) {
for (std::size_t i=0; i<n; ++i) {
if (!eq(s1[i],s2[i])) {
return lt(s1[i],s2[i])?-1:1;
}
}
return 0;
}
// Поиск c в s
static const char* find(const char* s, std::size_t n,
const char& c) {
for (std::size_t i=0; i<n; ++i) {
if (eq(s[i],c)) {
return &(s[i]);
}
}
return 0;
}
};
// Определение специального типа для таких строк
typedef std::basic_string<char,ignorecase_traits> icstring;
/* Определение оператора вывода,
* так как тип трактовок отличен от типа,
* заданного для std::ostream
*/
inline
std::ostream& operator << (std::ostream& strm, const icstring& s)
{
// Простое преобразование icstring в обычную строку
return strm << std::string(s.data(),s.length());
}
#endif // ICSTRING_HPP
Определение оператора вывода необходимо из-за того, что стандарт описывает операторы ввода-вывода только для потоков данных, у которых тип
символов соответствует типу трактовок. В данном случае мы используем другой тип трактовок, поэтому для него приходится определять собственный
оператор вывода. Аналогичная проблема существует и для операторов ввода.
В следующей программе показано, как использовать специализированный вид строк:
//---------------------------------------------------------------------------
#include <vcl.h>
#include "icstring.hpp"
#include <conio.h> //необходимо для getch()
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
using namespace std;
std::string ToRus(const std::string &in)
{
char *buff = new char [in.length()+1];
CharToOem(in.c_str(),buff);
std::string out(buff);
delete [] buff;
return out;
}
int main (int argc, char* argv[])
{
using std::cout;
using std::endl;
icstring s1("hallo");
icstring s2("otto");
icstring s3("hALLo");
cout << std::boolalpha;
cout << s1 << " == " << s2 << " : " << (s1==s2) << endl;
cout << s1 << " == " << s3 << " : " << (s1==s3) << endl;
icstring::size_type idx = s1.find("All");
if (idx != icstring::npos) {
cout << ToRus("Номер вхождения строки \"All\" в строку \"") << s1 << "\": "
<< idx << endl;
}
else {
cout << ToRus("Строка \"All\" отсутствует в строке \"") << s1 << endl;
}
getch();
return 0;
}
//---------------------------------------------------------------------------
Текст этого примера можно взять здесь.
Результат выполнения программы выглядит так:
Рис.1. Результат работы приложения
На следующем шаге мы остановимся более подробно на эффективности.
Вы можете оставить комментарий, или Трекбэк с вашего сайта.
Оставить комментарий
|
{
"url": "https://mob25.com/stroki-internacionalizaciya/",
"source_domain": "mob25.com",
"snapshot_id": "crawl=CC-MAIN-2021-17",
"warc_metadata": {
"Content-Length": "48555",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Q7ZMTJCG66LVE225ZW3CCGEQA4LGK5XY",
"WARC-Concurrent-To": "<urn:uuid:f63e5b5f-d049-4776-8d83-47bd57226272>",
"WARC-Date": "2021-04-10T15:17:12Z",
"WARC-IP-Address": "87.236.16.19",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:JX2EEP67NE3BAMMDMM2QBQSA5JL53X27",
"WARC-Record-ID": "<urn:uuid:cfa582f8-abe2-4ffd-9876-5a3e85549ec0>",
"WARC-Target-URI": "https://mob25.com/stroki-internacionalizaciya/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:af7c2a25-d07c-422c-b59f-3a2d6162dcb1>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-39.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,
28,
29,
33,
104,
105,
109,
232,
361,
426,
427,
431,
560,
683,
745,
746,
750,
886,
905,
906,
927,
948,
949,
967,
987,
1005,
1006,
1062,
1103,
1147,
1206,
1240,
1293,
1344,
1350,
1389,
1442,
1492,
1498,
1537,
1592,
1632,
1674,
1710,
1755,
1769,
1779,
1797,
1803,
1822,
1880,
1925,
1967,
1997,
2029,
2043,
2053,
2071,
2077,
2080,
2081,
2130,
2190,
2191,
2224,
2266,
2296,
2300,
2307,
2373,
2375,
2431,
2484,
2486,
2487,
2513,
2514,
2518,
2657,
2799,
2872,
2873,
2877,
2956,
2957,
3035,
3036,
3053,
3077,
3078,
3124,
3125,
3141,
3142,
3220,
3221,
3238,
3259,
3260,
3301,
3303,
3344,
3374,
3399,
3417,
3431,
3433,
3434,
3468,
3470,
3489,
3508,
3509,
3533,
3556,
3580,
3585,
3611,
3670,
3729,
3730,
3774,
3805,
3887,
3916,
3920,
3929,
4006,
4010,
4011,
4012,
4023,
4035,
4037,
4038,
4116,
4117,
4156,
4157,
4161,
4206,
4207,
4208,
4243,
4244,
4248,
4314,
4315,
4316,
4317,
4377,
4378
],
"line_end_idx": [
28,
29,
33,
104,
105,
109,
232,
361,
426,
427,
431,
560,
683,
745,
746,
750,
886,
905,
906,
927,
948,
949,
967,
987,
1005,
1006,
1062,
1103,
1147,
1206,
1240,
1293,
1344,
1350,
1389,
1442,
1492,
1498,
1537,
1592,
1632,
1674,
1710,
1755,
1769,
1779,
1797,
1803,
1822,
1880,
1925,
1967,
1997,
2029,
2043,
2053,
2071,
2077,
2080,
2081,
2130,
2190,
2191,
2224,
2266,
2296,
2300,
2307,
2373,
2375,
2431,
2484,
2486,
2487,
2513,
2514,
2518,
2657,
2799,
2872,
2873,
2877,
2956,
2957,
3035,
3036,
3053,
3077,
3078,
3124,
3125,
3141,
3142,
3220,
3221,
3238,
3259,
3260,
3301,
3303,
3344,
3374,
3399,
3417,
3431,
3433,
3434,
3468,
3470,
3489,
3508,
3509,
3533,
3556,
3580,
3585,
3611,
3670,
3729,
3730,
3774,
3805,
3887,
3916,
3920,
3929,
4006,
4010,
4011,
4012,
4023,
4035,
4037,
4038,
4116,
4117,
4156,
4157,
4161,
4206,
4207,
4208,
4243,
4244,
4248,
4314,
4315,
4316,
4317,
4377,
4378,
4398
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4398,
"ccnet_original_nlines": 151,
"rps_doc_curly_bracket": 0.00636652996763587,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.05207100883126259,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007100590039044619,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.6958580017089844,
"rps_doc_frac_unique_words": 0.5923423171043396,
"rps_doc_mean_word_length": 6.277027130126953,
"rps_doc_num_sentences": 26,
"rps_doc_symbol_to_word_ratio": 0.013017750345170498,
"rps_doc_unigram_entropy": 5.290802001953125,
"rps_doc_word_count": 444,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.046645138412714005,
"rps_doc_frac_chars_dupe_6grams": 0.046645138412714005,
"rps_doc_frac_chars_dupe_7grams": 0.033728018403053284,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01614638976752758,
"rps_doc_frac_chars_top_3gram": 0.010764259845018387,
"rps_doc_frac_chars_top_4gram": 0.017222819849848747,
"rps_doc_books_importance": -443.47442626953125,
"rps_doc_books_importance_length_correction": -443.47442626953125,
"rps_doc_openwebtext_importance": -250.28439331054688,
"rps_doc_openwebtext_importance_length_correction": -250.28439331054688,
"rps_doc_wikipedia_importance": -197.89065551757812,
"rps_doc_wikipedia_importance_length_correction": -197.89065551757812
},
"fasttext": {
"dclm": 0.9158287048339844,
"english": 0.0011407099664211273,
"fineweb_edu_approx": 1.9471101760864258,
"eai_general_math": 0.019130589440464973,
"eai_open_web_math": 0.17365366220474243,
"eai_web_code": 0.799139142036438
}
}
|
{
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,213,222,639,037,581,000
|
237
$\begingroup$
If $n>1$ is an integer, then $\sum \limits_{k=1}^n \frac1k$ is not an integer.
If you know Bertrand's Postulate, then you know there must be a prime $p$ between $n/2$ and $n$, so $\frac 1p$ appears in the sum, but $\frac{1}{2p}$ does not. Aside from $\frac 1p$, every other term $\frac 1k$ has $k$ divisible only by primes smaller than $p$. We can combine all those terms to get $\sum_{k=1}^n\frac 1k = \frac 1p + \frac ab$, where $b$ is not divisible by $p$. If this were an integer, then (multiplying by $b$) $\frac bp +a$ would also be an integer, which it isn't since $b$ isn't divisible by $p$.
Does anybody know an elementary proof of this which doesn't rely on Bertrand's Postulate? For a while, I was convinced I'd seen one, but now I'm starting to suspect whatever argument I saw was wrong.
$\endgroup$
10
• 19
$\begingroup$ It is a very strange phenomenon that many problem books seem to push the Bertrand's Postulate solution to this problem. I remember that this came up as a problem (apropos of nothing) in my freshman year math class, and I had some problem book at hand and duly turned in a solution which used BP. The next year I got the problem in a number theory course and by then was sophisticated enough to see the elementary solution involving the ord_2 function. $\endgroup$ Aug 19, 2010 at 0:04
• 2
$\begingroup$ Note that I include this exercise as a -- not fully worked out -- example in my (relatively advanced) undergraduate number theory course. See the example on page 13 of math.uga.edu/~pete/4400intro.pdf. (I should admit that a lot of the students have trouble with the corresponding homework problem that asks the details to be filled in.) $\endgroup$ Aug 19, 2010 at 0:05
• 3
$\begingroup$ @Pete: that's interesting. In high school competition math circles the 2-adic proof is very well known. I first learned it on the AoPS website but it is probably also in some competition book. $\endgroup$ Aug 19, 2010 at 2:07
• 1
$\begingroup$ I remember that in my first semester I was asked about it and looking in some books I always arrived to the Bertrand postulate. But if you think so, Bertrand Postulate is still harder to prove. $\endgroup$ Jul 29, 2015 at 1:44
• 1
$\begingroup$ This video might help. $\endgroup$
– user840532
Oct 28, 2020 at 9:27
10 Answers 10
313
$\begingroup$
Hint $\ $ Since there is a unique denominator $\rm\:\color{#C00} {2^K}\:$ having maximal power of $2,\,$ upon multiplying all terms through by $\rm\:2^{K-1}$ one deduces the contradiction that $\rm\ 1/2\, =\, c/d \;$ with $\rm\: d \:$ odd, $ $ e.g.
$$\begin{eqnarray} & &\rm\ \ \ \ \color{green}{m} &=&\ \ 1 &+& \frac{1}{2} &+& \frac{1}{3} &+&\, \color{#C00}{\frac{1}{4}} &+& \frac{1}{5} &+& \frac{1}{6} &+& \frac{1}{7} \\ &\Rightarrow\ &\rm\ \ \color{green}{2m} &=&\ \ 2 &+&\ 1 &+& \frac{2}{3} &+&\, \color{#C00}{\frac{1}{2}} &+& \frac{2}{5} &+& \frac{1}{3} &+& \frac{2}{7}^\phantom{M^M}\\ &\Rightarrow\ & -\color{#C00}{\frac{1}{2}}\ \ &=&\ \ 2 &+&\ 1 &+& \frac{2}{3} &-&\rm \color{green}{2m} &+& \frac{2}{5} &+& \frac{1}{3} &+& \frac{2}{7}^\phantom{M^M} \end{eqnarray}$$
The prior sum has all odd denominators so reduces to a fraction with odd denominator $\rm\,d\, |\, 3\cdot 5\cdot 7$.
Note $\ $ I purposely avoided any use of valuation theory because Anton requested an "elementary" solution. The above proof can easily be made comprehensible to a high-school student.
$\endgroup$
5
• 1
$\begingroup$ did you try to show for $n=7$? $\endgroup$
– Balbichi
Jul 31, 2013 at 4:22
• 2
$\begingroup$ I am not able to understand how to use your hint for general $n$ $\endgroup$
– Balbichi
Jul 31, 2013 at 4:26
• 3
$\begingroup$ Beautiful! Much nicer than an ugly argument in the style of "writing everything as one fraction, one 'sees' that the denominator has more factors $2$" but essentially the same, though. $\endgroup$ Jun 21, 2014 at 15:17
• $\begingroup$ Please elaborate for n=8,16 etc $\endgroup$
– Arjun
May 13, 2020 at 8:46
• $\begingroup$ you also have to show that no other denominator contains $2^k$ as a factor. $\endgroup$
– Omar Khan
Oct 20, 2021 at 22:47
63
$\begingroup$
An elementary proof uses the following fact:
If $2^s$ is the highest power of $2$ in the set $S = \{1,2,...,n\}$, then $2^s$ is not a divisor of any other integer in $S$.
To use that,
consider the highest power of $2$ which divides $n!$. Say that is $t$.
Now the number can be rewritten as
$\displaystyle \frac{\sum \limits_{k=1}^{n}{\frac{n!}{k}}}{n!}$
The highest power of $2$ which divides the denominator is $t$.
Now the highest power of $2$ that divides $\displaystyle \frac{n!}{k}$ is at least $t-s$. If $k \neq 2^{s}$, then this is atleast $t-s+1$ as the highest power of $2$ that divides $k$ is atmost $s-1$.
In case $k=2^s$, the highest power of $2$ that divides $ \dfrac{n!}{k}$ is exactly $t-s$.
Thus the highest power of $2$ that divides the numerator is atmost $t-s$. If $s \gt 0$ (which is true if $n \gt 1$), we are done.
In fact the above proof shows that the number is of the form $\frac{\text{odd}}{\text{even}}$.
$\endgroup$
3
• 3
$\begingroup$ It would probably be a good idea to flesh this out a little. $\endgroup$ Aug 18, 2010 at 22:58
• 1
$\begingroup$ The exact same proof I gave works, just use $2^k$ instead of $p$. Again, you get that the sum is of the form $\frac{1}{2^k}+\frac{a}{b}$, where $b$ (being a divisor of the lcm of stuff divisible by at most $k-1$ copies of 2) is not divisible by $2^k$. This can't be an integer, otherwise $\frac{b}{2^k}+a$ would be an integer, which it isn't. $\endgroup$ Aug 18, 2010 at 23:00
• 1
$\begingroup$ But what is there to say the sum of the $n!/k$s do not have $2^k$ dividing them? $\endgroup$ Jan 28, 2021 at 7:22
31
$\begingroup$
I never heard of the Bertrand postulate approach before, although it turns out that the first proof that the $n$-th harmonic sum is not an integer when $n > 1$ uses Bertrand's postulate and determinants. It appeared in a paper of Theisinger (Bemerkung über die harmonische Reihe, Monatsh. f. Mathematik und Physik 26 (1915), 132--134) that you can read here and he refers to Bertrand's postulate as Chebyshev's theorem. (Update: in several places I have seen Theisinger misspelled as Taesinger, and I am guilty of doing that myself in this answer until I corrected it.) The 2-adic proof is due to Kürschák (A Harmonikus Sorról, Mat. és Fiz. Lapok, 27 (1918), 299--300) and you read it here.
I like to think of this result as saying the $n$-th harmonic sum tends to infinity $2$-adically. That naturally raises the question of the $p$-adic behavior of harmonic sums for odd primes $p$, which quickly leads into unsolved problems. I wrote a discussion of that at here.
$\endgroup$
3
• 20
$\begingroup$ +1: a new blurb. If there were a listserve that would automatically notify me whenever there is a new blurb from KCd, I would gladly sign up for it! $\endgroup$ Aug 19, 2010 at 3:56
• 5
$\begingroup$ @PeteL.Clark : You can create a feed for a webpage with pagee2rrss.com. In this case, add to you feeds reader: page2rss.com/rss/2b74436a91d372fca18b5f1645f1d59e $\endgroup$
– leonbloy
Dec 5, 2011 at 19:58
• 1
$\begingroup$ @leonbloy: Thannks, that sounds useful. I'll give it a try... $\endgroup$ Dec 6, 2011 at 4:01
27
$\begingroup$
What the heck -- I'll leave my comment as an answer.
See the Example on p. 13
This is discussed, together with (as a footnote) the strange phenomenon that this is often solved by an appeal to Bertrand's Postulate. The discussion in the above text is intended to be "didactic" in that a few details are left to the reader, and I recommend it as a good exercise to flesh them out.
$\endgroup$
8
• 2
$\begingroup$ @Pete: But your exposition uses valuation theory - which disqualifies it as "elementary". Obviously the problem is trivial to anyone knowing valuation theory.Namely the sum has a lone dominant term with $v_2 < 0$ so, by the domination principle, the sum has $v_2 < 0$ so is nonintegral. $\endgroup$ Aug 19, 2010 at 0:36
• 12
$\begingroup$ @BD: The construction uses something that happens to be a valuation, but I don't think that makes it valuation theory. The definition of ord-p uses nothing more or less than the fundamental theorem of arithmetic, so is appropriate in an introductory course. The point of this exercise is to get students used to making arguments of this kind which -- if they continue on in their study of number theory -- will be seen to be valuation-theoretic. (Anyway the argument can certainly be phrased without using ord-2 if that's your taste.) $\endgroup$ Aug 19, 2010 at 2:49
• $\begingroup$ By the way, the fact that each partial sum has a unique term of minimal 2-adic valuation was not so easy for my students. That's most of the exercise that I left for them to solve, and for many it was challenging, not trivial. $\endgroup$ Aug 19, 2010 at 2:53
• 1
$\begingroup$ @Pete: Certainly it can be presented at an elementary level, and there is no doubt that it is instructive to do so. However, it's a lot of overhead to introduce for a single problem - as here. It's puzzling to hear that the exercise proved difficult for some students. Did you give them prior examples of employing the dominance principle? E.g. that a set of integers having precisely one odd element has odd sum (that is precisely what occurs in the sum above if one multiplies it through by a 2-least common denominator). $\endgroup$ Aug 19, 2010 at 3:17
• 1
$\begingroup$ Hi BS, I understand your point. But I think, in this kind of forum, this type of answer have a great value. Altought Anton asked for simple proof, the Pete's argument help the interested students to learn most power techniques in simple situation. @Thanks Pete for the link. $\endgroup$
– Leandro
Aug 19, 2010 at 3:25
17
$\begingroup$
This is a h.w. problem in Ch 1 of "Ireland and Rosen" - prob 30. There is a hint on p. 367. Let $s$ be the largest integer such that $2^s \le n$, and consider:
$\sum \limits_{k=1}^n \frac{2^{s - 1}}k$
Show that this sum can be written in the form $a/b$ + $1/2$ with $b$ odd.
Then apply problem 29 which is:
Suppose $a, b, c, d$ in $\mathbb{Z}$ and $gcd (a,b) = (c,d) = 1$
If $(a/b) + (c/d)$ = an integer, then $b = \pm d$. (But $b$ odd, $d$ = $2$.)
Maybe this was part and parcel of earlier answers. If so forgive me for trying.
$\endgroup$
0
17
$\begingroup$
I kind of have an elementary solution, it seems to be fine but I am not sure if everything is correct; please point out the mistake(s) I'm making, if any.
Define $$H_n:=\sum_{i=1}^n \frac{1}{i}$$ Since $0<H_n<n$, if $\exists$ some $n$ for which $H_n$ is integral then $H_n=k$ where $0<k<n$. Then $$H_n=k=1+\frac{1}{2}+\frac{1}{3}+\cdots\ +\frac{1}{k}+\cdots\ +\frac{1}{n}\\ \Rightarrow k=\frac{1}{k}+\frac{p}{q}\Rightarrow qk^2-pk-q=0$$ where $\gcd(p,q)=1$. Then we get $$k=\frac{p\pm \sqrt{p^2+4q^2}}{2q}$$ Since $k$ is integer $$p^2+4q^2=r^2$$ for some $r\in \mathbb{Z}^+$. Let $\gcd(p,2q,r)=d$ and let $\displaystyle x=\frac{p}{d},\ y=\frac{2q}{d},\ z=\frac{r}{d}$. Then $$x^2+y^2=z^2$$ Now, I make the following claim:
Claim:$p$ is odd and $q$ is even.
Proof: Let $s=2^m\le n$ be the largest power of $2$ in $\{1,2,\cdots,\ n\}$. Then, if $k\ne s$ then the numerator of $\displaystyle \frac{p}{q}$ is the sum of $n-1$ terms out of which one will be odd and hence $p$ is odd. On the other hand, $q$ will have the term $s$ as a factor. So q is even.
Now, if $k=s$, then since $n>2$(otherwise there is nothing to prove)then, there will be a factor $2^{m-1}\ge 2$ in $q$ and one of the sum terms in $p$ that corresponds to $2^{m-1}$ will be odd. Hence in this case also, $p$ is odd and $q$ is even. So the claim is proved. $\Box$
So, now we see that $d\ne 2$ and hence $2|y$. So we have a Pythgorian equation with $2|y, \ x,y,z>0$. hence the solutions will be $$x=u^2-v^2,\ y=2uv,\ z=u^2+v^2$$ with $(u,v)=1.$ So, since $k$ is positive, $$k=\frac{d(x+z)}{dy}=\frac{u}{v}$$ But since $(u,v)=1$, $k$ is not an integer (for $n\ge 2$) which is a contradiction. So $H_n$ can not be an integer. $\Box$
$\endgroup$
1
• $\begingroup$ I know this is a very late answer, but in the proof of your claim you said that p is the sum of n-1 terms out of which one is odd. Which one is that? And was it really intentional to write the requirement (p,q)=1? $\endgroup$
– PhantomR
Aug 17, 2018 at 0:01
10
$\begingroup$
Very similar to the Bertrand approach, except significantly more elementary.
Suppose for contradiction that a partial sum of the harmonic series is an integer $z$:
$$1 + \frac{1}{2} + \frac{1}{3}+...+\frac{1}{n}=z$$
Now consider the maximal power of $2$ below $n$ and let's call it $2^t$. (Note that all other integers between 1 and $n$ have a power of $2$ strictly less than t). Now consider the unique prime factorization of $n!$. The exponent of $2$ in this factorization will be greater than or equal to $2^t$, but instead let us define $M$ as $n!$, except with the power of $2$ in its prime factorization set to be $t-1$ (as opposed to some integer greater than $t$).
Multiply both sides of the equation by $M$:
$$M+\frac{M}{2}+\frac{M}{3}+...+\frac{M}{2^t}+...+\frac{M}{n}=Mz$$
$M$ has enough factors to make all terms on the LHS integers except for the $\frac{M}{2^t}$ term. Summing the LHS, we see that is not an integer, even though the RHS is an integer. Contradiction, QED.
This proof is essentially the same as the proof with Bertrand's postulate, except with $2^t$ instead of a prime number $p$ between $\frac{n}{2}$ and $n$.
$\endgroup$
1
• 1
$\begingroup$ This same approach was already described in several other answers. $\endgroup$ Jul 29, 2015 at 1:31
6
$\begingroup$
Here's a short proof: Let $H_n = \displaystyle \sum_{k=1}^n\dfrac{1}{k}.$ One can show that $\displaystyle\sum_{k=1}^{n}\dfrac{(-1)^{k-1}\binom{n}{k}}{k}= H_n.$ This can be rewritten as: $$\sum_{k=0}^{n}{(-1)^k\binom{n}{k}a_k} = b_n$$
where $a_0 =0$ and $a_i = \dfrac{1}{i}$ for $i=1,\ldots n$ and $b_n = -H_n$
This answer shows that the $b_i$ are integers if and only if the $a_i$ are integers. Clearly for $i \geq 2 $ we can see that the $a_i$ are not integers, from which it follows that neither are the $b_i, i\geq 2.$
$\endgroup$
4
$\begingroup$
A more general approach that includes the proof using the prime 2 but is valid for any prime $<n$ (posted elsewhere with an erroneous n! instead of LCD): Let the least common denominator of the harmonic series H(n) be LCD(n). Take any prime p in the sequence 1 to n and let q be the highest power of p so that $p^q ≤ n$.
For any k, $1 ≤k ≤n $, LCD(n)/k is an integer and = 0 (mod p) except $LCD(n)/p^q$ which is an integer and does not contain p, and therefore cannot be 0 (mod p). But H(n)LCD(n)=0 (mod p) (since LCD(n) contains the factor p), a contradiction if H(n) is an integer.
(The simplicity comes from the use of a complicated LCD(n) which exists but whose prime powers I would not be able to describe in the general case).
$\endgroup$
2
$\begingroup$
if we consider highest prime upto $n$ then given sum can be written as $1/p + a/b$ where a is some integer $b$ is also an integer not divisible by $p$. so $b/p$ can not be an integer and so $b/p + a$. so the given sum can not an integer
$\endgroup$
2
• 1
$\begingroup$ For that conclusion, you need to know that $2p > n$, that is, you need Bertrand's postulate. $\endgroup$ Oct 15, 2015 at 11:39
• $\begingroup$ You might want to use MathJax. The simple way to use it is to surround your math with \$. There are some commands you might need to learn. $\endgroup$
– Element118
Oct 15, 2015 at 11:46
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged .
|
{
"url": "https://math.stackexchange.com/questions/2746/is-there-an-elementary-proof-that-sum-limits-k-1n-frac1k-is-never-an-int",
"source_domain": "math.stackexchange.com",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "269858",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CFGGMTYTGLVIMGQPUTT5HLO6FARPPUDW",
"WARC-Concurrent-To": "<urn:uuid:4801450c-f6e2-4134-8568-f1f475d4f21e>",
"WARC-Date": "2023-03-21T13:24:33Z",
"WARC-IP-Address": "151.101.65.69",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:E2DMUZS7TVPACFAUVM5VK4NXRVVWEVU2",
"WARC-Record-ID": "<urn:uuid:d5b1b4df-cd0e-4fd3-a48c-f288ed70357d>",
"WARC-Target-URI": "https://math.stackexchange.com/questions/2746/is-there-an-elementary-proof-that-sum-limits-k-1n-frac1k-is-never-an-int",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5b3de055-460d-4133-8c5e-c86c792834da>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-113\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,
4,
18,
19,
98,
99,
620,
621,
821,
822,
834,
837,
844,
1347,
1353,
1742,
1748,
1992,
1998,
2243,
2249,
2302,
2319,
2344,
2345,
2359,
2360,
2364,
2378,
2379,
2628,
2629,
3153,
3154,
3271,
3272,
3456,
3457,
3469,
3471,
3477,
3538,
3553,
3578,
3584,
3679,
3694,
3719,
3725,
3962,
4024,
4036,
4061,
4167,
4183,
4209,
4212,
4226,
4227,
4272,
4273,
4399,
4400,
4413,
4414,
4485,
4486,
4521,
4522,
4586,
4587,
4650,
4651,
4851,
4852,
4942,
4943,
5073,
5074,
5169,
5170,
5182,
5184,
5190,
5303,
5309,
5704,
5710,
5842,
5845,
5859,
5860,
6551,
6552,
6828,
6829,
6841,
6843,
6850,
7050,
7056,
7247,
7262,
7287,
7293,
7405,
7408,
7422,
7423,
7476,
7477,
7502,
7503,
7804,
7805,
7817,
7819,
7825,
8163,
8170,
8756,
9034,
9040,
9615,
9621,
9926,
9940,
9965,
9968,
9982,
9983,
10143,
10144,
10185,
10186,
10260,
10261,
10293,
10294,
10359,
10360,
10437,
10438,
10518,
10519,
10531,
10533,
10536,
10550,
10551,
10706,
10707,
11275,
11276,
11310,
11311,
11606,
11607,
11885,
11886,
12252,
12253,
12265,
12267,
12511,
12526,
12551,
12554,
12568,
12569,
12646,
12647,
12734,
12735,
12787,
12788,
13245,
13246,
13290,
13291,
13358,
13359,
13560,
13561,
13715,
13716,
13728,
13730,
13736,
13854,
13856,
13870,
13871,
14106,
14107,
14183,
14184,
14396,
14397,
14409,
14411,
14425,
14426,
14747,
14748,
15011,
15012,
15161,
15162,
15174,
15176,
15190,
15191,
15428,
15429,
15441,
15443,
15449,
15594,
15763,
15780,
15806,
15807,
15848,
15849
],
"line_end_idx": [
4,
18,
19,
98,
99,
620,
621,
821,
822,
834,
837,
844,
1347,
1353,
1742,
1748,
1992,
1998,
2243,
2249,
2302,
2319,
2344,
2345,
2359,
2360,
2364,
2378,
2379,
2628,
2629,
3153,
3154,
3271,
3272,
3456,
3457,
3469,
3471,
3477,
3538,
3553,
3578,
3584,
3679,
3694,
3719,
3725,
3962,
4024,
4036,
4061,
4167,
4183,
4209,
4212,
4226,
4227,
4272,
4273,
4399,
4400,
4413,
4414,
4485,
4486,
4521,
4522,
4586,
4587,
4650,
4651,
4851,
4852,
4942,
4943,
5073,
5074,
5169,
5170,
5182,
5184,
5190,
5303,
5309,
5704,
5710,
5842,
5845,
5859,
5860,
6551,
6552,
6828,
6829,
6841,
6843,
6850,
7050,
7056,
7247,
7262,
7287,
7293,
7405,
7408,
7422,
7423,
7476,
7477,
7502,
7503,
7804,
7805,
7817,
7819,
7825,
8163,
8170,
8756,
9034,
9040,
9615,
9621,
9926,
9940,
9965,
9968,
9982,
9983,
10143,
10144,
10185,
10186,
10260,
10261,
10293,
10294,
10359,
10360,
10437,
10438,
10518,
10519,
10531,
10533,
10536,
10550,
10551,
10706,
10707,
11275,
11276,
11310,
11311,
11606,
11607,
11885,
11886,
12252,
12253,
12265,
12267,
12511,
12526,
12551,
12554,
12568,
12569,
12646,
12647,
12734,
12735,
12787,
12788,
13245,
13246,
13290,
13291,
13358,
13359,
13560,
13561,
13715,
13716,
13728,
13730,
13736,
13854,
13856,
13870,
13871,
14106,
14107,
14183,
14184,
14396,
14397,
14409,
14411,
14425,
14426,
14747,
14748,
15011,
15012,
15161,
15162,
15174,
15176,
15190,
15191,
15428,
15429,
15441,
15443,
15449,
15594,
15763,
15780,
15806,
15807,
15848,
15849,
15915
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 15915,
"ccnet_original_nlines": 224,
"rps_doc_curly_bracket": 0.01897580921649933,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3412085473537445,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017946390435099602,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.39845526218414307,
"rps_doc_frac_unique_words": 0.3029603958129883,
"rps_doc_mean_word_length": 4.244136810302734,
"rps_doc_num_sentences": 159,
"rps_doc_symbol_to_word_ratio": 0.00204452988691628,
"rps_doc_unigram_entropy": 5.735616683959961,
"rps_doc_word_count": 2601,
"rps_doc_frac_chars_dupe_10grams": 0.005435269791632891,
"rps_doc_frac_chars_dupe_5grams": 0.058519791811704636,
"rps_doc_frac_chars_dupe_6grams": 0.033155180513858795,
"rps_doc_frac_chars_dupe_7grams": 0.02645166963338852,
"rps_doc_frac_chars_dupe_8grams": 0.005435269791632891,
"rps_doc_frac_chars_dupe_9grams": 0.005435269791632891,
"rps_doc_frac_chars_top_2gram": 0.01549053005874157,
"rps_doc_frac_chars_top_3gram": 0.008696439675986767,
"rps_doc_frac_chars_top_4gram": 0.008968199603259563,
"rps_doc_books_importance": -1660.09765625,
"rps_doc_books_importance_length_correction": -1660.09765625,
"rps_doc_openwebtext_importance": -985.7423706054688,
"rps_doc_openwebtext_importance_length_correction": -985.7423706054688,
"rps_doc_wikipedia_importance": -690.2191772460938,
"rps_doc_wikipedia_importance_length_correction": -690.2191772460938
},
"fasttext": {
"dclm": 0.20321696996688843,
"english": 0.8827677369117737,
"fineweb_edu_approx": 2.067483901977539,
"eai_general_math": 0.9894707798957825,
"eai_open_web_math": 0.8149290084838867,
"eai_web_code": 0.2614818811416626
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "512.7",
"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": "4",
"label": "Analyze"
},
"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": "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": "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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,124,277,056,120,184,000
|
Easy to use
This guide will demo how to add a hash value of a script to CSP.
Sometime we have inline scripts need to allow the execution in a Content Security Policy (CSP), here is our JavaScript snippet:
<script>showHello();<script>
You could use openssl to generate the hash value, which will be installed by default on most linux system, just like below:
echo -n 'showHello();' | openssl sha256 -binary | openssl base64
If you use the entire code to compute the SHA-256 hash value, you'll get the value:
ziuYZCxAULHgmKBeN0a7ywKsu8z+0V9IXrJ+3I3pCKY=
Finally, we can add the hash to our Content-Security-Policy header, as example below:
script-src 'self' 'ziuYZCxAULHgmKBeN0a7ywKsu8z+0V9IXrJ+3I3pCKY='
|
{
"url": "https://940apps.com/blog/how-to-add-hash-with-CSP.html",
"source_domain": "940apps.com",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "5658",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KDKBRPMEJIIZVQFX3YJXYLERDHNVXM2K",
"WARC-Concurrent-To": "<urn:uuid:69435f73-c012-4335-b078-907b5bbd51fd>",
"WARC-Date": "2022-01-20T13:25:33Z",
"WARC-IP-Address": "172.67.168.64",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:N54STUJEYHDBCOZK4SPIO35DUZWOK7XK",
"WARC-Record-ID": "<urn:uuid:09a09271-2608-4ddb-a5ab-8b00507543bb>",
"WARC-Target-URI": "https://940apps.com/blog/how-to-add-hash-with-CSP.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4897dda6-15cc-4f35-bb14-31e8f72a481a>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-236\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,
12,
13,
78,
79,
207,
236,
360,
425,
509,
554,
640
],
"line_end_idx": [
12,
13,
78,
79,
207,
236,
360,
425,
509,
554,
640,
704
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 704,
"ccnet_original_nlines": 11,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36666667461395264,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.019999999552965164,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24666666984558105,
"rps_doc_frac_unique_words": 0.6893203854560852,
"rps_doc_mean_word_length": 5.378640651702881,
"rps_doc_num_sentences": 2,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.073307037353516,
"rps_doc_word_count": 103,
"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.048736460506916046,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -64.21410369873047,
"rps_doc_books_importance_length_correction": -65.31900024414062,
"rps_doc_openwebtext_importance": -34.61756134033203,
"rps_doc_openwebtext_importance_length_correction": -35.72245407104492,
"rps_doc_wikipedia_importance": -9.163313865661621,
"rps_doc_wikipedia_importance_length_correction": -10.268207550048828
},
"fasttext": {
"dclm": 0.1953079104423523,
"english": 0.7621613144874573,
"fineweb_edu_approx": 2.3251514434814453,
"eai_general_math": 0.7167003750801086,
"eai_open_web_math": 0.04756337031722069,
"eai_web_code": 0.882649302482605
}
}
|
{
"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.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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,366,516,666,044,839,000
|
by
Apple Power Revisited.
Two mobile entries in a row and both on the same day. That’s not too bad, I think. Unfortunately, the entries are limited to about 850 characters each because Nokia decided that 850 characters was a sensible limit to set for the size of their text area tag. Morons.
No work today, thank god. If everything goes according to plan, there will be no work tomorrow either. The plan is that I have no plan at all, so it shouldn’t be that hard.
The entry Apple Power spawned some reactions from a few Apple users. Let me guide everyone through the trail of logic that led me to the conclusion that if I were to buy a new computer today, it would be a Dell, not an Apple.
But first things first: As Ian pointed out, this is not a professional computer review site. This is not CNET.com, Tom’s Hardware, nor PC Magazine. This is a personal website/log/ramblings-thingy. Don’t come here for professional advice. I’m not a Dell evangelist nor an Apple hater. I like fruit.
I’m basing my comparison on specifications and price. I don’t have much experience with Apple computers, I know how to set up an Xserve and I’ve done my fair share of work on Apples, but I’ve never owned one. Here’s a table with my comparisons (sorry about the bad layout, I might get around to fix it later):
Dell Inspiron 8600C Apple PowerBook G4
CPU 1,6 GHz Intel Pentium M processor 725 1,33 GHz PowerPC G4
RAM 512Mb 333MHz DDR (1 chip) 512Mb 333MHz DDR (1 chip)
Graphics card 64MB DDR nVidia GeForce 5200 ATI Mobility Radeon 9700 64MB
Screen 15.4 inch UltraSharp WUXGA widescreen (1920×1200) 15.2 inch TFT widescreen (1280×854)
Harddrive 60GB IDE (7.200 RPM) 60GB IDE (4.200 RPM)
Optical unit DVD +/- RW/CD-RW DVD-R/CD-RW
Service One year One year
Getting around Backpack Backpack
Total cost NOK 17.963,00 ($2,922) NOK 23.580,00 ($3,836)
Both computers have all the other stuff you’d expect to find, 10/100BASE LAN (actually the PowerBook comes with 10/100/1000BASE LAN, which is nice), WLAN, two USB ports, one PCMCIA slot and FireWire ports (one IEEE 1394a in the Dell, one IEEE 1394a and one IEEE 1394b in the PowerBook). In addition, the Dell has S-Video out, while the PowerBook comes with integrated Bluetooth.
As you can see, the PowerBook weighs in at over $900 more than the Dell, with more or less the same specifications. It could be that the Apple will perform somewhat better than the Dell with the same specs, what do I know, but if it’s cost me $900 more to get there, I’m not sure if it’s really worth it.
Other good arguments why I should by an Apple instead of a Dell:
* The OS never crashes (or so I’ve heard) – Well, neither does my copy of Windows XP Professional. Actually, it’s been ages since I had to reboot because of an error caused by the operating system, and the blue screen of death is just a remote memory from the Windows 98 days.
* There are very few viruses, worms and other security hazards threatening the Apple computers – True, but viruses, worms and whatnot is not an issue for me now, either. I know how to take care of myself, and I get all the protection I need from free software.
This looks good for Dell on paper, but the only real way I can compare these two babies, is to test drive them myself. Dell and Apple, are you listening?
For me, it’s simply a question about money. I want to buy an Apple PowerBook, but my wallet says no. If I had the money, I would’ve bought an Apple a long time ago. But for now, it’s Dell.
Write a Comment
Comment
CAPTCHA ImageChange Image
This site uses Akismet to reduce spam. Learn how your comment data is processed.
1. computerentries = few comments
hot Calichicks = lots of comments
hmm… what should you doooo… ?
:-P
( ok. I might just be a tiny bit bored )
2. Since klas says that computer entries produce few comments, i will attempt to start a flamewar to prove him wrong :-P
The powerbook is supposed to be faster since the hardware design is better, but as a x86-geek i would (personally) prefer the Dell.
The Pentium M processors are really good, and the screen resolution should be reason enough to go Dell :)
One problem though, the Inspiron is BIG and heavy. At least the ones i have seen and worked with.
Since i didn’t get enough anti-apple to start a flamewar above, here goes: Apple sucks, Mac sucks :-P
Yup, that should do it.
|
{
"url": "https://www.vegard.net/apple-power-revisited/",
"source_domain": "www.vegard.net",
"snapshot_id": "crawl=CC-MAIN-2018-30",
"warc_metadata": {
"Content-Length": "39375",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2UAGMMZSDEBMN26XK4T5SKKEAFM5CLVE",
"WARC-Concurrent-To": "<urn:uuid:8be44aa0-6ebe-4c59-820c-38c670d146f0>",
"WARC-Date": "2018-07-18T18:23:02Z",
"WARC-IP-Address": "80.213.189.14",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:3JB772FRMTX6FLF23PV6JQWU6IVR62UI",
"WARC-Record-ID": "<urn:uuid:35c9d2fd-4178-4596-a63c-367e64432f8b>",
"WARC-Target-URI": "https://www.vegard.net/apple-power-revisited/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:691f1eab-dc56-486c-bf8b-967fd464df1a>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-170-172-222.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-30\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for July 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,
3,
4,
27,
28,
294,
295,
468,
469,
695,
696,
994,
995,
1305,
1306,
1345,
1407,
1463,
1536,
1629,
1681,
1723,
1749,
1782,
1839,
1840,
2219,
2220,
2525,
2526,
2591,
2868,
3129,
3130,
3284,
3285,
3474,
3475,
3491,
3492,
3500,
3501,
3527,
3528,
3609,
3610,
3646,
3647,
3685,
3686,
3720,
3721,
3729,
3730,
3775,
3776,
3899,
3900,
4036,
4146,
4147,
4249,
4250,
4356,
4357
],
"line_end_idx": [
3,
4,
27,
28,
294,
295,
468,
469,
695,
696,
994,
995,
1305,
1306,
1345,
1407,
1463,
1536,
1629,
1681,
1723,
1749,
1782,
1839,
1840,
2219,
2220,
2525,
2526,
2591,
2868,
3129,
3130,
3284,
3285,
3474,
3475,
3491,
3492,
3500,
3501,
3527,
3528,
3609,
3610,
3646,
3647,
3685,
3686,
3720,
3721,
3729,
3730,
3775,
3776,
3899,
3900,
4036,
4146,
4147,
4249,
4250,
4356,
4357,
4384
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4384,
"ccnet_original_nlines": 64,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 2,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3779761791229248,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0744047611951828,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2222222238779068,
"rps_doc_frac_unique_words": 0.5025706887245178,
"rps_doc_mean_word_length": 4.323907375335693,
"rps_doc_num_sentences": 49,
"rps_doc_symbol_to_word_ratio": 0.0019841298926621675,
"rps_doc_unigram_entropy": 5.517087459564209,
"rps_doc_word_count": 778,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01129608042538166,
"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.010404280386865139,
"rps_doc_frac_chars_top_3gram": 0.005350769963115454,
"rps_doc_frac_chars_top_4gram": 0.005945300217717886,
"rps_doc_books_importance": -545.4905395507812,
"rps_doc_books_importance_length_correction": -545.4905395507812,
"rps_doc_openwebtext_importance": -288.18829345703125,
"rps_doc_openwebtext_importance_length_correction": -288.18829345703125,
"rps_doc_wikipedia_importance": -215.12681579589844,
"rps_doc_wikipedia_importance_length_correction": -215.12681579589844
},
"fasttext": {
"dclm": 0.02931457944214344,
"english": 0.920806348323822,
"fineweb_edu_approx": 1.240723729133606,
"eai_general_math": 0.2997273802757263,
"eai_open_web_math": 0.24236690998077393,
"eai_web_code": 0.012521740049123764
}
}
|
{
"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": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "1",
"label": "Factual"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "9",
"label": "Personal/Misc"
},
"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": "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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,872,518,739,639,806,000
|
What is the use of artificial intelligence in cloud computing?
Artificial Intelligence is the perfect partner for cloud computing, with the Cloud able to fuel AI systems with vast tracts of data. Entered AI services, implementations and projects must demonstrate how the Cloud was used to further the reach of AI technologies.
Artificial intelligence (AI) and cloud computing are highly synergistic technologies that complement each other. The use of AI in cloud computing brings numerous benefits, including enhanced data processing capabilities, improved efficiency, and increased scalability. Here are some key areas where AI is utilized in cloud computing:
1. Data Analysis and Machine Learning: Cloud computing provides the infrastructure and resources needed to process large volumes of data efficiently. AI algorithms, such as machine learning, can leverage the cloud’s vast computational power to analyze and extract insights from massive datasets. The cloud’s scalability allows organizations to train and deploy machine learning models on large datasets, enabling accurate predictions and data-driven decision-making.
2. Natural Language Processing (NLP) and Chatbots: AI-powered NLP algorithms are used in cloud-based chatbots and virtual assistants to understand and respond to human language. By harnessing cloud-based AI services, organizations can develop chatbots that can handle complex interactions, provide personalized responses, and perform tasks such as customer support, information retrieval, and voice-controlled actions.
3. Computer Vision and Image Recognition: Cloud-based AI services enable the application of computer vision techniques for image and video analysis. Through cloud computing, AI algorithms can extract meaningful information from images, identify objects, recognize faces, and analyze visual content. This has applications in various fields, including autonomous vehicles, surveillance systems, medical imaging, and quality control in manufacturing.
4. Predictive Analytics and Recommendation Systems: Cloud-based AI platforms can leverage historical data stored in the cloud to build predictive models and recommendation systems. These models can provide valuable insights and predictions, enabling organizations to optimize business processes, anticipate customer behavior, and deliver personalized recommendations. Cloud infrastructure enables the processing and storage of vast amounts of data required for training and deploying such models.
5. Fraud Detection and Cybersecurity: AI algorithms can be applied to cloud-based security systems for detecting anomalies, identifying potential threats, and mitigating cybersecurity risks. By leveraging cloud computing, organizations can analyze network traffic patterns, user behavior, and system logs to identify and respond to security breaches in real-time, enhancing the overall security posture.
6. Resource Optimization and Cost Efficiency: AI algorithms can be used in cloud computing to optimize resource allocation, improve workload management, and enhance energy efficiency. Through AI-driven optimization techniques, organizations can dynamically allocate computing resources based on demand, reducing costs, improving performance, and ensuring efficient utilization of cloud resources.
7. Autonomous Cloud Management: AI technologies can automate and optimize various aspects of cloud management, including provisioning, load balancing, scaling, and fault tolerance. AI-based systems can monitor cloud infrastructure, predict workload patterns, and automatically adjust resource allocation to meet performance and cost requirements. This allows organizations to efficiently manage complex cloud environments and reduce manual intervention.
8. AI Development and Experimentation: Cloud platforms provide AI developers with the necessary infrastructure, tools, and services to build, test, and deploy AI models and applications. Cloud-based AI services offer pre-trained models, AI development frameworks, and APIs that simplify the development and integration of AI functionalities into applications. Developers can leverage the cloud’s scalability and availability to experiment and iterate on AI models efficiently.
In summary, the integration of AI and cloud computing opens up new possibilities for data analysis, machine learning, natural language processing, computer vision, security, resource optimization, and AI development. The cloud’s scalability, flexibility, and storage capabilities empower AI systems by providing access to vast amounts of data and computational resources required for training, inference, and real-time decision-making. The use of AI in cloud computing drives innovation and expands the reach of AI technologies, leading to enhanced business outcomes and improved user experiences.
Previous recognition for Best Use of Artificial Intelligence in Cloud Computing
For a broader understanding of this Cloud Awards category, we have gathered examples from previous winners, finalists, and shortlistees which impressed the judging team with their innovative use of AI in cloud computing.
Winner of The Cloud Awards 2022-2023 for the Best Use of Artificial Intelligence in Cloud Computing
Lead Judge Annabelle Whittall, said:
The Cloud Awards judges were very impressed to see that AI Studio differs from similar solutions in that it is able to communicate in natural language, and doesn’t require users to formulate their questions in a specific way, use certain keywords, or choose from a set of options. AI Studio’s low code/no code conversation designer also differs from similar solutions in that it empowers developers and non-developers alike to design, create and deploy virtual agents that operate in natural language. Congratulations on your win, Vonage AI Studio!
Winner of The Cloud Awards 2021-2022 for the Best Use of Artificial Intelligence in Cloud Computing
Lead Judge Annabelle Whittall, said:
“Moogsoft impressed us at the Cloud Awards this year with their intuitive AI based solution to incident detection and downtime reduction. We felt it was their single system engagement and true root cause identification that really set them apart in this highly competitive category. Congratulations, Moogsoft!
Finalist of The Cloud Awards 2022-2023 for the Best Use of Artificial Intelligence in Cloud Computing
Qlik is a leading data analytics company. Its product, AutoML™, is an innovative artificial intelligence solution that leverages cloud computing to democratize and simplify the process of building machine learning models.
AutoML™ uses AI algorithms to automate and streamline the machine learning workflow. It assists users in tasks such as data preprocessing, feature selection, model selection, hyperparameter tuning, and model evaluation. By harnessing the power of cloud computing, AutoML™ can efficiently process large datasets and explore a wide range of model configurations to optimize model performance.
Shortlistee of The Cloud Awards 2021-2022 for the Best Use of Artificial Intelligence in Cloud Computing
Retina AI specializes in computer vision and AI-driven image analysis solutions. Their use of artificial intelligence in cloud computing encompasses various aspects, including deep learning and neural networks. Retina AI employs deep learning techniques and neural networks to train models for image recognition, object detection, and image classification.
These AI models require significant computational resources, and the cloud infrastructure provides all the necessary computational power to train and optimize these models effectively.
A strong entry for the Best Use of Artificial Intelligence in Cloud Computing category should have:
1. Innovative AI Applications: The entry should showcase innovative and impactful use cases of AI in cloud computing. It should highlight how AI technologies were utilized to solve complex problems, enhance business processes, or provide unique services in the cloud environment. The entry should clearly articulate the value and significance of the AI application.
2. Scalability and Performance: The AI solution should demonstrate effective utilization of cloud computing resources to achieve scalability and high-performance capabilities. It should showcase how the use of cloud infrastructure enabled the AI system to handle large-scale data processing, real-time analytics, or high-volume workload demands. The entry should highlight the efficiency and effectiveness of the AI solution in the cloud environment.
3. Data Management and Processing: An exemplary entry should demonstrate how AI algorithms in the cloud effectively managed and processed large volumes of data. It should highlight the ability of the AI system to ingest, analyze, and extract insights from diverse data sources stored in the cloud. The entry should emphasize how the use of cloud technologies facilitated data integration, storage, and processing for AI applications.
4. Real-Time Decision-Making: The entry should showcase how AI in the cloud enabled real-time decision-making capabilities. It should illustrate how the AI system utilized streaming data, instant feedback loops, or near-real-time analytics to make intelligent and automated decisions in dynamic scenarios. The entry should highlight the impact and value of timely decision-making enabled by AI in the cloud environment.
By encompassing these characteristics, entries can demonstrate a strong and impactful use of artificial intelligence, showcasing innovation, scalability, performance, data management, real-time decision-making, optimization, security, user experience,, technical excellence, and business value.
Why Enter The Cloud Awards?
Since 2011, The Cloud Awards been helping organizations across the globe gain the recognition they deserve for market-leading innovation in the cloud computing and software sectors.
For a detailed breakdown of all the benefits you receive as an awards entrant as either a shortlistee, finalist or ultimate winner, please see our “Why Enter?” page. The many benefits are replicated across all international awards programs. If you have any questions about this category, please contact us.
|
{
"url": "https://www.cloud-awards.com/cloud-computing-awards/best-use-of-artificial-intelligence-in-cloud-computing",
"source_domain": "www.cloud-awards.com",
"snapshot_id": "CC-MAIN-2024-10",
"warc_metadata": {
"Content-Length": "510725",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BSCQWNPFCPBMJA7C2S3UE4DQRGTUGRLX",
"WARC-Concurrent-To": "<urn:uuid:13a4f73f-4586-4f9f-a33f-5e4601a978dc>",
"WARC-Date": "2024-02-21T16:08:30Z",
"WARC-IP-Address": "192.124.249.40",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:6TWUQSWS6NJABQKJEOLNNUH6ZUJMCBJZ",
"WARC-Record-ID": "<urn:uuid:12b9135b-9ceb-4cff-a703-b2bbf2235539>",
"WARC-Target-URI": "https://www.cloud-awards.com/cloud-computing-awards/best-use-of-artificial-intelligence-in-cloud-computing",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:68662063-957d-46ea-a22e-3b8a3550ac8f>"
},
"warc_info": "isPartOf: CC-MAIN-2024-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2024\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-183\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,
63,
64,
328,
329,
663,
664,
1133,
1554,
2004,
2503,
2909,
3308,
3764,
4243,
4244,
4842,
4843,
4923,
4924,
5145,
5146,
5246,
5247,
5284,
5285,
5835,
5836,
5936,
5973,
5974,
6284,
6285,
6387,
6609,
6610,
7001,
7002,
7107,
7108,
7465,
7466,
7651,
7652,
7752,
7753,
8121,
8574,
9010,
9432,
9433,
9728,
9729,
9757,
9758,
9940,
9941
],
"line_end_idx": [
63,
64,
328,
329,
663,
664,
1133,
1554,
2004,
2503,
2909,
3308,
3764,
4243,
4244,
4842,
4843,
4923,
4924,
5145,
5146,
5246,
5247,
5284,
5285,
5835,
5836,
5936,
5973,
5974,
6284,
6285,
6387,
6609,
6610,
7001,
7002,
7107,
7108,
7465,
7466,
7651,
7652,
7752,
7753,
8121,
8574,
9010,
9432,
9433,
9728,
9729,
9757,
9758,
9940,
9941,
10247
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 10247,
"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.26709526777267456,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0321449413895607,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15838691592216492,
"rps_doc_frac_unique_words": 0.3504936397075653,
"rps_doc_mean_word_length": 6.023977279663086,
"rps_doc_num_sentences": 76,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.3879923820495605,
"rps_doc_word_count": 1418,
"rps_doc_frac_chars_dupe_10grams": 0.0492858812212944,
"rps_doc_frac_chars_dupe_5grams": 0.10782018303871155,
"rps_doc_frac_chars_dupe_6grams": 0.0818309485912323,
"rps_doc_frac_chars_dupe_7grams": 0.07913838326931,
"rps_doc_frac_chars_dupe_8grams": 0.05478810891509056,
"rps_doc_frac_chars_dupe_9grams": 0.0492858812212944,
"rps_doc_frac_chars_top_2gram": 0.03933504968881607,
"rps_doc_frac_chars_top_3gram": 0.02622337080538273,
"rps_doc_frac_chars_top_4gram": 0.028447670862078667,
"rps_doc_books_importance": -855.75,
"rps_doc_books_importance_length_correction": -855.75,
"rps_doc_openwebtext_importance": -448.0257568359375,
"rps_doc_openwebtext_importance_length_correction": -448.0257568359375,
"rps_doc_wikipedia_importance": -341.441650390625,
"rps_doc_wikipedia_importance_length_correction": -341.441650390625
},
"fasttext": {
"dclm": 0.9867690205574036,
"english": 0.9000992774963379,
"fineweb_edu_approx": 2.5922539234161377,
"eai_general_math": 0.39477550983428955,
"eai_open_web_math": 0.14198601245880127,
"eai_web_code": 0.808135449886322
}
}
|
{
"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": "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": "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": "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": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "6",
"label": "Content Listing"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,259,718,908,549,987,000
|
Bforex.com Site Title
Home
Bforex.com Meta Description
bforex is the proven leader in online forex trading. Use the popular MetaTrader4 or the robust PROfit platforms to trade on your computer or on your iPhone
Bforex.com Test Results
Bforex.com Mobile Usability: 99/100
Quick overview:
Size tap targets appropriately
Some of the links/buttons on your webpage may be too small for a user to easily tap on a touchscreen. Consider making these tap targets larger to provide a better user experience.
The following tap targets are close to other nearby tap targets and may need additional spacing around them.
The tap target <span id="customCheck"></span> is close to 2 other tap targets.
...
Bforex.com Mobile Speed: 74/100
Quick overview:
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Your page has 17 blocking script resources and 3 blocking CSS resources. This causes a delay in rendering your page.
Remove render-blocking JavaScript:
http://www.bforex.com/Scripts/jquery.min.js
...
Optimize CSS Delivery of the following:
http://www.bforex.com/CMSPages/GetCSS.aspx?stylesheetname=Bforex
...
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
Leverage browser caching for the following cacheable resources:
http://chart.advinion.com/v2.5/AdvinionAdPromo.js (expiration not specified)
...
Reduce server response time
Minify JavaScript
Compacting JavaScript code can save many bytes of data and speed up downloading, parsing, and execution time.
Minify JavaScript for the following resources to reduce their size by 6.1KiB (23% reduction).
Minifying http://serving.plexop.net/scripts/helper_002.js could save 2.7KiB (21% reduction) after compression.
...
Optimize images
Properly formatting and compressing images can save many bytes of data.
Optimize the following images to reduce their size by 3.1KiB (37% reduction).
Losslessly compressing http://www.bforex.com/Media/Images/logo.png could save 1.2KiB (23% reduction).
...
Minify CSS
Compacting CSS code can save many bytes of data and speed up download and parse times.
Minify CSS for the following resources to reduce their size by 1.7KiB (28% reduction).
Minifying http://www.bforex.com/App_Themes/Bforex/jQueryUi/jquery-ui-1.8.12.custom.css could save 1.7KiB (28% reduction) after compression.
Similar tests
www.bforex.com
www.bforex.net
www.bforex.org
www.bforex.info
www.bforex.biz
www.bforex.us
www.bforex.mobi
www.forex.com
www.bforex.com
www.vforex.com
www.bvforex.com
www.vbforex.com
www.gforex.com
www.bgforex.com
www.gbforex.com
www.hforex.com
www.bhforex.com
www.hbforex.com
www.nforex.com
www.bnforex.com
www.nbforex.com
www.borex.com
www.bcorex.com
www.bfcorex.com
www.bcforex.com
www.bdorex.com
www.bfdorex.com
www.bdforex.com
www.brorex.com
www.bfrorex.com
www.brforex.com
www.btorex.com
www.bftorex.com
www.btforex.com
www.bgorex.com
www.bfgorex.com
www.bvorex.com
www.bfvorex.com
www.bfrex.com
www.bfirex.com
www.bfoirex.com
www.bfiorex.com
www.bfkrex.com
www.bfokrex.com
www.bfkorex.com
www.bflrex.com
www.bfolrex.com
www.bflorex.com
www.bfprex.com
www.bfoprex.com
www.bfporex.com
www.bfoex.com
www.bfoeex.com
www.bforeex.com
www.bfoerex.com
www.bfodex.com
www.bfordex.com
www.bfodrex.com
www.bfofex.com
www.bforfex.com
www.bfofrex.com
www.bfotex.com
www.bfortex.com
www.bfotrex.com
www.bforx.com
www.bforwx.com
www.bforewx.com
www.bforwex.com
www.bforsx.com
www.bforesx.com
www.bfordx.com
www.bforedx.com
www.bforrx.com
www.bforerx.com
www.bforrex.com
www.bfore.com
www.bforez.com
www.bforexz.com
www.bforezx.com
www.bfores.com
www.bforexs.com
www.bfored.com
www.bforexd.com
www.bforec.com
www.bforexc.com
www.bforecx.com
www.bforex.con
Last Tested:
This website uses cookies to ensure you get the best experience on our website. Learn more. Got it.
|
{
"url": "http://minify.mobi/results/bforex.com",
"source_domain": "minify.mobi",
"snapshot_id": "crawl=CC-MAIN-2017-17",
"warc_metadata": {
"Content-Length": "161513",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:C67PAIQKOMOV6EMVQZLKINSEAIXLUVFI",
"WARC-Concurrent-To": "<urn:uuid:a7efa789-3f99-4873-b4ae-f4962718e011>",
"WARC-Date": "2017-04-29T07:33:30Z",
"WARC-IP-Address": "159.148.27.197",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:BQU2MP6F4OJQXI2GABP7VCBPVFZLRPTR",
"WARC-Record-ID": "<urn:uuid:75e6ed48-88f9-4b0a-b1ab-2941c74cc580>",
"WARC-Target-URI": "http://minify.mobi/results/bforex.com",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3ac81e00-fb8b-412e-af47-cb126495320f>"
},
"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,
22,
23,
28,
29,
57,
58,
214,
215,
239,
240,
276,
277,
293,
324,
504,
613,
692,
696,
697,
729,
730,
746,
817,
934,
969,
1013,
1017,
1057,
1122,
1126,
1151,
1340,
1404,
1481,
1485,
1513,
1531,
1641,
1735,
1846,
1850,
1866,
1938,
2016,
2118,
2122,
2133,
2220,
2307,
2447,
2448,
2462,
2477,
2492,
2507,
2523,
2538,
2552,
2568,
2582,
2597,
2612,
2628,
2644,
2659,
2675,
2691,
2706,
2722,
2738,
2753,
2769,
2785,
2799,
2814,
2830,
2846,
2861,
2877,
2893,
2908,
2924,
2940,
2955,
2971,
2987,
3002,
3018,
3033,
3049,
3063,
3078,
3094,
3110,
3125,
3141,
3157,
3172,
3188,
3204,
3219,
3235,
3251,
3265,
3280,
3296,
3312,
3327,
3343,
3359,
3374,
3390,
3406,
3421,
3437,
3453,
3467,
3482,
3498,
3514,
3529,
3545,
3560,
3576,
3591,
3607,
3623,
3637,
3652,
3668,
3684,
3699,
3715,
3730,
3746,
3761,
3777,
3793,
3808,
3821,
3822
],
"line_end_idx": [
22,
23,
28,
29,
57,
58,
214,
215,
239,
240,
276,
277,
293,
324,
504,
613,
692,
696,
697,
729,
730,
746,
817,
934,
969,
1013,
1017,
1057,
1122,
1126,
1151,
1340,
1404,
1481,
1485,
1513,
1531,
1641,
1735,
1846,
1850,
1866,
1938,
2016,
2118,
2122,
2133,
2220,
2307,
2447,
2448,
2462,
2477,
2492,
2507,
2523,
2538,
2552,
2568,
2582,
2597,
2612,
2628,
2644,
2659,
2675,
2691,
2706,
2722,
2738,
2753,
2769,
2785,
2799,
2814,
2830,
2846,
2861,
2877,
2893,
2908,
2924,
2940,
2955,
2971,
2987,
3002,
3018,
3033,
3049,
3063,
3078,
3094,
3110,
3125,
3141,
3157,
3172,
3188,
3204,
3219,
3235,
3251,
3265,
3280,
3296,
3312,
3327,
3343,
3359,
3374,
3390,
3406,
3421,
3437,
3453,
3467,
3482,
3498,
3514,
3529,
3545,
3560,
3576,
3591,
3607,
3623,
3637,
3652,
3668,
3684,
3699,
3715,
3730,
3746,
3761,
3777,
3793,
3808,
3821,
3822,
3921
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3921,
"ccnet_original_nlines": 141,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2171664834022522,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0072388797998428345,
"rps_doc_frac_lines_end_with_ellipsis": 0.0422535203397274,
"rps_doc_frac_no_alph_words": 0.329886257648468,
"rps_doc_frac_unique_words": 0.631701648235321,
"rps_doc_mean_word_length": 7.33566427230835,
"rps_doc_num_sentences": 232,
"rps_doc_symbol_to_word_ratio": 0.006204760167747736,
"rps_doc_unigram_entropy": 5.326138496398926,
"rps_doc_word_count": 429,
"rps_doc_frac_chars_dupe_10grams": 0.02287892997264862,
"rps_doc_frac_chars_dupe_5grams": 0.0632348284125328,
"rps_doc_frac_chars_dupe_6grams": 0.05719732865691185,
"rps_doc_frac_chars_dupe_7grams": 0.05020654946565628,
"rps_doc_frac_chars_dupe_8grams": 0.05020654946565628,
"rps_doc_frac_chars_dupe_9grams": 0.05020654946565628,
"rps_doc_frac_chars_top_2gram": 0.02287892997264862,
"rps_doc_frac_chars_top_3gram": 0.014299330301582813,
"rps_doc_frac_chars_top_4gram": 0.015252619981765747,
"rps_doc_books_importance": -190.15638732910156,
"rps_doc_books_importance_length_correction": -190.15638732910156,
"rps_doc_openwebtext_importance": -84.52043151855469,
"rps_doc_openwebtext_importance_length_correction": -84.52043151855469,
"rps_doc_wikipedia_importance": -60.66303634643555,
"rps_doc_wikipedia_importance_length_correction": -60.66303634643555
},
"fasttext": {
"dclm": 0.020318690687417984,
"english": 0.6748915314674377,
"fineweb_edu_approx": 2.2212135791778564,
"eai_general_math": 0.0058405399322509766,
"eai_open_web_math": 0.023405609652400017,
"eai_web_code": 0.008087219670414925
}
}
|
{
"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": "332.8",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Finance"
}
}
},
"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": "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": "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": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
1,768,151,982,309,946,600
|
Menu
About Vantage 101
Welcome to Vantage 101, the machine learning engineering course that bridges the gap between university and the business world. This course is designed to quickly get a grasp on all best practices you wish you would have known at the beginning of your career.
GitHub-Logo Check out the GitHub repo here
Questions or feedback? Let us know!
Chapter 5: Object Oriented Programming
Now that you are all up to date on how to write clean code, and which tools can help you to enforce the right standards, it is time to delve into the realm of object oriented programming (OOP). OOP will help you to keep your code structured, improve your productivity, increase the quality of your code and lesser its maintenance cost.
5.1 What is OOP?
Object-oriented programming (OOP) is a programming paradigm that deals with objects. An object is an instance of a class. Most of the widely used programming languages, such as Python and C++, support OOP as well as other paradigms such as functional programming. In data science, you will often encounter OOP, and it is important to know your way around it, and to know when (not) to use it.
A class can be considered as a blueprint of an object, and an object is an individual instance of a class. For example, in Python you can have a class Person, where a Person can have an age and a name, and construct two Person objects:
class Person:
def __init__(self,
age: int,
name: str):
self.age = age
self.name = name
def print_name_and_age(self):
print(f"Person {self.name} is {self.age} years old.")
anne = Person(age=41, name="Anne")
bob = Person(age=28, name="Bob")
The self keyword, as the name suggests, is used with a class to refer to the object itself. The age and name are variables that belong to this class, because they are prefixed with the self keyword – these are called attributes of the class. The print_name_and_age function also belongs to this class, because its first argument is the self keyword – this is called a class method.
Dunder methods
The __init__() method is a special type of method (called a "magic" or "dunder" method, as in "double underscore"). This method allows for setting attributes when instantiating the class. It takes the input parameters (e.g. age), which exist only in the scope of __init__(), and can use them to create attributes (e.g. self.age) which exist during the lifetime of the class object.
You can use these attributes and methods as follows:
>>> anne.print_name_and_age()
Person Anne is 41 years old.
>>> print(anne.age)
41
So instead of using self, we use the actual name of the object instance.
Some dunder methods can be useful for defining how objects interact with built-in operators and functions. For example, the __len__(self) method defines what happens when you call the built-in len() function on an object, and the __add__(self, other) method defines what happens when you use the + operator with this object. These two methods are useful if you are defining your own Dataset class, for instance.
The dataclasses library offers a @dataclass decorator that automatically adds dunder methods. For example:
from dataclasses import dataclass
@dataclass()
class InventoryItem:
name: str
unit_price: float
quantity_on_hand: int = 0
def total_cost(self) -> float:
return self.unit_price * self.quantity_on_hand
carrot_items = InventoryItem(name="Carrot",
unit_price=1.23,
quantity_on_hand=42)
print(carrot_items.total_cost())
print(carrot_items) # Print `__repr__` output
This yields:
51.66
InventoryItem(name='Carrot', unit_price=1.23, quantity_on_hand=42)
We can see that the __init__() and __repr__() methods were defined implicitly by the decorator.
Using objects from libraries
Libraries often contain classes to let the user instantiate objects, so they can interact with the methods and attributes. For example, the scikit-learn package provides commonly used algorithms in the form of classes. You can create a model simply by instantiating an object (e.g. using reg = LinearRegression()), use its .fit() method to train it on a dataset, and .predict() to see how it performs on new data. Note that datasets are themselves typically class objects too, for example the DataFrame class provided by the pandas library. One of the major advantages of classes is that they hide their underlying implementation – this is called encapsulation. You don't (and shouldn't) concern yourself with the underlying implementation of the object, but focus on how to use it in the logic of your own program.
5.2 We need to go deeper: advanced concepts in OOP
What if we need to make two similar classes that share a lot of their methods and attributes? According to the "Don't Repeat Yourself" principle, you shouldn't write these methods and attributes twice; this makes the codebase error-prone and difficult to maintain. Instead, we can use a cool OOP concept called inheritance. With inheritance, you can create a child class and import all methods and attributes from a parent class (or subclass and superclass, respectively). For example, let's revisit our two persons, Anne and Bob. Anne is a teacher, and teaches some courses. Bob is a student who's enrolled in a study program. We can create two child classes named Teacher and Student that inherit from parent class Person, and instantiate anne and bob accordingly:
class Teacher(Person):
def __init__(self,
age: int,
name: str,
courses: set):
super().__init__(age=age, name=name)
self.courses = courses
class Student(Person):
def __init__(self,
age: int,
name: str,
study_programme: str):
super().__init__(age=age, name=name)
self.study_programme = study_programme
anne = Teacher(age=41, name="Anne", courses={"Quantum Mechanics", "Advanced Algebra"})
bob = Student(age=26, name="Bob", study_programme="MSc. Theoretical Physics")
Now, the Teacher and Student class still have all the functionality of the Person class, but we didn't have to rewrite them explicitly! The super() call instantiates this functionality.
A parent class can have arbitrarily many child classes, and the inheritance chain can be arbitrarily deep. Also, a child class can inherit from multiple parent classes, a concept aptly called multiple inheritance.
Another powerful concept is polymorphism, which describes the principle that objects of different classes share the same method and attribute names. Our previous scikit-learn example is a great example of this principle: different algorithms, with different underlying implementations, all have .fit() and .predict() methods. This enables the user to do powerful things, such as looping over different objects and applying the same method calls on them. Methods and attributes can be hidden and reserved for internal use by prefixing them with two underscores.
Sometimes, you have parent classes that are only used to derive subclasses from, and you might want to preclude instantiation of the parent class. These types of classes are called abstract base classes in Python, and you can use the abc library to build them. Simply inherit from the abc.ABC class and give the parent class a generic method template:
from dataclasses import dataclass
from abc import ABC, abstractmethod
@dataclass
class Shape(ABC):
color: str
@property
@abstractmethod
def surface_area(self):
...
@dataclass
class Circle(Shape):
radius: float
@property
def surface_area(self):
return 2 * 3.1415 * self.radius
@dataclass
class Rectangle(Shape):
width: float
height: float
@property
def surface_area(self):
return self.width * self.height
rect = Rectangle(width=3, height=5, color='orange') # this is valid
print(rect.surface_area) # outputs "15"
shape = Shape(color='blue') # this gives a TypeError
5.3 OOP in data science and machine learning
You'll often encounter OOP in your data science projects, and there are cases when you should design your own classes.
As mentioned before, most machine learning libraries offer out-of-the-box algorithms as classes that you can use. For instance, scikit-learn offers classes of particular ML algorithms (e.g. RandomForestClassifier) but also classes that allow you to make a Pipeline object that concatenate preprocessor objects, model objects, and more. This allows you to only interface with the Pipeline object which encapsulates its components. A similar example is the Model class in keras, which consists of neural network layer objects, such as Input, Conv2D, or Dense instances. On this Model instance you can also call .fit(), just like in scikit-learn, or .summary() to print a string summary of the network. Like any other object in Python, these can be saved to a .pickle file and reloaded later in another script.
A common use-case in machine learning where you need to define your own classes is when you need to build a complex neural network that includes custom blocks of layers, or a custom data loader. In these cases you typically subclass a base model provided by another library and work from there. In other cases, you might want to encapsulate a custom ensemble or cascade of models into one easy-to-use class, so that you can still easily interact with it, coordinate multiple instances of them, and through polymorphism principles, compare them to other models.
Although the OOP paradigm is very important to organize and maintain code in large-scale projects, take care not to overuse it. When something can also be implemented as a standalone function or a simpler data structure (e.g. from the collections library) without losing code readability or maintainability, it is often better to opt for the simpler approach.
|
{
"url": "https://www.vantage-ai.com/vantage101/chapter-5-object-oriented-programming",
"source_domain": "www.vantage-ai.com",
"snapshot_id": "CC-MAIN-2023-06",
"warc_metadata": {
"Content-Length": "86457",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ICKGZJYGEFPSKUIGMZ4ELGMCPQZXG2FP",
"WARC-Concurrent-To": "<urn:uuid:f8808eea-9694-428f-823b-003810c669e9>",
"WARC-Date": "2023-02-04T19:07:37Z",
"WARC-IP-Address": "199.60.103.30",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:NQ2QGRCTQ3FOSJYLZ2Z4JOBDKTLHJBNB",
"WARC-Record-ID": "<urn:uuid:7585c78d-66b7-4cd0-9a9e-6eaef7cde6ee>",
"WARC-Target-URI": "https://www.vantage-ai.com/vantage101/chapter-5-object-oriented-programming",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:47efe1f4-c6a3-448b-9d99-e221e7ff2580>"
},
"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 (info@commoncrawl.org)\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,
5,
6,
24,
25,
285,
286,
329,
330,
366,
367,
406,
407,
743,
744,
761,
762,
1155,
1156,
1392,
1393,
1407,
1430,
1457,
1486,
1509,
1534,
1535,
1569,
1631,
1632,
1667,
1700,
1701,
2083,
2084,
2099,
2100,
2482,
2483,
2536,
2537,
2567,
2596,
2616,
2619,
2620,
2693,
2694,
3106,
3107,
3214,
3215,
3249,
3250,
3263,
3284,
3298,
3320,
3350,
3351,
3386,
3441,
3442,
3486,
3532,
3582,
3615,
3662,
3663,
3676,
3677,
3683,
3750,
3751,
3847,
3848,
3877,
3878,
4694,
4695,
4746,
4747,
5514,
5515,
5538,
5561,
5588,
5616,
5648,
5693,
5724,
5725,
5748,
5771,
5798,
5826,
5866,
5911,
5958,
5959,
6046,
6124,
6125,
6311,
6312,
6526,
6527,
7088,
7089,
7441,
7442,
7476,
7512,
7513,
7524,
7542,
7557,
7558,
7572,
7592,
7620,
7632,
7633,
7644,
7665,
7683,
7684,
7698,
7726,
7766,
7767,
7778,
7802,
7819,
7837,
7838,
7852,
7880,
7920,
7921,
7990,
8031,
8085,
8086,
8131,
8132,
8251,
8252,
9060,
9061,
9622,
9623
],
"line_end_idx": [
5,
6,
24,
25,
285,
286,
329,
330,
366,
367,
406,
407,
743,
744,
761,
762,
1155,
1156,
1392,
1393,
1407,
1430,
1457,
1486,
1509,
1534,
1535,
1569,
1631,
1632,
1667,
1700,
1701,
2083,
2084,
2099,
2100,
2482,
2483,
2536,
2537,
2567,
2596,
2616,
2619,
2620,
2693,
2694,
3106,
3107,
3214,
3215,
3249,
3250,
3263,
3284,
3298,
3320,
3350,
3351,
3386,
3441,
3442,
3486,
3532,
3582,
3615,
3662,
3663,
3676,
3677,
3683,
3750,
3751,
3847,
3848,
3877,
3878,
4694,
4695,
4746,
4747,
5514,
5515,
5538,
5561,
5588,
5616,
5648,
5693,
5724,
5725,
5748,
5771,
5798,
5826,
5866,
5911,
5958,
5959,
6046,
6124,
6125,
6311,
6312,
6526,
6527,
7088,
7089,
7441,
7442,
7476,
7512,
7513,
7524,
7542,
7557,
7558,
7572,
7592,
7620,
7632,
7633,
7644,
7665,
7683,
7684,
7698,
7726,
7766,
7767,
7778,
7802,
7819,
7837,
7838,
7852,
7880,
7920,
7921,
7990,
8031,
8085,
8086,
8131,
8132,
8251,
8252,
9060,
9061,
9622,
9623,
9982
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9982,
"ccnet_original_nlines": 152,
"rps_doc_curly_bracket": 0.0006010800134390593,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36764705181121826,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.010141990147531033,
"rps_doc_frac_lines_end_with_ellipsis": 0.006535950116813183,
"rps_doc_frac_no_alph_words": 0.2281947284936905,
"rps_doc_frac_unique_words": 0.35640138387680054,
"rps_doc_mean_word_length": 5.206920623779297,
"rps_doc_num_sentences": 106,
"rps_doc_symbol_to_word_ratio": 0.0025355000980198383,
"rps_doc_unigram_entropy": 5.524256706237793,
"rps_doc_word_count": 1445,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.027644870802760124,
"rps_doc_frac_chars_dupe_6grams": 0.017809679731726646,
"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.005980859976261854,
"rps_doc_frac_chars_top_3gram": 0.013290800154209137,
"rps_doc_frac_chars_top_4gram": 0.006778310053050518,
"rps_doc_books_importance": -1146.9287109375,
"rps_doc_books_importance_length_correction": -1146.9287109375,
"rps_doc_openwebtext_importance": -377.5797119140625,
"rps_doc_openwebtext_importance_length_correction": -377.5797119140625,
"rps_doc_wikipedia_importance": -638.152587890625,
"rps_doc_wikipedia_importance_length_correction": -638.152587890625
},
"fasttext": {
"dclm": 0.7799248695373535,
"english": 0.8841844797134399,
"fineweb_edu_approx": 3.231675624847412,
"eai_general_math": 0.9544728994369507,
"eai_open_web_math": 0.07827329635620117,
"eai_web_code": 0.9855347275733948
}
}
|
{
"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": "006.31",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Cognitive 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": "-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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
381,687,808,532,204,700
|
You are here: Home > D >
DMG Extractor 1.1.1.1 crack
Description:
How to use DMG Extractor 1.1.1.1 crack : A crack is a modified copy of a file that has been "pre-hacked" by the cracker. A patch is a separate software that is applied to an installed software to generate a cracked file (EXE, DLL, etc).
Cracks: Backup original files. copy&paste the crack into program folder where you installed, choose replace file while it is asked.
Patches: Make sure the program isn't running, Backup original files. copy&paste the patch into program folder where you installed, then run the patch.
this cracks/patches may not work for other versions of DMG Extractor . so check your DMG Extractor version carefully. for more information read .nfo/.txt/.diz file include in downloaded file.
loading...
DMG Extractor 1.1.1.1 crack help:
This crack/patch has been analysed manually, no virus, no adware, no spyware included. Sometimes antivirus software may give an false alert while you using keygens/cracks, just ignore it and relax.
Use unzip tools to extract the file( DMG Extractor ) you downloaded. If you don't have one, try:
7-Zip(free,opensource), WinRAR(commercial), WinZip(commercial).
Due to the technical limitations, there are still a small possibility of wrong detection, so don't use keygens or cracks directly in production environments(like online server,industrial control computer,etc).
DMG Extractor 1.1.1.1 crack is released by Unknown. Thanks to the anonymous hero. This crack was uploaded by Garth who live in Cathy, thanks Garth.
If you like DMG Extractor , buy it to support the developer of DMG Extractor.
|
{
"url": "http://keygen.la/D/DMG-Extractor-1-1-1-1-crack.html",
"source_domain": "keygen.la",
"snapshot_id": "crawl=CC-MAIN-2013-48",
"warc_metadata": {
"Content-Length": "16530",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ALXU5657JZ4TZJU4JI7FIGK73WFYQV6X",
"WARC-Concurrent-To": "<urn:uuid:09b2b863-6914-4122-97c0-810effadcd0b>",
"WARC-Date": "2013-12-07T03:15:24Z",
"WARC-IP-Address": "42.121.116.74",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:J4UOUYJGCKG5GYLJ2T67HPMQPFR5JDVI",
"WARC-Record-ID": "<urn:uuid:bb510bbc-c9c9-47f3-9397-be37713d618e>",
"WARC-Target-URI": "http://keygen.la/D/DMG-Extractor-1-1-1-1-crack.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4a20ce96-e7bf-4e5f-a303-0e8d75cc8c70>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-33-133-15.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2013-48\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for Winter 2013\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,
26,
54,
55,
68,
69,
306,
438,
589,
781,
792,
793,
827,
828,
1026,
1123,
1187,
1397,
1545
],
"line_end_idx": [
25,
26,
54,
55,
68,
69,
306,
438,
589,
781,
792,
793,
827,
828,
1026,
1123,
1187,
1397,
1545,
1622
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1622,
"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.2777777910232544,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03888889029622078,
"rps_doc_frac_lines_end_with_ellipsis": 0.05000000074505806,
"rps_doc_frac_no_alph_words": 0.27222222089767456,
"rps_doc_frac_unique_words": 0.5766128897666931,
"rps_doc_mean_word_length": 5.137096881866455,
"rps_doc_num_sentences": 34,
"rps_doc_symbol_to_word_ratio": 0.0027777799405157566,
"rps_doc_unigram_entropy": 4.67812442779541,
"rps_doc_word_count": 248,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.10204081982374191,
"rps_doc_frac_chars_dupe_6grams": 0.05337519943714142,
"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.08477237075567245,
"rps_doc_frac_chars_top_3gram": 0.050235480070114136,
"rps_doc_frac_chars_top_4gram": 0.06593406945466995,
"rps_doc_books_importance": -212.2196807861328,
"rps_doc_books_importance_length_correction": -198.41578674316406,
"rps_doc_openwebtext_importance": -140.5540008544922,
"rps_doc_openwebtext_importance_length_correction": -140.5540008544922,
"rps_doc_wikipedia_importance": -112.71363067626953,
"rps_doc_wikipedia_importance_length_correction": -99.5026626586914
},
"fasttext": {
"dclm": 0.058379288762807846,
"english": 0.9057414531707764,
"fineweb_edu_approx": 1.573551058769226,
"eai_general_math": 0.35603880882263184,
"eai_open_web_math": 0.21832329034805298,
"eai_web_code": 0.027847589924931526
}
}
|
{
"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": "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": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "19",
"label": "Spam / Ads"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "1",
"label": "Technically Flawed"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
1,907,622,498,434,502,100
|
Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.
> Docs Center > Using IDL > Working With Widget IDs
IDL
Working With Widget IDs
Working With Widget IDs
Any widget application capable of doing real work will include one or more routines that are separate from the routine that creates the widget hierarchy, designed to handle and respond to user-generated events. Event processing routines are the routines that process information contained in widget event structures and respond accordingly; they often retrieve information contained in the widget values of the widgets that make up the interface, perform calculations, and modify the widget interface itself in response to user actions.
Since a widget ID is required to retrieve information from or set values in a widget, you will need a way for your event processing routines to retrieve the ID of a specified widget. This section describes techniques you can use to pass widget IDs between the routines in your widget application, most notably between the widget creation routine (where widget IDs are generated) and the event processing routines.
Use the Widget Event Structure
Every time a user interacts with a widget using the mouse or keyboard, a widget event structure is generated. Widget event structures contain the widget ID of the widget that generated the event. In addition, widget event structures provide the widget ID of the top-level base in the widget hierarchy to which the widget the generated the event belongs.
Getting the widget ID of the appropriate widget from the event structure is almost always the preferred method for passing a widget ID from one routine to another within your application. Widget event processing is discussed in detail in Widget Event Processing.
Pass the Widget ID Using a Widget User Value
The widget event structure always includes two widget IDs: the ID of the widget that generated the event, and the ID of the top-level base widget. If you need to pass multiple widget IDs between routines, it is often useful to place the widget ID values in the user value of the top-level base widget. Widget user values are discussed in Widget User Values.
Use a User Name to Locate the Widget
One of the pieces of information you can specify when you create a widget is a user name. You can associate a name with each widget in a specific hierarchy, and then use that name to query the widget hierarchy and get the correct widget ID. To specify a user name, set the UNAME keyword to the widget creation routine equal to a string that can be used to identify the widget in your code.
To query the widget hierarchy, use the WIDGET_INFO function with the widget ID of the top-level base widget and the FIND_BY_UNAME keyword. Note that user names must be unique within the widget hierarchy, because the FIND_BY_UNAME keyword returns the ID of the first widget with the specified name.
Pass the Widget ID Explicitly
In some cases, you may need to pass a specific widget ID available in one routine to a second routine. In this case, you can specify the widget ID as a parameter when calling the second routine from the first. While this method is not so general as using the widget event structure, it is useful in some circumstances.
Use a COMMON Block
In rare cases, it may be useful to store widget IDs in a COMMON block, making them available to all routines in the application. While using a COMMON block may seem like a good strategy on first inspection, this method has several drawbacks. Most importantly, using a COMMON block to hold widget IDs means that only one instance of a given widget application can be running at once.
© 2019 Harris Geospatial Solutions, Inc. | Legal
My Account | Store | Contact Us
|
{
"url": "http://www.harrisgeospatial.com/docs/Working_With_Widget_IDs.html",
"source_domain": "www.harrisgeospatial.com",
"snapshot_id": "crawl=CC-MAIN-2019-13",
"warc_metadata": {
"Content-Length": "191297",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:QXVAJQFIXM4T7XVQZKZ652AUZWUJ7IUS",
"WARC-Concurrent-To": "<urn:uuid:232d5247-2f40-4d48-9af1-f40322d65377>",
"WARC-Date": "2019-03-23T09:23:37Z",
"WARC-IP-Address": "192.5.156.19",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:K2M4IC4GUAQBQF6QRYI6UBMLW3BYDPTY",
"WARC-Record-ID": "<urn:uuid:e51e25af-bb04-42f1-bc7d-7a2f45093a93>",
"WARC-Target-URI": "http://www.harrisgeospatial.com/docs/Working_With_Widget_IDs.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1df912ce-bf3a-454e-a936-94f34ebb417b>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-140-190-246.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,
111,
113,
114,
173,
174,
178,
179,
203,
204,
228,
229,
766,
767,
1181,
1182,
1213,
1214,
1215,
1569,
1570,
1833,
1834,
1879,
1880,
1881,
2239,
2240,
2277,
2278,
2279,
2669,
2670,
2968,
2969,
2999,
3000,
3001,
3320,
3321,
3340,
3341,
3342,
3725,
3726,
3727,
3728,
3778
],
"line_end_idx": [
111,
113,
114,
173,
174,
178,
179,
203,
204,
228,
229,
766,
767,
1181,
1182,
1213,
1214,
1215,
1569,
1570,
1833,
1834,
1879,
1880,
1881,
2239,
2240,
2277,
2278,
2279,
2669,
2670,
2968,
2969,
2999,
3000,
3001,
3320,
3321,
3340,
3341,
3342,
3725,
3726,
3727,
3728,
3778,
3821
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3821,
"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.42231637239456177,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03672315925359726,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.09180790930986404,
"rps_doc_frac_unique_words": 0.3229329288005829,
"rps_doc_mean_word_length": 4.77691125869751,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.515480041503906,
"rps_doc_word_count": 641,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09764859825372696,
"rps_doc_frac_chars_dupe_6grams": 0.050620511174201965,
"rps_doc_frac_chars_dupe_7grams": 0.04049640893936157,
"rps_doc_frac_chars_dupe_8grams": 0.02220771089196205,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.07348138093948364,
"rps_doc_frac_chars_top_3gram": 0.028739390894770622,
"rps_doc_frac_chars_top_4gram": 0.016982359811663628,
"rps_doc_books_importance": -383.9190673828125,
"rps_doc_books_importance_length_correction": -383.9190673828125,
"rps_doc_openwebtext_importance": -225.82444763183594,
"rps_doc_openwebtext_importance_length_correction": -225.82444763183594,
"rps_doc_wikipedia_importance": -180.2273712158203,
"rps_doc_wikipedia_importance_length_correction": -180.2273712158203
},
"fasttext": {
"dclm": 0.06630414724349976,
"english": 0.8444790840148926,
"fineweb_edu_approx": 1.964295744895935,
"eai_general_math": 0.09340178966522217,
"eai_open_web_math": 0.00421214010566473,
"eai_web_code": 0.9330408573150635
}
}
|
{
"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": "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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,577,839,175,134,262,000
|
//some 3rd party need geo
Re-connecting broadband to four computer's?.
spuds 15:05 06 Jun 12
Locked
Answered
I have previously had four computer's connected to broadband, but three of these were disconnected some time ago, and I now wish to reconnect, but I am having problems doing so.
The main computer runs on XP Home, another on XP Pro, the third on Windows 7 and a laptop on Vista. The main computer is hard-wired, as are the other 2 desktop's, the laptop is wireless and roaming within the home.
Main problem, I do not seem to be able to make a connection to the three other units, especially when it asks for passwords, which I have since forgotten. I have attempted to use the various operating system programs, without much success. Perhaps more me, than the computer's?.
Any help would be appreciated, but I must point out that the grey matter between the ear's is not working very well at the moment!.
KRONOS the First 15:14 06 Jun 12
What do you mean by password, I have 3 PC's connected via Ethernet cable a few wireless bits and pieces which only needed a password to log into my network. So that was the password on the router. if i am connecting a PC that I am repairing then it is just the case of plugging in another Ethernet cable and i am good to go.
You might need to reset your routers password,either by any button or more likely a pin in a little hole and then change the default password of the router to something you are likely to remember.
spuds 15:39 06 Jun 12
Chronus, that's the problem I seem to be having, the router is working with the main computer, but doesn't want to work with the other computer's. When I attempt to connect to the other computer's using auto-find or their own internet wizards, they appear to require the/a password?.
The router I am using is a TalkTalk supplied Huawei EchoLife 520b. I didn't want to try the pin in hole reset, in fear of losing the broadband connection altogether.
Not to sure if I am explaining myself properly?.
interzone55 16:05 06 Jun 12
Are the computers wired to the router, or are they wireless?
If hard wired the I'm not sure why they're getting a password request. If it's wireless the password is usually underneath the router with Talk Talk unless you changed it
KRONOS the First 16:22 06 Jun 12
I am not sure what you mean by "Auto find and their own internet wizards" If the PC's hard hardwired then they should not ask for a password, the wireless one will the first time you connect but not after that.
Perhaps I am missing something here. Have you tried a router reset yet?
spuds 19:11 06 Jun 12
alan14, as I said earlier, the three desktop computer's are hard-wired, and the laptop is wireless.
The password was changed by TalkTalk, and I have attempted to use the one I think is correct, but apparently it is not being accepted when trying to set-up the now disconnected computers?.
spuds 19:16 06 Jun 12
Chronus, the wireless laptop wouldn't connect, so I tried using Vista install wizard option (auto find?). it would not connect because it was requesting a password?.
I haven't tried a reset, because I was a little concerned about upsetting the one connection that I am using.
Woolwell 19:58 06 Jun 12
You should be able to enter the router's configuration pages and find the wireless password (probably not the same as for broadband) and if it is unreadable change the password so that the Vista laptop can log in to the wireless network.
interzone55 20:40 06 Jun 12
You shouldn't need a password for the hard wired computers, as long as they're in the same IP address range as the router they should just connect.
The router will most likely be 192.168.1.1
So change the IP addresses of the computers to 192.168.1.10 , 192.168.1.11 & 192.168.1.12
Woolwell 20:46 06 Jun 12
alan14 - The IP address should be allocated automatically.
spuds 16:22 08 Jun 12
Answer
Update.
I have now got internet connections with the desktops. All it leaves now, is the laptop with Vista, and the password request?.
Thanks everyone for the input. Will now tick as resolved.
This thread is now locked and can not be replied to.
What is Google Allo? What is Google Duo? Google Allo UK release date rumours and features: Google…
1995-2015: How technology has changed the world in 20 years
These clever designs help visualise a complex intelligence tool
iOS 10 troubleshooting tips: Simple fixes for the most common iOS 10 problems, from network…
|
{
"url": "http://www.pcadvisor.co.uk/forum/helproom-1/re-connecting-broadband-four-computers-4146048/",
"source_domain": "www.pcadvisor.co.uk",
"snapshot_id": "crawl=CC-MAIN-2016-40",
"warc_metadata": {
"Content-Length": "67801",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LMJP2C6FMBUZBWTT6P6T2GDFZ77GXN4R",
"WARC-Concurrent-To": "<urn:uuid:a37d65c3-8081-4d5a-88c6-3c2576744145>",
"WARC-Date": "2016-09-25T05:03:38Z",
"WARC-IP-Address": "104.16.78.203",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:GUTHI44N4RSKNRAHJXNQV2HLR7JU6W37",
"WARC-Record-ID": "<urn:uuid:ca4c151a-d581-416c-a90b-5bc4bd9d88e0>",
"WARC-Target-URI": "http://www.pcadvisor.co.uk/forum/helproom-1/re-connecting-broadband-four-computers-4146048/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4f44e5c9-aeca-4098-ac40-18faab4a8a59>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-143-35-109.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-40\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for September 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,
26,
27,
72,
73,
97,
104,
113,
114,
292,
293,
508,
509,
788,
789,
921,
922,
957,
958,
1283,
1284,
1481,
1482,
1506,
1507,
1791,
1792,
1958,
1959,
2008,
2009,
2039,
2040,
2101,
2102,
2273,
2274,
2309,
2310,
2521,
2522,
2594,
2595,
2619,
2620,
2720,
2721,
2910,
2911,
2935,
2936,
3102,
3103,
3213,
3214,
3241,
3242,
3480,
3481,
3511,
3512,
3660,
3661,
3704,
3705,
3795,
3796,
3823,
3824,
3883,
3884,
3908,
3915,
3916,
3924,
3925,
4052,
4053,
4111,
4112,
4165,
4166,
4265,
4266,
4326,
4327,
4391,
4392
],
"line_end_idx": [
26,
27,
72,
73,
97,
104,
113,
114,
292,
293,
508,
509,
788,
789,
921,
922,
957,
958,
1283,
1284,
1481,
1482,
1506,
1507,
1791,
1792,
1958,
1959,
2008,
2009,
2039,
2040,
2101,
2102,
2273,
2274,
2309,
2310,
2521,
2522,
2594,
2595,
2619,
2620,
2720,
2721,
2910,
2911,
2935,
2936,
3102,
3103,
3213,
3214,
3241,
3242,
3480,
3481,
3511,
3512,
3660,
3661,
3704,
3705,
3795,
3796,
3823,
3824,
3883,
3884,
3908,
3915,
3916,
3924,
3925,
4052,
4053,
4111,
4112,
4165,
4166,
4265,
4266,
4326,
4327,
4391,
4392,
4484
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4484,
"ccnet_original_nlines": 87,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4262295067310333,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.036885250359773636,
"rps_doc_frac_lines_end_with_ellipsis": 0.022727269679307938,
"rps_doc_frac_no_alph_words": 0.21004098653793335,
"rps_doc_frac_unique_words": 0.40025413036346436,
"rps_doc_mean_word_length": 4.428208351135254,
"rps_doc_num_sentences": 51,
"rps_doc_symbol_to_word_ratio": 0.002049179980531335,
"rps_doc_unigram_entropy": 5.15187931060791,
"rps_doc_word_count": 787,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.012625539675354958,
"rps_doc_frac_chars_dupe_6grams": 0.012625539675354958,
"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.01578192040324211,
"rps_doc_frac_chars_top_3gram": 0.020086079835891724,
"rps_doc_frac_chars_top_4gram": 0.01090386975556612,
"rps_doc_books_importance": -315.39453125,
"rps_doc_books_importance_length_correction": -315.39453125,
"rps_doc_openwebtext_importance": -196.18675231933594,
"rps_doc_openwebtext_importance_length_correction": -196.18675231933594,
"rps_doc_wikipedia_importance": -163.7108154296875,
"rps_doc_wikipedia_importance_length_correction": -163.7108154296875
},
"fasttext": {
"dclm": 0.07749199867248535,
"english": 0.9555460810661316,
"fineweb_edu_approx": 1.7535569667816162,
"eai_general_math": 0.27850085496902466,
"eai_open_web_math": 0.1946110725402832,
"eai_web_code": 0.12917160987854004
}
}
|
{
"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": "-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": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,943,147,467,882,459,000
|
PowerBook - Remove scratches? And a couple other questions..
Discussion in 'PowerPC Macs' started by JacobC, Jan 31, 2008.
1. JacobC macrumors member
Joined:
Jan 1, 2008
#1
I may be getting a powerbook and it's pretty scratched up on the outside of the computer and bottom, is there a way, or something that I could buy that would remove the scratches?
Also, it is missing the " ~`" Key, right below exit, is there somewhere I could go to get a spare one?
Okay so basically here's what is not working properly:
Broken latch, missing `~ key. And the battery is shot.
I would be interested in where to find these things..
Thanks again!
P.S. It's a 12.1" G4
2. iToaster macrumors 68000
iToaster
Joined:
May 3, 2007
Location:
In front of my MacBook Pro
#2
Apple has keys, you'd have to buy new casing for it to get rid of scratches, and you can find PB batteries online (google) and maybe in an :apple: store... link.
Share This Page
|
{
"url": "http://forums.macrumors.com/threads/powerbook-remove-scratches-and-a-couple-other-questions.425499/",
"source_domain": "forums.macrumors.com",
"snapshot_id": "crawl=CC-MAIN-2016-44",
"warc_metadata": {
"Content-Length": "130249",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:42TUPC5TXD3C5E3YFKOBQSHU7GLIHDYA",
"WARC-Concurrent-To": "<urn:uuid:ba999bcc-110c-47a1-b862-5cb8c3fb6a74>",
"WARC-Date": "2016-10-21T22:45:19Z",
"WARC-IP-Address": "162.254.116.214",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:UIF6VT5JFJS7L6JV34VI7LQYEL6LBMS7",
"WARC-Record-ID": "<urn:uuid:ff7b1b87-8085-40cc-9f2d-4c72516aa849>",
"WARC-Target-URI": "http://forums.macrumors.com/threads/powerbook-remove-scratches-and-a-couple-other-questions.425499/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:54f22d10-1bca-4ce1-a956-d8d50616634e>"
},
"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,
61,
62,
124,
125,
154,
155,
167,
183,
190,
374,
375,
482,
483,
542,
543,
602,
603,
661,
662,
680,
681,
706,
712,
742,
743,
756,
757,
769,
785,
799,
830,
837,
1003,
1009,
1010
],
"line_end_idx": [
61,
62,
124,
125,
154,
155,
167,
183,
190,
374,
375,
482,
483,
542,
543,
602,
603,
661,
662,
680,
681,
706,
712,
742,
743,
756,
757,
769,
785,
799,
830,
837,
1003,
1009,
1010,
1025
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1025,
"ccnet_original_nlines": 35,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36036035418510437,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.036036040633916855,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.27927929162979126,
"rps_doc_frac_unique_words": 0.6706587076187134,
"rps_doc_mean_word_length": 4.209580898284912,
"rps_doc_num_sentences": 17,
"rps_doc_symbol_to_word_ratio": 0.01351351011544466,
"rps_doc_unigram_entropy": 4.559311389923096,
"rps_doc_word_count": 167,
"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.034139398485422134,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -91.93038177490234,
"rps_doc_books_importance_length_correction": -91.93038177490234,
"rps_doc_openwebtext_importance": -57.79655456542969,
"rps_doc_openwebtext_importance_length_correction": -44.158138275146484,
"rps_doc_wikipedia_importance": -47.25166702270508,
"rps_doc_wikipedia_importance_length_correction": -47.25166702270508
},
"fasttext": {
"dclm": 0.11669319868087769,
"english": 0.9575060606002808,
"fineweb_edu_approx": 1.0129607915878296,
"eai_general_math": 0.019763590767979622,
"eai_open_web_math": 0.22355186939239502,
"eai_web_code": 0.00006222999945748597
}
}
|
{
"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": "-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": "1",
"label": "Factual"
}
},
"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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,676,185,405,143,286,000
|
2
$\begingroup$
This question
Everybody wants to know what's going on with this but we should leave it to Twitter, Reddit, blogs, etc. There is very little actual Mathematics in the discussion I linked to.
(I am supposed to ask a question) Why not?
| |
$\endgroup$
• $\begingroup$ I guess this should be tagged (on-topic) - since it is a discussion whether questions like that are suitable for this site or not. I was also thinking about (specific-question) , I am not sure whether it's a good fit - the question is probably more about one specific topic that tied to one particular question (the one linked in the post). $\endgroup$ – Martin Sleziak Apr 7 at 4:13
• 2
$\begingroup$ Regarding the remark "leave it to Twitter, Reddit, blogs, ...", I'll just remind that MathOverflow has its own chatroom and on Mathematics there is Number Theory room - but neither of them is visited vary often. $\endgroup$ – Martin Sleziak Apr 7 at 4:15
11
$\begingroup$
I see a reasonable amount of mathematics in the answers, together with links to relevant discussions and papers.
I think the question is not about gossip, and it is a valuable service to mathematicians who are not themselves experts in the relevant topic such as myself.
I should probably add that I find the topic of obvious mathematical interest, and the links and surrounding discussion useful. The gossip, not so much.
| |
$\endgroup$
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged .
|
{
"url": "https://meta.mathoverflow.net/questions/4503/mo-is-not-the-place-for-mochizuki-news",
"source_domain": "meta.mathoverflow.net",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "102138",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:IY2A6DPICQRBOD7FFLCDEBKXWI4W24Q3",
"WARC-Concurrent-To": "<urn:uuid:cf148cee-7e0f-4a40-97a7-a1c69f7dedca>",
"WARC-Date": "2020-08-07T09:37:41Z",
"WARC-IP-Address": "151.101.193.69",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ZFO6OUOM6B2MTBC24GLCG5AKGAGFLO3H",
"WARC-Record-ID": "<urn:uuid:ea0c793b-4a77-43f7-a36b-04873ad74175>",
"WARC-Target-URI": "https://meta.mathoverflow.net/questions/4503/mo-is-not-the-place-for-mochizuki-news",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cbf3d588-0154-4ed0-bd20-efede0515565>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-25.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,
2,
16,
17,
31,
32,
208,
209,
252,
253,
257,
269,
671,
677,
950,
953,
967,
968,
1081,
1082,
1240,
1241,
1393,
1394,
1398,
1410,
1411,
1452,
1453
],
"line_end_idx": [
2,
16,
17,
31,
32,
208,
209,
252,
253,
257,
269,
671,
677,
950,
953,
967,
968,
1081,
1082,
1240,
1241,
1393,
1394,
1398,
1410,
1411,
1452,
1453,
1519
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1519,
"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.42105263471603394,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.030959749594330788,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.23839008808135986,
"rps_doc_frac_unique_words": 0.541832685470581,
"rps_doc_mean_word_length": 4.637450218200684,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0.0030959800351411104,
"rps_doc_unigram_entropy": 4.629018306732178,
"rps_doc_word_count": 251,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09450171887874603,
"rps_doc_frac_chars_dupe_6grams": 0.09450171887874603,
"rps_doc_frac_chars_dupe_7grams": 0.04810997098684311,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.017182130366563797,
"rps_doc_frac_chars_top_3gram": 0.015463920310139656,
"rps_doc_frac_chars_top_4gram": 0.027491409331560135,
"rps_doc_books_importance": -125.72978210449219,
"rps_doc_books_importance_length_correction": -115.39996337890625,
"rps_doc_openwebtext_importance": -68.37995147705078,
"rps_doc_openwebtext_importance_length_correction": -68.37995147705078,
"rps_doc_wikipedia_importance": -51.46797561645508,
"rps_doc_wikipedia_importance_length_correction": -38.76349639892578
},
"fasttext": {
"dclm": 0.08524805307388306,
"english": 0.9422084093093872,
"fineweb_edu_approx": 1.3092126846313477,
"eai_general_math": 0.192205548286438,
"eai_open_web_math": 0.19337069988250732,
"eai_web_code": 0.0007939899805933237
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "510",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": ""
}
},
"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": "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": "1",
"label": "Leftover HTML"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"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": "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": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,072,038,105,811,838,500
|
ГДЗ Страница 91 учебник по математике 4 класс 2 часть Моро
Рекомендуемые решебники
Выбрать другое задание / страницу
ОТВЕТЫ К ЗАДАНИЯМ
8. Объясни, как можно узнать:
1) одно из двух слагаемых, если известны сумма и другое слагаемое;
2) уменьшаемое, если известны разность и вычитаемое;
3) вычитаемое, если известны уменьшаемое и разность.
1) Из суммы вычесть известное слагаемое.
2) К разности прибавить вычитаемое.
3) Из уменьшаемого вычесть разность.
9. Заполни таблицы.
Слагаемое 25 8 70 Уменьшаемое 80 20 25
Слагаемое 6 12 25 Вычитаемое 75 17 15
Сумма 31 20 95 Разность 5 3 10
10. Реши уравнения.
x — 69 = 76
x = 76 + 69
x = 135
84 — x = 43
x = 84 — 43
x = 41
x + 48 = 95
x = 95 — 48
x = 47
34 + x = 82
x = 82 — 34
x = 48
11. Объясни, что означают записи на полях, и реши уравнения.
1 и 2: если одно из двух слагаемых равно нулю, сумма равнf другому слагаемому.
3: если из числа вычесть ноль, то получится число, из которого вычитали.
4: если уменьшаемое и вычитаемое равны, то их разность равна нулю.
156 — x = 156
x = 156 — 156
x = 0
x + 267 = 267
x = 267 — 267
x = 0
987 + x = 987
x = 987 — 987
x = 0
x — 17 = 0
x = 0 + 17
x = 17
12. Найди значения выражений.
1970 + 0 = 1970
1970 — 0 = 1970
239 + (437 — 437) = 239 + 0 = 239
365 — (260 + 105) = 365 — 365 = 0
560 — (260 + 300) + 99 = 560 — 560 + 99 = 0 + 99 = 99
(87 – 87) + (78 – 78) = 0 + 0 = 0
13. Чему равна сумма двух слагаемых, если одно из них равно нулю?
Чему равна разность, если вычитаемое равно нулю?
Сумма равна другому слагаемому.
Разность равна уменьшаемому.
14. Приведи примеры, когда сумма двух слагаемых равна одному из них; когда разность равна уменьшаемому; когда разность равна нулю.
30 + 0 = 50
10 — 0 = 10
25 — 25 = 0
15. Какие свойства сложения ты знаешь (с. 120)?
Объясни, почему верны следующие равенства:
16 + 75 = 75 + 16
8 + 17 + 3 = 8 + 20
Равенство 16 + 75 = 75 + 16 верно на основании переместительного свойства сложения.
Равенство 8+17+3=8+20 верно на основании того, что два соседних слагаемых можно заменять их суммой.
16. Используя и перестановку, и группировку слагаемых, числа можно складывать в любом порядке. Объясни, как можно легче выполнить сложение.
54 + 18 + 26 + 2
27 + 16 + 13 + 7 + 3 + 14
54 + 18 + 26 + 2 = (54 + 26) + (18 + 2) = 80 + 20 = 100
27 + 16 + 13 + 7 + 3 + 14 = (27 + 13) + (16 + 14) + (7 + 3) = 40 + 30 + 10 = 80
Задание на полях
250 300 50
0 200 400
350 100 150
|
{
"url": "https://bobotan.ru/otvety-k-stranice-91/",
"source_domain": "bobotan.ru",
"snapshot_id": "crawl=CC-MAIN-2021-17",
"warc_metadata": {
"Content-Length": "78913",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:XILW7LT5XOCZTMQHVSDATVFNO6GJDMGN",
"WARC-Concurrent-To": "<urn:uuid:adf4d52d-118f-4101-9f04-9edcdde72234>",
"WARC-Date": "2021-04-14T13:55:24Z",
"WARC-IP-Address": "172.67.149.136",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:RYKOZGTEXRHJJEQIS5GLBF4HN3VTRNVK",
"WARC-Record-ID": "<urn:uuid:12e05733-976e-4b00-8753-913de3c4653d>",
"WARC-Target-URI": "https://bobotan.ru/otvety-k-stranice-91/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:98173145-410e-4c67-8af6-931462e30696>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-117.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,
59,
60,
84,
85,
119,
120,
138,
139,
169,
236,
289,
342,
343,
384,
420,
457,
458,
478,
479,
528,
580,
640,
641,
661,
662,
674,
686,
694,
695,
707,
719,
726,
727,
739,
751,
758,
759,
771,
783,
790,
791,
852,
853,
932,
1005,
1072,
1086,
1100,
1106,
1107,
1121,
1135,
1141,
1142,
1156,
1170,
1176,
1177,
1188,
1199,
1206,
1207,
1237,
1238,
1254,
1270,
1304,
1338,
1392,
1426,
1427,
1493,
1542,
1543,
1575,
1604,
1605,
1736,
1737,
1749,
1761,
1773,
1774,
1822,
1865,
1883,
1903,
1904,
1988,
2088,
2089,
2229,
2246,
2272,
2273,
2329,
2409,
2410,
2427,
2428,
2441,
2455
],
"line_end_idx": [
59,
60,
84,
85,
119,
120,
138,
139,
169,
236,
289,
342,
343,
384,
420,
457,
458,
478,
479,
528,
580,
640,
641,
661,
662,
674,
686,
694,
695,
707,
719,
726,
727,
739,
751,
758,
759,
771,
783,
790,
791,
852,
853,
932,
1005,
1072,
1086,
1100,
1106,
1107,
1121,
1135,
1141,
1142,
1156,
1170,
1176,
1177,
1188,
1199,
1206,
1207,
1237,
1238,
1254,
1270,
1304,
1338,
1392,
1426,
1427,
1493,
1542,
1543,
1575,
1604,
1605,
1736,
1737,
1749,
1761,
1773,
1774,
1822,
1865,
1883,
1903,
1904,
1988,
2088,
2089,
2229,
2246,
2272,
2273,
2329,
2409,
2410,
2427,
2428,
2441,
2455,
2466
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2466,
"ccnet_original_nlines": 102,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.038277510553598404,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007974480278789997,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.960127592086792,
"rps_doc_frac_unique_words": 0.39080458879470825,
"rps_doc_mean_word_length": 3.8183908462524414,
"rps_doc_num_sentences": 32,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.752508640289307,
"rps_doc_word_count": 435,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01204094011336565,
"rps_doc_frac_chars_dupe_6grams": 0.01204094011336565,
"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.0313064381480217,
"rps_doc_frac_chars_top_3gram": 0.018061410635709763,
"rps_doc_frac_chars_top_4gram": 0.022877780720591545,
"rps_doc_books_importance": -328.9473571777344,
"rps_doc_books_importance_length_correction": -328.9473571777344,
"rps_doc_openwebtext_importance": -179.15771484375,
"rps_doc_openwebtext_importance_length_correction": -179.15771484375,
"rps_doc_wikipedia_importance": -207.7076416015625,
"rps_doc_wikipedia_importance_length_correction": -207.7076416015625
},
"fasttext": {
"dclm": 0.9978780746459961,
"english": 0.0002076700038742274,
"fineweb_edu_approx": 1.6976743936538696,
"eai_general_math": 0.12211834639310837,
"eai_open_web_math": 0.5808011293411255,
"eai_web_code": 0.45911628007888794
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "513.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry"
}
},
"secondary": {
"code": "372.7",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Education, Elementary and Kindergarten"
}
}
},
"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": "-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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,903,327,591,168,550,000
|
KL10-D
Serial Number 1400
As usual, you can click on any image to see the high-resolution version.
The pdp-10 was the pre-VAX large system. It was octal, a 36-bit machine, and went through various incarnations between 1965 and (I think) 1983, when development finally stopped. Operating systems, TOPS-10 and TOPS-20, were wonderful pieces of s/w engineering, seeing the first implementation of ideas now in common use in o/s and network architecture. If you want to experience them firsthand, visit http://www.corestore.org/tops.html - warning, it's a large download (which will take a minute or two even on broadband) and it's a Java applet which will ask for permissions; it IS kosher!
If you're going to be a wimp and run an emulated KL instead of the real thing, you might as well use an appropriate terminal to bring it up :-)
My system is a KL10, the most powerful example of this architecture. This particular machine is one processor from a triple-cpu configuration that I rescued from British Airways at Heathrow, London, where it was in use until 1992. I understand it was running British Airways logistics & planning systems. As far as I know, it was the second last DEC 10/20 machine running in the UK - the last machine was the 2020 at Robert Gordons, which I also rescued.
It's incomplete, as I wasn't allowed to remove the memory; the system had already been assessed by the scrap merchants, and their verdict was that the memory was particularly gold-rich. They didn't mind if a CPU went missing, but they had *counted* all the memory cabinets! (it was Ampex, not DEC). Also, the I/O cabinet, where the RH controllers, memory interface etc. live was unfortunately lost (along with a 2020) when the premises I was storing them in was flooded due to a burst pipe upstairs; the DEC stuff wasn't significantly damaged, but the house above the garage where it was stored (belonged to my boss at the time) was unoccupied for an extended period, so the leak did very considerable damage there - the interior of the house had to be virtually demolished. The builders cleared the garage before I had a chance to rescue my stuff :-(
This is the CPU on an old polaroid, shortly after I rescued it. pdp-8/L in the next rack... as always, you can click on any image to see the high-resolution version in a new window.
What I do have is the complete CPU box and the console processor - a specially configured pdp-11/40 - complete with dectape and power control. I also managed to get hold of a set of diagnostic and RSX dectapes for the console, and a fairly complete set of prints and manuals. A more recent image...
pdp-15 FPU on the left... a useful illustration of the difference between '18-bit blue' and '36-bit blue'!
OK let's take a look inside... inside the front, behind the big blue door in the above image, is the CPU backplane:
A rats nets, with some seriously heavy-duty power supply wiring. It's an ECL beast, remember.
Close-up of part of the backplane...
Round the back of the chassis, there's another big blue door which leads to the 'business end' of the beast:
Opening the door, on the back of the door, the infamous 'series-pass' assembly - part of the power supply.
View of the other side of the series-pass assembly.
In front, the CPU - door removed to show a large collection of boards, all ECL.
Looking down, the three-phase transformer - the first stage of the power supply. Showing slight corrosion on top, but easily cleaned up. You would not *believe* what this whole cabinet weighs... half the weight is this transformer I think. An unofficial field modification done on quite a few KL machines was to throw away the entire DEC power supply and replace it with a modern switched-mode PSU. This could slash power consumption by up to 1/3!!!
In the top of the CPU cabinet is the serial number plate, and the QC sticker - which shows that the system received its final checkout before shipping on 10/31/80.
OK now for the front-end... a standard H960 19" rack, which lives next to the KL10-D CPU rack. It contains:
The front-end pdp-11/40 system, used to boot the KL, load microcode, run diagnostics etc.
The power distribution/control unit - a little like an 861 power control on steroids!
The system control panel - usual switches, load device, EPO, status lights, and margin check panel for the KL.
The front-end boot device - could be DECtapes or RX02 8" floppy.
The DECtape controller (TC11), if DECtape was fitted.
Some Unibus peripherals were also interfaced through it. Ran a special version of RSX.
Closeup of the KL logo on the front-end.
Control panel and TU56 DECtapes.
Looking in the rear of the front-end rack: the top of the 11/40 chassis is at the bottom of the picture. In the middle, the TU56 DECtape drive, in the top is the TC11, the Unibus DECtape controller. The power supply in the top right, in the back of the door, supplies the TC11/DECtape combination.
There are a LOT of -10 enthusiasts out there, despite the size of the beasts...
http://starfish.osfn.org/rcs/DECsystem/1090/ the RCSRI have a beautiful one!
http://pdp10.paulallen.com/ Paul Allen is rumored to have one, or be interested in one, but he presently runs a Toad...
http://www.stupi.se/Bilder/pdp-10/index.html makes me (and most other computer preservationists I suspect) look like a complete amateur!
http://www.brouhaha.com/~eric/retrocomputing/pdp-10/ Eric Smith has one...
http://www.shiresoft.com/pdp-11/kl-10 ...so does Guy Sotomayor...
starfish.rcsri.org/rcs/DECsystem/FAQ/Serial_Number_Master.pdf is a list of all known systems
http://www.aracnet.com/~healyzh/pdp10emu.html quite a few people are running 10s in emulation
|
{
"url": "http://www.corestore.org/DEC10.htm",
"source_domain": "www.corestore.org",
"snapshot_id": "crawl=CC-MAIN-2017-22",
"warc_metadata": {
"Content-Length": "9236",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:XV5S6KRIHIVADXNVKVPWVMDXL6IYA4ZJ",
"WARC-Concurrent-To": "<urn:uuid:19953bad-b3c9-4a43-8bca-dc0d0bbd5b16>",
"WARC-Date": "2017-05-30T01:20:42Z",
"WARC-IP-Address": "23.229.170.231",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ODFYS22UCKTJYV2TEMAZDEBBJF5VM6XY",
"WARC-Record-ID": "<urn:uuid:f4ac48d5-70ab-4aa7-930f-7fe5d93e1a3f>",
"WARC-Target-URI": "http://www.corestore.org/DEC10.htm",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:54a857b0-cf35-46c8-9818-65dbd18bb7f9>"
},
"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,
8,
9,
10,
29,
30,
31,
32,
33,
106,
107,
696,
697,
841,
842,
843,
844,
845,
1300,
1301,
1302,
1303,
1304,
1305,
2157,
2158,
2340,
2341,
2342,
2343,
2344,
2643,
2644,
2645,
2646,
2647,
2754,
2755,
2756,
2872,
2873,
2874,
2875,
2969,
2970,
2971,
2972,
2973,
3010,
3011,
3012,
3121,
3122,
3123,
3124,
3125,
3232,
3233,
3234,
3235,
3236,
3288,
3289,
3290,
3291,
3292,
3372,
3373,
3374,
3375,
3376,
3826,
3827,
3828,
3829,
3830,
3994,
3995,
3996,
4104,
4105,
4195,
4281,
4392,
4457,
4511,
4512,
4599,
4600,
4601,
4602,
4643,
4644,
4645,
4646,
4647,
4680,
4681,
4682,
4683,
4684,
4982,
4983,
4984,
5064,
5141,
5261,
5398,
5473,
5539,
5632
],
"line_end_idx": [
8,
9,
10,
29,
30,
31,
32,
33,
106,
107,
696,
697,
841,
842,
843,
844,
845,
1300,
1301,
1302,
1303,
1304,
1305,
2157,
2158,
2340,
2341,
2342,
2343,
2344,
2643,
2644,
2645,
2646,
2647,
2754,
2755,
2756,
2872,
2873,
2874,
2875,
2969,
2970,
2971,
2972,
2973,
3010,
3011,
3012,
3121,
3122,
3123,
3124,
3125,
3232,
3233,
3234,
3235,
3236,
3288,
3289,
3290,
3291,
3292,
3372,
3373,
3374,
3375,
3376,
3826,
3827,
3828,
3829,
3830,
3994,
3995,
3996,
4104,
4105,
4195,
4281,
4392,
4457,
4511,
4512,
4599,
4600,
4601,
4602,
4643,
4644,
4645,
4646,
4647,
4680,
4681,
4682,
4683,
4684,
4982,
4983,
4984,
5064,
5141,
5261,
5398,
5473,
5539,
5632,
5725
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5725,
"ccnet_original_nlines": 110,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3620154857635498,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05038759857416153,
"rps_doc_frac_lines_end_with_ellipsis": 0.054054051637649536,
"rps_doc_frac_no_alph_words": 0.23255814611911774,
"rps_doc_frac_unique_words": 0.46436285972595215,
"rps_doc_mean_word_length": 4.746220111846924,
"rps_doc_num_sentences": 78,
"rps_doc_symbol_to_word_ratio": 0.009302330203354359,
"rps_doc_unigram_entropy": 5.365318775177002,
"rps_doc_word_count": 926,
"rps_doc_frac_chars_dupe_10grams": 0.02275313064455986,
"rps_doc_frac_chars_dupe_5grams": 0.030034130439162254,
"rps_doc_frac_chars_dupe_6grams": 0.02275313064455986,
"rps_doc_frac_chars_dupe_7grams": 0.02275313064455986,
"rps_doc_frac_chars_dupe_8grams": 0.02275313064455986,
"rps_doc_frac_chars_dupe_9grams": 0.02275313064455986,
"rps_doc_frac_chars_top_2gram": 0.020477820187807083,
"rps_doc_frac_chars_top_3gram": 0.0061433399096131325,
"rps_doc_frac_chars_top_4gram": 0.008191130124032497,
"rps_doc_books_importance": -483.4085998535156,
"rps_doc_books_importance_length_correction": -483.4085998535156,
"rps_doc_openwebtext_importance": -265.4511413574219,
"rps_doc_openwebtext_importance_length_correction": -265.4511413574219,
"rps_doc_wikipedia_importance": -158.8727264404297,
"rps_doc_wikipedia_importance_length_correction": -158.8727264404297
},
"fasttext": {
"dclm": 0.1955345869064331,
"english": 0.9439956545829773,
"fineweb_edu_approx": 1.625026822090149,
"eai_general_math": 0.35011059045791626,
"eai_open_web_math": 0.3126159906387329,
"eai_web_code": 0.13784587383270264
}
}
|
{
"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": "004.17",
"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": "9",
"label": "Personal/Misc"
}
},
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,530,217,550,352,709,000
|
Do Naked WordPress And Web Apps Mean The End For Mobile Themes?
Do Naked WordPress And Web Apps Mean The End For Mobile Themes?
The dominance of theme-driven delivery of WordPress content to readers has been virtually unchallenged over the last ten years.
But Atlantic Media’s Quartz has shown that web apps can not only match but surpass themes in providing a great end-user experience.
In this article, we’ll consider the advantages of delivering WordPress content via a web app, look at how to deliver your site using a web app with a proof-of-concept and ponder whether the days of the traditional WordPress theme are numbered.
iPhone in landscape with WordPress logo
Web apps offer plenty of advantages when delivering WordPress content to mobile users
In my first article for WPMU Dev, I wrote about syndicating by using WordPress as content hub and suggested that one end-point for content could be a web app. At the time, I was blissfully unaware of Quartz (qz.com), the “digitally native news outlet, born in 2012, for business people in the new global economy”. Most importantly in the Quartz blurb is their stated focus on “the devices closest at hand: tablets and mobile phones”.
So, What Makes Quartz Special?
Although hosted on WordPress.com’s VIP service, Quartz eschewed the traditional WordPress theme and, instead, developed a web app to provide the user interface. And not just any web app but a responsive web app.
WordPress functions purely as a naked content management system, providing the features (some via custom plugins) to create, manage and control the content and a JSON API to deliver the content to the web app. It is, then, completely quarantined from any end-user interaction, although it does serve content to search engine bots where clearly the visual design is not significant.
WordPress doesn’t even deliver the web app, that is handled by Quartz’s content delivery network, and a separate application is used to manage user accounts (for commenting), so WordPress itself has no interaction with the end user at all.
This WordPress without themes. This is naked WordPress.
The web app, built primarily on Backbone.js and jQuery, handles all the user interaction, providing the user interface and all its components and taking care of deciding what content has been requested and retrieving, formatting and displaying it. Effort has obviously been made to make the app as self-sufficient as possible: for example, all the icons are generated from embedded SVG rather than external files or even image files.
Despite this being a web app, to all intents and purposes it functions as a web site thanks to some really impressive url management. Visit any Quartz url and you’ll get that post displayed in the web app; and watch the location bar change as you scroll and new posts are automatically loaded when the bottom of the current post is reached.
And with 5 million unique visitors in August 2013, it’s clearly a set-up that not only scales but that readers enjoy.
Powered by WordPress.com VIP but no themes involved here
Powered by WordPress.com VIP but no themes involved here
More on Quartz:
4 Advantages In Going Naked?
Obviously this approach was a conscious design choice and it is worth noting, again, that Automattic are fully onboard given that the content is served from a WordPress VIP account.
I like the separation of function, allowing each application to concentrate on a single function (WordPress to create, manage and deliver content, web app to handle user interactions). Here’s four reasons why:
1. Leaner, More Robust and Easier To Manage
Take a look at your plugins list now. How many plugins do you have? Chances are you’ve got quite a list covering everything from helpful functions for creating and managing content to front-end gizmos to enhance your theme.
In the web app scenario, where WordPress is that naked CMS, that list is restricted simply to those plugins required to manage the content. This makes WordPress leaner, far less prone to conflicts, less vulnerable and ultimately much easier to manage.
If you also think about most of the front-end gizmo plugins, they are mostly about embedding a client-side solution (usually jQuery-based) in your sites. With a web app, the solution is added directly to the user interface, no need to wrap it in a plugin, thus saving time and effort.
2. Multiple Channels, Interchangeable Components
As soon as you separate out the content creation from the content delivery, you give yourself the opportunity to swap or add components.
It’s easy to run multiple apps off the same content base but where it gets interesting, and potentially troubling for WordPress and other CMS developers, is the option to swap out the content management component. So long as the JSON API is maintained then your web app neither knows nor cares whether it is talking to WordPress, Drupal or any other application.
This is also one reason that I think that WordPress.org needs to pay more attention to the admin interface or it runs the risk of losing out to competitors if web apps become a popular approach.
3. Focussed Developers, Shorter Development Time
I’ve always been impressed by WordPress theme developers. The requirement to be proficient, at the very least, at both ends of that HTTP call strikes me as being both difficult to fulfill and daunting. And that’s without adding a design capability to the mix.
Perhaps that explains why there are so many bad themes out there?
The separation of function that comes with web apps removes this requirement. No longer does the developer of the user interface have to know anything about WordPress; they just have to know how to interact with the JSON API.
The web app toolkit is already mature with tools such as jQuery and Backbone.js not only having extensive communities but are earning their stripes in some major installations. This means that finding developers should be almost as easy as finding a WordPress developer.
And it also means that the WordPress developer can concentrate just on WordPress and providing the functions and features to facilitate the content creation and publishing processes and ensuring that the JSON API delivers the content required by the web app.
In a greenfield project, these two development streams can run side-by-side potentially reducing the time required to complete the project.
4. App-like Experience Without App-Like Headaches
The biggest single reason for developing a web app could be your desire to target the mobile platforms without the overheads and headaches of developing multiple native applications.
Whilst it does depend on the functionality you want to deliver, modern web apps can get pretty close to a native app experience, with the massive advantage, of course, of a single application being compatible across all platforms.
Quartz are not alone in the publishing world, in particular, in deciding that web apps offer the most cost-effective path to delivering content to mobile platforms. Both the Financial Times and Melbourne’s The Age have ditched native apps in favour of their web-based cousins.
Indeed, if web apps really take off then we could see a rapid demise in the development of native apps.
3 Scenarios Where Going Naked Makes Sense
1. You Want To Focus On Mobile Users
A web app allows you to design purely for the smaller screen. Even if you decide that, like Quartz, that the app has to be responsive and work on smartphones and tablets, taking desktops out of the equation greatly simplifies the design process.
A whole raft of tools and frameworks exist for the development of web apps which should also help provide that native app feel.
2. You Want To Power Several Products From The Same Content
Repurposing content is the holy grail of many publishers and web apps brings this a step closer by allowing for the rearranging of how content is formatted, its level of granularity and how it is collated. For instance, we could use a web app to deliver a “Best of 2013” for the WPMU Dev, using already published content but collated into topic areas and delivered with more of a book feel.
3. You Want To Manage Your Content In A Single Repository
If you run multiple sites, then you have multiple admin interfaces, multiple content repositories and, more than likely, multiple plugin repositories with the same or similar list of plugins.
By using web apps instead of sites, it would be possible to consolidate on a single WordPress instance, with a single content repository and single, likely much shorter, list of plugins.
Get Your Kit Off: A DIY Web App Proof-Of-Concept
The proof, as they say, is in the eating, so let’s walk through a web app prototype which should, in theory, work with any WordPress site. Keep in mind that I’m not presenting this as a fully-fledged solution, merely something that might pique your interest either to develop something yourself or to get a better developer than me to create something for you.
Something to pique your interest in web apps
Something to pique your interest in web apps
You can download the web app and run it straight from your file system. It’s hooked up to a test site at the moment but if you want to use it with your own site, then you just need to set up the JSON API on your WordPress site and update the endpoint variable in the javascript.
I’ve taken my inspiration from Quartz but rather than trying to create an app that works across all platforms, I’ve cheated a little by concentrating on creating a smartphone application as, to be blunt, it’s a lot easier.
The app is a single-page app but provides four “views”:
1. Home – a list of the most recent posts
2. Category – a list of the most recent posts for a category
3. Post – the display of a single post
4. Page – the display of a single page
There’s also a categories menu and a pseudo-slideout sidebar menu.
The web app works out which of these views is required, calls the JSON API to retrieve the appropriate content, formats this content as HTML and then replaces any existing content in the content placeholder (‘#page-content’) with the new content.
The two most important functions in a web app are routing and templating. Routing handles user requests, essentially any time the user clicks or taps on a link, whilst templating takes JSON-formatted data and converts it to HTML.
Not being familiar with Backbone.js, I’ve used two simpler alternatives in Satnav.js for routing and the popular Handlebars.js for templating.
Routing With Satnav.js
Generally, a click or tap on a hyperlink will cause the browser to navigate away from the existing page to the new page or file. In our one-page web app, we don’t want that to happen, we want to catch that request, stay on the current page and perform the appropriate function, most likely a request for content and the display of that content.
This is what Satnav.js does for us and as you can see from the following javascript, it’s pretty straightforward to set-up:
Satnav({
html5: false,
force: true,
poll: 25,
}).navigate({
path: 'main-menu',
directions: function() {
$('#main-menu').toggle();
}
}).navigate({
path: 'home',
directions: function(params) {
load_home_page();
}
}).navigate({
path: 'post/{post_id}',
directions: function(params) {
load_post(params);
}
}).navigate({
path: 'page/{page_id}',
directions: function(params) {
load_page(params);
}
}).navigate({
path: 'category/{cat_id}',
directions: function(params) {
load_category(params);
}
})
.otherwise('home')
.go();
The html5 attribute determines whether navigation is pushState based or hash based. What this means is whether the urls are presented as ‘post/1’ or as ‘#post/1’. Whilst the former (pushState) is prettier, and indeeed is what Quartz uses, its implementation is patchy across browsers and can cause some security concerns on others. So, I’ve stuck to hash navigation.
The guts of Satnav.js are the navigate functions. Each one captures a particular path (request) and defines the direction (function) that needs to be executed. Variables, such as post_id, are specified in the path by using {}, e.g. /post/{post_id} which are passed to the directions in the params variable.
Notice, also, that even though we are using hash navigation, the # is not specified in the path.
Templating With Handlebars
The web app only receives content in the JSON format and therefore it needs to be formatted before being displayed to the user, just as in a normal WordPress request where content is formatted using the appropriate theme’s template.
Handlebars provides a simple templating language for formatting JSON data. Each template is included in the HTML page as a script and a unique id; the template is compiled; and the HTML output generated by passing the appropriate data to the compiled template.
Here’s an example template that formats a post:
<script id="single-post-template" type="text/x-handlebars-template">
<article id="single-post">
<header>
<h3>{{post.title}}</h3>
<h2>{{getExcerpt}}</h3>
<p id="meta">By {{getAuthor}} | {{post.date}}</p>
</header>
<img src="{{getFeaturedImage}}">
{{getContent}}
</article>
</script>
Values from the passed JSON data can be placed directly into the template by including the qualified path in double parentheses {{}}. Handlebars also allows for custom javascript functions, called helpers, to be called to return content and I’ve used these in a number of places. For more information, have a look at the Handlebars documentation.
The template is compiled by calling, not surprisingly, the compile function:
var tpl_single_post = Handlebars.compile( $('#single-post-template').html() );
And the HTML is generated by calling the compiled template with the JSON data. Here’s an example, including the call to the JSON API to get the data for a post and then generate the HTML
function get_post( id ){
// #page-content is the placeholder for all our content
$('#page-content').hide();
// set up the method and add the id variable
var method = 'get_post&id=' + id;
// generate the JSON API url
var url = endpoint + '?json=' + method + '&callback=?';
// call the JSON API
$.get( url , function( data ) {
// call is asynchronous so need to put post-retrieval actions here
// replace the page content with the post
$('#page-content').html(
tpl_single_post( data.post )
).show();
}, "json" );
}
That’s a fairly brief walk-though: I just want to give you enough of an explanation so you can poke around the code and get inspired. lt’s probably also worth reading the documentation for Handlebars and Satnav.
Setting Up JSON On WordPress
For all this work, of course, your WordPress site needs the JSON API installed. There’s a few options here, including Jetpack, but I’ve opted for the JSON API plugin as it’s stable, proven, well-written and I’ve used it before.
As an interesting aside, this plugin was developed for the Museum of Modern Art where a Ruby-based website pulled content from a WordPress back-end. A very similar concept to what we are looking at here.
Go to Dashboard > Plugins and search for JSON API. The plugin you want is the one written by dphiffer. Install and activate the plugin.
Running the Proof-Of-Concept
Download the webapp and unzip it. If you want to run it against your own website, and you’ve enabled the JSON API, then open up index.html in your favorite editor and look for:
var endpoint = "http://162.243.67.226/master/"
Change the url to your own WordPress instance; one running locally should be fine.
Now, simply open the index.html in a browser, preferably on a smartphone (or use an emulator). On entry you should get the home view which will simply list the most recent posts. Click on a post title to view the post; click on Categories and then on a single category to view a category archive.
You’ll notice that as the content changes the url in the browser’s location bar does too, yet the page never refreshes.
If you are going to play around with the web app (and I hope you do) and if you are using your own site then you might find it useful to know that you can call the JSON API in your browser to view the returned data. Adding dev=1 to the query string will format it and make it far more readable.
For example, to show a specific post use: http://[site_url]/?json=get_post&id=[post_id]&dev=1
And I think it’s worth reiterating that this is a proof-of-concept not a suggested solution. This was quick and easy to knock up and shows the power and ease of the web app approach.
So, That’s The End Of Themes Then?
Whilst I think that web apps have enormous potential, they aren’t about to take over from the traditional theme, mainly because at the moment you’ve got to build it yourself. There’s a reason that most of us are theme consumers rather than theme developers.
What will be interesting to see is if commercial offerings start appearing, perhaps even ironically as a WordPress theme that can be configured by the site admin and then either be exported or delivered to the device on the initial request.
What is clear is that many more publishers are likely to follow the lead of Quartz, FT and The Age and look to web apps to deliver that wow experience for non-desktop users.
What do you think about web apps replacing themes? Have you created a web app that uses WordPress as naked CMS? Let us know in the comments.
By clicking subscribe I consent to receiving product updates, news, and future contest emails from WPMU DEV.
By clicking subscribe I consent to receiving product updates, news, and future contest emails from WPMU DEV.
Tags:
|
{
"url": "https://premium.wpmudev.org/blog/naked-wordpress-and-web-apps/?hpv=b&utm_expid=3606929-74.-9SG1AluS3usqwaLTFuxVw.1&utm_referrer=https%3A%2F%2Fpremium.wpmudev.org%2Fblog%2Fdelivering-wordpress-content-with-web-apps-using-angularjs%2F",
"source_domain": "premium.wpmudev.org",
"snapshot_id": "crawl=CC-MAIN-2020-24",
"warc_metadata": {
"Content-Length": "209630",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UXZY6WSFTYUFUGTMEIYVWMPYMZZ624BP",
"WARC-Concurrent-To": "<urn:uuid:b56f432b-3def-4adb-a532-ef8a1ebb1261>",
"WARC-Date": "2020-05-28T21:52:16Z",
"WARC-IP-Address": "104.18.9.94",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:MNS634CWIZ6ITY6YA5LHTIB3CQOC2IQI",
"WARC-Record-ID": "<urn:uuid:131a849b-cff2-48b7-9644-e6b9bb2a7609>",
"WARC-Target-URI": "https://premium.wpmudev.org/blog/naked-wordpress-and-web-apps/?hpv=b&utm_expid=3606929-74.-9SG1AluS3usqwaLTFuxVw.1&utm_referrer=https%3A%2F%2Fpremium.wpmudev.org%2Fblog%2Fdelivering-wordpress-content-with-web-apps-using-angularjs%2F",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:01ad032f-f440-4bd3-b641-f92617003b00>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-124.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,
64,
65,
129,
130,
258,
259,
391,
392,
636,
637,
677,
763,
764,
1198,
1199,
1230,
1231,
1443,
1444,
1826,
1827,
2067,
2068,
2124,
2125,
2559,
2560,
2901,
2902,
3020,
3021,
3079,
3136,
3137,
3153,
3154,
3183,
3184,
3366,
3367,
3577,
3578,
3622,
3623,
3847,
3848,
4100,
4101,
4386,
4387,
4436,
4437,
4574,
4575,
4938,
4939,
5134,
5135,
5184,
5185,
5445,
5446,
5512,
5513,
5739,
5740,
6011,
6012,
6271,
6272,
6412,
6413,
6463,
6464,
6647,
6648,
6879,
6880,
7157,
7158,
7262,
7263,
7305,
7306,
7343,
7344,
7590,
7591,
7719,
7720,
7780,
7781,
8172,
8173,
8231,
8232,
8424,
8425,
8612,
8613,
8662,
8663,
9024,
9025,
9070,
9115,
9116,
9395,
9396,
9619,
9620,
9676,
9677,
9721,
9784,
9825,
9866,
9867,
9934,
9935,
10182,
10183,
10413,
10414,
10557,
10558,
10581,
10582,
10927,
10928,
11052,
11053,
11062,
11076,
11089,
11099,
11113,
11132,
11157,
11183,
11185,
11199,
11213,
11244,
11262,
11264,
11278,
11302,
11333,
11352,
11354,
11368,
11392,
11423,
11442,
11444,
11458,
11485,
11516,
11539,
11541,
11544,
11563,
11570,
11571,
11938,
11939,
12246,
12247,
12344,
12345,
12372,
12373,
12606,
12607,
12868,
12869,
12917,
12918,
12987,
13014,
13023,
13047,
13071,
13121,
13131,
13132,
13165,
13166,
13181,
13182,
13193,
13203,
13204,
13551,
13552,
13629,
13630,
13709,
13710,
13897,
13898,
13923,
13924,
13980,
14007,
14008,
14053,
14087,
14088,
14117,
14173,
14174,
14195,
14196,
14228,
14229,
14296,
14297,
14339,
14364,
14393,
14403,
14404,
14417,
14418,
14420,
14421,
14633,
14634,
14663,
14664,
14892,
14893,
15097,
15098,
15234,
15235,
15264,
15265,
15442,
15443,
15490,
15491,
15574,
15575,
15872,
15873,
15993,
15994,
16290,
16291,
16385,
16386,
16569,
16570,
16605,
16606,
16864,
16865,
17106,
17107,
17281,
17282,
17423,
17424,
17533,
17642
],
"line_end_idx": [
64,
65,
129,
130,
258,
259,
391,
392,
636,
637,
677,
763,
764,
1198,
1199,
1230,
1231,
1443,
1444,
1826,
1827,
2067,
2068,
2124,
2125,
2559,
2560,
2901,
2902,
3020,
3021,
3079,
3136,
3137,
3153,
3154,
3183,
3184,
3366,
3367,
3577,
3578,
3622,
3623,
3847,
3848,
4100,
4101,
4386,
4387,
4436,
4437,
4574,
4575,
4938,
4939,
5134,
5135,
5184,
5185,
5445,
5446,
5512,
5513,
5739,
5740,
6011,
6012,
6271,
6272,
6412,
6413,
6463,
6464,
6647,
6648,
6879,
6880,
7157,
7158,
7262,
7263,
7305,
7306,
7343,
7344,
7590,
7591,
7719,
7720,
7780,
7781,
8172,
8173,
8231,
8232,
8424,
8425,
8612,
8613,
8662,
8663,
9024,
9025,
9070,
9115,
9116,
9395,
9396,
9619,
9620,
9676,
9677,
9721,
9784,
9825,
9866,
9867,
9934,
9935,
10182,
10183,
10413,
10414,
10557,
10558,
10581,
10582,
10927,
10928,
11052,
11053,
11062,
11076,
11089,
11099,
11113,
11132,
11157,
11183,
11185,
11199,
11213,
11244,
11262,
11264,
11278,
11302,
11333,
11352,
11354,
11368,
11392,
11423,
11442,
11444,
11458,
11485,
11516,
11539,
11541,
11544,
11563,
11570,
11571,
11938,
11939,
12246,
12247,
12344,
12345,
12372,
12373,
12606,
12607,
12868,
12869,
12917,
12918,
12987,
13014,
13023,
13047,
13071,
13121,
13131,
13132,
13165,
13166,
13181,
13182,
13193,
13203,
13204,
13551,
13552,
13629,
13630,
13709,
13710,
13897,
13898,
13923,
13924,
13980,
14007,
14008,
14053,
14087,
14088,
14117,
14173,
14174,
14195,
14196,
14228,
14229,
14296,
14297,
14339,
14364,
14393,
14403,
14404,
14417,
14418,
14420,
14421,
14633,
14634,
14663,
14664,
14892,
14893,
15097,
15098,
15234,
15235,
15264,
15265,
15442,
15443,
15490,
15491,
15574,
15575,
15872,
15873,
15993,
15994,
16290,
16291,
16385,
16386,
16569,
16570,
16605,
16606,
16864,
16865,
17106,
17107,
17281,
17282,
17423,
17424,
17533,
17642,
17647
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 17647,
"ccnet_original_nlines": 268,
"rps_doc_curly_bracket": 0.003626680001616478,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3817829489707947,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.022425249218940735,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17358803749084473,
"rps_doc_frac_unique_words": 0.30349650979042053,
"rps_doc_mean_word_length": 4.868531703948975,
"rps_doc_num_sentences": 165,
"rps_doc_symbol_to_word_ratio": 0.0022148399148136377,
"rps_doc_unigram_entropy": 5.770153045654297,
"rps_doc_word_count": 2860,
"rps_doc_frac_chars_dupe_10grams": 0.020109159871935844,
"rps_doc_frac_chars_dupe_5grams": 0.04136741906404495,
"rps_doc_frac_chars_dupe_6grams": 0.03878195956349373,
"rps_doc_frac_chars_dupe_7grams": 0.035909220576286316,
"rps_doc_frac_chars_dupe_8grams": 0.035909220576286316,
"rps_doc_frac_chars_dupe_9grams": 0.026860099285840988,
"rps_doc_frac_chars_top_2gram": 0.01292731985449791,
"rps_doc_frac_chars_top_3gram": 0.0060327500104904175,
"rps_doc_frac_chars_top_4gram": 0.0019390999805182219,
"rps_doc_books_importance": -1796.2113037109375,
"rps_doc_books_importance_length_correction": -1796.2113037109375,
"rps_doc_openwebtext_importance": -944.0695190429688,
"rps_doc_openwebtext_importance_length_correction": -944.0695190429688,
"rps_doc_wikipedia_importance": -600.5545043945312,
"rps_doc_wikipedia_importance_length_correction": -600.5545043945312
},
"fasttext": {
"dclm": 0.024449290707707405,
"english": 0.8869342803955078,
"fineweb_edu_approx": 1.6800942420959473,
"eai_general_math": 0.09876961261034012,
"eai_open_web_math": 0.062721848487854,
"eai_web_code": 0.22857505083084106
}
}
|
{
"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": "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": "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": "16",
"label": "Personal Blog"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,751,335,908,972,360,000
|
Broadcast camera revolution project
giuzioevo2
Youth Team
I have an interesting idea to revolutionize the height and zoom of broadcast camera, i noticed that the "st.mary stadium" has a more elastic parameters of camera, so i supposed to use all the stadiums with st.mary stadium base to have height and zoom we like. So my ways are 2: using cgfs16 and editing the stadium base (the current is waldstadion and another one) but i tried and the game crashed (i edited the "stadium" folder in FSW) so if you know if i made a mistake please tell me. Another way is to create a copy of st.mary stadium and edit the model of stadium, but i dont know how to export the model of stadium if not creating a copy of it and taking it from and how to import in cm16, so if anyone have this knowledge, please help me to make this extraordinary edit.
Top
|
{
"url": "http://www.soccergaming.com/index.php?threads/broadcast-camera-revolution-project.6468403/#post-6601176",
"source_domain": "www.soccergaming.com",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "50866",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:A4A2SIJ4XO36KDAMEXR6V232LISHSC2O",
"WARC-Concurrent-To": "<urn:uuid:fd9bddd5-d43f-4302-87ae-0d793074d0d0>",
"WARC-Date": "2022-08-18T05:40:18Z",
"WARC-IP-Address": "104.21.17.72",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:BCYPCBHTNHHRDWRWM36KGMYME2233QBY",
"WARC-Record-ID": "<urn:uuid:bd5c664a-e176-48d9-9959-2225704dd3fb>",
"WARC-Target-URI": "http://www.soccergaming.com/index.php?threads/broadcast-camera-revolution-project.6468403/#post-6601176",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d0461894-ecd4-4e73-96fa-6582485dcef0>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-66\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,
36,
37,
48,
49,
60,
838,
840,
841,
842
],
"line_end_idx": [
36,
37,
48,
49,
60,
838,
840,
841,
842,
845
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 845,
"ccnet_original_nlines": 9,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.5,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01111111044883728,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11666666716337204,
"rps_doc_frac_unique_words": 0.5541401505470276,
"rps_doc_mean_word_length": 4.222929954528809,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.176530838012695,
"rps_doc_word_count": 157,
"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.05882352963089943,
"rps_doc_frac_chars_top_3gram": 0.03921569138765335,
"rps_doc_frac_chars_top_4gram": 0.05128204822540283,
"rps_doc_books_importance": -66.59139251708984,
"rps_doc_books_importance_length_correction": -66.59139251708984,
"rps_doc_openwebtext_importance": -42.486629486083984,
"rps_doc_openwebtext_importance_length_correction": -40.406005859375,
"rps_doc_wikipedia_importance": -49.87733840942383,
"rps_doc_wikipedia_importance_length_correction": -49.87733840942383
},
"fasttext": {
"dclm": 0.057648900896310806,
"english": 0.9201504588127136,
"fineweb_edu_approx": 1.0248318910598755,
"eai_general_math": 0.9129562973976135,
"eai_open_web_math": 0.44753265380859375,
"eai_web_code": 0.35212868452072144
}
}
|
{
"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": "794.816",
"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": "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": "8",
"label": "Documentation"
}
},
"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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,202,770,722,107,675,000
|
Most issues that affect a switched network are encountered during the original implementation. Theoretically, after it is installed, a network continues to operate without problems. However, cabling gets damaged, configurations change, and new devices are connected to the switch that require switch configuration changes. Ongoing maintenance and troubleshooting of the network infrastructure is required.
To troubleshoot these issues when you have no connection or a bad connection between a switch and another device, follow this general process:
Use the show interface command to check the interface status.
If the interface is down:
If the interface is up, but issues with connectivity are still present:
|
{
"url": "http://cisco.num.edu.mn/CCNA_R&S2/course/module2/2.1.2.6/2.1.2.6.html",
"source_domain": "cisco.num.edu.mn",
"snapshot_id": "CC-MAIN-2024-10",
"warc_metadata": {
"Content-Length": "5035",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZJETJGODGBCRJDAP3QZGLLMKA2HK7DLP",
"WARC-Concurrent-To": "<urn:uuid:d63b7c45-0209-4666-86f5-0554281aecdb>",
"WARC-Date": "2024-02-21T05:26:50Z",
"WARC-IP-Address": "202.21.127.188",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:CCQKSQTVA7VBFDIX5JHNI56UAFOCQYZ4",
"WARC-Record-ID": "<urn:uuid:4aae713f-e1a1-4488-a451-f8096d3ad9b3>",
"WARC-Target-URI": "http://cisco.num.edu.mn/CCNA_R&S2/course/module2/2.1.2.6/2.1.2.6.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bc780bc9-6ba6-48be-b8c7-077de1b4993f>"
},
"warc_info": "isPartOf: CC-MAIN-2024-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2024\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-69\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,
406,
407,
550,
551,
613,
614,
640,
641
],
"line_end_idx": [
406,
407,
550,
551,
613,
614,
640,
641,
712
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 712,
"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.40336135029792786,
"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.1260504126548767,
"rps_doc_frac_unique_words": 0.7019230723381042,
"rps_doc_mean_word_length": 5.67307710647583,
"rps_doc_num_sentences": 6,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.101696968078613,
"rps_doc_word_count": 104,
"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.06101695075631142,
"rps_doc_frac_chars_top_3gram": 0.047457631677389145,
"rps_doc_frac_chars_top_4gram": 0.05423729121685028,
"rps_doc_books_importance": -48.541114807128906,
"rps_doc_books_importance_length_correction": -48.86275100708008,
"rps_doc_openwebtext_importance": -15.307753562927246,
"rps_doc_openwebtext_importance_length_correction": -15.629389762878418,
"rps_doc_wikipedia_importance": -19.502601623535156,
"rps_doc_wikipedia_importance_length_correction": -19.82423973083496
},
"fasttext": {
"dclm": 0.38167262077331543,
"english": 0.9214061498641968,
"fineweb_edu_approx": 1.910310983657837,
"eai_general_math": 0.6652861833572388,
"eai_open_web_math": 0.09536588191986084,
"eai_web_code": 0.3788102865219116
}
}
|
{
"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": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"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": "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": "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": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,574,195,348,356,260,000
|
A programming & designing blog!
Tuesday, February 19, 2013
Send Mail with File Attachment using PHP
In this post I'm going to show you how we can send mail with file attachment using PHP mail function. To do this we need to encode file into base64 encoding system using PHP base64_encode function and add it to PHP mail header parameter with MIME.
Email Function
function email($mail_from, $from_name, $mail_to, $subject, $message, $file){
$file_name = basename($file); // Get file name
$data = file_get_contents($file); // Read file contents
$file_contents = chunk_split(base64_encode($data)); // Encode file data into base64
$uid = md5(time()); // Create unique boundary from timestamps
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "From: {$from_name}<{$mail_from}>";
$headers[] = "Reply-To: {$mail_from}";
$headers[] = "Content-Type: multipart/mixed; boundary=\"{$uid}\"";
$headers[] = "This is a multi-part message in MIME format.";
$headers[] = "--{$uid}";
$headers[] = "Content-type:text/plain; charset=iso-8859-1"; // Set message content type
$headers[] = "Content-Transfer-Encoding: 7bit";
$headers[] = $message; // Dump message
$headers[] = "--{$uid}";
$headers[] = "Content-Type: application/octet-stream; name=\"{$file_name}\""; // Set content type and file name
$headers[] = "Content-Transfer-Encoding: base64"; // Set file encoding base
$headers[] = "Content-Disposition: attachment; filename=\"{$file_name}\""; // Set file Disposition
$headers[] = $file_contents; // Dump file
$headers[] = "--{$uid}--"; //End boundary
// Send mail with header information
if (mail($mail_to, $subject, '', implode("\r\n", $headers) ))
return true;
}
Usages
$from = "mail@w3bees.com";
$name = "W3Bees";
$to = "name@server.com";
$subject = "My mail subject";
$message = "My message";
$file = 'path/to/file';
if(email($from, $name, $to, $subject, $message, $file)){
echo "Success!";
}
else{
echo "Error!";
}
7 comments:
1. I am getting that error (Bad parameters to mail() function, mail not sent. ) when I am dumping the content of my file in the header (Line 21) ? why ??
ReplyDelete
Replies
1. I'm so sorry. I made a mistake on email function. I updated the source. I hope now it will be work now.
Thanks!
Delete
2. Ace Maxs Asli Di Apotik K24 - Selain di apotik k24 juga ace maxs asli bisa anda dapatkan disini
ReplyDelete
|
{
"url": "https://www.w3bees.com/2013/02/send-mail-with-file-attachment-using-php.html",
"source_domain": "www.w3bees.com",
"snapshot_id": "crawl=CC-MAIN-2018-39",
"warc_metadata": {
"Content-Length": "280275",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NE4BJRIVRQJVESGLV3B5KNO7JZK6PFMT",
"WARC-Concurrent-To": "<urn:uuid:5501c0a9-511d-43b9-9ef1-c439d631d1c8>",
"WARC-Date": "2018-09-20T12:31:26Z",
"WARC-IP-Address": "172.217.7.243",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:PFDD7WLAYRSRLQLTEB4IK36OYSEULN2V",
"WARC-Record-ID": "<urn:uuid:d1d9c303-9649-489d-aa5d-f4f9e0d6e412>",
"WARC-Target-URI": "https://www.w3bees.com/2013/02/send-mail-with-file-attachment-using-php.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1b50b1d7-09e2-4808-91c0-9997d682da2e>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-123-248-186.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,
32,
33,
60,
61,
102,
103,
351,
352,
367,
444,
449,
500,
561,
649,
716,
740,
778,
831,
874,
945,
1010,
1039,
1131,
1183,
1226,
1255,
1371,
1451,
1554,
1600,
1646,
1687,
1753,
1774,
1776,
1777,
1784,
1811,
1829,
1854,
1884,
1909,
1933,
1990,
2011,
2013,
2019,
2038,
2040,
2041,
2053,
2054,
2210,
2211,
2227,
2239,
2350,
2364,
2365,
2378,
2479,
2480
],
"line_end_idx": [
32,
33,
60,
61,
102,
103,
351,
352,
367,
444,
449,
500,
561,
649,
716,
740,
778,
831,
874,
945,
1010,
1039,
1131,
1183,
1226,
1255,
1371,
1451,
1554,
1600,
1646,
1687,
1753,
1774,
1776,
1777,
1784,
1811,
1829,
1854,
1884,
1909,
1933,
1990,
2011,
2013,
2019,
2038,
2040,
2041,
2053,
2054,
2210,
2211,
2227,
2239,
2350,
2364,
2365,
2378,
2479,
2480,
2495
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2495,
"ccnet_original_nlines": 62,
"rps_doc_curly_bracket": 0.009619239717721939,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1267361044883728,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0277777798473835,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4496527910232544,
"rps_doc_frac_unique_words": 0.5473684072494507,
"rps_doc_mean_word_length": 5.694736957550049,
"rps_doc_num_sentences": 21,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.722871780395508,
"rps_doc_word_count": 285,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.0418977215886116,
"rps_doc_frac_chars_dupe_6grams": 0.0418977215886116,
"rps_doc_frac_chars_dupe_7grams": 0.0418977215886116,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.014787429943680763,
"rps_doc_frac_chars_top_3gram": 0.022181149572134018,
"rps_doc_frac_chars_top_4gram": 0.019716570153832436,
"rps_doc_books_importance": -257.473876953125,
"rps_doc_books_importance_length_correction": -257.473876953125,
"rps_doc_openwebtext_importance": -157.62770080566406,
"rps_doc_openwebtext_importance_length_correction": -157.62770080566406,
"rps_doc_wikipedia_importance": -135.66827392578125,
"rps_doc_wikipedia_importance_length_correction": -135.66827392578125
},
"fasttext": {
"dclm": 0.5670225024223328,
"english": 0.5437158942222595,
"fineweb_edu_approx": 2.5475244522094727,
"eai_general_math": 0.4942617416381836,
"eai_open_web_math": 0.2140350341796875,
"eai_web_code": 0.19693559408187866
}
}
|
{
"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": "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": "-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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,531,082,876,353,462,000
|
184.166.7.67 - IP Address Lookup
The IP address location of 184.166.7.67 is Grand Junction 81501, Colorado (CO), United States (US).
184.166.7.67 is a public IP address that belongs to ASN 33588 which is under the control of Charter Communications. The prefix 184/8 (184.0.0.0/8) was allocated to ARIN by the Internet Assigned Numbers Authority (IANA) in .
184.166.7.67 IP Address Location
Here you will find the approximate IP geolocation for 184.166.7.67 as reported by our IP Tracker along with additional information like ASN mapping, ISP, and the type of internet connection. Use the free IP Lookup tool to find the IP geolocation for any public IP address.
IP PTR / DNS Reverse Lookuphost-184-166-7-67.gdj-co.client.bresnan.net
IP Address ASN33588 controlled by Charter Communications
IP ISP / OrganizationSpectrum
IP Connection TypeCable/DSL [internet speed test]
IP Location ContinentNorth America
IP Location CountryUnited States (US)
IP Location StateColorado (CO)
IP Location CityGrand Junction
IP Location Postcode81501
IP Location Latitude39.0700 / 39°4′12″ N
IP Location Longitude-108.5377 / 108°32′15″ W
IP Location TimezoneAmerica/Denver
IP Location Local Time
IANA IPv4 Address Space Allocation for Subnet 184.0.0.0/8
The Internet Assigned Numbers Authority (IANA) is responsible for global IP address space allocation to Regional Internet Registries (RIRs). The available IPv4 address space is typically allocated to RIRs as /8 prefix blocks, and the RIRs delegate smaller blocks of their address pools to Local Internet Registries (LIRs) like Internet Service Providers and other organizations in their designated locations.
IPv4 Address Space Prefix184/8
Regional Internet Registry (RIR)ARIN
Allocation Date
WHOIS Serverwhois.arin.net
RDAP Serverhttps://rdap.arin.net/registry, http://rdap.arin.net/registry
StatusALLOCATED
Delegated entirely to specific RIR (Regional Internet Registry) as indicated.
184.166.7.67 Reverse IP Lookup
Reverse IP address lookup is the process of mapping an IP address to its corresponding hostnames. Below you will find a list of hostnames that resolve to IP address 184.166.7.67.
• host-184-166-7-67.gdj-co.client.bresnan.net
184.166.7.67 IP Address Representations
An IPv4 address is defined as a 32-bit number, and thus it can be written in any notation that is capable of representing a 32-bit integer value. If human-readability is a requirement, IPv4 addresses are most often expressed in quad-dotted decimal notation with 4 octets ranging from 0 to 255 each.
Note: You should avoid IP addresses with zero-padded decimal octets like 184.166.007.067 or 010.010.010.010 because they might impose an ambiguity with octal numbers.
Below you can find some ways to express an IPv4 address.
Decimal Notation3097888579
Hexadecimal Notation0xb8a60743
Octal Notation027051403503
Binary Notation10111000101001100000011101000011
Dotted-Decimal Notation184.166.7.67
Dotted-Hexadecimal Notation0xb8.0xa6.0x07.0x43
Dotted-Octal Notation0270.0246.07.0103
Dotted-Binary Notation10111000.10100110.00000111.01000011
Recommended Articles Based on Your Search
Tips
Back To Top
|
{
"url": "http://184.166.7.67.ipaddress.com/",
"source_domain": "184.166.7.67.ipaddress.com",
"snapshot_id": "crawl=CC-MAIN-2018-22",
"warc_metadata": {
"Content-Length": "64620",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4AQOWLKRDS7L5GSVOICLKLRU34R6GBBN",
"WARC-Concurrent-To": "<urn:uuid:8e6de1a0-7672-4e4d-baed-958ff0c3159b>",
"WARC-Date": "2018-05-23T06:38:31Z",
"WARC-IP-Address": "209.126.119.176",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HTMMZDVNFR6ZKFTTUY3ULPRBWISWRBR4",
"WARC-Record-ID": "<urn:uuid:2529945c-dde7-4d01-8eb0-0cbc8c04166e>",
"WARC-Target-URI": "http://184.166.7.67.ipaddress.com/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cf5e0629-9374-4dbe-b1fd-081da42d165f>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-143-72-160.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-22\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for May 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,
33,
34,
134,
135,
359,
360,
393,
394,
667,
668,
739,
796,
826,
876,
911,
949,
980,
1011,
1037,
1078,
1124,
1159,
1182,
1183,
1241,
1242,
1651,
1652,
1683,
1720,
1736,
1763,
1836,
1852,
1930,
1931,
1962,
1963,
2142,
2143,
2191,
2192,
2232,
2233,
2532,
2699,
2756,
2757,
2784,
2815,
2842,
2890,
2926,
2973,
3012,
3070,
3071,
3113,
3114,
3119,
3120
],
"line_end_idx": [
33,
34,
134,
135,
359,
360,
393,
394,
667,
668,
739,
796,
826,
876,
911,
949,
980,
1011,
1037,
1078,
1124,
1159,
1182,
1183,
1241,
1242,
1651,
1652,
1683,
1720,
1736,
1763,
1836,
1852,
1930,
1931,
1962,
1963,
2142,
2143,
2191,
2192,
2232,
2233,
2532,
2699,
2756,
2757,
2784,
2815,
2842,
2890,
2926,
2973,
3012,
3070,
3071,
3113,
3114,
3119,
3120,
3131
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3131,
"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.17251907289028168,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0793893113732338,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3633587658405304,
"rps_doc_frac_unique_words": 0.5147783160209656,
"rps_doc_mean_word_length": 6.280787944793701,
"rps_doc_num_sentences": 79,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.886664867401123,
"rps_doc_word_count": 406,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.030588239431381226,
"rps_doc_frac_chars_dupe_6grams": 0.030588239431381226,
"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.038823530077934265,
"rps_doc_frac_chars_top_3gram": 0.021176470443606377,
"rps_doc_frac_chars_top_4gram": 0.02039216086268425,
"rps_doc_books_importance": -297.1548767089844,
"rps_doc_books_importance_length_correction": -297.1548767089844,
"rps_doc_openwebtext_importance": -177.63543701171875,
"rps_doc_openwebtext_importance_length_correction": -177.63543701171875,
"rps_doc_wikipedia_importance": -166.03248596191406,
"rps_doc_wikipedia_importance_length_correction": -166.03248596191406
},
"fasttext": {
"dclm": 0.033801618963479996,
"english": 0.8096958994865417,
"fineweb_edu_approx": 2.909097671508789,
"eai_general_math": 0.000684980012010783,
"eai_open_web_math": 0.26945507526397705,
"eai_web_code": 0.017828699201345444
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.677",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"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": "1",
"label": "Factual"
},
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,156,385,305,074,859,000
|
Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.
Is there a equivalent to the Unix strings command for jar files?
To give an example, if I have this Java file:
public class Foo {
String foo = "I\'m so meta even this acronym";
}
compiled and placed in bar.jar
I will, ideally, like to run some command on bar.jar which will send the string "I'm so meta" to standard output so I can grep for it.
The problem I am trying to solve is, I'm getting an error message in my Java program, and I will like to know which jar file its coming from.
share|improve this question
You can use javap to decode a specific class in a jar. – Peter Lawrey Jul 28 '11 at 13:34
A jar file is only an archive. You can extract the class-files out of the jar and use strings on it. – Jacob Jul 28 '11 at 13:35
@benhsu - I assume there is no stack trace with your error message. How is the exception logged? To console or via a library like Log4J? – Perception Jul 28 '11 at 13:42
@Perception, correct, the app just logs an error message. I need to track down which jar its coming from before I can add more meaningful logs – benhsu Jul 28 '11 at 14:58
4 Answers 4
up vote 4 down vote accepted
This should work for you:
unzip -p your.jar |strings| grep 'your string'
To search through multiple JAR files in the directory use:
unzip -p \*.jar |strings| grep 'your string'
share|improve this answer
If your error message is thrown exception I'd suggest you to examine the stacktrace and get the class and method that throws exception. Then decompile the class using jad (java decompiler) and see where the message arrives from.
share|improve this answer
Jars are just zip files so that is a good starting point.
unzip -p myfile.jar | grep "Error message"
seems to work, however unzip may print control characters so it could mess up your current console. You would be better to actually unzip the files into a directory and run strings on it. Probably something like this would work
for file in `ls *.jar`
do
echo $file
unzip -ol $file | awk '{ print $4 }' > extracted && cat extracted | xargs strings | grep "ERROR MESSAGE" && cat extracted | xargs rm -rf
done
I bet there is a more efficient way of doing that, some shell script guru will clean this up for me I'm sure.
share|improve this answer
you can try a "nohup" command in Unix. here all exceptions and standard output will be append into a file
The command is
nohup java -jar bar.jar > bar.out &
now see the file bar.out for the error messages in your jar execution.
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://stackoverflow.com/questions/6859764/how-can-i-extract-the-strings-declared-inside-the-java-which-went-into-a-jar-fil?answertab=active",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2015-35",
"warc_metadata": {
"Content-Length": "89874",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BK3WVLFKCMUKSV2J674LF4RGLXIFK3RY",
"WARC-Concurrent-To": "<urn:uuid:5b3cfbd2-a670-4c41-bdfa-85ed771a66ec>",
"WARC-Date": "2015-09-01T01:06:42Z",
"WARC-IP-Address": "104.16.105.85",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:ENCL4CK6MIBU7KSTHZKCGAKFIKIPJVCF",
"WARC-Record-ID": "<urn:uuid:d94d15ab-700f-4ade-80b1-b0fb21824f91>",
"WARC-Target-URI": "http://stackoverflow.com/questions/6859764/how-can-i-extract-the-strings-declared-inside-the-java-which-went-into-a-jar-fil?answertab=active",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bad42b1f-de7f-4655-a61c-1b0a1d1aea2c>"
},
"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,
25,
131,
132,
197,
198,
244,
245,
264,
315,
317,
318,
349,
350,
485,
486,
628,
629,
657,
662,
753,
758,
888,
893,
1064,
1069,
1242,
1243,
1255,
1256,
1285,
1286,
1312,
1359,
1360,
1419,
1464,
1465,
1491,
1492,
1721,
1722,
1748,
1749,
1807,
1808,
1851,
1852,
2080,
2081,
2104,
2107,
2120,
2259,
2264,
2265,
2375,
2376,
2402,
2403,
2509,
2510,
2525,
2526,
2562,
2563,
2634,
2635,
2661,
2662,
2674,
2675,
2677,
2685,
2686,
2764,
2765
],
"line_end_idx": [
25,
131,
132,
197,
198,
244,
245,
264,
315,
317,
318,
349,
350,
485,
486,
628,
629,
657,
662,
753,
758,
888,
893,
1064,
1069,
1242,
1243,
1255,
1256,
1285,
1286,
1312,
1359,
1360,
1419,
1464,
1465,
1491,
1492,
1721,
1722,
1748,
1749,
1807,
1808,
1851,
1852,
2080,
2081,
2104,
2107,
2120,
2259,
2264,
2265,
2375,
2376,
2402,
2403,
2509,
2510,
2525,
2526,
2562,
2563,
2634,
2635,
2661,
2662,
2674,
2675,
2677,
2685,
2686,
2764,
2765,
2855
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2855,
"ccnet_original_nlines": 76,
"rps_doc_curly_bracket": 0.001401050016283989,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.353032648563385,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.027993779629468918,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.22395023703575134,
"rps_doc_frac_unique_words": 0.4530937969684601,
"rps_doc_mean_word_length": 4.291417121887207,
"rps_doc_num_sentences": 32,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.0258469581604,
"rps_doc_word_count": 501,
"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.03348837047815323,
"rps_doc_frac_chars_top_3gram": 0.013023260049521923,
"rps_doc_frac_chars_top_4gram": 0.016744190827012062,
"rps_doc_books_importance": -252.77833557128906,
"rps_doc_books_importance_length_correction": -252.77833557128906,
"rps_doc_openwebtext_importance": -137.9422607421875,
"rps_doc_openwebtext_importance_length_correction": -137.9422607421875,
"rps_doc_wikipedia_importance": -93.44261169433594,
"rps_doc_wikipedia_importance_length_correction": -93.44261169433594
},
"fasttext": {
"dclm": 0.34056854248046875,
"english": 0.8676556944847107,
"fineweb_edu_approx": 1.7419816255569458,
"eai_general_math": 0.011730309575796127,
"eai_open_web_math": 0.09545838832855225,
"eai_web_code": 0.00146030995529145
}
}
|
{
"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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,728,630,098,228,454,000
|
Interacting with QML Objects from C++
All QML object types are QObject-derived types, whether they are internally implemented by the engine or defined by third-party sources. This means the QML engine can use the Qt Meta Object System to dynamically instantiate any QML object type and inspect the created objects.
This is useful for creating QML objects from C++ code, whether to display a QML object that can be visually rendered, or to integrate non-visual QML object data into a C++ application. Once a QML object is created, it can be inspected from C++ in order to read and write to properties, invoke methods and receive signal notifications.
Loading QML Objects from C++
A QML document can be loaded with QQmlComponent or QQuickView. QQmlComponent loads a QML document as a C++ object that can then be modified from C++ code. QQuickView also does this, but as QQuickView is a QWindow-derived class, the loaded object will also be rendered into a visual display; QQuickView is generally used to integrate a displayable QML object into an application's user interface.
For example, suppose there is a MyItem.qml file that looks like this:
import QtQuick 2.0
Item {
width: 100; height: 100
}
This QML document can be loaded with QQmlComponent or QQuickView with the following C++ code. Using a QQmlComponent requires calling QQmlComponent::create() to create a new instance of the component, while a QQuickView automatically creates an instance of the component, which is accessible via QQuickView::rootObject():
// Using QQmlComponent
QQmlEngine engine;
QQmlComponent component(&engine,
QUrl::fromLocalFile("MyItem.qml"));
QObject *object = component.create();
...
delete object;
// Using QQuickView
QQuickView view;
view.setSource(QUrl::fromLocalFile("MyItem.qml"));
view.show();
QObject *object = view.rootObject();
This object is the instance of the MyItem.qml component that has been created. You can now modify the item's properties using QObject::setProperty() or QQmlProperty::write():
object->setProperty("width", 500);
QQmlProperty(object, "width").write(500);
The difference between QObject::setProperty() and QQmlProperty::write() is that the latter will also remove the binding in addition to setting the property value. For example, suppose the width assignment above had been a binding to height:
width: height
If the height of the Item changed after the object->setProperty("width", 500) call, the width would be updated again, as the binding remains active. However, if the height changes after the QQmlProperty(object, "width").write(500) call, the width will not be changed, as the binding does not exist anymore.
Alternatively, you can cast the object to its actual type and call methods with compile-time safety. In this case the base object of MyItem.qml is an Item, which is defined by the QQuickItem class:
QQuickItem *item = qobject_cast<QQuickItem*>(object);
item->setWidth(500);
You can also connect to any signals or call methods defined in the component using QMetaObject::invokeMethod() and QObject::connect(). See Invoking QML Methods and Connecting to QML Signals below for further details.
Accessing Loaded QML Objects by Object Name
QML components are essentially object trees with children that have siblings and their own children. Child objects of QML components can be located using the QObject::objectName property with QObject::findChild(). For example, if the root item in MyItem.qml had a child Rectangle item:
import QtQuick 2.0
Item {
width: 100; height: 100
Rectangle {
anchors.fill: parent
objectName: "rect"
}
}
The child could be located like this:
QObject *rect = object->findChild<QObject*>("rect");
if (rect)
rect->setProperty("color", "red");
Note that an object may have multiple children with the same objectName. For example, ListView creates multiple instances of its delegate, so if its delegate is declared with a particular objectName, the ListView will have multiple children with the same objectName. In this case, QObject::findChildren() can be used to find all children with a matching objectName.
Warning: Although it is possible to access QML objects from C++ and manipulate them, it is not the recommended approach, except for testing and prototyping purposes. One of the strengths of QML and C++ integration is the ability to implement UIs in QML separate from the C++ logic and dataset backend, and this fails if the C++ side starts manipulating QML directly. Such an approach also makes changing the QML UI difficult without affecting its C++ counterpart.
Accessing Members of a QML Object Type from C++
Properties
Any properties declared in a QML object are automatically accessible from C++. Given a QML item like this:
// MyItem.qml
import QtQuick 2.0
Item {
property int someNumber: 100
}
The value of the someNumber property can be set and read using QQmlProperty, or QObject::setProperty() and QObject::property():
QQmlEngine engine;
QQmlComponent component(&engine, "MyItem.qml");
QObject *object = component.create();
qDebug() << "Property value:" << QQmlProperty::read(object, "someNumber").toInt();
QQmlProperty::write(object, "someNumber", 5000);
qDebug() << "Property value:" << object->property("someNumber").toInt();
object->setProperty("someNumber", 100);
You should always use QObject::setProperty(), QQmlProperty or QMetaProperty::write() to change a QML property value, to ensure the QML engine is made aware of the property change. For example, say you have a custom type PushButton with a buttonText property that internally reflects the value of a m_buttonText member variable. Modifying the member variable directly like this is not a good idea:
//bad code
QQmlComponent component(engine, "MyButton.qml");
PushButton *button = qobject_cast<PushButton*>(component.create());
button->m_buttonText = "Click me";
Since the value is changed directly, this bypasses Qt's meta-object system and the QML engine is not made aware of the property change. This means property bindings to buttonText would not be updated, and any onButtonTextChanged handlers would not be called.
Invoking QML Methods
All QML methods are exposed to the meta-object system and can be called from C++ using QMetaObject::invokeMethod(). You can specify types for the parameters and the return value after the colon character, as shown in the code snippet below. This can be useful, for example, when you want to connect a signal in C++ with a certain signature to a QML-defined method. If you omit the types, the C++ signature will use QVariant.
Here is a C++ application that calls a QML method using QMetaObject::invokeMethod():
QML
// MyItem.qml
import QtQuick 2.0
Item {
function myQmlFunction(msg: string) : string {
console.log("Got message:", msg)
return "some return value"
}
}
C++
// main.cpp
QQmlEngine engine;
QQmlComponent component(&engine, "MyItem.qml");
QObject *object = component.create();
QString returnedValue;
QString msg = "Hello from C++";
QMetaObject::invokeMethod(object, "myQmlFunction",
Q_RETURN_ARG(QString, returnedValue),
Q_ARG(QString, msg));
qDebug() << "QML function returned:" << returnedValue;
delete object;
Notice the parameter and return type specified after the colon. You can use basic types and object types as type names.
If the type is omitted in QML, then you must specify QVariant as type with Q_RETURN_ARG() and Q_ARG() when calling QMetaObject::invokeMethod.
Connecting to QML Signals
All QML signals are automatically available to C++, and can be connected to using QObject::connect() like any ordinary Qt C++ signal. In return, any C++ signal can be received by a QML object using signal handlers.
Here is a QML component with a signal named qmlSignal that is emitted with a string-type parameter. This signal is connected to a C++ object's slot using QObject::connect(), so that the cppSlot() method is called whenever the qmlSignal is emitted:
// MyItem.qml
import QtQuick 2.0
Item {
id: item
width: 100; height: 100
signal qmlSignal(msg: string)
MouseArea {
anchors.fill: parent
onClicked: item.qmlSignal("Hello from QML")
}
}
class MyClass : public QObject
{
Q_OBJECT
public slots:
void cppSlot(const QString &msg) {
qDebug() << "Called the C++ slot with message:" << msg;
}
};
int main(int argc, char *argv[]) {
QGuiApplication app(argc, argv);
QQuickView view(QUrl::fromLocalFile("MyItem.qml"));
QObject *item = view.rootObject();
MyClass myClass;
QObject::connect(item, SIGNAL(qmlSignal(QString)),
&myClass, SLOT(cppSlot(QString)));
view.show();
return app.exec();
}
A QML object type in a signal parameter is translated to a pointer to the class in C++:
// MyItem.qml
import QtQuick 2.0
Item {
id: item
width: 100; height: 100
signal qmlSignal(anObject: Item)
MouseArea {
anchors.fill: parent
onClicked: item.qmlSignal(item)
}
}
class MyClass : public QObject
{
Q_OBJECT
public slots:
void cppSlot(QQuickItem *item) {
qDebug() << "Called the C++ slot with item:" << item;
qDebug() << "Item dimensions:" << item->width()
<< item->height();
}
};
int main(int argc, char *argv[]) {
QGuiApplication app(argc, argv);
QQuickView view(QUrl::fromLocalFile("MyItem.qml"));
QObject *item = view.rootObject();
MyClass myClass;
QObject::connect(item, SIGNAL(qmlSignal(QVariant)),
&myClass, SLOT(cppSlot(QVariant)));
view.show();
return app.exec();
}
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
|
{
"url": "https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html",
"source_domain": "doc.qt.io",
"snapshot_id": "crawl=CC-MAIN-2022-40",
"warc_metadata": {
"Content-Length": "46097",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZYNB26NWG3BOFBDR3QOMZT2VKSEBCKAV",
"WARC-Concurrent-To": "<urn:uuid:da598640-30ba-4f9f-93bf-27fd7cad679f>",
"WARC-Date": "2022-10-01T09:01:16Z",
"WARC-IP-Address": "18.203.89.116",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WRXLX2YZ7ORHNPKU5MAAUSUNRLADIYEJ",
"WARC-Record-ID": "<urn:uuid:ce6ad130-ed07-40eb-b829-eaff3032c4e4>",
"WARC-Target-URI": "https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cd6eca9c-49db-4115-9805-158e98550a36>"
},
"warc_info": "isPartOf: CC-MAIN-2022-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2022\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-82\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,
38,
39,
316,
317,
652,
653,
682,
683,
1079,
1080,
1150,
1151,
1170,
1171,
1178,
1206,
1208,
1209,
1530,
1531,
1554,
1573,
1606,
1650,
1688,
1692,
1707,
1727,
1744,
1795,
1808,
1845,
1846,
2021,
2022,
2057,
2099,
2100,
2341,
2342,
2356,
2357,
2664,
2665,
2863,
2864,
2918,
2939,
2940,
3157,
3158,
3202,
3203,
3489,
3490,
3509,
3510,
3517,
3545,
3546,
3562,
3591,
3618,
3624,
3626,
3627,
3665,
3666,
3719,
3729,
3768,
3769,
4135,
4136,
4600,
4601,
4649,
4650,
4661,
4662,
4769,
4770,
4784,
4803,
4804,
4811,
4844,
4846,
4847,
4975,
4976,
4995,
5043,
5081,
5082,
5165,
5214,
5215,
5288,
5328,
5329,
5726,
5727,
5738,
5787,
5855,
5890,
5891,
6150,
6151,
6172,
6173,
6598,
6599,
6684,
6685,
6689,
6703,
6722,
6723,
6730,
6781,
6822,
6857,
6863,
6865,
6869,
6881,
6900,
6948,
6986,
6987,
7010,
7042,
7093,
7139,
7169,
7170,
7225,
7240,
7241,
7361,
7362,
7504,
7505,
7531,
7532,
7747,
7748,
7996,
7997,
8011,
8030,
8031,
8038,
8051,
8079,
8080,
8114,
8115,
8131,
8160,
8212,
8218,
8220,
8251,
8253,
8266,
8280,
8319,
8383,
8389,
8392,
8393,
8428,
8465,
8466,
8522,
8561,
8562,
8583,
8638,
8694,
8695,
8712,
8735,
8737,
8738,
8826,
8827,
8841,
8860,
8861,
8868,
8881,
8909,
8910,
8947,
8948,
8964,
8993,
9033,
9039,
9041,
9072,
9074,
9087,
9101,
9138,
9199,
9200,
9255,
9290,
9296,
9299,
9300,
9335,
9372,
9373,
9429,
9468,
9469,
9490,
9546,
9603,
9604,
9621,
9644,
9646,
9647
],
"line_end_idx": [
38,
39,
316,
317,
652,
653,
682,
683,
1079,
1080,
1150,
1151,
1170,
1171,
1178,
1206,
1208,
1209,
1530,
1531,
1554,
1573,
1606,
1650,
1688,
1692,
1707,
1727,
1744,
1795,
1808,
1845,
1846,
2021,
2022,
2057,
2099,
2100,
2341,
2342,
2356,
2357,
2664,
2665,
2863,
2864,
2918,
2939,
2940,
3157,
3158,
3202,
3203,
3489,
3490,
3509,
3510,
3517,
3545,
3546,
3562,
3591,
3618,
3624,
3626,
3627,
3665,
3666,
3719,
3729,
3768,
3769,
4135,
4136,
4600,
4601,
4649,
4650,
4661,
4662,
4769,
4770,
4784,
4803,
4804,
4811,
4844,
4846,
4847,
4975,
4976,
4995,
5043,
5081,
5082,
5165,
5214,
5215,
5288,
5328,
5329,
5726,
5727,
5738,
5787,
5855,
5890,
5891,
6150,
6151,
6172,
6173,
6598,
6599,
6684,
6685,
6689,
6703,
6722,
6723,
6730,
6781,
6822,
6857,
6863,
6865,
6869,
6881,
6900,
6948,
6986,
6987,
7010,
7042,
7093,
7139,
7169,
7170,
7225,
7240,
7241,
7361,
7362,
7504,
7505,
7531,
7532,
7747,
7748,
7996,
7997,
8011,
8030,
8031,
8038,
8051,
8079,
8080,
8114,
8115,
8131,
8160,
8212,
8218,
8220,
8251,
8253,
8266,
8280,
8319,
8383,
8389,
8392,
8393,
8428,
8465,
8466,
8522,
8561,
8562,
8583,
8638,
8694,
8695,
8712,
8735,
8737,
8738,
8826,
8827,
8841,
8860,
8861,
8868,
8881,
8909,
8910,
8947,
8948,
8964,
8993,
9033,
9039,
9041,
9072,
9074,
9087,
9101,
9138,
9199,
9200,
9255,
9290,
9296,
9299,
9300,
9335,
9372,
9373,
9429,
9468,
9469,
9490,
9546,
9603,
9604,
9621,
9644,
9646,
9647,
10091
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 10091,
"ccnet_original_nlines": 230,
"rps_doc_curly_bracket": 0.003171140095219016,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2523929476737976,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.042317379266023636,
"rps_doc_frac_lines_end_with_ellipsis": 0.004329000134021044,
"rps_doc_frac_no_alph_words": 0.2801007628440857,
"rps_doc_frac_unique_words": 0.3233945071697235,
"rps_doc_mean_word_length": 5.7607035636901855,
"rps_doc_num_sentences": 91,
"rps_doc_symbol_to_word_ratio": 0.0005037799710407853,
"rps_doc_unigram_entropy": 5.336875915527344,
"rps_doc_word_count": 1308,
"rps_doc_frac_chars_dupe_10grams": 0.05361646041274071,
"rps_doc_frac_chars_dupe_5grams": 0.14280027151107788,
"rps_doc_frac_chars_dupe_6grams": 0.13536827266216278,
"rps_doc_frac_chars_dupe_7grams": 0.12156602740287781,
"rps_doc_frac_chars_dupe_8grams": 0.11068347841501236,
"rps_doc_frac_chars_dupe_9grams": 0.06715328246355057,
"rps_doc_frac_chars_top_2gram": 0.006370270159095526,
"rps_doc_frac_chars_top_3gram": 0.007962839677929878,
"rps_doc_frac_chars_top_4gram": 0.015129400417208672,
"rps_doc_books_importance": -946.9506225585938,
"rps_doc_books_importance_length_correction": -946.9506225585938,
"rps_doc_openwebtext_importance": -498.14154052734375,
"rps_doc_openwebtext_importance_length_correction": -498.14154052734375,
"rps_doc_wikipedia_importance": -322.2864074707031,
"rps_doc_wikipedia_importance_length_correction": -322.2864074707031
},
"fasttext": {
"dclm": 0.7648671865463257,
"english": 0.7401450276374817,
"fineweb_edu_approx": 2.7894883155822754,
"eai_general_math": 0.7834163308143616,
"eai_open_web_math": 0.1597898006439209,
"eai_web_code": 0.9378572106361389
}
}
|
{
"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.4",
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,255,019,127,906,595,000
|
Quantcast
Documentation Center
• Trial Software
• Product Updates
Overloading Functions for Your Class
Overloading MATLAB Functions
Class methods can provide implementations of MATLAB® functions that operate only on instances of the class. This is possible because MATLAB software can always identify to which class an object belongs.
MATLAB uses the dominant argument to determine which version of a function to call. If the dominant argument is an object, then MATLAB calls the method defined by the object's class, if there is one.
In cases where a class defines a function with the same name as a global function, the class's implementation of the function is said to overload the original global implementation.
Note: MATLAB does not support overloading functions using different signatures for the same function name.
For additional information on overloading functions, see:
Implementing MATLAB Operators
Classes designed to implement new MATLAB data types typically define certain operators, such as addition, subtraction, equality, and so on.
For example, standard MATLAB addition (+) cannot add two polynomials because this operation is not defined by simple addition. However, a polynomial class can define its own plus method that the MATLAB language calls to perform addition of polynomial objects when you use the + symbol:
p1 + p2
Implementing Operators for Your Class provides information on methods to overload.
Defining Arithmetic Operators for DocPolynom provides examples.
Rules for Naming to Avoid Conflicts
The names of methods, properties, and events are scoped to the class. Therefore, you should adhere to the following rules to avoid naming conflicts:
• You can reuse names that you have used in unrelated classes.
• You can reuse names in subclasses if the member does not have public or protected access. These names then refer to entirely different methods, properties, and events without affecting the superclass definitions
• Within a class, all names exist in the same name space and must be unique. A class cannot define two methods with the same name and a class cannot define a local function with the same name as a method.
• The name of a static method is considered without its class prefix. Thus, a static method name without its class prefix cannot match the name of any other method.
Was this topic helpful?
|
{
"url": "http://www.mathworks.com/help/matlab/matlab_oop/overloading-functions-for-your-class.html?nocookie=true",
"source_domain": "www.mathworks.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "45122",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:IMHWCFDM35TKKDB4X37RQ6ZZQKK3T5FD",
"WARC-Concurrent-To": "<urn:uuid:7107ef8e-a406-4c89-adfb-3702284abe71>",
"WARC-Date": "2014-04-25T03:57:02Z",
"WARC-IP-Address": "23.37.21.97",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:PL3XDXDWMCOX3LS65IWQ5STBQS2LEU7M",
"WARC-Record-ID": "<urn:uuid:9d9c13a2-9633-4c94-b442-642115c1b02e>",
"WARC-Target-URI": "http://www.mathworks.com/help/matlab/matlab_oop/overloading-functions-for-your-class.html?nocookie=true",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b5757bb0-db1a-4403-806b-4cd2b943713a>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-4-33.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-15\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for April 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,
10,
11,
32,
33,
52,
72,
73,
110,
111,
140,
141,
344,
345,
545,
546,
728,
729,
842,
843,
901,
902,
932,
933,
1073,
1074,
1360,
1361,
1369,
1370,
1453,
1454,
1518,
1519,
1555,
1556,
1705,
1706,
1771,
1772,
1988,
1989,
2196,
2197,
2364,
2365
],
"line_end_idx": [
10,
11,
32,
33,
52,
72,
73,
110,
111,
140,
141,
344,
345,
545,
546,
728,
729,
842,
843,
901,
902,
932,
933,
1073,
1074,
1360,
1361,
1369,
1370,
1453,
1454,
1518,
1519,
1555,
1556,
1705,
1706,
1771,
1772,
1988,
1989,
2196,
2197,
2364,
2365,
2388
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2388,
"ccnet_original_nlines": 45,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.412887841463089,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.026252979412674904,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1217183768749237,
"rps_doc_frac_unique_words": 0.4543010890483856,
"rps_doc_mean_word_length": 5.182795524597168,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.728290557861328,
"rps_doc_word_count": 372,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.044605810195207596,
"rps_doc_frac_chars_dupe_6grams": 0.02697095088660717,
"rps_doc_frac_chars_dupe_7grams": 0.02697095088660717,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01815352961421013,
"rps_doc_frac_chars_top_3gram": 0.0228215791285038,
"rps_doc_frac_chars_top_4gram": 0.023340249434113503,
"rps_doc_books_importance": -168.8974609375,
"rps_doc_books_importance_length_correction": -168.8974609375,
"rps_doc_openwebtext_importance": -114.50406646728516,
"rps_doc_openwebtext_importance_length_correction": -114.50406646728516,
"rps_doc_wikipedia_importance": -86.57231903076172,
"rps_doc_wikipedia_importance_length_correction": -86.57231903076172
},
"fasttext": {
"dclm": 0.21571695804595947,
"english": 0.8713533878326416,
"fineweb_edu_approx": 3.225330352783203,
"eai_general_math": 0.9801905751228333,
"eai_open_web_math": 0.24434471130371094,
"eai_web_code": 0.942100465297699
}
}
|
{
"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.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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,210,093,013,431,912,000
|
Chatbots are becoming a common component of many types of software systems. But they are typically developed as a side feature using ad-hoc tools and custom integrations. We believe chatbot design should play a more central role in software development processes. Even more, we believe chatbots could be the one and only User Interface offered by those systems, becoming a fully-fledged front-end mixing textual and graphical user interactions.
The specification and implementation of the user interface (UI) of a system is a key aspect in software development. In most cases, this UI takes the form of a Graphical User Interface (GUIs) that encompasses a number of visual components [6] to offer rich interactions between the user and the system.
Popularity of GUIs has resulted in a large number of GUI definition languages (e.g. IFML [2] is the latest standard) and run-time libraries for any imaginable programming language. Most non-trivial systems adhere to some kind of model-based philosophy [1] where software design models (including GUI models) are transformed into the production code the system executes at run-time. This transformation can be (semi)automated in some cases for improved production and code quality.
Nevertheless, these generators (the simplest example would be the scaffolding and CRUD-like functionality already available in many JS frameworks) are limited to “traditional” GUIs. The increasing popularity of Conversational User Interfaces (CUI) [8] has not yet impacted current software development processes. If a CUI is required, this is seen as a separate and ad-hoc project on top of the current system development.
Indeed, CUIs and GUIs are hardly ever regarded together, except for isolated experiments [7]. We believe this hampers the potential benefits of combining the best of both worlds. This is even more relevant now that CUIs are not limited to pure text (or voice) interfaces but are also incorporating some (so far still limited) visual components until now only typical of GUIs.
In fact, we think it is fair to wonder whether it still makes sense to have two separate UIs. Could these “rich CUI” (i.e. CUIs enriched with visual UI components) completely replace current GUIs? and offer a combined experience (where users would be both able to interact graphically with the UI components or address them via voice or text-based utterances and commands)?.
A new architecture for software development with Chatbots at the core
In this sense, at Xatkit, we propose a new development architecture where chatbots are first-class citizens of the development process. They are designed together with the rest of the system (the database and backend services) and deployed as the only front-end the system offers.
Our vision is summarized in the above figure. Action starts with the software designer specifying the models of both the front-end and back-end parts of the system at a platform-independent level. The difference is that now, the front-end is defined as a chatbot model. The chatbot model is composed of two different packages: the intent and the execution models.
The intent model describes the user intentions, covering both textual and graphical intents, i.e. clicking on a button or choosing an option in a group of radio buttons are defined as additional intents the chatbot will recognize. For the textual intents, we define, as usual, the training sentences and matching conditions. For the graphical intents, we list the events offered by the visual components. In any case, for every matched intent the software designer explains in the execution model how the chatbot should react by calling, if necessary, a back-end service whose behaviour has also been defined as part of the complete software specification.
From those models, the actual system implementation, including the chatbot-based front-end, is generated and deployed for its run-time execution. Matching of textual utterances is performed, as usual, by relying on a NLP engine (potentially external, e.g. Dialogflow) to classify it. Different strategies can be envisioned to process the events stemming from the visual components but for homogeneity, we propose the following one: clicks, selections and, in general, any interactions with graphical components are translated into plain text strings and matched following the same process as we do for input utterances. The generated text could be the name of the graphical element (in the case of a button) or the selected option (for radio buttons, lists,..). This guarantees a uniform treatment of all user interactions with the bot (instead of having to maintain two different matching engines) and facilitates the reuse of existing chatbot technology. Once the matched phase is done, the runtime engine reacts according to the execution model and replies back to the user either with text or by presenting any rich UI component she should use in the next interaction.
Open Challenges
We believe this vision is feasible in the short/mid-term since many of the required technological pieces already exist but are not yet glued together. Still, a few important challenges must be solved. We describe four of them, each one focusing on different aspects of the proposed architecture.
Chatbot Modeling and generation
On the one hand, a few chatbot frameworks come with Domain-Specific Languages (DSLs) to model bots at a higher abstraction level (see [4] as an example) but they only generate the chatbot layer, not the complete software infrastructure. On the other hand,low-code3tools generate the full system but mostly ignore any kind of chatbot capability or see it just as a dispensable and auxiliarycomponent4. Clearly, native integration of chatbot frameworks in current low-code tools is required. This implies adding chatbot modeling primitives to the low-code languages (very few low-code tools have some kind of chatbot support right now) and extending current code-generators to automate the creation and deployment of chatbots and their interactions of such bots with the rest of the system so that they can be used as a replacement of the traditional GUI layer generated by low-code tools so far.
Backend integrations
The whole point of a front-end is to be the interface between the user and the back-end services she needs to execute. For a chatbot front-end to be useful, the chatbot needs to be able to interact with all kinds of back-end services and not just reply using predefined and hard-coded textual responses.
As such, chatbot frameworks should, at the very least, embed native support for interacting with backend services exposed as REST APIs [5]. Other potential integrations could include GraphQL and asynchronous APIs. Custom integrations with specific customer stacks should also be possible.
A library of UI components for chatbots
In web development, there is a myriad of libraries with ready-to-use visual UI components. Initiatives like Web Components5 aim at facilitating their reusability in any specific front-end framework.
We would like to see a similar effort in the chatbots domain. Current chatbot frameworks either offer very limited components (mainly buttons) or force designers to write custom JavaScript code to build rich CUIs. These UI chatbot libraries should also be designed keeping in mind that not all chatbot deployment platforms offer the same capabilities (e.g. differences in messaging platforms).
Voice Support to interact with rich UIs
A chatbot-based front-end has the interesting side-effect to open the door to a voice interaction with the software system given that many chatbot frameworks embed some kind of predefined support for voicebots.
Still, voice assistants usually work best when the person employs full and correct sentences and/or a predefined set of known commands. Therefore, in order to successfully used voice to interact with the graphical components of the chatbot interface we would need to develop some specific commands (or “skills”) for that. This work could be built on top of the few initiatives that have explored voice commands to fill forms and other UI components [3, 9]. This line of work would also favor the accessibility of the system itself.
Final Message
Given the growing importance of chatbots in all types of software systems, we propose to make chatbot development a key concern in all software development methods and tools. Not only as a complement of the “traditional” GUIs generated by those systems but even as their complete replacement thanks to the richer conversational user interfaces that chatbots can now offer.
We believe our view is feasible and would bring significant benefits to the software and CUIs communities. We plan to advance in this direction by tackling some of the challenges described above. Also, and to avoid reinventing the wheel we would like to bring to the world of chatbot design the lessons learnt in all these years of GUI development.
Feel free to start exploring the power of chatbots as front-ends by downloading and “playing” with Xatkit, our open source flexible chatbot development platform.
REFERENCES
[1] Marco Brambilla, Jordi Cabot, and Manuel 2017. Model-Driven Software Engineering in Practice, Second Edition. Morgan & Claypool Publishers.
[2] Marco Brambilla and Piero 2014. Interaction flow modeling language: Model-driven UI engineering of web and mobile apps with IFML. Morgan Kaufmann.
[3] Kian Kok Cheung, Edwin Mit, and Chong Eng 2010. Framework for new generation web form and form filling for blind user. In 2010 International Conference on Computer Applications and Industrial Electronics. IEEE, 276–281.
[4] Gwendal Daniel, Jordi Cabot, Laurent Deruelle, and Mustapha 2020. Xatkit: A Multimodal Low-Code Chatbot Development Framework. IEEE Access 8 (2020), 15332–15346. https://doi.org/10.1109/ACCESS.2020.2966919
[5] Roy Fielding, Richard N. Taylor, Justin R. Erenkrantz, Michael M. Gorlick, Jim Whitehead, Rohit Khare, and Peyman Oreizy. 2017. Reflections on the REST architectural style and “principled design of the modern web architecture” . In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, Paderborn, Germany, September 4-8, 2017. 4–14.
[6] Jesse James 2010. Elements of user experience, the: user-centered design for the web and beyond. Pearson Education.
[7] Johan Levin. 2019. A chatbot-based graphical user interface for hospitalized patients: Empowering hospitalized patients with a patient-centered user experience and features for self-service in a bedside tablet. Master’s thesis. Chalmers University of Technology.
[8] Michael F. 2002. Spoken Dialogue Technology: Enabling the Conversational User Interface. ACM Comput. Surv. 34, 1 (March 2002), 90–169. https://doi.org/10.1145/505282.505285
[9] S Parthasarathy, Cyril Allauzen, and R Munkong. 2005. Robust access to large structured data using voice form-filling. In Ninth European Conference on Speech Communication and Technology.
Subscribe To Our Newsletter
Subscribe To Our Newsletter
Follow all our news around Xatit and the world of bots, chatbots and digital assistants
You have Successfully Subscribed!
Pin It on Pinterest
Share This
|
{
"url": "https://xatkit.com/chatbots-first-class-citizens-software-development-ui/",
"source_domain": "xatkit.com",
"snapshot_id": "crawl=CC-MAIN-2020-24",
"warc_metadata": {
"Content-Length": "54540",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ASKWFYKPPI5CEYWVGNTFEVTMQMHSKSGL",
"WARC-Concurrent-To": "<urn:uuid:f0c9655a-3114-4789-bddc-27f1f2217702>",
"WARC-Date": "2020-05-25T18:04:50Z",
"WARC-IP-Address": "35.189.121.142",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PG3KWCKISRMDRWFJQ7MY6RNBSMZC63W2",
"WARC-Record-ID": "<urn:uuid:ffdb9f5c-9954-4eb9-9509-1e0b8e6c67fa>",
"WARC-Target-URI": "https://xatkit.com/chatbots-first-class-citizens-software-development-ui/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cb7b812e-7a71-4be2-aefa-3771e38384f8>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-9.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,
445,
446,
749,
750,
1231,
1232,
1655,
1656,
2032,
2033,
2408,
2409,
2479,
2480,
2761,
2762,
3126,
3127,
3784,
3785,
4958,
4959,
4975,
4976,
5273,
5274,
5306,
5307,
6202,
6203,
6224,
6225,
6529,
6530,
6819,
6820,
6860,
6861,
7060,
7061,
7455,
7456,
7496,
7497,
7708,
7709,
8242,
8243,
8257,
8258,
8631,
8632,
8981,
8982,
9144,
9145,
9147,
9148,
9159,
9160,
9304,
9305,
9456,
9457,
9681,
9682,
9893,
9894,
10275,
10276,
10396,
10397,
10664,
10665,
10843,
10844,
11036,
11037,
11065,
11066,
11094,
11095,
11183,
11184,
11218,
11219,
11239,
11240
],
"line_end_idx": [
445,
446,
749,
750,
1231,
1232,
1655,
1656,
2032,
2033,
2408,
2409,
2479,
2480,
2761,
2762,
3126,
3127,
3784,
3785,
4958,
4959,
4975,
4976,
5273,
5274,
5306,
5307,
6202,
6203,
6224,
6225,
6529,
6530,
6819,
6820,
6860,
6861,
7060,
7061,
7455,
7456,
7496,
7497,
7708,
7709,
8242,
8243,
8257,
8258,
8631,
8632,
8981,
8982,
9144,
9145,
9147,
9148,
9159,
9160,
9304,
9305,
9456,
9457,
9681,
9682,
9893,
9894,
10275,
10276,
10396,
10397,
10664,
10665,
10843,
10844,
11036,
11037,
11065,
11066,
11094,
11095,
11183,
11184,
11218,
11219,
11239,
11240,
11250
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11250,
"ccnet_original_nlines": 88,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.344666987657547,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01956217922270298,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.18863530457019806,
"rps_doc_frac_unique_words": 0.38336241245269775,
"rps_doc_mean_word_length": 5.310645580291748,
"rps_doc_num_sentences": 120,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.69749116897583,
"rps_doc_word_count": 1719,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.009201450273394585,
"rps_doc_frac_chars_dupe_6grams": 0.004819809924811125,
"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.009858690202236176,
"rps_doc_frac_chars_top_3gram": 0.004819809924811125,
"rps_doc_frac_chars_top_4gram": 0.004819809924811125,
"rps_doc_books_importance": -900.7965087890625,
"rps_doc_books_importance_length_correction": -900.7965087890625,
"rps_doc_openwebtext_importance": -486.80804443359375,
"rps_doc_openwebtext_importance_length_correction": -486.80804443359375,
"rps_doc_wikipedia_importance": -364.8352966308594,
"rps_doc_wikipedia_importance_length_correction": -364.8352966308594
},
"fasttext": {
"dclm": 0.027796979993581772,
"english": 0.9104004502296448,
"fineweb_edu_approx": 2.159667491912842,
"eai_general_math": 0.6324618458747864,
"eai_open_web_math": 0.2263067364692688,
"eai_web_code": 0.6154062747955322
}
}
|
{
"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.67",
"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": "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": "10",
"label": "Knowledge Article"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,068,885,869,455,133,000
|
glutGet
retrieves simple GLUT state represented by integers.
Signature
glutGet( GLenum( state ) )-> int
glutGet( query ) -> <class 'ctypes.c_int'>
glutGet( GLenum(query) ) -> c_int
Parameters
VariablesDescription
state
Name of state to retrieve.
See Also
glutDeviceGet glutLayerGet glutGetColor glutGetWindow glutGetMenu glutGetModifiers glutExtensionSupported
Sample Code References
The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.
glutGet
OpenGLContext tests/glut_fullscreen.py Lines: 44, 45, 46, 47
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/conechecker.py Lines: 33, 33
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 74, 74
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 142, 142
OpenGL-Demo PyOpenGL-Demo/proesch/bezier/bezier.py Lines: 89, 89
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 55, 55, 136, 136
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 248, 258, 259
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 289
Glinter Widget.py Lines: 169, 169, 170, 170
Glinter Core.py Lines: 430, 430, 460, 460
{GPL3} OpenGL-Programmable 01-direct.py Lines: 108, 108, 155, 155, 187, 187
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 212, 212, 259, 259, 286, 286
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 256, 256, 313, 313, 340, 340
{GPL3} OpenGL-Programmable 03-array.py Lines: 119, 119, 166, 166, 198, 198
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 266, 266, 323, 323, 350, 350
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 234, 234, 292, 292, 319, 319
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 117, 117, 164, 164, 196, 196
{GPL3} OpenGL-Programmable 05-shader.py Lines: 204, 204, 251, 251, 278, 278
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 223, 223, 270, 270, 297, 297
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 138, 138, 185, 185, 217, 217
|
{
"url": "http://pyopengl.sourceforge.net/documentation/manual-3.0/glutGet.html",
"source_domain": "pyopengl.sourceforge.net",
"snapshot_id": "crawl=CC-MAIN-2017-17",
"warc_metadata": {
"Content-Length": "11217",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CNGCDLPD2DTIY5DMLZQBM2AJTSDVRQ7T",
"WARC-Concurrent-To": "<urn:uuid:03d99eed-4b5d-47b6-9d79-1e9ed51efcf4>",
"WARC-Date": "2017-04-28T21:53:38Z",
"WARC-IP-Address": "216.34.181.96",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:7GVMKX3NUBAAVAJK6VLXKSSOCNIO3W7H",
"WARC-Record-ID": "<urn:uuid:56022191-780f-4f68-9714-e9e64e096dff>",
"WARC-Target-URI": "http://pyopengl.sourceforge.net/documentation/manual-3.0/glutGet.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:afaa4ba6-ab0b-46b6-ad92-a4efeb149545>"
},
"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,
8,
9,
62,
63,
73,
74,
107,
150,
184,
185,
196,
197,
218,
224,
251,
252,
261,
262,
368,
369,
392,
393,
561,
562,
570,
631,
695,
755,
820,
885,
964,
1028,
1082,
1126,
1168,
1244,
1322,
1397,
1472,
1551,
1624,
1705,
1781,
1857
],
"line_end_idx": [
8,
9,
62,
63,
73,
74,
107,
150,
184,
185,
196,
197,
218,
224,
251,
252,
261,
262,
368,
369,
392,
393,
561,
562,
570,
631,
695,
755,
820,
885,
964,
1028,
1082,
1126,
1168,
1244,
1322,
1397,
1472,
1551,
1624,
1705,
1781,
1857,
1929
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1929,
"ccnet_original_nlines": 44,
"rps_doc_curly_bracket": 0.010368069633841515,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.04125737026333809,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02554027922451496,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5933202505111694,
"rps_doc_frac_unique_words": 0.5745614171028137,
"rps_doc_mean_word_length": 6.464912414550781,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.5525665283203125,
"rps_doc_word_count": 228,
"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.1492537260055542,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -266.6663818359375,
"rps_doc_books_importance_length_correction": -266.6663818359375,
"rps_doc_openwebtext_importance": -125.9027328491211,
"rps_doc_openwebtext_importance_length_correction": -125.9027328491211,
"rps_doc_wikipedia_importance": -54.25395584106445,
"rps_doc_wikipedia_importance_length_correction": -54.25395584106445
},
"fasttext": {
"dclm": 0.041124939918518066,
"english": 0.3551402688026428,
"fineweb_edu_approx": 2.649998188018799,
"eai_general_math": 0.528005838394165,
"eai_open_web_math": 0.06459605693817139,
"eai_web_code": 0.6636881828308105
}
}
|
{
"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.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": "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": "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": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,389,789,266,317,336,000
|
Extended NeoScav Mod
1917 posts / 0 new
Last post
I think so, but as I said I'm not 100% sure since I still don't fully understand the making mods business, I'm just merging a lot of them together. Also, found at least another thing that I remember when you override the recipe number 55 for "broad spear" you are also trying a recipe NSE:135 "makeshift light source" with completely different set of tools and ingredients so I removed it, check it also.
Oh, thanks for pointing that out. I would have never noticed. xD
Pew pew pew!
How do I get pure alcohol? is it better to treat wounds than just whiskey?
EDIT:
I have no idea what I'm missing to repair the yukon backpack and the duffelbag -_- got the tanned leather patches, got tons of fasteners, strings, medium strings, sharp/blunt tools, both the needles and the sewing kit and of course the skill tailoring.
I can make all kinds of leather stuff, belts, gun holsters etc... but I cannot find a way to unlock the repair recipes :O:O:O:O
Seems there are 3 recipes, 2 equal but with different ids :/ from moonshine and then from whiskey.
you need:
-Medium flame
-Distilling equipment
-Medic skill
-2 Water
-12 Moonshine or 12 Whiskey
and with a quick view I think the effects and the same, disinfect and increase pain a little
Alright, people. After eons of inactivity, the mod has been updated. These are mostly bugfixes, though. Here's the changelog:
-Increased the effectiveness of Painkillers and Morphine in dealing with pain.
-Temporarily removed Jersey Devils from the mod. They were not supposed to spawn but they did even though they had no spawn points.
-Fixed a wrong "alsoTry" recipe in the broad spear recipe.
-Fixed the Sawed Off Cathcart North Shotgun counting as an Air Gun in a recipe.
-Fixed Ball Bearing having the "Rifle Butt" melee attack.
-Fixed Ball Bearings having the same IDs as Sewing Kits, preventing the latter to spawn.
Thanks for reporting these issues! Some of them were pretty important.
Pew pew pew!
I'm currently modding another game but I might come back to Neo Scavenger one of these days. This was one of the last things I was working on:
IMAGE(https://cdn.discordapp.com/attachments/405034635332943893/470310104361861141/Tracksuit.png)
Pew pew pew!
what's the name of the game you're modding? also is there out there a comprehensive guide to your recipes? or a cheat to add them?
I can't for the life of me repair my backpacks or duffelbags
EDIT:
Misc recipe leather sheet reads it needs the tanning rack and tanning material as its purpose is to convert raw hide from dogmen or deer into drying leather than then you than, but it glitches and puts into the recipe/crafting are the materials to cut the pelt into raw hide patches instead of "processing it" in a better way. This happens even if you have everything needed to tan the pelt.
EDIT 2:
Please consider adding the solder coil to more loot places, as of now it seems it only spawns inside toolboxes but not always, it seems quite easy to find nowadays and I even have some handy here at home. Used ingame for almost all end-game related repairs and constructions I have almost everything but solder coil. Cheers!
Like the new tracksuit art, very cheeki breeki Gopnik
" The devil asked me how I knew my way around the halls of hell. I told him I need no map for I know the darkness well "
Hi CHiko,
Again, thanks for your great work. I like playing the game with your mod a lot. Still playing. I just download your new 54b mod and run the game. I got the error below:
Error: Unable to retirve image: ItmSWLaptopGPS.png row 278
Please help... I reinstall the game again and the mod, but the error stays.
Thanks for your help!
Hi Chiko, sorry for wrong reporting. I delete the old game sirectory and resintall both game and mod, then there is no error. I must have done something wong somewhere.
It is a good mod. What games are you working on now? Need something fresh... thanks
Are the guys at Zom Zom's supposed to be confiscating my Dogman Fur Coat and never giving it back? So far I always go for giving them Dogman Footage, but then my Fur Coat is never in my confiscated items box.
Im loving this mod, but I can not figure out how to get shotgun or rifle parts. Anyone know how?
Also wish Chiko updated this mod more frequently, it has lots of potential, but oh well
Dog be gone is better than shotgun
the gun parts are just the guns of the same type themselves... any two shotguns are regarded as two shotgun parts to to be repaired into a new 100% shotgun...
Also, anyone else is super goddamn annoyed by the cleaners? I remembered reading they wouldnt take stuff that was inside a campsite, but the next day a cleaner swept all my items away. I was camping in the sprawl, at hatters office, and i had to chase the cleaner for half an hour irl (constantly closing game without saving when he dissappeared). Needless to say, very annoying, I wish Chiko made it so they wouldnt steal from campsites. Or maybe make it so if a campsite has a tarp cloak, they wont steal from it since they recognize whoever owns the campsite as one of them. Heck, maybe you can wear the cloak to trigger dialogues with fellow cleaners
Dog be gone is better than shotgun
if to save loots, better to rent a car park. It is not safe anywhere, there is a chance to be taken. If you put the stuffs in the campsite when the slot on the map doens't show the loot icon, it is safe but not 100%. nowhere is safe!
So how do I contact Chiko? I just found a bug caused by the newest update. I was killing a DMC guard when it summoned a drone and it shredded by left leg. Yet when I checked my conditions screen (i had medic), the pain resistance bar was full (i even had fragile flaw). Then the drone escaped and the guard got a lucky shot and broke my arm. It said i had lost some blood, but the pain resistance bar was still full. I took care of my broken bone and my leg, only to have my other arm broken by another guard and, again, my character felt no pain at all
Dog be gone is better than shotgun
Hey!
I had such problem already. At some point in game, pain system did stop working for me. I had 2 severe wounds and 3 moderate and had no pain at all.
I thought I messed something when I edited the painkillers parameters..
I cannot seem to get the mod to work. Whenever I try to start the game I get the text:
Error: Unable to retrieve image:ItmSquirrelGloveStored.png row 291
The Lord of a few chickens.
If you are getting that error after installing the mod, you must have done something very wrong, since that specific file is already used by vanilla game and should be on the "..\NeoScavGameFolder\img\ItmSquirrelGloveStored.png" and referenced on "..\NeoScavGameFolder\getimages.php" as &strImageURL1060=ItmSquirrelGloveStored.png
Uninstall and reinstall then try to install using standard instructions.
" The devil asked me how I knew my way around the halls of hell. I told him I need no map for I know the darkness well "
Hi! Two questions:
1. Exactly how much alcohol is needed to remove the "Needs to drink" debuff? I can get my character up to medium inhebriation (Usually by chugging 2 beers with 3 beer units in each), and it still remains.
2. Where are ball bearings found?
Anyone know what the NeoCross Bike Pump is for?
Cannibal Family Picnic
If I could find the recipe spreadsheet I compiled I'd know for sure. However, my memory advises that the bike pump is an ingredient for the makeshift air gun.
EDIT: Aha found it!
Spoiler: Highlight to view
Ingredients
12-gauge shotgun parts x1 - any non-makeshift 12-gauge shotgun?
copper tubing x1
duct tape x4
bicycle pump x1 - NeoCross bike pump
fire extinguisher x1
Tools
Mechanic skill
Ranged skill
pliers
screwdriver
monkey wrench
When one's bedroom door hands one the doorknob, it's a very strange thing indeed.
Can somebody pleace Help me get a mod I have been trying On and off to get mods working for Neo for over a year and it just won't work. >talking about NSExtended as a exemple.
is this on Windows? and the easiest mod to practice with is probably DevKit but they're all the same.
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
if you don't mind screen-sharing on Discord, i can help you.
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
just create and account, log into here https://discord.gg/GQJPdw9 and ask Layarion to help a brother out
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
I love that I cant play neo scavenger now because I am an Idiot
you need modding help or something?
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
Just wondering what the current recipe for the dogman fur headdress is, I got the dogman fur coat, small string, a multi-tool, and the tailoring skill but can't craft it
Hello! been loving the mod! However, I can NOT get the bicycle cart built.
I've restarted the game, tried different variants of the recipe, but just can't seem to get it built.
Here's a screencap of whats uh, NOT happening.
https://imgur.com/a/l0aFLkt
I'm having issues with the surgeries. I can either get the full eye suite, or I can get the skin and muscle suites. If I get skin and muscle the eye surgeries disappear and vice versa.
I had the same issue, I think that's because there isn't enough space in the augmentation menu to add other stuff since you already have all the skills.
Hi Chiko!
I wanted to start a fresh game with your latest mod, but now Im confused.. Do you saw another dude complains about pain system not working for him in #1566?
I had similar bug long before last update, back when we had a discussion about morphine properties (#1500). At the start everything works fine and every dog bite caused some pain, but 60 days in to the game I had no pain even with several severe wounds..
My personal feeling is that some event or string causes base pain value to rise. Like you are supposed to have 100 points of pain, lets say dog bite causes -15 points of pain, or gunshot causes -40 points of pain. At the start it works like this, but then your your pain pool start to increase well over supposed value and you have 200 then 300 points of pain, and you basically turn into Robocop at some point.. No need for painkillers, no shock, no problemo at all. Sorry if this explanation is messy and hard to understand.
I hope you will look in to this.
Hey Chiko,
I've been a long-time fan who has enjoyed your mod, and just wanted to say thanks for all the hard work and time you've put into updating it over the years, and adding so much new content to Neo Scav. I hope to start working on my own mod tomorrow, and hopefully all the systems I'm thinking about add some new depth to the game. It's gonna be really fun learning all the different ins and outs of everything that I haven't tried poking around with yet. Anyway, thanks for being a great mod author.
Hey Chiko,
Thanks for the amazing mod! I might have missed something along the way, but how can I make rawhide sheet? there no large pelt drops from Dogman, and didn't catch a deer by now :)
I just got killed on my very first night, inside the cryo building, by your "feral wendigo", despite having gotten lucky enough to get full clothing, shoes, a spear, and a crowbar. It repeatedly tackled me and there was nothing I could do. Why would you put these in the start area?
Hello there! Has anybody got the recipe for the black combat coat? I'd be a grateful Neo-Scavenger!
Well hello there, lads. It's been a while. After a long time modding other games, I finally dragged myself into updating this mod. Here's the changelog:
-Edited the prices of a lot of items. Stuff now cost more assembled than as separated items. Poison mushrooms and berries can be sold for more.
-Increased the chances to find glasses and inhalers.
-Increased the chances to find home appliances in specific campsites.
-Added a new wearable, Tracksuit. They consist of a pair of trousers and a hoodie. Bad Muthas and Looters will have chances to wear these.
-The makeshift pistol can now fire both revolver and pistol ammo now.
-Added a new gun, Zipgun. It's a one-shot short range makeshift gun that can fire any handgun bullet. Only players with the ranged skill can craft and spot them in enemy hands.
-Added a recipe to repair a Half of a Pair of Binoculars. The recipe needs another Half of a Pair of Binoculars, among other ingredients.
-Added a ranged attack move for UVDs that deal minimal damage. Any kind of armor value will probably protect against it.
-Fixed flares and torches being useable to cook and boil water.
-Added a recipe to get a unit of activated charcoal from mask filters.
-Added a recipe to repair mask filters requiring 2 units of activated charcoal.
-Added an alternate water purification recipe to filter water using activated charcoal.
-Edited the mass water purification recipe with the makeshift still to require charcoal filtering.
-Added a new campsite item, Trapdoor. They have chances to spawn in Cabin campsites only. They offer a decent concealment bonus and inventory space.
-Twigs and Bark in campsites will offer less camp concealment now as a way to make them less OP.
-The town hex next to the Cryo Facility has been replaced by a Cabin in the woods hex.
Pew pew pew!
Alright, lads. Time for a new update. Here's the changelog:
-Edited the modURL paths so the mod is included in a "Mods" folder by default now.
-Edited the unidentified name for the one-shot zipgun coz they would display "punch" even when the player hold them.
-Fixed one-shot zipguns not being able to be put in pockets and in some containers.
-Added charcoal lumps and a recipe to make them. They count as medium fire fuel.
-Edited the recipe to make a medium campfire to require an extra medium fire fuel.
-Medium campfires will now drop a random amount of ash and a chance to drop a charcoal lump.
-Added a recipe to make activated charcoal using a makeshift still.
-Sugar can be consumed on its own now.
-Added a new noise trap, scattered broken shards. Much more easy to make but they degrade faster and don't raise camp alertness as much.
-Renamed the makeshift noise trap to food can chimes. They also don't display texts when deployed since you can see the alertness bar.
-The strangler's hood cannot be used in crafting and it doesn't degrade anymore.
-Bicycle pumps can now be placed inside Tool Kits.
-Edited the inventory space in most batteries. They can generally hold more power.
-UVDs degrading from throwing will immediately turn into scratched UVDs, and these will then break into pieces.
-Edited all Mulligan Stew recipes to be more flexible. This also include the poisoned mulligan recipes.
-Fixed scratched UVDs not having the throwing UVD attack.
-Fixed cigarette leftovers counting as small flexible wrapping objects in recipes.
-Fixed baseball bats counting as heavy blunt objects so they can no longer be used as hammers in recipes.
-Removed some redundant pieces of code in item properties that could have been achieved without them in ingredients.
Pew pew pew!
I appreciate the massive improvements your mod has made to the game, for a niche title to be continually improved over the last 5 years is incredible. Thanks for all your hard work.
Hey there, just made this account to report some problems I encountered.
The recipe to repair duffel bags can be used to "repair" a laptop bag INTO a duffel bag.
Plus, when I was fortunate enough to assemble a shopping cart and I wanted to transport some tools I found out that both my monkey wrench and my hacksaw couldn't be put into it, but the pliers could.
For some reason when i drag the mod into the folder it does not allow me to play the mod is there any possible solutions you might suggest
Cannibal Family Picnic
made this just for you.
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
Thank You that helped a lot for some reason after my latest update on my computer my computer fucked up my neo scav save and had to redownload the game off of steam fresh and go from there.
Cannibal Family Picnic
Does anyone have the recipe to repair the stove?
Cannibal Family Picnic
Or does anyone know how to make activated charcoal could not find the recipe yet
Cannibal Family Picnic
How hard is it really to combine this mod with mini Mighty mod of doom?
it's not that it can't be done, it's more about:
1) you basically need to know alittle about making a mod/how they work in the xml files.
2) the people who have that knowledge just don't have the interest or the time
3) the ones who have started doing it never finished/kept up with it. reasons could be many.
the monster merge is out dated, and even before it was outdated, it introduced bugs that didn't exist before because each mod will need bits and pieces from the other put into each other if you want the merge to feel more polished. something that martin did figure out later. as an example, NSE backpacks won't hold some items that missing an MSE tag added to it's items. So MMOD items need NSE tags added to them for them to work in NSE bags.
With mod load order being a thing, this has the potential to become a problem if handled poorly by the person merging the mods.
OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.
I posted a bug to the nexusmods page but I'm putting it here as well for visibility:
When attaching a sling to an empty makeshift long shotgun, a random amount of ammo appears in its inventory
Edit: I have confirmed this recipe chooses a random amount of ammunition to put in the gun
|
{
"url": "https://bluebottlegames.com/comment/27980",
"source_domain": "bluebottlegames.com",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "148891",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UYHECKL5B2GBJNG74AYI3RGZTZBP2C4Y",
"WARC-Concurrent-To": "<urn:uuid:ee99faef-c58b-4d44-a17e-4b30089f88af>",
"WARC-Date": "2022-08-16T22:15:56Z",
"WARC-IP-Address": "104.21.20.174",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:3B7S42IVRBAEUY5GDXFJEQII7ETG5EUP",
"WARC-Record-ID": "<urn:uuid:b9775f73-d98d-4f2a-82a7-2dca72c6199e>",
"WARC-Target-URI": "https://bluebottlegames.com/comment/27980",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:97fa3246-44de-4ed0-ba4d-e3e1cc281244>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-80\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,
21,
22,
41,
51,
52,
457,
458,
523,
524,
537,
538,
613,
614,
620,
873,
874,
1002,
1003,
1102,
1112,
1126,
1148,
1161,
1170,
1198,
1199,
1292,
1293,
1419,
1420,
1499,
1631,
1690,
1770,
1828,
1917,
1918,
1989,
1990,
2003,
2004,
2147,
2148,
2246,
2247,
2260,
2261,
2392,
2393,
2454,
2455,
2461,
2853,
2854,
2862,
3187,
3188,
3242,
3243,
3364,
3365,
3375,
3376,
3545,
3546,
3605,
3606,
3682,
3683,
3705,
3706,
3875,
3876,
3960,
3961,
4170,
4171,
4268,
4356,
4357,
4392,
4393,
4552,
4553,
5208,
5209,
5244,
5245,
5479,
5480,
6034,
6035,
6070,
6071,
6076,
6077,
6226,
6227,
6299,
6300,
6387,
6454,
6455,
6483,
6484,
6815,
6816,
6889,
6890,
7011,
7012,
7031,
7236,
7237,
7271,
7272,
7320,
7321,
7344,
7345,
7504,
7505,
7525,
7526,
7553,
7565,
7629,
7646,
7659,
7696,
7717,
7718,
7724,
7739,
7752,
7759,
7771,
7785,
7786,
7868,
7869,
8045,
8046,
8148,
8149,
8162,
8193,
8212,
8213,
8274,
8275,
8288,
8319,
8338,
8339,
8444,
8445,
8458,
8489,
8508,
8509,
8573,
8574,
8610,
8611,
8624,
8655,
8674,
8675,
8845,
8846,
8921,
9023,
9024,
9071,
9072,
9100,
9101,
9286,
9287,
9440,
9441,
9451,
9452,
9609,
9610,
9865,
9866,
10393,
10394,
10427,
10428,
10439,
10440,
10939,
10940,
10951,
11131,
11132,
11415,
11416,
11516,
11517,
11670,
11671,
11815,
11868,
11938,
12077,
12147,
12324,
12462,
12583,
12647,
12718,
12798,
12886,
12985,
13134,
13231,
13318,
13319,
13332,
13333,
13393,
13394,
13477,
13594,
13678,
13759,
13842,
13935,
14003,
14042,
14179,
14314,
14395,
14446,
14529,
14641,
14745,
14803,
14886,
14992,
15109,
15110,
15123,
15124,
15306,
15307,
15380,
15469,
15669,
15670,
15809,
15810,
15833,
15834,
15858,
15859,
15872,
15903,
15922,
15923,
16113,
16114,
16137,
16138,
16187,
16188,
16211,
16212,
16293,
16294,
16317,
16318,
16390,
16391,
16440,
16441,
16530,
16609,
16702,
16703,
17147,
17148,
17276,
17277,
17290,
17321,
17340,
17341,
17426,
17534,
17535
],
"line_end_idx": [
21,
22,
41,
51,
52,
457,
458,
523,
524,
537,
538,
613,
614,
620,
873,
874,
1002,
1003,
1102,
1112,
1126,
1148,
1161,
1170,
1198,
1199,
1292,
1293,
1419,
1420,
1499,
1631,
1690,
1770,
1828,
1917,
1918,
1989,
1990,
2003,
2004,
2147,
2148,
2246,
2247,
2260,
2261,
2392,
2393,
2454,
2455,
2461,
2853,
2854,
2862,
3187,
3188,
3242,
3243,
3364,
3365,
3375,
3376,
3545,
3546,
3605,
3606,
3682,
3683,
3705,
3706,
3875,
3876,
3960,
3961,
4170,
4171,
4268,
4356,
4357,
4392,
4393,
4552,
4553,
5208,
5209,
5244,
5245,
5479,
5480,
6034,
6035,
6070,
6071,
6076,
6077,
6226,
6227,
6299,
6300,
6387,
6454,
6455,
6483,
6484,
6815,
6816,
6889,
6890,
7011,
7012,
7031,
7236,
7237,
7271,
7272,
7320,
7321,
7344,
7345,
7504,
7505,
7525,
7526,
7553,
7565,
7629,
7646,
7659,
7696,
7717,
7718,
7724,
7739,
7752,
7759,
7771,
7785,
7786,
7868,
7869,
8045,
8046,
8148,
8149,
8162,
8193,
8212,
8213,
8274,
8275,
8288,
8319,
8338,
8339,
8444,
8445,
8458,
8489,
8508,
8509,
8573,
8574,
8610,
8611,
8624,
8655,
8674,
8675,
8845,
8846,
8921,
9023,
9024,
9071,
9072,
9100,
9101,
9286,
9287,
9440,
9441,
9451,
9452,
9609,
9610,
9865,
9866,
10393,
10394,
10427,
10428,
10439,
10440,
10939,
10940,
10951,
11131,
11132,
11415,
11416,
11516,
11517,
11670,
11671,
11815,
11868,
11938,
12077,
12147,
12324,
12462,
12583,
12647,
12718,
12798,
12886,
12985,
13134,
13231,
13318,
13319,
13332,
13333,
13393,
13394,
13477,
13594,
13678,
13759,
13842,
13935,
14003,
14042,
14179,
14314,
14395,
14446,
14529,
14641,
14745,
14803,
14886,
14992,
15109,
15110,
15123,
15124,
15306,
15307,
15380,
15469,
15669,
15670,
15809,
15810,
15833,
15834,
15858,
15859,
15872,
15903,
15922,
15923,
16113,
16114,
16137,
16138,
16187,
16188,
16211,
16212,
16293,
16294,
16317,
16318,
16390,
16391,
16440,
16441,
16530,
16609,
16702,
16703,
17147,
17148,
17276,
17277,
17290,
17321,
17340,
17341,
17426,
17534,
17535,
17625
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 17625,
"ccnet_original_nlines": 295,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4204515218734741,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.031341299414634705,
"rps_doc_frac_lines_end_with_ellipsis": 0.0033783800899982452,
"rps_doc_frac_no_alph_words": 0.15086321532726288,
"rps_doc_frac_unique_words": 0.31985995173454285,
"rps_doc_mean_word_length": 4.392425060272217,
"rps_doc_num_sentences": 226,
"rps_doc_symbol_to_word_ratio": 0.001859229989349842,
"rps_doc_unigram_entropy": 6.0011796951293945,
"rps_doc_word_count": 3142,
"rps_doc_frac_chars_dupe_10grams": 0.036084339022636414,
"rps_doc_frac_chars_dupe_5grams": 0.059126149863004684,
"rps_doc_frac_chars_dupe_6grams": 0.045503951609134674,
"rps_doc_frac_chars_dupe_7grams": 0.04217085987329483,
"rps_doc_frac_chars_dupe_8grams": 0.036084339022636414,
"rps_doc_frac_chars_dupe_9grams": 0.036084339022636414,
"rps_doc_frac_chars_top_2gram": 0.004347510170191526,
"rps_doc_frac_chars_top_3gram": 0.0073907701298594475,
"rps_doc_frac_chars_top_4gram": 0.008260269649326801,
"rps_doc_books_importance": -1896.0482177734375,
"rps_doc_books_importance_length_correction": -1896.0482177734375,
"rps_doc_openwebtext_importance": -1089.8111572265625,
"rps_doc_openwebtext_importance_length_correction": -1089.8111572265625,
"rps_doc_wikipedia_importance": -764.1311645507812,
"rps_doc_wikipedia_importance_length_correction": -764.1311645507812
},
"fasttext": {
"dclm": 0.15710508823394775,
"english": 0.9609089493751526,
"fineweb_edu_approx": 1.0891972780227661,
"eai_general_math": 0.17894554138183594,
"eai_open_web_math": 0.1677485704421997,
"eai_web_code": 0.0573354996740818
}
}
|
{
"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": "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": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,273,537,243,888,997,000
|
What is RDS?
If you aren’t versed in the tech industry or knowledgable on 2022 servers, then RDS is probably a new term for you. You’ll be happy to know that this is a relatively new term in the working sphere, and has been a breakthrough working method throughout this recent COVID pandemic. This fun video provides a short overview on how RDS works for remote employees and how it can be useful to a variety of businesses!
RDS stands for Remote Desktop Services, or accessing a desktop computer’s data from a long distance away. Essentially, it is remote access to servers that normally would only be accessible from their nearby location. Thus, all the benefits of having a powerful server are forwarded right to whatever device you are using, wherever you are in the world.
Video Source
Pretty cool, right? RDS has made work-from-home possible for thousands of employees who couldn’t make it to the office due to health concerns. This remote access to servers is also very secure as you needed certain login credentials to access your work files. With this option, offices continue to get work done while maintaining 6 feet (or 600 miles) of distance.
.
Leave a Reply
Your email address will not be published.
|
{
"url": "https://codeandroid.org/2022/03/02/what-is-rds/",
"source_domain": "codeandroid.org",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "26985",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VZGWWNDQW2DKAU2DI3MHBIDAGG3WQBCT",
"WARC-Concurrent-To": "<urn:uuid:c4e2b1c7-c253-4169-97ac-aaf76f81c29a>",
"WARC-Date": "2022-08-07T20:48:17Z",
"WARC-IP-Address": "165.232.148.185",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:TF56CSXL24VR5R6FDTXFCAWH3T6AGLBH",
"WARC-Record-ID": "<urn:uuid:c6aa56aa-4444-4321-8b8c-be4d1f51a224>",
"WARC-Target-URI": "https://codeandroid.org/2022/03/02/what-is-rds/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4f234f85-97f9-4381-ba78-1f3d9ee99cea>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-71\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,
13,
14,
426,
427,
780,
781,
782,
795,
796,
1161,
1163,
1164,
1178,
1179
],
"line_end_idx": [
13,
14,
426,
427,
780,
781,
782,
795,
796,
1161,
1163,
1164,
1178,
1179,
1220
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1220,
"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.4549180269241333,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024590160697698593,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13114753365516663,
"rps_doc_frac_unique_words": 0.6363636255264282,
"rps_doc_mean_word_length": 4.684210300445557,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.65371036529541,
"rps_doc_word_count": 209,
"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.015321760438382626,
"rps_doc_frac_chars_top_3gram": 0.02860061079263687,
"rps_doc_frac_chars_top_4gram": 0.042900919914245605,
"rps_doc_books_importance": -126.13639068603516,
"rps_doc_books_importance_length_correction": -126.13639068603516,
"rps_doc_openwebtext_importance": -70.68974304199219,
"rps_doc_openwebtext_importance_length_correction": -70.68965911865234,
"rps_doc_wikipedia_importance": -40.03517150878906,
"rps_doc_wikipedia_importance_length_correction": -40.03517150878906
},
"fasttext": {
"dclm": 0.15467071533203125,
"english": 0.9577417969703674,
"fineweb_edu_approx": 1.6001369953155518,
"eai_general_math": 0.00021988000662531704,
"eai_open_web_math": 0.06575781106948853,
"eai_web_code": 0.00004745000114780851
}
}
|
{
"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": "658.403",
"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": "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": "10",
"label": "Knowledge Article"
},
"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": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,479,405,609,904,508,000
|
Argument 1 missing or nil
I got this error and i dont know why:
code local script:
if mouse.Target ~= nil then
local pos2 = cast.Normal
local surface = mouse.TargetSurface
local surfaceObjectNormal = Vector3.FromNormalId(surface)
local surfaceWorldNormal = mouse.Target.CFrame:VectorToWorldSpace(surfaceObjectNormal)
game.ReplicatedStorage.shoot:FireServer(pos, pos2, hit, gun)
end
if mouse.Target == nil then
game.ReplicatedStorage.shoot:FireServer(pos, hit, gun)
end
code server script:
game.ReplicatedStorage.shoot.OnServerEvent:Connect(function(plr, pos, pos2, hit, gun)
local pistol = workspace:FindFirstChild(plr.Name):FindFirstChild(gun)
when the mouse.Target isnt nil, the code works perfectly, but when the mouse.Target is nil, i get the error code:
Argument 1 missing or nil - Server - shoot:2
How do i fix this?
if mouse.Target == nil then
game.ReplicatedStorage.shoot:FireServer(pos, hit, gun)
end
You have sent 3 arguments but there should be 4. If you don’t want to use pos2 then :FireServer(pos, nil, hit, gun)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
|
{
"url": "https://devforum.roblox.com/t/argument-1-missing-or-nil/2903510",
"source_domain": "devforum.roblox.com",
"snapshot_id": "CC-MAIN-2024-18",
"warc_metadata": {
"Content-Length": "26179",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BLYVTYCLAXMZV7Y2XJ3RAOJKOTHNVFUS",
"WARC-Concurrent-To": "<urn:uuid:02daab4a-0182-4322-aef2-7259bc9d7519>",
"WARC-Date": "2024-04-21T06:05:16Z",
"WARC-IP-Address": "23.33.180.224",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EVRXLHLEGXZEP5J4J4WCCACC7MSMTC4N",
"WARC-Record-ID": "<urn:uuid:12b6e80c-dfea-4058-b350-a42ae9e4abb8>",
"WARC-Target-URI": "https://devforum.roblox.com/t/argument-1-missing-or-nil/2903510",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:16a49853-6834-4aff-a955-e0a348540b93>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-97\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,
26,
27,
65,
66,
85,
86,
116,
144,
183,
244,
334,
398,
406,
409,
439,
497,
503,
504,
524,
525,
611,
682,
683,
797,
842,
843,
862,
863,
891,
948,
952,
953,
1069,
1070,
1077,
1078
],
"line_end_idx": [
26,
27,
65,
66,
85,
86,
116,
144,
183,
244,
334,
398,
406,
409,
439,
497,
503,
504,
524,
525,
611,
682,
683,
797,
842,
843,
862,
863,
891,
948,
952,
953,
1069,
1070,
1077,
1078,
1178
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1178,
"ccnet_original_nlines": 36,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.17307691276073456,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.003846149891614914,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3461538553237915,
"rps_doc_frac_unique_words": 0.5652173757553101,
"rps_doc_mean_word_length": 6.5217390060424805,
"rps_doc_num_sentences": 24,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.108697891235352,
"rps_doc_word_count": 138,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.19777777791023254,
"rps_doc_frac_chars_dupe_6grams": 0.15111111104488373,
"rps_doc_frac_chars_dupe_7grams": 0.15111111104488373,
"rps_doc_frac_chars_dupe_8grams": 0.15111111104488373,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03333333134651184,
"rps_doc_frac_chars_top_3gram": 0.053333330899477005,
"rps_doc_frac_chars_top_4gram": 0.06666667014360428,
"rps_doc_books_importance": -106.76222229003906,
"rps_doc_books_importance_length_correction": -106.76222229003906,
"rps_doc_openwebtext_importance": -77.00801849365234,
"rps_doc_openwebtext_importance_length_correction": -76.82398986816406,
"rps_doc_wikipedia_importance": -70.4745101928711,
"rps_doc_wikipedia_importance_length_correction": -70.4745101928711
},
"fasttext": {
"dclm": 0.1647685170173645,
"english": 0.5431448817253113,
"fineweb_edu_approx": 2.6175642013549805,
"eai_general_math": 0.96601402759552,
"eai_open_web_math": 0.5916174054145813,
"eai_web_code": 0.1562221646308899
}
}
|
{
"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": "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": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,926,413,902,834,232,000
|
notice
This is documentation for Rasa X Documentation v0.32.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (0.42.x).
Version: 0.32.x
Track Your Progress
Identifying successful conversations is an important step to understand what’s working and what’s not. Using this measure, you can monitor how your assistant improves as you fix bugs and make changes.
Rasa X is built to help you track your progress by tagging conversations.
Tagging Conversations via the API
For consistent progress tracking, you should find a way to automatically identify conversations that are likely to have been successful. How you do this depends on the use case of your assistant. For example, a few good indicators might be:
• a user signed up for your service
• a user did not contact support again within 24 hours
You can use the Rasa X API to automatically tag those conversations when those actions do or don’t occur. Here are a couple concrete examples:
• Carbon bot tags conversations using the Rasa X API when a user clicks a link to purchase carbon offsets
• Sara tags conversations using the Rasa X API when a user indicates whether or not they found the docs search results helpful
Tags can be applied to conversations using a POST call to the Rasa X REST API (make sure to replace {HOST} and {conversation_id} with your own values):
curl --data '[{"value":"review today","color":"eb4034"}]' \
http://{HOST}/api/conversations/{conversation_id}/tags
You can then focus on those specific conversations by filtering for that tag:
Rasa X Filter Tags
You can also delete a tag, removing it from all conversations, using a DELETE call to the Rasa X API.
Tagging Conversations in the UI
You can tag conversations in the Rasa X UI during the review process to identify successful conversations. Tags can also be used to identify specific problems with your assistant’s conversations, such as an intent misclassification.
In Rasa X, tags are applied by selecting a conversation in the Conversations page and using the gear icon on the right to select a tag.
Rasa X Manage Tags
You can speed up the process of manually tagging conversations as successes or failures by filtering for conversations where certain events happened. Here are some ideas:
• Filter by intent or action confidence to see conversations that include low prediction values
• Filter by a fallback action to see where your assistant was not able to move forward
• Filter for a specific slot to see if users are filling out a form
• Filter for positive or negative intents in feedback flows
|
{
"url": "https://rasa.com/docs/rasa-x/0.32.x/user-guide/track-progress",
"source_domain": "rasa.com",
"snapshot_id": "crawl=CC-MAIN-2021-43",
"warc_metadata": {
"Content-Length": "27459",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CMGNWOH2KK6A53DGTRGXQU2C7S7I2PRP",
"WARC-Concurrent-To": "<urn:uuid:ab91e222-5247-4446-b3ae-5b1f6e5a8b94>",
"WARC-Date": "2021-10-18T09:57:30Z",
"WARC-IP-Address": "167.172.136.193",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IKP4FJJGYJ43B73YR5TTX2R3JOGOGTC2",
"WARC-Record-ID": "<urn:uuid:2fba524b-84bb-4d4c-9f6a-1ee1e5c92249>",
"WARC-Target-URI": "https://rasa.com/docs/rasa-x/0.32.x/user-guide/track-progress",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d84f93b2-44bf-4010-a9df-985131f47eb4>"
},
"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 (info@commoncrawl.org)\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.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,
7,
8,
104,
167,
168,
184,
185,
205,
206,
407,
408,
482,
483,
517,
518,
759,
760,
798,
799,
856,
857,
1000,
1001,
1109,
1110,
1239,
1240,
1392,
1393,
1453,
1508,
1509,
1587,
1588,
1607,
1608,
1710,
1711,
1743,
1744,
1977,
1978,
2114,
2115,
2134,
2135,
2306,
2307,
2405,
2406,
2495,
2496,
2566,
2567
],
"line_end_idx": [
7,
8,
104,
167,
168,
184,
185,
205,
206,
407,
408,
482,
483,
517,
518,
759,
760,
798,
799,
856,
857,
1000,
1001,
1109,
1110,
1239,
1240,
1392,
1393,
1453,
1508,
1509,
1587,
1588,
1607,
1608,
1710,
1711,
1743,
1744,
1977,
1978,
2114,
2115,
2134,
2135,
2306,
2307,
2405,
2406,
2495,
2496,
2566,
2567,
2628
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2628,
"ccnet_original_nlines": 54,
"rps_doc_curly_bracket": 0.0038051800802350044,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3968254029750824,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0476190485060215,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1428571343421936,
"rps_doc_frac_unique_words": 0.4577464759349823,
"rps_doc_mean_word_length": 4.889671325683594,
"rps_doc_num_sentences": 20,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.807353496551514,
"rps_doc_word_count": 426,
"rps_doc_frac_chars_dupe_10grams": 0.040326450020074844,
"rps_doc_frac_chars_dupe_5grams": 0.05376860126852989,
"rps_doc_frac_chars_dupe_6grams": 0.040326450020074844,
"rps_doc_frac_chars_dupe_7grams": 0.040326450020074844,
"rps_doc_frac_chars_dupe_8grams": 0.040326450020074844,
"rps_doc_frac_chars_dupe_9grams": 0.040326450020074844,
"rps_doc_frac_chars_top_2gram": 0.02640422061085701,
"rps_doc_frac_chars_top_3gram": 0.023043690249323845,
"rps_doc_frac_chars_top_4gram": 0.021123379468917847,
"rps_doc_books_importance": -208.56729125976562,
"rps_doc_books_importance_length_correction": -208.56729125976562,
"rps_doc_openwebtext_importance": -156.9066162109375,
"rps_doc_openwebtext_importance_length_correction": -156.9066162109375,
"rps_doc_wikipedia_importance": -82.1567611694336,
"rps_doc_wikipedia_importance_length_correction": -82.1567611694336
},
"fasttext": {
"dclm": 0.044308070093393326,
"english": 0.8715707063674927,
"fineweb_edu_approx": 1.8738689422607422,
"eai_general_math": 0.07743679732084274,
"eai_open_web_math": 0.26012349128723145,
"eai_web_code": 0.1727900505065918
}
}
|
{
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
1,024,337,963,229,119,100
|
5 Steps To Fix Roku Sound Delay
Roku Sound Delay
Roku Sound Delay
If you are reading this, the chances are pretty high that you already know what Roku TV is.
You have probably bought one for many logical reasons. Their exceptional sound system, perhaps? Maybe it was the ease of use factor that got you hooked. After all, all you need to do is plug it in, connect it to the internet, and then you’re ready to enjoy your favorite shows.
However, there is one con in choosing Roku that more and more people on the internet are making their voices heard about it. Of course, we’re talking about the annoying sound delay.
For some of you, this defect will only be noticeable on a few channels. For others, it’s on every channel and even on Netflix. Whichever the case is for you, rest assured that this little guide will fix the problem.
So, if you’re tired of the audio racing ahead of the video and ruining your enjoyment of football games and films, you’ve come to the right place.
How do I troubleshoot the sound delay issue on my Roku TV?
The idea of fixing something that sounds as complicated as this can make some of us simply give up trying before we have even got going. However, with this fix, you need no experience in the tech field. Anyone can do it!
Just follow the detailed steps below, one at a time, and you’ll have the problem fixed in no time at all:
1. Change the Audio Settings To “Stereo”:
Sometimes, the easiest fixes are the ones that turn out to be the most effective. So, we’ll start with the easiest fix.
You may have noticed that when a commercial pops up while you’re watching something, it can cause everything to slip out of sync. The best thing to try is adjusting the audio settings on your TV to “Stereo.” It should fix the problem straight away.
Here is how you do it:
• Go to the “Home” button on your Roku remote.
• Scroll either down or up.
• Next, open the “Settings” options.
• Tap on the “Audio” option.
• Now, set the Audio mode to “Stereo.”
• After that, all you need to do is set the HDMI mode to PCM-Stereo.
Note that those Roku devices having an optical port will require you to set HDMI and S/PDIF to PCM-Stereo.
2. Check ALL Connections:
Most likely, the solution mentioned earlier will work 95% of the time. However, if the issue persists, check your internet connection.
Sometimes, if your internet speed and the connection’s stability are poor, it will affect your service’s quality, especially if you live in a remote area.
The best way to check your connection is to check your upload and download speed using a website such as this one here
Asides from this, there is also a chance that your HDMI cable or power supply may be slightly loose. Though it sounds like an obvious fix, you would be surprised how often it can happen – even to the tech-savvy among us.
So, it is worthwhile checking to make sure that you plug in both the HDMI cable and the power cable for the TV properly
3. Make Adjustments on the Remote:
If these fixes above have not worked for you, sometimes just making a quick change to the volume settings on your remote can fix the problem instantly.
Though it almost seems too easy to be effective, this fix has worked for plenty of people.
To give it a go, all you need to do on your remote control is disable and then enable the “Volume Mode”
4. Hit The Star (*) Key On Your Remote:
Picture this. You’re watching your favorite TV show. It goes to adverts, and then all of a sudden, the audio and video are way out of sync. Too far out of sync for you to even watch the show anymore.
You’re going to want a quick fix that sets the situation right again so that you don’t miss any vital plot information on your show. Here’s how it works:
• While your content is playing, simply hit the (*) button on your remote to access the volume settings.
• Then, if “Audio leveling” is enabled on your device, just switch it off
And that’s it. Again, this fix may seem a bit too simple to be in any way effective. But, rest assured, it has worked for many frustrated Roku users out there.
5. Clear the Cache.
Many people who work in IT joke that the most reliable fix is simply turning it off and turning it back on again. But, we think there’s a bit of wisdom behind this humor.
After all, restarting your phone or laptop when they malfunction seems to work at least some of the time, right?
All you need to do is follow these simple steps for cache clearing:
1. Unplug your Roku device and wait for at least five minutes
2. Plug it back in. this action will clear the cache, and the device will perform more efficiently.
It is recommended to clear the cache at intervals regardless of whether you are experiencing problems or not. Clearing the cache frees up more processing power for your device to perform at its best.
There are few things more frustrating than trying to unwind and watch your favorite shows just to have your experience ruined by lagging.
Luckily, across the board, users everywhere have reported that at least one of these fixes has worked for them time and time again.
Frequently Asked Questions:
How do I Fix Netflix Audio Lag on Roku TV?
Quite a few Roku devices users will have noticed that the only time their audio and video go out of sync is when they are on Netflix or Hulu.
More often than not, Netflix is the worst offender for this. But there’s some good news. It’s straightforward to fix the problem. There are a few streaming platforms out there that can override the sound settings on Roku.
Netflix is the most used of these. So, to get your Netflix working as normal and get back to enjoying your shows, here’s how you go about it:
1. First up, launch the Netflix channel on your Roku.
2. Start a video/show
3. Now, open up the “Audio and Subtitles” menu.
4. Pick “English 5.1” from the menu.
And that’s it. You can now enjoy your Netflix content at ease!
What can I Watch on Roku?
Roku offers a huge range of services that are both paid and unpaid. You can watch movies, television, news, etc.
Roku also supports widely used resources such as Netflix, Deezer, and Google Play. That’s right, and it even supports games.
Why Does My Roku’s Audio Keep Lagging?
There are multiple reasons that can cause your audio and video to go out of sync. In rare cases, it can be due to a weak internet signal.
Other times, the reasons for the lag can be a total mystery. Most users who experience this issue will note that the trouble begins when a commercial comes up or the video is paused.
The few most common factors include buggy software updates, network errors or bugs, loose input of the HDMI cable, inappropriate sound settings, slow internet speeds, etc.
At times, it may seem like the broadcaster is at fault and that everyone is experiencing the same issues. However, this simply isn’t the case. Luckily, the problem is easily remedied by following the above steps.
The Above Tips Didn’t Work. Are There Any Other Fixes?
Depending on the specific Roku device you are using, what works for you might not be the same as what works for the next person.
One unusual fix that we have come across is a simple rewind to set everything right again. Several Roku users are reporting that if you rewind 30 seconds, everything becomes synchronized again.
Over time, this may become annoying. However, on occasion, it will do for a quick fix.
What Causes a Roku TV to go out of sync?
The root of the whole problem is a default feature that is built-in to Roku TVs. Though this feature was supposed to provide optimal audio settings, many have found that it does quite the opposite.
The “Auto Detect” feature is to detect the device’s audio pairing capabilities.
Fixing Sound or Video Delay on Roku Devices.
As we have seen, fixing the video and audio sync on your Roku TV will never involve taking the TV apart to fix the problem. It also doesn’t involve sending the TV back to the manufacturer.
By going through the steps above and finding the one that relates to your specific TV, you should be able to fix the problem in an instant if it happens again.
6 thoughts on “5 Steps To Fix Roku Sound Delay”
1. I’m wondering why option #1 would be your first option. It’s really only a viable option if you only have stereo speakers. If you have any kind of surround, that option may fix lag, but it renders your home theater setup useless.
Turning off volume leveling should always be the first thing to try, imo.
2. Thank you so much for the help. My fix was hitting the star button on the remote and turning off leveling. I’m 60 yrs old and not as good with this stuff as you youngsters. Lol. I tried everything. I was even on the phone with Samsung for like 40 minutes ( really nice people). In 10 minutes you guys help me fix it. It was beginning to drive me nuts. Thank you!
3. Thanks for the help. I had to reset (final option) as if using the Roku stick for the first time after trying all of your other options, which worked. I fortunately didn’t lose all my apps, but did have to re-log into them all.
4. I’ve been having problems since I changed internet service (same provider, different location) but went from 100Mbps with no problem to well over 1Gbps with less latency and lag that made TV unwatchable!
I have the Roku Ultra and finally figured out the issue with mine… I added a number of channels and adding a *FAST* Micro SD card did the trick. These players have extremely limited storage and with enough apps, leaves the device with no room for cache.
Try deleting an app or two, or add the Micro SD card of you have an Ultra! Make sure it’s a good one, I’m using a Sandisk Pro, although that’s probably overkill. Just don’t use the Class 2, 2GB card that Roku sells!
Leave a Comment
|
{
"url": "https://internet-access-guide.com/roku-sound-delay/",
"source_domain": "internet-access-guide.com",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "196047",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DD7YQUUFIDVI46LETOZYENDXV6CB7N3G",
"WARC-Concurrent-To": "<urn:uuid:36fc420a-5ea9-49d1-bf34-a83a30e2cb29>",
"WARC-Date": "2023-10-02T10:23:26Z",
"WARC-IP-Address": "172.67.206.196",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:FTU37YWA3OZEK3YYV4ZD4SDN33N2UQQV",
"WARC-Record-ID": "<urn:uuid:f040f0ac-efb0-4a86-b764-fd6df3bbbe3a>",
"WARC-Target-URI": "https://internet-access-guide.com/roku-sound-delay/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:85320493-f7c4-4e11-a741-ae801a1da7ef>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-97\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,
32,
33,
50,
67,
68,
160,
161,
439,
440,
622,
623,
839,
840,
987,
988,
1047,
1048,
1269,
1270,
1376,
1377,
1419,
1420,
1540,
1541,
1791,
1792,
1815,
1816,
1865,
1895,
1934,
1965,
2006,
2077,
2078,
2185,
2186,
2212,
2213,
2348,
2349,
2504,
2505,
2624,
2625,
2846,
2847,
2967,
2968,
3003,
3004,
3156,
3157,
3248,
3249,
3353,
3354,
3394,
3395,
3595,
3596,
3750,
3751,
3858,
3934,
3935,
4096,
4097,
4118,
4119,
4290,
4291,
4404,
4405,
4473,
4474,
4538,
4640,
4641,
4842,
4843,
4981,
4982,
5114,
5115,
5143,
5144,
5187,
5188,
5330,
5331,
5553,
5554,
5696,
5697,
5755,
5781,
5833,
5874,
5875,
5938,
5939,
5965,
5966,
6079,
6080,
6205,
6206,
6245,
6246,
6384,
6385,
6569,
6570,
6742,
6743,
6956,
6957,
7012,
7013,
7142,
7143,
7337,
7338,
7426,
7427,
7468,
7469,
7667,
7668,
7749,
7750,
7795,
7796,
7985,
7986,
8147,
8148,
8196,
8197,
8432,
8510,
8511,
8879,
8880,
9113,
9114,
9323,
9324,
9582,
9583,
9803,
9804
],
"line_end_idx": [
32,
33,
50,
67,
68,
160,
161,
439,
440,
622,
623,
839,
840,
987,
988,
1047,
1048,
1269,
1270,
1376,
1377,
1419,
1420,
1540,
1541,
1791,
1792,
1815,
1816,
1865,
1895,
1934,
1965,
2006,
2077,
2078,
2185,
2186,
2212,
2213,
2348,
2349,
2504,
2505,
2624,
2625,
2846,
2847,
2967,
2968,
3003,
3004,
3156,
3157,
3248,
3249,
3353,
3354,
3394,
3395,
3595,
3596,
3750,
3751,
3858,
3934,
3935,
4096,
4097,
4118,
4119,
4290,
4291,
4404,
4405,
4473,
4474,
4538,
4640,
4641,
4842,
4843,
4981,
4982,
5114,
5115,
5143,
5144,
5187,
5188,
5330,
5331,
5553,
5554,
5696,
5697,
5755,
5781,
5833,
5874,
5875,
5938,
5939,
5965,
5966,
6079,
6080,
6205,
6206,
6245,
6246,
6384,
6385,
6569,
6570,
6742,
6743,
6956,
6957,
7012,
7013,
7142,
7143,
7337,
7338,
7426,
7427,
7468,
7469,
7667,
7668,
7749,
7750,
7795,
7796,
7985,
7986,
8147,
8148,
8196,
8197,
8432,
8510,
8511,
8879,
8880,
9113,
9114,
9323,
9324,
9582,
9583,
9803,
9804,
9819
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9819,
"ccnet_original_nlines": 154,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.45254790782928467,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.019167840480804443,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15942029654979706,
"rps_doc_frac_unique_words": 0.33445003628730774,
"rps_doc_mean_word_length": 4.2646565437316895,
"rps_doc_num_sentences": 133,
"rps_doc_symbol_to_word_ratio": 0.0009350199834443629,
"rps_doc_unigram_entropy": 5.602761268615723,
"rps_doc_word_count": 1791,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.020816970616579056,
"rps_doc_frac_chars_dupe_6grams": 0.011783190071582794,
"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.007855460047721863,
"rps_doc_frac_chars_top_3gram": 0.010212100110948086,
"rps_doc_frac_chars_top_4gram": 0.006284370087087154,
"rps_doc_books_importance": -884.8533325195312,
"rps_doc_books_importance_length_correction": -884.8533325195312,
"rps_doc_openwebtext_importance": -462.0915832519531,
"rps_doc_openwebtext_importance_length_correction": -462.0915832519531,
"rps_doc_wikipedia_importance": -261.0956726074219,
"rps_doc_wikipedia_importance_length_correction": -261.0956726074219
},
"fasttext": {
"dclm": 0.01945055089890957,
"english": 0.9455164074897766,
"fineweb_edu_approx": 1.1584159135818481,
"eai_general_math": 0.13065868616104126,
"eai_open_web_math": 0.24963068962097168,
"eai_web_code": 0.023848649114370346
}
}
|
{
"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": "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": "2",
"label": "Click Here References"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,767,349,504,985,800,000
|
本文将介绍如何使用CREATE VIEW语句为PolarDB-X创建视图。
前提条件
PolarDB-X实例版本需为5.4.5或以上,关于如何查看实例版本,请参见实例版本概览
语法
CREATE
[OR REPLACE]
VIEW view_name [(column_list)]
AS select_statement
示例
# 先建表
CREATE TABLE t_order (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`order_id` varchar(20) DEFAULT NULL,
`buyer_id` varchar(20) DEFAULT NULL,
`seller_id` varchar(20) DEFAULT NULL,
`order_snapshot` longtext DEFAULT NULL,
`order_detail` longtext DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `l_i_order` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 dbpartition by hash(`order_id`);
# 创建视图
create view t_detail as select order_id,order_detail from t_order;
# 查询视图
select * from t_detail;
|
{
"url": "https://help.aliyun.com/document_detail/182336.html",
"source_domain": "help.aliyun.com",
"snapshot_id": "crawl=CC-MAIN-2021-10",
"warc_metadata": {
"Content-Length": "134806",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NZ74XHNNH52MOCDRHOIDMRSRHEDK6OE2",
"WARC-Concurrent-To": "<urn:uuid:4b449a76-6dca-408f-927e-7ec0cd1134ef>",
"WARC-Date": "2021-02-25T05:28:44Z",
"WARC-IP-Address": "203.119.214.115",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:JBVN57OBF2FNY64P4PLPJLTXFWUAHJQD",
"WARC-Record-ID": "<urn:uuid:27989270-7692-4d4f-9078-99a96e2e4d9a>",
"WARC-Target-URI": "https://help.aliyun.com/document_detail/182336.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3e3b5650-159a-4e0b-81e7-d64c4c86c255>"
},
"warc_info": "isPartOf: CC-MAIN-2021-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2021\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-76.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: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
38,
39,
44,
45,
90,
91,
94,
95,
102,
119,
154,
178,
179,
182,
183,
189,
212,
255,
294,
333,
373,
415,
455,
477,
508,
578,
579,
586,
653,
654,
661
],
"line_end_idx": [
38,
39,
44,
45,
90,
91,
94,
95,
102,
119,
154,
178,
179,
182,
183,
189,
212,
255,
294,
333,
373,
415,
455,
477,
508,
578,
579,
586,
653,
654,
661,
684
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 684,
"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.028985509648919106,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.21014493703842163,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5072463750839233,
"rps_doc_frac_unique_words": 0.6470588445663452,
"rps_doc_mean_word_length": 7.25,
"rps_doc_num_sentences": 3,
"rps_doc_symbol_to_word_ratio": 0.021739130839705467,
"rps_doc_unigram_entropy": 3.6025116443634033,
"rps_doc_word_count": 68,
"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.11156187206506729,
"rps_doc_frac_chars_top_3gram": 0.1217038482427597,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -36.5234489440918,
"rps_doc_books_importance_length_correction": -41.016910552978516,
"rps_doc_openwebtext_importance": -26.628572463989258,
"rps_doc_openwebtext_importance_length_correction": -31.122034072875977,
"rps_doc_wikipedia_importance": -43.03248596191406,
"rps_doc_wikipedia_importance_length_correction": -47.52594757080078
},
"fasttext": {
"dclm": 0.6924669146537781,
"english": 0.33191439509391785,
"fineweb_edu_approx": 1.161789894104004,
"eai_general_math": 0.04378550872206688,
"eai_open_web_math": 0.007296680007129908,
"eai_web_code": 0.9544878602027893
}
}
|
{
"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": "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": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-873,569,065,146,689,700
|
Social media from the start has always been the talk. It’s the favourite activity to do for everyone regardless of their age. It is meant to be taken as an entertainment activity and the best time for everyone. It’s also been one of the most used communication tools. Google has always been a blessing for the world to find any information about anything in this world. The internet has abundant information beyond we can ever imagine. It’s been a great tool for so many who can benefit from the advantages social media gives us although everything has its pros and cons.
In a way, so much depends on how all the social media websites are being used. Though they have great power over everyone’s minds, they can also be abused and overused. When used wisely, the benefits of social media can definitely outweigh its disadvantages. Social media changes with everyday activities. It makes big and small changes in the world. This leads to encouragement around the world to get more changes for the better. It encourages the world of communication which leads to excellent learning opportunities. Technology is evolving rapidly in the world you live in. This efficiency in our advanced society lets you share your opinions with others and influence each other. Huge platforms for great ideas help your voice be
heard out there. You can take steps towards making a difference by using websites like LinkedIn, Facebook, Twitter, etc. Social Media, Media, Social, Facebook, Youtube, Twitter
However, like said earlier, it can be of disadvantage too. This depends on the user. You can either use it to your potential and make a mark or simply end up using it for fun and addiction sometimes.
Advantages of social media:
Firstly we cannot ignore the fact that social media is contributing so much towards education. It is a huge learning tool for all school and college students. You can come to college with already read information and knowledge. Be well-equipped with how it works. Webinars, online discussion forums and other such platforms can foster collaborations and discussions, create meaningful dialogue, help exchange ideas and boost the learning experience. Social media helps you stay connected with your network and with the updates and news on a daily and every minute basis. Helps you stay up to date with happenings of the world. Staying connected with friends and families that are in other cities and sharing the news with them. Its the fastest and the easiest ways of communication. On a bigger perspective, social media can inevitably lead you to get good job opportunities. LinkedIn helps you to
get connected with the professional world. It encourages you to think from a
professional point of view and connect with employers. When the employers post a job opening, you’ll know it in no time! Twitter and LinkedIn helps you stay updated on news and important developments from the fields of their career choices.
Been creative enough in college? Use your social media handles now! This can help you display your creativity and talent in the entire world just in minutes. You can have your own set of followers who can share their work with you too. You get appreciated for work but can also be criticized which also should be taken positively. Another great advantage is the marketing work you can do with the help of social media. It is all digital now. So is the marketing world. As you can see it, digital advertising is the future. You can reach the largely untapped market online. Also allows you or anyone as a marketer to display their products and showcase it to a big audience with less hard work and money spent. Some advantages cannot be explained well. The amount of exposure you will be getting from the world of social media, cannot be measured. But will give it to you in abundance! The internet has
made it accessible to get a large amount of information on many things. You can share a lot of information, your opinions and ideas through social media, webinar links, videos for tutorials, website info, etc. You can also interact with your class fellows and lecturers and discuss things. Study online from online classes by other lecturers, that are free of cost
Disadvantages of social media:
Like everything, social media has a set of cons. Its disadvantages come in play when you aren’t being too attentive towards the bigger goals of life. Social media can easily become a big distraction for you and keep you busy and addicted to it. It basically changes your behaviour and your attitude towards everything. You can start using it for popularity reasons which are in a way lethal for your future. Social media can lead to relationships being abused and misused or be fake on sites like facebook, giving relationships an artificial trait. Using it for a positive purpose, it is a complete blessing for the modern world. Ball, Networks, Internet, Network, Social
From providing your students with information and opportunities to build business networks, to find jobs and employment options, social media has a lot to offer! Helping you to see the world with a larger lens, the world of social media is fun and attractive and genuinely very interactive. What needs to be re-evaluated is how you use social media at every step very carefully.
When used wisely, the benefits can definitely be used with ease. It acts good and bad both. It’s always believed that information has a lot of power. Without information, people cannot change the world. With the help of social media, you have the liberty to change the world slowly and very strongly and its well-being at just a click of a button!
Contributor
Comments to: Social Media: Blessing or Curse For College Students
Your email address will not be published. Required fields are marked *
Attach images - Only PNG, JPG, JPEG and GIF are supported.
|
{
"url": "https://www.unnatimantra.com/social-media-blessing-or-curse-for-college-students/",
"source_domain": "www.unnatimantra.com",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "178311",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MVUWBVORMYENGZVNTTJN4TKC7XBC7LKD",
"WARC-Concurrent-To": "<urn:uuid:09fabe4b-b1e6-4949-9e98-f17f21f3f373>",
"WARC-Date": "2021-05-06T09:03:20Z",
"WARC-IP-Address": "35.208.66.191",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GIHVN4OZI3W56KGMPIPADD7RDK4NECQN",
"WARC-Record-ID": "<urn:uuid:838d5c7f-4ad5-4100-9af4-b4d27e35e680>",
"WARC-Target-URI": "https://www.unnatimantra.com/social-media-blessing-or-curse-for-college-students/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7e5babe9-86f3-4aa5-9026-1f108ff63eab>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-81.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,
573,
575,
1311,
1488,
1489,
1690,
1691,
1719,
1720,
2618,
2695,
2937,
2938,
3840,
4205,
4206,
4237,
4909,
4910,
5290,
5291,
5639,
5640,
5652,
5718,
5719,
5790,
5791
],
"line_end_idx": [
573,
575,
1311,
1488,
1489,
1690,
1691,
1719,
1720,
2618,
2695,
2937,
2938,
3840,
4205,
4206,
4237,
4909,
4910,
5290,
5291,
5639,
5640,
5652,
5718,
5719,
5790,
5791,
5849
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5849,
"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.45996442437171936,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0035587199963629246,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11209964007139206,
"rps_doc_frac_unique_words": 0.39777326583862305,
"rps_doc_mean_word_length": 4.782388687133789,
"rps_doc_num_sentences": 69,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.253005504608154,
"rps_doc_word_count": 988,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.029629629105329514,
"rps_doc_frac_chars_dupe_6grams": 0.010158729739487171,
"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.053544968366622925,
"rps_doc_frac_chars_top_3gram": 0.0192592591047287,
"rps_doc_frac_chars_top_4gram": 0.007195769809186459,
"rps_doc_books_importance": -436.39190673828125,
"rps_doc_books_importance_length_correction": -436.39190673828125,
"rps_doc_openwebtext_importance": -232.95774841308594,
"rps_doc_openwebtext_importance_length_correction": -232.95774841308594,
"rps_doc_wikipedia_importance": -179.1530303955078,
"rps_doc_wikipedia_importance_length_correction": -179.1530303955078
},
"fasttext": {
"dclm": 0.07824128866195679,
"english": 0.9489327669143677,
"fineweb_edu_approx": 2.070401668548584,
"eai_general_math": 0.0028079699259251356,
"eai_open_web_math": 0.061766739934682846,
"eai_web_code": 0.0008527599857188761
}
}
|
{
"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": "378.196",
"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": "-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": "12",
"label": "Listicle"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,104,617,199,925,069,000
|
"Fossies" - the Fresh Open Source Software Archive
Source code changes of the file "cinder/tests/unit/objects/test_backup.py" between
cinder-15.0.1.tar.gz and cinder-15.1.0.tar.gz
About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Train" series (latest release).
test_backup.py (cinder-15.0.1):test_backup.py (cinder-15.1.0)
skipping to change at line 144 skipping to change at line 144
def test_obj_field_restore_volume_id(self): def test_obj_field_restore_volume_id(self):
backup = objects.Backup(context=self.context, backup = objects.Backup(context=self.context,
restore_volume_id='2') restore_volume_id='2')
self.assertEqual('2', backup.restore_volume_id) self.assertEqual('2', backup.restore_volume_id)
def test_obj_field_metadata(self): def test_obj_field_metadata(self):
backup = objects.Backup(context=self.context, backup = objects.Backup(context=self.context,
metadata={'test_key': 'test_value'}) metadata={'test_key': 'test_value'})
self.assertEqual({'test_key': 'test_value'}, backup.metadata) self.assertEqual({'test_key': 'test_value'}, backup.metadata)
@mock.patch('cinder.objects.backup.Backup.get_by_id',
return_value=None)
def test_obj_field_parent(self, mock_lzy_ld):
backup = objects.Backup(context=self.context,
parent_id=None)
self.assertIsNone(backup.parent)
# Bug #1862635: should trigger a lazy load
backup = objects.Backup(context=self.context,
parent_id=fake.UUID5)
# need noqa here because of pyflakes issue #202
_ = backup.parent # noqa
mock_lzy_ld.assert_called_once()
def test_import_record(self): def test_import_record(self):
utils.replace_obj_loader(self, objects.Backup) utils.replace_obj_loader(self, objects.Backup)
backup = objects.Backup(context=self.context, id=fake.BACKUP_ID, backup = objects.Backup(context=self.context, id=fake.BACKUP_ID,
parent_id=None, parent_id=None,
num_dependent_backups=0) num_dependent_backups=0)
export_string = backup.encode_record() export_string = backup.encode_record()
imported_backup = objects.Backup.decode_record(export_string) imported_backup = objects.Backup.decode_record(export_string)
# Make sure we don't lose data when converting from string # Make sure we don't lose data when converting from string
self.assertDictEqual(self._expected_backup(backup), imported_backup) self.assertDictEqual(self._expected_backup(backup), imported_backup)
@mock.patch('cinder.db.get_by_id', return_value=fake_backup)
def test_import_record_w_parent(self, backup_get):
full_backup = objects.Backup.get_by_id(self.context, fake.USER_ID)
self._compare(self, fake_backup, full_backup)
utils.replace_obj_loader(self, objects.Backup)
incr_backup = objects.Backup(context=self.context,
id=fake.BACKUP2_ID,
parent=full_backup,
parent_id=full_backup['id'],
num_dependent_backups=0)
export_string = incr_backup.encode_record()
imported_backup = objects.Backup.decode_record(export_string)
# Make sure we don't lose data when converting from string
self.assertDictEqual(self._expected_backup(incr_backup),
imported_backup)
def test_import_record_additional_info(self): def test_import_record_additional_info(self):
utils.replace_obj_loader(self, objects.Backup) utils.replace_obj_loader(self, objects.Backup)
backup = objects.Backup(context=self.context, id=fake.BACKUP_ID, backup = objects.Backup(context=self.context, id=fake.BACKUP_ID,
parent_id=None, parent_id=None,
num_dependent_backups=0) num_dependent_backups=0)
extra_info = {'driver': {'key1': 'value1', 'key2': 'value2'}} extra_info = {'driver': {'key1': 'value1', 'key2': 'value2'}}
extra_info_copy = extra_info.copy() extra_info_copy = extra_info.copy()
export_string = backup.encode_record(extra_info=extra_info) export_string = backup.encode_record(extra_info=extra_info)
imported_backup = objects.Backup.decode_record(export_string) imported_backup = objects.Backup.decode_record(export_string)
skipping to change at line 176 skipping to change at line 208
self.assertDictEqual(extra_info_copy, extra_info) self.assertDictEqual(extra_info_copy, extra_info)
# Make sure we don't lose data when converting from string and that # Make sure we don't lose data when converting from string and that
# extra info is still there # extra info is still there
expected = self._expected_backup(backup) expected = self._expected_backup(backup)
expected['extra_info'] = extra_info expected['extra_info'] = extra_info
self.assertDictEqual(expected, imported_backup) self.assertDictEqual(expected, imported_backup)
def _expected_backup(self, backup): def _expected_backup(self, backup):
record = {name: field.to_primitive(backup, name, getattr(backup, name)) record = {name: field.to_primitive(backup, name, getattr(backup, name))
for name, field in backup.fields.items()} for name, field in backup.fields.items() if name != 'parent'}
return record return record
def test_import_record_additional_info_cant_overwrite(self): def test_import_record_additional_info_cant_overwrite(self):
utils.replace_obj_loader(self, objects.Backup) utils.replace_obj_loader(self, objects.Backup)
backup = objects.Backup(context=self.context, id=fake.BACKUP_ID, backup = objects.Backup(context=self.context, id=fake.BACKUP_ID,
parent_id=None, parent_id=None,
num_dependent_backups=0) num_dependent_backups=0)
export_string = backup.encode_record(id='fake_id') export_string = backup.encode_record(id='fake_id')
imported_backup = objects.Backup.decode_record(export_string) imported_backup = objects.Backup.decode_record(export_string)
End of changes. 3 change blocks.
1 lines changed or deleted 33 lines changed or added
Home | About | Features | All | Newest | Dox | Diffs | RSS Feeds | Screenshots | Comments | Imprint | Privacy | HTTP(S)
|
{
"url": "https://fossies.org/diffs/cinder/15.0.1_vs_15.1.0/cinder/tests/unit/objects/test_backup.py-diff.html",
"source_domain": "fossies.org",
"snapshot_id": "crawl=CC-MAIN-2020-29",
"warc_metadata": {
"Content-Length": "21707",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:C3C6HDLPM6V5BMEEL6MNG4RT3JHHY6GW",
"WARC-Concurrent-To": "<urn:uuid:c5394c3c-102c-4bba-a942-9b88597ccbc0>",
"WARC-Date": "2020-07-03T10:21:50Z",
"WARC-IP-Address": "144.76.163.196",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:X7433KQYDEVVIAZ4GCVOVHDANLFQLSSS",
"WARC-Record-ID": "<urn:uuid:84397482-6766-48f0-b5cc-b51882b57544>",
"WARC-Target-URI": "https://fossies.org/diffs/cinder/15.0.1_vs_15.1.0/cinder/tests/unit/objects/test_backup.py-diff.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c7e9c0dc-a097-4b36-8bfe-665534f78bd3>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-170.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,
55,
56,
139,
185,
186,
396,
433,
434,
498,
560,
648,
740,
786,
882,
952,
1044,
1118,
1242,
1296,
1315,
1361,
1407,
1423,
1456,
1499,
1545,
1567,
1615,
1640,
1673,
1733,
1827,
1957,
1989,
2039,
2117,
2241,
2359,
2497,
2558,
2609,
2676,
2722,
2769,
2820,
2840,
2860,
2889,
2914,
2958,
3020,
3079,
3136,
3153,
3245,
3339,
3469,
3501,
3551,
3675,
3747,
3867,
3991,
4053,
4153,
4289,
4345,
4427,
4499,
4595,
4667,
4811,
4915,
4943,
5065,
5159,
5289,
5321,
5371,
5473,
5597,
5632,
5685,
5686
],
"line_end_idx": [
55,
56,
139,
185,
186,
396,
433,
434,
498,
560,
648,
740,
786,
882,
952,
1044,
1118,
1242,
1296,
1315,
1361,
1407,
1423,
1456,
1499,
1545,
1567,
1615,
1640,
1673,
1733,
1827,
1957,
1989,
2039,
2117,
2241,
2359,
2497,
2558,
2609,
2676,
2722,
2769,
2820,
2840,
2860,
2889,
2914,
2958,
3020,
3079,
3136,
3153,
3245,
3339,
3469,
3501,
3551,
3675,
3747,
3867,
3991,
4053,
4153,
4289,
4345,
4427,
4499,
4595,
4667,
4811,
4915,
4943,
5065,
5159,
5289,
5321,
5371,
5473,
5597,
5632,
5685,
5686,
5829
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5829,
"ccnet_original_nlines": 84,
"rps_doc_curly_bracket": 0.003431119956076145,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.11036788672208786,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.010033439844846725,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.465719074010849,
"rps_doc_frac_unique_words": 0.4324324429035187,
"rps_doc_mean_word_length": 11.034398078918457,
"rps_doc_num_sentences": 136,
"rps_doc_symbol_to_word_ratio": 0.010033439844846725,
"rps_doc_unigram_entropy": 4.825576305389404,
"rps_doc_word_count": 407,
"rps_doc_frac_chars_dupe_10grams": 0.24404363334178925,
"rps_doc_frac_chars_dupe_5grams": 0.327321320772171,
"rps_doc_frac_chars_dupe_6grams": 0.2943665087223053,
"rps_doc_frac_chars_dupe_7grams": 0.24404363334178925,
"rps_doc_frac_chars_dupe_8grams": 0.24404363334178925,
"rps_doc_frac_chars_dupe_9grams": 0.24404363334178925,
"rps_doc_frac_chars_top_2gram": 0.09886439889669418,
"rps_doc_frac_chars_top_3gram": 0.06813626736402512,
"rps_doc_frac_chars_top_4gram": 0.0155867300927639,
"rps_doc_books_importance": -553.2724609375,
"rps_doc_books_importance_length_correction": -553.2724609375,
"rps_doc_openwebtext_importance": -361.15478515625,
"rps_doc_openwebtext_importance_length_correction": -361.15478515625,
"rps_doc_wikipedia_importance": -277.21636962890625,
"rps_doc_wikipedia_importance_length_correction": -277.21636962890625
},
"fasttext": {
"dclm": 0.9851481914520264,
"english": 0.3808666169643402,
"fineweb_edu_approx": 3.5237343311309814,
"eai_general_math": 0.8273323178291321,
"eai_open_web_math": 0.08208054304122925,
"eai_web_code": 0.5924581289291382
}
}
|
{
"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": "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": "-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": "22",
"label": "Truncated"
}
},
"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": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,694,758,432,642,183,000
|
Kubernetes Manifests
From NovaOrdis Knowledge Base
Jump to: navigation, search
Internal
Overview
A manifest expresses the desired state of a specific component of the application, and it is POSTed to the API server to instruct the cluster to adjust the corresponding current state. The steps involved by processing a manifest are described here:
Declarative versus Imperative Approach
Note that only a small subset of manifest fields for an object is actually required. The optional fields that are not set are automatically expanded with default values by Kubernetes.
Manifest files can be generated with kubectl kustomize and they are usually applied with kubectl apply. Note that kubectl apply can be used to both create or update a resource.
TODO
Commonality. There are common elements with the same semantics for all manifests (e.g. metadata.name). Address them here in a common section, and link from individual "kinds" to here.
Common Elements
apiVersion
The .apiVersion field contains the API group and the API version of the resource's specification. Normally, the format is:
apiVersion: <group>/<version>
However, some of the most common resources are defined in a special API group called the core group. For those resources, we can omit the <group> part when specifying apiVersion. While a StorageClass object should be specified as apiVersion: storage.k8s.io/v1, a pod, whose corresponding type is defined in the core group, should be specified as apiVersion: v1.
There are situations when an object is declared with an apiVersion, but after deployment, when the object is introspected, the return values shows a different version. For example, the object may be deployed as apiVersion: v1, but introspection after deployment may show apiVersion: v1beta1. This is normal behavior.
The API group a specific resource type belongs to is shown by the kubectl api-resources command.
kind
The .kind field specifies the type of resource being deployed.
metadata
Manifest Metadata
spec
The .spec section contains the specification of the object to be deployed. The structure varies with the type of the object.
Manifest Operations
|
{
"url": "https://kb.novaordis.com/index.php/Kubernetes_Manifests",
"source_domain": "kb.novaordis.com",
"snapshot_id": "CC-MAIN-2023-06",
"warc_metadata": {
"Content-Length": "18977",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:47MU37NIH3EY57KYGT2NBOPMBSRD3END",
"WARC-Concurrent-To": "<urn:uuid:4b8d4039-7585-47e1-a5c6-77a447ed5e9d>",
"WARC-Date": "2023-02-06T03:34:43Z",
"WARC-IP-Address": "104.50.201.83",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:YTN4IU3TEZJXMJMEQHIGBWMWHAVHJXOG",
"WARC-Record-ID": "<urn:uuid:c1d03436-2322-41b6-a8c2-42f3b18284d7>",
"WARC-Target-URI": "https://kb.novaordis.com/index.php/Kubernetes_Manifests",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b8c8e759-97a8-4902-b655-72fb18700c9d>"
},
"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 (info@commoncrawl.org)\r\nhostname: ip-10-67-67-108\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,
21,
22,
52,
80,
81,
90,
91,
100,
101,
350,
351,
390,
391,
575,
576,
753,
754,
759,
760,
944,
945,
961,
962,
973,
974,
1097,
1098,
1128,
1129,
1491,
1492,
1809,
1810,
1907,
1908,
1913,
1914,
1977,
1978,
1987,
1988,
2006,
2007,
2012,
2013,
2138,
2139
],
"line_end_idx": [
21,
22,
52,
80,
81,
90,
91,
100,
101,
350,
351,
390,
391,
575,
576,
753,
754,
759,
760,
944,
945,
961,
962,
973,
974,
1097,
1098,
1128,
1129,
1491,
1492,
1809,
1810,
1907,
1908,
1913,
1914,
1977,
1978,
1987,
1988,
2006,
2007,
2012,
2013,
2138,
2139,
2158
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2158,
"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.37027707695961,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017632240429520607,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1511334925889969,
"rps_doc_frac_unique_words": 0.4832826554775238,
"rps_doc_mean_word_length": 5.300911903381348,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.639312744140625,
"rps_doc_word_count": 329,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.033256880939006805,
"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.014334860257804394,
"rps_doc_frac_chars_top_3gram": 0.01146788988262415,
"rps_doc_frac_chars_top_4gram": 0.02178899012506008,
"rps_doc_books_importance": -206.71302795410156,
"rps_doc_books_importance_length_correction": -206.71302795410156,
"rps_doc_openwebtext_importance": -134.91146850585938,
"rps_doc_openwebtext_importance_length_correction": -134.91146850585938,
"rps_doc_wikipedia_importance": -75.23127746582031,
"rps_doc_wikipedia_importance_length_correction": -75.23127746582031
},
"fasttext": {
"dclm": 0.14947044849395752,
"english": 0.8644632697105408,
"fineweb_edu_approx": 3.0417630672454834,
"eai_general_math": 0.8591433763504028,
"eai_open_web_math": 0.37631309032440186,
"eai_web_code": 0.9126647710800171
}
}
|
{
"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": "004.028",
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,118,264,620,152,874,000
|
Back to home page
Project CMSSW displayed by LXR
File indexing completed on 2021-02-14 14:31:51
0001 #ifndef _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
0002 #define _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
0003
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0006 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
0007 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0008
0009 class MagneticField;
0010 /** Class providing access to a set of relevant parameters of a trajectory
0011 * in the global, Cartesian frame. The basic data members used to calculate
0012 * these parameters are the charge and global position and momentum.
0013 */
0014
0015 class GlobalTrajectoryParameters {
0016 public:
0017 // construct
0018 GlobalTrajectoryParameters()
0019 : theField(nullptr), theX(), theP(), theCharge(0) {} // we must initialize cache to non-NAN to avoid FPE
0020
0021 /** Constructing class from global position, global momentum and charge.
0022 */
0023
0024 GlobalTrajectoryParameters(const GlobalPoint& aX,
0025 const GlobalVector& aP,
0026 TrackCharge aCharge,
0027 const MagneticField* fieldProvider)
0028 : theField(fieldProvider), theX(aX), theP(aP), theCharge(aCharge) {
0029 setCache();
0030 }
0031
0032 GlobalTrajectoryParameters(const GlobalPoint& aX,
0033 const GlobalVector& aP,
0034 TrackCharge aCharge,
0035 const MagneticField* fieldProvider,
0036 GlobalVector fieldValue)
0037 : theField(fieldProvider), theX(aX), theP(aP), cachedMagneticField(fieldValue), theCharge(aCharge) {}
0038
0039 /** Constructing class from global position, direction (unit length)
0040 * and transverse curvature. The fourth int argument is dummy,
0041 * it serves only to distinguish
0042 * this constructor from the one above.
0043 */
0044 GlobalTrajectoryParameters(const GlobalPoint& aX,
0045 const GlobalVector& direction,
0046 float transverseCurvature,
0047 int,
0048 const MagneticField* fieldProvider);
0049
0050 GlobalTrajectoryParameters(const GlobalPoint& aX,
0051 const GlobalVector& direction,
0052 float transverseCurvature,
0053 int,
0054 const MagneticField* fieldProvider,
0055 GlobalVector fieldValue);
0056
0057 /** Global position.
0058 */
0059
0060 GlobalPoint position() const { return theX; }
0061
0062 /** Global momentum.
0063 */
0064
0065 GlobalVector momentum() const { return theP; }
0066
0067 GlobalVector direction() const { return theP.unit(); }
0068
0069 /** Charge q of particle, either +1 or -1.
0070 */
0071
0072 TrackCharge charge() const { return theCharge; }
0073
0074 /** Charge divided by (magnitude of) momentum, i.e. q/p.
0075 */
0076
0077 float signedInverseMomentum() const { return theCharge / theP.mag(); }
0078
0079 /** Charge divided by transverse momentum, i.e. q/p_T.
0080 */
0081
0082 float signedInverseTransverseMomentum() const { return theCharge / theP.perp(); }
0083
0084 /** Transverse curvature kappa (which is the inverse radius of curvature in the transverse plane)
0085 * in cm^{-1}. Sign convention is such that positive kappa means
0086 * counterclockwise rotation of the track with respect to the global z-axis.
0087 */
0088
0089 float transverseCurvature() const {
0090 return -2.99792458e-3f * signedInverseTransverseMomentum() * cachedMagneticField.z();
0091 }
0092
0093 /** Vector whose first three elements are the global position coordinates and
0094 * whose last three elements are the global momentum coordinates.
0095 */
0096
0097 AlgebraicVector6 vector() const {
0098 return AlgebraicVector6(theX.x(), theX.y(), theX.z(), theP.x(), theP.y(), theP.z());
0099 }
0100
0101 GlobalVector magneticFieldInInverseGeV(const GlobalPoint& x) const;
0102 GlobalVector magneticFieldInInverseGeV() const { return 2.99792458e-3f * cachedMagneticField; }
0103
0104 GlobalVector magneticFieldInTesla() const { return cachedMagneticField; }
0105
0106 const MagneticField& magneticField() const { return *theField; }
0107
0108 private:
0109 void setCache();
0110
0111 private:
0112 const MagneticField* theField;
0113 GlobalPoint theX;
0114 GlobalVector theP;
0115 GlobalVector cachedMagneticField;
0116 signed char theCharge;
0117 };
0118
0119 #endif
|
{
"url": "https://cmssdt.cern.ch/lxr/source/TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h",
"source_domain": "cmssdt.cern.ch",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "24412",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GNFPGQMY7X5SBATQXET3VRTUG5LV3YWO",
"WARC-Concurrent-To": "<urn:uuid:c723b2eb-b825-4e10-bf06-57d7596ebc00>",
"WARC-Date": "2022-08-11T06:11:53Z",
"WARC-IP-Address": "188.184.102.160",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:U3EW2Q3WKZQC2WJOSXO2AMVFXEHGUYZB",
"WARC-Record-ID": "<urn:uuid:e3ed14bb-f26e-452e-af6d-8b7a8ea8a1ad>",
"WARC-Target-URI": "https://cmssdt.cern.ch/lxr/source/TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8adcfd6c-35c8-41c5-8c2c-b3541c607bee>"
},
"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 (info@commoncrawl.org)\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,
18,
19,
50,
51,
53,
55,
56,
61,
62,
63,
110,
111,
163,
215,
221,
288,
356,
424,
490,
496,
522,
602,
684,
759,
768,
774,
814,
827,
847,
883,
1000,
1006,
1086,
1097,
1103,
1160,
1218,
1273,
1343,
1422,
1443,
1452,
1458,
1515,
1573,
1628,
1698,
1757,
1870,
1876,
1953,
2025,
2066,
2114,
2125,
2182,
2247,
2308,
2347,
2418,
2424,
2481,
2546,
2607,
2646,
2716,
2776,
2782,
2810,
2821,
2827,
2880,
2886,
2914,
2925,
2931,
2985,
2991,
3053,
3059,
3109,
3120,
3126,
3182,
3188,
3252,
3263,
3269,
3347,
3353,
3415,
3426,
3432,
3521,
3527,
3633,
3706,
3791,
3802,
3808,
3851,
3946,
3955,
3961,
4046,
4120,
4131,
4137,
4178,
4272,
4281,
4287,
4362,
4465,
4471,
4552,
4558,
4630,
4636,
4650,
4674,
4680,
4694,
4732,
4757,
4783,
4824,
4854,
4862,
4868
],
"line_end_idx": [
18,
19,
50,
51,
53,
55,
56,
61,
62,
63,
110,
111,
163,
215,
221,
288,
356,
424,
490,
496,
522,
602,
684,
759,
768,
774,
814,
827,
847,
883,
1000,
1006,
1086,
1097,
1103,
1160,
1218,
1273,
1343,
1422,
1443,
1452,
1458,
1515,
1573,
1628,
1698,
1757,
1870,
1876,
1953,
2025,
2066,
2114,
2125,
2182,
2247,
2308,
2347,
2418,
2424,
2481,
2546,
2607,
2646,
2716,
2776,
2782,
2810,
2821,
2827,
2880,
2886,
2914,
2925,
2931,
2985,
2991,
3053,
3059,
3109,
3120,
3126,
3182,
3188,
3252,
3263,
3269,
3347,
3353,
3415,
3426,
3432,
3521,
3527,
3633,
3706,
3791,
3802,
3808,
3851,
3946,
3955,
3961,
4046,
4120,
4131,
4137,
4178,
4272,
4281,
4287,
4362,
4465,
4471,
4552,
4558,
4630,
4636,
4650,
4674,
4680,
4694,
4732,
4757,
4783,
4824,
4854,
4862,
4868,
4879
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4879,
"ccnet_original_nlines": 130,
"rps_doc_curly_bracket": 0.006558720022439957,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1119592934846878,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007633590139448643,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4987277388572693,
"rps_doc_frac_unique_words": 0.6038544178009033,
"rps_doc_mean_word_length": 7.102783679962158,
"rps_doc_num_sentences": 34,
"rps_doc_symbol_to_word_ratio": 0.008905850350856781,
"rps_doc_unigram_entropy": 5.278171539306641,
"rps_doc_word_count": 467,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.036177270114421844,
"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.029846249148249626,
"rps_doc_frac_chars_top_3gram": 0.05305999144911766,
"rps_doc_frac_chars_top_4gram": 0.01627977006137371,
"rps_doc_books_importance": -401.033203125,
"rps_doc_books_importance_length_correction": -401.033203125,
"rps_doc_openwebtext_importance": -244.9529571533203,
"rps_doc_openwebtext_importance_length_correction": -244.9529571533203,
"rps_doc_wikipedia_importance": -163.7587432861328,
"rps_doc_wikipedia_importance_length_correction": -163.7587432861328
},
"fasttext": {
"dclm": 0.6696317791938782,
"english": 0.3134630620479584,
"fineweb_edu_approx": 2.2551634311676025,
"eai_general_math": 0.937119722366333,
"eai_open_web_math": 0.7811111807823181,
"eai_web_code": 0.3011654019355774
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.035",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "539.7",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Physics",
"level_3": "Nuclear physics and Matter"
}
}
},
"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": "-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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-164,014,603,373,365,570
|
ATS (programming language)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
ATS
Paradigm multi-paradigm: imperative, functional
Designed by Hongwei Xi at the Boston University
Stable release ATS2-0.2.5 / 2015-12-22
License GPLv3
Website http://www.ats-lang.org/
Influenced by
Dependent ML, ML, OCaml
ATS (Applied Type System) is a programming language designed to unify programming with formal specification. ATS has support for combining theorem proving with practical programming through the use of advanced type systems.[1] The performance of ATS has been demonstrated to be comparable to that of the C and C++ programming languages.[2] By using theorem proving and strict type checking, the compiler can detect and prove that its implemented functions are not susceptible to bugs such as division by zero, memory leaks, buffer overflow, and other forms of memory corruption by verifying pointer arithmetic and reference counting before the program compiles. Additionally, by using the integrated theorem-proving system of ATS (ATS/LF), the programmer may make use of static constructs that are intertwined with the operative code to prove that a function attains its specification.
History[edit]
ATS is derived mostly from the ML and OCaml programming languages. An earlier language, Dependent ML, by the same author has been incorporated by the language.
Theorem proving[edit]
The primary focus of ATS is to support theorem proving in combination with practical programming.[1] With theorem proving one can prove, for instance, that an implemented function does not produce memory leaks. It also prevents other bugs that might otherwise only be found during testing. It incorporates a system similar to those of proof assistants which usually only aim to verify mathematical proofs—except ATS uses this ability to prove that the implementations of its functions operate correctly, and produce the expected output.
As a simple example, in a function using division, the programmer may prove that the divisor will never equal zero, preventing a division by zero error. Let's say, the divisor 'X' was computed as 5 times the length of list 'A'. One can prove, that in the case of a non-empty list, 'X' is non-zero, since 'X' is the product of two non-zero numbers (5 and the length of 'A'). A more practical example would be proving through reference counting that the retain count on an allocated block of memory is being counted correctly for each pointer. Then one can know, and quite literally prove, that the object will not be deallocated prematurely, and that memory leaks will not occur.
The benefit of the ATS system is that since all theorem proving occurs strictly within the compiler, it has no effect on the speed of the executable program. ATS code is often harder to compile than standard C code, but once it compiles the programmer can be certain that it is running correctly to exactly the degree specified by their proofs.
In ATS proofs are separate from implementation, so it is possible to implement a function without proving it if the programmer so desires.
Data representation[edit]
According to the author (Hongwei Xi), ATS's efficiency[3] is largely due to the way that data is represented in the language and tail-call optimizations (which are generally important for the efficiency of functional programming languages). Data can be stored in a flat or unboxed representation rather than a boxed representation.
An introductory case[edit]
Propositions[edit]
dataprop expresses predicates as algebraic types.
Predicates in pseudo‑code somewhat similar to ATS source (see below for valid ATS source):
FACT(n, r) iff fact(n) = r
MUL(n, m, prod) iff n * m = prod
FACT(n, r) =
FACT(0, 1)
| FACT(n, r) iff FACT(n-1, r1) and MUL(n, r1, r) // for n > 0
// expresses fact(n) = r iff r = n * r1 and r1 = fact(n-1)
In ATS code:
dataprop FACT (int, int) =
| FACTbas (0, 1) // basic case: FACT(0, 1)
// inductive case
| {n:int | n > 0} {r,r1:int} FACTind (n, r) of (FACT (n-1, r1), MUL (n, r1, r))
where FACT (int, int) is a proof type
Example[edit]
Non tail-recursive factorial with proposition or "Theorem" proving through the construction dataprop.
The evaluation of fact1(n-1) returns a pair (proof_n_minus_1 | result_of_n_minus_1) which is used in the calculation of fact1(n). The proofs express the predicates of the proposition.
Part 1 (algorithm and propositions)
[FACT (n, r)] implies [fact (n) = r]
[MUL (n, m, prod)] implies [n * m = prod]
FACT (0, 1)
FACT (n, r) iff FACT (n-1, r1) and MUL (n, r1, r) forall n > 0
To remember:
{...} universal quantification
[...] existential quantification
(... | ...) (proof | value)
@(...) flat tuple or variadic function parameters tuple
.<...>. termination metric[4]
#include "share/atspre_staload.hats"
dataprop
FACT (int, int) =
(* basic case: *)
| FACTbas (0, 1) of ()
(* inductive case: *)
| {n:nat}{r:int}
FACTind (n+1, (n+1)*r) of (FACT (n, r))
(* note that int(x) , also int x, is the monovalued type of the int x value.
The function signtuare below says:
forall n:nat, exists r:int where fact( num: int(n)) returns (FACT (n, r) | int(r)) *)
fun
fact{n:nat} .<n>.
(
n: int (n)
) : [r:int] (FACT (n, r) | int(r)) =
(
if n > 0
then let
val (pf1 | r1) = fact (n-1) in (FACTind(pf1) | n * r1)
end // end of [then]
else (FACTbas() | 1)
)
Part 2 (routines and test)
implement
main0 (argc, argv) =
{
//
val () =
if (argc != 2)
then prerrln! ("Usage: ", argv[0], " <integer>")
//
val () = assert (argc >= 2)
val n0 = g0string2int (argv[1])
val n0 = g1ofg0 (n0)
val () = assert (n0 >= 0)
val (_(*pf*) | res) = fact (n0)
//
val ((*void*)) = println! ("fact(", n0, ") = ", res)
//
} (* end of [main0] *)
This can all be added to a single file and compiled as follows. Compilation should work with various back end C compilers, e.g. gcc. Garbage collection is not used unless explicitly stated with -D_ATS_GCATS )[5]
patscc fact1.dats -o fact1
./fact1 4
compiles and gives the expected result
Features[edit]
Basic types[edit]
• bool (true, false)
• int (literals: 255, 0377, 0xFF), unary minus as ~ (as in ML)
• double
• char 'a'
• string "abc"
Tuples and records[edit]
prefix @ or none means direct, flat or unboxed allocation
val x : @(int, char) = @(15, 'c') // x.0 = 15 ; x.1 = 'c'
val @(a, b) = x // pattern matching binding, a= 15, b='c'
val x = @{first=15, second='c'} // x.first = 15
val @{first=a, second=b} = x // a= 15, b='c'
val @{second=b, ...} = x // with omission, b='c'
prefix ' means indirect or boxed allocation
val x : '(int, char) = '(15, 'c') // x.0 = 15 ; x.1 = 'c'
val '(a, b) = x // a= 15, b='c'
val x = '{first=15, second='c'} // x.first = 15
val '{first=a, second=b} = x // a= 15, b='c'
val '{second=b, ...} = x // b='c'
special
With '|' as separator, some functions return wrapped the result value with an evaluation of predicates
val ( predicate_proofs | values) = myfunct params
Common[edit]
{...} universal quantification
[...] existential quantification
(...) parenthetical expression or tuple
(... | ...) (proofs | values)
.<...>. termination metric
@(...) flat tuple or variadic function parameters tuple (see example's printf)
@[byte][BUFLEN] type of an array of BUFLEN values of type byte[6]
@[byte][BUFLEN]() array instance
@[byte][BUFLEN](0) array initialized to 0
Dictionary[edit]
sort
domain
sortdef nat = {a: int | a >= 0 } // from prelude: ∀ a ∈ int ...
typedef String = [a:nat] string(a) // [..]: ∃ a ∈ nat ...
type (as sort)
generic sort for elements with the length of a pointer word, to be used in type parameterized polymorphic functions. Also "boxed types"[7]
// {..}: ∀ a,b ∈ type ...
fun {a,b:type} swap_type_type (xy: @(a, b)): @(b, a) = (xy.1, xy.0)
t@ype
linear version of previous type with abstracted length. Also unboxed types.[7]
viewtype
a domain class like type with a view (memory association)
viewt@ype
linear version of viewtype with abstracted length. It supersets viewtype
view
relation of a Type and a memory location. The infix @ is its most common constructor
T @ L asserts that there is a view of type T at location L
fun {a:t@ype} ptr_get0 {l:addr} (pf: a @ l | p: ptr l): @(a @ l | a)
fun {a:t@ype} ptr_set0 {l:addr} (pf: a? @ l | p: ptr l, x: a): @(a @ l | void)
the type of ptr_get0 (T) is ∀ l : addr . ( T @ l | ptr( l ) ) -> ( T @ l | T) // see manual, section 7.1. Safe Memory Access through Pointers[8]
viewdef array_v (a:viewt@ype, n:int, l: addr) = @[a][n] @ l
T?
possibly uninitialized type
pattern matching exhaustivity[edit]
as in case+, val+, type+, viewtype+, ...
• with suffix '+' the compiler issues an error in case of non exhaustive alternatives
• without suffix the compiler issues a warning
• with '-' as suffix, avoids exhaustivity control
modules[edit]
staload "foo.sats" // foo.sats is loaded and then opened into the current namespace
staload F = "foo.sats" // to use identifiers qualified as $F.bar
dynload "foo.dats" // loaded dynamically at run-time
dataview[edit]
Dataviews are often declared to encode recursively defined relations on linear resources.[9]
dataview array_v (a: viewt@ype+, int, addr) =
| {l: addr} array_v_none (a, 0, l)
| {n: nat} {l: addr}
array_v_some (a, n+1, l)
of (a @ l, array_v (a, n, l+sizeof a))
datatype / dataviewtype[edit]
Datatypes[10]
datatype workday = Mon | Tue | Wed | Thu | Fri
lists
datatype list0 (a:t@ype) = list0_cons (a) of (a, list0 a) | list0_nil (a)
dataviewtype[edit]
A dataviewtype is similar to a datatype, but it is linear. With a dataviewtype, the programmer is allowed to explicitly free (or deallocate) in a safe manner the memory used for storing constructors associated with the dataviewtype.[11]
variables[edit]
local variables
var res: int with pf_res = 1 // introduces pf_res as an alias of view @ (res)
on stack array allocation:
#define BUFLEN 10
var !p_buf with pf_buf = @[byte][BUFLEN](0) // pf_buf = @[byte][BUFLEN](0) @ p_buf[12]
See val and var declarations[13]
References[edit]
1. ^ a b Combining Programming with Theorem Proving
2. ^ ATS benchmarks | Computer Language Benchmarks Game (web archive)
3. ^ Discussion about the language's efficiency (Language Shootout: ATS is the new top gunslinger. Beats C++.)
4. ^ Termination metrics
5. ^ Compilation - Garbage collection
6. ^ type of an array types like @[T][I]
7. ^ a b Intro. to Dependent types
8. ^ Manual, section 7.1. Safe Memory Access through Pointers (outdated)
9. ^ Dataview construct
10. ^ Datatype construct
11. ^ Dataviewtype construct
12. ^ Manual - 7.3 Memory allocation on stack (outdated)
13. ^ Val and Var declarations (outdated)
External links[edit]
|
{
"url": "https://en.wikipedia.org/wiki/ATS_(programming_language)",
"source_domain": "en.wikipedia.org",
"snapshot_id": "crawl=CC-MAIN-2016-07",
"warc_metadata": {
"Content-Length": "62015",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AAUFVE6YNOLQE5AXUEBJ6NKOGPEU4JOV",
"WARC-Concurrent-To": "<urn:uuid:fdbe2e4b-6216-4c23-8f45-c90e5d3c8af1>",
"WARC-Date": "2016-02-13T07:26:27Z",
"WARC-IP-Address": "208.80.154.224",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:JGMLGW3E52Q6RQG7DBVWIUJV6HEZDKYB",
"WARC-Record-ID": "<urn:uuid:d7054065-0da8-49bd-b25f-1809f2790044>",
"WARC-Target-URI": "https://en.wikipedia.org/wiki/ATS_(programming_language)",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:41679291-371b-47ce-a7e9-631c88286bad>"
},
"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,
27,
28,
66,
94,
98,
146,
194,
233,
247,
280,
294,
318,
319,
1205,
1206,
1220,
1221,
1381,
1382,
1404,
1405,
1942,
1943,
2622,
2623,
2968,
2969,
3108,
3109,
3135,
3136,
3468,
3469,
3496,
3497,
3516,
3517,
3567,
3568,
3659,
3660,
3699,
3739,
3742,
3757,
3776,
3845,
3847,
3911,
3912,
3925,
3926,
3953,
4014,
4036,
4118,
4119,
4157,
4158,
4172,
4173,
4275,
4276,
4460,
4461,
4497,
4535,
4578,
4591,
4655,
4656,
4669,
4670,
4701,
4734,
4764,
4820,
4850,
4887,
4888,
4897,
4915,
4935,
4960,
4984,
5003,
5047,
5048,
5125,
5126,
5162,
5249,
5253,
5271,
5273,
5286,
5323,
5325,
5334,
5345,
5404,
5427,
5450,
5452,
5479,
5489,
5510,
5512,
5515,
5524,
5539,
5590,
5593,
5621,
5653,
5674,
5700,
5732,
5735,
5788,
5791,
5814,
5815,
6027,
6028,
6055,
6065,
6066,
6105,
6106,
6121,
6122,
6140,
6141,
6164,
6229,
6240,
6253,
6270,
6271,
6296,
6297,
6355,
6421,
6505,
6562,
6620,
6686,
6730,
6796,
6854,
6911,
6969,
7020,
7028,
7029,
7132,
7133,
7183,
7184,
7197,
7198,
7229,
7262,
7302,
7303,
7337,
7364,
7365,
7453,
7454,
7524,
7559,
7602,
7603,
7620,
7621,
7626,
7633,
7701,
7761,
7776,
7915,
7941,
8009,
8015,
8094,
8103,
8161,
8171,
8244,
8249,
8334,
8393,
8462,
8463,
8542,
8687,
8747,
8751,
8779,
8780,
8816,
8817,
8858,
8859,
8947,
8996,
9048,
9049,
9063,
9064,
9149,
9150,
9216,
9217,
9271,
9272,
9287,
9288,
9381,
9382,
9428,
9465,
9488,
9517,
9560,
9561,
9591,
9592,
9606,
9607,
9654,
9655,
9661,
9662,
9736,
9737,
9756,
9757,
9994,
9995,
10011,
10012,
10028,
10029,
10109,
10110,
10137,
10138,
10156,
10246,
10247,
10280,
10281,
10298,
10299,
10353,
10425,
10538,
10565,
10605,
10648,
10685,
10760,
10786,
10813,
10844,
10903,
10947,
10948
],
"line_end_idx": [
27,
28,
66,
94,
98,
146,
194,
233,
247,
280,
294,
318,
319,
1205,
1206,
1220,
1221,
1381,
1382,
1404,
1405,
1942,
1943,
2622,
2623,
2968,
2969,
3108,
3109,
3135,
3136,
3468,
3469,
3496,
3497,
3516,
3517,
3567,
3568,
3659,
3660,
3699,
3739,
3742,
3757,
3776,
3845,
3847,
3911,
3912,
3925,
3926,
3953,
4014,
4036,
4118,
4119,
4157,
4158,
4172,
4173,
4275,
4276,
4460,
4461,
4497,
4535,
4578,
4591,
4655,
4656,
4669,
4670,
4701,
4734,
4764,
4820,
4850,
4887,
4888,
4897,
4915,
4935,
4960,
4984,
5003,
5047,
5048,
5125,
5126,
5162,
5249,
5253,
5271,
5273,
5286,
5323,
5325,
5334,
5345,
5404,
5427,
5450,
5452,
5479,
5489,
5510,
5512,
5515,
5524,
5539,
5590,
5593,
5621,
5653,
5674,
5700,
5732,
5735,
5788,
5791,
5814,
5815,
6027,
6028,
6055,
6065,
6066,
6105,
6106,
6121,
6122,
6140,
6141,
6164,
6229,
6240,
6253,
6270,
6271,
6296,
6297,
6355,
6421,
6505,
6562,
6620,
6686,
6730,
6796,
6854,
6911,
6969,
7020,
7028,
7029,
7132,
7133,
7183,
7184,
7197,
7198,
7229,
7262,
7302,
7303,
7337,
7364,
7365,
7453,
7454,
7524,
7559,
7602,
7603,
7620,
7621,
7626,
7633,
7701,
7761,
7776,
7915,
7941,
8009,
8015,
8094,
8103,
8161,
8171,
8244,
8249,
8334,
8393,
8462,
8463,
8542,
8687,
8747,
8751,
8779,
8780,
8816,
8817,
8858,
8859,
8947,
8996,
9048,
9049,
9063,
9064,
9149,
9150,
9216,
9217,
9271,
9272,
9287,
9288,
9381,
9382,
9428,
9465,
9488,
9517,
9560,
9561,
9591,
9592,
9606,
9607,
9654,
9655,
9661,
9662,
9736,
9737,
9756,
9757,
9994,
9995,
10011,
10012,
10028,
10029,
10109,
10110,
10137,
10138,
10156,
10246,
10247,
10280,
10281,
10298,
10299,
10353,
10425,
10538,
10565,
10605,
10648,
10685,
10760,
10786,
10813,
10844,
10903,
10947,
10948,
10968
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 10968,
"ccnet_original_nlines": 271,
"rps_doc_curly_bracket": 0.004376369994133711,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.25140711665153503,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.030393999069929123,
"rps_doc_frac_lines_end_with_ellipsis": 0.014705879613757133,
"rps_doc_frac_no_alph_words": 0.38874295353889465,
"rps_doc_frac_unique_words": 0.38748419284820557,
"rps_doc_mean_word_length": 4.788242816925049,
"rps_doc_num_sentences": 108,
"rps_doc_symbol_to_word_ratio": 0.007879920303821564,
"rps_doc_unigram_entropy": 5.756483554840088,
"rps_doc_word_count": 1582,
"rps_doc_frac_chars_dupe_10grams": 0.0266666691750288,
"rps_doc_frac_chars_dupe_5grams": 0.051485151052474976,
"rps_doc_frac_chars_dupe_6grams": 0.051485151052474976,
"rps_doc_frac_chars_dupe_7grams": 0.051485151052474976,
"rps_doc_frac_chars_dupe_8grams": 0.0266666691750288,
"rps_doc_frac_chars_dupe_9grams": 0.0266666691750288,
"rps_doc_frac_chars_top_2gram": 0.012937289662659168,
"rps_doc_frac_chars_top_3gram": 0.004752479959279299,
"rps_doc_frac_chars_top_4gram": 0.0042244200594723225,
"rps_doc_books_importance": -1390.11376953125,
"rps_doc_books_importance_length_correction": -1390.11376953125,
"rps_doc_openwebtext_importance": -725.9293823242188,
"rps_doc_openwebtext_importance_length_correction": -725.9293823242188,
"rps_doc_wikipedia_importance": -323.7737121582031,
"rps_doc_wikipedia_importance_length_correction": -323.7737121582031
},
"fasttext": {
"dclm": 0.17982035875320435,
"english": 0.7558597922325134,
"fineweb_edu_approx": 2.769692897796631,
"eai_general_math": 0.9531285762786865,
"eai_open_web_math": 0.4107500910758972,
"eai_web_code": 0.8657259345054626
}
}
|
{
"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.136",
"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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "10",
"label": "Knowledge Article"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,898,337,898,629,951,000
|
HFI Connect
User Experience News, Blogs, and Videos
Clean Metrics from Quick and Dirty Assessment: "The SUS"
HFI Trainer John Sorflaten, PhD, CPE, CUA, discusses an easy method for "grading" your interface design.
In the youthful field of usability, we may be surprised to hear about "venerable" measures of usability. However, that's just what we have with the DEC "System Usability Scale" (SUS) copyrighted in 1986 and publicly discussed in 1996 by John Brooke.
Say you are tackling a vexing task for redesign. Would you like to get a baseline questionnaire measure of subjective "ease of use" on the original design? And then would you like to compare your redesign with
a follow-up measure (to see if the design works better)?
Do you want a questionnaire to be fast, fast, and fast (otherwise known as "Quick and Dirty")? Of course.
Time is money
And that's what motivated John Brooke and colleagues to invent a ten-question assessment that takes about 90 seconds to fill out. In fact, it's so easy your test participants could fill it out several times during a longer usability test session.
"Quick and (not so) dirty" means you can get data that measures user-friendliness by task! Plus you can compare your design progress over time!
But wait, how do we compare our design with the larger "community" of designs out there? We know that our end-users interact with many user interface designs. How does ours compare?
Wouldn't it be nice to see whether our design is just "OK" versus "good," "excellent," or "best imaginable"?
Put another way, wouldn't it be nice to know...
1. Whether our user groups give our design a "C", "B," or an "A"? Get a grade!
2. How well our web design encourages visitors to come back to our site? That
is, how well does the design support a web site "loyalty program"? Get repeat visitors.
Let's cover two studies that answer both of these hard and practical questions.
Making the grade with your SUS metric
I've read a lot of research. Because of their visionary efforts across ten years, my hat goes off to the team of three researchers who systematically collected almost 3,500 results of SUS surveys over those ten years. The team consists of two gentlemen from AT&T Labs, Aaron Bangor and James Miller, and a professor at Rice University, Philip Kortun.
They used the SUS survey shown here across six different interface design contexts: Web (41% of the 3,500 responses), Cell phone (17%), IVR (Interactive Voice Response) (17%), GUI (Graphical User Interface) (7%), Hardware (7%), and Television (5%) interface products. (This graphic comes from their published study.)
Figure 1
See Brooke, J. (1996) for scoring methodology and the original text. (Our Bangor et al researchers found that the word "awkward" in statement 8 worked better than the original word "cumbersome". They also use the word "product" instead of "system".)
Mirror, mirror on the wall, who's the fairest of us all?
Our authors asked an important question, which affects us all.
What does a specific SUS score mean in describing the usability of a product?
Do you need a score of 50 (out of 100) to say that a product is usable, or do you need a score of 75 or 100?
The first part of their answer was to look at the distribution of scores across the 3,463 questionnaire results contained within their 273 studies.
1. Half the 3, 463 scores were above 70 and half were below. That is, the median was a score of 70.
2. The top 25% of the scores averaged for each study measured 77.8 and above.
So now we have a sense of the middle score (70) and the average score for the top 25% of studies (scores ~78 and above).
Does the idea of your design falling in the top 25% of studies give you a feeling for "good"?
Well, we hope that the top 25% must have some value. But we need more evidence.
We could look at other studies. For example, Tullis and Albert (2008) show that an SUS score of 81.2 puts you in the top 10% of their particular sampl.... So, we have a second snapshot of quality – the top 10% of another group of SUS surveys.
Pop the question to seal the deal
But even better, our three authors analyzed a final, single question added to 959 of their recent SUS questionnaires. Participants picked one of these adjectives after answering the SUS questions.
Figure 2
Here's how the SUS scores matched the adjectives (all graphics come from the study publication):
Figure 3
So now you have some adjectives to include in your report. You can give the score, and this chart shows you which adjective matches the score.
Do it yourself, too; and make the grade
Better yet, include the adjectives with your own SUS questionnaire. Let your participants give you an overall evaluation directly. See how closely your average SUS results match the chart given above.
Which leads us to how you can give a "grade" to your design.
Our three authors make a speculation. It goes like this.
The traditional school grading scale uses numeric scores that represent the percentage a student has earned out of the total possible score. Remember?
A score of 70% to 79% on a test got you a "C". A score of 80 % to 89% got you a "B" and a score of 90% or more got you an "A". (You never got a "D" or an "F", right?)
See what our authors propose in the context of matching their adjective results with a proposed "grading vocabulary". Does it make sense to you? It sure makes sense to me.
Figure 4
Extending your SUS scores to "loyalty"
Recall our second goal for usability metrics: to determine "how well our web design encourages visitors to come back to our site". This refers to site "loyalty".
For this we turn to another active web researcher, Jeff Sauro, magi of www.measuringusability.com. Sauro (2009) recently published in his newsletter the results of his study somewhat similar to the adjective study above.
Sauro examined SUS data from 146 participants tested in a dozen venues such as rental car companies, financial applications, and websites like Amazon.com.
In addition to the usual SUS queries, test participants got one extra question: "How likely are you to recommend
this product to a friend or colleague?"
This extra question, turns out, has quite a pedigree. It gives a "Net Promoter Score" (NPS). Some authors report this one question offers good prediction of long term growth for a company.
Upon correlating scores from the NPS with overall results of the SUS, Sauro found that the SUS explains about 36% of the variability in the Net Promoter Scores.
He points out that people identified as a "Promoter" have an average SUS score of 82 (plus or minus about five points). So, if you want your web site to serve as a beacon for loyal customers ("promoters"), strive for an SUS score above 80.
Recall that earlier in this article, an SUS score of 80 gets a "B" reflecting roughly the midpoint between the adjective phrases "Good" and "Excellent" (see Figure 3 above).
So making the grade of "B" also gets you some customer loyalty. Not bad.
SUS-tainability: the gist of it all
Here are a few points to help you attain SUS at-one-ment.
1. The SUS questionnaire offers you a standard measurement tool for assessing your designs.
2. You can compare your results against results from other usability tests
using adjectives like OK, Good, Excellent, and Best Imaginable.
3. You can assign a letter grade to your test results and share that with your colleagues.
4. You can even say your web site promotes loyalty (return visits) for participants who score above 80. (My November, 2009 HFI Newsletter about "cognitive lock-in" gives further evidence on usability as the missing link to customer loyalty.)
5. The SUS questionnaire has no fees. You may use it freely.
6. It's short, sweet, quick, and (not so) dirty! (See Tullis and Stetson, 2004, if you have absolutely any doubts about this.)
Check out the references below for details. I've used the SUS many times. It helps you communicate to any client the overall subjective response of usability test participants.
If user experience is important to you, then the SUS gives voice to the experience of your users.
References
Bangor, Aaron, Kortun, Philip, and Miller, James, 2009. Determining What Individual SUS Scores Mean: Adding an Adjective Ra... Journal of Usability Studies, 4 (3) May 2009, 114-123.
Brooke, John, 1996. SUS: A "quick and dirty" usability scale. In P. W. Jordan, B. Thomas, B. A. Weerdmeester, & I. L. McClelland (Eds.), Usability evaluation in industry (pp. 189–194).
London: Taylor & Francis.
Sauro, Jeff, 2009. Does better usability increase customer loyalty? The Net Promoter S... 7 Jan 2010.
Sorflaten, John, 2009. Wherefore Art Thou O Usability? – Cognitive lock-in to the rescue. HFI Newsletter, Nov, 2009.
Tullis, T. S. & Stetson, J. N. (2004, June 7-11). A Comparison of Questionnaires for Assessing Website Usability, Usability Professionals Association (UPA) 2004 Conference, Minneapolis, USA.
Tullis, T. S. & Albert, B. (2008, May 28). Tips and Tricks for Measuring the User Experience. Usability and User Experience 2008 UPA-Boston's Seventh Annual Mini UPA Conference, Boston, USA.
Views: 1023
Comment
You need to be a member of HFI Connect to add comments!
Join HFI Connect
Photos
• Add Photos
• View All
Discussion Groups
© 2016 Human Factors International Powered by
Badges | Report an Issue | Terms of Service
|
{
"url": "http://connect.humanfactors.com/profiles/blogs/clean-metrics-from-quick-and?xg_source=activity",
"source_domain": "connect.humanfactors.com",
"snapshot_id": "crawl=CC-MAIN-2016-36",
"warc_metadata": {
"Content-Length": "59254",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:27YMZYJMEGHKTX6XIT55EGPR3NNDUANS",
"WARC-Concurrent-To": "<urn:uuid:0f7292c5-fbe3-43f9-9625-d1362a9fa289>",
"WARC-Date": "2016-08-24T06:43:32Z",
"WARC-IP-Address": "208.82.16.68",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:7ZMY6OLVS3IP3NMVVUPDLI5ZHO747FVA",
"WARC-Record-ID": "<urn:uuid:e2b979ea-14a6-47ec-b15a-d71dc5c1cf3f>",
"WARC-Target-URI": "http://connect.humanfactors.com/profiles/blogs/clean-metrics-from-quick-and?xg_source=activity",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:468e9faf-77ac-4414-94f6-a290e26cf6fc>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-153-172-175.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-36\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 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,
12,
13,
53,
54,
111,
112,
217,
218,
468,
469,
679,
736,
737,
843,
844,
858,
859,
1106,
1107,
1251,
1252,
1434,
1435,
1544,
1545,
1593,
1594,
1675,
1755,
1847,
1927,
1928,
1966,
1967,
2318,
2319,
2320,
2637,
2638,
2639,
2648,
2649,
2899,
2900,
2957,
2958,
2959,
3022,
3023,
3024,
3102,
3103,
3104,
3213,
3214,
3215,
3363,
3364,
3466,
3546,
3547,
3668,
3669,
3670,
3764,
3765,
3766,
3846,
3847,
3848,
4091,
4092,
4126,
4127,
4128,
4325,
4326,
4335,
4336,
4433,
4434,
4443,
4444,
4587,
4588,
4589,
4629,
4630,
4631,
4832,
4833,
4834,
4895,
4896,
4897,
4954,
4955,
4956,
5107,
5108,
5109,
5276,
5277,
5278,
5450,
5451,
5460,
5461,
5500,
5501,
5663,
5664,
5665,
5886,
5887,
5888,
6043,
6044,
6045,
6158,
6198,
6199,
6200,
6389,
6390,
6391,
6552,
6553,
6554,
6794,
6795,
6796,
6970,
6971,
6972,
7045,
7046,
7047,
7083,
7084,
7085,
7143,
7144,
7238,
7315,
7383,
7476,
7720,
7783,
7912,
7913,
8090,
8091,
8092,
8190,
8191,
8202,
8203,
8385,
8386,
8387,
8572,
8598,
8599,
8600,
8702,
8703,
8704,
8821,
8822,
8823,
9014,
9015,
9016,
9207,
9208,
9209,
9210,
9222,
9223,
9231,
9232,
9288,
9289,
9306,
9307,
9314,
9315,
9330,
9343,
9344,
9362,
9363,
9413,
9414
],
"line_end_idx": [
12,
13,
53,
54,
111,
112,
217,
218,
468,
469,
679,
736,
737,
843,
844,
858,
859,
1106,
1107,
1251,
1252,
1434,
1435,
1544,
1545,
1593,
1594,
1675,
1755,
1847,
1927,
1928,
1966,
1967,
2318,
2319,
2320,
2637,
2638,
2639,
2648,
2649,
2899,
2900,
2957,
2958,
2959,
3022,
3023,
3024,
3102,
3103,
3104,
3213,
3214,
3215,
3363,
3364,
3466,
3546,
3547,
3668,
3669,
3670,
3764,
3765,
3766,
3846,
3847,
3848,
4091,
4092,
4126,
4127,
4128,
4325,
4326,
4335,
4336,
4433,
4434,
4443,
4444,
4587,
4588,
4589,
4629,
4630,
4631,
4832,
4833,
4834,
4895,
4896,
4897,
4954,
4955,
4956,
5107,
5108,
5109,
5276,
5277,
5278,
5450,
5451,
5460,
5461,
5500,
5501,
5663,
5664,
5665,
5886,
5887,
5888,
6043,
6044,
6045,
6158,
6198,
6199,
6200,
6389,
6390,
6391,
6552,
6553,
6554,
6794,
6795,
6796,
6970,
6971,
6972,
7045,
7046,
7047,
7083,
7084,
7085,
7143,
7144,
7238,
7315,
7383,
7476,
7720,
7783,
7912,
7913,
8090,
8091,
8092,
8190,
8191,
8202,
8203,
8385,
8386,
8387,
8572,
8598,
8599,
8600,
8702,
8703,
8704,
8821,
8822,
8823,
9014,
9015,
9016,
9207,
9208,
9209,
9210,
9222,
9223,
9231,
9232,
9288,
9289,
9306,
9307,
9314,
9315,
9330,
9343,
9344,
9362,
9363,
9413,
9414,
9461
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9461,
"ccnet_original_nlines": 195,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3328424096107483,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.041237108409404755,
"rps_doc_frac_lines_end_with_ellipsis": 0.005102039780467749,
"rps_doc_frac_no_alph_words": 0.24987727403640747,
"rps_doc_frac_unique_words": 0.3840351998806,
"rps_doc_mean_word_length": 4.5556254386901855,
"rps_doc_num_sentences": 147,
"rps_doc_symbol_to_word_ratio": 0.0019636698998510838,
"rps_doc_unigram_entropy": 5.710862159729004,
"rps_doc_word_count": 1591,
"rps_doc_frac_chars_dupe_10grams": 0.015452539548277855,
"rps_doc_frac_chars_dupe_5grams": 0.03449226915836334,
"rps_doc_frac_chars_dupe_6grams": 0.02014349028468132,
"rps_doc_frac_chars_dupe_7grams": 0.015452539548277855,
"rps_doc_frac_chars_dupe_8grams": 0.015452539548277855,
"rps_doc_frac_chars_dupe_9grams": 0.015452539548277855,
"rps_doc_frac_chars_top_2gram": 0.008278150111436844,
"rps_doc_frac_chars_top_3gram": 0.006622519809752703,
"rps_doc_frac_chars_top_4gram": 0.0041390699334442616,
"rps_doc_books_importance": -877.2261962890625,
"rps_doc_books_importance_length_correction": -877.2261962890625,
"rps_doc_openwebtext_importance": -578.4558715820312,
"rps_doc_openwebtext_importance_length_correction": -578.4558715820312,
"rps_doc_wikipedia_importance": -294.21942138671875,
"rps_doc_wikipedia_importance_length_correction": -294.21942138671875
},
"fasttext": {
"dclm": 0.022306859493255615,
"english": 0.9200748205184937,
"fineweb_edu_approx": 1.7065776586532593,
"eai_general_math": 0.2467767596244812,
"eai_open_web_math": 0.2639654278755188,
"eai_web_code": 0.043918970972299576
}
}
|
{
"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.403",
"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": "-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": "10",
"label": "Knowledge Article"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,819,320,762,689,669,000
|
Hackaday + Lagos
On Saturday, the 23rd of April, we had the first meetup of the Hackaday Meetup Lagos at NerveFlo’s premises in Yaba.
Planning started as a bunch of Facebook messages between Ope Ogunkola and I when Hackaday announced their worldwide event on April 23rd to promote the Hackaday Prize 2016.
Hackaday is a platform for sharing open source hardware work using logs with links to other repositories like Github (code), GrabCAD (CAD), as well as stores to purchase components used for the particular project. I’ve been a member of Hackaday for a while, with no project log (smh), and I find the inspiration useful.
Ope had found 150 Nigerians on the platform and we thought we could get a sizeable number — I knew anything more than 25 was preposterous. We succeeded in getting about 20, with more people joining the Meetup page everyday since. Silas Okwoche at NerveFlo sponsored us in his space and we attracted enthusiasts like Sheriff Shittu of Showroom.ng. Present where guys who studied engineering (mostly) in university but have found themselves in software development.
We discussed a lot about Nigerian problems that can be solved with hardware (and software working in tandem) and open source projects that can be built around these. We settled on two: HRNSS and Uninterrupted Internet.
HRNSS is a solution to power; converting otherwise waste mechanical energy into electrical charge — much like bicycle dynamos from back in the day — but in a way that the battery can be transferred from the point of energy capture (say a moving vehicle) to a point of use (say a house).
Uninterrupted Internet is a palliative solution to bad internet in remote locations, especially for people who have to travel. The device should map the best internet provider in different locations and switch the network subscription to the best at any point in time. Much like BRCK, but with a twist.
We plan to document (and open source) the development (hardware and software) of each project on Hackaday, and hopefully qualify for later rounds of the prize and go on to win it. But more importantly contribute to hardware development in some small way. If you’d like to be a part of any or both projects please feel free to contact me: chuma@involute.co
And we’ll be holding another meetup sometime in July!
One clap, two clap, three clap, forty?
By clapping more or less, you can signal to us which stories really stand out.
|
{
"url": "https://medium.com/hardware-lagos/hackaday-lagos-a34b75173938?source=collection_home---4------6----------------",
"source_domain": "medium.com",
"snapshot_id": "crawl=CC-MAIN-2017-51",
"warc_metadata": {
"Content-Length": "116362",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GD6VAQF7KBK6XABR2NAB3MLQMF2LD66B",
"WARC-Concurrent-To": "<urn:uuid:52b25da3-de84-49fa-a190-e1239c4b52bb>",
"WARC-Date": "2017-12-16T08:39:41Z",
"WARC-IP-Address": "104.16.121.127",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HBK44RVJM3ZDVD7BPX7YY6I4WICX36MF",
"WARC-Record-ID": "<urn:uuid:9a2933ba-6b72-44ce-a8ac-16029d20b316>",
"WARC-Target-URI": "https://medium.com/hardware-lagos/hackaday-lagos-a34b75173938?source=collection_home---4------6----------------",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b4f6ab23-50a3-4376-9c94-c71a70a70937>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-142-32-26.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-51\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for December 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,
1,
18,
19,
136,
137,
309,
310,
630,
631,
1095,
1096,
1315,
1316,
1603,
1604,
1907,
1908,
2264,
2265,
2319,
2320,
2359,
2360
],
"line_end_idx": [
1,
18,
19,
136,
137,
309,
310,
630,
631,
1095,
1096,
1315,
1316,
1603,
1604,
1907,
1908,
2264,
2265,
2319,
2320,
2359,
2360,
2438
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2438,
"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.44025155901908875,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01677148975431919,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13626833260059357,
"rps_doc_frac_unique_words": 0.5631067752838135,
"rps_doc_mean_word_length": 4.747572898864746,
"rps_doc_num_sentences": 21,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.0537519454956055,
"rps_doc_word_count": 412,
"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.004601229913532734,
"rps_doc_frac_chars_top_3gram": 0.009202449582517147,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -200.0391845703125,
"rps_doc_books_importance_length_correction": -200.0391845703125,
"rps_doc_openwebtext_importance": -124.83037567138672,
"rps_doc_openwebtext_importance_length_correction": -124.83037567138672,
"rps_doc_wikipedia_importance": -86.98035430908203,
"rps_doc_wikipedia_importance_length_correction": -86.98035430908203
},
"fasttext": {
"dclm": 0.01890086941421032,
"english": 0.9533019065856934,
"fineweb_edu_approx": 1.1605302095413208,
"eai_general_math": 0.21528363227844238,
"eai_open_web_math": 0.18475842475891113,
"eai_web_code": 0.10190408676862717
}
}
|
{
"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": "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": "9",
"label": "Personal/Misc"
},
"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": "16",
"label": "Personal Blog"
},
"secondary": {
"code": "13",
"label": "News (Org.)"
}
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,199,887,846,016,948,000
|
Project
General
Profile
Bug #2427
SHA3/Password Hash
Added by robin.carey1 over 5 years ago. Updated over 5 years ago.
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:
0%
Description
Dear DragonFlyBSD bugs,
I just learned this morning that NIST has completed their competition for
the new SHA3
cryptographic hash algorithm:
http://www.nist.gov/itl/csd/sha-100212.cfm
----
I would recommend that DragonFlyBSD consider deprecating SHA2 for password
hashes, and adopting the new SHA3 algorithm/standard (since SHA1 has been
broken and SHA2 is very similar to SHA1; but note that I bbelieve SHA2 is
still
considered safe/secure).
Another reason why:
http://slashdot.org/index2.pl?fhfilter=openwall
OR
Go to www.slashdot.org and search for "openwall" or "John the Ripper" to
see article on:
"John the Ripper Cracks Slow Hashes On
GPU<http://linux.slashdot.org/story/12/07/04/1922244/john-the-ripper-cracks-slow-hashes-on-gpu>
"
Basically, even SHA512 was considered problematic in the above article
on cracking password hashes (presumably by brute force).
--
Sincerely,
Robin Carey BSc
History
#1 Updated by sjg over 5 years ago
• Status changed from New to Closed
SHA3 is actually a faster hash function than the SHA2 algorithms, making it less secure in the face of brute force attacks. We won't be changing our hash function until there is a compelling reason to do so, which I do not believe you have provided. Please follow-up if you can provide more compelling evidence that our existing hash (and Linux's, since we use their code) is broken or weak. Until such time, I am closing this.
Also available in: Atom PDF
|
{
"url": "http://bugs.dragonflybsd.org/issues/2427",
"source_domain": "bugs.dragonflybsd.org",
"snapshot_id": "crawl=CC-MAIN-2018-05",
"warc_metadata": {
"Content-Length": "11087",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:63W72QIJ7EN6RA2NTNSJOTGAITVSQCED",
"WARC-Concurrent-To": "<urn:uuid:42500092-5cfa-46a7-a29c-6262a3183c12>",
"WARC-Date": "2018-01-16T23:39:47Z",
"WARC-IP-Address": "199.233.90.68",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ZUOHTDNSAX6ITQZO2TUKJOULABUKQEN5",
"WARC-Record-ID": "<urn:uuid:5cd48388-55d2-4fc6-999a-44f38dabb29f>",
"WARC-Target-URI": "http://bugs.dragonflybsd.org/issues/2427",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bb641916-90dd-4de8-8e7d-a8cfb33806d4>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-233-143-46.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,
8,
9,
17,
18,
26,
27,
37,
38,
57,
58,
124,
125,
133,
140,
150,
157,
167,
169,
179,
181,
197,
199,
211,
221,
229,
230,
233,
234,
235,
247,
248,
272,
273,
347,
360,
390,
391,
434,
435,
440,
441,
516,
590,
664,
670,
695,
696,
716,
717,
765,
766,
769,
770,
843,
859,
860,
899,
995,
997,
998,
1069,
1126,
1127,
1130,
1141,
1142,
1158,
1159,
1167,
1168,
1203,
1204,
1242,
1243,
1671,
1672
],
"line_end_idx": [
8,
9,
17,
18,
26,
27,
37,
38,
57,
58,
124,
125,
133,
140,
150,
157,
167,
169,
179,
181,
197,
199,
211,
221,
229,
230,
233,
234,
235,
247,
248,
272,
273,
347,
360,
390,
391,
434,
435,
440,
441,
516,
590,
664,
670,
695,
696,
716,
717,
765,
766,
769,
770,
843,
859,
860,
899,
995,
997,
998,
1069,
1126,
1127,
1130,
1141,
1142,
1158,
1159,
1167,
1168,
1203,
1204,
1242,
1243,
1671,
1672,
1699
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1699,
"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.2661290168762207,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05376344174146652,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2715053856372833,
"rps_doc_frac_unique_words": 0.6625514626502991,
"rps_doc_mean_word_length": 5.432098865509033,
"rps_doc_num_sentences": 20,
"rps_doc_symbol_to_word_ratio": 0.005376339890062809,
"rps_doc_unigram_entropy": 4.919293403625488,
"rps_doc_word_count": 243,
"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.011363640427589417,
"rps_doc_frac_chars_top_3gram": 0.022727269679307938,
"rps_doc_frac_chars_top_4gram": 0.02954545058310032,
"rps_doc_books_importance": -178.87893676757812,
"rps_doc_books_importance_length_correction": -166.7742462158203,
"rps_doc_openwebtext_importance": -108.2662582397461,
"rps_doc_openwebtext_importance_length_correction": -108.2662582397461,
"rps_doc_wikipedia_importance": -68.7845687866211,
"rps_doc_wikipedia_importance_length_correction": -59.491249084472656
},
"fasttext": {
"dclm": 0.04914414882659912,
"english": 0.8922878503799438,
"fineweb_edu_approx": 1.4321833848953247,
"eai_general_math": 0.02645432949066162,
"eai_open_web_math": 0.19083517789840698,
"eai_web_code": 0.00047219000407494605
}
}
|
{
"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": "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": "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": "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": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,935,294,850,288,939,000
|
Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for
Search instead for
Did you mean:
MioYasutake
Active Contributor
23,465
*Update*
For those who looking for a way to deploy a UI5 app inside a CAP MTA project and make it available from SAP Build Work Zone, I recommend reading my latest blog post. It introduces a streamlined approach leveraging the enhanced tools provided by BAS, allowing you to automatically generate the configurations explained in this blog, eliminating the need for manual configuration settings.
Introduction
In my previous blog, I wrote about how to create a CAP based Fiori elements app and deploy it to Cloud Foundry. There has been several changes since then:
• Fiori elements supports OData V4 (List Report and Object Page)
• Fiori tools has data source option "Local CAP Node.js Project"
• SAP Cloud Platform Launchpad service (central Launchpad) has been released
In my view, the third one is the most significant change because you no longer need Approuter, Deployer and Launchpad modules in your MTA project.
To know more about the Launchpad service and how to develop applications for central Launchpad, I recommend reading the following blog posts.
In this blog, I'm going to demonstrate how to develop a CAP based Fiori app and deploy it to a central Launchpad.
The source code is available at GitHub.
Prerequisites
• Launchpad service subscription -> tutorial
• SAP Business Application studio (space type: SAP Cloud Business Application)
Steps
1. Create a CAP project
2. Add Fiori elements app
3. Generate mta.yaml
4. Add XSUAA configuration
5. Build & Deploy
6. Configure the Launchpad
1. Create a CAP project
1.1. Generate a new CAP project.
cds init cap-launchpad
1.2. Add sample schema and service by the following command. This generates simple db and service definitions and also mock data. It is enough for demonstration purpose.
cds add samples
1.3. Execute below commands and run the service locally.
npm install
cds watch
1.4. Add UI annotations to srv/cat-service.cds.
annotate CatalogService.Books with @(
UI : {
SelectionFields : [
title
],
LineItem : [
{ Value : ID },
{ Value : title },
{ Value : stock }
],
}
){
ID @( title: 'ID' );
title @( title: 'Title' );
stock @( title: 'Stock' );
};
Fiori preview will look like this.
2. Add Fiori elements app
2.1. Generate Fiori elements app using Fiori tools
2.1.1. Open Yoman UI generator and select "SAP Fiori elements application".
2.1.2. Select "List Report Object Page".
2.1.3. Chose "Use a Local CAP Node.js Project" as Data source and select your CAP project folder and OData service.
2.1.4. Select “Books” as Main Entity.
2.1.5. Type below information.
Module Name fiori
Title Books
Namespace demo
Description Books
Configure advanced options No
Press finish and the Fiori app will be added to app folder.
You might notice that the generated project structure is different from normal UI5 applications, for example, it doesn't have ui5.yaml, package.json, etc. We will add these files in later steps.
Refresh the browser and see that the link to the Fiori app has been added.
2.2. Make adjustments for deploying to Cloud Foundry
Next, let's make some adjustments so that the app can be deployed to Cloud Foundry as a central Launchpad content.
2.2.1. Add fiori/package.json.
*I copied package.json and ui5.yaml files from a project generated by yo fiori-project generator.
{
"name": "fiori",
"version": "0.0.1",
"devDependencies": {
"@sapui5/ts-types": "1.71.x",
"@ui5/cli": "2.2.6",
"@sap/ui5-builder-webide-extension": "1.0.x",
"bestzip": "2.1.4",
"rimraf": "3.0.2"
},
"scripts": {
"build": "npm run clean && ui5 build --include-task=generateManifestBundle generateCachebusterInfo && npm run zip",
"zip": "cd dist && npx bestzip ../fiori-content.zip *",
"clean": "npx rimraf fiori-content.zip dist"
},
"ui5": {
"dependencies": [
"@sap/ui5-builder-webide-extension"
]
}
}
2.2.2. Add fiori/ui5.yaml.
specVersion: '1.0'
metadata:
name: fiori
type: application
resources:
configuration:
propertiesFileSourceEncoding: UTF-8
builder:
resources:
excludes:
- "/test/**"
- "/localService/**"
customTasks:
- name: webide-extension-task-updateManifestJson
afterTask: generateVersionInfo
configuration:
appFolder: webapp
destDir: dist
- name: webide-extension-task-resources
afterTask: webide-extension-task-updateManifestJson
configuration:
nameSpace: ns
- name: webide-extension-task-copyFile
afterTask: webide-extension-task-resources
configuration:
srcFile: "/xs-app.json"
destFile: "/xs-app.json"
2.2.3. Add fiori/xs-app.json.
*We will define the destination "cap-launchpad" later.
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"logout": {
"logoutEndpoint": "/do/logout"
},
"routes": [
{
"authenticationType": "none",
"csrfProtection": false,
"source": "^/catalog/",
"destination": "cap-launchpad"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
2.2.4. Modify fiori/webapp/manifest.json.
We will make the following changes here.
• Change the OData path from absolute to relative
"dataSources": {
"mainService": {
// before "uri": "catalog/",
"uri": "catalog/",
• Add inbound navigation
"sap.app": {
...
"crossNavigation": {
"inbounds": {
"fe-inbound": {
"signature": {
"parameters": {},
"additionalParameters": "allowed"
},
"semanticObject": "Sample",
"action": "display",
"title": "CAP Sample App",
"subTitle": "",
"icon": ""
}
}
}
},
• Add sap.cloud.service configuration
This service name needs to be unique within your account and will appear in the runtime URL of the application. For example, /<sap.cloud.service>.<app.id>/<pathToFile>
"sap.app": {
...
},
"sap.cloud": {
"public": true,
"service": "my_service"
},
3. Generate mta.yaml
3.1. Generate mta.yaml.
Go back to your project root and execute the following command.
cds add mta
Next, we will add modules and resources to mta.yaml.
3.2. Add destination-content module.
Here you define destinations and service keys for the destinations. After the MTA app has been deployed, you will see two destinations "...html_repo_host" and "..._uaa_fioir" in your subaccount.
Note that the service name "my_service" which we defined in manifest.json appears at cap.cloud.service section.
modules:
- name: fiori-destination-content
type: com.sap.application.content
requires:
- name: uaa_fiori
parameters:
service-key:
name: uaa_fiori-key
- name: fiori_html_repo_host
parameters:
service-key:
name: fiori_html_repo_host-key
- name: fiori-destination-service
parameters:
content-target: true
parameters:
content:
subaccount:
destinations:
- Name: my_service_fiori_html_repo_host
ServiceInstanceName: fiori-html5-app-host-service
ServiceKeyName: fiori_html_repo_host-key
sap.cloud.service: my_service
- Authentication: OAuth2UserTokenExchange
Name: my_service_uaa_fiori
ServiceInstanceName: fiori-xsuaa-service
ServiceKeyName: uaa_fiori-key
sap.cloud.service: my_service
existing_destinations_policy: update
build-parameters:
no-source: true
3.3. Add ui_deployer.
It uploads zipped web application content into the HTML5 Application Repository.
- name: fiori_ui_deployer
type: com.sap.application.content
path: .
requires:
- name: fiori_html_repo_host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- artifacts:
- fiori-content.zip
name: fiori
target-path: resources/
Next to it we specify where "fiori" module is located and its build parameters.
- name: fiori
type: html5
path: app/fiori
build-parameters:
builder: custom
commands:
- npm run build
supported-platforms: []
3.4. Add resources.
We will add 3 types of services. Destination, html5-apps-repo, and xsuaa.
resources:
...
- name: fiori-destination-service
type: org.cloudfoundry.managed-service
requires:
- name: srv-api
parameters:
service: destination
service-name: fiori-destination-service
service-plan: lite
config:
init_data:
subaccount:
existing_destinations_policy: update
destinations:
- Name: cap-launchpad
Description: CAP sample service
Authentication: NoAuthentication
ProxyType: Internet
Type: HTTP
URL: ~{srv-api/srv-url}
HTML5.DynamicDestination: true
HTML5.ForwardAuthToken: true
- name: fiori_html_repo_host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-name: fiori-html5-app-host-service
service-plan: app-host
- name: uaa_fiori
type: org.cloudfoundry.managed-service
parameters:
path: ./xs-security.json
service: xsuaa
service-name: fiori-xsuaa-service
service-plan: application
Along with the destination service, we will create a new destination "cap-launchpad" (this is the destination name we specified in xs-app.json file).
In the old approach (as described in my previous blog), we would directly consume CAP service url in Approuter module with the following way. In the new approach, we don't have Approuter, so direct consumption of the service URL is not possible. That's why we need a destination pointing to the CAP service url.
//old approach
- name: bookshop-app-router
type: approuter.nodejs
path: approuter
requires:
- name: bookshop_uaa
- name: bookshop_html5_repo_runtime
- name: bookshop_portal
- name: srv-api
group: destinations
properties:
name: srv-api
url: "~{srv-url}"
forwardAuthToken: true
In this document you can find destination configuration in JSON format. I have put the JSON content to mta.yaml file, so that I can consume service url exposed by the CAP service.
4. Add XSUAA configuration
This is the last step before deploy. Add xs-security.json to the project’s root. This file is referenced by the xsuaa service during deployment.
{
"xsappname": "fiori",
"tenant-mode": "dedicated",
"description": "Security profile of called application",
"scopes": [
{
"name": "uaa.user",
"description": "UAA"
}
],
"role-templates": [
{
"name": "Token_Exchange",
"description": "UAA",
"scope-references": [
"uaa.user"
]
}
]
}
5. Build & Deploy
Finally, run below commands to build and deploy the MTA app to Cloud Foundry.
mbt build
cf deploy mta_archives/cap-launchpad_1.0.0.mtar
Note: Make sure you have installed dependencies for the fiori app before executing build.
cd app/fiori
npm install
After successful deployment, you will see 3 destinations created in your subaccount.
6. Configure the Launchpad
6.1. Go to your Launchpad provider manager and refresh the content.
6.2. Go to content explorer and add the newly created app to content.
6.3. Create a group and assign the app to the group.
6.4. Also, assign the app to Everyone role.
Finally, you can open your Fiori app from the Launchpad.
Conclusion
Compared to my previous blog, fewer objects are required for deploying the app to the Launchpad.
Below objects are no longer required.
• OData v2 proxy
• Approuter
• HTML5 Deployer
• Launchpad Module
Thanks to this, build and deploy has become much faster.
What's Next?
You can add authentication to CAP service by following the steps in my next blog.
Deploying a CAP based Fiori app to a central Launchpad – Part2: Add Authentication
78 Comments
Labels in this area
|
{
"url": "https://community.sap.com:443/t5/technology-blogs-by-members/deploying-a-cap-based-fiori-app-to-a-central-launchpad/ba-p/13468391",
"source_domain": "community.sap.com:443",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "598238",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Q7BDD3U6LJRALXXWWCDA2CFSNTPQLOJU",
"WARC-Concurrent-To": "<urn:uuid:90a8bf7c-5127-469d-891f-eb65f3940c2e>",
"WARC-Date": "2024-09-13T07:23:05Z",
"WARC-IP-Address": "18.67.76.33",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:4IQZVLCHCVSZSHAV6NUEPEMLU3L5QDN4",
"WARC-Record-ID": "<urn:uuid:4811e8ea-dede-4bce-840b-a3abc299b3af>",
"WARC-Target-URI": "https://community.sap.com:443/t5/technology-blogs-by-members/deploying-a-cap-based-fiori-app-to-a-central-launchpad/ba-p/13468391",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:422f62ee-39f9-470d-a3ee-3b1f60a9477f>"
},
"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 (info@commoncrawl.org)\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,
28,
186,
193,
214,
234,
249,
261,
280,
287,
288,
297,
298,
299,
687,
688,
701,
702,
703,
858,
859,
926,
927,
994,
995,
1074,
1075,
1076,
1223,
1224,
1366,
1367,
1481,
1482,
1522,
1523,
1537,
1538,
1539,
1540,
1587,
1588,
1669,
1670,
1671,
1677,
1678,
1679,
1680,
1706,
1707,
1735,
1736,
1759,
1760,
1789,
1790,
1810,
1811,
1840,
1841,
1842,
1866,
1867,
1868,
1901,
1924,
1925,
2095,
2111,
2112,
2113,
2170,
2182,
2192,
2193,
2194,
2242,
2280,
2287,
2307,
2313,
2316,
2329,
2345,
2364,
2382,
2385,
2387,
2390,
2411,
2438,
2465,
2468,
2469,
2504,
2505,
2506,
2508,
2509,
2535,
2536,
2537,
2538,
2589,
2590,
2591,
2667,
2668,
2669,
2710,
2711,
2712,
2828,
2829,
2830,
2868,
2869,
2870,
2901,
2902,
2903,
2904,
2905,
2906,
2907,
2908,
2909,
2910,
2911,
2912,
2913,
2914,
2915,
2916,
2917,
2918,
2919,
2920,
2921,
2922,
2923,
2924,
2942,
2954,
2969,
2987,
3017,
3018,
3019,
3079,
3274,
3275,
3276,
3351,
3352,
3353,
3355,
3356,
3409,
3410,
3411,
3526,
3527,
3558,
3559,
3657,
3659,
3676,
3696,
3717,
3747,
3768,
3814,
3834,
3852,
3855,
3868,
3984,
4040,
4085,
4088,
4097,
4115,
4151,
4153,
4155,
4157,
4158,
4160,
4161,
4188,
4207,
4217,
4229,
4247,
4258,
4273,
4309,
4318,
4329,
4339,
4352,
4373,
4386,
4435,
4466,
4481,
4499,
4513,
4553,
4605,
4620,
4634,
4673,
4716,
4731,
4755,
4780,
4781,
4811,
4812,
4867,
4869,
4899,
4932,
4944,
4975,
4978,
4990,
4992,
5022,
5047,
5071,
5102,
5105,
5107,
5127,
5143,
5176,
5206,
5208,
5210,
5212,
5213,
5255,
5256,
5297,
5298,
5350,
5351,
5352,
5377,
5394,
5423,
5442,
5443,
5444,
5471,
5472,
5473,
5490,
5494,
5515,
5529,
5545,
5560,
5578,
5612,
5615,
5643,
5664,
5691,
5707,
5718,
5720,
5722,
5724,
5727,
5728,
5729,
5769,
5770,
5771,
5939,
5956,
5960,
5963,
5978,
5994,
6018,
6021,
6022,
6024,
6025,
6046,
6047,
6048,
6072,
6073,
6137,
6149,
6150,
6203,
6204,
6241,
6242,
6437,
6438,
6550,
6559,
6593,
6627,
6637,
6655,
6667,
6680,
6700,
6729,
6741,
6754,
6785,
6819,
6831,
6852,
6864,
6873,
6885,
6899,
6939,
6989,
7030,
7060,
7102,
7129,
7170,
7200,
7230,
7267,
7285,
7301,
7302,
7304,
7305,
7327,
7328,
7409,
7436,
7470,
7478,
7488,
7517,
7529,
7550,
7568,
7592,
7602,
7615,
7635,
7647,
7671,
7672,
7752,
7767,
7779,
7795,
7813,
7829,
7839,
7855,
7879,
7880,
7882,
7883,
7903,
7904,
7978,
7989,
7993,
8027,
8066,
8076,
8092,
8104,
8125,
8165,
8184,
8192,
8203,
8215,
8252,
8266,
8288,
8320,
8353,
8373,
8384,
8408,
8439,
8468,
8469,
8498,
8537,
8549,
8574,
8617,
8640,
8658,
8697,
8709,
8734,
8749,
8783,
8809,
8810,
8812,
8813,
8963,
8964,
9276,
9291,
9319,
9342,
9358,
9368,
9389,
9425,
9449,
9465,
9485,
9497,
9511,
9529,
9552,
9553,
9733,
9734,
9736,
9737,
9764,
9765,
9766,
9911,
9913,
9935,
9963,
10020,
10032,
10034,
10054,
10075,
10077,
10080,
10100,
10102,
10128,
10150,
10172,
10183,
10185,
10187,
10189,
10191,
10192,
10194,
10195,
10213,
10214,
10215,
10293,
10303,
10351,
10352,
10442,
10455,
10467,
10468,
10470,
10471,
10556,
10557,
10558,
10560,
10561,
10588,
10589,
10590,
10658,
10659,
10660,
10730,
10731,
10732,
10785,
10786,
10787,
10831,
10832,
10833,
10890,
10891,
10892,
10893,
10895,
10896,
10907,
10908,
10909,
11006,
11007,
11045,
11046,
11065,
11066,
11080,
11081,
11100,
11101,
11122,
11123,
11124,
11181,
11182,
11184,
11185,
11198,
11199,
11200,
11282,
11283,
11366,
11367,
11369,
11381
],
"line_end_idx": [
28,
186,
193,
214,
234,
249,
261,
280,
287,
288,
297,
298,
299,
687,
688,
701,
702,
703,
858,
859,
926,
927,
994,
995,
1074,
1075,
1076,
1223,
1224,
1366,
1367,
1481,
1482,
1522,
1523,
1537,
1538,
1539,
1540,
1587,
1588,
1669,
1670,
1671,
1677,
1678,
1679,
1680,
1706,
1707,
1735,
1736,
1759,
1760,
1789,
1790,
1810,
1811,
1840,
1841,
1842,
1866,
1867,
1868,
1901,
1924,
1925,
2095,
2111,
2112,
2113,
2170,
2182,
2192,
2193,
2194,
2242,
2280,
2287,
2307,
2313,
2316,
2329,
2345,
2364,
2382,
2385,
2387,
2390,
2411,
2438,
2465,
2468,
2469,
2504,
2505,
2506,
2508,
2509,
2535,
2536,
2537,
2538,
2589,
2590,
2591,
2667,
2668,
2669,
2710,
2711,
2712,
2828,
2829,
2830,
2868,
2869,
2870,
2901,
2902,
2903,
2904,
2905,
2906,
2907,
2908,
2909,
2910,
2911,
2912,
2913,
2914,
2915,
2916,
2917,
2918,
2919,
2920,
2921,
2922,
2923,
2924,
2942,
2954,
2969,
2987,
3017,
3018,
3019,
3079,
3274,
3275,
3276,
3351,
3352,
3353,
3355,
3356,
3409,
3410,
3411,
3526,
3527,
3558,
3559,
3657,
3659,
3676,
3696,
3717,
3747,
3768,
3814,
3834,
3852,
3855,
3868,
3984,
4040,
4085,
4088,
4097,
4115,
4151,
4153,
4155,
4157,
4158,
4160,
4161,
4188,
4207,
4217,
4229,
4247,
4258,
4273,
4309,
4318,
4329,
4339,
4352,
4373,
4386,
4435,
4466,
4481,
4499,
4513,
4553,
4605,
4620,
4634,
4673,
4716,
4731,
4755,
4780,
4781,
4811,
4812,
4867,
4869,
4899,
4932,
4944,
4975,
4978,
4990,
4992,
5022,
5047,
5071,
5102,
5105,
5107,
5127,
5143,
5176,
5206,
5208,
5210,
5212,
5213,
5255,
5256,
5297,
5298,
5350,
5351,
5352,
5377,
5394,
5423,
5442,
5443,
5444,
5471,
5472,
5473,
5490,
5494,
5515,
5529,
5545,
5560,
5578,
5612,
5615,
5643,
5664,
5691,
5707,
5718,
5720,
5722,
5724,
5727,
5728,
5729,
5769,
5770,
5771,
5939,
5956,
5960,
5963,
5978,
5994,
6018,
6021,
6022,
6024,
6025,
6046,
6047,
6048,
6072,
6073,
6137,
6149,
6150,
6203,
6204,
6241,
6242,
6437,
6438,
6550,
6559,
6593,
6627,
6637,
6655,
6667,
6680,
6700,
6729,
6741,
6754,
6785,
6819,
6831,
6852,
6864,
6873,
6885,
6899,
6939,
6989,
7030,
7060,
7102,
7129,
7170,
7200,
7230,
7267,
7285,
7301,
7302,
7304,
7305,
7327,
7328,
7409,
7436,
7470,
7478,
7488,
7517,
7529,
7550,
7568,
7592,
7602,
7615,
7635,
7647,
7671,
7672,
7752,
7767,
7779,
7795,
7813,
7829,
7839,
7855,
7879,
7880,
7882,
7883,
7903,
7904,
7978,
7989,
7993,
8027,
8066,
8076,
8092,
8104,
8125,
8165,
8184,
8192,
8203,
8215,
8252,
8266,
8288,
8320,
8353,
8373,
8384,
8408,
8439,
8468,
8469,
8498,
8537,
8549,
8574,
8617,
8640,
8658,
8697,
8709,
8734,
8749,
8783,
8809,
8810,
8812,
8813,
8963,
8964,
9276,
9291,
9319,
9342,
9358,
9368,
9389,
9425,
9449,
9465,
9485,
9497,
9511,
9529,
9552,
9553,
9733,
9734,
9736,
9737,
9764,
9765,
9766,
9911,
9913,
9935,
9963,
10020,
10032,
10034,
10054,
10075,
10077,
10080,
10100,
10102,
10128,
10150,
10172,
10183,
10185,
10187,
10189,
10191,
10192,
10194,
10195,
10213,
10214,
10215,
10293,
10303,
10351,
10352,
10442,
10455,
10467,
10468,
10470,
10471,
10556,
10557,
10558,
10560,
10561,
10588,
10589,
10590,
10658,
10659,
10660,
10730,
10731,
10732,
10785,
10786,
10787,
10831,
10832,
10833,
10890,
10891,
10892,
10893,
10895,
10896,
10907,
10908,
10909,
11006,
11007,
11045,
11046,
11065,
11066,
11080,
11081,
11100,
11101,
11122,
11123,
11124,
11181,
11182,
11184,
11185,
11198,
11199,
11200,
11282,
11283,
11366,
11367,
11369,
11381,
11400
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11400,
"ccnet_original_nlines": 533,
"rps_doc_curly_bracket": 0.004736839793622494,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.16586731374263763,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023181449621915817,
"rps_doc_frac_lines_end_with_ellipsis": 0.005617979913949966,
"rps_doc_frac_no_alph_words": 0.3904876112937927,
"rps_doc_frac_unique_words": 0.39383068680763245,
"rps_doc_mean_word_length": 6.125537872314453,
"rps_doc_num_sentences": 221,
"rps_doc_symbol_to_word_ratio": 0.0019984000828117132,
"rps_doc_unigram_entropy": 5.699669361114502,
"rps_doc_word_count": 1394,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.016278250142931938,
"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.002810630016028881,
"rps_doc_frac_chars_top_3gram": 0.007495020050555468,
"rps_doc_frac_chars_top_4gram": 0.0049186102114617825,
"rps_doc_books_importance": -1042.3740234375,
"rps_doc_books_importance_length_correction": -1042.3740234375,
"rps_doc_openwebtext_importance": -511.9173583984375,
"rps_doc_openwebtext_importance_length_correction": -511.9173583984375,
"rps_doc_wikipedia_importance": -182.3910675048828,
"rps_doc_wikipedia_importance_length_correction": -182.3910675048828
},
"fasttext": {
"dclm": 0.2532668709754944,
"english": 0.7124382853507996,
"fineweb_edu_approx": 1.426767110824585,
"eai_general_math": 0.0051089501939713955,
"eai_open_web_math": 0.044372498989105225,
"eai_web_code": 0.41270458698272705
}
}
|
{
"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": "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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,232,136,128,321,750,300
|
Skip to content
Getting Started with Kuesa Serenity
For a C++ applications that performs 3D rendering leveraging the Kuesa Studio C++ Vulkan renderer (Serenity):
CMakeLists.txt
1
2
3
4
5
6
find_package(Kuesa REQUIRED)
target_link_libraries(${PROJECT_NAME}
PRIVATE
Kuesa::Kuesa
Kuesa::KuesaSerenity)
To include the definitions of the module's classes, use the following directives:
C++:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
int main(int ac, char **av)
{
KDGui::GuiApplication app;
// Setup Window
Kuesa::Serenity::Window w;
auto engine = std::make_unique<::Serenity::AspectEngine>();
w.visible.valueChanged().connect([&app](const bool &visible) {
if (visible == false)
app.quit();
});
w.title = makeBinding(makeTitle(w.width, w.height, engine->fps));
w.width = 1920;
w.height = 1080;
w.visible = true;
// Setup Serenity Engine
auto renderAspect = engine->createAspect<::Serenity::RenderAspect>(std::make_unique<::Serenity::VulkanDevice>());
auto spatialAspect = engine->createAspect<::Serenity::SpatialAspect>();
auto logicAspect = engine->createAspect<::Serenity::LogicAspect>();
auto animationAspect = engine->createAspect<::Serenity::AnimationAspect>();
// Create Render Algo
auto algo = std::make_unique<::Serenity::ForwardAlgorithm>();
renderAspect->setRenderAlgorithm(std::move(algo));
// Setup Kuesa Scene
Kuesa::Serenity::AssetCollections collections;
Kuesa::Serenity::GLTF2Importer importer;
importer.assetCollections = assetCollections;
importer.layerManager = layerManager;
importer.source = String("file:///path/to/file.gltf");
std::unique_ptr<::Serenity::Entity> root = std::make_unique<::Serenity::Entity>();
for (std::unique_ptr<::Serenity::Entity> &sceneRoot : importer.sceneRoots()) {
// Take ownership
root->addChildEntity(std::move(sceneRoot));
}
engine->setRootEntity(std::move(root));
engine->running = true;
return app.exec();
}
Kuesa Serenity Examples
Updated on 2023-07-03 at 11:02:17 +0000
|
{
"url": "https://docs.kdab.com/kuesa/2.1.0/getting-started-serenity.html",
"source_domain": "docs.kdab.com",
"snapshot_id": "CC-MAIN-2023-50",
"warc_metadata": {
"Content-Length": "36282",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4FV7S2WL4WCO3KBP4EZDKXHVTMZMVQ4W",
"WARC-Concurrent-To": "<urn:uuid:de0ad3cd-470a-4000-bae2-b45721b036f4>",
"WARC-Date": "2023-12-10T14:38:23Z",
"WARC-IP-Address": "78.46.90.184",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:3FR5J5BCOB25NXREPBAO7LIVMWU4UQOB",
"WARC-Record-ID": "<urn:uuid:5b16b940-7c79-4de2-81cb-4bc5c8f41a96>",
"WARC-Target-URI": "https://docs.kdab.com/kuesa/2.1.0/getting-started-serenity.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4739aefa-3097-4127-807a-cc1d80c1e8bd>"
},
"warc_info": "isPartOf: CC-MAIN-2023-50\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2023\r\noperator: Common Crawl Admin (info@commoncrawl.org)\r\nhostname: ip-10-67-67-63\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,
16,
17,
53,
54,
164,
165,
180,
181,
183,
185,
187,
189,
191,
193,
222,
223,
261,
289,
322,
364,
365,
447,
448,
453,
454,
457,
460,
463,
466,
469,
472,
475,
478,
481,
484,
487,
490,
493,
496,
499,
502,
505,
508,
511,
514,
517,
520,
523,
526,
529,
532,
535,
538,
541,
544,
547,
550,
553,
556,
559,
562,
565,
568,
571,
574,
577,
580,
608,
610,
641,
642,
662,
693,
757,
824,
854,
878,
886,
956,
976,
997,
1019,
1020,
1049,
1167,
1243,
1315,
1395,
1396,
1422,
1488,
1543,
1544,
1569,
1620,
1665,
1715,
1757,
1816,
1903,
1986,
2012,
2064,
2070,
2071,
2115,
2143,
2166,
2168,
2169,
2193,
2194,
2195
],
"line_end_idx": [
16,
17,
53,
54,
164,
165,
180,
181,
183,
185,
187,
189,
191,
193,
222,
223,
261,
289,
322,
364,
365,
447,
448,
453,
454,
457,
460,
463,
466,
469,
472,
475,
478,
481,
484,
487,
490,
493,
496,
499,
502,
505,
508,
511,
514,
517,
520,
523,
526,
529,
532,
535,
538,
541,
544,
547,
550,
553,
556,
559,
562,
565,
568,
571,
574,
577,
580,
608,
610,
641,
642,
662,
693,
757,
824,
854,
878,
886,
956,
976,
997,
1019,
1020,
1049,
1167,
1243,
1315,
1395,
1396,
1422,
1488,
1543,
1544,
1569,
1620,
1665,
1715,
1757,
1816,
1903,
1986,
2012,
2064,
2070,
2071,
2115,
2143,
2166,
2168,
2169,
2193,
2194,
2195,
2234
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2234,
"ccnet_original_nlines": 113,
"rps_doc_curly_bracket": 0.003581020049750805,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.05773672088980675,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01616627909243107,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5103926062583923,
"rps_doc_frac_unique_words": 0.8241758346557617,
"rps_doc_mean_word_length": 8.181318283081055,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.910677433013916,
"rps_doc_word_count": 182,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.00805910024791956,
"rps_doc_frac_chars_dupe_6grams": 0.00805910024791956,
"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.01746137998998165,
"rps_doc_frac_chars_top_3gram": 0.00402955012395978,
"rps_doc_frac_chars_top_4gram": 0.005372730083763599,
"rps_doc_books_importance": -156.21522521972656,
"rps_doc_books_importance_length_correction": -156.21522521972656,
"rps_doc_openwebtext_importance": -87.76151275634766,
"rps_doc_openwebtext_importance_length_correction": -87.76151275634766,
"rps_doc_wikipedia_importance": -79.06012725830078,
"rps_doc_wikipedia_importance_length_correction": -79.06012725830078
},
"fasttext": {
"dclm": 0.49258488416671753,
"english": 0.3829374313354492,
"fineweb_edu_approx": 2.111462116241455,
"eai_general_math": 0.5423654317855835,
"eai_open_web_math": 0.01997488923370838,
"eai_web_code": 0.15598547458648682
}
}
|
{
"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": "681.3",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Handicraft and Occupations",
"level_3": "Clocks and watches and Scientific apparatus and instruments"
}
}
},
"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": "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": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,550,266,807,628,255,700
|
[Webinar] Streamline your web hosting managementRegister Today
x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 632
• Last Modified:
Compare strings in Access
I would like to create a routine that will parse out spaces and perform a comparison on a varchar 255 field
desc
SO GLASS BEER 8.25 OZ PILSNER
GLASS BEER 8Z PILSNER HVY 12
In this example there are 3 strings that would validate - yes?
Any thoughts on where and how to start? As a note, I should be considered a beginner at Access.
0
franco2
Asked:
franco2
• 6
• 3
• 3
• +1
2 Solutions
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Well, you can use the Replace() function to parse out spaces.
What is the comparison you want to make?
mx
0
jefftwilleyCommented:
Welcome Beginner...
Parsing follows rules. So....in order to know where you want your data split, we need to know the rules. You say out of the data you pasted in, there are 3 valid strings...how are those identified? And...what determines a good string?
That being said....how are you wanting to perform this comparison and what do you plan on doing with the results?
J
0
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
<jw ... the LTM thing ... man, I'm glad I've had that worked out for years>
ok ... to address just the removing spaces part, for example:
Replace("SO GLASS BEER 8.25 OZ PILSNER"," ","") returns SOGLASSBEER8.25OZPILSNER,
Replace can be used in code, a query or an expression in the control source in a Form/Report
The basic syntax is:
Replace(expression, find, replace)
Where, in the example above ...
expression = "SO GLASS BEER 8.25 OZ PILSNER" <ie, the field/string you are working on to parse out>
find = " " <a space>
replace= "" <an empty string>
mx
0
Never miss a deadline with monday.com
The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
jerryb30Commented:
I think we are looking for a split to determine separate words.
0
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
No clue so far :-(
An *interactive* session would be ... nice :-)
Until then ...
mx
0
jerryb30Commented:
maybe, air code
function compareit(string1 as string, string2 as string) as integer
dim var1 as variant
dim var2 as variant
dim i as integer
dim j as integer
var1 = split(string1, " ")
var2 = split(string2, " ")
if ubound(var1) > ubound(var2) then
for i = 0 to ubound(var1) -1
for j = 0 to ubound(var2)-1
if var1(i) = var2(j) then
compareit = compareit +1
next i
next j
else
if ubound(var1) > ubound(var2) then
for i = 0 to ubound(var2) -1
for j = 0 to ubound(var1)-1
if var2(i) = var2(i) then
compareit = compareit +1
next i
next j
endif
end function
create a new module named module1
Paste in code between function.... end function
Then in a query
select desc1, descr2, compareit(desc1, descr2) as equalwords from yourtable
but it depends on if descr1 and descr2 are in the same table....
need a lot more info on table(s), field(s), etc.
0
jerryb30Commented:
<and very clever using beer in your example. sure to get some response.>
0
franco2Author Commented:
Back on line - and yes beer was a bit of a bait for help...sorry, but who doesn't like an ice cold beer.
Great feedback so far...haven't tried anything out. The purpose is to be able to look at string a and sequencially look at string b to see if there are like characters...thus, both would be loosely identified as being the same product.
ie beer in string a would match to beer in string b
Once I have this complete, then I compare on additional attributes(not part of this question)to make sure they are the same size shape and beerie''ness....
Creation of the module - wow. I can try, but unsure.
I am looking at about 60,000 records, this would at least help 'link' some items together....
Thanks in advacnce.
0
jerryb30Commented:
Same table. Two different tables?
Any other linking factors between two tables (if two tables)?
0
jefftwilleyCommented:
How do you introduce the string into the "search"? Will this be for Same-Field-Comparison only?
0
jerryb30Commented:
The module was real bad.
This works.
Function compareit(string1 As String, string2 As String) As Integer
Dim var1 As Variant
Dim var2 As Variant
Dim i As Integer
Dim j As Integer
var1 = Split(string1, " ")
var2 = Split(string2, " ")
If UBound(var1) > UBound(var2) Then
For i = 0 To UBound(var1)
For j = 0 To UBound(var2)
If var1(i) = var2(j) Then
compareit = compareit + 1
End If
Next j
Next i
Else
For i = 0 To UBound(var2)
For j = 0 To UBound(var1)
If var2(i) = var1(j) Then
compareit = compareit + 1
End If
Next j
Next i
End If
End Function
0
jerryb30Commented:
If you have a single table, and you want to compare one field with all other fields in the table,
SELECT a.descr, b.descr, compareit([a].[descr],[b].[descr]) AS WordMatches
FROM yourTable AS a,yourTable AS b
WHERE (((a.descr)<[b].[descr]) AND ((b.descr)<>[a].[descr]))
ORDER BY a.descr;
Still awaiting more info.......
0
jefftwilleyCommented:
I think you scared him off Jerry!
0
franco2Author Commented:
Not scard off but having troubles with my internet connection. Same table but not sure on wordmatches....as in the example, beer may be in different parts of the desciption....I will try out the suggestions later as I am afraid to drop you....I will test this eve and post fidings tomorrow.
Cheers.
0
franco2Author Commented:
Split the point slighty - all have a hand in the solution.
compareit was the key - I can now 'assume' that if the description compared on 3>, it is the same product.
Much apprciated.
0
Featured Post
Receive 1:1 tech help
Solve your biggest tech problems alongside global tech experts with 1:1 help.
• 6
• 3
• 3
• +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now
|
{
"url": "https://www.experts-exchange.com/questions/22495293/Compare-strings-in-Access.html",
"source_domain": "www.experts-exchange.com",
"snapshot_id": "crawl=CC-MAIN-2018-09",
"warc_metadata": {
"Content-Length": "125749",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:JLY3O3DVSWDN2CME2SMZKW32SLZ2Y2G7",
"WARC-Concurrent-To": "<urn:uuid:5a960756-8de4-4afc-a925-576f9f9dbd1d>",
"WARC-Date": "2018-02-21T12:12:10Z",
"WARC-IP-Address": "104.20.169.10",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:7PRUCMU2FHL2LFQRCJ3X2HYLZ6SFOHGN",
"WARC-Record-ID": "<urn:uuid:a0c8749c-9e2d-4bed-879e-d1545eec84a3>",
"WARC-Target-URI": "https://www.experts-exchange.com/questions/22495293/Compare-strings-in-Access.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9bbbc7c8-3aa9-46a3-be0b-ea63b2dadc1c>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-71-211-198.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,
63,
64,
66,
85,
106,
127,
142,
161,
162,
188,
189,
297,
298,
303,
333,
362,
363,
426,
523,
524,
526,
534,
541,
549,
555,
561,
567,
574,
586,
588,
666,
728,
769,
770,
773,
775,
777,
799,
819,
1054,
1055,
1169,
1171,
1173,
1175,
1253,
1329,
1330,
1331,
1393,
1394,
1478,
1479,
1572,
1573,
1594,
1595,
1630,
1662,
1763,
1786,
1818,
1819,
1822,
1823,
1825,
1863,
1864,
1990,
1991,
1993,
2012,
2076,
2078,
2080,
2158,
2177,
2178,
2225,
2226,
2241,
2242,
2245,
2247,
2249,
2268,
2284,
2352,
2372,
2392,
2409,
2426,
2453,
2480,
2516,
2545,
2574,
2604,
2637,
2647,
2659,
2664,
2701,
2730,
2759,
2789,
2822,
2832,
2844,
2850,
2863,
2864,
2898,
2946,
2947,
2963,
3039,
3040,
3105,
3154,
3156,
3158,
3177,
3250,
3252,
3254,
3279,
3384,
3385,
3622,
3623,
3677,
3678,
3834,
3835,
3889,
3890,
3984,
3985,
4005,
4006,
4007,
4009,
4011,
4030,
4064,
4126,
4128,
4130,
4152,
4248,
4250,
4252,
4271,
4296,
4308,
4376,
4396,
4416,
4433,
4450,
4477,
4504,
4540,
4566,
4593,
4623,
4657,
4672,
4682,
4694,
4699,
4701,
4727,
4754,
4784,
4818,
4833,
4843,
4855,
4862,
4875,
4877,
4879,
4898,
4996,
5071,
5106,
5167,
5185,
5186,
5218,
5220,
5222,
5244,
5278,
5280,
5282,
5307,
5599,
5607,
5609,
5611,
5636,
5695,
5802,
5803,
5820,
5822,
5823,
5837,
5838,
5860,
5861,
5939,
5940,
5946,
5952,
5958,
5965,
6037
],
"line_end_idx": [
63,
64,
66,
85,
106,
127,
142,
161,
162,
188,
189,
297,
298,
303,
333,
362,
363,
426,
523,
524,
526,
534,
541,
549,
555,
561,
567,
574,
586,
588,
666,
728,
769,
770,
773,
775,
777,
799,
819,
1054,
1055,
1169,
1171,
1173,
1175,
1253,
1329,
1330,
1331,
1393,
1394,
1478,
1479,
1572,
1573,
1594,
1595,
1630,
1662,
1763,
1786,
1818,
1819,
1822,
1823,
1825,
1863,
1864,
1990,
1991,
1993,
2012,
2076,
2078,
2080,
2158,
2177,
2178,
2225,
2226,
2241,
2242,
2245,
2247,
2249,
2268,
2284,
2352,
2372,
2392,
2409,
2426,
2453,
2480,
2516,
2545,
2574,
2604,
2637,
2647,
2659,
2664,
2701,
2730,
2759,
2789,
2822,
2832,
2844,
2850,
2863,
2864,
2898,
2946,
2947,
2963,
3039,
3040,
3105,
3154,
3156,
3158,
3177,
3250,
3252,
3254,
3279,
3384,
3385,
3622,
3623,
3677,
3678,
3834,
3835,
3889,
3890,
3984,
3985,
4005,
4006,
4007,
4009,
4011,
4030,
4064,
4126,
4128,
4130,
4152,
4248,
4250,
4252,
4271,
4296,
4308,
4376,
4396,
4416,
4433,
4450,
4477,
4504,
4540,
4566,
4593,
4623,
4657,
4672,
4682,
4694,
4699,
4701,
4727,
4754,
4784,
4818,
4833,
4843,
4855,
4862,
4875,
4877,
4879,
4898,
4996,
5071,
5106,
5167,
5185,
5186,
5218,
5220,
5222,
5244,
5278,
5280,
5282,
5307,
5599,
5607,
5609,
5611,
5636,
5695,
5802,
5803,
5820,
5822,
5823,
5837,
5838,
5860,
5861,
5939,
5940,
5946,
5952,
5958,
5965,
6037,
6045
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6045,
"ccnet_original_nlines": 221,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.31841909885406494,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.037285611033439636,
"rps_doc_frac_lines_end_with_ellipsis": 0.03153153136372566,
"rps_doc_frac_no_alph_words": 0.2803877592086792,
"rps_doc_frac_unique_words": 0.40062761306762695,
"rps_doc_mean_word_length": 4.6161088943481445,
"rps_doc_num_sentences": 75,
"rps_doc_symbol_to_word_ratio": 0.017151379957795143,
"rps_doc_unigram_entropy": 5.410878658294678,
"rps_doc_word_count": 956,
"rps_doc_frac_chars_dupe_10grams": 0.13188306987285614,
"rps_doc_frac_chars_dupe_5grams": 0.20258328318595886,
"rps_doc_frac_chars_dupe_6grams": 0.18808066844940186,
"rps_doc_frac_chars_dupe_7grams": 0.17765691876411438,
"rps_doc_frac_chars_dupe_8grams": 0.172218456864357,
"rps_doc_frac_chars_dupe_9grams": 0.1461590826511383,
"rps_doc_frac_chars_top_2gram": 0.00543848006054759,
"rps_doc_frac_chars_top_3gram": 0.002719240030273795,
"rps_doc_frac_chars_top_4gram": 0.006344890221953392,
"rps_doc_books_importance": -552.29296875,
"rps_doc_books_importance_length_correction": -552.29296875,
"rps_doc_openwebtext_importance": -327.2430725097656,
"rps_doc_openwebtext_importance_length_correction": -327.2430725097656,
"rps_doc_wikipedia_importance": -293.452880859375,
"rps_doc_wikipedia_importance_length_correction": -293.452880859375
},
"fasttext": {
"dclm": 0.07393676042556763,
"english": 0.8178175091743469,
"fineweb_edu_approx": 2.006863594055176,
"eai_general_math": 0.04820752143859863,
"eai_open_web_math": 0.3928195834159851,
"eai_web_code": 0.07392221689224243
}
}
|
{
"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.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": "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": "-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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|