id
int64 | text
string | metadata
dict | line_start_n_end_idx
dict | quality_signals
dict | eai_taxonomy
dict | pid
string |
---|---|---|---|---|---|---|
-8,606,697,313,527,917,000 | How to Get Money When You Kill a Player FE
In Roblox 18 views
What do you want to do now on Roblox? Well, as we know that Roblox has a lot of things so that we are able to explore them. Well, you may want to know how to get money when you kill a player. Is it possible? You can do it. Now, in this article, we are going to describe it.
There is a video of juel sandy entitled Roblox | How To Get Money When You Kill A Player FE which was published on December 22nd, 2017. Now, this video has been watched more than 8.2K. You are able to watch this video for tutorial but we also will describe it in this article.
In the video, he said that this is FE compatible but he will not be using it because he is not using any FE guns. So first, you have to click on Workspace and then click on Explorer. For your information, it is the same code but if you want to know how to make your weapons FE compatible you are able to click the card as you can see in the video. Well, now you have to insert a script into ServerScriptService and then type what he types. So, now if you are on the Roblox Studio, you have to click on ServerScriptService in the right side of the screen and then choose Insert Object and then click on Script. The script is in the following:
game.Players.PlayerAdded:Connect(function(plr)
local Memes = Instance.new(“BoolValue”)
Memes.Name = “leaderstats”
Memes.Parent = plr
local Money = Instance.new(“IntValue”)
Money.Name = “Money”
plr.CharacterAdded:Connect(function(char)
char.Humanoid.Died:Connect(function)
warn(“Completed”)
end)
end)
end)
Now, for the purpose of testing he is trying to use a free model gun. So, you can go to View in the toolbar and then you can see what he does there. In the video, he will look in the gun code to see whether it already has a creator value. You are able to see that it does have one but in case your gun does not have one, you can check the description for the code to include. Then, he adds another lines in the script and you can follow what he inserts there. After entering the script, then you can test it quickly to make sure that everything works.
In the video, you are able to see that it works. Now, it is time to make it give you the money. Go to the script again, and then you will have to insert some lines again in the script. You can watch what he inserts in the script by watching the video. After he insert some lines in the script, then he tests it again to see whether it can work or not. But, it is error. Do not be worried because it happens because he forgot to set the Parent of the Money. So, he goes back to the script and fix it. You have to add the things that he adds on the script. Then, he tests it again and it works. Okay, you are able to watch the complete video on Youtube and for your information the duration is so short. It is just 3 minutes 59 seconds.
Spiderman Far From Home in Roblox
Spiderman Far From Home in Roblox
Spiderman: Far From Home is an upcoming
Roblox Crazy Fun House Obby
Roblox Crazy Fun House Obby
If you are at this page, you
Roblox Beach House Roleplay
Roblox Beach House Roleplay
Beach House Roleplay is a roleplay game
Leave a reply "How to Get Money When You Kill a Player FE"
Must read×
Top | {
"url": "https://www.rbxrocks.net/how-to-get-money-when-you-kill-a-player-fe/",
"source_domain": "www.rbxrocks.net",
"snapshot_id": "crawl=CC-MAIN-2019-39",
"warc_metadata": {
"Content-Length": "52871",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NOW7DONBM7SB3H5KFPOY5SUJD6M77YBY",
"WARC-Concurrent-To": "<urn:uuid:a3b87eef-a6b3-429d-b90f-1ba14a5d4233>",
"WARC-Date": "2019-09-19T04:26:08Z",
"WARC-IP-Address": "101.50.1.19",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:YYLZZTBRRPZVKGL225LSLE272DW3POHH",
"WARC-Record-ID": "<urn:uuid:6e478d54-c459-42fa-8e1a-73a11a64b7da>",
"WARC-Target-URI": "https://www.rbxrocks.net/how-to-get-money-when-you-kill-a-player-fe/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:11950980-edb1-465e-a397-4f329ffe6470>"
},
"warc_info": "isPartOf: CC-MAIN-2019-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-252.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
43,
44,
63,
64,
338,
339,
616,
617,
618,
1260,
1261,
1308,
1348,
1375,
1394,
1433,
1454,
1496,
1533,
1551,
1556,
1561,
1566,
1567,
2119,
2120,
2855,
2856,
2890,
2924,
2964,
2992,
3020,
3049,
3077,
3105,
3145,
3146,
3205,
3206,
3217,
3218
],
"line_end_idx": [
43,
44,
63,
64,
338,
339,
616,
617,
618,
1260,
1261,
1308,
1348,
1375,
1394,
1433,
1454,
1496,
1533,
1551,
1556,
1561,
1566,
1567,
2119,
2120,
2855,
2856,
2890,
2924,
2964,
2992,
3020,
3049,
3077,
3105,
3145,
3146,
3205,
3206,
3217,
3218,
3221
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3221,
"ccnet_original_nlines": 42,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.46994537115097046,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.010928959585726261,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15027321875095367,
"rps_doc_frac_unique_words": 0.3305785059928894,
"rps_doc_mean_word_length": 4.130578517913818,
"rps_doc_num_sentences": 44,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.704877853393555,
"rps_doc_word_count": 605,
"rps_doc_frac_chars_dupe_10grams": 0.07002800703048706,
"rps_doc_frac_chars_dupe_5grams": 0.17567026615142822,
"rps_doc_frac_chars_dupe_6grams": 0.12084834277629852,
"rps_doc_frac_chars_dupe_7grams": 0.12084834277629852,
"rps_doc_frac_chars_dupe_8grams": 0.08243297040462494,
"rps_doc_frac_chars_dupe_9grams": 0.08243297040462494,
"rps_doc_frac_chars_top_2gram": 0.024009600281715393,
"rps_doc_frac_chars_top_3gram": 0.021608639508485794,
"rps_doc_frac_chars_top_4gram": 0.024009600281715393,
"rps_doc_books_importance": -311.52691650390625,
"rps_doc_books_importance_length_correction": -311.52691650390625,
"rps_doc_openwebtext_importance": -152.24649047851562,
"rps_doc_openwebtext_importance_length_correction": -152.24649047851562,
"rps_doc_wikipedia_importance": -99.62056732177734,
"rps_doc_wikipedia_importance_length_correction": -99.62056732177734
},
"fasttext": {
"dclm": 0.04840308055281639,
"english": 0.9351633787155151,
"fineweb_edu_approx": 1.5647003650665283,
"eai_general_math": 0.4717687964439392,
"eai_open_web_math": 0.2595066428184509,
"eai_web_code": 0.018430769443511963
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "794.8",
"labels": {
"level_1": "Arts",
"level_2": "Amusements and Recreation",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
6,579,814,376,850,553,000 | Question
The profit (or loss) from an investment is normally distributed with a mean of $11,200 and a standard deviation of $8,250.
a. What is the probability that there will be a loss rather than a profit?
b. What is the probability that the profit will be between $10,000 and $20,000?
c. Find x such that the probability that the profit will exceed x is 25%.
d. If the loss exceeds $10,000 the company will have to borrow additional cash. What is the probability that the company will have to borrow additional cash?
e. Calculate the value at risk.
$1.99
Sales0
Views44
Comments0
• CreatedJune 03, 2015
• Files Included
Post your question
5000
| {
"url": "http://www.solutioninn.com/the-profit-or-loss-from-an-investment-is-normally-distributed",
"source_domain": "www.solutioninn.com",
"snapshot_id": "crawl=CC-MAIN-2017-09",
"warc_metadata": {
"Content-Length": "22685",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:577UZD7Y3V6UAJH3KV7UVMOJXSELVTJR",
"WARC-Concurrent-To": "<urn:uuid:9b944c96-7b3d-4dfc-8fa5-cc0389b56410>",
"WARC-Date": "2017-02-24T06:59:00Z",
"WARC-IP-Address": "158.85.203.20",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:6P4SMIKUEKACLBCTKP2PMM35LM7GNNRL",
"WARC-Record-ID": "<urn:uuid:3b72cf3e-70ef-47a2-8171-03986fb8d01b>",
"WARC-Target-URI": "http://www.solutioninn.com/the-profit-or-loss-from-an-investment-is-normally-distributed",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3e6b5931-c1f3-4ea6-9e3f-f769d43b642c>"
},
"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,
9,
10,
133,
208,
288,
362,
520,
552,
553,
554,
560,
567,
575,
585,
610,
629,
648,
653
],
"line_end_idx": [
9,
10,
133,
208,
288,
362,
520,
552,
553,
554,
560,
567,
575,
585,
610,
629,
648,
653,
654
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 654,
"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.4054054021835327,
"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.31081080436706543,
"rps_doc_frac_unique_words": 0.573913037776947,
"rps_doc_mean_word_length": 4.3913044929504395,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.9251976013183594,
"rps_doc_word_count": 115,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.38811880350112915,
"rps_doc_frac_chars_dupe_6grams": 0.3405940532684326,
"rps_doc_frac_chars_dupe_7grams": 0.15841583907604218,
"rps_doc_frac_chars_dupe_8grams": 0.15841583907604218,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.11089108884334564,
"rps_doc_frac_chars_top_3gram": 0.1425742655992508,
"rps_doc_frac_chars_top_4gram": 0.11881188303232193,
"rps_doc_books_importance": -59.78024673461914,
"rps_doc_books_importance_length_correction": -68.83077239990234,
"rps_doc_openwebtext_importance": -33.62455749511719,
"rps_doc_openwebtext_importance_length_correction": -42.67508316040039,
"rps_doc_wikipedia_importance": -29.446773529052734,
"rps_doc_wikipedia_importance_length_correction": -38.49729919433594
},
"fasttext": {
"dclm": 0.9978912472724915,
"english": 0.949636697769165,
"fineweb_edu_approx": 2.4090094566345215,
"eai_general_math": 0.9998311400413513,
"eai_open_web_math": 0.7942124009132385,
"eai_web_code": 0.03367716073989868
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "519.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Probabilities; or, Mathematical statistics"
}
},
"secondary": {
"code": "658.15",
"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": "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": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
8,848,049,270,412,906,000 | Saltar al contenido principal
Búsqueda
Búsqueda
Integration Builder - Modify Numeric Variable
Comentarios
3 comentarios
• Avatar
Peter Thane
I would normally process this in the label itself with am OnIdenticalCopies VB Event controlled script that would link to the field the in data file and then divide the value by 2 and then in turn connect this to the File>Print>Identical Copies box
0
• Avatar
John Kral
That makes sense. It's not ideal in my case, as I print the same label in other circumstances and it forces me to either pass another variable to print only half the amount, or create a duplicate label that only prints half the required amount.
I was hoping for a way to do it through the integration, as I spent more time in the integration builder it seems like such a powerful tool, and this seems like it's something that the integration builder should be able to handle.
I will give it another bit to see if anyone knows a way to do it through the integration builder, if not I will follow your suggestion.
0
• Avatar
John Kral
I got it to work through the Integration Builder with lots of trial and error.
<%Copies/2%>
0
Iniciar sesión para dejar un comentario. | {
"url": "https://support.seagullscientific.com/hc/es/community/posts/4403421435543-Integration-Builder-Modify-Numeric-Variable",
"source_domain": "support.seagullscientific.com",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "56403",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2FMGQX4DJUM2CTU5UBDSSLOHLEGUDFZ4",
"WARC-Concurrent-To": "<urn:uuid:edbc7534-2456-41cf-870f-63daa5486b93>",
"WARC-Date": "2024-05-27T14:49:12Z",
"WARC-IP-Address": "104.16.51.111",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:KDESPZKTONBNSZGJ2AHXBTQPBOTH47VB",
"WARC-Record-ID": "<urn:uuid:74469569-addf-48be-a234-2d6b613cc0fb>",
"WARC-Target-URI": "https://support.seagullscientific.com/hc/es/community/posts/4403421435543-Integration-Builder-Modify-Numeric-Variable",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9bb6f129-2a26-4b85-90e3-02b80aa5a868>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-22\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,
30,
31,
40,
41,
50,
51,
97,
98,
110,
111,
125,
126,
137,
153,
154,
409,
410,
416,
427,
441,
442,
691,
692,
927,
928,
934,
935,
1075,
1076,
1082,
1093,
1107,
1108,
1191,
1192,
1209,
1210,
1216,
1217
],
"line_end_idx": [
30,
31,
40,
41,
50,
51,
97,
98,
110,
111,
125,
126,
137,
153,
154,
409,
410,
416,
427,
441,
442,
691,
692,
927,
928,
934,
935,
1075,
1076,
1082,
1093,
1107,
1108,
1191,
1192,
1209,
1210,
1216,
1217,
1257
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1257,
"ccnet_original_nlines": 39,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4572649598121643,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.034188028424978256,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11965811997652054,
"rps_doc_frac_unique_words": 0.5761904716491699,
"rps_doc_mean_word_length": 4.523809432983398,
"rps_doc_num_sentences": 6,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.506866455078125,
"rps_doc_word_count": 210,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09894736856222153,
"rps_doc_frac_chars_dupe_6grams": 0.06526315957307816,
"rps_doc_frac_chars_dupe_7grams": 0.06526315957307816,
"rps_doc_frac_chars_dupe_8grams": 0.06526315957307816,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.09473683685064316,
"rps_doc_frac_chars_top_3gram": 0.0884210467338562,
"rps_doc_frac_chars_top_4gram": 0.025263160467147827,
"rps_doc_books_importance": -96.0363998413086,
"rps_doc_books_importance_length_correction": -96.0363998413086,
"rps_doc_openwebtext_importance": -39.19906234741211,
"rps_doc_openwebtext_importance_length_correction": -39.19906234741211,
"rps_doc_wikipedia_importance": -23.043994903564453,
"rps_doc_wikipedia_importance_length_correction": -23.043994903564453
},
"fasttext": {
"dclm": 0.1442471146583557,
"english": 0.9026556015014648,
"fineweb_edu_approx": 1.080787181854248,
"eai_general_math": 0.32704418897628784,
"eai_open_web_math": 0.47180891036987305,
"eai_web_code": 0.018002450466156006
}
} | {
"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": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,066,883,507,630,511,400 | File Exchange
image thumbnail
Violin Plots for plotting multiple distributions (distributionPlot.m)
version 1.15.0.0 (30.2 KB) by Jonas
Function for plotting multiple histograms side-by-side in 2D - better than boxplot.
36 Downloads
Updated 11 Feb 2017
View Version History
View License
Editor's Note: This file was selected as MATLAB Central Pick of the Week
The zip-file contains the following files for visualizing distributions:
- distributionPlot.m: main function that allows creating violin plots
- myHistogram.m: generate histograms with 'ideal' bin width given the number of data points and the spread (Freedman-Diaconis rule). Note that for integer-valued data, each integer gets its own bin.
In addition, the zip file contains four helper functions: countEntries, colorCode2rgb, isEven, myErrorbar
If you want to overlay individual data points, you need to download the separate submission plotSpread (http://www.mathworks.com/matlabcentral/fileexchange/37105).
DistributionPlot allows visualizing multiple distributions side by side. It is useful for skewed unimodal data and indispensable for multimodal data. DistributionPlot is especially useful for showing the time evolution of a distribution.
Some of the examples from the help:
r = rand(1000,1);
rn = randn(1000,1)*0.38+0.5;
rn2 = [randn(500,1)*0.1+0.27;randn(500,1)*0.1+0.73];
rn2=min(rn2,1);rn2=max(rn2,0);
figure
ah(1)=subplot(2,4,1:2);
boxplot([r,rn,rn2])
ah(2)=subplot(2,4,3:4);
distributionPlot([r,rn,rn2],'histOpt',2); % histOpt=2 works better for uniform distributions than the default
set(ah,'ylim',[-1 2])
%--additional options
data = [randn(100,1);randn(50,1)+4;randn(25,1)+8];
subplot(2,4,5)
distributionPlot(data); % defaults
subplot(2,4,6)
distributionPlot(data,'colormap',copper,'showMM',5,'variableWidth',false) % show density via custom colormap only, show mean/std,
subplot(2,4,7:8)
distributionPlot({data(1:5:end),repmat(data,2,1)},'addSpread',true,'showMM',false,'histOpt',2) %auto-binwidth depends on # of datapoints; for small n, plotting the data is useful
Cite As
Jonas (2021). Violin Plots for plotting multiple distributions (distributionPlot.m) (https://www.mathworks.com/matlabcentral/fileexchange/23661-violin-plots-for-plotting-multiple-distributions-distributionplot-m), MATLAB Central File Exchange. Retrieved .
Comments and Ratings (73)
Andre Zeug
Excellent tool, are you willing to add style options as suggested in https://rupress.org/jcb/article/219/6/e202001064/151717/SuperPlots-Communicating-reproducibility-and?
Such as:
- Violin with only borders
- Spread point collor according to 2nd order dim
- Mean of subpopulation (2nd order) with corresponding color and style
Muhammad Tauha Ali
good variety of plot options
Lukas Rier
Monique Shotande
Works well. The examples are very helpful. Plotting different distributions on the left and right of a single violin was unclear at first, but the example in the comments made it clear that the widthDiv parameter is necessary here. Perhaps a bit more description on this feature would be helpful. My only minor issue with this plotting tool is the limited aesthetics ability of the plots for adjusting edge and face color and transparency.
Harshan Ravi
To add to the previous comment I am looking for split violin plots.
Harshan Ravi
Nice submission. I am new to violin plots. I have a plot I would like to generate. I have results from pre and post contrast agent I would like to use a single violin plot to show them i.e left side of the single plot pre and right side of the plot post agent. Does your script allow for such plots?
Tarek Rashwan
Sjoerd Nauta
Sansit Das
Thank you for the tool. I am new to this. Can anybody help me know, where to give my input for x-values and y-values.
Dima
Cheng Chen
Lefteris Kosmidis
Great submission! Thanks. One question though: is there any way to control the bin width so that different distributions have equal widths?
Andre Zeug
I just realised that the function 'histogram' was renamed for download (but not in the function tab above). So everything is fine.
Andre Zeug
Thanks for sharing!
Did you thought about renaming your function 'histogram(varargin)'? It might shadow MATLAB's function 'histogram' Introduced in R2014b, which requires different input. This might cause confusion.
T A
Whoops, I didn't mean to post that last comment...please ignore.
T A
There appears to be a sizable bug when using strings (matrices or cell arrays) as categories. The data ignore the order of the categories, leading to arbitrary data distributions. Here's an example. Results are bad when the categories are 'a' and 'b', results are fine if the categories are 1 and 2.
a=randn(1000,1)+(1:1000).';
b=[repmat('a',500,1);repmat('b',500,1)];
% b=[repmat(1,500,1);repmat(2,500,1)];
figure
distributionPlot(a,'histOpt',0,'addspread',1,'groups',b,'showMM',6)
figure
distributionPlot(a,'histOpt',0,'addspread',1,'groups',flipud(b),'showMM',6)
jon erickson
Thanks for posting! This is a great tool.
One quick fix suggsted: when plotting using xValues option, should to modify line 905 using unique() as follows:
set(ah,'XTick',unique(sortedX));
else function will throw an error when there are repeat x values:
Error using matlab.graphics.axis.Axes/set
Value must be a vector of type single or double whose values increase
WJ
Hi there, as I'm new to matlab, can someone advise on how and where should I input my data? Thanks.
wj
Gerard Llorach
Thanks for the code!
I found an error when wanting to use legends with distributionPlot.m. The first output handles (patch) return an integer instead of a Patch (CS). To fix it is quite simple:
line 44: hh = {}; % Instead of NaN(nData,1);
line 729: hh{iData} =...
line 731: hh{iData} =...
I don't know if there is place to suggest changes in Matlab File Exchange. I hope the author or somebody else can do this fix.
Eduardo
Alan Chauvin
Thanks for the submission.
How can i add a legend using widthDiv to compare two series of distributions ?
using : legend('1','2') give me two blue box.
thx again
Ruggero G. Bettinardi
Great, Great, Great! Congrats Jonas!
One little suggestion: it would be amazing being able to constrain the density estimation within a given interval, so not to obtain "undesired tails" that trespass the desired lower and upper bound values - for example if you are plotting the violin plot from a set of scores that can only range from, say, 1 to 100, in order to prevent the tails of the violin spanning from values smaller than 1 and larger than 100.
Prasad
This is a great tool thank you. Is there an option to make the distribution plot higher in resolution? It looks pixelated.
I get around this by editing the ksdensity function call at 603. ksdensity takes a 'pts' argument where you can specify an arbitrary number of points to get finer resolution violin plots.
Andrea Rovinelli
Great peace of code, just I was looking for. However, I have a question: Is there any way to normalize histograms across comparison (i.e. when using the option "widthDiv") such that both the left and right distributions will have the same area?
Nihanth Adina
Brian Katz
Sorry, this was my mistake in a way. If the data vector is a row, not a column, the result of the grouping are identical datasets. Could be good to put a check in here, to verify that the dimensions of the data and the grouping variable are the same.
Brian Katz
Can anyone confirm that this works with grouping the variable (and under which MatLab version)? I am having problems. Maybe an example would be good to confirm this. I get identical group data after grouping (R2017a).
Federico Tartarini
Bazo Kara
Jonas
@Wynn, Markus: I have updated distributionPlot and renamed histogram.m
Dan
Wynn
I'd like to echo Markus Millinger's comment that the code over-writes the MATLAB builtin 'histogram' function. Any chance of a patch with a renamed 'histogram.m'?
Anne Urai
Shilo
Great, Thanks, very useful!
Is there an option to use the addSpread function and color the dots using different values- so adding another dimension to the data?
Isobel
This is great, thanks. However, would you consider adding an option to cut plots off in the y-direction at the min and max of the dataset?
Markus Millinger
This is very nice! However, the function histogram clashes with the "new" Matlab function with the same name.
Amir
Neat and nice. Much better than the box-plot for scientific work
Martin Sundqvist
Tiago
Johann
Edgar Guevara
Displaying distributional differences provide more information of the samples and are very useful when distance from zero is meaningless.
Furthermore, the option to overlay the mean, SEM, sd and percentiles helps us better interpret the statistical analyses.
Overall, an invaluable option to the classic barplots and boxplots.
Holger Hoffmann
Excellent, just what I needed. It served me very well.
I added a modified version to the MatLabFEx using the smooth kernel density (Violin Plot based on kernel density estimation).
Jonas
@Warwick: this looks like a bug - globalNorm=2 should do the trick, but at the moment, it seems like it would require equally spaced bins. I'll look into it.
Warwick
This is a great function. However I want to discriminate between two quite different distributions. I have a problem getting the Total area under the respective curves to be equal (to a nominal 1) for separate datasets (even with the same number of observations). Eg, Say I want to plot U and V left and right respectively where
U = normrnd(3.3,1.0,100,1);
V = normrnd(2.0,0.3,100,1);
then no matter what I do, they don't look anywhere near equal. Any ideas? or have I missed something obvious?
Sturla Kvamsdal
Dan K
This is a great tool... It would be nice if some of the functionality could be achieved without requiring toolboxes (e.g. I've cobbled together the code to do the smoothed histograms without the spline toolbox, using files from FEX).
Jonas
@all: thanks again for the suggestions, most of which are implemented now. Please note that plotSpread is now a submission on its own that needs to be downloaded separately.
Andres
Very, very useful!
Jonas
@Yuri Kotliarov: I suggest you call addSpread.m directly, rather than via distributionPlot.m
@all: thanks for the good suggestions. I hope I can implement them soon!
Yuri K
@Jonas, I didn't find if there is a way to change the width of dots spread (addSpread is 1). It doesn't seem to depend on distWidth. If I don't show the density (color is white), the distance between groups is quite large. Thanks.
Kelly Kearney
Overall, this is a great function, and I use it quite often to analyze model ensemble output. A few enhancements that could be nice:
- Add the option to display in a horizontal orientation.
- Add the option to filter outliers when calculating bin widths and kernal densities. Could also be nice to display these as points, as in boxplot, rather than connecting them via long lines to the main histogram.
- This is an edge case, but the function will error under the addSpread option if a column/group contains only NaNs and/or Infs.
Warwick
This is very good. I've just included some plots in a report. Thank you. Possibly you could add an extra feature within the options of 'showMM' = 6, say, which would be to draw a horizontal line of linewidth 2 for the median, and 25 & 75 pctiles at linewidth 1.
Jonas
@Yuri: I have implemented your suggestion (though I start the histograms from the very left or right side, respectively), and fixed the previous bug.
Yuri K
@Jonas: Thanks for the answer. May I suggest a new feature? It would be nice to draw histogram at certain direction. Currently it's only centered, but also can be left- or right- directed. All you need to change is xBase variable at line 401: 0.5 to 0 for left direction, -0.5 to 0 for right direction. For someone it's easier to understand when the distributions looks like turned histograms.
Jonas
@Yuri Kotliarov: Currently, the only workaround is to call ksdensity outside of distributionPlot to ensure that the smoothing uses the same kernel:
x = zeros(10,1);
y = x+randn(10,1)*0.1;
[yy(:,2),yy(:,1)] = ksdensity(y,'width',0.01);
[xx(:,2),xx(:,1)] = ksdensity(x,'width',0.01);
distributionPlot({xx,yy},'showMM',false)
Unfortunately, the showMM option is bugged when you supply your own histograms at the moment, so you have to set that option to false.
Yuri K
@Jonas: I have problem with smoothing (histOpt=1) when all values for a group are the same. In this case the distribution plot is very wide comparing to the same data with a little variance.
For example:
x = zeros(10,1);
y = x+randn(10,1)*0.1;
distributionPlot({x,y},'histOpt',1,'addSpread',1)
The same happens with a few outliers in x. I understand it's probably how ksdensity function works. But can you do anything to make the above cases comparable?
Alexander
Jonas
@Yuri: The new version of distributionPlot supports grouped data.
Yuri K
Great! Thanks.
Jonas
@Yuri: No, it doesn't work with grouped data (yet). In the meantime, you can use a function like group2cell (http://www.mathworks.com/matlabcentral/fileexchange/11192-group2cell) to distribute your grouped data among cells to use with distributionPlot.
Jonas
@Brian: Thanks for the suggestions, and for sending me your sample code. I have not had time yet to update my code, though, but I will look into it!
Yuri K
Does it work with grouped data, like boxplot does?
Brian Katz
This works quite well, giving a very interesting data presentation method. Some improvements could be the use of a colormap, rather than a fored gray scale. An example in teh help would also be a good addition.
I have started to try and make a combined plot which allows for both boxplot (using boxplotCsub) and distributionPlot. As both are symetrical, they can both be collapsed to one-sided and then combing, giving two very interesting looks at the same data sets.
Brian Katz
Very very cool.
Andrei Bejan
Denzel Li
Rob Campbell
William Irwin
Chris Lydick
Oleg Komarov
Chiara
Christopher
MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements
Inspired by: plot spread points (beeswarm plot)
Inspired: Violin Plot, gQSPSim
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting! | {
"url": "https://in.mathworks.com/matlabcentral/fileexchange/23661-violin-plots-for-plotting-multiple-distributions-distributionplot-m?s_tid=prof_contriblnk",
"source_domain": "in.mathworks.com",
"snapshot_id": "crawl=CC-MAIN-2021-04",
"warc_metadata": {
"Content-Length": "165865",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PRZN7OKPKJABVDDFOEZCBUUXYFMZA4Q2",
"WARC-Concurrent-To": "<urn:uuid:d016866b-0200-47b0-bc73-5364f5946c73>",
"WARC-Date": "2021-01-19T06:06:09Z",
"WARC-IP-Address": "184.25.198.13",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:XWNHYBVMBNNLALY2A6XSHBR7KA5PYMH5",
"WARC-Record-ID": "<urn:uuid:eee385c0-f18b-445d-b5ae-ce1e4b330994>",
"WARC-Target-URI": "https://in.mathworks.com/matlabcentral/fileexchange/23661-violin-plots-for-plotting-multiple-distributions-distributionplot-m?s_tid=prof_contriblnk",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3363ff7b-0afe-42ae-853f-c2ec17d75f3d>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-172.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,
14,
15,
31,
32,
103,
104,
140,
224,
225,
238,
239,
259,
260,
281,
282,
295,
296,
369,
370,
443,
513,
712,
713,
819,
820,
984,
985,
1223,
1224,
1260,
1261,
1279,
1308,
1361,
1392,
1399,
1423,
1443,
1467,
1577,
1599,
1621,
1672,
1687,
1722,
1737,
1867,
1884,
2063,
2064,
2072,
2073,
2329,
2330,
2356,
2357,
2368,
2369,
2540,
2549,
2576,
2625,
2696,
2697,
2716,
2717,
2746,
2747,
2758,
2759,
2776,
2777,
3217,
3218,
3231,
3232,
3300,
3301,
3314,
3315,
3615,
3616,
3630,
3631,
3644,
3645,
3656,
3657,
3775,
3776,
3781,
3782,
3793,
3794,
3812,
3813,
3953,
3954,
3965,
3966,
4097,
4098,
4109,
4110,
4130,
4326,
4327,
4331,
4332,
4397,
4398,
4402,
4403,
4703,
4731,
4772,
4811,
4818,
4886,
4893,
4969,
4970,
4983,
4984,
5026,
5139,
5172,
5173,
5239,
5281,
5351,
5352,
5355,
5356,
5456,
5459,
5460,
5475,
5476,
5497,
5670,
5715,
5740,
5765,
5766,
5893,
5894,
5902,
5903,
5916,
5917,
5944,
6023,
6069,
6079,
6080,
6102,
6103,
6140,
6141,
6559,
6560,
6567,
6568,
6691,
6692,
6880,
6881,
6898,
6899,
7144,
7145,
7159,
7160,
7171,
7172,
7423,
7424,
7435,
7436,
7654,
7655,
7674,
7675,
7685,
7686,
7692,
7693,
7764,
7765,
7769,
7770,
7775,
7776,
7939,
7940,
7950,
7951,
7957,
7958,
7986,
8119,
8120,
8127,
8128,
8267,
8268,
8285,
8286,
8396,
8397,
8402,
8403,
8468,
8469,
8486,
8487,
8493,
8494,
8501,
8502,
8516,
8517,
8655,
8776,
8844,
8845,
8861,
8862,
8917,
8918,
9044,
9045,
9051,
9052,
9210,
9211,
9219,
9220,
9549,
9577,
9605,
9606,
9716,
9717,
9733,
9734,
9740,
9741,
9975,
9976,
9982,
9983,
10157,
10158,
10165,
10166,
10185,
10186,
10192,
10193,
10286,
10287,
10360,
10361,
10368,
10369,
10600,
10601,
10615,
10616,
10749,
10750,
10807,
10808,
11022,
11023,
11152,
11153,
11161,
11162,
11424,
11425,
11431,
11432,
11582,
11583,
11590,
11591,
11985,
11986,
11992,
11993,
12141,
12142,
12159,
12182,
12229,
12276,
12317,
12318,
12453,
12454,
12461,
12462,
12653,
12666,
12683,
12706,
12756,
12757,
12917,
12918,
12928,
12929,
12935,
12936,
13002,
13003,
13010,
13011,
13026,
13027,
13033,
13034,
13287,
13288,
13294,
13295,
13444,
13445,
13452,
13453,
13504,
13505,
13516,
13517,
13728,
13986,
13987,
13998,
13999,
14015,
14016,
14029,
14030,
14040,
14041,
14054,
14055,
14069,
14070,
14083,
14084,
14097,
14098,
14105,
14106,
14118,
14119,
14148,
14168,
14196,
14219,
14239,
14256,
14257,
14305,
14306,
14337,
14338,
14362,
14363,
14445,
14446
],
"line_end_idx": [
14,
15,
31,
32,
103,
104,
140,
224,
225,
238,
239,
259,
260,
281,
282,
295,
296,
369,
370,
443,
513,
712,
713,
819,
820,
984,
985,
1223,
1224,
1260,
1261,
1279,
1308,
1361,
1392,
1399,
1423,
1443,
1467,
1577,
1599,
1621,
1672,
1687,
1722,
1737,
1867,
1884,
2063,
2064,
2072,
2073,
2329,
2330,
2356,
2357,
2368,
2369,
2540,
2549,
2576,
2625,
2696,
2697,
2716,
2717,
2746,
2747,
2758,
2759,
2776,
2777,
3217,
3218,
3231,
3232,
3300,
3301,
3314,
3315,
3615,
3616,
3630,
3631,
3644,
3645,
3656,
3657,
3775,
3776,
3781,
3782,
3793,
3794,
3812,
3813,
3953,
3954,
3965,
3966,
4097,
4098,
4109,
4110,
4130,
4326,
4327,
4331,
4332,
4397,
4398,
4402,
4403,
4703,
4731,
4772,
4811,
4818,
4886,
4893,
4969,
4970,
4983,
4984,
5026,
5139,
5172,
5173,
5239,
5281,
5351,
5352,
5355,
5356,
5456,
5459,
5460,
5475,
5476,
5497,
5670,
5715,
5740,
5765,
5766,
5893,
5894,
5902,
5903,
5916,
5917,
5944,
6023,
6069,
6079,
6080,
6102,
6103,
6140,
6141,
6559,
6560,
6567,
6568,
6691,
6692,
6880,
6881,
6898,
6899,
7144,
7145,
7159,
7160,
7171,
7172,
7423,
7424,
7435,
7436,
7654,
7655,
7674,
7675,
7685,
7686,
7692,
7693,
7764,
7765,
7769,
7770,
7775,
7776,
7939,
7940,
7950,
7951,
7957,
7958,
7986,
8119,
8120,
8127,
8128,
8267,
8268,
8285,
8286,
8396,
8397,
8402,
8403,
8468,
8469,
8486,
8487,
8493,
8494,
8501,
8502,
8516,
8517,
8655,
8776,
8844,
8845,
8861,
8862,
8917,
8918,
9044,
9045,
9051,
9052,
9210,
9211,
9219,
9220,
9549,
9577,
9605,
9606,
9716,
9717,
9733,
9734,
9740,
9741,
9975,
9976,
9982,
9983,
10157,
10158,
10165,
10166,
10185,
10186,
10192,
10193,
10286,
10287,
10360,
10361,
10368,
10369,
10600,
10601,
10615,
10616,
10749,
10750,
10807,
10808,
11022,
11023,
11152,
11153,
11161,
11162,
11424,
11425,
11431,
11432,
11582,
11583,
11590,
11591,
11985,
11986,
11992,
11993,
12141,
12142,
12159,
12182,
12229,
12276,
12317,
12318,
12453,
12454,
12461,
12462,
12653,
12666,
12683,
12706,
12756,
12757,
12917,
12918,
12928,
12929,
12935,
12936,
13002,
13003,
13010,
13011,
13026,
13027,
13033,
13034,
13287,
13288,
13294,
13295,
13444,
13445,
13452,
13453,
13504,
13505,
13516,
13517,
13728,
13986,
13987,
13998,
13999,
14015,
14016,
14029,
14030,
14040,
14041,
14054,
14055,
14069,
14070,
14083,
14084,
14097,
14098,
14105,
14106,
14118,
14119,
14148,
14168,
14196,
14219,
14239,
14256,
14257,
14305,
14306,
14337,
14338,
14362,
14363,
14445,
14446,
14460
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 14460,
"ccnet_original_nlines": 375,
"rps_doc_curly_bracket": 0.0008298800094053149,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.32333439588546753,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023050209507346153,
"rps_doc_frac_lines_end_with_ellipsis": 0.005319150164723396,
"rps_doc_frac_no_alph_words": 0.27565518021583557,
"rps_doc_frac_unique_words": 0.37187787890434265,
"rps_doc_mean_word_length": 5.1938018798828125,
"rps_doc_num_sentences": 189,
"rps_doc_symbol_to_word_ratio": 0.0015787800075486302,
"rps_doc_unigram_entropy": 5.905629634857178,
"rps_doc_word_count": 2162,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.021195119246840477,
"rps_doc_frac_chars_dupe_6grams": 0.007658740039914846,
"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.005343310069292784,
"rps_doc_frac_chars_top_3gram": 0.003116929903626442,
"rps_doc_frac_chars_top_4gram": 0.005343310069292784,
"rps_doc_books_importance": -1426.7310791015625,
"rps_doc_books_importance_length_correction": -1426.7310791015625,
"rps_doc_openwebtext_importance": -850.9736328125,
"rps_doc_openwebtext_importance_length_correction": -850.9736328125,
"rps_doc_wikipedia_importance": -533.320556640625,
"rps_doc_wikipedia_importance_length_correction": -533.320556640625
},
"fasttext": {
"dclm": 0.12363666296005249,
"english": 0.869293212890625,
"fineweb_edu_approx": 1.4845221042633057,
"eai_general_math": 0.9686737656593323,
"eai_open_web_math": 0.4133825898170471,
"eai_web_code": 0.770603358745575
}
} | {
"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.5",
"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": "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": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-785,818,719,560,998,800 | MySQL FULLTEXT searching with RIGHT JOIN between two tables
SELECT Q.*, T.`name` as `last_name`
FROM `people` as Q
RIGHT JOIN `details` as T
on Q.id = T.people_id
WHERE MATCH (Q.name) AGAINST ('jon Stephen Jack' IN NATURAL LANGUAGE MODE)
LIMIT 10
Advertisements
Leave a Reply
Fill in your details below or click an icon to log in:
WordPress.com Logo
You are commenting using your WordPress.com account. Log Out / Change )
Google+ photo
You are commenting using your Google+ account. Log Out / Change )
Twitter picture
You are commenting using your Twitter account. Log Out / Change )
Facebook photo
You are commenting using your Facebook account. Log Out / Change )
w
Connecting to %s | {
"url": "https://ziyedbd.wordpress.com/2016/01/30/mysql-fulltext-searching-with-right-join-between-two-tables/",
"source_domain": "ziyedbd.wordpress.com",
"snapshot_id": "crawl=CC-MAIN-2018-22",
"warc_metadata": {
"Content-Length": "65228",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:QRR67X3E4SIQ6V6YVHNUQHVCFWXX5SZG",
"WARC-Concurrent-To": "<urn:uuid:295f9624-681a-4ae3-9830-160e100921d5>",
"WARC-Date": "2018-05-22T02:35:32Z",
"WARC-IP-Address": "192.0.78.13",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GTN7TLXEFAGL5MHJY4AX3ROLUZR7TQYH",
"WARC-Record-ID": "<urn:uuid:b67a46d4-2595-4b77-9576-9acebe73c8ae>",
"WARC-Target-URI": "https://ziyedbd.wordpress.com/2016/01/30/mysql-fulltext-searching-with-right-join-between-two-tables/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a64b4e0d-bac6-4ff0-a423-407dcf5457e2>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-229-205-91.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,
60,
61,
62,
63,
100,
120,
147,
170,
247,
256,
257,
272,
273,
287,
288,
343,
344,
363,
364,
437,
438,
452,
453,
520,
521,
537,
538,
605,
606,
621,
622,
690,
691,
693,
694
],
"line_end_idx": [
60,
61,
62,
63,
100,
120,
147,
170,
247,
256,
257,
272,
273,
287,
288,
343,
344,
363,
364,
437,
438,
452,
453,
520,
521,
537,
538,
605,
606,
621,
622,
690,
691,
693,
694,
710
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 710,
"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.2281879186630249,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.14765101671218872,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24832214415073395,
"rps_doc_frac_unique_words": 0.5981308221817017,
"rps_doc_mean_word_length": 4.925233840942383,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.9684808254241943,
"rps_doc_word_count": 107,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.20872865617275238,
"rps_doc_frac_chars_dupe_6grams": 0.11385198682546616,
"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.04554079845547676,
"rps_doc_frac_chars_top_3gram": 0.12144213169813156,
"rps_doc_frac_chars_top_4gram": 0.15939278900623322,
"rps_doc_books_importance": -62.858238220214844,
"rps_doc_books_importance_length_correction": -63.316368103027344,
"rps_doc_openwebtext_importance": -33.67202377319336,
"rps_doc_openwebtext_importance_length_correction": -34.130157470703125,
"rps_doc_wikipedia_importance": -16.12777328491211,
"rps_doc_wikipedia_importance_length_correction": -16.58590316772461
},
"fasttext": {
"dclm": 0.036486390978097916,
"english": 0.655708372592926,
"fineweb_edu_approx": 1.4800962209701538,
"eai_general_math": -0.000010009999641624745,
"eai_open_web_math": 0.0009358500246889889,
"eai_web_code": -0.000010009999641624745
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.746",
"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": "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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-7,594,271,124,100,434,000 | Zum Hauptinhalt wechseln
Repair and disassembly guides for the Alcatel A50 budget smartphone. The Alcatel A50 was released in July 2017 and includes a 5.2-inch display.
21 Fragen Alle anzeigen
Alcatel A50 not updating!
I have an Alcatel A50, I've done hard resets and factory resets and it will not update! Keeps giving me an error on boot! So I need some help with this
Diese Frage beantworten Ich habe das gleiche Problem
Ist dies eine gute Frage?
Bewertung 2
1 Kommentar
I have the A30 tablet it keeps telling me to resync with a tablet I haven't had in 6 years and won't take my new info when i try to add as NEW...did you ever get yours fixed? I called TMobile they basically told me I am screwed without knowing that info.
von
Einen Kommentar hinzufügen
1 Antwort
Hilfreichste Antwort
If your Android device won't update, it might have to do with your Wi-Fi connection, battery, storage space, or the age of your device. Android mobile devices usually update automatically, but updates can be delayed or prevented for various reasons.
Can you please let me know what the error the device kept displaying? Thank you!
War diese Antwort hilfreich?
Bewertung 2
1 Kommentar:
it shows this DEVICE was reset. To continue sign in with google account that was previously synced on this device…Problem is I the info i believe it is or was it sowing it isn’t. I tried to do it with a sim car and without and I can’t pas this screen.
von
Einen Kommentar hinzufügen
Antwort hinzufügen
Jimmy B wird auf ewig dankbar sein.
Seitenaufrufe:
Letzte 24 Stunden: 0
Letzte 7 Tage: 0
Letzte 30 Tage: 2
Insgesamt: 202 | {
"url": "https://de.ifixit.com/Antworten/Ansehen/487770/Alcatel+A50+not+updating!",
"source_domain": "de.ifixit.com",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "130178",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VZCTKAPNBWSK2QZMFORXM4ANKUWCEKJH",
"WARC-Concurrent-To": "<urn:uuid:6b4967fe-7ad7-4034-bde6-024535ee21e8>",
"WARC-Date": "2024-07-22T14:12:11Z",
"WARC-IP-Address": "75.101.159.182",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:QQ3FUW6766PKEOU64NC6667ZCNCYZQI7",
"WARC-Record-ID": "<urn:uuid:6d2e30d6-07e0-4ce5-b42e-22f004db3959>",
"WARC-Target-URI": "https://de.ifixit.com/Antworten/Ansehen/487770/Alcatel+A50+not+updating!",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c6424d94-b01c-42e1-b698-bce07fdccccb>"
},
"warc_info": "isPartOf: CC-MAIN-2024-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-103\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,
25,
26,
170,
171,
195,
196,
222,
223,
375,
376,
429,
430,
456,
457,
469,
481,
482,
737,
738,
742,
743,
770,
771,
781,
782,
803,
804,
1054,
1055,
1136,
1137,
1166,
1167,
1179,
1180,
1193,
1194,
1446,
1447,
1451,
1452,
1479,
1480,
1499,
1500,
1536,
1551,
1552,
1573,
1574,
1591,
1592,
1610,
1611
],
"line_end_idx": [
25,
26,
170,
171,
195,
196,
222,
223,
375,
376,
429,
430,
456,
457,
469,
481,
482,
737,
738,
742,
743,
770,
771,
781,
782,
803,
804,
1054,
1055,
1136,
1137,
1166,
1167,
1179,
1180,
1193,
1194,
1446,
1447,
1451,
1452,
1479,
1480,
1499,
1500,
1536,
1551,
1552,
1573,
1574,
1591,
1592,
1610,
1611,
1625
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1625,
"ccnet_original_nlines": 54,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.34925374388694763,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.053731340914964676,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17014925181865692,
"rps_doc_frac_unique_words": 0.6232394576072693,
"rps_doc_mean_word_length": 4.507042407989502,
"rps_doc_num_sentences": 20,
"rps_doc_symbol_to_word_ratio": 0.0059701502323150635,
"rps_doc_unigram_entropy": 4.942074775695801,
"rps_doc_word_count": 284,
"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.03125,
"rps_doc_frac_chars_top_3gram": 0.02031249925494194,
"rps_doc_frac_chars_top_4gram": 0.03125,
"rps_doc_books_importance": -138.98867797851562,
"rps_doc_books_importance_length_correction": -125.18367004394531,
"rps_doc_openwebtext_importance": -79.00366973876953,
"rps_doc_openwebtext_importance_length_correction": -79.00366973876953,
"rps_doc_wikipedia_importance": -59.09115219116211,
"rps_doc_wikipedia_importance_length_correction": -45.96550369262695
},
"fasttext": {
"dclm": 0.026296140626072884,
"english": 0.7027624845504761,
"fineweb_edu_approx": 0.9764700531959534,
"eai_general_math": 0.03239047899842262,
"eai_open_web_math": 0.16140097379684448,
"eai_web_code": 0.006028349976986647
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.16",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.457",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No 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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,966,300,821,620,961,300 | Home Home > GIT Browse
summaryrefslogtreecommitdiff
blob: 516acdb0e0ec9bd48e3006a8ede165437b3e121f (plain)
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
/*
* linux/kernel/exit.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/sched/autogroup.h>
#include <linux/sched/mm.h>
#include <linux/sched/stat.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/sched/cputime.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/completion.h>
#include <linux/personality.h>
#include <linux/tty.h>
#include <linux/iocontext.h>
#include <linux/key.h>
#include <linux/cpu.h>
#include <linux/acct.h>
#include <linux/tsacct_kern.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/freezer.h>
#include <linux/binfmts.h>
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/ptrace.h>
#include <linux/profile.h>
#include <linux/mount.h>
#include <linux/proc_fs.h>
#include <linux/kthread.h>
#include <linux/mempolicy.h>
#include <linux/taskstats_kern.h>
#include <linux/delayacct.h>
#include <linux/cgroup.h>
#include <linux/syscalls.h>
#include <linux/signal.h>
#include <linux/posix-timers.h>
#include <linux/cn_proc.h>
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h> /* for audit_free() */
#include <linux/resource.h>
#include <linux/blkdev.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/tracehook.h>
#include <linux/fs_struct.h>
#include <linux/userfaultfd_k.h>
#include <linux/init_task.h>
#include <linux/perf_event.h>
#include <trace/events/sched.h>
#include <linux/hw_breakpoint.h>
#include <linux/oom.h>
#include <linux/writeback.h>
#include <linux/shm.h>
#include <linux/kcov.h>
#include <linux/random.h>
#include <linux/rcuwait.h>
#include <linux/uaccess.h>
#include <asm/unistd.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
static void __unhash_process(struct task_struct *p, bool group_dead)
{
nr_threads--;
detach_pid(p, PIDTYPE_PID);
if (group_dead) {
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
list_del_rcu(&p->tasks);
list_del_init(&p->sibling);
__this_cpu_dec(process_counts);
}
list_del_rcu(&p->thread_group);
list_del_rcu(&p->thread_node);
}
/*
* This function expects the tasklist_lock write-locked.
*/
static void __exit_signal(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
bool group_dead = thread_group_leader(tsk);
struct sighand_struct *sighand;
struct tty_struct *uninitialized_var(tty);
u64 utime, stime;
sighand = rcu_dereference_check(tsk->sighand,
lockdep_tasklist_lock_is_held());
spin_lock(&sighand->siglock);
#ifdef CONFIG_POSIX_TIMERS
posix_cpu_timers_exit(tsk);
if (group_dead) {
posix_cpu_timers_exit_group(tsk);
} else {
/*
* This can only happen if the caller is de_thread().
* FIXME: this is the temporary hack, we should teach
* posix-cpu-timers to handle this case correctly.
*/
if (unlikely(has_group_leader_pid(tsk)))
posix_cpu_timers_exit_group(tsk);
}
#endif
if (group_dead) {
tty = sig->tty;
sig->tty = NULL;
} else {
/*
* If there is any task waiting for the group exit
* then notify it:
*/
if (sig->notify_count > 0 && !--sig->notify_count)
wake_up_process(sig->group_exit_task);
if (tsk == sig->curr_target)
sig->curr_target = next_thread(tsk);
}
add_device_randomness((const void*) &tsk->se.sum_exec_runtime,
sizeof(unsigned long long));
/*
* Accumulate here the counters for all threads as they die. We could
* skip the group leader because it is the last user of signal_struct,
* but we want to avoid the race with thread_group_cputime() which can
* see the empty ->thread_head list.
*/
task_cputime(tsk, &utime, &stime);
write_seqlock(&sig->stats_lock);
sig->utime += utime;
sig->stime += stime;
sig->gtime += task_gtime(tsk);
sig->min_flt += tsk->min_flt;
sig->maj_flt += tsk->maj_flt;
sig->nvcsw += tsk->nvcsw;
sig->nivcsw += tsk->nivcsw;
sig->inblock += task_io_get_inblock(tsk);
sig->oublock += task_io_get_oublock(tsk);
task_io_accounting_add(&sig->ioac, &tsk->ioac);
sig->sum_sched_runtime += tsk->se.sum_exec_runtime;
sig->nr_threads--;
__unhash_process(tsk, group_dead);
write_sequnlock(&sig->stats_lock);
/*
* Do this under ->siglock, we can race with another thread
* doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
*/
flush_sigqueue(&tsk->pending);
tsk->sighand = NULL;
spin_unlock(&sighand->siglock);
__cleanup_sighand(sighand);
clear_tsk_thread_flag(tsk, TIF_SIGPENDING);
if (group_dead) {
flush_sigqueue(&sig->shared_pending);
tty_kref_put(tty);
}
}
static void delayed_put_task_struct(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
perf_event_delayed_put(tsk);
trace_sched_process_free(tsk);
put_task_struct(tsk);
}
void release_task(struct task_struct *p)
{
struct task_struct *leader;
int zap_leader;
repeat:
/* don't need to get the RCU readlock here - the process is dead and
* can't be modifying its own credentials. But shut RCU-lockdep up */
rcu_read_lock();
atomic_dec(&__task_cred(p)->user->processes);
rcu_read_unlock();
proc_flush_task(p);
write_lock_irq(&tasklist_lock);
ptrace_release_task(p);
__exit_signal(p);
/*
* If we are the last non-leader member of the thread
* group, and the leader is zombie, then notify the
* group leader's parent process. (if it wants notification.)
*/
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader)
&& leader->exit_state == EXIT_ZOMBIE) {
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
* then we are the one who should release the leader.
*/
zap_leader = do_notify_parent(leader, leader->exit_signal);
if (zap_leader)
leader->exit_state = EXIT_DEAD;
}
write_unlock_irq(&tasklist_lock);
release_thread(p);
call_rcu(&p->rcu, delayed_put_task_struct);
p = leader;
if (unlikely(zap_leader))
goto repeat;
}
/*
* Note that if this function returns a valid task_struct pointer (!NULL)
* task->usage must remain >0 for the duration of the RCU critical section.
*/
struct task_struct *task_rcu_dereference(struct task_struct **ptask)
{
struct sighand_struct *sighand;
struct task_struct *task;
/*
* We need to verify that release_task() was not called and thus
* delayed_put_task_struct() can't run and drop the last reference
* before rcu_read_unlock(). We check task->sighand != NULL,
* but we can read the already freed and reused memory.
*/
retry:
task = rcu_dereference(*ptask);
if (!task)
return NULL;
probe_kernel_address(&task->sighand, sighand);
/*
* Pairs with atomic_dec_and_test() in put_task_struct(). If this task
* was already freed we can not miss the preceding update of this
* pointer.
*/
smp_rmb();
if (unlikely(task != READ_ONCE(*ptask)))
goto retry;
/*
* We've re-checked that "task == *ptask", now we have two different
* cases:
*
* 1. This is actually the same task/task_struct. In this case
* sighand != NULL tells us it is still alive.
*
* 2. This is another task which got the same memory for task_struct.
* We can't know this of course, and we can not trust
* sighand != NULL.
*
* In this case we actually return a random value, but this is
* correct.
*
* If we return NULL - we can pretend that we actually noticed that
* *ptask was updated when the previous task has exited. Or pretend
* that probe_slab_address(&sighand) reads NULL.
*
* If we return the new task (because sighand is not NULL for any
* reason) - this is fine too. This (new) task can't go away before
* another gp pass.
*
* And note: We could even eliminate the false positive if re-read
* task->sighand once again to avoid the falsely NULL. But this case
* is very unlikely so we don't care.
*/
if (!sighand)
return NULL;
return task;
}
void rcuwait_wake_up(struct rcuwait *w)
{
struct task_struct *task;
rcu_read_lock();
/*
* Order condition vs @task, such that everything prior to the load
* of @task is visible. This is the condition as to why the user called
* rcuwait_trywake() in the first place. Pairs with set_current_state()
* barrier (A) in rcuwait_wait_event().
*
* WAIT WAKE
* [S] tsk = current [S] cond = true
* MB (A) MB (B)
* [L] cond [L] tsk
*/
smp_rmb(); /* (B) */
/*
* Avoid using task_rcu_dereference() magic as long as we are careful,
* see comment in rcuwait_wait_event() regarding ->exit_state.
*/
task = rcu_dereference(w->task);
if (task)
wake_up_process(task);
rcu_read_unlock();
}
struct task_struct *try_get_task_struct(struct task_struct **ptask)
{
struct task_struct *task;
rcu_read_lock();
task = task_rcu_dereference(ptask);
if (task)
get_task_struct(task);
rcu_read_unlock();
return task;
}
/*
* Determine if a process group is "orphaned", according to the POSIX
* definition in 2.2.2.52. Orphaned process groups are not to be affected
* by terminal-generated stop signals. Newly orphaned process groups are
* to receive a SIGHUP and a SIGCONT.
*
* "I ask you, have you ever known what it is to be an orphan?"
*/
static int will_become_orphaned_pgrp(struct pid *pgrp,
struct task_struct *ignored_task)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if ((p == ignored_task) ||
(p->exit_state && thread_group_empty(p)) ||
is_global_init(p->real_parent))
continue;
if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p))
return 0;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return 1;
}
int is_current_pgrp_orphaned(void)
{
int retval;
read_lock(&tasklist_lock);
retval = will_become_orphaned_pgrp(task_pgrp(current), NULL);
read_unlock(&tasklist_lock);
return retval;
}
static bool has_stopped_jobs(struct pid *pgrp)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return true;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return false;
}
/*
* Check to see if any process groups have become orphaned as
* a result of our exiting, and if they have any stopped jobs,
* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{
struct pid *pgrp = task_pgrp(tsk);
struct task_struct *ignored_task = tsk;
if (!parent)
/* exit: our father is in a different pgrp than
* we are and we were the only connection outside.
*/
parent = tsk->real_parent;
else
/* reparent: our child is in a different pgrp than
* we are, and it was the only connection outside.
*/
ignored_task = NULL;
if (task_pgrp(parent) != pgrp &&
task_session(parent) == task_session(tsk) &&
will_become_orphaned_pgrp(pgrp, ignored_task) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
#ifdef CONFIG_MEMCG
/*
* A task is exiting. If it owned this mm, find a new owner for the mm.
*/
void mm_update_next_owner(struct mm_struct *mm)
{
struct task_struct *c, *g, *p = current;
retry:
/*
* If the exiting or execing task is not the owner, it's
* someone else's problem.
*/
if (mm->owner != p)
return;
/*
* The current owner is exiting/execing and there are no other
* candidates. Do not leave the mm pointing to a possibly
* freed task structure.
*/
if (atomic_read(&mm->mm_users) <= 1) {
mm->owner = NULL;
return;
}
read_lock(&tasklist_lock);
/*
* Search in the children
*/
list_for_each_entry(c, &p->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search in the siblings
*/
list_for_each_entry(c, &p->real_parent->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search through everything else, we should not get here often.
*/
for_each_process(g) {
if (g->flags & PF_KTHREAD)
continue;
for_each_thread(g, c) {
if (c->mm == mm)
goto assign_new_owner;
if (c->mm)
break;
}
}
read_unlock(&tasklist_lock);
/*
* We found no owner yet mm_users > 1: this implies that we are
* most likely racing with swapoff (try_to_unuse()) or /proc or
* ptrace or page migration (get_task_mm()). Mark owner as NULL.
*/
mm->owner = NULL;
return;
assign_new_owner:
BUG_ON(c == p);
get_task_struct(c);
/*
* The task_lock protects c->mm from changing.
* We always want mm->owner->mm == mm
*/
task_lock(c);
/*
* Delay read_unlock() till we have the task_lock()
* to ensure that c does not slip away underneath us
*/
read_unlock(&tasklist_lock);
if (c->mm != mm) {
task_unlock(c);
put_task_struct(c);
goto retry;
}
mm->owner = c;
task_unlock(c);
put_task_struct(c);
}
#endif /* CONFIG_MEMCG */
/*
* Turn us into a lazy TLB process if we
* aren't already..
*/
static void exit_mm(void)
{
struct mm_struct *mm = current->mm;
struct core_state *core_state;
mm_release(current, mm);
if (!mm)
return;
sync_mm_rss(mm);
/*
* Serialize with any possible pending coredump.
* We must hold mmap_sem around checking core_state
* and clearing tsk->mm. The core-inducing thread
* will increment ->nr_threads for each thread in the
* group with ->mm != NULL.
*/
down_read(&mm->mmap_sem);
core_state = mm->core_state;
if (core_state) {
struct core_thread self;
up_read(&mm->mmap_sem);
self.task = current;
self.next = xchg(&core_state->dumper.next, &self);
/*
* Implies mb(), the result of xchg() must be visible
* to core_state->dumper.
*/
if (atomic_dec_and_test(&core_state->nr_threads))
complete(&core_state->startup);
for (;;) {
set_current_state(TASK_UNINTERRUPTIBLE);
if (!self.task) /* see coredump_finish() */
break;
freezable_schedule();
}
__set_current_state(TASK_RUNNING);
down_read(&mm->mmap_sem);
}
mmgrab(mm);
BUG_ON(mm != current->active_mm);
/* more a memory barrier than a real lock */
task_lock(current);
current->mm = NULL;
up_read(&mm->mmap_sem);
enter_lazy_tlb(mm, current);
task_unlock(current);
mm_update_next_owner(mm);
mmput(mm);
if (test_thread_flag(TIF_MEMDIE))
exit_oom_victim();
}
static struct task_struct *find_alive_thread(struct task_struct *p)
{
struct task_struct *t;
for_each_thread(p, t) {
if (!(t->flags & PF_EXITING))
return t;
}
return NULL;
}
static struct task_struct *find_child_reaper(struct task_struct *father)
__releases(&tasklist_lock)
__acquires(&tasklist_lock)
{
struct pid_namespace *pid_ns = task_active_pid_ns(father);
struct task_struct *reaper = pid_ns->child_reaper;
if (likely(reaper != father))
return reaper;
reaper = find_alive_thread(father);
if (reaper) {
pid_ns->child_reaper = reaper;
return reaper;
}
write_unlock_irq(&tasklist_lock);
if (unlikely(pid_ns == &init_pid_ns)) {
panic("Attempted to kill init! exitcode=0x%08x\n",
father->signal->group_exit_code ?: father->exit_code);
}
zap_pid_ns_processes(pid_ns);
write_lock_irq(&tasklist_lock);
return father;
}
/*
* When we die, we re-parent all our children, and try to:
* 1. give them to another thread in our thread group, if such a member exists
* 2. give it to the first ancestor process which prctl'd itself as a
* child_subreaper for its children (like a service manager)
* 3. give it to the init process (PID 1) in our pid namespace
*/
static struct task_struct *find_new_reaper(struct task_struct *father,
struct task_struct *child_reaper)
{
struct task_struct *thread, *reaper;
thread = find_alive_thread(father);
if (thread)
return thread;
if (father->signal->has_child_subreaper) {
unsigned int ns_level = task_pid(father)->level;
/*
* Find the first ->is_child_subreaper ancestor in our pid_ns.
* We can't check reaper != child_reaper to ensure we do not
* cross the namespaces, the exiting parent could be injected
* by setns() + fork().
* We check pid->level, this is slightly more efficient than
* task_active_pid_ns(reaper) != task_active_pid_ns(father).
*/
for (reaper = father->real_parent;
task_pid(reaper)->level == ns_level;
reaper = reaper->real_parent) {
if (reaper == &init_task)
break;
if (!reaper->signal->is_child_subreaper)
continue;
thread = find_alive_thread(reaper);
if (thread)
return thread;
}
}
return child_reaper;
}
/*
* Any that need to be release_task'd are put on the @dead list.
*/
static void reparent_leader(struct task_struct *father, struct task_struct *p,
struct list_head *dead)
{
if (unlikely(p->exit_state == EXIT_DEAD))
return;
/* We don't want people slaying init. */
p->exit_signal = SIGCHLD;
/* If it has exited notify the new parent about this child's death. */
if (!p->ptrace &&
p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) {
if (do_notify_parent(p, p->exit_signal)) {
p->exit_state = EXIT_DEAD;
list_add(&p->ptrace_entry, dead);
}
}
kill_orphaned_pgrp(p, father);
}
/*
* This does two things:
*
* A. Make init inherit all the child processes
* B. Check to see if any process groups have become orphaned
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void forget_original_parent(struct task_struct *father,
struct list_head *dead)
{
struct task_struct *p, *t, *reaper;
if (unlikely(!list_empty(&father->ptraced)))
exit_ptrace(father, dead);
/* Can drop and reacquire tasklist_lock */
reaper = find_child_reaper(father);
if (list_empty(&father->children))
return;
reaper = find_new_reaper(father, reaper);
list_for_each_entry(p, &father->children, sibling) {
for_each_thread(p, t) {
t->real_parent = reaper;
BUG_ON((!t->ptrace) != (t->parent == father));
if (likely(!t->ptrace))
t->parent = t->real_parent;
if (t->pdeath_signal)
group_send_sig_info(t->pdeath_signal,
SEND_SIG_NOINFO, t);
}
/*
* If this is a threaded reparent there is no need to
* notify anyone anything has happened.
*/
if (!same_thread_group(reaper, father))
reparent_leader(father, p, dead);
}
list_splice_tail_init(&father->children, &reaper->children);
}
/*
* Send signals to all our closest relatives so that they know
* to properly mourn us..
*/
static void exit_notify(struct task_struct *tsk, int group_dead)
{
bool autoreap;
struct task_struct *p, *n;
LIST_HEAD(dead);
write_lock_irq(&tasklist_lock);
forget_original_parent(tsk, &dead);
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);
if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) &&
!ptrace_reparented(tsk) ?
tsk->exit_signal : SIGCHLD;
autoreap = do_notify_parent(tsk, sig);
} else if (thread_group_leader(tsk)) {
autoreap = thread_group_empty(tsk) &&
do_notify_parent(tsk, tsk->exit_signal);
} else {
autoreap = true;
}
tsk->exit_state = autoreap ? EXIT_DEAD : EXIT_ZOMBIE;
if (tsk->exit_state == EXIT_DEAD)
list_add(&tsk->ptrace_entry, &dead);
/* mt-exec, de_thread() is waiting for group leader */
if (unlikely(tsk->signal->notify_count < 0))
wake_up_process(tsk->signal->group_exit_task);
write_unlock_irq(&tasklist_lock);
list_for_each_entry_safe(p, n, &dead, ptrace_entry) {
list_del_init(&p->ptrace_entry);
release_task(p);
}
}
#ifdef CONFIG_DEBUG_STACK_USAGE
static void check_stack_usage(void)
{
static DEFINE_SPINLOCK(low_water_lock);
static int lowest_to_date = THREAD_SIZE;
unsigned long free;
free = stack_not_used(current);
if (free >= lowest_to_date)
return;
spin_lock(&low_water_lock);
if (free < lowest_to_date) {
pr_info("%s (%d) used greatest stack depth: %lu bytes left\n",
current->comm, task_pid_nr(current), free);
lowest_to_date = free;
}
spin_unlock(&low_water_lock);
}
#else
static inline void check_stack_usage(void) {}
#endif
void __noreturn do_exit(long code)
{
struct task_struct *tsk = current;
int group_dead;
TASKS_RCU(int tasks_rcu_i);
profile_task_exit(tsk);
kcov_task_exit(tsk);
WARN_ON(blk_needs_flush_plug(tsk));
if (unlikely(in_interrupt()))
panic("Aiee, killing interrupt handler!");
if (unlikely(!tsk->pid))
panic("Attempted to kill the idle task!");
/*
* If do_exit is called because this processes oopsed, it's possible
* that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
* continuing. Amongst other possible reasons, this is to prevent
* mm_release()->clear_child_tid() from writing to a user-controlled
* kernel address.
*/
set_fs(USER_DS);
ptrace_event(PTRACE_EVENT_EXIT, code);
validate_creds_for_do_exit(tsk);
/*
* We're taking recursive faults here in do_exit. Safest is to just
* leave this task alone and wait for reboot.
*/
if (unlikely(tsk->flags & PF_EXITING)) {
pr_alert("Fixing recursive fault but reboot is needed!\n");
/*
* We can do this unlocked here. The futex code uses
* this flag just to verify whether the pi state
* cleanup has been done or not. In the worst case it
* loops once more. We pretend that the cleanup was
* done as there is no way to return. Either the
* OWNER_DIED bit is set by now or we push the blocked
* task into the wait for ever nirwana as well.
*/
tsk->flags |= PF_EXITPIDONE;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}
exit_signals(tsk); /* sets PF_EXITING */
/*
* Ensure that all new tsk->pi_lock acquisitions must observe
* PF_EXITING. Serializes against futex.c:attach_to_pi_owner().
*/
smp_mb();
/*
* Ensure that we must observe the pi_state in exit_mm() ->
* mm_release() -> exit_pi_state_list().
*/
raw_spin_unlock_wait(&tsk->pi_lock);
if (unlikely(in_atomic())) {
pr_info("note: %s[%d] exited with preempt_count %d\n",
current->comm, task_pid_nr(current),
preempt_count());
preempt_count_set(PREEMPT_ENABLED);
}
/* sync mm's RSS info before statistics gathering */
if (tsk->mm)
sync_mm_rss(tsk->mm);
acct_update_integrals(tsk);
group_dead = atomic_dec_and_test(&tsk->signal->live);
if (group_dead) {
#ifdef CONFIG_POSIX_TIMERS
hrtimer_cancel(&tsk->signal->real_timer);
exit_itimers(tsk->signal);
#endif
if (tsk->mm)
setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);
}
acct_collect(code, group_dead);
if (group_dead)
tty_audit_exit();
audit_free(tsk);
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
exit_mm();
if (group_dead)
acct_process();
trace_sched_process_exit(tsk);
exit_sem(tsk);
exit_shm(tsk);
exit_files(tsk);
exit_fs(tsk);
if (group_dead)
disassociate_ctty(1);
exit_task_namespaces(tsk);
exit_task_work(tsk);
exit_thread(tsk);
/*
* Flush inherited counters to the parent - before the parent
* gets woken up by child-exit notifications.
*
* because of cgroup mode, must be called before cgroup_exit()
*/
perf_event_exit_task(tsk);
sched_autogroup_exit_task(tsk);
cgroup_exit(tsk);
/*
* FIXME: do that only when needed, using sched_exit tracepoint
*/
flush_ptrace_hw_breakpoint(tsk);
TASKS_RCU(preempt_disable());
TASKS_RCU(tasks_rcu_i = __srcu_read_lock(&tasks_rcu_exit_srcu));
TASKS_RCU(preempt_enable());
exit_notify(tsk, group_dead);
proc_exit_connector(tsk);
mpol_put_task_policy(tsk);
#ifdef CONFIG_FUTEX
if (unlikely(current->pi_state_cache))
kfree(current->pi_state_cache);
#endif
/*
* Make sure we are holding no locks:
*/
debug_check_no_locks_held();
/*
* We can do this unlocked here. The futex code uses this flag
* just to verify whether the pi state cleanup has been done
* or not. In the worst case it loops once more.
*/
tsk->flags |= PF_EXITPIDONE;
if (tsk->io_context)
exit_io_context(tsk);
if (tsk->splice_pipe)
free_pipe_info(tsk->splice_pipe);
if (tsk->task_frag.page)
put_page(tsk->task_frag.page);
validate_creds_for_do_exit(tsk);
check_stack_usage();
preempt_disable();
if (tsk->nr_dirtied)
__this_cpu_add(dirty_throttle_leaks, tsk->nr_dirtied);
exit_rcu();
TASKS_RCU(__srcu_read_unlock(&tasks_rcu_exit_srcu, tasks_rcu_i));
do_task_dead();
}
EXPORT_SYMBOL_GPL(do_exit);
void complete_and_exit(struct completion *comp, long code)
{
if (comp)
complete(comp);
do_exit(code);
}
EXPORT_SYMBOL(complete_and_exit);
SYSCALL_DEFINE1(exit, int, error_code)
{
do_exit((error_code&0xff)<<8);
}
/*
* Take down every thread in the group. This is called by fatal signals
* as well as by sys_exit_group (below).
*/
void
do_group_exit(int exit_code)
{
struct signal_struct *sig = current->signal;
BUG_ON(exit_code & 0x80); /* core dumps don't get here */
if (signal_group_exit(sig))
exit_code = sig->group_exit_code;
else if (!thread_group_empty(current)) {
struct sighand_struct *const sighand = current->sighand;
spin_lock_irq(&sighand->siglock);
if (signal_group_exit(sig))
/* Another thread got here before we took the lock. */
exit_code = sig->group_exit_code;
else {
sig->group_exit_code = exit_code;
sig->flags = SIGNAL_GROUP_EXIT;
zap_other_threads(current);
}
spin_unlock_irq(&sighand->siglock);
}
do_exit(exit_code);
/* NOTREACHED */
}
/*
* this kills every thread in the thread group. Note that any externally
* wait4()-ing process will get the correct exit code - even if this
* thread is not the thread group leader.
*/
SYSCALL_DEFINE1(exit_group, int, error_code)
{
do_group_exit((error_code & 0xff) << 8);
/* NOTREACHED */
return 0;
}
struct wait_opts {
enum pid_type wo_type;
int wo_flags;
struct pid *wo_pid;
struct siginfo __user *wo_info;
int __user *wo_stat;
struct rusage __user *wo_rusage;
wait_queue_t child_wait;
int notask_error;
};
static inline
struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
{
if (type != PIDTYPE_PID)
task = task->group_leader;
return task->pids[type].pid;
}
static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
{
return wo->wo_type == PIDTYPE_MAX ||
task_pid_type(p, wo->wo_type) == wo->wo_pid;
}
static int
eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p)
{
if (!eligible_pid(wo, p))
return 0;
/*
* Wait for all children (clone and not) if __WALL is set or
* if it is traced by us.
*/
if (ptrace || (wo->wo_flags & __WALL))
return 1;
/*
* Otherwise, wait for clone children *only* if __WCLONE is set;
* otherwise, wait for non-clone children *only*.
*
* Note: a "clone" child here is one that reports to its parent
* using a signal other than SIGCHLD, or a non-leader thread which
* we can only see if it is traced by us.
*/
if ((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
return 0;
return 1;
}
static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
pid_t pid, uid_t uid, int why, int status)
{
struct siginfo __user *infop;
int retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
infop = wo->wo_info;
if (infop) {
if (!retval)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval)
retval = put_user(0, &infop->si_errno);
if (!retval)
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(pid, &infop->si_pid);
if (!retval)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval)
retval = pid;
return retval;
}
/*
* Handle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
{
int state, retval, status;
pid_t pid = task_pid_vnr(p);
uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
struct siginfo __user *infop;
if (!likely(wo->wo_flags & WEXITED))
return 0;
if (unlikely(wo->wo_flags & WNOWAIT)) {
int exit_code = p->exit_code;
int why;
get_task_struct(p);
read_unlock(&tasklist_lock);
sched_annotate_sleep();
if ((exit_code & 0x7f) == 0) {
why = CLD_EXITED;
status = exit_code >> 8;
} else {
why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED;
status = exit_code & 0x7f;
}
return wait_noreap_copyout(wo, p, pid, uid, why, status);
}
/*
* Move the task's state to DEAD/TRACE, only one thread can do this.
*/
state = (ptrace_reparented(p) && thread_group_leader(p)) ?
EXIT_TRACE : EXIT_DEAD;
if (cmpxchg(&p->exit_state, EXIT_ZOMBIE, state) != EXIT_ZOMBIE)
return 0;
/*
* We own this thread, nobody else can reap it.
*/
read_unlock(&tasklist_lock);
sched_annotate_sleep();
/*
* Check thread_group_leader() to exclude the traced sub-threads.
*/
if (state == EXIT_DEAD && thread_group_leader(p)) {
struct signal_struct *sig = p->signal;
struct signal_struct *psig = current->signal;
unsigned long maxrss;
u64 tgutime, tgstime;
/*
* The resource counters for the group leader are in its
* own task_struct. Those for dead threads in the group
* are in its signal_struct, as are those for the child
* processes it has previously reaped. All these
* accumulate in the parent's signal_struct c* fields.
*
* We don't bother to take a lock here to protect these
* p->signal fields because the whole thread group is dead
* and nobody can change them.
*
* psig->stats_lock also protects us from our sub-theads
* which can reap other children at the same time. Until
* we change k_getrusage()-like users to rely on this lock
* we have to take ->siglock as well.
*
* We use thread_group_cputime_adjusted() to get times for
* the thread group, which consolidates times for all threads
* in the group including the group leader.
*/
thread_group_cputime_adjusted(p, &tgutime, &tgstime);
spin_lock_irq(¤t->sighand->siglock);
write_seqlock(&psig->stats_lock);
psig->cutime += tgutime + sig->cutime;
psig->cstime += tgstime + sig->cstime;
psig->cgtime += task_gtime(p) + sig->gtime + sig->cgtime;
psig->cmin_flt +=
p->min_flt + sig->min_flt + sig->cmin_flt;
psig->cmaj_flt +=
p->maj_flt + sig->maj_flt + sig->cmaj_flt;
psig->cnvcsw +=
p->nvcsw + sig->nvcsw + sig->cnvcsw;
psig->cnivcsw +=
p->nivcsw + sig->nivcsw + sig->cnivcsw;
psig->cinblock +=
task_io_get_inblock(p) +
sig->inblock + sig->cinblock;
psig->coublock +=
task_io_get_oublock(p) +
sig->oublock + sig->coublock;
maxrss = max(sig->maxrss, sig->cmaxrss);
if (psig->cmaxrss < maxrss)
psig->cmaxrss = maxrss;
task_io_accounting_add(&psig->ioac, &p->ioac);
task_io_accounting_add(&psig->ioac, &sig->ioac);
write_sequnlock(&psig->stats_lock);
spin_unlock_irq(¤t->sighand->siglock);
}
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
status = (p->signal->flags & SIGNAL_GROUP_EXIT)
? p->signal->group_exit_code : p->exit_code;
if (!retval && wo->wo_stat)
retval = put_user(status, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop) {
int why;
if ((status & 0x7f) == 0) {
why = CLD_EXITED;
status >>= 8;
} else {
why = (status & 0x80) ? CLD_DUMPED : CLD_KILLED;
status &= 0x7f;
}
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
if (state == EXIT_TRACE) {
write_lock_irq(&tasklist_lock);
/* We dropped tasklist, ptracer could die and untrace */
ptrace_unlink(p);
/* If parent wants a zombie, don't release it now */
state = EXIT_ZOMBIE;
if (do_notify_parent(p, p->exit_signal))
state = EXIT_DEAD;
p->exit_state = state;
write_unlock_irq(&tasklist_lock);
}
if (state == EXIT_DEAD)
release_task(p);
return retval;
}
static int *task_stopped_code(struct task_struct *p, bool ptrace)
{
if (ptrace) {
if (task_is_traced(p) && !(p->jobctl & JOBCTL_LISTENING))
return &p->exit_code;
} else {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return &p->signal->group_exit_code;
}
return NULL;
}
/**
* wait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED
* @wo: wait options
* @ptrace: is the wait for ptrace
* @p: task to wait for
*
* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED.
*
* CONTEXT:
* read_lock(&tasklist_lock), which is released if return value is
* non-zero. Also, grabs and releases @p->sighand->siglock.
*
* RETURNS:
* 0 if wait condition didn't exist and search for other wait conditions
* should continue. Non-zero return, -errno on failure and @p's pid on
* success, implies that tasklist_lock is released and wait condition
* search should terminate.
*/
static int wait_task_stopped(struct wait_opts *wo,
int ptrace, struct task_struct *p)
{
struct siginfo __user *infop;
int retval, exit_code, *p_code, why;
uid_t uid = 0; /* unneeded, required by compiler */
pid_t pid;
/*
* Traditionally we see ptrace'd stopped tasks regardless of options.
*/
if (!ptrace && !(wo->wo_flags & WUNTRACED))
return 0;
if (!task_stopped_code(p, ptrace))
return 0;
exit_code = 0;
spin_lock_irq(&p->sighand->siglock);
p_code = task_stopped_code(p, ptrace);
if (unlikely(!p_code))
goto unlock_sig;
exit_code = *p_code;
if (!exit_code)
goto unlock_sig;
if (!unlikely(wo->wo_flags & WNOWAIT))
*p_code = 0;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
unlock_sig:
spin_unlock_irq(&p->sighand->siglock);
if (!exit_code)
return 0;
/*
* Now we are pretty sure this task is interesting.
* Make sure it doesn't get reaped out from under us while we
* give up the lock and then examine it below. We don't want to
* keep holding onto the tasklist_lock while we call getrusage and
* possibly take page faults for user memory.
*/
get_task_struct(p);
pid = task_pid_vnr(p);
why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
read_unlock(&tasklist_lock);
sched_annotate_sleep();
if (unlikely(wo->wo_flags & WNOWAIT))
return wait_noreap_copyout(wo, p, pid, uid, why, exit_code);
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
if (!retval && wo->wo_stat)
retval = put_user((exit_code << 8) | 0x7f, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop)
retval = put_user((short)why, &infop->si_code);
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
put_task_struct(p);
BUG_ON(!retval);
return retval;
}
/*
* Handle do_wait work for one task in a live, non-stopped state.
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
{
int retval;
pid_t pid;
uid_t uid;
if (!unlikely(wo->wo_flags & WCONTINUED))
return 0;
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
return 0;
spin_lock_irq(&p->sighand->siglock);
/* Re-check with the lock held. */
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) {
spin_unlock_irq(&p->sighand->siglock);
return 0;
}
if (!unlikely(wo->wo_flags & WNOWAIT))
p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
spin_unlock_irq(&p->sighand->siglock);
pid = task_pid_vnr(p);
get_task_struct(p);
read_unlock(&tasklist_lock);
sched_annotate_sleep();
if (!wo->wo_info) {
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
if (!retval && wo->wo_stat)
retval = put_user(0xffff, wo->wo_stat);
if (!retval)
retval = pid;
} else {
retval = wait_noreap_copyout(wo, p, pid, uid,
CLD_CONTINUED, SIGCONT);
BUG_ON(retval == 0);
}
return retval;
}
/*
* Consider @p for a wait by @parent.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue;
* then ->notask_error is 0 if @p is an eligible child,
* or still -ECHILD.
*/
static int wait_consider_task(struct wait_opts *wo, int ptrace,
struct task_struct *p)
{
/*
* We can race with wait_task_zombie() from another thread.
* Ensure that EXIT_ZOMBIE -> EXIT_DEAD/EXIT_TRACE transition
* can't confuse the checks below.
*/
int exit_state = ACCESS_ONCE(p->exit_state);
int ret;
if (unlikely(exit_state == EXIT_DEAD))
return 0;
ret = eligible_child(wo, ptrace, p);
if (!ret)
return ret;
if (unlikely(exit_state == EXIT_TRACE)) {
/*
* ptrace == 0 means we are the natural parent. In this case
* we should clear notask_error, debugger will notify us.
*/
if (likely(!ptrace))
wo->notask_error = 0;
return 0;
}
if (likely(!ptrace) && unlikely(p->ptrace)) {
/*
* If it is traced by its real parent's group, just pretend
* the caller is ptrace_do_wait() and reap this child if it
* is zombie.
*
* This also hides group stop state from real parent; otherwise
* a single stop can be reported twice as group and ptrace stop.
* If a ptracer wants to distinguish these two events for its
* own children it should create a separate process which takes
* the role of real parent.
*/
if (!ptrace_reparented(p))
ptrace = 1;
}
/* slay zombie? */
if (exit_state == EXIT_ZOMBIE) {
/* we don't reap group leaders with subthreads */
if (!delay_group_leader(p)) {
/*
* A zombie ptracee is only visible to its ptracer.
* Notification and reaping will be cascaded to the
* real parent when the ptracer detaches.
*/
if (unlikely(ptrace) || likely(!p->ptrace))
return wait_task_zombie(wo, p);
}
/*
* Allow access to stopped/continued state via zombie by
* falling through. Clearing of notask_error is complex.
*
* When !@ptrace:
*
* If WEXITED is set, notask_error should naturally be
* cleared. If not, subset of WSTOPPED|WCONTINUED is set,
* so, if there are live subthreads, there are events to
* wait for. If all subthreads are dead, it's still safe
* to clear - this function will be called again in finite
* amount time once all the subthreads are released and
* will then return without clearing.
*
* When @ptrace:
*
* Stopped state is per-task and thus can't change once the
* target task dies. Only continued and exited can happen.
* Clear notask_error if WCONTINUED | WEXITED.
*/
if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED)))
wo->notask_error = 0;
} else {
/*
* @p is alive and it's gonna stop, continue or exit, so
* there always is something to wait for.
*/
wo->notask_error = 0;
}
/*
* Wait for stopped. Depending on @ptrace, different stopped state
* is used and the two don't interact with each other.
*/
ret = wait_task_stopped(wo, ptrace, p);
if (ret)
return ret;
/*
* Wait for continued. There's only one continued state and the
* ptracer can consume it which can confuse the real parent. Don't
* use WCONTINUED from ptracer. You don't need or want it.
*/
return wait_task_continued(wo, p);
}
/*
* Do the work of do_wait() for one thread in the group, @tsk.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue; then
* ->notask_error is 0 if there were any eligible children,
* or still -ECHILD.
*/
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->children, sibling) {
int ret = wait_consider_task(wo, 0, p);
if (ret)
return ret;
}
return 0;
}
static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->ptraced, ptrace_entry) {
int ret = wait_consider_task(wo, 1, p);
if (ret)
return ret;
}
return 0;
}
static int child_wait_callback(wait_queue_t *wait, unsigned mode,
int sync, void *key)
{
struct wait_opts *wo = container_of(wait, struct wait_opts,
child_wait);
struct task_struct *p = key;
if (!eligible_pid(wo, p))
return 0;
if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
return 0;
return default_wake_function(wait, mode, sync, key);
}
void __wake_up_parent(struct task_struct *p, struct task_struct *parent)
{
__wake_up_sync_key(&parent->signal->wait_chldexit,
TASK_INTERRUPTIBLE, 1, p);
}
static long do_wait(struct wait_opts *wo)
{
struct task_struct *tsk;
int retval;
trace_sched_process_wait(wo->wo_pid);
init_waitqueue_func_entry(&wo->child_wait, child_wait_callback);
wo->child_wait.private = current;
add_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
repeat:
/*
* If there is nothing that can match our criteria, just get out.
* We will clear ->notask_error to zero if we see any child that
* might later match our criteria, even if we are not able to reap
* it yet.
*/
wo->notask_error = -ECHILD;
if ((wo->wo_type < PIDTYPE_MAX) &&
(!wo->wo_pid || hlist_empty(&wo->wo_pid->tasks[wo->wo_type])))
goto notask;
set_current_state(TASK_INTERRUPTIBLE);
read_lock(&tasklist_lock);
tsk = current;
do {
retval = do_wait_thread(wo, tsk);
if (retval)
goto end;
retval = ptrace_do_wait(wo, tsk);
if (retval)
goto end;
if (wo->wo_flags & __WNOTHREAD)
break;
} while_each_thread(current, tsk);
read_unlock(&tasklist_lock);
notask:
retval = wo->notask_error;
if (!retval && !(wo->wo_flags & WNOHANG)) {
retval = -ERESTARTSYS;
if (!signal_pending(current)) {
schedule();
goto repeat;
}
}
end:
__set_current_state(TASK_RUNNING);
remove_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
return retval;
}
SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
infop, int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED|
__WNOTHREAD|__WCLONE|__WALL))
return -EINVAL;
if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
return -EINVAL;
switch (which) {
case P_ALL:
type = PIDTYPE_MAX;
break;
case P_PID:
type = PIDTYPE_PID;
if (upid <= 0)
return -EINVAL;
break;
case P_PGID:
type = PIDTYPE_PGID;
if (upid <= 0)
return -EINVAL;
break;
default:
return -EINVAL;
}
if (type < PIDTYPE_MAX)
pid = find_get_pid(upid);
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options;
wo.wo_info = infop;
wo.wo_stat = NULL;
wo.wo_rusage = ru;
ret = do_wait(&wo);
if (ret > 0) {
ret = 0;
} else if (infop) {
/*
* For a WNOHANG return, clear out all the fields
* we would set so the user can easily tell the
* difference.
*/
if (!ret)
ret = put_user(0, &infop->si_signo);
if (!ret)
ret = put_user(0, &infop->si_errno);
if (!ret)
ret = put_user(0, &infop->si_code);
if (!ret)
ret = put_user(0, &infop->si_pid);
if (!ret)
ret = put_user(0, &infop->si_uid);
if (!ret)
ret = put_user(0, &infop->si_status);
}
put_pid(pid);
return ret;
}
SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WUNTRACED|WCONTINUED|
__WNOTHREAD|__WCLONE|__WALL))
return -EINVAL;
if (upid == -1)
type = PIDTYPE_MAX;
else if (upid < 0) {
type = PIDTYPE_PGID;
pid = find_get_pid(-upid);
} else if (upid == 0) {
type = PIDTYPE_PGID;
pid = get_task_pid(current, PIDTYPE_PGID);
} else /* upid > 0 */ {
type = PIDTYPE_PID;
pid = find_get_pid(upid);
}
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options | WEXITED;
wo.wo_info = NULL;
wo.wo_stat = stat_addr;
wo.wo_rusage = ru;
ret = do_wait(&wo);
put_pid(pid);
return ret;
}
#ifdef __ARCH_WANT_SYS_WAITPID
/*
* sys_waitpid() remains for compatibility. waitpid() should be
* implemented by calling sys_wait4() from libc.a.
*/
SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options)
{
return sys_wait4(pid, stat_addr, options, NULL);
}
#endif | {
"url": "https://kernel.suse.com/cgit/kernel/tree/kernel/exit.c?h=v4.12.4",
"source_domain": "kernel.suse.com",
"snapshot_id": "crawl=CC-MAIN-2019-39",
"warc_metadata": {
"Content-Length": "115757",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:O255MBUCL2SYBJCZ3U4F52WTRRB5QFAN",
"WARC-Concurrent-To": "<urn:uuid:4740c252-0b93-4267-8d60-c141dfd25a24>",
"WARC-Date": "2019-09-17T08:32:36Z",
"WARC-IP-Address": "195.135.221.167",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:AEAMDORB6PGML27HNQPXHWF6QELQAV4C",
"WARC-Record-ID": "<urn:uuid:ce1a7914-cc79-4845-947b-0cb5bc447c33>",
"WARC-Target-URI": "https://kernel.suse.com/cgit/kernel/tree/kernel/exit.c?h=v4.12.4",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bd50d0d7-35f7-4d15-9df3-7a9434d365d7>"
},
"warc_info": "isPartOf: CC-MAIN-2019-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-27.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
23,
52,
107,
109,
111,
113,
115,
117,
119,
121,
123,
125,
128,
131,
134,
137,
140,
143,
146,
149,
152,
155,
158,
161,
164,
167,
170,
173,
176,
179,
182,
185,
188,
191,
194,
197,
200,
203,
206,
209,
212,
215,
218,
221,
224,
227,
230,
233,
236,
239,
242,
245,
248,
251,
254,
257,
260,
263,
266,
269,
272,
275,
278,
281,
284,
287,
290,
293,
296,
299,
302,
305,
308,
311,
314,
317,
320,
323,
326,
329,
332,
335,
338,
341,
344,
347,
350,
353,
356,
359,
362,
365,
368,
371,
374,
377,
380,
383,
386,
389,
392,
395,
399,
403,
407,
411,
415,
419,
423,
427,
431,
435,
439,
443,
447,
451,
455,
459,
463,
467,
471,
475,
479,
483,
487,
491,
495,
499,
503,
507,
511,
515,
519,
523,
527,
531,
535,
539,
543,
547,
551,
555,
559,
563,
567,
571,
575,
579,
583,
587,
591,
595,
599,
603,
607,
611,
615,
619,
623,
627,
631,
635,
639,
643,
647,
651,
655,
659,
663,
667,
671,
675,
679,
683,
687,
691,
695,
699,
703,
707,
711,
715,
719,
723,
727,
731,
735,
739,
743,
747,
751,
755,
759,
763,
767,
771,
775,
779,
783,
787,
791,
795,
799,
803,
807,
811,
815,
819,
823,
827,
831,
835,
839,
843,
847,
851,
855,
859,
863,
867,
871,
875,
879,
883,
887,
891,
895,
899,
903,
907,
911,
915,
919,
923,
927,
931,
935,
939,
943,
947,
951,
955,
959,
963,
967,
971,
975,
979,
983,
987,
991,
995,
999,
1003,
1007,
1011,
1015,
1019,
1023,
1027,
1031,
1035,
1039,
1043,
1047,
1051,
1055,
1059,
1063,
1067,
1071,
1075,
1079,
1083,
1087,
1091,
1095,
1099,
1103,
1107,
1111,
1115,
1119,
1123,
1127,
1131,
1135,
1139,
1143,
1147,
1151,
1155,
1159,
1163,
1167,
1171,
1175,
1179,
1183,
1187,
1191,
1195,
1199,
1203,
1207,
1211,
1215,
1219,
1223,
1227,
1231,
1235,
1239,
1243,
1247,
1251,
1255,
1259,
1263,
1267,
1271,
1275,
1279,
1283,
1287,
1291,
1295,
1299,
1303,
1307,
1311,
1315,
1319,
1323,
1327,
1331,
1335,
1339,
1343,
1347,
1351,
1355,
1359,
1363,
1367,
1371,
1375,
1379,
1383,
1387,
1391,
1395,
1399,
1403,
1407,
1411,
1415,
1419,
1423,
1427,
1431,
1435,
1439,
1443,
1447,
1451,
1455,
1459,
1463,
1467,
1471,
1475,
1479,
1483,
1487,
1491,
1495,
1499,
1503,
1507,
1511,
1515,
1519,
1523,
1527,
1531,
1535,
1539,
1543,
1547,
1551,
1555,
1559,
1563,
1567,
1571,
1575,
1579,
1583,
1587,
1591,
1595,
1599,
1603,
1607,
1611,
1615,
1619,
1623,
1627,
1631,
1635,
1639,
1643,
1647,
1651,
1655,
1659,
1663,
1667,
1671,
1675,
1679,
1683,
1687,
1691,
1695,
1699,
1703,
1707,
1711,
1715,
1719,
1723,
1727,
1731,
1735,
1739,
1743,
1747,
1751,
1755,
1759,
1763,
1767,
1771,
1775,
1779,
1783,
1787,
1791,
1795,
1799,
1803,
1807,
1811,
1815,
1819,
1823,
1827,
1831,
1835,
1839,
1843,
1847,
1851,
1855,
1859,
1863,
1867,
1871,
1875,
1879,
1883,
1887,
1891,
1895,
1899,
1903,
1907,
1911,
1915,
1919,
1923,
1927,
1931,
1935,
1939,
1943,
1947,
1951,
1955,
1959,
1963,
1967,
1971,
1975,
1979,
1983,
1987,
1991,
1995,
1999,
2003,
2007,
2011,
2015,
2019,
2023,
2027,
2031,
2035,
2039,
2043,
2047,
2051,
2055,
2059,
2063,
2067,
2071,
2075,
2079,
2083,
2087,
2091,
2095,
2099,
2103,
2107,
2111,
2115,
2119,
2123,
2127,
2131,
2135,
2139,
2143,
2147,
2151,
2155,
2159,
2163,
2167,
2171,
2175,
2179,
2183,
2187,
2191,
2195,
2199,
2203,
2207,
2211,
2215,
2219,
2223,
2227,
2231,
2235,
2239,
2243,
2247,
2251,
2255,
2259,
2263,
2267,
2271,
2275,
2279,
2283,
2287,
2291,
2295,
2299,
2303,
2307,
2311,
2315,
2319,
2323,
2327,
2331,
2335,
2339,
2343,
2347,
2351,
2355,
2359,
2363,
2367,
2371,
2375,
2379,
2383,
2387,
2391,
2395,
2399,
2403,
2407,
2411,
2415,
2419,
2423,
2427,
2431,
2435,
2439,
2443,
2447,
2451,
2455,
2459,
2463,
2467,
2471,
2475,
2479,
2483,
2487,
2491,
2495,
2499,
2503,
2507,
2511,
2515,
2519,
2523,
2527,
2531,
2535,
2539,
2543,
2547,
2551,
2555,
2559,
2563,
2567,
2571,
2575,
2579,
2583,
2587,
2591,
2595,
2599,
2603,
2607,
2611,
2615,
2619,
2623,
2627,
2631,
2635,
2639,
2643,
2647,
2651,
2655,
2659,
2663,
2667,
2671,
2675,
2679,
2683,
2687,
2691,
2695,
2699,
2703,
2707,
2711,
2715,
2719,
2723,
2727,
2731,
2735,
2739,
2743,
2747,
2751,
2755,
2759,
2763,
2767,
2771,
2775,
2779,
2783,
2787,
2791,
2795,
2799,
2803,
2807,
2811,
2815,
2819,
2823,
2827,
2831,
2835,
2839,
2843,
2847,
2851,
2855,
2859,
2863,
2867,
2871,
2875,
2879,
2883,
2887,
2891,
2895,
2899,
2903,
2907,
2911,
2915,
2919,
2923,
2927,
2931,
2935,
2939,
2943,
2947,
2951,
2955,
2959,
2963,
2967,
2971,
2975,
2979,
2983,
2987,
2991,
2995,
2999,
3003,
3007,
3011,
3015,
3019,
3023,
3027,
3031,
3035,
3039,
3043,
3047,
3051,
3055,
3059,
3063,
3067,
3071,
3075,
3079,
3083,
3087,
3091,
3095,
3099,
3103,
3107,
3111,
3115,
3119,
3123,
3127,
3131,
3135,
3139,
3143,
3147,
3151,
3155,
3159,
3163,
3167,
3171,
3175,
3179,
3183,
3187,
3191,
3195,
3199,
3203,
3207,
3211,
3215,
3219,
3223,
3227,
3231,
3235,
3239,
3243,
3247,
3251,
3255,
3259,
3263,
3267,
3271,
3275,
3279,
3283,
3287,
3291,
3295,
3299,
3303,
3307,
3311,
3315,
3319,
3323,
3327,
3331,
3335,
3339,
3343,
3347,
3351,
3355,
3359,
3363,
3367,
3371,
3375,
3379,
3383,
3387,
3391,
3395,
3399,
3403,
3407,
3411,
3415,
3419,
3423,
3427,
3431,
3435,
3439,
3443,
3447,
3451,
3455,
3459,
3463,
3467,
3471,
3475,
3479,
3483,
3487,
3491,
3495,
3499,
3503,
3507,
3511,
3515,
3519,
3523,
3527,
3531,
3535,
3539,
3543,
3547,
3551,
3555,
3559,
3563,
3567,
3571,
3575,
3579,
3583,
3587,
3591,
3595,
3599,
3603,
3607,
3611,
3615,
3619,
3623,
3627,
3631,
3635,
3639,
3643,
3647,
3651,
3655,
3659,
3663,
3667,
3671,
3675,
3679,
3683,
3687,
3691,
3695,
3699,
3703,
3707,
3711,
3715,
3719,
3723,
3727,
3731,
3735,
3739,
3743,
3747,
3751,
3755,
3759,
3763,
3767,
3771,
3775,
3779,
3783,
3787,
3791,
3795,
3799,
3803,
3807,
3811,
3815,
3819,
3823,
3827,
3831,
3835,
3839,
3843,
3847,
3851,
3855,
3859,
3863,
3867,
3871,
3875,
3879,
3883,
3887,
3891,
3895,
3899,
3903,
3907,
3911,
3915,
3919,
3923,
3927,
3931,
3935,
3939,
3943,
3947,
3951,
3955,
3959,
3963,
3967,
3971,
3975,
3979,
3983,
3987,
3991,
3995,
4000,
4005,
4010,
4015,
4020,
4025,
4030,
4035,
4040,
4045,
4050,
4055,
4060,
4065,
4070,
4075,
4080,
4085,
4090,
4095,
4100,
4105,
4110,
4115,
4120,
4125,
4130,
4135,
4140,
4145,
4150,
4155,
4160,
4165,
4170,
4175,
4180,
4185,
4190,
4195,
4200,
4205,
4210,
4215,
4220,
4225,
4230,
4235,
4240,
4245,
4250,
4255,
4260,
4265,
4270,
4275,
4280,
4285,
4290,
4295,
4300,
4305,
4310,
4315,
4320,
4325,
4330,
4335,
4340,
4345,
4350,
4355,
4360,
4365,
4370,
4375,
4380,
4385,
4390,
4395,
4400,
4405,
4410,
4415,
4420,
4425,
4430,
4435,
4440,
4445,
4450,
4455,
4460,
4465,
4470,
4475,
4480,
4485,
4490,
4495,
4500,
4505,
4510,
4515,
4520,
4525,
4530,
4535,
4540,
4545,
4550,
4555,
4560,
4565,
4570,
4575,
4580,
4585,
4590,
4595,
4600,
4605,
4610,
4615,
4620,
4625,
4630,
4635,
4640,
4645,
4650,
4655,
4660,
4665,
4670,
4675,
4680,
4685,
4690,
4695,
4700,
4705,
4710,
4715,
4720,
4725,
4730,
4735,
4740,
4745,
4750,
4755,
4760,
4765,
4770,
4775,
4780,
4785,
4790,
4795,
4800,
4805,
4810,
4815,
4820,
4825,
4830,
4835,
4840,
4845,
4850,
4855,
4860,
4865,
4870,
4875,
4880,
4885,
4890,
4895,
4900,
4905,
4910,
4915,
4920,
4925,
4930,
4935,
4940,
4945,
4950,
4955,
4960,
4965,
4970,
4975,
4980,
4985,
4990,
4995,
5000,
5005,
5010,
5015,
5020,
5025,
5030,
5035,
5040,
5045,
5050,
5055,
5060,
5065,
5070,
5075,
5080,
5085,
5090,
5095,
5100,
5105,
5110,
5115,
5120,
5125,
5130,
5135,
5140,
5145,
5150,
5155,
5160,
5165,
5170,
5175,
5180,
5185,
5190,
5195,
5200,
5205,
5210,
5215,
5220,
5225,
5230,
5235,
5240,
5245,
5250,
5255,
5260,
5265,
5270,
5275,
5280,
5285,
5290,
5295,
5300,
5305,
5310,
5315,
5320,
5325,
5330,
5335,
5340,
5345,
5350,
5355,
5360,
5365,
5370,
5375,
5380,
5385,
5390,
5395,
5400,
5405,
5410,
5415,
5420,
5425,
5430,
5435,
5440,
5445,
5450,
5455,
5460,
5465,
5470,
5475,
5480,
5485,
5490,
5495,
5500,
5505,
5510,
5515,
5520,
5525,
5530,
5535,
5540,
5545,
5550,
5555,
5560,
5565,
5570,
5575,
5580,
5585,
5590,
5595,
5600,
5605,
5610,
5615,
5620,
5625,
5630,
5635,
5640,
5645,
5650,
5655,
5660,
5665,
5670,
5675,
5680,
5685,
5690,
5695,
5700,
5705,
5710,
5715,
5720,
5725,
5730,
5735,
5740,
5745,
5750,
5755,
5760,
5765,
5770,
5775,
5780,
5785,
5790,
5795,
5800,
5805,
5810,
5815,
5820,
5825,
5830,
5835,
5840,
5845,
5850,
5855,
5860,
5865,
5870,
5875,
5880,
5885,
5890,
5895,
5900,
5905,
5910,
5915,
5920,
5925,
5930,
5935,
5940,
5945,
5950,
5955,
5960,
5965,
5970,
5975,
5980,
5985,
5990,
5995,
6000,
6005,
6010,
6015,
6020,
6025,
6030,
6035,
6040,
6045,
6050,
6055,
6060,
6065,
6070,
6075,
6080,
6085,
6090,
6095,
6100,
6105,
6110,
6115,
6120,
6125,
6130,
6135,
6140,
6145,
6150,
6155,
6160,
6165,
6170,
6175,
6180,
6185,
6190,
6195,
6200,
6205,
6210,
6215,
6220,
6225,
6230,
6235,
6240,
6245,
6250,
6255,
6260,
6265,
6270,
6275,
6280,
6285,
6290,
6295,
6300,
6305,
6310,
6315,
6320,
6325,
6330,
6335,
6340,
6345,
6350,
6355,
6360,
6365,
6370,
6375,
6380,
6385,
6390,
6395,
6400,
6405,
6410,
6415,
6420,
6425,
6430,
6435,
6440,
6445,
6450,
6455,
6460,
6465,
6470,
6475,
6480,
6485,
6490,
6495,
6500,
6505,
6510,
6515,
6520,
6525,
6530,
6535,
6540,
6545,
6550,
6555,
6560,
6565,
6570,
6575,
6580,
6585,
6590,
6595,
6600,
6605,
6610,
6615,
6620,
6625,
6630,
6635,
6640,
6645,
6650,
6655,
6660,
6665,
6670,
6675,
6680,
6685,
6690,
6695,
6700,
6705,
6710,
6715,
6720,
6725,
6730,
6735,
6740,
6745,
6750,
6755,
6760,
6765,
6770,
6775,
6780,
6785,
6790,
6795,
6800,
6805,
6810,
6815,
6820,
6825,
6830,
6835,
6840,
6845,
6850,
6855,
6860,
6865,
6870,
6875,
6880,
6885,
6890,
6895,
6900,
6905,
6910,
6915,
6920,
6925,
6930,
6935,
6940,
6945,
6950,
6955,
6960,
6965,
6970,
6975,
6980,
6985,
6990,
6995,
7000,
7005,
7010,
7015,
7020,
7025,
7030,
7035,
7040,
7045,
7050,
7055,
7060,
7065,
7070,
7075,
7080,
7085,
7090,
7095,
7100,
7105,
7110,
7115,
7120,
7125,
7130,
7135,
7140,
7145,
7150,
7155,
7160,
7165,
7170,
7175,
7180,
7185,
7190,
7195,
7200,
7205,
7210,
7215,
7220,
7225,
7230,
7235,
7240,
7245,
7250,
7255,
7260,
7265,
7270,
7275,
7280,
7285,
7290,
7295,
7300,
7305,
7310,
7315,
7320,
7325,
7330,
7335,
7340,
7345,
7350,
7355,
7360,
7365,
7370,
7375,
7380,
7385,
7390,
7395,
7400,
7405,
7410,
7415,
7420,
7425,
7430,
7435,
7440,
7445,
7450,
7455,
7460,
7465,
7470,
7475,
7480,
7485,
7490,
7495,
7500,
7505,
7510,
7515,
7520,
7525,
7530,
7535,
7540,
7545,
7550,
7555,
7560,
7565,
7570,
7575,
7580,
7585,
7590,
7595,
7600,
7605,
7610,
7615,
7620,
7625,
7630,
7635,
7640,
7645,
7650,
7655,
7660,
7665,
7670,
7675,
7680,
7685,
7688,
7712,
7715,
7760,
7764,
7765,
7787,
7811,
7846,
7874,
7904,
7934,
7970,
8003,
8032,
8058,
8088,
8118,
8149,
8172,
8201,
8224,
8247,
8271,
8302,
8326,
8353,
8380,
8407,
8434,
8467,
8493,
8520,
8545,
8572,
8599,
8628,
8662,
8691,
8717,
8745,
8771,
8803,
8830,
8855,
8880,
8909,
8957,
8985,
9011,
9053,
9082,
9111,
9144,
9173,
9203,
9235,
9268,
9291,
9320,
9343,
9367,
9393,
9420,
9421,
9448,
9472,
9497,
9526,
9527,
9596,
9598,
9613,
9642,
9661,
9692,
9722,
9723,
9750,
9780,
9814,
9817,
9850,
9882,
9884,
9885,
9888,
9945,
9949,
10000,
10002,
10044,
10089,
10122,
10166,
10185,
10186,
10233,
10272,
10303,
10304,
10331,
10360,
10379,
10415,
10425,
10430,
10486,
10542,
10595,
10601,
10644,
10681,
10684,
10691,
10692,
10711,
10729,
10748,
10758,
10763,
10816,
10837,
10843,
10896,
10938,
10939,
10970,
11010,
11013,
11014,
11078,
11116,
11117,
11121,
11192,
11264,
11336,
11374,
11379,
11415,
11449,
11471,
11493,
11525,
11556,
11587,
11614,
11643,
11686,
11729,
11778,
11831,
11851,
11887,
11923,
11924,
11928,
11989,
12053,
12058,
12090,
12112,
12145,
12146,
12175,
12220,
12239,
12279,
12300,
12303,
12305,
12306,
12364,
12366,
12437,
12438,
12468,
12500,
12523,
12525,
12526,
12527,
12568,
12570,
12599,
12616,
12624,
12694,
12765,
12783,
12830,
12850,
12851,
12872,
12873,
12906,
12931,
12950,
12951,
12955,
13010,
13063,
13126,
13131,
13148,
13175,
13222,
13265,
13270,
13327,
13389,
13445,
13451,
13513,
13531,
13566,
13569,
13570,
13605,
13625,
13670,
13671,
13684,
13711,
13726,
13728,
13729,
13732,
13806,
13882,
13886,
13955,
13957,
13990,
14017,
14018,
14022,
14088,
14156,
14218,
14275,
14280,
14287,
14320,
14332,
14347,
14348,
14396,
14397,
14401,
14473,
14540,
14553,
14558,
14570,
14612,
14626,
14627,
14631,
14701,
14712,
14716,
14780,
14831,
14835,
14906,
14964,
14988,
14992,
15059,
15075,
15079,
15151,
15223,
15276,
15280,
15350,
15422,
15446,
15450,
15521,
15594,
15636,
15641,
15656,
15671,
15672,
15686,
15688,
15689,
15729,
15731,
15758,
15759,
15777,
15778,
15782,
15851,
15924,
15997,
16038,
16042,
16074,
16117,
16148,
16175,
16180,
16202,
16203,
16207,
16279,
16343,
16348,
16382,
16393,
16418,
16438,
16440,
16441,
16509,
16511,
16538,
16539,
16557,
16594,
16605,
16630,
16650,
16651,
16665,
16667,
16668,
16671,
16741,
16816,
16890,
16928,
16931,
16995,
16999,
17054,
17093,
17095,
17119,
17120,
17163,
17192,
17242,
17280,
17293,
17294,
17337,
17392,
17405,
17452,
17453,
17464,
17466,
17467,
17502,
17504,
17517,
17518,
17546,
17609,
17639,
17640,
17656,
17658,
17659,
17706,
17708,
17732,
17733,
17776,
17822,
17838,
17885,
17886,
17901,
17903,
17904,
17907,
17969,
18032,
18090,
18094,
18106,
18178,
18180,
18216,
18257,
18258,
18272,
18322,
18375,
18381,
18410,
18416,
18469,
18522,
18528,
18551,
18552,
18586,
18636,
18690,
18721,
18770,
18820,
18823,
18825,
18826,
18846,
18849,
18923,
18927,
18975,
18977,
19019,
19020,
19027,
19031,
19089,
19117,
19122,
19143,
19153,
19157,
19221,
19281,
19307,
19312,
19352,
19372,
19382,
19385,
19386,
19414,
19418,
19445,
19450,
19499,
19518,
19544,
19547,
19548,
19552,
19579,
19584,
19646,
19665,
19691,
19694,
19695,
19699,
19765,
19770,
19793,
19822,
19835,
19861,
19881,
19908,
19922,
19933,
19937,
19940,
19970,
19974,
20039,
20104,
20171,
20176,
20195,
20204,
20205,
20223,
20240,
20261,
20265,
20313,
20352,
20357,
20372,
20376,
20429,
20483,
20488,
20518,
20538,
20556,
20578,
20592,
20595,
20611,
20628,
20649,
20651,
20677,
20678,
20681,
20722,
20742,
20746,
20772,
20774,
20811,
20843,
20844,
20870,
20880,
20890,
20908,
20912,
20962,
21015,
21067,
21122,
21151,
21156,
21183,
21213,
21232,
21259,
21260,
21286,
21287,
21310,
21363,
21368,
21424,
21452,
21458,
21510,
21545,
21546,
21559,
21603,
21650,
21661,
21686,
21690,
21727,
21755,
21758,
21771,
21806,
21852,
21873,
21894,
21919,
21949,
21972,
21999,
22011,
22046,
22067,
22069,
22070,
22138,
22140,
22164,
22165,
22190,
22222,
22235,
22238,
22252,
22254,
22255,
22328,
22356,
22384,
22386,
22446,
22498,
22499,
22530,
22547,
22548,
22585,
22600,
22633,
22650,
22653,
22654,
22689,
22730,
22783,
22841,
22844,
22875,
22908,
22909,
22925,
22927,
22928,
22931,
22990,
23069,
23139,
23203,
23266,
23270,
23341,
23383,
23385,
23423,
23424,
23461,
23474,
23491,
23492,
23536,
23587,
23592,
23657,
23720,
23784,
23810,
23873,
23936,
23942,
23979,
24023,
24062,
24091,
24102,
24146,
24160,
24199,
24214,
24233,
24237,
24240,
24241,
24263,
24265,
24266,
24269,
24333,
24337,
24416,
24444,
24446,
24489,
24499,
24500,
24542,
24569,
24570,
24642,
24661,
24723,
24768,
24798,
24835,
24839,
24842,
24843,
24875,
24877,
24878,
24881,
24906,
24909,
24958,
25021,
25081,
25146,
25150,
25213,
25242,
25244,
25281,
25282,
25328,
25357,
25358,
25402,
25439,
25475,
25485,
25486,
25529,
25583,
25609,
25637,
25687,
25714,
25746,
25771,
25813,
25844,
25848,
25853,
25909,
25951,
25957,
25999,
26036,
26039,
26101,
26103,
26104,
26107,
26170,
26196,
26200,
26265,
26267,
26283,
26311,
26329,
26330,
26363,
26400,
26401,
26418,
26465,
26466,
26496,
26536,
26567,
26597,
26628,
26669,
26709,
26749,
26793,
26803,
26822,
26825,
26826,
26881,
26916,
26955,
26956,
27012,
27058,
27107,
27142,
27143,
27198,
27233,
27252,
27255,
27257,
27258,
27290,
27326,
27328,
27369,
27411,
27432,
27433,
27466,
27467,
27496,
27506,
27507,
27536,
27566,
27631,
27678,
27703,
27706,
27737,
27739,
27745,
27791,
27798,
27799,
27834,
27836,
27872,
27889,
27918,
27919,
27944,
27966,
27967,
28004,
28005,
28036,
28081,
28107,
28152,
28153,
28157,
28227,
28298,
28365,
28435,
28455,
28460,
28478,
28479,
28519,
28520,
28554,
28555,
28559,
28628,
28675,
28680,
28722,
28784,
28789,
28844,
28895,
28951,
29005,
29056,
29113,
29163,
29169,
29200,
29243,
29257,
29260,
29261,
29304,
29308,
29371,
29436,
29441,
29452,
29456,
29517,
29559,
29564,
29602,
29603,
29633,
29690,
29730,
29751,
29789,
29792,
29793,
29847,
29861,
29885,
29914,
29969,
29988,
30015,
30059,
30088,
30095,
30110,
30167,
30170,
30203,
30220,
30240,
30258,
30259,
30283,
30317,
30318,
30330,
30331,
30348,
30366,
30398,
30399,
30415,
30431,
30449,
30464,
30481,
30505,
30533,
30555,
30574,
30575,
30579,
30642,
30689,
30693,
30757,
30762,
30790,
30791,
30824,
30843,
30844,
30848,
30913,
30918,
30952,
30953,
30984,
31050,
31080,
31111,
31138,
31166,
31186,
31226,
31260,
31267,
31271,
31310,
31315,
31345,
31349,
31413,
31475,
31525,
31530,
31560,
31561,
31583,
31607,
31608,
31631,
31667,
31668,
31694,
31727,
31728,
31762,
31763,
31785,
31805,
31827,
31884,
31897,
31964,
31965,
31982,
31984,
32012,
32013,
32072,
32074,
32085,
32103,
32104,
32120,
32122,
32156,
32157,
32196,
32198,
32230,
32232,
32233,
32236,
32309,
32350,
32354,
32359,
32388,
32390,
32436,
32437,
32496,
32497,
32526,
32562,
32604,
32663,
32664,
32700,
32730,
32789,
32826,
32835,
32872,
32907,
32938,
32942,
32980,
32983,
32984,
33005,
33023,
33025,
33026,
33029,
33102,
33171,
33213,
33217,
33262,
33264,
33306,
33324,
33335,
33337,
33338,
33357,
33382,
33399,
33421,
33422,
33455,
33478,
33512,
33513,
33540,
33561,
33564,
33565,
33579,
33651,
33653,
33679,
33708,
33738,
33740,
33741,
33810,
33812,
33850,
33897,
33899,
33900,
33911,
33984,
33986,
34013,
34025,
34026,
34030,
34092,
34119,
34124,
34164,
34176,
34177,
34181,
34247,
34298,
34302,
34367,
34435,
34478,
34483,
34547,
34559,
34560,
34571,
34573,
34574,
34650,
34697,
34699,
34730,
34758,
34808,
34809,
34830,
34852,
34866,
34881,
34930,
34945,
34988,
35003,
35054,
35069,
35112,
35127,
35170,
35185,
35234,
35237,
35251,
35267,
35283,
35285,
35286,
35289,
35358,
35431,
35506,
35562,
35566,
35639,
35641,
35669,
35699,
35762,
35793,
35794,
35832,
35844,
35845,
35886,
35918,
35929,
35930,
35952,
35983,
36009,
36010,
36043,
36064,
36092,
36103,
36158,
36188,
36192,
36252,
36255,
36259,
36329,
36334,
36394,
36420,
36485,
36497,
36501,
36550,
36555,
36585,
36610,
36611,
36615,
36682,
36687,
36740,
36781,
36829,
36853,
36877,
36878,
36883,
36942,
37001,
37059,
37111,
37168,
37173,
37231,
37292,
37325,
37330,
37389,
37448,
37509,
37549,
37554,
37615,
37679,
37725,
37731,
37787,
37832,
37868,
37909,
37950,
38010,
38030,
38076,
38096,
38142,
38160,
38200,
38219,
38262,
38282,
38310,
38343,
38363,
38391,
38424,
38467,
38497,
38524,
38573,
38624,
38662,
38709,
38712,
38713,
38737,
38787,
38836,
38883,
38912,
38954,
38955,
38977,
39000,
39048,
39071,
39113,
39138,
39149,
39150,
39180,
39201,
39218,
39229,
39281,
39300,
39304,
39354,
39369,
39418,
39421,
39444,
39486,
39509,
39551,
39565,
39581,
39582,
39610,
39644,
39703,
39723,
39724,
39779,
39802,
39845,
39867,
39892,
39928,
39931,
39956,
39975,
39976,
39992,
39994,
39995,
40061,
40063,
40078,
40138,
40163,
40173,
40219,
40258,
40261,
40275,
40277,
40278,
40282,
40344,
40365,
40400,
40424,
40427,
40501,
40504,
40516,
40583,
40644,
40647,
40659,
40732,
40804,
40874,
40902,
40906,
40957,
40996,
40998,
41029,
41067,
41120,
41132,
41133,
41137,
41208,
41213,
41258,
41270,
41271,
41307,
41319,
41320,
41336,
41374,
41375,
41415,
41439,
41458,
41459,
41481,
41498,
41517,
41518,
41558,
41573,
41574,
41631,
41643,
41683,
41700,
41712,
41713,
41717,
41770,
41833,
41899,
41967,
42014,
42019,
42040,
42064,
42107,
42137,
42162,
42163,
42202,
42265,
42266,
42290,
42340,
42369,
42428,
42429,
42451,
42474,
42522,
42545,
42587,
42610,
42660,
42683,
42734,
42757,
42799,
42822,
42864,
42878,
42894,
42915,
42916,
42934,
42950,
42952,
42953,
42956,
43022,
43095,
43170,
43226,
43230,
43306,
43308,
43321,
43333,
43345,
43346,
43389,
43401,
43402,
43452,
43464,
43465,
43503,
43540,
43592,
43633,
43645,
43648,
43688,
43734,
43791,
43831,
43832,
43856,
43877,
43907,
43932,
43933,
43954,
43979,
44030,
44052,
44082,
44125,
44140,
44157,
44167,
44215,
44250,
44273,
44276,
44277,
44293,
44295,
44296,
44299,
44337,
44340,
44402,
44478,
44537,
44593,
44614,
44618,
44682,
44709,
44711,
44715,
44776,
44839,
44875,
44880,
44926,
44936,
44937,
44977,
44989,
44990,
45028,
45039,
45053,
45054,
45097,
45102,
45165,
45225,
45231,
45254,
45279,
45291,
45294,
45295,
45342,
45347,
45409,
45471,
45487,
45492,
45558,
45625,
45689,
45755,
45785,
45791,
45820,
45835,
45838,
45839,
45859,
45893,
45945,
45977,
45983,
46038,
46093,
46138,
46145,
46192,
46228,
46232,
46233,
46238,
46297,
46357,
46362,
46382,
46387,
46444,
46505,
46564,
46624,
46685,
46743,
46783,
46788,
46807,
46812,
46874,
46936,
46985,
46991,
47057,
47082,
47092,
47097,
47156,
47200,
47206,
47230,
47233,
47234,
47238,
47307,
47363,
47368,
47409,
47419,
47433,
47434,
47438,
47504,
47573,
47634,
47639,
47675,
47677,
47678,
47681,
47744,
47747,
47809,
47885,
47949,
48009,
48030,
48034,
48107,
48109,
48133,
48134,
48185,
48227,
48228,
48239,
48254,
48257,
48258,
48269,
48271,
48272,
48345,
48347,
48371,
48372,
48427,
48469,
48470,
48481,
48496,
48499,
48500,
48511,
48513,
48514,
48580,
48605,
48607,
48668,
48687,
48717,
48718,
48745,
48757,
48758,
48823,
48835,
48836,
48890,
48892,
48893,
48966,
48968,
49020,
49051,
49053,
49054,
49096,
49098,
49124,
49137,
49138,
49177,
49178,
49244,
49279,
49346,
49354,
49358,
49425,
49491,
49559,
49571,
49576,
49605,
49641,
49708,
49723,
49724,
49764,
49792,
49808,
49814,
49850,
49864,
49877,
49878,
49914,
49928,
49941,
49942,
49976,
49986,
50022,
50052,
50053,
50061,
50089,
50134,
50159,
50193,
50208,
50224,
50228,
50231,
50236,
50272,
50342,
50358,
50360,
50361,
50435,
50486,
50488,
50510,
50535,
50556,
50567,
50568,
50630,
50663,
50681,
50730,
50748,
50749,
50767,
50780,
50802,
50811,
50824,
50846,
50863,
50882,
50891,
50905,
50928,
50945,
50964,
50973,
50983,
51001,
51004,
51005,
51030,
51058,
51059,
51079,
51097,
51121,
51142,
51162,
51182,
51203,
51204,
51220,
51231,
51252,
51257,
51309,
51359,
51376,
51382,
51394,
51434,
51446,
51486,
51498,
51537,
51549,
51587,
51599,
51637,
51649,
51690,
51693,
51694,
51709,
51722,
51724,
51725,
51786,
51830,
51832,
51854,
51879,
51900,
51911,
51912,
51959,
51992,
52010,
52011,
52028,
52050,
52072,
52095,
52124,
52149,
52172,
52217,
52242,
52264,
52292,
52295,
52296,
52316,
52334,
52368,
52388,
52413,
52433,
52454,
52469,
52470,
52483,
52485,
52486,
52517,
52518,
52521,
52585,
52636,
52640,
52716,
52718,
52768,
52770,
52771
],
"line_end_idx": [
23,
52,
107,
109,
111,
113,
115,
117,
119,
121,
123,
125,
128,
131,
134,
137,
140,
143,
146,
149,
152,
155,
158,
161,
164,
167,
170,
173,
176,
179,
182,
185,
188,
191,
194,
197,
200,
203,
206,
209,
212,
215,
218,
221,
224,
227,
230,
233,
236,
239,
242,
245,
248,
251,
254,
257,
260,
263,
266,
269,
272,
275,
278,
281,
284,
287,
290,
293,
296,
299,
302,
305,
308,
311,
314,
317,
320,
323,
326,
329,
332,
335,
338,
341,
344,
347,
350,
353,
356,
359,
362,
365,
368,
371,
374,
377,
380,
383,
386,
389,
392,
395,
399,
403,
407,
411,
415,
419,
423,
427,
431,
435,
439,
443,
447,
451,
455,
459,
463,
467,
471,
475,
479,
483,
487,
491,
495,
499,
503,
507,
511,
515,
519,
523,
527,
531,
535,
539,
543,
547,
551,
555,
559,
563,
567,
571,
575,
579,
583,
587,
591,
595,
599,
603,
607,
611,
615,
619,
623,
627,
631,
635,
639,
643,
647,
651,
655,
659,
663,
667,
671,
675,
679,
683,
687,
691,
695,
699,
703,
707,
711,
715,
719,
723,
727,
731,
735,
739,
743,
747,
751,
755,
759,
763,
767,
771,
775,
779,
783,
787,
791,
795,
799,
803,
807,
811,
815,
819,
823,
827,
831,
835,
839,
843,
847,
851,
855,
859,
863,
867,
871,
875,
879,
883,
887,
891,
895,
899,
903,
907,
911,
915,
919,
923,
927,
931,
935,
939,
943,
947,
951,
955,
959,
963,
967,
971,
975,
979,
983,
987,
991,
995,
999,
1003,
1007,
1011,
1015,
1019,
1023,
1027,
1031,
1035,
1039,
1043,
1047,
1051,
1055,
1059,
1063,
1067,
1071,
1075,
1079,
1083,
1087,
1091,
1095,
1099,
1103,
1107,
1111,
1115,
1119,
1123,
1127,
1131,
1135,
1139,
1143,
1147,
1151,
1155,
1159,
1163,
1167,
1171,
1175,
1179,
1183,
1187,
1191,
1195,
1199,
1203,
1207,
1211,
1215,
1219,
1223,
1227,
1231,
1235,
1239,
1243,
1247,
1251,
1255,
1259,
1263,
1267,
1271,
1275,
1279,
1283,
1287,
1291,
1295,
1299,
1303,
1307,
1311,
1315,
1319,
1323,
1327,
1331,
1335,
1339,
1343,
1347,
1351,
1355,
1359,
1363,
1367,
1371,
1375,
1379,
1383,
1387,
1391,
1395,
1399,
1403,
1407,
1411,
1415,
1419,
1423,
1427,
1431,
1435,
1439,
1443,
1447,
1451,
1455,
1459,
1463,
1467,
1471,
1475,
1479,
1483,
1487,
1491,
1495,
1499,
1503,
1507,
1511,
1515,
1519,
1523,
1527,
1531,
1535,
1539,
1543,
1547,
1551,
1555,
1559,
1563,
1567,
1571,
1575,
1579,
1583,
1587,
1591,
1595,
1599,
1603,
1607,
1611,
1615,
1619,
1623,
1627,
1631,
1635,
1639,
1643,
1647,
1651,
1655,
1659,
1663,
1667,
1671,
1675,
1679,
1683,
1687,
1691,
1695,
1699,
1703,
1707,
1711,
1715,
1719,
1723,
1727,
1731,
1735,
1739,
1743,
1747,
1751,
1755,
1759,
1763,
1767,
1771,
1775,
1779,
1783,
1787,
1791,
1795,
1799,
1803,
1807,
1811,
1815,
1819,
1823,
1827,
1831,
1835,
1839,
1843,
1847,
1851,
1855,
1859,
1863,
1867,
1871,
1875,
1879,
1883,
1887,
1891,
1895,
1899,
1903,
1907,
1911,
1915,
1919,
1923,
1927,
1931,
1935,
1939,
1943,
1947,
1951,
1955,
1959,
1963,
1967,
1971,
1975,
1979,
1983,
1987,
1991,
1995,
1999,
2003,
2007,
2011,
2015,
2019,
2023,
2027,
2031,
2035,
2039,
2043,
2047,
2051,
2055,
2059,
2063,
2067,
2071,
2075,
2079,
2083,
2087,
2091,
2095,
2099,
2103,
2107,
2111,
2115,
2119,
2123,
2127,
2131,
2135,
2139,
2143,
2147,
2151,
2155,
2159,
2163,
2167,
2171,
2175,
2179,
2183,
2187,
2191,
2195,
2199,
2203,
2207,
2211,
2215,
2219,
2223,
2227,
2231,
2235,
2239,
2243,
2247,
2251,
2255,
2259,
2263,
2267,
2271,
2275,
2279,
2283,
2287,
2291,
2295,
2299,
2303,
2307,
2311,
2315,
2319,
2323,
2327,
2331,
2335,
2339,
2343,
2347,
2351,
2355,
2359,
2363,
2367,
2371,
2375,
2379,
2383,
2387,
2391,
2395,
2399,
2403,
2407,
2411,
2415,
2419,
2423,
2427,
2431,
2435,
2439,
2443,
2447,
2451,
2455,
2459,
2463,
2467,
2471,
2475,
2479,
2483,
2487,
2491,
2495,
2499,
2503,
2507,
2511,
2515,
2519,
2523,
2527,
2531,
2535,
2539,
2543,
2547,
2551,
2555,
2559,
2563,
2567,
2571,
2575,
2579,
2583,
2587,
2591,
2595,
2599,
2603,
2607,
2611,
2615,
2619,
2623,
2627,
2631,
2635,
2639,
2643,
2647,
2651,
2655,
2659,
2663,
2667,
2671,
2675,
2679,
2683,
2687,
2691,
2695,
2699,
2703,
2707,
2711,
2715,
2719,
2723,
2727,
2731,
2735,
2739,
2743,
2747,
2751,
2755,
2759,
2763,
2767,
2771,
2775,
2779,
2783,
2787,
2791,
2795,
2799,
2803,
2807,
2811,
2815,
2819,
2823,
2827,
2831,
2835,
2839,
2843,
2847,
2851,
2855,
2859,
2863,
2867,
2871,
2875,
2879,
2883,
2887,
2891,
2895,
2899,
2903,
2907,
2911,
2915,
2919,
2923,
2927,
2931,
2935,
2939,
2943,
2947,
2951,
2955,
2959,
2963,
2967,
2971,
2975,
2979,
2983,
2987,
2991,
2995,
2999,
3003,
3007,
3011,
3015,
3019,
3023,
3027,
3031,
3035,
3039,
3043,
3047,
3051,
3055,
3059,
3063,
3067,
3071,
3075,
3079,
3083,
3087,
3091,
3095,
3099,
3103,
3107,
3111,
3115,
3119,
3123,
3127,
3131,
3135,
3139,
3143,
3147,
3151,
3155,
3159,
3163,
3167,
3171,
3175,
3179,
3183,
3187,
3191,
3195,
3199,
3203,
3207,
3211,
3215,
3219,
3223,
3227,
3231,
3235,
3239,
3243,
3247,
3251,
3255,
3259,
3263,
3267,
3271,
3275,
3279,
3283,
3287,
3291,
3295,
3299,
3303,
3307,
3311,
3315,
3319,
3323,
3327,
3331,
3335,
3339,
3343,
3347,
3351,
3355,
3359,
3363,
3367,
3371,
3375,
3379,
3383,
3387,
3391,
3395,
3399,
3403,
3407,
3411,
3415,
3419,
3423,
3427,
3431,
3435,
3439,
3443,
3447,
3451,
3455,
3459,
3463,
3467,
3471,
3475,
3479,
3483,
3487,
3491,
3495,
3499,
3503,
3507,
3511,
3515,
3519,
3523,
3527,
3531,
3535,
3539,
3543,
3547,
3551,
3555,
3559,
3563,
3567,
3571,
3575,
3579,
3583,
3587,
3591,
3595,
3599,
3603,
3607,
3611,
3615,
3619,
3623,
3627,
3631,
3635,
3639,
3643,
3647,
3651,
3655,
3659,
3663,
3667,
3671,
3675,
3679,
3683,
3687,
3691,
3695,
3699,
3703,
3707,
3711,
3715,
3719,
3723,
3727,
3731,
3735,
3739,
3743,
3747,
3751,
3755,
3759,
3763,
3767,
3771,
3775,
3779,
3783,
3787,
3791,
3795,
3799,
3803,
3807,
3811,
3815,
3819,
3823,
3827,
3831,
3835,
3839,
3843,
3847,
3851,
3855,
3859,
3863,
3867,
3871,
3875,
3879,
3883,
3887,
3891,
3895,
3899,
3903,
3907,
3911,
3915,
3919,
3923,
3927,
3931,
3935,
3939,
3943,
3947,
3951,
3955,
3959,
3963,
3967,
3971,
3975,
3979,
3983,
3987,
3991,
3995,
4000,
4005,
4010,
4015,
4020,
4025,
4030,
4035,
4040,
4045,
4050,
4055,
4060,
4065,
4070,
4075,
4080,
4085,
4090,
4095,
4100,
4105,
4110,
4115,
4120,
4125,
4130,
4135,
4140,
4145,
4150,
4155,
4160,
4165,
4170,
4175,
4180,
4185,
4190,
4195,
4200,
4205,
4210,
4215,
4220,
4225,
4230,
4235,
4240,
4245,
4250,
4255,
4260,
4265,
4270,
4275,
4280,
4285,
4290,
4295,
4300,
4305,
4310,
4315,
4320,
4325,
4330,
4335,
4340,
4345,
4350,
4355,
4360,
4365,
4370,
4375,
4380,
4385,
4390,
4395,
4400,
4405,
4410,
4415,
4420,
4425,
4430,
4435,
4440,
4445,
4450,
4455,
4460,
4465,
4470,
4475,
4480,
4485,
4490,
4495,
4500,
4505,
4510,
4515,
4520,
4525,
4530,
4535,
4540,
4545,
4550,
4555,
4560,
4565,
4570,
4575,
4580,
4585,
4590,
4595,
4600,
4605,
4610,
4615,
4620,
4625,
4630,
4635,
4640,
4645,
4650,
4655,
4660,
4665,
4670,
4675,
4680,
4685,
4690,
4695,
4700,
4705,
4710,
4715,
4720,
4725,
4730,
4735,
4740,
4745,
4750,
4755,
4760,
4765,
4770,
4775,
4780,
4785,
4790,
4795,
4800,
4805,
4810,
4815,
4820,
4825,
4830,
4835,
4840,
4845,
4850,
4855,
4860,
4865,
4870,
4875,
4880,
4885,
4890,
4895,
4900,
4905,
4910,
4915,
4920,
4925,
4930,
4935,
4940,
4945,
4950,
4955,
4960,
4965,
4970,
4975,
4980,
4985,
4990,
4995,
5000,
5005,
5010,
5015,
5020,
5025,
5030,
5035,
5040,
5045,
5050,
5055,
5060,
5065,
5070,
5075,
5080,
5085,
5090,
5095,
5100,
5105,
5110,
5115,
5120,
5125,
5130,
5135,
5140,
5145,
5150,
5155,
5160,
5165,
5170,
5175,
5180,
5185,
5190,
5195,
5200,
5205,
5210,
5215,
5220,
5225,
5230,
5235,
5240,
5245,
5250,
5255,
5260,
5265,
5270,
5275,
5280,
5285,
5290,
5295,
5300,
5305,
5310,
5315,
5320,
5325,
5330,
5335,
5340,
5345,
5350,
5355,
5360,
5365,
5370,
5375,
5380,
5385,
5390,
5395,
5400,
5405,
5410,
5415,
5420,
5425,
5430,
5435,
5440,
5445,
5450,
5455,
5460,
5465,
5470,
5475,
5480,
5485,
5490,
5495,
5500,
5505,
5510,
5515,
5520,
5525,
5530,
5535,
5540,
5545,
5550,
5555,
5560,
5565,
5570,
5575,
5580,
5585,
5590,
5595,
5600,
5605,
5610,
5615,
5620,
5625,
5630,
5635,
5640,
5645,
5650,
5655,
5660,
5665,
5670,
5675,
5680,
5685,
5690,
5695,
5700,
5705,
5710,
5715,
5720,
5725,
5730,
5735,
5740,
5745,
5750,
5755,
5760,
5765,
5770,
5775,
5780,
5785,
5790,
5795,
5800,
5805,
5810,
5815,
5820,
5825,
5830,
5835,
5840,
5845,
5850,
5855,
5860,
5865,
5870,
5875,
5880,
5885,
5890,
5895,
5900,
5905,
5910,
5915,
5920,
5925,
5930,
5935,
5940,
5945,
5950,
5955,
5960,
5965,
5970,
5975,
5980,
5985,
5990,
5995,
6000,
6005,
6010,
6015,
6020,
6025,
6030,
6035,
6040,
6045,
6050,
6055,
6060,
6065,
6070,
6075,
6080,
6085,
6090,
6095,
6100,
6105,
6110,
6115,
6120,
6125,
6130,
6135,
6140,
6145,
6150,
6155,
6160,
6165,
6170,
6175,
6180,
6185,
6190,
6195,
6200,
6205,
6210,
6215,
6220,
6225,
6230,
6235,
6240,
6245,
6250,
6255,
6260,
6265,
6270,
6275,
6280,
6285,
6290,
6295,
6300,
6305,
6310,
6315,
6320,
6325,
6330,
6335,
6340,
6345,
6350,
6355,
6360,
6365,
6370,
6375,
6380,
6385,
6390,
6395,
6400,
6405,
6410,
6415,
6420,
6425,
6430,
6435,
6440,
6445,
6450,
6455,
6460,
6465,
6470,
6475,
6480,
6485,
6490,
6495,
6500,
6505,
6510,
6515,
6520,
6525,
6530,
6535,
6540,
6545,
6550,
6555,
6560,
6565,
6570,
6575,
6580,
6585,
6590,
6595,
6600,
6605,
6610,
6615,
6620,
6625,
6630,
6635,
6640,
6645,
6650,
6655,
6660,
6665,
6670,
6675,
6680,
6685,
6690,
6695,
6700,
6705,
6710,
6715,
6720,
6725,
6730,
6735,
6740,
6745,
6750,
6755,
6760,
6765,
6770,
6775,
6780,
6785,
6790,
6795,
6800,
6805,
6810,
6815,
6820,
6825,
6830,
6835,
6840,
6845,
6850,
6855,
6860,
6865,
6870,
6875,
6880,
6885,
6890,
6895,
6900,
6905,
6910,
6915,
6920,
6925,
6930,
6935,
6940,
6945,
6950,
6955,
6960,
6965,
6970,
6975,
6980,
6985,
6990,
6995,
7000,
7005,
7010,
7015,
7020,
7025,
7030,
7035,
7040,
7045,
7050,
7055,
7060,
7065,
7070,
7075,
7080,
7085,
7090,
7095,
7100,
7105,
7110,
7115,
7120,
7125,
7130,
7135,
7140,
7145,
7150,
7155,
7160,
7165,
7170,
7175,
7180,
7185,
7190,
7195,
7200,
7205,
7210,
7215,
7220,
7225,
7230,
7235,
7240,
7245,
7250,
7255,
7260,
7265,
7270,
7275,
7280,
7285,
7290,
7295,
7300,
7305,
7310,
7315,
7320,
7325,
7330,
7335,
7340,
7345,
7350,
7355,
7360,
7365,
7370,
7375,
7380,
7385,
7390,
7395,
7400,
7405,
7410,
7415,
7420,
7425,
7430,
7435,
7440,
7445,
7450,
7455,
7460,
7465,
7470,
7475,
7480,
7485,
7490,
7495,
7500,
7505,
7510,
7515,
7520,
7525,
7530,
7535,
7540,
7545,
7550,
7555,
7560,
7565,
7570,
7575,
7580,
7585,
7590,
7595,
7600,
7605,
7610,
7615,
7620,
7625,
7630,
7635,
7640,
7645,
7650,
7655,
7660,
7665,
7670,
7675,
7680,
7685,
7688,
7712,
7715,
7760,
7764,
7765,
7787,
7811,
7846,
7874,
7904,
7934,
7970,
8003,
8032,
8058,
8088,
8118,
8149,
8172,
8201,
8224,
8247,
8271,
8302,
8326,
8353,
8380,
8407,
8434,
8467,
8493,
8520,
8545,
8572,
8599,
8628,
8662,
8691,
8717,
8745,
8771,
8803,
8830,
8855,
8880,
8909,
8957,
8985,
9011,
9053,
9082,
9111,
9144,
9173,
9203,
9235,
9268,
9291,
9320,
9343,
9367,
9393,
9420,
9421,
9448,
9472,
9497,
9526,
9527,
9596,
9598,
9613,
9642,
9661,
9692,
9722,
9723,
9750,
9780,
9814,
9817,
9850,
9882,
9884,
9885,
9888,
9945,
9949,
10000,
10002,
10044,
10089,
10122,
10166,
10185,
10186,
10233,
10272,
10303,
10304,
10331,
10360,
10379,
10415,
10425,
10430,
10486,
10542,
10595,
10601,
10644,
10681,
10684,
10691,
10692,
10711,
10729,
10748,
10758,
10763,
10816,
10837,
10843,
10896,
10938,
10939,
10970,
11010,
11013,
11014,
11078,
11116,
11117,
11121,
11192,
11264,
11336,
11374,
11379,
11415,
11449,
11471,
11493,
11525,
11556,
11587,
11614,
11643,
11686,
11729,
11778,
11831,
11851,
11887,
11923,
11924,
11928,
11989,
12053,
12058,
12090,
12112,
12145,
12146,
12175,
12220,
12239,
12279,
12300,
12303,
12305,
12306,
12364,
12366,
12437,
12438,
12468,
12500,
12523,
12525,
12526,
12527,
12568,
12570,
12599,
12616,
12624,
12694,
12765,
12783,
12830,
12850,
12851,
12872,
12873,
12906,
12931,
12950,
12951,
12955,
13010,
13063,
13126,
13131,
13148,
13175,
13222,
13265,
13270,
13327,
13389,
13445,
13451,
13513,
13531,
13566,
13569,
13570,
13605,
13625,
13670,
13671,
13684,
13711,
13726,
13728,
13729,
13732,
13806,
13882,
13886,
13955,
13957,
13990,
14017,
14018,
14022,
14088,
14156,
14218,
14275,
14280,
14287,
14320,
14332,
14347,
14348,
14396,
14397,
14401,
14473,
14540,
14553,
14558,
14570,
14612,
14626,
14627,
14631,
14701,
14712,
14716,
14780,
14831,
14835,
14906,
14964,
14988,
14992,
15059,
15075,
15079,
15151,
15223,
15276,
15280,
15350,
15422,
15446,
15450,
15521,
15594,
15636,
15641,
15656,
15671,
15672,
15686,
15688,
15689,
15729,
15731,
15758,
15759,
15777,
15778,
15782,
15851,
15924,
15997,
16038,
16042,
16074,
16117,
16148,
16175,
16180,
16202,
16203,
16207,
16279,
16343,
16348,
16382,
16393,
16418,
16438,
16440,
16441,
16509,
16511,
16538,
16539,
16557,
16594,
16605,
16630,
16650,
16651,
16665,
16667,
16668,
16671,
16741,
16816,
16890,
16928,
16931,
16995,
16999,
17054,
17093,
17095,
17119,
17120,
17163,
17192,
17242,
17280,
17293,
17294,
17337,
17392,
17405,
17452,
17453,
17464,
17466,
17467,
17502,
17504,
17517,
17518,
17546,
17609,
17639,
17640,
17656,
17658,
17659,
17706,
17708,
17732,
17733,
17776,
17822,
17838,
17885,
17886,
17901,
17903,
17904,
17907,
17969,
18032,
18090,
18094,
18106,
18178,
18180,
18216,
18257,
18258,
18272,
18322,
18375,
18381,
18410,
18416,
18469,
18522,
18528,
18551,
18552,
18586,
18636,
18690,
18721,
18770,
18820,
18823,
18825,
18826,
18846,
18849,
18923,
18927,
18975,
18977,
19019,
19020,
19027,
19031,
19089,
19117,
19122,
19143,
19153,
19157,
19221,
19281,
19307,
19312,
19352,
19372,
19382,
19385,
19386,
19414,
19418,
19445,
19450,
19499,
19518,
19544,
19547,
19548,
19552,
19579,
19584,
19646,
19665,
19691,
19694,
19695,
19699,
19765,
19770,
19793,
19822,
19835,
19861,
19881,
19908,
19922,
19933,
19937,
19940,
19970,
19974,
20039,
20104,
20171,
20176,
20195,
20204,
20205,
20223,
20240,
20261,
20265,
20313,
20352,
20357,
20372,
20376,
20429,
20483,
20488,
20518,
20538,
20556,
20578,
20592,
20595,
20611,
20628,
20649,
20651,
20677,
20678,
20681,
20722,
20742,
20746,
20772,
20774,
20811,
20843,
20844,
20870,
20880,
20890,
20908,
20912,
20962,
21015,
21067,
21122,
21151,
21156,
21183,
21213,
21232,
21259,
21260,
21286,
21287,
21310,
21363,
21368,
21424,
21452,
21458,
21510,
21545,
21546,
21559,
21603,
21650,
21661,
21686,
21690,
21727,
21755,
21758,
21771,
21806,
21852,
21873,
21894,
21919,
21949,
21972,
21999,
22011,
22046,
22067,
22069,
22070,
22138,
22140,
22164,
22165,
22190,
22222,
22235,
22238,
22252,
22254,
22255,
22328,
22356,
22384,
22386,
22446,
22498,
22499,
22530,
22547,
22548,
22585,
22600,
22633,
22650,
22653,
22654,
22689,
22730,
22783,
22841,
22844,
22875,
22908,
22909,
22925,
22927,
22928,
22931,
22990,
23069,
23139,
23203,
23266,
23270,
23341,
23383,
23385,
23423,
23424,
23461,
23474,
23491,
23492,
23536,
23587,
23592,
23657,
23720,
23784,
23810,
23873,
23936,
23942,
23979,
24023,
24062,
24091,
24102,
24146,
24160,
24199,
24214,
24233,
24237,
24240,
24241,
24263,
24265,
24266,
24269,
24333,
24337,
24416,
24444,
24446,
24489,
24499,
24500,
24542,
24569,
24570,
24642,
24661,
24723,
24768,
24798,
24835,
24839,
24842,
24843,
24875,
24877,
24878,
24881,
24906,
24909,
24958,
25021,
25081,
25146,
25150,
25213,
25242,
25244,
25281,
25282,
25328,
25357,
25358,
25402,
25439,
25475,
25485,
25486,
25529,
25583,
25609,
25637,
25687,
25714,
25746,
25771,
25813,
25844,
25848,
25853,
25909,
25951,
25957,
25999,
26036,
26039,
26101,
26103,
26104,
26107,
26170,
26196,
26200,
26265,
26267,
26283,
26311,
26329,
26330,
26363,
26400,
26401,
26418,
26465,
26466,
26496,
26536,
26567,
26597,
26628,
26669,
26709,
26749,
26793,
26803,
26822,
26825,
26826,
26881,
26916,
26955,
26956,
27012,
27058,
27107,
27142,
27143,
27198,
27233,
27252,
27255,
27257,
27258,
27290,
27326,
27328,
27369,
27411,
27432,
27433,
27466,
27467,
27496,
27506,
27507,
27536,
27566,
27631,
27678,
27703,
27706,
27737,
27739,
27745,
27791,
27798,
27799,
27834,
27836,
27872,
27889,
27918,
27919,
27944,
27966,
27967,
28004,
28005,
28036,
28081,
28107,
28152,
28153,
28157,
28227,
28298,
28365,
28435,
28455,
28460,
28478,
28479,
28519,
28520,
28554,
28555,
28559,
28628,
28675,
28680,
28722,
28784,
28789,
28844,
28895,
28951,
29005,
29056,
29113,
29163,
29169,
29200,
29243,
29257,
29260,
29261,
29304,
29308,
29371,
29436,
29441,
29452,
29456,
29517,
29559,
29564,
29602,
29603,
29633,
29690,
29730,
29751,
29789,
29792,
29793,
29847,
29861,
29885,
29914,
29969,
29988,
30015,
30059,
30088,
30095,
30110,
30167,
30170,
30203,
30220,
30240,
30258,
30259,
30283,
30317,
30318,
30330,
30331,
30348,
30366,
30398,
30399,
30415,
30431,
30449,
30464,
30481,
30505,
30533,
30555,
30574,
30575,
30579,
30642,
30689,
30693,
30757,
30762,
30790,
30791,
30824,
30843,
30844,
30848,
30913,
30918,
30952,
30953,
30984,
31050,
31080,
31111,
31138,
31166,
31186,
31226,
31260,
31267,
31271,
31310,
31315,
31345,
31349,
31413,
31475,
31525,
31530,
31560,
31561,
31583,
31607,
31608,
31631,
31667,
31668,
31694,
31727,
31728,
31762,
31763,
31785,
31805,
31827,
31884,
31897,
31964,
31965,
31982,
31984,
32012,
32013,
32072,
32074,
32085,
32103,
32104,
32120,
32122,
32156,
32157,
32196,
32198,
32230,
32232,
32233,
32236,
32309,
32350,
32354,
32359,
32388,
32390,
32436,
32437,
32496,
32497,
32526,
32562,
32604,
32663,
32664,
32700,
32730,
32789,
32826,
32835,
32872,
32907,
32938,
32942,
32980,
32983,
32984,
33005,
33023,
33025,
33026,
33029,
33102,
33171,
33213,
33217,
33262,
33264,
33306,
33324,
33335,
33337,
33338,
33357,
33382,
33399,
33421,
33422,
33455,
33478,
33512,
33513,
33540,
33561,
33564,
33565,
33579,
33651,
33653,
33679,
33708,
33738,
33740,
33741,
33810,
33812,
33850,
33897,
33899,
33900,
33911,
33984,
33986,
34013,
34025,
34026,
34030,
34092,
34119,
34124,
34164,
34176,
34177,
34181,
34247,
34298,
34302,
34367,
34435,
34478,
34483,
34547,
34559,
34560,
34571,
34573,
34574,
34650,
34697,
34699,
34730,
34758,
34808,
34809,
34830,
34852,
34866,
34881,
34930,
34945,
34988,
35003,
35054,
35069,
35112,
35127,
35170,
35185,
35234,
35237,
35251,
35267,
35283,
35285,
35286,
35289,
35358,
35431,
35506,
35562,
35566,
35639,
35641,
35669,
35699,
35762,
35793,
35794,
35832,
35844,
35845,
35886,
35918,
35929,
35930,
35952,
35983,
36009,
36010,
36043,
36064,
36092,
36103,
36158,
36188,
36192,
36252,
36255,
36259,
36329,
36334,
36394,
36420,
36485,
36497,
36501,
36550,
36555,
36585,
36610,
36611,
36615,
36682,
36687,
36740,
36781,
36829,
36853,
36877,
36878,
36883,
36942,
37001,
37059,
37111,
37168,
37173,
37231,
37292,
37325,
37330,
37389,
37448,
37509,
37549,
37554,
37615,
37679,
37725,
37731,
37787,
37832,
37868,
37909,
37950,
38010,
38030,
38076,
38096,
38142,
38160,
38200,
38219,
38262,
38282,
38310,
38343,
38363,
38391,
38424,
38467,
38497,
38524,
38573,
38624,
38662,
38709,
38712,
38713,
38737,
38787,
38836,
38883,
38912,
38954,
38955,
38977,
39000,
39048,
39071,
39113,
39138,
39149,
39150,
39180,
39201,
39218,
39229,
39281,
39300,
39304,
39354,
39369,
39418,
39421,
39444,
39486,
39509,
39551,
39565,
39581,
39582,
39610,
39644,
39703,
39723,
39724,
39779,
39802,
39845,
39867,
39892,
39928,
39931,
39956,
39975,
39976,
39992,
39994,
39995,
40061,
40063,
40078,
40138,
40163,
40173,
40219,
40258,
40261,
40275,
40277,
40278,
40282,
40344,
40365,
40400,
40424,
40427,
40501,
40504,
40516,
40583,
40644,
40647,
40659,
40732,
40804,
40874,
40902,
40906,
40957,
40996,
40998,
41029,
41067,
41120,
41132,
41133,
41137,
41208,
41213,
41258,
41270,
41271,
41307,
41319,
41320,
41336,
41374,
41375,
41415,
41439,
41458,
41459,
41481,
41498,
41517,
41518,
41558,
41573,
41574,
41631,
41643,
41683,
41700,
41712,
41713,
41717,
41770,
41833,
41899,
41967,
42014,
42019,
42040,
42064,
42107,
42137,
42162,
42163,
42202,
42265,
42266,
42290,
42340,
42369,
42428,
42429,
42451,
42474,
42522,
42545,
42587,
42610,
42660,
42683,
42734,
42757,
42799,
42822,
42864,
42878,
42894,
42915,
42916,
42934,
42950,
42952,
42953,
42956,
43022,
43095,
43170,
43226,
43230,
43306,
43308,
43321,
43333,
43345,
43346,
43389,
43401,
43402,
43452,
43464,
43465,
43503,
43540,
43592,
43633,
43645,
43648,
43688,
43734,
43791,
43831,
43832,
43856,
43877,
43907,
43932,
43933,
43954,
43979,
44030,
44052,
44082,
44125,
44140,
44157,
44167,
44215,
44250,
44273,
44276,
44277,
44293,
44295,
44296,
44299,
44337,
44340,
44402,
44478,
44537,
44593,
44614,
44618,
44682,
44709,
44711,
44715,
44776,
44839,
44875,
44880,
44926,
44936,
44937,
44977,
44989,
44990,
45028,
45039,
45053,
45054,
45097,
45102,
45165,
45225,
45231,
45254,
45279,
45291,
45294,
45295,
45342,
45347,
45409,
45471,
45487,
45492,
45558,
45625,
45689,
45755,
45785,
45791,
45820,
45835,
45838,
45839,
45859,
45893,
45945,
45977,
45983,
46038,
46093,
46138,
46145,
46192,
46228,
46232,
46233,
46238,
46297,
46357,
46362,
46382,
46387,
46444,
46505,
46564,
46624,
46685,
46743,
46783,
46788,
46807,
46812,
46874,
46936,
46985,
46991,
47057,
47082,
47092,
47097,
47156,
47200,
47206,
47230,
47233,
47234,
47238,
47307,
47363,
47368,
47409,
47419,
47433,
47434,
47438,
47504,
47573,
47634,
47639,
47675,
47677,
47678,
47681,
47744,
47747,
47809,
47885,
47949,
48009,
48030,
48034,
48107,
48109,
48133,
48134,
48185,
48227,
48228,
48239,
48254,
48257,
48258,
48269,
48271,
48272,
48345,
48347,
48371,
48372,
48427,
48469,
48470,
48481,
48496,
48499,
48500,
48511,
48513,
48514,
48580,
48605,
48607,
48668,
48687,
48717,
48718,
48745,
48757,
48758,
48823,
48835,
48836,
48890,
48892,
48893,
48966,
48968,
49020,
49051,
49053,
49054,
49096,
49098,
49124,
49137,
49138,
49177,
49178,
49244,
49279,
49346,
49354,
49358,
49425,
49491,
49559,
49571,
49576,
49605,
49641,
49708,
49723,
49724,
49764,
49792,
49808,
49814,
49850,
49864,
49877,
49878,
49914,
49928,
49941,
49942,
49976,
49986,
50022,
50052,
50053,
50061,
50089,
50134,
50159,
50193,
50208,
50224,
50228,
50231,
50236,
50272,
50342,
50358,
50360,
50361,
50435,
50486,
50488,
50510,
50535,
50556,
50567,
50568,
50630,
50663,
50681,
50730,
50748,
50749,
50767,
50780,
50802,
50811,
50824,
50846,
50863,
50882,
50891,
50905,
50928,
50945,
50964,
50973,
50983,
51001,
51004,
51005,
51030,
51058,
51059,
51079,
51097,
51121,
51142,
51162,
51182,
51203,
51204,
51220,
51231,
51252,
51257,
51309,
51359,
51376,
51382,
51394,
51434,
51446,
51486,
51498,
51537,
51549,
51587,
51599,
51637,
51649,
51690,
51693,
51694,
51709,
51722,
51724,
51725,
51786,
51830,
51832,
51854,
51879,
51900,
51911,
51912,
51959,
51992,
52010,
52011,
52028,
52050,
52072,
52095,
52124,
52149,
52172,
52217,
52242,
52264,
52292,
52295,
52296,
52316,
52334,
52368,
52388,
52413,
52433,
52454,
52469,
52470,
52483,
52485,
52486,
52517,
52518,
52521,
52585,
52636,
52640,
52716,
52718,
52768,
52770,
52771,
52777
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 52777,
"ccnet_original_nlines": 3476,
"rps_doc_curly_bracket": 0.004206379875540733,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1520524024963379,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.022707419469952583,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5237554311752319,
"rps_doc_frac_unique_words": 0.49198976159095764,
"rps_doc_mean_word_length": 5.73053503036499,
"rps_doc_num_sentences": 368,
"rps_doc_symbol_to_word_ratio": 0.006550219841301441,
"rps_doc_unigram_entropy": 7.116128444671631,
"rps_doc_word_count": 6242,
"rps_doc_frac_chars_dupe_10grams": 0.05127201974391937,
"rps_doc_frac_chars_dupe_5grams": 0.10615041106939316,
"rps_doc_frac_chars_dupe_6grams": 0.08948840200901031,
"rps_doc_frac_chars_dupe_7grams": 0.07623706758022308,
"rps_doc_frac_chars_dupe_8grams": 0.061280399560928345,
"rps_doc_frac_chars_dupe_9grams": 0.058205198496580124,
"rps_doc_frac_chars_top_2gram": 0.01744478940963745,
"rps_doc_frac_chars_top_3gram": 0.007128879893571138,
"rps_doc_frac_chars_top_4gram": 0.005311709828674793,
"rps_doc_books_importance": -5202.5927734375,
"rps_doc_books_importance_length_correction": -5202.5927734375,
"rps_doc_openwebtext_importance": -2905.4287109375,
"rps_doc_openwebtext_importance_length_correction": -2905.4287109375,
"rps_doc_wikipedia_importance": -1888.7547607421875,
"rps_doc_wikipedia_importance_length_correction": -1888.7547607421875
},
"fasttext": {
"dclm": 0.943410336971283,
"english": 0.4121861457824707,
"fineweb_edu_approx": 2.177644729614258,
"eai_general_math": 0.2520156502723694,
"eai_open_web_math": 0.3578695058822632,
"eai_web_code": 0.37675726413726807
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.456",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.22",
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,423,969,368,002,017,000 | JetTrac DataPrep
Introduction:
The following document will go through the functionality found within JetTrac DataPrep. The purpose of this module is to replace a string of characters in an XML file, with a different string of characters.
Technical Support:
If you need assistance in installing and configuring JetTrac DataPrep™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at [email protected]. Please note that the JetTrac DataPrep™ license fee does not cover configuration services and technical support so there may be an additional charge. Please ensure you read these instructions carefully before calling for technical support.
How to run JetTrac DataPrep:
To run the program, you will need to have the following file:
• JTDataPrep.jar
JTDataPrep.jar is required for the program to run and should never be edited.
Default Functionality:
JetTrac DataPrep takes an input configuration .ini file and an input XML file. The module will then look for strings of characters in the XML file and replace them with whatever you have specified then output a modified XML file. This functions the same as Find and Replace functionality found in most word processing applications.
Job Step Configuration Window in JobConfig for JetTrac DataPrep:
When setting up a job step using JTDataPrep in JobConfig the only lines of the config you need to worry about are the first and the last two, the Config file, the Input XML and Output XML. If left as an asterisk * the input will be whatever file is in the data folder that triggered the job running. This works well if it’s the first step but if the input is also the output of a previous job step you would need to specify the fully qualified path of the XML file you want to edit. Eg: C:\JetTrac\…\input.xml
In JobConfig, file paths entered should not be in quotes.
As with all modules, there is a dropdown to select whether or not the job should stop completely if this step fails. If you select Yes, any error will terminate the job process and write to the log file what happened, if no, then the job will try to continue anyways. However if any steps further down the line rely on the output of a job set to not stop on error, they may not work properly
For more specifics go to the JetTrac BYODJobConfig page.
JetTrac DataPrep Command Line:
The command line to run JetTrac DataPrep contains the location of the .jar file, the input XML file, the location to save the modified output XML file, the location of a configuration .ini file, and the log file. The following is an example of the command line used to run this module:
java –jar C:\JTDataPrep.jar “C:\Input.xml” “C:\Output.xml” “C:\Config.ini” “C:\JTDataPrep.log”
Each part of the line is divided by spaces (the amount doesn’t matter), and contains the fully qualified file path to the file you are referencing surrounded by quotes. In the example all of the file paths reference the root of C:\, however, it is likely that none of these files will be located in the root of C:\ for your system, so this is simply demonstrating that the full file path is required.
JetTrac DataPrep Configuration .ini:
The configuration file for this module can contain any number of lines with each line containing a different string replacement. The following is an example of a configuration file for JetTrac DataPrep:
FieldName|ReplacedFieldName
String value for a field|New string value for a field
Remove This String|
This configuration .ini file contains three strings that it will look through the input XML and replace. Any time the module finds any of the strings before the pipe “|”, it will be replaced with the string after the pipe. You will notice that the last string replacement is left blank after the pipe. This last line will replace the string before the pipe with the string after effectively removing it altogether.
Additional Notes:
Please note that the string replacement will replace ALL instances of the string that you specify with exactly what you enter after the pipe. This means that the more specific you are, the less likely you are to replace something you didn’t mean to.
Also note that when the module searches for a string, it searches for exactly those characters. If the string within the input XML does not match the string exactly, it will not be replaced. | {
"url": "http://protechinc.com/jettrac-dataprep/",
"source_domain": "protechinc.com",
"snapshot_id": "crawl=CC-MAIN-2018-51",
"warc_metadata": {
"Content-Length": "62538",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NQHQOPVIWJE7TFKRORPZJB5IFWVZQRZW",
"WARC-Concurrent-To": "<urn:uuid:870b5d85-ff96-47d1-bb9a-aee7f04b12e0>",
"WARC-Date": "2018-12-11T14:20:09Z",
"WARC-IP-Address": "50.62.198.70",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UCPPPXN4UPK6AKW3JFP5Q45FLPDNTOSG",
"WARC-Record-ID": "<urn:uuid:34ecebf4-e8a1-44df-b0fe-bbb043115bab>",
"WARC-Target-URI": "http://protechinc.com/jettrac-dataprep/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4f614ca1-d774-429d-825f-86938da5d398>"
},
"warc_info": "isPartOf: CC-MAIN-2018-51\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for December 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-148-6-181.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,
17,
18,
32,
33,
240,
241,
260,
261,
664,
665,
694,
695,
757,
758,
777,
778,
856,
857,
880,
881,
1213,
1214,
1279,
1280,
1790,
1848,
1849,
2241,
2242,
2299,
2300,
2331,
2332,
2618,
2619,
2714,
2715,
3116,
3117,
3154,
3155,
3358,
3359,
3387,
3441,
3461,
3462,
3877,
3878,
3896,
3897,
4147,
4148
],
"line_end_idx": [
17,
18,
32,
33,
240,
241,
260,
261,
664,
665,
694,
695,
757,
758,
777,
778,
856,
857,
880,
881,
1213,
1214,
1279,
1280,
1790,
1848,
1849,
2241,
2242,
2299,
2300,
2331,
2332,
2618,
2619,
2714,
2715,
3116,
3117,
3154,
3155,
3358,
3359,
3387,
3441,
3461,
3462,
3877,
3878,
3896,
3897,
4147,
4148,
4338
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4338,
"ccnet_original_nlines": 53,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4335664212703705,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023310020565986633,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13053612411022186,
"rps_doc_frac_unique_words": 0.3480055034160614,
"rps_doc_mean_word_length": 4.782668590545654,
"rps_doc_num_sentences": 43,
"rps_doc_symbol_to_word_ratio": 0.001165500027127564,
"rps_doc_unigram_entropy": 4.850399494171143,
"rps_doc_word_count": 727,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01438021007925272,
"rps_doc_frac_chars_dupe_6grams": 0.01438021007925272,
"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.03882656991481781,
"rps_doc_frac_chars_top_3gram": 0.012654590420424938,
"rps_doc_frac_chars_top_4gram": 0.009778539650142193,
"rps_doc_books_importance": -280.6382141113281,
"rps_doc_books_importance_length_correction": -280.6382141113281,
"rps_doc_openwebtext_importance": -183.8356170654297,
"rps_doc_openwebtext_importance_length_correction": -183.8356170654297,
"rps_doc_wikipedia_importance": -117.4946517944336,
"rps_doc_wikipedia_importance_length_correction": -117.4946517944336
},
"fasttext": {
"dclm": 0.17471688985824585,
"english": 0.849632203578949,
"fineweb_edu_approx": 2.1135077476501465,
"eai_general_math": 0.8629710674285889,
"eai_open_web_math": 0.18534111976623535,
"eai_web_code": 0.6409493088722229
}
} | {
"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.776",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,303,781,815,435,963,000 |
Results 1 to 2 of 2
Math Help - find particular solution for first order linear DE
1. #1
Newbie
Joined
Sep 2010
Posts
2
Exclamation find particular solution for first order linear DE
(1+x)y' + y = cos(x).... y(0) = 1
So far, I have:
P(x) = 1/(1+x)
Q(x) = cos(x)/(1+x)
p(x) = e^int(P(x))dx = e^int(1/1+x)dx = e^(ln(1+x))
... I think I did the integral wrong. It's been half a year, my integration skills need to worked on. But this homework is due in an hour and if somebody could real quickly guide me thru it and then I can work thru this section on my own when I don't have pressure to turn homework in... I would really appreciate it!
Once I have p(x), I multiply both sides of DE by it.
Then I'm supposed to "recognize" that left side is a derivative, so taking integral of both sides just means taking integral of right side.
Once I do that, I'll have a C, so is that when I plug in the initial condition?
And then once I get C and substitue that number in, that's my particular solution?
Thanks!
Follow Math Help Forum on Facebook and Google+
2. #2
MHF Contributor
Prove It's Avatar
Joined
Aug 2008
Posts
12,209
Thanks
1722
You have gotten the DE to the point where
\frac{dy}{dx} + \left(\frac{1}{1 + x}\right)y = \frac{\cos{x}}{1 + x}
and so the integrating factor is e^{\int{\frac{1}{1 + x}\,dx}} = e^{\ln{(1 + x)}} = 1 + x.
Multiplying through by the integrating factor gives
(1 + x)\frac{dy}{dx} + y = \cos{x}
\frac{d}{dx}[(1 + x)y] = \cos{x}
(1 + x)y = \int{\cos{x}\,dx}
(1 + x)y = \sin{x} + C
y = \frac{\sin{x} + C}{1 + x}.
Plugging in the initial condition y(0) = 1 gives
1 = \frac{\sin{0} + C}{1 + 0}
1 = \frac{0 + C}{1}
1 = C.
Therefore y = \frac{\sin{x} + 1}{1 + x}.
Follow Math Help Forum on Facebook and Google+
Similar Math Help Forum Discussions
1. Series Solution to Second Order Linear ODE
Posted in the Differential Equations Forum
Replies: 8
Last Post: December 4th 2010, 01:45 PM
2. Find a second solution, given one. Reduction of order
Posted in the Differential Equations Forum
Replies: 1
Last Post: October 11th 2010, 03:37 PM
3. Replies: 0
Last Post: April 26th 2010, 07:56 AM
4. Find a solution of the second-order IVP
Posted in the Differential Equations Forum
Replies: 2
Last Post: December 2nd 2009, 09:40 PM
5. general solution to linear first order differential equations
Posted in the Differential Equations Forum
Replies: 3
Last Post: February 4th 2009, 08:58 PM
Search Tags
/mathhelpforum @mathhelpforum | {
"url": "http://mathhelpforum.com/differential-equations/156396-find-particular-solution-first-order-linear-de.html",
"source_domain": "mathhelpforum.com",
"snapshot_id": "crawl=CC-MAIN-2015-18",
"warc_metadata": {
"Content-Length": "39540",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AQP42CW2LN2NHWSSEULI6ANDAYQ5J6YC",
"WARC-Concurrent-To": "<urn:uuid:6adf948d-9823-4a35-834e-afe55bee9bb6>",
"WARC-Date": "2015-05-05T08:35:04Z",
"WARC-IP-Address": "66.114.149.59",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:NXC3JZOIEAY2DTVU4RTLHNNK247RPF7D",
"WARC-Record-ID": "<urn:uuid:1cc701bf-3963-4d75-8522-354f8bdc949a>",
"WARC-Target-URI": "http://mathhelpforum.com/differential-equations/156396-find-particular-solution-first-order-linear-de.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:41989f81-769a-43cf-887f-760825758b66>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-235-10-82.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-18\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
1,
2,
22,
23,
86,
87,
95,
106,
117,
130,
140,
146,
147,
214,
215,
253,
254,
274,
293,
317,
373,
695,
696,
753,
897,
898,
982,
1069,
1070,
1082,
1133,
1134,
1142,
1162,
1184,
1195,
1208,
1218,
1229,
1240,
1249,
1295,
1296,
1370,
1371,
1466,
1467,
1468,
1524,
1525,
1564,
1565,
1602,
1603,
1636,
1637,
1664,
1665,
1700,
1701,
1702,
1755,
1756,
1790,
1791,
1815,
1816,
1827,
1828,
1829,
1874,
1925,
1926,
1962,
1963,
2011,
2058,
2073,
2116,
2175,
2222,
2237,
2280,
2296,
2337,
2382,
2429,
2444,
2487,
2554,
2601,
2616,
2659,
2660,
2672,
2673,
2674
],
"line_end_idx": [
1,
2,
22,
23,
86,
87,
95,
106,
117,
130,
140,
146,
147,
214,
215,
253,
254,
274,
293,
317,
373,
695,
696,
753,
897,
898,
982,
1069,
1070,
1082,
1133,
1134,
1142,
1162,
1184,
1195,
1208,
1218,
1229,
1240,
1249,
1295,
1296,
1370,
1371,
1466,
1467,
1468,
1524,
1525,
1564,
1565,
1602,
1603,
1636,
1637,
1664,
1665,
1700,
1701,
1702,
1755,
1756,
1790,
1791,
1815,
1816,
1827,
1828,
1829,
1874,
1925,
1926,
1962,
1963,
2011,
2058,
2073,
2116,
2175,
2222,
2237,
2280,
2296,
2337,
2382,
2429,
2444,
2487,
2554,
2601,
2616,
2659,
2660,
2672,
2673,
2674,
2703
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2703,
"ccnet_original_nlines": 97,
"rps_doc_curly_bracket": 0.02441730909049511,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.25178825855255127,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05007153004407883,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.413447767496109,
"rps_doc_frac_unique_words": 0.47869673371315,
"rps_doc_mean_word_length": 4.3408522605896,
"rps_doc_num_sentences": 24,
"rps_doc_symbol_to_word_ratio": 0.007153079845011234,
"rps_doc_unigram_entropy": 4.933669567108154,
"rps_doc_word_count": 399,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.19515012204647064,
"rps_doc_frac_chars_dupe_6grams": 0.19515012204647064,
"rps_doc_frac_chars_dupe_7grams": 0.19515012204647064,
"rps_doc_frac_chars_dupe_8grams": 0.09353349357843399,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.017321020364761353,
"rps_doc_frac_chars_top_3gram": 0.02540416084229946,
"rps_doc_frac_chars_top_4gram": 0.0531177781522274,
"rps_doc_books_importance": -348.73016357421875,
"rps_doc_books_importance_length_correction": -348.73016357421875,
"rps_doc_openwebtext_importance": -209.87576293945312,
"rps_doc_openwebtext_importance_length_correction": -209.87576293945312,
"rps_doc_wikipedia_importance": -168.2886505126953,
"rps_doc_wikipedia_importance_length_correction": -168.2886505126953
},
"fasttext": {
"dclm": 0.10457391291856766,
"english": 0.8804324865341187,
"fineweb_edu_approx": 1.3892966508865356,
"eai_general_math": 0.6451727747917175,
"eai_open_web_math": 0.8698177933692932,
"eai_web_code": 0.000015020000319054816
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "515.352",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Calculus and Mathematical analysis"
}
},
"secondary": {
"code": "510.71",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,501,261,144,323,109,000 | How to Install Redis Server in CentOS and Debian Based Systems
Redis is an open-source, high-performance and flexible in-memory data structure store (key-value format) – used as a database, cache and message broker. It is written in ANSI C and runs on most if not all Unix-like operating systems including Linux (recommended for deploying) without external dependencies.
It is feature-rich, supports multiple programming languages and data structures including strings, hashes, lists, sets, sorted sets with range queries, bitmaps among others.
Redis Features:
• Supports most programming languages including C, Bash, Python, PHP, Node.js, Perl, Ruby just to mention but a few.
• Has inherent replication, Lua scripting, LRU eviction, transactions as well as varying levels of on-disk persistence.
• Provides high availability through Redis Sentinel and automatic partitioning via Redis Cluster.
• Supports running atomic operations.
• It works with an in-memory dataset to attain remarkable performance.
• Supports trivial-to-setup master-slave asynchronous replication.
• Supports automatic failover.
• Enables you to save the dataset to disk infrequently for a given period of time, or by appending each command to a log.
• Allows optional disabling of persistence.
• Supports publish/subscribe messaging.
• It also supports MULTI, EXEC, DISCARD and WATCH transactions and many more.
Requirements:
1. A CentOS 7 Server and RHEL 7 Server with Minimal Install
2. A Ubuntu Server or Debian Server with Minimal Install
3. GCC compiler and libc
In this tutorial, we will provide instructions on how to install a Redis Server from source (which is the recommended method) in Linux. We will also show how to configure, manage and secure Redis. Since Redis serves all data from memory, we strongly suggest using a high memory VPS Server with this guide.
Step 1: Install Redis Server from Source
1. First, install the required build dependencies.
--------------- On CentOS / RHEL / Fedora ---------------
# yum groupinstall "Development Tools"
# dnf groupinstall "Development Tools"
--------------- On Debian / Ubuntu ---------------
$ sudo apt install build-essential
2. Next, download and compile the latest stable Redis version using the special URL that always points to the latest stable Redis using wget command.
$ wget -c http://download.redis.io/redis-stable.tar.gz
$ tar -xvzf redis-stable.tar.gz
$ cd redis-stable
$ make
$ make test
$ sudo make install
3. After the Redis compilation the src directory inside the Redis distribution is populated with the different following executables that are part of Redis:
• redis-server – redis server.
• redis-sentinel – redis sentinel executable (monitoring and failover).
• redis-cli – a CLI utility to interact with redis.
• redis-benchmark – used to check redis performances.
• redis-check-aof and redis-check-dump – useful in the rare event of corrupted data files.
Step 2: Configure Redis Server in Linux
4. Next, you need to configure Redis for a development environment to be managed by the init system (systemd for the purpose of this tutorial). Start by creating the necessary directories for storing Redis config files and your data:
$ sudo mkdir /etc/redis
$ sudo mkdir -p /var/redis/
4. Then copy the template Redis configuration file provided, into the directory you created above.
$ sudo cp redis.conf /etc/redis/
5. Now open the configuration file and update a few settings as follows.
$ sudo vi /etc/redis/redis.conf
6. Next search for the following options, then change (or use) their default values according to your local environment needs.
port 6379 #default port is already 6379.
daemonize yes #run as a daemon
supervised systemd #signal systemd
pidfile /var/run/redis.pid #specify pid file
loglevel notice #server verbosity level
logfile /var/log/redis.log #log file name
dir /var/redis/ #redis directory
Step 3: Create Redis Systemd Unit File
7. Now you need to create a systemd unit file for redis in order to control the daemon, by running the following command.
$ sudo vi /etc/systemd/system/redis.service
And add the configuration below:
[Unit]
Description=Redis In-Memory Data Store
After=network.target
[Service]
User=root
Group=root
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always
Type=forking
[Install]
WantedBy=multi-user.target
Save and close the file.
Step 4: Manage and Test Redis Server in Linux
8. Once you have performed all the necessary configurations, you can now start the Redis server, for now, enable it to auto-start at system boot; then view its status as follows.
$ sudo systemctl start redis
$ sudo systemctl enable redis
$ sudo systemctl status redis
9. Next, test if the whole redis setup is working fine. To interact with redis server, use the redis-cli command. After connecting to the server, try running a few commands.
$ redis-cli
Test connection to server using ping command:
127.0.0.1:6379> ping
Use the echo command to echo a given string:
127.0.0.1:6379> echo "Tecmint is testing Redis"
You can also set a key value using the set command like this:
127.0.0.1:6379> set mykey "Tecmint is testing Redis"
Now view the value of mykey:
127.0.0.1:6379> get mykey
10. Then close the connection with the exit command, and restart the redis server. Afterward, check if mykey is still stored on the server as shown below:
127.0.0.1:6379> exit
$ sudo systemctl restart redis
$ redis-cli
127.0.0.1:6379> get mykey
11. To delete a key, use the delete command as follows:
127.0.0.1:6379> del mykey
127.0.0.1:6379> get mykey
Step 5: Securing Redis Server in Linux
12. This section is intended for users who intend to use a redis server connected to an external network like the Internet.
Important: Exposing redis to the Internet without any security makes it extremely easy to exploit; therefore secure the redis server as follows:
• block connections to the redis port in the system firewalled
• set bind directive to loopback interface: 127.0.0.1
• set requirepass option so that clients will be required to authenticate using the AUTH command.
• setup SSL tunneling to encrypt traffic between Redis servers and Redis clients.
For more usage information, run the command below:
$ redis-cli -h
You can find more server commands and learn how to use redis within your application from the Redis Homepage: https://redis.io/
In this tutorial, we showed how to install, configure, manage as well as secure Redis in Linux. To share any thoughts, use the comment form below.
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.
Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.
7 thoughts on “How to Install Redis Server in CentOS and Debian Based Systems”
1. Very nice article, although there is a small mistake, in the service file ‘/etc/systemd/system/redis.service‘, the following line:
Type=Forking
should be:
Type=forking
It needs to be lower-cased.
Reply
2. Not working for me:
3589:C 25 Aug 22:52:53.868 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3589:C 25 Aug 22:52:53.868 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=3589, just started
3589:C 25 Aug 22:52:53.868 # Configuration loaded
3589:C 25 Aug 22:52:53.868 # systemd supervision requested, but NOTIFY_SOCKET not found
3590:M 25 Aug 22:52:53.869 * Increased maximum number of open files to 10032 (it was originally set to 1024).
Reply
Got something to say? Join the discussion.
Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.
Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users. | {
"url": "https://www.tecmint.com/install-redis-server-in-centos-ubuntu-debian/",
"source_domain": "www.tecmint.com",
"snapshot_id": "CC-MAIN-2023-50",
"warc_metadata": {
"Content-Length": "154737",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7EEBBDF6QRIMAP7WKXNFSER764I6ZKZ2",
"WARC-Concurrent-To": "<urn:uuid:63b35cd1-5a0c-4a4f-a59c-d02d5735d12d>",
"WARC-Date": "2023-12-04T19:50:39Z",
"WARC-IP-Address": "104.26.2.23",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:V7NNVKZP5GCUI3LKITFIFTOVA4EAZS26",
"WARC-Record-ID": "<urn:uuid:dd70b4d7-c8c8-4b38-9242-d4a0d2c9c666>",
"WARC-Target-URI": "https://www.tecmint.com/install-redis-server-in-centos-ubuntu-debian/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:58b56d8c-3208-46c6-9396-255dcf21b3fa>"
},
"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 ([email protected])\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.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,
372,
373,
547,
548,
564,
565,
684,
806,
906,
946,
1019,
1088,
1121,
1245,
1291,
1333,
1413,
1414,
1428,
1429,
1491,
1550,
1577,
1578,
1884,
1885,
1926,
1927,
1978,
1979,
2038,
2077,
2116,
2117,
2169,
2204,
2205,
2355,
2356,
2411,
2443,
2461,
2469,
2481,
2501,
2502,
2659,
2660,
2693,
2767,
2821,
2877,
2970,
2971,
3011,
3012,
3246,
3247,
3271,
3299,
3300,
3399,
3400,
3433,
3434,
3507,
3508,
3540,
3541,
3668,
3669,
3715,
3749,
3786,
3833,
3876,
3919,
3955,
3956,
3995,
3996,
4118,
4119,
4163,
4164,
4197,
4198,
4205,
4244,
4265,
4266,
4276,
4286,
4297,
4357,
4400,
4415,
4428,
4429,
4439,
4466,
4467,
4492,
4493,
4539,
4540,
4719,
4720,
4749,
4779,
4809,
4810,
4984,
4985,
4997,
5043,
5064,
5109,
5157,
5219,
5272,
5301,
5327,
5328,
5483,
5484,
5505,
5536,
5548,
5574,
5575,
5631,
5632,
5658,
5684,
5685,
5724,
5725,
5849,
5850,
5995,
5996,
6061,
6117,
6217,
6301,
6302,
6353,
6354,
6369,
6370,
6498,
6499,
6646,
6647,
6658,
6868,
6869,
7003,
7004,
7093,
7186,
7187,
7266,
7267,
7403,
7404,
7421,
7426,
7427,
7442,
7443,
7460,
7465,
7466,
7498,
7499,
7509,
7534,
7613,
7728,
7782,
7874,
7988,
7989,
7999,
8000,
8043,
8044,
8345,
8346
],
"line_end_idx": [
63,
64,
372,
373,
547,
548,
564,
565,
684,
806,
906,
946,
1019,
1088,
1121,
1245,
1291,
1333,
1413,
1414,
1428,
1429,
1491,
1550,
1577,
1578,
1884,
1885,
1926,
1927,
1978,
1979,
2038,
2077,
2116,
2117,
2169,
2204,
2205,
2355,
2356,
2411,
2443,
2461,
2469,
2481,
2501,
2502,
2659,
2660,
2693,
2767,
2821,
2877,
2970,
2971,
3011,
3012,
3246,
3247,
3271,
3299,
3300,
3399,
3400,
3433,
3434,
3507,
3508,
3540,
3541,
3668,
3669,
3715,
3749,
3786,
3833,
3876,
3919,
3955,
3956,
3995,
3996,
4118,
4119,
4163,
4164,
4197,
4198,
4205,
4244,
4265,
4266,
4276,
4286,
4297,
4357,
4400,
4415,
4428,
4429,
4439,
4466,
4467,
4492,
4493,
4539,
4540,
4719,
4720,
4749,
4779,
4809,
4810,
4984,
4985,
4997,
5043,
5064,
5109,
5157,
5219,
5272,
5301,
5327,
5328,
5483,
5484,
5505,
5536,
5548,
5574,
5575,
5631,
5632,
5658,
5684,
5685,
5724,
5725,
5849,
5850,
5995,
5996,
6061,
6117,
6217,
6301,
6302,
6353,
6354,
6369,
6370,
6498,
6499,
6646,
6647,
6658,
6868,
6869,
7003,
7004,
7093,
7186,
7187,
7266,
7267,
7403,
7404,
7421,
7426,
7427,
7442,
7443,
7460,
7465,
7466,
7498,
7499,
7509,
7534,
7613,
7728,
7782,
7874,
7988,
7989,
7999,
8000,
8043,
8044,
8345,
8346,
8504
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 8504,
"ccnet_original_nlines": 193,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.24101713299751282,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01603095978498459,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.30071863532066345,
"rps_doc_frac_unique_words": 0.4266239106655121,
"rps_doc_mean_word_length": 5.266239166259766,
"rps_doc_num_sentences": 126,
"rps_doc_symbol_to_word_ratio": 0.007186289876699448,
"rps_doc_unigram_entropy": 5.640361785888672,
"rps_doc_word_count": 1247,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.012791230343282223,
"rps_doc_frac_chars_dupe_6grams": 0.012791230343282223,
"rps_doc_frac_chars_dupe_7grams": 0.012791230343282223,
"rps_doc_frac_chars_dupe_8grams": 0.012791230343282223,
"rps_doc_frac_chars_dupe_9grams": 0.012791230343282223,
"rps_doc_frac_chars_top_2gram": 0.021775539964437485,
"rps_doc_frac_chars_top_3gram": 0.009897969663143158,
"rps_doc_frac_chars_top_4gram": 0.011573020368814468,
"rps_doc_books_importance": -765.4501342773438,
"rps_doc_books_importance_length_correction": -765.4501342773438,
"rps_doc_openwebtext_importance": -413.4208679199219,
"rps_doc_openwebtext_importance_length_correction": -413.4208679199219,
"rps_doc_wikipedia_importance": -285.662109375,
"rps_doc_wikipedia_importance_length_correction": -285.662109375
},
"fasttext": {
"dclm": 0.02030801959335804,
"english": 0.7985496520996094,
"fineweb_edu_approx": 1.8911415338516235,
"eai_general_math": 0.18467485904693604,
"eai_open_web_math": 0.08596658706665039,
"eai_web_code": 0.21484267711639404
}
} | {
"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": "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": "-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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,150,774,138,749,086,000 | back to article Who's laughing now, doubters? Cloud makers rake in £75bn in sales
Global cloud revenues jumped 28 per cent year-on-year to reach $110bn (£75bn) in the 12 months to September 2015. Totting up the numbers is Synergy Research, which tracks vendor revenues in six cloud services and infrastructure areas. These are: Public IaaS/PaaS, Private and Hybrid, SaaS, UCaaS, Public Cloud, Private Cloud. …
1. A Non e-mouse Silver badge
Profit
Yeah, £75bn is sales does sound impressive. But what really counts is: What's the profit? That's what the money people really care about. Your £75bn is pointless if you're making naff all profit (or even a loss!)
1. Lusty
Re: Profit
Normally revenue figures are a good thing because they represent huge employment. FoxConn for instance don't have to make a profit to be "good" because they employ a small nations worth of people who would otherwise not have a job.
Unfortunately cloud only needs 5 people so that's not the case here.
2. Anonymous Coward
Anonymous Coward
Re: Profit
It appears they are including public and private cloud, meaning everything in IT. The give away is that HP and Cisco are leaders, but they have no cloud services... just slapping a piece of tape with 'cloud' written on it on a server.... It appears that AWS and Microsoft Azure, not so much the rest, are growing rapidly though. Quickly becoming a two horse race.
1. Lusty
Re: Profit
Microsoft starting Azure made it a two horse race. I have yet to see a third serious option. Google don't seem to have any interest in a general purpose cloud but otherwise would probably have been option 3 by now. In theory IBM/Oracle are options but skewed so massively to their customer and technology base as to be no use to most people but I can certainly see MainFrame As A Service (ZaaS?) being a long term thing so that people can do hybrid architecture clouds with both architectures being not on premises.
2. Anonymous Coward
Anonymous Coward
Cloud pricing
is very predatory.
A race to the bottom to get market share (where have we seen that before eh?)
is not sustainable in the long run.
Before long, the shareholders will start to demand payback. What then to all those companies suckered into the 'hey look how cheap we are' honey trap eh?
There will be blood and a lot of it. Some customers may find them going to the wall when their cloud supplier pulls the plug on them.
Don't go there people (with anything that is critical to your business continuity)
sure we use AWS for our build servers but the Git repo is mirroed back to corporate HQ. So if Amazon pulls the plug or our beancounters deem it too expensive we are ok. Well, apart from provisioning a few white box PC's but that should not take more than a couple of days.
does your company have such a fallback plan? If not why not? Got you head stuck in the sand then?
1. Anonymous Coward
Anonymous Coward
Re: Cloud pricing
Yes, plan in place. Use AWS and Azure, with geo-replication of data for additional backup and redundancy. Next question?
1. Anonymous Coward
Anonymous Coward
Re: Cloud pricing
Maybe, but public cloud should be inherently less costly than on prem. Three reasons: 1) They white box all of their gear, instead of paying EMC, Cisco, VMware, HP, etc a fortune. 2) They have hired a handful of Stanford Ph.Ds to full automate provisioning so there is close to zero manual intervention in the builds. 3) They have enormous economies of scale.... The prices may go up, but I doubt they go up too much or someone else steps in and undercuts them again.
1. Lusty
Re: Cloud pricing
Not true. Public cloud is cheaper than badly implemented infrastructure, but should be cost neutral with well implemented infrastructure since the provider is performing maintainance etc. on your behalf. Just because it's big doesn't mean economies of scale - there is very little profit in a server sale these days so "white box" is a myth, especially when you realise that cloud providers then have to write their own management stack because that's normally the vendors job. In order to get to zero intervention there is a whole chunk of work to do up front which needs teams of staff to create and maintain. They do have people who know their stuff, and are paying handsomely for those staff, but to say it's a handful of PHDs is just daft. They also have an army of networking staff, config staff, build staff, and architects not only for the compute but the facilities as well. Not to mention that public clouds are very much in focus and having to pander to eco warrior whims and so are not buying the cheap electric the rest of us are using. In fact, all the extra things they need to design into a facility probably makes it system for system more expensive than you could do it internally.
3. Ole Juul
Who's laughing now?
Me.
(and a lot of other guys too)
4. Tony S
@ A non e-mouse
In my first year of management training, I was told "Turnover is vanity, profit is sanity". It has been true since the dawn of human commerce, but there are still people that refuse to learn this particular lesson.
As for the performance of cloud providers; currently working with one that is doing a pretty poor job, considering how much we are paying them. They seem incapable of providing a secure or stable service; we won't see 99.9% uptime this year (might even be less than 99% uptime).
We could buy our own hardware in two months, software in another two, train staff for the cost of month 5, and then host it ourselves; and save the company a substantial amount after that. Plus, I wouldn't have to have 2 pointless weekly meetings where I raise complaints, they promise to look into it and do nothing.
1. Erewhon
Amazon turnover is Billions. They make no profit.
Of course it's a tax dodge but it's a business model most Internet firms use.
Of course the old 'making a profit = successful business' intuitively makes sense. But in the the dotcom 2.0 bullshit it's about being 'worth' billions without making any actual profit.
1. Anonymous Coward
Anonymous Coward
http://techcrunch.com/2015/07/23/amazons-aws-unit-reports-q2-revenue-of-1-8b-391m-profit/
"AWS profit in Q2 quarter was $391 million, a significant increase from the $77 million it reported for the year-ago quarter and even the $265 million in the last quarter."
Got a towel handy to wipe all that egg off your face?
1. Anonymous Coward
Anonymous Coward
Please show me how much Amazon turnover and profit was made from services out of the UK and how much tax they paid.
The answer is Billions in turnover and they claim to have made no profit on that, so they paid virtually nothing in tax.
1. Anonymous Coward
Anonymous Coward
Who mentioned the UK? Erewhon made a blanket statement that they make no profit, which is quite clearly incorrect. Where they declare the profit wasn't being discussed.
5. Mage Silver badge
Devil
Cloud sales: Not new
How many users are really saving by using these services instead of their own?
The issue though isn't money. If it's not profitable it's not sustainable sales price. If it is very profitable, then many people can do it cheaper themselves. It's not like buying pay TV which if you think you need it, you can't make your own.
The real issue is should people be using the cloud at all, other than temporary files or ad hoc collaboration of non-critical nature.
Core Business functions shouldn't be outsourced.
What strategy is there if you lose internet connection, so called cloud provider goes down?
Privacy? Security? Backups?
The cloud is a hype and buzz world. The services are as old as shared computers. It's not a new business but a 50+ year old one that for 20 years has been migrating from expensive secure leased lines to insecure and unknown up time internet connections to access it.
6. Ken Moorhouse Silver badge
Bubbles...
...often used to describe faddish things that are prone to being burst. As in... South Sea, Dot Com, for example.
This might sound like an odd analogy, but to my warped mind the current scramble to The Cloud is similar to the lead-up to the financial crisis a few years ago. People in finance were irresponsible in offering mortgages to people who didn't have the resources to pay them back. As I understand it they were doing so by bulking up the bad payers with the good payers and saying "overall, you don't have a problem" to the ultimate providers of the wonga.
What we have with The Cloud are providers saying "don't worry about the details, we'll take care of your data, rest assured." The owners of that data seem to think that "out of sight, out of mind" is a prudent enough policy for storing their data, and that "nice man who offered to keep it safe with Azure knows what he's talking about", but if it disappears or gets hacked, it is they themselves that are responsible for that loss. I am sorry, but you can not push that responsibility for your data onto a third-party.
1. Anonymous Coward
Anonymous Coward
Re: Bubbles...
There is also the very old but true saying that a fool and his money are soon parted. That appears to be what we are seeing here especially now we are seeing ddos attacks on some suppliers.
7. Anonymous Coward
Anonymous Coward
Public Cloud Sales?
So private cloud services are just network and mainframe systems relabelled. We should deduct that from the £75bn since it's plainly marketing chaff.
Also SaaS ransomware sales are simply because people haven't found an alternative yet or stuck in their industries orthodoxy (1 example: adobe photoshop). Think this should also be deducted since it is misleading.
So how much was really spent on the cloudy snake oil industry and how much of that is from companies trying to sell cloud services (pyramid scheme) or one off short-term usage?
For an end user the public cloud is at best a short term fix for an emergency shortfall in resources which is a one off hit, if your company is run properly. The risks, exposure and loss of control can not warrant a sustainable model and any company that says otherwise is either trying to sell the cloudy snake oil or in serious trouble (short term spends and asset avoidance due to tricky finance issues).
8. Tezfair
Thumb Down
So....
As a reseller, I put my clients into the cloud, take a small profit and then never sell anything to them ever again. Good business model for me - not
1. Erewhon
Re: So....
Resellers no longer offer any added value when you can buy direct from source. One less middle man taking a cut.
1. Ken Moorhouse Silver badge
Re: Resellers no longer offer any added value
IT as a Commodity. This is the way the industry seems to want to move. I say "careful what you wish for".
Data and its Ownership cannot be wrapped up in little packages wrapped with a nice little bow in this kind of way. Data is Difficult. This has been demonstrated time and again with various data breaches that have occurred. Yet this is the way Cloud is being sold, by glossing over the security aspects.
My earlier post, maybe I didn't explain myself too well, but the intention was to draw a parallel between the statistical likelihood of a loan not being paid off, and a security breach affecting a customer's data being infinitesimally small. Fractions of a percent might seem small, but that percentage can equate to a lot of people with the scaling being talked about. The added gotcha with data though, is that once your precious confidential data is out there, plastered all over the web, there is no ability to revoke the publication of it.
But security is about the rightful owner having access to it as well, (losing the key to your safe is a security issue, right?), well I'm aware of cases where the rightful owner cannot access their data, and I understand the Cloud is ok for uploading data, but to pay to remove it? Something is wrong with that charging model, but it is only when this needs to happen that it will be realised this is a big issue (extending the finance analogy, is this not comparable to a run on a bank, when people decide en masse to withdraw their money?)
1. allthecoolshortnamesweretaken
Re: Resellers no longer offer any added value
Good point, especially the bank analogy. "Who should I trust with my data?" is a question exactly as important as "Who should I trust with my money?".
9. amanfromMars 1 Silver badge
How much is made and lost with VaaDS ‽ .... The Bull in the China Shop and Elephant in the Room
If stock markets and currencies rise and/or maintained at unrealistic levels on the basis of false information and perverse analyses, government supported and institutionally provided to conceal melting markets, is that a criminal ponzi and Vapourware as a DisService?
Or is it just the way business uses and abuses punters in capitalism and treats itself freely to consumer goodies?
VaaDSSuppliers have a right need to know, as do y'all too if the truth be told.
POST COMMENT House rules
Not a member of The Register? Create a new account here.
• Enter your comment
• Add an icon
Anonymous cowards cannot choose their icon
Biting the hand that feeds IT © 1998–2022 | {
"url": "https://forums.theregister.com/forum/1/2016/01/08/global_cloud_revenues_2015_growth/",
"source_domain": "forums.theregister.com",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "96439",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RIZ62VVLAB6UWRDMOYD7V5GZOJ2LHSLY",
"WARC-Concurrent-To": "<urn:uuid:c05b5423-a8fa-4951-b566-e48a32282611>",
"WARC-Date": "2022-05-27T05:27:52Z",
"WARC-IP-Address": "104.18.5.22",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:LKQQC7CYG3ZOUETQZSV5NX7C4TSOVYCO",
"WARC-Record-ID": "<urn:uuid:e49a3a3a-b3d9-4b01-b333-193e3185f518>",
"WARC-Target-URI": "https://forums.theregister.com/forum/1/2016/01/08/global_cloud_revenues_2015_growth/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:600fcd52-fb61-4996-bcb0-48be00972ea7>"
},
"warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-61\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,
82,
83,
411,
412,
444,
445,
456,
457,
674,
675,
688,
689,
706,
707,
945,
946,
1021,
1022,
1046,
1069,
1070,
1087,
1088,
1458,
1459,
1474,
1475,
1494,
1495,
2019,
2020,
2042,
2063,
2064,
2082,
2083,
2106,
2107,
2189,
2190,
2230,
2231,
2389,
2390,
2528,
2529,
2616,
2617,
2894,
2895,
2997,
2998,
3022,
3045,
3046,
3070,
3071,
3198,
3199,
3225,
3250,
3251,
3277,
3278,
3754,
3755,
3772,
3773,
3801,
3802,
5012,
5013,
5027,
5028,
5052,
5053,
5061,
5062,
5096,
5097,
5109,
5110,
5130,
5131,
5350,
5351,
5634,
5635,
5957,
5958,
5973,
5974,
6030,
6031,
6115,
6116,
6308,
6309,
6335,
6360,
6361,
6459,
6460,
6641,
6642,
6704,
6705,
6733,
6760,
6761,
6887,
6888,
7019,
7020,
7050,
7079,
7080,
7261,
7262,
7285,
7295,
7296,
7321,
7322,
7405,
7406,
7655,
7656,
7794,
7795,
7848,
7849,
7945,
7946,
7978,
7979,
8250,
8251,
8283,
8284,
8299,
8300,
8418,
8419,
8876,
8877,
9401,
9402,
9426,
9449,
9450,
9471,
9472,
9668,
9669,
9691,
9712,
9713,
9737,
9738,
9892,
9893,
10111,
10112,
10293,
10294,
10706,
10707,
10720,
10735,
10736,
10747,
10748,
10902,
10903,
10918,
10919,
10936,
10937,
11056,
11057,
11093,
11094,
11148,
11149,
11263,
11264,
11575,
11576,
12129,
12130,
12680,
12681,
12722,
12723,
12779,
12780,
12941,
12942,
12975,
12976,
13076,
13077,
13350,
13351,
13470,
13471,
13555,
13556,
13581,
13582,
13639,
13640,
13663,
13664,
13680,
13681,
13724,
13725
],
"line_end_idx": [
82,
83,
411,
412,
444,
445,
456,
457,
674,
675,
688,
689,
706,
707,
945,
946,
1021,
1022,
1046,
1069,
1070,
1087,
1088,
1458,
1459,
1474,
1475,
1494,
1495,
2019,
2020,
2042,
2063,
2064,
2082,
2083,
2106,
2107,
2189,
2190,
2230,
2231,
2389,
2390,
2528,
2529,
2616,
2617,
2894,
2895,
2997,
2998,
3022,
3045,
3046,
3070,
3071,
3198,
3199,
3225,
3250,
3251,
3277,
3278,
3754,
3755,
3772,
3773,
3801,
3802,
5012,
5013,
5027,
5028,
5052,
5053,
5061,
5062,
5096,
5097,
5109,
5110,
5130,
5131,
5350,
5351,
5634,
5635,
5957,
5958,
5973,
5974,
6030,
6031,
6115,
6116,
6308,
6309,
6335,
6360,
6361,
6459,
6460,
6641,
6642,
6704,
6705,
6733,
6760,
6761,
6887,
6888,
7019,
7020,
7050,
7079,
7080,
7261,
7262,
7285,
7295,
7296,
7321,
7322,
7405,
7406,
7655,
7656,
7794,
7795,
7848,
7849,
7945,
7946,
7978,
7979,
8250,
8251,
8283,
8284,
8299,
8300,
8418,
8419,
8876,
8877,
9401,
9402,
9426,
9449,
9450,
9471,
9472,
9668,
9669,
9691,
9712,
9713,
9737,
9738,
9892,
9893,
10111,
10112,
10293,
10294,
10706,
10707,
10720,
10735,
10736,
10747,
10748,
10902,
10903,
10918,
10919,
10936,
10937,
11056,
11057,
11093,
11094,
11148,
11149,
11263,
11264,
11575,
11576,
12129,
12130,
12680,
12681,
12722,
12723,
12779,
12780,
12941,
12942,
12975,
12976,
13076,
13077,
13350,
13351,
13470,
13471,
13555,
13556,
13581,
13582,
13639,
13640,
13663,
13664,
13680,
13681,
13724,
13725,
13766
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 13766,
"ccnet_original_nlines": 219,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4319419264793396,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014156079851090908,
"rps_doc_frac_lines_end_with_ellipsis": 0.022727269679307938,
"rps_doc_frac_no_alph_words": 0.16007259488105774,
"rps_doc_frac_unique_words": 0.37146586179733276,
"rps_doc_mean_word_length": 4.498912334442139,
"rps_doc_num_sentences": 161,
"rps_doc_symbol_to_word_ratio": 0.00399274006485939,
"rps_doc_unigram_entropy": 5.922889709472656,
"rps_doc_word_count": 2299,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.041670698672533035,
"rps_doc_frac_chars_dupe_6grams": 0.026491349563002586,
"rps_doc_frac_chars_dupe_7grams": 0.01924007013440132,
"rps_doc_frac_chars_dupe_8grams": 0.015856130048632622,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.026104610413312912,
"rps_doc_frac_chars_top_3gram": 0.02088369056582451,
"rps_doc_frac_chars_top_4gram": 0.026104610413312912,
"rps_doc_books_importance": -1060.0069580078125,
"rps_doc_books_importance_length_correction": -1060.0069580078125,
"rps_doc_openwebtext_importance": -654.9999389648438,
"rps_doc_openwebtext_importance_length_correction": -654.9999389648438,
"rps_doc_wikipedia_importance": -489.7715148925781,
"rps_doc_wikipedia_importance_length_correction": -489.7715148925781
},
"fasttext": {
"dclm": 0.45015865564346313,
"english": 0.9696974754333496,
"fineweb_edu_approx": 1.4120312929153442,
"eai_general_math": 0.08613020181655884,
"eai_open_web_math": 0.14643853902816772,
"eai_web_code": 0.009463789872825146
}
} | {
"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": "338.0285",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Industries, Prices, and Microeconomics"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "5",
"label": "Comment Section"
},
"secondary": {
"code": "18",
"label": "Q&A Forum"
}
},
"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": "2",
"label": "Partially Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,811,103,509,231,230,500 | Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:
Sign up
Here's how it works:
1. Anybody can ask a question
2. Anybody can answer
3. The best answers are voted up and rise to the top
This business model is for a case management database. This is closely modeled on the idea of a file folder representing the phase and a sequential checklist representing the stages. A case consists of a phase that can have one or more stages. A phase can only have one stage that is "Current" or open at any one point in time. A case can only start from one type of stage but can progress to any one of a number of stages that are end types. In this business model there are many different types of phases and stages
An example: you apply for a license. The process always starts with you submitting a form but can have different endings: the application is approved or rejected or sent back for more information.
Edit: @Colin 't Hart asks what a phase is in relation to a case. Here is where trying to simplify a question can omit details. The complete schema structure is: - one case can have one or more phases but only one phase is open or "current" at at time. - each phase can have one or more stages but only one phase is open or "current" at a time. - there are different types of cases/phases/stages and transitions from the current unit to the next unit require adding a close date to the current and inserting a new record with an open date. An example: a production line for widgets
• a production ticket initiates the creation of the case
• the first phase: sourcing components is created
• the first stage: contacting suppliers is created
• the first stage is completed, the second stage: orders from suppliers is opened
• orders stage is closed, inventory check stage is created
• inventory stage is closed, sourcing components phase is closed
• new phase: assembly is opened
• new stage: move components to shop floor is opened
• moving components stage is closed, new stage production line is opened
• and so on....
Problem:
• the existing table structure is flawed in that the same information (what is the first type of stage for a kind of phase) is stored in two different tables
• You can have more than one entry in STAGE where IS_START_STAGE = 1 which violates a business rule
• You can insert a new entry into STAGE where IS_START_STAGE = 1 and this does not match the corresponding entry in PHASE_FIRST_STAGE
• the relationship should be something like constraint PHASE_FIRST_STAGE.STAGE_ID can only be in the entries in STAGE where IS_FIRST_STAGE = 1
• Is there anyway to enforce these business rules?
CREATE TABLE PHASE_FIRST_STAGE
(
PHASE_ID NUMBER(9) NOT NULL, --PRIMARY KEY and foreign key to PHASE
STAGE_ID NUMBER(9) NOT NULL, --FOREIGN KEY to STAGE table
);
ALTER TABLE PHASE_FIRST_STAGE ADD (CONSTRAINT PFS01
FOREIGN KEY (PHASE_ID)
REFERENCES PHASE (ID),
FOREIGN KEY (STAGE_ID)
REFERENCES STAGE (ID));
COMMENT ON TABLE PHASE_FIRST_STAGE IS 'Contains the default first stages to enter when a phase is entered.';
CREATE TABLE STAGE
(
ID NUMBER(9) NOT NULL, --PRIMARY KEY
PHASE_ID NUMBER(9) NOT NULL, --FOREIGN KEY to PHASE
DISABLED NUMBER(1) DEFAULT 0 NOT NULL, --CHECK IN (0,1)
IS_START_STAGE NUMBER(1),--CHECK IN (0,1)
IS_END_STAGE NUMBER(1) --CHECK IN (0,1)
);
COMMENT ON TABLE STAGE IS 'Contains all the stages a phase can have. Each stage must have only one phase. ';
--not shown is a similar table called PHASE with a one phase => many type of stage relationship
share|improve this question
If you have to add business logic in constraints, you can use triggers to enforce the business rules – Nicolas Durand Sep 17 '13 at 6:50
I find it very difficult to understand what you're describing and how the datamodel is supposed to solve the problem. Could you separate the two: first describe purely your business -- without refering to the data model, and then describe how your data model implements it? – Colin 't Hart Sep 24 '13 at 19:03
Can you give us examples of phases? I can understand how a case (for example, a driver's license application) could go through various stages (application, rejection, approval) but how do the phases come into it? – Colin 't Hart Sep 25 '13 at 8:50
Justin Cave's answer here and Tom Kyte's pointed me to a solution using a function based index. I think this can be made even simpler with some more thought but this works now:
CREATE OR REPLACE FUNCTION UNIQUE_START_STAGE (
phase_id_in IN NUMBER,
stage_id_in IN NUMBER)
RETURN NUMBER
DETERMINISTIC
IS
-- PURPOSE:enforce business logic that a phase can have only one stage where
-- the disabled field has a value of 0 and IS_START_STAGE has a value of 1
v_count NUMBER (9);
BEGIN
SELECT COUNT (s.id)
INTO v_count
FROM STAGE s
WHERE S.IS_START_STAGE = 1
AND s.disabled = 0
AND S.PHASE_ID = phase_id_in;
IF v_count = 1
THEN
--return the primary key if there is only one
v_count := stage_id_in;
ELSIF v_count < 1
THEN
v_count := NULL;
END IF;
RETURN v_count;
END UNIQUE_START_STAGE;
and then we create an index based the idea that there can only be one child stage that is enabled for a phase that is the start stage
CREATE UNIQUE INDEX unique_start_stage_idx
ON stage (
CASE
WHEN disabled = 1 THEN NULL
WHEN is_start_stage = 0 THEN NULL
ELSE UNIQUE_START_STAGE (phase_id, id)
END);
--and add the same constraint to the other table
CREATE UNIQUE INDEX unique_start_stage_idx2 ON PHASE_FIRST_STAGE ( UNIQUE_START_STAGE (phase_id, stage_id));
This solution partially solves the problem:
• it enforces that there is only one entry in STAGE for each value of PHASE_ID where IS_START_STAGE =1 and DISABLED = 0
• it enforces this same uniqueness in PHASE_FIRST_STAGE
• it does not enforce that an entry in STAGE is also in PHASE_FIRST_STAGE
• you could replace the PHASE_FIRST_STAGE table with a view of STAGE that cleans up the last issue
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://dba.stackexchange.com/questions/50004/enforce-a-constraint-problem",
"source_domain": "dba.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "78806",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:QRER2YJM67F2ABONRTYHIWKVWPRSS6GJ",
"WARC-Concurrent-To": "<urn:uuid:e205130d-efc8-4094-aa43-c820f93343a3>",
"WARC-Date": "2016-07-24T18:43:40Z",
"WARC-IP-Address": "151.101.65.69",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:P4I4LIOLQPV7KKO54KSK2Z2QJVMY2KLE",
"WARC-Record-ID": "<urn:uuid:1a712987-a83d-401d-b48d-dede0ecee76e>",
"WARC-Target-URI": "http://dba.stackexchange.com/questions/50004/enforce-a-constraint-problem",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:941deeb0-f537-474a-861a-b944af9ca06b>"
},
"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,
213,
214,
222,
243,
275,
299,
354,
355,
873,
874,
1071,
1072,
1653,
1654,
1713,
1765,
1818,
1902,
1963,
2030,
2064,
2119,
2194,
2212,
2213,
2222,
2223,
2383,
2485,
2621,
2766,
2819,
2820,
2851,
2853,
2943,
3024,
3027,
3079,
3105,
3130,
3156,
3182,
3291,
3292,
3311,
3313,
3376,
3449,
3528,
3583,
3638,
3641,
3642,
3751,
3847,
3875,
3880,
4017,
4022,
4332,
4337,
4585,
4586,
4763,
4764,
4812,
4840,
4868,
4885,
4902,
4905,
4983,
5059,
5060,
5085,
5091,
5114,
5132,
5150,
5185,
5214,
5254,
5255,
5271,
5277,
5328,
5357,
5377,
5384,
5406,
5416,
5417,
5436,
5460,
5461,
5595,
5596,
5639,
5653,
5664,
5701,
5744,
5792,
5804,
5805,
5854,
5855,
5964,
5965,
6009,
6010,
6132,
6190,
6266,
6367,
6393,
6394,
6406,
6407,
6409,
6417,
6418,
6496,
6497
],
"line_end_idx": [
213,
214,
222,
243,
275,
299,
354,
355,
873,
874,
1071,
1072,
1653,
1654,
1713,
1765,
1818,
1902,
1963,
2030,
2064,
2119,
2194,
2212,
2213,
2222,
2223,
2383,
2485,
2621,
2766,
2819,
2820,
2851,
2853,
2943,
3024,
3027,
3079,
3105,
3130,
3156,
3182,
3291,
3292,
3311,
3313,
3376,
3449,
3528,
3583,
3638,
3641,
3642,
3751,
3847,
3875,
3880,
4017,
4022,
4332,
4337,
4585,
4586,
4763,
4764,
4812,
4840,
4868,
4885,
4902,
4905,
4983,
5059,
5060,
5085,
5091,
5114,
5132,
5150,
5185,
5214,
5254,
5255,
5271,
5277,
5328,
5357,
5377,
5384,
5406,
5416,
5417,
5436,
5460,
5461,
5595,
5596,
5639,
5653,
5664,
5701,
5744,
5792,
5804,
5805,
5854,
5855,
5964,
5965,
6009,
6010,
6132,
6190,
6266,
6367,
6393,
6394,
6406,
6407,
6409,
6417,
6418,
6496,
6497,
6587
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6587,
"ccnet_original_nlines": 125,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.366007924079895,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.12648220360279083,
"rps_doc_frac_lines_end_with_ellipsis": 0.007936510257422924,
"rps_doc_frac_no_alph_words": 0.20158103108406067,
"rps_doc_frac_unique_words": 0.3272727429866791,
"rps_doc_mean_word_length": 4.636363506317139,
"rps_doc_num_sentences": 34,
"rps_doc_symbol_to_word_ratio": 0.0007905099773779511,
"rps_doc_unigram_entropy": 5.189208030700684,
"rps_doc_word_count": 1045,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06233229860663414,
"rps_doc_frac_chars_dupe_6grams": 0.04912281036376953,
"rps_doc_frac_chars_dupe_7grams": 0.013209490105509758,
"rps_doc_frac_chars_dupe_8grams": 0.013209490105509758,
"rps_doc_frac_chars_dupe_9grams": 0.013209490105509758,
"rps_doc_frac_chars_top_2gram": 0.008668730035424232,
"rps_doc_frac_chars_top_3gram": 0.00743034016340971,
"rps_doc_frac_chars_top_4gram": 0.00743034016340971,
"rps_doc_books_importance": -539.7023315429688,
"rps_doc_books_importance_length_correction": -539.7023315429688,
"rps_doc_openwebtext_importance": -264.0231628417969,
"rps_doc_openwebtext_importance_length_correction": -264.0231628417969,
"rps_doc_wikipedia_importance": -196.71168518066406,
"rps_doc_wikipedia_importance_length_correction": -196.71168518066406
},
"fasttext": {
"dclm": 0.21097546815872192,
"english": 0.8760236501693726,
"fineweb_edu_approx": 2.3404183387756348,
"eai_general_math": 0.18478411436080933,
"eai_open_web_math": 0.22324931621551514,
"eai_web_code": 0.07450509071350098
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.74",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,797,425,685,785,735,000 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I have a script in which a very long argument of type str is passed to a function:
parser = argparse.ArgumentParser(description='Auto-segments a text based on the TANGO algorithm (Rie Kubota Ando and Lillian Lee, "Mostly-Unsupervised Statistical Segmentation of Japanese Kanji Sequences" (Natural Language Engineering, 9(2):127-149, 2003)).')
I'd like to limit line length in this script to 79 chars, which means line breaking in the middle of the string in question. Simply wrapping at 79 yields something like this, which is syntactically ill-formed:
parser = argparse.ArgumentParser(description="Auto-segments a text based on
the TANGO algorithm (Rie Kubota Ando and Lillian Lee, 'Mostly-Unsupervis
ed Statistical Segmentation of Japanese Kanji Sequences' (Natural Langua
ge Engineering, 9(2):127-149, 2003)).")
PEP 8 has guidelines for breaking lines in various non-argument-string-internal locations, but is there a way to break the line in the middle of an argument string?
(Related but less important question: What is a sensible/conventional way to break natural language text mid-word inside a (python) script?)
share|improve this question
add comment
3 Answers
up vote 1 down vote accepted
Literal strings can appear next to each other, and will compile to a single string. Thus:
parser = argparse.ArgumentParser(description="Auto-segments a text based on "
"the TANGO algorithm (Rie Kubota Ando and Lillian Lee, 'Mostly-Unsupervised "
"Statistical Segmentation of Japanese Kanji Sequences' (Natural Language "
"Engineering, 9(2):127-149, 2003)).")
Adjust as desired to fit in 80.
share|improve this answer
add comment
>>>longarg = "ABCDEF\
GHIJKLMNOPQRSTUVW\
XYZ"
>>>print longarg
ABCDEFGHIJKLMNOPQRSTUVWXYZ
share|improve this answer
add comment
argparse reformats the description string anyway, so it won't change the result if you use a multiline string with extra spaces:
import argparse
parser = argparse.ArgumentParser(description='''Auto-segments a text based on the
TANGO algorithm (Rie Kubota Ando and Lillian Lee, "Mostly-Unsupervised
Statistical Segmentation of Japanese Kanji Sequences" (Natural Language
Engineering, 9(2):127-149, 2003)).''')
args = parser.parse_args()
% test.py -h
usage: test.py [-h]
Auto-segments a text based on the TANGO algorithm (Rie Kubota Ando and Lillian Lee,
"Mostly-Unsupervised Statistical Segmentation of Japanese Kanji Sequences" (Natural
Language Engineering, 9(2):127-149, 2003)).
optional arguments:
-h, --help show this help message and exit
share|improve this answer
add comment
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/15103042/wrapping-lines-in-python-breaking-on-an-argument-string",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-23",
"warc_metadata": {
"Content-Length": "71187",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MMJVWQXAGGYBLWVE36HFMIG3GDYHYWPN",
"WARC-Concurrent-To": "<urn:uuid:8503ea99-1627-4695-9500-6b0125fba152>",
"WARC-Date": "2014-07-12T16:49:54Z",
"WARC-IP-Address": "198.252.206.16",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:RXOKZVZBEI74U3QRQAATIAMRTXGXRWDE",
"WARC-Record-ID": "<urn:uuid:83fdded1-1a1d-4c31-ba1a-ea69088c075f>",
"WARC-Target-URI": "http://stackoverflow.com/questions/15103042/wrapping-lines-in-python-breaking-on-an-argument-string",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:55784942-9475-46a3-9022-27d8c23521f9>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-180-212-248.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-23\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for July 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,
25,
157,
158,
241,
242,
507,
508,
718,
719,
800,
881,
962,
1010,
1011,
1176,
1177,
1318,
1319,
1347,
1359,
1360,
1370,
1371,
1400,
1401,
1491,
1492,
1570,
1652,
1731,
1773,
1774,
1806,
1807,
1833,
1845,
1867,
1886,
1891,
1892,
1909,
1936,
1962,
1974,
1975,
2104,
2105,
2121,
2122,
2204,
2279,
2355,
2398,
2399,
2426,
2427,
2440,
2441,
2461,
2462,
2546,
2630,
2674,
2675,
2695,
2741,
2767,
2779,
2780,
2792,
2793,
2795,
2803,
2804,
2882,
2883
],
"line_end_idx": [
25,
157,
158,
241,
242,
507,
508,
718,
719,
800,
881,
962,
1010,
1011,
1176,
1177,
1318,
1319,
1347,
1359,
1360,
1370,
1371,
1400,
1401,
1491,
1492,
1570,
1652,
1731,
1773,
1774,
1806,
1807,
1833,
1845,
1867,
1886,
1891,
1892,
1909,
1936,
1962,
1974,
1975,
2104,
2105,
2121,
2122,
2204,
2279,
2355,
2398,
2399,
2426,
2427,
2440,
2441,
2461,
2462,
2546,
2630,
2674,
2675,
2695,
2741,
2767,
2779,
2780,
2792,
2793,
2795,
2803,
2804,
2882,
2883,
2973
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2973,
"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.23193277418613434,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.020168069750070572,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.30756303668022156,
"rps_doc_frac_unique_words": 0.4680306911468506,
"rps_doc_mean_word_length": 5.869565010070801,
"rps_doc_num_sentences": 22,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.8391265869140625,
"rps_doc_word_count": 391,
"rps_doc_frac_chars_dupe_10grams": 0.38823530077934265,
"rps_doc_frac_chars_dupe_5grams": 0.45359477400779724,
"rps_doc_frac_chars_dupe_6grams": 0.4117647111415863,
"rps_doc_frac_chars_dupe_7grams": 0.4117647111415863,
"rps_doc_frac_chars_dupe_8grams": 0.38823530077934265,
"rps_doc_frac_chars_dupe_9grams": 0.38823530077934265,
"rps_doc_frac_chars_top_2gram": 0.01089324988424778,
"rps_doc_frac_chars_top_3gram": 0.021786490455269814,
"rps_doc_frac_chars_top_4gram": 0.026143789291381836,
"rps_doc_books_importance": -283.8467102050781,
"rps_doc_books_importance_length_correction": -283.8467102050781,
"rps_doc_openwebtext_importance": -177.5426483154297,
"rps_doc_openwebtext_importance_length_correction": -177.5426483154297,
"rps_doc_wikipedia_importance": -117.18781280517578,
"rps_doc_wikipedia_importance_length_correction": -117.18781280517578
},
"fasttext": {
"dclm": 0.9355266094207764,
"english": 0.7737281918525696,
"fineweb_edu_approx": 2.5131120681762695,
"eai_general_math": 0.0037860299926251173,
"eai_open_web_math": 0.3386334180831909,
"eai_web_code": 0.000480179995065555
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,397,387,182,512,150,000 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I am facing this very weird problem, I have created a custom UITableViewCell on which I have a UIImageView on the left and on the right I have two UILabel.
When I run the program, I see all the image and the label appears on the table.
I have total of 5 rows that needs to be displayed
The only problem is the image starts displaying from the row 2 and goes upto row 6 where as the labels get displayed from row 1 to row 5.
Custom UITableViewCell .h file
@interface ProductViewCell : UITableViewCell {
IBOutlet UILabel *titleLabel;
IBOutlet UILabel *detailLabel;
IBOutlet UIImageView *imageView;
}
@property (nonatomic, retain) UILabel *titleLabel;
@property (nonatomic, retain) UILabel *detailLabel;
@property (nonatomic, retain) UIImageView *imageView;
And the UITableViewController that uses this is
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
ProductViewCell *cell = (ProductViewCell*)[tableView
dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"ProductViewCell" owner:self options:nil];
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (ProductViewCell *) currentObject;
break;
}
}
}
NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
cell.titleLabel.text = [dictionary objectForKey:@"name"];
cell.detailLabel.text = @"";
cell.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:
[NSURL URLWithString: [dictionary objectForKey:@"imageUrl"]]]];
return cell;
}
share|improve this question
some code would be helpful? – Aaron Saunders Oct 31 '10 at 20:40
Hi Aaron, added the code – Yogesh Oct 31 '10 at 21:16
add comment
2 Answers
up vote 1 down vote accepted
I solved the problem by doing this in my tableViewController
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 120.0; //returns floating point which will be used for a cell row height at specified row index }
share|improve this answer
add comment
Perhaps it has something to do with the fact that imageView shadows the UITableViewCell definition. I think that row 6 would be displayed only if your tableView:numberOfRowsInSection: returns 6. It also might be something stupid, like the contents of the tableDataSource ;)
share|improve this answer
No, the numberOfRowsInsection do return 5, and tableDataSource is also fine, mine suspect is it has to do with the content not fitting in the cell properly. I have been trying to increase the height of the row and things like that but it isn't helping me. – Yogesh Nov 1 '10 at 0:00
Check with IB that you don't have a rogue UIImageView in your custom cell. And check the dimensions and position of the UIImageView in general. It's really weird. – Roman Nov 1 '10 at 7:43
add comment
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/4064863/custom-uitableviewcell-image-doesnt-appear-in-the-first-row",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-10",
"warc_metadata": {
"Content-Length": "71596",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:S7UMCFOB2RZXSWSHXN43M2WPJI3EJFHC",
"WARC-Concurrent-To": "<urn:uuid:908ad7fc-dad1-466d-9555-f63877723807>",
"WARC-Date": "2014-03-16T01:29:56Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:WJ35WSEZGRNBDEKSPRZKRLPAJO7GIEF3",
"WARC-Record-ID": "<urn:uuid:f1b97768-b506-42cb-8fa5-536286bb52f5>",
"WARC-Target-URI": "http://stackoverflow.com/questions/4064863/custom-uitableviewcell-image-doesnt-appear-in-the-first-row",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8b132cff-590a-4283-b917-79c130067827>"
},
"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,
25,
157,
158,
314,
315,
395,
396,
446,
447,
585,
586,
617,
618,
665,
696,
728,
762,
764,
765,
817,
869,
923,
924,
972,
973,
1052,
1086,
1087,
1134,
1135,
1193,
1254,
1277,
1278,
1339,
1423,
1467,
1529,
1575,
1586,
1593,
1598,
1603,
1604,
1684,
1685,
1744,
1774,
1852,
1928,
1942,
1943,
1944,
1946,
1974,
1976,
2042,
2044,
2099,
2111,
2112,
2122,
2123,
2152,
2153,
2214,
2215,
2416,
2417,
2443,
2455,
2456,
2730,
2731,
2757,
2759,
3043,
3045,
3235,
3247,
3248,
3260,
3261,
3263,
3271,
3272,
3350,
3351
],
"line_end_idx": [
25,
157,
158,
314,
315,
395,
396,
446,
447,
585,
586,
617,
618,
665,
696,
728,
762,
764,
765,
817,
869,
923,
924,
972,
973,
1052,
1086,
1087,
1134,
1135,
1193,
1254,
1277,
1278,
1339,
1423,
1467,
1529,
1575,
1586,
1593,
1598,
1603,
1604,
1684,
1685,
1744,
1774,
1852,
1928,
1942,
1943,
1944,
1946,
1974,
1976,
2042,
2044,
2099,
2111,
2112,
2122,
2123,
2152,
2153,
2214,
2215,
2416,
2417,
2443,
2455,
2456,
2730,
2731,
2757,
2759,
3043,
3045,
3235,
3247,
3248,
3260,
3261,
3263,
3271,
3272,
3350,
3351,
3441
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3441,
"ccnet_original_nlines": 88,
"rps_doc_curly_bracket": 0.0034873599652200937,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2732919156551361,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018633540719747543,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.30434784293174744,
"rps_doc_frac_unique_words": 0.5202702879905701,
"rps_doc_mean_word_length": 5.889639854431152,
"rps_doc_num_sentences": 26,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.089827537536621,
"rps_doc_word_count": 444,
"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.009560230188071728,
"rps_doc_frac_chars_top_3gram": 0.026386229321360588,
"rps_doc_frac_chars_top_4gram": 0.022944549098610878,
"rps_doc_books_importance": -279.1836853027344,
"rps_doc_books_importance_length_correction": -279.1836853027344,
"rps_doc_openwebtext_importance": -154.07452392578125,
"rps_doc_openwebtext_importance_length_correction": -154.07452392578125,
"rps_doc_wikipedia_importance": -131.3188934326172,
"rps_doc_wikipedia_importance_length_correction": -131.3188934326172
},
"fasttext": {
"dclm": 0.2630923390388489,
"english": 0.7272652983665466,
"fineweb_edu_approx": 1.2640190124511719,
"eai_general_math": 0.010134579613804817,
"eai_open_web_math": 0.2889506220817566,
"eai_web_code": 0.0005846000276505947
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,721,880,106,557,831,000 | Re: problem with including .dll into current cpp program
Discussion in 'C++' started by Alex Jin, Jul 2, 2003.
1. Alex Jin
Alex Jin Guest
Actually, there are two methods for linking dll file.
1. static.
when linking dll file statically, windows system will be charge of
loading and unloading dll file. and the location of dll file should be
windows system folder or the one same as the *.exe file. as your dll file is
on remote machine, this method can't help you.
2. dynamic.
With this method, you will handle loading and unloading dll. it's more
flexiable than statically linking.
Suppose the following function in your dll file:
void dllFoo( char *pStr );
Please refer to the following for how to use this function:
/* file: use_dll.cpp */
#include <stdio.h>
#include <windows.h>
typedef void (*Typ_dllFoo)( char *pStr );
int main()
{
HMODULE hDll =
::LoadLibrary("\\\\atoc\\admin\\luebeck\\header\\debug\\bccld.dll");
if ( hDll == 0 )
{
printf("load dll fail\n");
exit(1);
}
Typ_dllFoo pFoo = (Typ_dllFoo)::GetProcAddress( hDll, "dllFoo");
if ( pFoo == 0 )
{
::FreeLibrary( hDll );
printf("get function address failed\n");
exit(1);
}
pFoo( "hello! that's ok!!" );
pFoo = 0;
::FreeLibrary( hDll );
return 0;
}
That's all !
Alex Jin.
"Bharath" <> wrote in message
news:...
> Hallo,
> I am having problem with including .dll file into current cpp
> program.Actually i have .dll file in our company server.
> example..the file is in this location ..
> //atoc/admin/luebeck/header/debug/bccld.dll
>
> then my problem is how i have to include this into the current cpp
> program and i should call some header file ,like dynamictable.h, in
> that dll.so please help me how to solve this problem.
>
> thankiny you,
> Bharath Kumar
Alex Jin, Jul 2, 2003
#1
1. Advertisements
2. Jack Klein
Jack Klein Guest
On Wed, 2 Jul 2003 17:14:26 +0800, "Alex Jin" <>
wrote in comp.lang.c++:
Please don't top post. Material you add goes after quoted material
you are responding to.
> Actually, there are two methods for linking dll file.
Please don't pollute comp.lang.c++ with off-topic answers.
Please cite the sections from the C++ language standard that define
these two methods for linking "dll" file. Or that specify linking or
"dll" at all.
If you can't, the appropriate response is to direct the OP to a proper
compiler-specific support group.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jack Klein, Jul 2, 2003
#2
1. Advertisements
Want to reply to this thread or ask your own question?
It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
1. DrUg13
Replies:
1
Views:
595
DrUg13
Feb 10, 2004
2. Alex Vinokur
Replies:
7
Views:
550
Greg Comeau
Nov 15, 2004
3. Vinu
Replies:
9
Views:
757
4. www.hitechskill.com
Replies:
0
Views:
1,492
www.hitechskill.com
Apr 9, 2006
5. none
Replies:
3
Views:
1,199
Michael Tsang
Mar 9, 2010
Loading...
Share This Page | {
"url": "http://www.thecodingforums.com/threads/re-problem-with-including-dll-into-current-cpp-program.267956/",
"source_domain": "www.thecodingforums.com",
"snapshot_id": "crawl=CC-MAIN-2015-40",
"warc_metadata": {
"Content-Length": "46959",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:A7OCTAVM2FUAYJK3SQU4IOHPINP7BWW2",
"WARC-Concurrent-To": "<urn:uuid:6373082f-7397-4755-bb42-6ade935d71ff>",
"WARC-Date": "2015-10-09T14:35:25Z",
"WARC-IP-Address": "208.43.125.114",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:ITC5NLY66AIY6L4BN654E6GLRV3W7OIU",
"WARC-Record-ID": "<urn:uuid:45065bdc-9f45-42c8-8193-ee508e75e6e2>",
"WARC-Target-URI": "http://www.thecodingforums.com/threads/re-problem-with-including-dll-into-current-cpp-program.267956/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:228b36ea-9ddf-467a-8c37-378977d3353c>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-137-6-227.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-40\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for September 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
57,
58,
112,
113,
127,
128,
147,
148,
206,
221,
292,
367,
448,
499,
500,
516,
591,
630,
631,
684,
715,
716,
780,
808,
831,
856,
857,
903,
904,
919,
925,
944,
1017,
1038,
1044,
1075,
1088,
1094,
1095,
1164,
1185,
1191,
1218,
1263,
1276,
1282,
1283,
1317,
1331,
1332,
1359,
1373,
1379,
1380,
1397,
1411,
1412,
1413,
1414,
1448,
1461,
1474,
1542,
1605,
1652,
1702,
1708,
1781,
1855,
1915,
1921,
1941,
1961,
1967,
1993,
2000,
2022,
2023,
2039,
2040,
2061,
2062,
2115,
2143,
2144,
2215,
2242,
2243,
2303,
2304,
2305,
2368,
2369,
2441,
2514,
2532,
2533,
2608,
2645,
2646,
2653,
2668,
2703,
2716,
2774,
2831,
2898,
2904,
2932,
2939,
2961,
2962,
3017,
3018,
3176,
3192,
3204,
3217,
3223,
3234,
3242,
3253,
3270,
3288,
3301,
3307,
3318,
3326,
3342,
3359,
3369,
3382,
3388,
3399,
3407,
3432,
3445,
3451,
3462,
3472,
3496,
3512,
3522,
3535,
3541,
3552,
3562,
3580,
3596,
3607,
3608
],
"line_end_idx": [
57,
58,
112,
113,
127,
128,
147,
148,
206,
221,
292,
367,
448,
499,
500,
516,
591,
630,
631,
684,
715,
716,
780,
808,
831,
856,
857,
903,
904,
919,
925,
944,
1017,
1038,
1044,
1075,
1088,
1094,
1095,
1164,
1185,
1191,
1218,
1263,
1276,
1282,
1283,
1317,
1331,
1332,
1359,
1373,
1379,
1380,
1397,
1411,
1412,
1413,
1414,
1448,
1461,
1474,
1542,
1605,
1652,
1702,
1708,
1781,
1855,
1915,
1921,
1941,
1961,
1967,
1993,
2000,
2022,
2023,
2039,
2040,
2061,
2062,
2115,
2143,
2144,
2215,
2242,
2243,
2303,
2304,
2305,
2368,
2369,
2441,
2514,
2532,
2533,
2608,
2645,
2646,
2653,
2668,
2703,
2716,
2774,
2831,
2898,
2904,
2932,
2939,
2961,
2962,
3017,
3018,
3176,
3192,
3204,
3217,
3223,
3234,
3242,
3253,
3270,
3288,
3301,
3307,
3318,
3326,
3342,
3359,
3369,
3382,
3388,
3399,
3407,
3432,
3445,
3451,
3462,
3472,
3496,
3512,
3522,
3535,
3541,
3552,
3562,
3580,
3596,
3607,
3608,
3623
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3623,
"ccnet_original_nlines": 151,
"rps_doc_curly_bracket": 0.0016560900257900357,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2297128587961197,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.008739080280065536,
"rps_doc_frac_lines_end_with_ellipsis": 0.013157890178263187,
"rps_doc_frac_no_alph_words": 0.3795256018638611,
"rps_doc_frac_unique_words": 0.49464666843414307,
"rps_doc_mean_word_length": 4.929336071014404,
"rps_doc_num_sentences": 76,
"rps_doc_symbol_to_word_ratio": 0.007490640040487051,
"rps_doc_unigram_entropy": 5.1198625564575195,
"rps_doc_word_count": 467,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06298871338367462,
"rps_doc_frac_chars_dupe_6grams": 0.06298871338367462,
"rps_doc_frac_chars_dupe_7grams": 0.03735882043838501,
"rps_doc_frac_chars_dupe_8grams": 0.03735882043838501,
"rps_doc_frac_chars_dupe_9grams": 0.03735882043838501,
"rps_doc_frac_chars_top_2gram": 0.030408339574933052,
"rps_doc_frac_chars_top_3gram": 0.024326670914888382,
"rps_doc_frac_chars_top_4gram": 0.02606428973376751,
"rps_doc_books_importance": -394.3133850097656,
"rps_doc_books_importance_length_correction": -394.3133850097656,
"rps_doc_openwebtext_importance": -206.289794921875,
"rps_doc_openwebtext_importance_length_correction": -206.289794921875,
"rps_doc_wikipedia_importance": -189.3203125,
"rps_doc_wikipedia_importance_length_correction": -189.3203125
},
"fasttext": {
"dclm": 0.02486151084303856,
"english": 0.8186275362968445,
"fineweb_edu_approx": 1.151030421257019,
"eai_general_math": 0.04243201017379761,
"eai_open_web_math": 0.529580295085907,
"eai_web_code": 0.00024468000628985465
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,040,541,222,741,765,000 | Light flashes when you try to restore the window during the animation creation
Author Topic: Light flashes when you try to restore the window during the animation creation (Read 1103 times)
st_george
Reputation: 2
December 19, 2011, 02:38:00 am
I think you should put this information somewhere, into your FAQ files or similar.
I tried to restore my Lumion window, while the animation creation process was still on, and when the process ended, running the created .mp4 file, shows that a sudden light flash (instant light increase) occurred at the moment when I restored the Lumion window. Everything went fine, when I got it back to full screen.
I think you should put this warning somewhere into your FAQ files: Not to restore the Lumion window, during the animation creation process, as it will result to ligh flashes, in the scene.
December 19, 2011, 08:09:03 pm
You're right - the exposure will be reset if you move or resize the Lumion window - or change the resolution of your monitor while Lumion is rendering.
st_george
Reputation: 2
December 20, 2011, 03:59:48 am
Thank you for the reply Morten.
So by restoring the Lumion window during the animation creation process, the resolution of the animation changes, due to window shrinking?
December 20, 2011, 11:00:02 am
No, the white flash is the exposure in Lumion which re-adjusts after you resize the Lumion window. The resolution of the window while you're rendering doesn't matter though; Lumion does not need a 1920x1080 window when rendering a 1080p HD video.
st_george
Reputation: 2
December 24, 2011, 09:16:54 pm
Understood. So restoring or maximizing the window during rendering the video, is not allowed.
Thank you for the replies.
| {
"url": "https://forum.lumion3d.com/general-discussion/light-flashes-when-you-try-to-restore-the-window-during-the-animation-creation",
"source_domain": "forum.lumion3d.com",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "28310",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FCCYJ6BUEFES4TK7636F6HGVDAJ5WIVF",
"WARC-Concurrent-To": "<urn:uuid:3ec40639-ec2a-4322-a233-5096503c30ab>",
"WARC-Date": "2017-03-28T10:05:45Z",
"WARC-IP-Address": "104.23.135.18",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:CKFWLGEMCHIG73SIYMNRHT6BYAW6SE5G",
"WARC-Record-ID": "<urn:uuid:a76966b7-13ee-41a9-8dfd-53092f482382>",
"WARC-Target-URI": "https://forum.lumion3d.com/general-discussion/light-flashes-when-you-try-to-restore-the-window-during-the-animation-creation",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:01f469ff-92ae-4919-bd11-af33726ca46b>"
},
"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,
81,
82,
194,
195,
205,
206,
224,
255,
338,
339,
658,
659,
848,
849,
880,
1032,
1033,
1043,
1044,
1062,
1093,
1125,
1126,
1265,
1266,
1297,
1544,
1545,
1555,
1556,
1574,
1605,
1699,
1700,
1727,
1728
],
"line_end_idx": [
81,
82,
194,
195,
205,
206,
224,
255,
338,
339,
658,
659,
848,
849,
880,
1032,
1033,
1043,
1044,
1062,
1093,
1125,
1126,
1265,
1266,
1297,
1544,
1545,
1555,
1556,
1574,
1605,
1699,
1700,
1727,
1728,
1729
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1729,
"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.3445378243923187,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02240896038711071,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2577030658721924,
"rps_doc_frac_unique_words": 0.4590747356414795,
"rps_doc_mean_word_length": 4.81494665145874,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.444630146026611,
"rps_doc_word_count": 281,
"rps_doc_frac_chars_dupe_10grams": 0.09756097942590714,
"rps_doc_frac_chars_dupe_5grams": 0.2379896491765976,
"rps_doc_frac_chars_dupe_6grams": 0.20103473961353302,
"rps_doc_frac_chars_dupe_7grams": 0.1685144156217575,
"rps_doc_frac_chars_dupe_8grams": 0.1685144156217575,
"rps_doc_frac_chars_dupe_9grams": 0.09756097942590714,
"rps_doc_frac_chars_top_2gram": 0.05321507900953293,
"rps_doc_frac_chars_top_3gram": 0.07390982657670975,
"rps_doc_frac_chars_top_4gram": 0.07095344364643097,
"rps_doc_books_importance": -131.1335906982422,
"rps_doc_books_importance_length_correction": -120.64427185058594,
"rps_doc_openwebtext_importance": -69.82194519042969,
"rps_doc_openwebtext_importance_length_correction": -69.82194519042969,
"rps_doc_wikipedia_importance": -56.31177520751953,
"rps_doc_wikipedia_importance_length_correction": -49.497188568115234
},
"fasttext": {
"dclm": 0.11215007305145264,
"english": 0.9332001805305481,
"fineweb_edu_approx": 1.5389535427093506,
"eai_general_math": 0.3097568154335022,
"eai_open_web_math": 0.17382633686065674,
"eai_web_code": 0.013163330033421516
}
} | {
"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": "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": "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": "-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": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-9,139,294,640,507,965,000 | How to Handle Database Connection Limits
Most databases including Microsoft SQL have a maximum open connection limit. As technology advances, the demand for uninterrupted database access will only grow.
In today's technology-driven world, databases play a crucial role in storing and managing vast amounts of data. However, it is essential to be aware that most databases have a maximum open connection limit.
Brown Peach Illustrative GreetingsSlogans Banner Landscape (8)
When this limit is reached, it can lead to performance issues and even cause the database to become unresponsive.
In this blog post, we will explore the concept of connection limits and discuss how they apply to popular databases such as Microsoft SQL, Oracle Database, MySQL, and PostgreSQL. We start with Microsoft SQL in this post.
Additionally, we will outline the steps to resolve this issue without having to restart the entire database.
When an application encounters the maximum connection limit of a database, it means that the database has reached its maximum capacity for accepting new connections. In this situation, the application will not be able to establish a new link to the database until an existing connection is closed or released.
The specific behavior of the application, when it encounters the maximum connection limit, may vary depending on how it is programmed. Some applications may display an error message indicating that the maximum connection limit has been reached, while others may simply fail to establish a new connection without providing any specific error message.
To resolve this issue, most often database administrators restart the database, which forces a recovery of all in-flight transactions and often associated errors to the ultimate web users.
This is very disruptive and leads to lower customer satisfaction. We at Opvizor are offering a much more future-looking solution. But first, let’s understand what database convection limits are.
Understanding Connection Limits
A connection limit refers to the maximum number of concurrent connections that a database can handle. This limit is set by the database management system (DBMS) and is typically defined based on the hardware resources available and the configuration settings.
When the number of open connections reaches the maximum limit, any new connection attempts are denied, resulting in connection failures.
The Case of Microsoft SQL
Microsoft SQL Server, a widely used relational database management system, also imposes connection limits. The maximum number of connections allowed depends on the edition of the SQL Server being used. You can query the current maximum by running:
SELECT name, value, value_in_use, [description]
FROM sys.configurations
WHERE name = 'user connections';
To check the currently active connections by different sources you can run:
By Client Machine
SELECT
client_net_address,
COUNT(DISTINCT session_id) AS [Number of Sessions]
FROM
sys.dm_exec_sessions
WHERE
client_net_address IS NOT NULL
GROUP BY
client_net_address
ORDER BY
[Number of Sessions] DESC;
By Connection
SELECT
c.client_net_address,
s.program_name,
COUNT(c.connection_id) AS [Number of Connections]
FROM
sys.dm_exec_connections c
JOIN
sys.dm_exec_sessions s ON c.session_id = s.session_id
GROUP BY
c.client_net_address, s.program_name
ORDER BY
[Number of Connections] DESC;
To make it even simpler to monitor the maximum and active connections we added that information to our Microsoft SQL integration in Opvizor/Cloud.
Changing the Maximum Connection Limit
To change the setting to a feasible maximum value, you can run:
sp_configure 'show advanced options', 1;
RECONFIGURE;
sp_configure 'user connections', <new_value>;
RECONFIGURE;
Unfortunately, that change requires an MS SQL service restart.
Conclusion
In conclusion, understanding and effectively managing connection limits in databases is crucial in today's data-driven landscape. As technology advances, the demand for seamless and uninterrupted database access will only grow. By exploring alternative solutions and mitigating the need for disruptive restarts, we can ensure better performance, higher customer satisfaction, and a more future-proof approach to database management.
Stay tuned for more insights on this topic as we continue our blog post series, and if you haven't signed up for Opvizor/Cloud, visit https://cloud.opvizor.com/ to get your first integration running for free.
Similar posts
Get notified on new marketing insights
Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry. | {
"url": "https://opvizor.com/blog/understanding-database-connection-limits-and-how-to-handle-them",
"source_domain": "opvizor.com",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "42665",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MPLZARCRVS6HXO3TYJA5XA6XIWJKS4BS",
"WARC-Concurrent-To": "<urn:uuid:10f0235e-744c-4eeb-9081-3a8abf9b8748>",
"WARC-Date": "2024-07-22T23:53:27Z",
"WARC-IP-Address": "199.60.103.12",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DPEWSWQTZYVOGR7CJHAQWIHDQ7AIS7TS",
"WARC-Record-ID": "<urn:uuid:8cf442c4-4a4b-46d8-a916-124e187fdba3>",
"WARC-Target-URI": "https://opvizor.com/blog/understanding-database-connection-limits-and-how-to-handle-them",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4466777c-cb38-4ffa-b7be-2319e1623eda>"
},
"warc_info": "isPartOf: CC-MAIN-2024-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-168\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,
41,
42,
204,
205,
206,
413,
414,
477,
478,
592,
593,
814,
815,
924,
925,
1235,
1236,
1586,
1587,
1777,
1778,
1974,
1975,
2007,
2008,
2268,
2269,
2406,
2407,
2433,
2434,
2682,
2683,
2732,
2757,
2790,
2791,
2867,
2868,
2886,
2887,
2894,
2915,
2966,
2967,
2972,
2993,
2994,
3000,
3031,
3032,
3042,
3061,
3062,
3072,
3099,
3100,
3114,
3115,
3123,
3145,
3161,
3211,
3212,
3218,
3244,
3245,
3251,
3305,
3306,
3316,
3353,
3354,
3364,
3394,
3395,
3542,
3543,
3581,
3582,
3646,
3647,
3688,
3701,
3747,
3760,
3761,
3824,
3825,
3836,
3837,
4270,
4271,
4480,
4481,
4495,
4496,
4535,
4536
],
"line_end_idx": [
41,
42,
204,
205,
206,
413,
414,
477,
478,
592,
593,
814,
815,
924,
925,
1235,
1236,
1586,
1587,
1777,
1778,
1974,
1975,
2007,
2008,
2268,
2269,
2406,
2407,
2433,
2434,
2682,
2683,
2732,
2757,
2790,
2791,
2867,
2868,
2886,
2887,
2894,
2915,
2966,
2967,
2972,
2993,
2994,
3000,
3031,
3032,
3042,
3061,
3062,
3072,
3099,
3100,
3114,
3115,
3123,
3145,
3161,
3211,
3212,
3218,
3244,
3245,
3251,
3305,
3306,
3316,
3353,
3354,
3364,
3394,
3395,
3542,
3543,
3581,
3582,
3646,
3647,
3688,
3701,
3747,
3760,
3761,
3824,
3825,
3836,
3837,
4270,
4271,
4480,
4481,
4495,
4496,
4535,
4536,
4687
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4687,
"ccnet_original_nlines": 99,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.32367148995399475,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05072464048862457,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15700483322143555,
"rps_doc_frac_unique_words": 0.4508928656578064,
"rps_doc_mean_word_length": 5.657738208770752,
"rps_doc_num_sentences": 41,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.19029426574707,
"rps_doc_word_count": 672,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.07206732779741287,
"rps_doc_frac_chars_dupe_6grams": 0.053655970841646194,
"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.021041560918092728,
"rps_doc_frac_chars_top_3gram": 0.021041560918092728,
"rps_doc_frac_chars_top_4gram": 0.026301950216293335,
"rps_doc_books_importance": -385.7492370605469,
"rps_doc_books_importance_length_correction": -385.7492370605469,
"rps_doc_openwebtext_importance": -173.46470642089844,
"rps_doc_openwebtext_importance_length_correction": -173.46470642089844,
"rps_doc_wikipedia_importance": -96.39910125732422,
"rps_doc_wikipedia_importance_length_correction": -96.39910125732422
},
"fasttext": {
"dclm": 0.9003654718399048,
"english": 0.8468988537788391,
"fineweb_edu_approx": 2.1793863773345947,
"eai_general_math": 0.29311370849609375,
"eai_open_web_math": 0.13436520099639893,
"eai_web_code": 0.5226432681083679
}
} | {
"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": "-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": "2",
"label": "Click Here References"
}
},
"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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,539,321,992,012,281,600 | Upload a Rely Column to a Information Body in R
You’ll be able to utility refer to unsophisticated syntax so as to add a ‘count’ column to an information body in R:
df %>%
group_by(var1) %>%
mutate(var1_count = n())
This actual syntax provides a column known as var1_count to the information body that accommodates the rely of values within the column known as var1.
Refer to instance displays how one can utility this syntax in follow.
Instance: Upload Rely Column in R
Think we’ve refer to information body in R that accommodates details about diverse basketball gamers:
#outline information frama
df <- information.body(group=c('A', 'A', 'A', 'B', 'B', 'B', 'B', 'B'),
place=c('G', 'F', 'F', 'F', 'G', 'G', 'F', 'F'),
issues=c(18, 22, 19, 14, 14, 11, 20, 28))
#view information body
df
group place issues
1 A G 18
2 A F 22
3 A F 19
4 B F 14
5 B G 14
6 B G 11
7 B F 20
8 B F 28
We will utility refer to code so as to add a column known as team_count that accommodates the rely of every group:
library(dplyr)
#upload column that displays general rely of every group
df %>%
group_by(group) %>%
mutate(team_count = n())
# A tibble: 8 x 4
# Teams: group [2]
group place issues team_count
1 A G 18 3
2 A F 22 3
3 A F 19 3
4 B F 14 5
5 B G 14 5
6 B G 11 5
7 B F 20 5
8 B F 28 5
There are 3 rows with a group price of A and 5 rows with a group price of B.
Thus:
• For every row the place the group is the same as A, the worth within the team_count column is 3.
• For every row the place the group is the same as B, the worth within the team_count column is 5.
You’ll be able to additionally upload a ‘count’ column that teams by way of more than one variables.
As an example, refer to code displays how one can upload a ‘count’ column that teams by way of the group and place variables:
library(dplyr)
#upload column that displays general rely of every group and place
df %>%
group_by(group, place) %>%
mutate(team_pos_count = n())
# A tibble: 8 x 4
# Teams: group, place [4]
group place issues team_pos_count
1 A G 18 1
2 A F 22 2
3 A F 19 2
4 B F 14 3
5 B G 14 2
6 B G 11 2
7 B F 20 3
8 B F 28 3
From the output we will see:
• There’s 1 row that accommodates A within the group column and G within the place column.
• There are 2 rows that include A within the group column and F within the place column.
• There are 3 rows that include B within the group column and F within the place column.
• There are 2 rows that include B within the group column and F within the place column.
Supplementary Sources
Refer to tutorials provide an explanation for how one can carry out alternative regular duties in R:
Staff By means of and Rely with Situation in R
Rely Choice of Parts in Checklist in R
Make a choice Distinctive Rows in a Information Body in R | {
"url": "https://statsidea.com/upload-a-rely-column-to-a-information-body-in-r/",
"source_domain": "statsidea.com",
"snapshot_id": "CC-MAIN-2023-50",
"warc_metadata": {
"Content-Length": "55102",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:5NUDOHVTC2AYUORVREYB7CCSCY7VPEBW",
"WARC-Concurrent-To": "<urn:uuid:b10bd878-09df-4199-bcdc-38dc541d2d38>",
"WARC-Date": "2023-12-08T10:05:32Z",
"WARC-IP-Address": "103.157.97.104",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:E3CRJHT6AXCRPBT55B2VALDXJ5JZFOF2",
"WARC-Record-ID": "<urn:uuid:2361c1d1-7a94-4ca5-b763-f86f6154d54e>",
"WARC-Target-URI": "https://statsidea.com/upload-a-rely-column-to-a-information-body-in-r/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:368df658-60c3-4f97-8aeb-e7b81195b1c7>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-47\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
48,
49,
50,
167,
168,
176,
198,
226,
227,
378,
379,
449,
450,
484,
485,
587,
588,
616,
689,
756,
816,
818,
842,
846,
848,
870,
894,
918,
942,
966,
990,
1014,
1038,
1062,
1063,
1178,
1179,
1195,
1197,
1255,
1263,
1286,
1314,
1316,
1335,
1357,
1391,
1407,
1443,
1479,
1515,
1551,
1587,
1623,
1659,
1695,
1696,
1773,
1774,
1780,
1781,
1882,
1983,
1984,
2085,
2086,
2212,
2213,
2229,
2231,
2299,
2307,
2337,
2369,
2371,
2390,
2419,
2457,
2477,
2517,
2557,
2597,
2637,
2677,
2717,
2757,
2796,
2797,
2826,
2827,
2920,
3011,
3102,
3193,
3194,
3216,
3217,
3318,
3319,
3366,
3405
],
"line_end_idx": [
48,
49,
50,
167,
168,
176,
198,
226,
227,
378,
379,
449,
450,
484,
485,
587,
588,
616,
689,
756,
816,
818,
842,
846,
848,
870,
894,
918,
942,
966,
990,
1014,
1038,
1062,
1063,
1178,
1179,
1195,
1197,
1255,
1263,
1286,
1314,
1316,
1335,
1357,
1391,
1407,
1443,
1479,
1515,
1551,
1587,
1623,
1659,
1695,
1696,
1773,
1774,
1780,
1781,
1882,
1983,
1984,
2085,
2086,
2212,
2213,
2229,
2231,
2299,
2307,
2337,
2369,
2371,
2390,
2419,
2457,
2477,
2517,
2557,
2597,
2637,
2677,
2717,
2757,
2796,
2797,
2826,
2827,
2920,
3011,
3102,
3193,
3194,
3216,
3217,
3318,
3319,
3366,
3405,
3462
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3462,
"ccnet_original_nlines": 101,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2496371567249298,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.1248185783624649,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.30914369225502014,
"rps_doc_frac_unique_words": 0.24452555179595947,
"rps_doc_mean_word_length": 3.686131477355957,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0.01161103043705225,
"rps_doc_unigram_entropy": 4.387847900390625,
"rps_doc_word_count": 548,
"rps_doc_frac_chars_dupe_10grams": 0.20990099012851715,
"rps_doc_frac_chars_dupe_5grams": 0.39851483702659607,
"rps_doc_frac_chars_dupe_6grams": 0.3331683278083801,
"rps_doc_frac_chars_dupe_7grams": 0.30000001192092896,
"rps_doc_frac_chars_dupe_8grams": 0.2663366198539734,
"rps_doc_frac_chars_dupe_9grams": 0.24554455280303955,
"rps_doc_frac_chars_top_2gram": 0.04900990054011345,
"rps_doc_frac_chars_top_3gram": 0.033663369715213776,
"rps_doc_frac_chars_top_4gram": 0.0356435589492321,
"rps_doc_books_importance": -290.1797790527344,
"rps_doc_books_importance_length_correction": -290.1797790527344,
"rps_doc_openwebtext_importance": -189.5403594970703,
"rps_doc_openwebtext_importance_length_correction": -189.5403594970703,
"rps_doc_wikipedia_importance": -135.78106689453125,
"rps_doc_wikipedia_importance_length_correction": -135.78106689453125
},
"fasttext": {
"dclm": 0.034737590700387955,
"english": 0.8704473972320557,
"fineweb_edu_approx": 1.6700750589370728,
"eai_general_math": 0.8671623468399048,
"eai_open_web_math": 0.15865331888198853,
"eai_web_code": 0.9351795315742493
}
} | {
"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": "519.5",
"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": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,148,694,640,329,253,500 | summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/itemviews.pro
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2021-08-04 10:17:11 +0200
committerMarc Mutz <[email protected]>2021-08-05 01:46:44 +0200
commit73fabadcee71af858388fb245fccf4e96d4ead4e (patch)
tree7c159478be31d56edd907696ac36f8913ff85e26 /examples/widgets/itemviews/itemviews.pro
parent115f828ae406d2805869fccda9269209af646a84 (diff)
QXpmHandler: fix re-entrancy bug in xpm_color_nameHEADdev
The xpm_color_name() function returned a pointer to a function-static buffer. This is infamously non-reentrant, and an actual problem, because we explicitly allow QImage operations (incl. saving to an .xpm) from non-GUI-threads. Fix by using the CSS pattern (Caller-Supplied Storage; also used in the QAnyStringView(char32_t) and QAnyStringView(QStringBuilder) ctors) to force the caller to allocate storage in its own stack frame. As a consequence, we re-gain re-entrancy, but the returned pointer is now only valid until the end of the full-expression, which necessitated simplifying one caller (sorry!). To see why said simplification is valid, observe that xpm_color_name() writes a (now-explicit) NUL into returnable[cpp] and the old code read max(cpp, 4) characters from xpm_color_name()'s result. NB: cpp can be 5, even though the code comments say otherwise! :( [ChangeLog][QtGui][QImage] Fixed a race condition when concurrently writing .xpm files. Pick-to: 6.2 6.1 5.15 5.12 Change-Id: I36d7173d53839a52f5cdf58324474c1b32c71f33 Reviewed-by: Mårten Nordheim <[email protected]>
Diffstat (limited to 'examples/widgets/itemviews/itemviews.pro')
0 files changed, 0 insertions, 0 deletions | {
"url": "https://code.qt.io/cgit/qt/qtbase.git/commit/examples/widgets/itemviews/itemviews.pro",
"source_domain": "code.qt.io",
"snapshot_id": "crawl=CC-MAIN-2021-31",
"warc_metadata": {
"Content-Length": "10032",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:OVNPK27CX7TXPGO3UYLVNLT2RV3RICD7",
"WARC-Concurrent-To": "<urn:uuid:30ea5b69-11d6-4a99-b223-414b82972499>",
"WARC-Date": "2021-08-04T23:52:51Z",
"WARC-IP-Address": "34.242.127.58",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HWIWYAQDC65BDGPN5ZCAOIAZTM6JS433",
"WARC-Record-ID": "<urn:uuid:be49c5ac-9780-4ed5-acaa-dae26cbc3ad4>",
"WARC-Target-URI": "https://code.qt.io/cgit/qt/qtbase.git/commit/examples/widgets/itemviews/itemviews.pro",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:78abce07-2048-4807-a792-078b4670dc42>"
},
"warc_info": "isPartOf: CC-MAIN-2021-31\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July/August 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-170.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,
34,
86,
99,
108,
115,
121,
183,
248,
303,
390,
444,
502,
1593,
1658
],
"line_end_idx": [
34,
86,
99,
108,
115,
121,
183,
248,
303,
390,
444,
502,
1593,
1658,
1700
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1700,
"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.20391060411930084,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.011173180304467678,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.39944133162498474,
"rps_doc_frac_unique_words": 0.7688171863555908,
"rps_doc_mean_word_length": 7.4193549156188965,
"rps_doc_num_sentences": 24,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.81333065032959,
"rps_doc_word_count": 186,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -114.86640167236328,
"rps_doc_books_importance_length_correction": -102.80708312988281,
"rps_doc_openwebtext_importance": -83.71553802490234,
"rps_doc_openwebtext_importance_length_correction": -83.71553802490234,
"rps_doc_wikipedia_importance": -67.82808685302734,
"rps_doc_wikipedia_importance_length_correction": -58.60893630981445
},
"fasttext": {
"dclm": 0.4023098945617676,
"english": 0.7409652471542358,
"fineweb_edu_approx": 2.144009590148926,
"eai_general_math": 0.06069064140319824,
"eai_open_web_math": 0.16584956645965576,
"eai_web_code": 0.3075714111328125
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.02",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-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": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,373,772,828,657,172,000 | Browser ABC
Deeply inspired by Tim Bray's "Letter Sweep" and my dad's "My Browser A-Z". Notice, there are 3 Google subdomains, but no google.com. Is the omnibox killing the Google homepage?
A: api.thriftdb.com/api.hnsearch.com/users/
Even though it's an API I visit it regularly. Probably also got an extra push due to my blog post about it.
B: bost.ocks.org/mike/
For the latest and probably greatest visualisations on the net.
C: closure-compiler.appspot.com
I can't even remember the last time I visited this, I'd grade it questionable.
D: datamapper.org/docs/
My ORM of choice when working with Sinatra.
E: en.wikipedia.org/wiki/Category:Fundamental_categories
I visit this page regularly to explore Wikipedia, it's very helpful for discovering new interesting topics.
F: file://localhost/Users/joseph/Desktop/...
All tinkering starts here!
G: github.com
Great! Nothing else.
H: hnsearch.com/api
Not sure if it's really useful or completely useless.
I: isup.me
Slow internet connection makes me think sites are down :-(
J: jcla1.com
My personal blog.
K: kuler.adobe.com
I know it's flash, but still good for finding nice color schemes.
L: localhost:8000
You can't imagine with how many different ports I found this.
M: mail.google.com
Apparently not dead and still useful.
N: news.ycombinator.com
Makes >30% of my time on the web. GO HN!
O: ozone3d.net/tutorials/mandelbrot_set_p3.php
Really great introduction to fractals. A must-read!
P: plus.google.com
Is not being mainstream, too mainstream?
Q: qvc.de
Not recommended for buying tech, definitely.
R: repl.it
Refrence implementation of web and esoteric languages. Helped a lot when building a Brainfuck interpreter.
S: stuenings.de
Resource for a paper I have written recently.
T: translate.google.com
What was that word again?
U: underscorejs.org
New second best friend? (d3 is top!)
V: vivid.chengyichao.info
Useful for coding along with The Little Schemer book that I'm reading at the moment.
W: wolframalpha.com
To answer all the questions Google can't.
X: xkcd.com
Well, of course. to quote Tim Bray.
Y: youtube.com
For my weekly dose of physics and interesting factoids.
Z: zachholman.com
Great presentations and more Github! | {
"url": "http://jcla1.com/blog/browser-abc/",
"source_domain": "jcla1.com",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "8476",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NZYN4OFHF5XZOBDCANJNP4FNG3A2MUAI",
"WARC-Concurrent-To": "<urn:uuid:986603e9-8b65-4c7b-9d1e-980ff3de96cb>",
"WARC-Date": "2017-03-27T18:18:54Z",
"WARC-IP-Address": "192.30.252.154",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:WS5E2CPN4GIR5XRYYWQSRQEEGKG6RFGR",
"WARC-Record-ID": "<urn:uuid:273aea9f-7abb-49d8-923e-176a609212f4>",
"WARC-Target-URI": "http://jcla1.com/blog/browser-abc/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:99b939f3-ce6d-4318-84bd-1a81ee9421c5>"
},
"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,
12,
13,
191,
192,
236,
344,
345,
368,
432,
433,
465,
544,
545,
569,
613,
614,
671,
779,
780,
825,
852,
853,
867,
888,
889,
909,
963,
964,
975,
1034,
1035,
1048,
1066,
1067,
1086,
1152,
1153,
1171,
1233,
1234,
1253,
1291,
1292,
1316,
1357,
1358,
1405,
1457,
1458,
1477,
1518,
1519,
1529,
1574,
1575,
1586,
1693,
1694,
1710,
1756,
1757,
1781,
1807,
1808,
1828,
1865,
1866,
1892,
1977,
1978,
1998,
2040,
2041,
2053,
2089,
2090,
2105,
2161,
2162,
2180
],
"line_end_idx": [
12,
13,
191,
192,
236,
344,
345,
368,
432,
433,
465,
544,
545,
569,
613,
614,
671,
779,
780,
825,
852,
853,
867,
888,
889,
909,
963,
964,
975,
1034,
1035,
1048,
1066,
1067,
1086,
1152,
1153,
1171,
1233,
1234,
1253,
1291,
1292,
1316,
1357,
1358,
1405,
1457,
1458,
1477,
1518,
1519,
1529,
1574,
1575,
1586,
1693,
1694,
1710,
1756,
1757,
1781,
1807,
1808,
1828,
1865,
1866,
1892,
1977,
1978,
1998,
2040,
2041,
2053,
2089,
2090,
2105,
2161,
2162,
2180,
2216
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2216,
"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.26177024841308594,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.08097928017377853,
"rps_doc_frac_lines_end_with_ellipsis": 0.01234568003565073,
"rps_doc_frac_no_alph_words": 0.28248587250709534,
"rps_doc_frac_unique_words": 0.72239750623703,
"rps_doc_mean_word_length": 5.403785705566406,
"rps_doc_num_sentences": 74,
"rps_doc_symbol_to_word_ratio": 0.0018832399509847164,
"rps_doc_unigram_entropy": 5.233662128448486,
"rps_doc_word_count": 317,
"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.007005250081419945,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -249.6433868408203,
"rps_doc_books_importance_length_correction": -249.6433868408203,
"rps_doc_openwebtext_importance": -162.76779174804688,
"rps_doc_openwebtext_importance_length_correction": -162.76779174804688,
"rps_doc_wikipedia_importance": -97.60971069335938,
"rps_doc_wikipedia_importance_length_correction": -97.60971069335938
},
"fasttext": {
"dclm": 0.14466023445129395,
"english": 0.8683804273605347,
"fineweb_edu_approx": 1.0979368686676025,
"eai_general_math": 0.07476968318223953,
"eai_open_web_math": 0.12607026100158691,
"eai_web_code": 0.02974569983780384
}
} | {
"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": "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": "9",
"label": "Personal/Misc"
},
"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": "16",
"label": "Personal Blog"
},
"secondary": {
"code": "6",
"label": "Content Listing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,904,852,539,293,665,000 | CodeLAB
на главную карта сайта обратная связь
Популярные задачи:
#Обертки для массивов. (37153 hits)
#Предварительная загрузка изображений. (45314 hits)
#Выборка конкретной записи из таблицы. (30853 hits)
#Синус. (58314 hits)
#Рисование окружности (по Брезенхэму). (31742 hits)
#Интерактивная, динамическая подгрузка картинок. (67695 hits)
#Рисование прямоугольника. (29343 hits)
#Бинарный поиск в массиве и его разновидности. (161385 hits)
#Курсы валют. (65260 hits)
#Простая геометрическая и текстовая анимация. (399066 hits)
#Плоттеры для рисования графиков. (28053 hits)
#Перестановка фрагментов строки(или одномерного массива). (58319 hits)
#Вычисление среднего, среднего отклонения, среднеквадратического отклонения и дисперсии заданной выборки. (44608 hits)
#Рисование Фрактала (листьев папоротника). (50782 hits)
#Постепенное затемнение. (49125 hits)
#Преобразование целых чисел в битовый массив. (35362 hits)
#Хранение иерархических деревьев. (51590 hits)
#Создание нестандартного (custom-ного) окна браузера. (34153 hits)
#Простая быстрая сортировка. (109040 hits)
#Загрузчик классов. (41107 hits)
Главная >> Каталог задач >> Паттерны >>
Раздел Поведения, Паттерны
Всего: 11
Паттерны поведения связаны с алгоритмами и распределением обязанностей между объектами. Речь в них идет не только о самих объектах и классах, но и о типичных способах взаимодействия. Паттерны поведения характеризуют сложный поток управления, который трудно проследить во время выполнения программы. Внимание акцентировано не на потоке управления как таковом, а на связях между объектами во время выполнения.
В паттернах поведения уровня класса используется наследование - чтобы распределить поведение между разными классами. Из них более простым и широко распространенным является шаблонный метод, который представляет собой абстрактное определение алгоритма. Алгоритм здесь определяется пошагово. На каждом шаге вызывается либо примитивная, либо абстрактная операция. Алгоритм «обрастает мясом» за счет подклассов, где реализованы его абстрактные операции. Другой паттерн поведения уровня класса - интерпретатор, который представляет грамматику языка в виде иерархии классов и реализует интерпретатор как последовательность операций над экземплярами этих классов.
В паттернах поведения уровня объектов используется не наследование, а композиция. Некоторые из них описывают, как с помощью кооперации – множество равноправных объектов справляется с задачей, которая ни одному из них не под силу. Важно здесь то, как объекты получают информацию о существовании друг друга. Объекты-коллеги могут хранить ссылки друг на друга, но это увеличит степень связанности системы. При максимальной степени связанности каждому объекту пришлось бы иметь информацию обо всех остальных. Эту проблему решает паттерн посредник. Посредник, находящийся между объектами-коллегами, обеспечивает косвенность ссылок, необходимую для разрывания лишних связей.
Паттерн цепочка обязанностей позволяет и дальше уменьшать степень связанности. Он дает возможность посылать запросы объекту не напрямую, а по цепочке «объектов-кандидатов». Запрос может выполнить любой «кандидат», если это допустимо в текущем состоянии выполнения программы. Число кандидатов заранее не определено, а подбирать участников можно во время выполнения.
Паттерн наблюдатель определяет и отвечает за зависимости между объектами. Классический пример наблюдателя встречается в схеме модель/вид/контроллер, где все виды модели уведомляются о любых изменениях ее состояния.
Прочие паттерны поведения связаны с инкапсуляцией поведения в объекте и делегированием ему запросов. Паттерн стратегия инкапсулирует алгоритм объекта, упрощая его спецификацию и замену. Паттерн команда инкапсулирует запрос в виде объекта, который можно передавать как параметр, хранить в списке истории или использовать как-то иначе. Паттерн состояние инкапсулирует состояние объекта таким образом, что при изменении состояния объект может изменять поведение. Паттерн посетитель инкапсулирует поведение, которое в противном случае пришлось бы распределять между классами, а паттерн итератор абстрагирует способ доступа и обхода объектов из некоторого агрегата (списка).
все паттерны, расширенный поиск>>
Сортировать по: названию, числу реализаций, дате, популярности, рейтингу, страницы: 1 2
pattern#: 215 [раздел: Поведения | hits: 319184]
Паттерн: [8]
аннотация: Итератор – паттерн поведения объектов, предоставляющий последовательный доступ ко всем элементам составного объекта, не раскрывая его внутреннего...
содержание: «Паттерн Iterator» Итератор – паттерн поведения объектов, предоставляющий последовательный доступ ко всем элементам составного объекта, не раскрывая его внутреннего представления.Известен также под именем Cursor (курсор). Повсеместно в коде приложения нам тем или иным...
Aвтор: [добавлена: ]
1
pattern#: 220 [раздел: Поведения | hits: 193423]
Паттерн: [5]
аннотация: Стратегия - паттерн поведения объектов, инкапсулирующий отдельные алгоритмы.
содержание: «Паттерн Strategy» Стратегия - паттерн поведения объектов, инкапсулирующий отдельные алгоритмы. Также известен под именем Policy. Если в системе фигурируют различные алгоритмы, которые часто могут использоваться повторно в других частях, слоях приложения, было бы удобно...
Aвтор: [добавлена: ]
2
pattern#: 216 [раздел: Поведения | hits: 175900]
Паттерн: [6]
аннотация: Посредник - паттерн поведения объектов, предоставляющий единый центр взаимодействия определенной группы объектов.
содержание: «Паттерн Mediator» Посредник - паттерн поведения объектов, предоставляющий единый центр взаимодействия определенной группы объектов, которые должны быть взаимосвязаны друг с другом. Определяет объект, инкапсулирующий способ взаимодействия множества объектов. ...
Aвтор: [добавлена: ]
3
pattern#: 218 [раздел: Поведения | hits: 172358]
Паттерн: [3]
аннотация: Наблюдатель - паттерн поведения объектов, устанавливающий систему оповещения объектами своих соседей в процессе их деятельности.
содержание: «Паттерн Observer» Наблюдатель - паттерн поведения объектов, устанавливающий систему оповещения объектами своих соседей в процессе их деятельности. Известен также под именами: Dependents (подчиненные), Publish-Subscribe (издатель-подписчик). Очень часто в процессе функционирования...
Aвтор: [добавлена: ]
4
pattern#: 219 [раздел: Поведения | hits: 157817]
Паттерн: [5]
аннотация: Состояние - паттерн поведения объектов, задающий разную функциональность в зависимости от внутреннего состояния объекта.
содержание: «Паттерн State» Состояние - паттерн поведения объектов, задающий разную функциональность в зависимости от внутреннего состояния объекта. Позволяет объекту варьировать свое поведение в зависимости от внутреннего состояния. Поскольку поведение может меняться...
Aвтор: [добавлена: ]
5
pattern#: 214 [раздел: Поведения | hits: 143750]
Паттерн: [8]
аннотация: Интерпретатор - паттерн поведения объектов, реализующий динамические алгоритмы с помощью декларативного описания.
содержание: «Паттерн Interpreter» Интерпретатор - паттерн поведения объектов, реализующий динамические алгоритмы с помощью декларативного описания. В ряде случаев приложение на разных этапах выполнения использует одни и те же алгоритмы обработки данных, или, точнее, многие...
Aвтор: [добавлена: ]
6
pattern#: 222 [раздел: Поведения | hits: 143712]
Паттерн: [9]
аннотация: Посетитель - паттерн поведения объектов, задающий стратегии обхода.
содержание: «Паттерн Visitor» Посетитель - паттерн поведения объектов, задающий стратегии обхода. Описывает операцию, которая должна быть выполнена над каждым объектом из некоторой произвольной структуры. Позволяет определить и задать на выполнение новую операцию, не изменяя ни...
Aвтор: [добавлена: ]
7
pattern#: 213 [раздел: Поведения | hits: 137705]
Паттерн: [5]
аннотация: Команда - паттерн поведения объектов, инкапсулирующий различные алгоритмы в единую сущность.
содержание: «Паттерн Command» Команда- паттерн поведения объектов, инкапсулирующий различные алгоритмы в единую сущность. Встречается также под именами Action (действие), Transaction (транзакция). Инкапсулирует запрос на выполнение конкретной логики (алгоритма) – в виде объекта,...
Aвтор: [добавлена: ]
8
pattern#: 221 [раздел: Поведения | hits: 108125]
Паттерн: [1]
аннотация: Шаблонный метод - паттерн поведения объектов, определяющий конкретную функциональность в рамках абстрактных сущностей.
содержание: «Паттерн Template Method» Шаблонный метод - паттерн поведения объектов, определяющий функциональность конктерных методов в рамках лишь абстрактных сущностей. Шаблонный метод определяет основу алгоритма в рамках абстрактных классов и методов, а подклассам позволяет...
Aвтор: [добавлена: ]
9
pattern#: 212 [раздел: Поведения | hits: 102949]
Паттерн: [4]
аннотация: Цепочка обязанностей - паттерн поведения, выстраивающий объекты составных частей приложения связанными между собой по цепочке.
содержание: «Паттерн Chain of Responsibility» Цепочка обязанностей - паттерн поведения, выстраивающий объекты составных частей приложения связанными между собой по цепочке, для передачи запроса на обработку от более низких, детализированных слоев системы к более высоким глобальным. ...
Aвтор: [добавлена: ]
10
страницы: 1 2
<< назад +добавить Паттерн
Всего: 11 | {
"url": "https://codelab.ru/cat/patterns/behavioral",
"source_domain": "codelab.ru",
"snapshot_id": "crawl=CC-MAIN-2022-49",
"warc_metadata": {
"Content-Length": "43286",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:C6TY3CXCQCI5IAWO6R5KZHBIORWCM7A3",
"WARC-Concurrent-To": "<urn:uuid:28b23b5e-49a7-4118-b377-8ce29f987396>",
"WARC-Date": "2022-12-09T15:37:38Z",
"WARC-IP-Address": "185.12.92.119",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DT7WMW67S34IUK6RGDTG7GAXHYXOQV6L",
"WARC-Record-ID": "<urn:uuid:cbb8fe05-03c3-404b-b992-a5f7447fb35a>",
"WARC-Target-URI": "https://codelab.ru/cat/patterns/behavioral",
"WARC-Truncated": "disconnect",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7fb33860-df5a-4e09-9182-4d47fc0e77bc>"
},
"warc_info": "isPartOf: CC-MAIN-2022-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-150\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,
8,
46,
47,
66,
67,
103,
155,
207,
228,
280,
342,
382,
443,
470,
530,
577,
648,
767,
823,
861,
920,
967,
1034,
1077,
1110,
1111,
1112,
1152,
1153,
1180,
1181,
1191,
1192,
1193,
1601,
1602,
2259,
2260,
2929,
2930,
3295,
3296,
3511,
3512,
4182,
4183,
4217,
4305,
4354,
4367,
4527,
4812,
4833,
4835,
4884,
4897,
4985,
5272,
5293,
5295,
5344,
5357,
5482,
5758,
5779,
5781,
5830,
5843,
5983,
6281,
6302,
6304,
6353,
6366,
6498,
6771,
6792,
6794,
6843,
6856,
6981,
7259,
7280,
7282,
7331,
7344,
7423,
7706,
7727,
7729,
7778,
7791,
7895,
8179,
8200,
8202,
8251,
8264,
8394,
8675,
8696,
8698,
8747,
8760,
8898,
9186,
9207,
9210,
9224,
9251
],
"line_end_idx": [
8,
46,
47,
66,
67,
103,
155,
207,
228,
280,
342,
382,
443,
470,
530,
577,
648,
767,
823,
861,
920,
967,
1034,
1077,
1110,
1111,
1112,
1152,
1153,
1180,
1181,
1191,
1192,
1193,
1601,
1602,
2259,
2260,
2929,
2930,
3295,
3296,
3511,
3512,
4182,
4183,
4217,
4305,
4354,
4367,
4527,
4812,
4833,
4835,
4884,
4897,
4985,
5272,
5293,
5295,
5344,
5357,
5482,
5758,
5779,
5781,
5830,
5843,
5983,
6281,
6302,
6304,
6353,
6366,
6498,
6771,
6792,
6794,
6843,
6856,
6981,
7259,
7280,
7282,
7331,
7344,
7423,
7706,
7727,
7729,
7778,
7791,
7895,
8179,
8200,
8202,
8251,
8264,
8394,
8675,
8696,
8698,
8747,
8760,
8898,
9186,
9207,
9210,
9224,
9251,
9260
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 9260,
"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.0006447500200010836,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0019342399900779128,
"rps_doc_frac_lines_end_with_ellipsis": 0.09909909963607788,
"rps_doc_frac_no_alph_words": 0.9535783529281616,
"rps_doc_frac_unique_words": 0.4908592402935028,
"rps_doc_mean_word_length": 7.042047500610352,
"rps_doc_num_sentences": 84,
"rps_doc_symbol_to_word_ratio": 0.026434559375047684,
"rps_doc_unigram_entropy": 5.767560005187988,
"rps_doc_word_count": 1094,
"rps_doc_frac_chars_dupe_10grams": 0.1928868144750595,
"rps_doc_frac_chars_dupe_5grams": 0.2432502657175064,
"rps_doc_frac_chars_dupe_6grams": 0.23883697390556335,
"rps_doc_frac_chars_dupe_7grams": 0.22533749043941498,
"rps_doc_frac_chars_dupe_8grams": 0.1928868144750595,
"rps_doc_frac_chars_dupe_9grams": 0.1928868144750595,
"rps_doc_frac_chars_top_2gram": 0.04361370950937271,
"rps_doc_frac_chars_top_3gram": 0.05607476830482483,
"rps_doc_frac_chars_top_4gram": 0.020768430083990097,
"rps_doc_books_importance": -777.7412719726562,
"rps_doc_books_importance_length_correction": -777.7412719726562,
"rps_doc_openwebtext_importance": -384.6148681640625,
"rps_doc_openwebtext_importance_length_correction": -384.6148681640625,
"rps_doc_wikipedia_importance": -204.71197509765625,
"rps_doc_wikipedia_importance_length_correction": -204.71197509765625
},
"fasttext": {
"dclm": 0.39381009340286255,
"english": 0.00001143000008596573,
"fineweb_edu_approx": 1.9955365657806396,
"eai_general_math": 0.000004290000106266234,
"eai_open_web_math": 0.3657394051551819,
"eai_web_code": 0.30713146924972534
}
} | {
"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.101",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "6",
"label": "Content Listing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,160,860,353,047,442,000 | Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
In my monitor preferences, the maximum resolution is 1024x768. But I still want to increase the system resolution(to for e.g. 1600x900 or 1440x900).
share|improve this question
1
That sounds like a bug, and not like something related to Unity...? – JanC Apr 5 '11 at 14:23
Welcome to Ask Ubuntu! Welcome to Ask Ubuntu! We need more hardware information to help you, can you look at this link and then edit your question adding more detail? askubuntu.com/questions/14008/… – Jorge Castro Apr 5 '11 at 14:30
do you have the right drivers installed? and what kind of graphics do you have? is it a laptop, a desktop, a paper plane? - this kind of information will help you get an answer. – RolandiXor Apr 5 '11 at 14:31
I'm a pretty advanced user and I find that sometimes, its easier to re-install my OS , than it is to try to hack the X window settings or rely on a driver update that is "claimed" to work. – djangofan Apr 5 '11 at 21:34
What is the make and model of your monitor. This might be a common problem of that specific monitor? – Gabriel Fair Apr 6 '11 at 4:42
add comment
2 Answers
Your monitor might not be capable of going up to those resolutions with the current drivers. Check your hardware drivers by looking for proprietary drivers. Also, please edit your question to include what system you're running, such as 10.04 vs. 10.10, Desktop vs. Laptop, etc.
share|improve this answer
add comment
the monitor must has be exactly as a resolution.
But the simply solution, you can buy the monitor gain the resolution, but not for the laptop, that's may not probably help to gain the resolution.
share|improve this answer
add comment
Your Answer
discard
By posting your answer, you agree to the privacy policy and terms of service. | {
"url": "http://askubuntu.com/questions/33635/how-to-change-the-resolution-of-my-desktop/33711",
"source_domain": "askubuntu.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "71042",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MRIJPP3QBDLQPG2W53MD363LSYQSHRZF",
"WARC-Concurrent-To": "<urn:uuid:26baef84-0dfd-4bec-80da-17a2632cb477>",
"WARC-Date": "2014-04-24T07:32:43Z",
"WARC-IP-Address": "198.252.206.24",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:W4HA7IFVQKL5YQAOO26FY3OI7RMGZA5T",
"WARC-Record-ID": "<urn:uuid:774a2ae2-960b-4961-95ba-87809033f1d6>",
"WARC-Target-URI": "http://askubuntu.com/questions/33635/how-to-change-the-resolution-of-my-desktop/33711",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:208f638a-1e71-409c-a77f-b5db48c9272a>"
},
"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,
25,
141,
142,
291,
292,
320,
324,
419,
424,
658,
663,
874,
879,
1100,
1105,
1240,
1252,
1253,
1263,
1264,
1542,
1543,
1569,
1581,
1582,
1631,
1632,
1779,
1780,
1806,
1818,
1819,
1831,
1832,
1834,
1842,
1843
],
"line_end_idx": [
25,
141,
142,
291,
292,
320,
324,
419,
424,
658,
663,
874,
879,
1100,
1105,
1240,
1252,
1253,
1263,
1264,
1542,
1543,
1569,
1581,
1582,
1631,
1632,
1779,
1780,
1806,
1818,
1819,
1831,
1832,
1834,
1842,
1843,
1920
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1920,
"ccnet_original_nlines": 37,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3811764717102051,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0117647098377347,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24941176176071167,
"rps_doc_frac_unique_words": 0.5255255103111267,
"rps_doc_mean_word_length": 4.417417526245117,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0.004705879837274551,
"rps_doc_unigram_entropy": 4.825824737548828,
"rps_doc_word_count": 333,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04350782185792923,
"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.013596190139651299,
"rps_doc_frac_chars_top_3gram": 0.016315430402755737,
"rps_doc_frac_chars_top_4gram": 0.021753910928964615,
"rps_doc_books_importance": -213.4131622314453,
"rps_doc_books_importance_length_correction": -213.4131622314453,
"rps_doc_openwebtext_importance": -104.53871154785156,
"rps_doc_openwebtext_importance_length_correction": -104.53871154785156,
"rps_doc_wikipedia_importance": -96.10396575927734,
"rps_doc_wikipedia_importance_length_correction": -96.10396575927734
},
"fasttext": {
"dclm": 0.16019576787948608,
"english": 0.9118951559066772,
"fineweb_edu_approx": 1.2191723585128784,
"eai_general_math": 0.002336079953238368,
"eai_open_web_math": 0.24911731481552124,
"eai_web_code": -0.000007269999969139462
}
} | {
"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": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "1",
"label": "Leftover HTML"
}
},
"missing_content": {
"primary": {
"code": "2",
"label": "Click Here References"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
6,735,855,067,161,613,000 | summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/sys_sparc_64.c
blob: cb1bef6f14b7240e3f87bb693b060fcbcb90a081 (plain)
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
/* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
* have a non-standard calling sequence on the Linux/sparc
* platform.
*/
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/mm.h>
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
#include <linux/stat.h>
#include <linux/mman.h>
#include <linux/utsname.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/ipc.h>
#include <linux/personality.h>
#include <linux/random.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/utrap.h>
#include <asm/unistd.h>
#include "entry.h"
#include "systbls.h"
/* #define DEBUG_UNIMP_SYSCALL */
asmlinkage unsigned long sys_getpagesize(void)
{
return PAGE_SIZE;
}
#define VA_EXCLUDE_START (0x0000080000000000UL - (1UL << 32UL))
#define VA_EXCLUDE_END (0xfffff80000000000UL + (1UL << 32UL))
/* Does addr --> addr+len fall within 4GB of the VA-space hole or
* overflow past the end of the 64-bit address space?
*/
static inline int invalid_64bit_range(unsigned long addr, unsigned long len)
{
unsigned long va_exclude_start, va_exclude_end;
va_exclude_start = VA_EXCLUDE_START;
va_exclude_end = VA_EXCLUDE_END;
if (unlikely(len >= va_exclude_start))
return 1;
if (unlikely((addr + len) < addr))
return 1;
if (unlikely((addr >= va_exclude_start && addr < va_exclude_end) ||
((addr + len) >= va_exclude_start &&
(addr + len) < va_exclude_end)))
return 1;
return 0;
}
/* Does start,end straddle the VA-space hole? */
static inline int straddles_64bit_va_hole(unsigned long start, unsigned long end)
{
unsigned long va_exclude_start, va_exclude_end;
va_exclude_start = VA_EXCLUDE_START;
va_exclude_end = VA_EXCLUDE_END;
if (likely(start < va_exclude_start && end < va_exclude_start))
return 0;
if (likely(start >= va_exclude_end && end >= va_exclude_end))
return 0;
return 1;
}
/* These functions differ from the default implementations in
* mm/mmap.c in two ways:
*
* 1) For file backed MAP_SHARED mmap()'s we D-cache color align,
* for fixed such mappings we just validate what the user gave us.
* 2) For 64-bit tasks we avoid mapping anything within 4GB of
* the spitfire/niagara VA-hole.
*/
static inline unsigned long COLOUR_ALIGN(unsigned long addr,
unsigned long pgoff)
{
unsigned long base = (addr+SHMLBA-1)&~(SHMLBA-1);
unsigned long off = (pgoff<<PAGE_SHIFT) & (SHMLBA-1);
return base + off;
}
static inline unsigned long COLOUR_ALIGN_DOWN(unsigned long addr,
unsigned long pgoff)
{
unsigned long base = addr & ~(SHMLBA-1);
unsigned long off = (pgoff<<PAGE_SHIFT) & (SHMLBA-1);
if (base + off <= addr)
return base + off;
return base - off;
}
unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct * vma;
unsigned long task_size = TASK_SIZE;
unsigned long start_addr;
int do_color_align;
if (flags & MAP_FIXED) {
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
if ((flags & MAP_SHARED) &&
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
}
if (test_thread_flag(TIF_32BIT))
task_size = STACK_TOP32;
if (unlikely(len > task_size || len >= VA_EXCLUDE_START))
return -ENOMEM;
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
if (task_size - len >= addr &&
(!vma || addr + len <= vma->vm_start))
return addr;
}
if (len > mm->cached_hole_size) {
start_addr = addr = mm->free_area_cache;
} else {
start_addr = addr = TASK_UNMAPPED_BASE;
mm->cached_hole_size = 0;
}
task_size -= len;
full_search:
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
addr = PAGE_ALIGN(addr);
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (addr < VA_EXCLUDE_START &&
(addr + len) >= VA_EXCLUDE_START) {
addr = VA_EXCLUDE_END;
vma = find_vma(mm, VA_EXCLUDE_END);
}
if (unlikely(task_size < addr)) {
if (start_addr != TASK_UNMAPPED_BASE) {
start_addr = addr = TASK_UNMAPPED_BASE;
mm->cached_hole_size = 0;
goto full_search;
}
return -ENOMEM;
}
if (likely(!vma || addr + len <= vma->vm_start)) {
/*
* Remember the place where we stopped the search:
*/
mm->free_area_cache = addr + len;
return addr;
}
if (addr + mm->cached_hole_size < vma->vm_start)
mm->cached_hole_size = vma->vm_start - addr;
addr = vma->vm_end;
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
}
}
unsigned long
arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
const unsigned long len, const unsigned long pgoff,
const unsigned long flags)
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
unsigned long task_size = STACK_TOP32;
unsigned long addr = addr0;
int do_color_align;
/* This should only ever run for 32-bit processes. */
BUG_ON(!test_thread_flag(TIF_32BIT));
if (flags & MAP_FIXED) {
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
if ((flags & MAP_SHARED) &&
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
}
if (unlikely(len > task_size))
return -ENOMEM;
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
/* requesting a specific address */
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
if (task_size - len >= addr &&
(!vma || addr + len <= vma->vm_start))
return addr;
}
/* check if free_area_cache is useful for us */
if (len <= mm->cached_hole_size) {
mm->cached_hole_size = 0;
mm->free_area_cache = mm->mmap_base;
}
/* either no address requested or can't fit in requested address hole */
addr = mm->free_area_cache;
if (do_color_align) {
unsigned long base = COLOUR_ALIGN_DOWN(addr-len, pgoff);
addr = base + len;
}
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
if (!vma || addr <= vma->vm_start) {
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
}
if (unlikely(mm->mmap_base < len))
goto bottomup;
addr = mm->mmap_base-len;
if (do_color_align)
addr = COLOUR_ALIGN_DOWN(addr, pgoff);
do {
/*
* Lookup failure means no vma is above this address,
* else if new region fits below vma->vm_start,
* return with success:
*/
vma = find_vma(mm, addr);
if (likely(!vma || addr+len <= vma->vm_start)) {
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
/* remember the largest hole we saw so far */
if (addr + mm->cached_hole_size < vma->vm_start)
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
addr = vma->vm_start-len;
if (do_color_align)
addr = COLOUR_ALIGN_DOWN(addr, pgoff);
} while (likely(len < vma->vm_start));
bottomup:
/*
* A failed mmap() very likely causes application failure,
* so fall back to the bottom-up function here. This scenario
* can happen with large stack limits and large mmap()
* allocations.
*/
mm->cached_hole_size = ~0UL;
mm->free_area_cache = TASK_UNMAPPED_BASE;
addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags);
/*
* Restore the topdown base:
*/
mm->free_area_cache = mm->mmap_base;
mm->cached_hole_size = ~0UL;
return addr;
}
/* Try to align mapping such that we align it as much as possible. */
unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags)
{
unsigned long align_goal, addr = -ENOMEM;
unsigned long (*get_area)(struct file *, unsigned long,
unsigned long, unsigned long, unsigned long);
get_area = current->mm->get_unmapped_area;
if (flags & MAP_FIXED) {
/* Ok, don't mess with it. */
return get_area(NULL, orig_addr, len, pgoff, flags);
}
flags &= ~MAP_SHARED;
align_goal = PAGE_SIZE;
if (len >= (4UL * 1024 * 1024))
align_goal = (4UL * 1024 * 1024);
else if (len >= (512UL * 1024))
align_goal = (512UL * 1024);
else if (len >= (64UL * 1024))
align_goal = (64UL * 1024);
do {
addr = get_area(NULL, orig_addr, len + (align_goal - PAGE_SIZE), pgoff, flags);
if (!(addr & ~PAGE_MASK)) {
addr = (addr + (align_goal - 1UL)) & ~(align_goal - 1UL);
break;
}
if (align_goal == (4UL * 1024 * 1024))
align_goal = (512UL * 1024);
else if (align_goal == (512UL * 1024))
align_goal = (64UL * 1024);
else
align_goal = PAGE_SIZE;
} while ((addr & ~PAGE_MASK) && align_goal > PAGE_SIZE);
/* Mapping is smaller than 64K or larger areas could not
* be obtained.
*/
if (addr & ~PAGE_MASK)
addr = get_area(NULL, orig_addr, len, pgoff, flags);
return addr;
}
EXPORT_SYMBOL(get_fb_unmapped_area);
/* Essentially the same as PowerPC... */
void arch_pick_mmap_layout(struct mm_struct *mm)
{
unsigned long random_factor = 0UL;
unsigned long gap;
if (current->flags & PF_RANDOMIZE) {
random_factor = get_random_int();
if (test_thread_flag(TIF_32BIT))
random_factor &= ((1 * 1024 * 1024) - 1);
else
random_factor = ((random_factor << PAGE_SHIFT) &
0xffffffffUL);
}
/*
* Fall back to the standard layout if the personality
* bit is set, or if the expected stack growth is unlimited:
*/
gap = rlimit(RLIMIT_STACK);
if (!test_thread_flag(TIF_32BIT) ||
(current->personality & ADDR_COMPAT_LAYOUT) ||
gap == RLIM_INFINITY ||
sysctl_legacy_va_layout) {
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
} else {
/* We know it's 32-bit */
unsigned long task_size = STACK_TOP32;
if (gap < 128 * 1024 * 1024)
gap = 128 * 1024 * 1024;
if (gap > (task_size / 6 * 5))
gap = (task_size / 6 * 5);
mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
}
/*
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though.
*/
SYSCALL_DEFINE1(sparc_pipe_real, struct pt_regs *, regs)
{
int fd[2];
int error;
error = do_pipe_flags(fd, 0);
if (error)
goto out;
regs->u_regs[UREG_I1] = fd[1];
error = fd[0];
out:
return error;
}
/*
* sys_ipc() is the de-multiplexer for the SysV IPC calls..
*
* This is really horribly ugly.
*/
SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
unsigned long, third, void __user *, ptr, long, fifth)
{
long err;
/* No need for backward compatibility. We can start fresh... */
if (call <= SEMCTL) {
switch (call) {
case SEMOP:
err = sys_semtimedop(first, ptr,
(unsigned)second, NULL);
goto out;
case SEMTIMEDOP:
err = sys_semtimedop(first, ptr, (unsigned)second,
(const struct timespec __user *)
(unsigned long) fifth);
goto out;
case SEMGET:
err = sys_semget(first, (int)second, (int)third);
goto out;
case SEMCTL: {
err = sys_semctl(first, second,
(int)third | IPC_64,
(union semun) ptr);
goto out;
}
default:
err = -ENOSYS;
goto out;
};
}
if (call <= MSGCTL) {
switch (call) {
case MSGSND:
err = sys_msgsnd(first, ptr, (size_t)second,
(int)third);
goto out;
case MSGRCV:
err = sys_msgrcv(first, ptr, (size_t)second, fifth,
(int)third);
goto out;
case MSGGET:
err = sys_msgget((key_t)first, (int)second);
goto out;
case MSGCTL:
err = sys_msgctl(first, (int)second | IPC_64, ptr);
goto out;
default:
err = -ENOSYS;
goto out;
};
}
if (call <= SHMCTL) {
switch (call) {
case SHMAT: {
ulong raddr;
err = do_shmat(first, ptr, (int)second, &raddr);
if (!err) {
if (put_user(raddr,
(ulong __user *) third))
err = -EFAULT;
}
goto out;
}
case SHMDT:
err = sys_shmdt(ptr);
goto out;
case SHMGET:
err = sys_shmget(first, (size_t)second, (int)third);
goto out;
case SHMCTL:
err = sys_shmctl(first, (int)second | IPC_64, ptr);
goto out;
default:
err = -ENOSYS;
goto out;
};
} else {
err = -ENOSYS;
}
out:
return err;
}
SYSCALL_DEFINE1(sparc64_newuname, struct new_utsname __user *, name)
{
int ret = sys_newuname(name);
if (current->personality == PER_LINUX32 && !ret) {
ret = (copy_to_user(name->machine, "sparc\0\0", 8)
? -EFAULT : 0);
}
return ret;
}
SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
{
int ret;
if (current->personality == PER_LINUX32 &&
personality == PER_LINUX)
personality = PER_LINUX32;
ret = sys_personality(personality);
if (ret == PER_LINUX32)
ret = PER_LINUX;
return ret;
}
int sparc_mmap_check(unsigned long addr, unsigned long len)
{
if (test_thread_flag(TIF_32BIT)) {
if (len >= STACK_TOP32)
return -EINVAL;
if (addr > STACK_TOP32 - len)
return -EINVAL;
} else {
if (len >= VA_EXCLUDE_START)
return -EINVAL;
if (invalid_64bit_range(addr, len))
return -EINVAL;
}
return 0;
}
/* Linux version of mmap */
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, fd,
unsigned long, off)
{
unsigned long retval = -EINVAL;
if ((off + PAGE_ALIGN(len)) < off)
goto out;
if (off & ~PAGE_MASK)
goto out;
retval = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
out:
return retval;
}
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
{
long ret;
if (invalid_64bit_range(addr, len))
return -EINVAL;
down_write(¤t->mm->mmap_sem);
ret = do_munmap(current->mm, addr, len);
up_write(¤t->mm->mmap_sem);
return ret;
}
extern unsigned long do_mremap(unsigned long addr,
unsigned long old_len, unsigned long new_len,
unsigned long flags, unsigned long new_addr);
SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
unsigned long, new_len, unsigned long, flags,
unsigned long, new_addr)
{
unsigned long ret = -EINVAL;
if (test_thread_flag(TIF_32BIT))
goto out;
down_write(¤t->mm->mmap_sem);
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
up_write(¤t->mm->mmap_sem);
out:
return ret;
}
/* we come to here via sys_nis_syscall so it can setup the regs argument */
asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs)
{
static int count;
/* Don't make the system unusable, if someone goes stuck */
if (count++ > 5)
return -ENOSYS;
printk ("Unimplemented SPARC system call %ld\n",regs->u_regs[1]);
#ifdef DEBUG_UNIMP_SYSCALL
show_regs (regs);
#endif
return -ENOSYS;
}
/* #define DEBUG_SPARC_BREAKPOINT */
asmlinkage void sparc_breakpoint(struct pt_regs *regs)
{
siginfo_t info;
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
#ifdef DEBUG_SPARC_BREAKPOINT
printk ("TRAP: Entering kernel PC=%lx, nPC=%lx\n", regs->tpc, regs->tnpc);
#endif
info.si_signo = SIGTRAP;
info.si_errno = 0;
info.si_code = TRAP_BRKPT;
info.si_addr = (void __user *)regs->tpc;
info.si_trapno = 0;
force_sig_info(SIGTRAP, &info, current);
#ifdef DEBUG_SPARC_BREAKPOINT
printk ("TRAP: Returning to space: PC=%lx nPC=%lx\n", regs->tpc, regs->tnpc);
#endif
}
extern void check_pending(int signum);
SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
{
int nlen, err;
if (len < 0)
return -EINVAL;
down_read(&uts_sem);
nlen = strlen(utsname()->domainname) + 1;
err = -EINVAL;
if (nlen > len)
goto out;
err = -EFAULT;
if (!copy_to_user(name, utsname()->domainname, nlen))
err = 0;
out:
up_read(&uts_sem);
return err;
}
SYSCALL_DEFINE5(utrap_install, utrap_entry_t, type,
utrap_handler_t, new_p, utrap_handler_t, new_d,
utrap_handler_t __user *, old_p,
utrap_handler_t __user *, old_d)
{
if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
return -EINVAL;
if (new_p == (utrap_handler_t)(long)UTH_NOCHANGE) {
if (old_p) {
if (!current_thread_info()->utraps) {
if (put_user(NULL, old_p))
return -EFAULT;
} else {
if (put_user((utrap_handler_t)(current_thread_info()->utraps[type]), old_p))
return -EFAULT;
}
}
if (old_d) {
if (put_user(NULL, old_d))
return -EFAULT;
}
return 0;
}
if (!current_thread_info()->utraps) {
current_thread_info()->utraps =
kzalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long), GFP_KERNEL);
if (!current_thread_info()->utraps)
return -ENOMEM;
current_thread_info()->utraps[0] = 1;
} else {
if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p &&
current_thread_info()->utraps[0] > 1) {
unsigned long *p = current_thread_info()->utraps;
current_thread_info()->utraps =
kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long),
GFP_KERNEL);
if (!current_thread_info()->utraps) {
current_thread_info()->utraps = p;
return -ENOMEM;
}
p[0]--;
current_thread_info()->utraps[0] = 1;
memcpy(current_thread_info()->utraps+1, p+1,
UT_TRAP_INSTRUCTION_31*sizeof(long));
}
}
if (old_p) {
if (put_user((utrap_handler_t)(current_thread_info()->utraps[type]), old_p))
return -EFAULT;
}
if (old_d) {
if (put_user(NULL, old_d))
return -EFAULT;
}
current_thread_info()->utraps[type] = (long)new_p;
return 0;
}
asmlinkage long sparc_memory_ordering(unsigned long model,
struct pt_regs *regs)
{
if (model >= 3)
return -EINVAL;
regs->tstate = (regs->tstate & ~TSTATE_MM) | (model << 14);
return 0;
}
SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
struct sigaction __user *, oact, void __user *, restorer,
size_t, sigsetsize)
{
struct k_sigaction new_ka, old_ka;
int ret;
/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
if (act) {
new_ka.ka_restorer = restorer;
if (copy_from_user(&new_ka.sa, act, sizeof(*act)))
return -EFAULT;
}
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
if (!ret && oact) {
if (copy_to_user(oact, &old_ka.sa, sizeof(*oact)))
return -EFAULT;
}
return ret;
}
/*
* Do a system call from kernel instead of calling sys_execve so we
* end up with proper pt_regs.
*/
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
{
long __res;
register long __g1 __asm__ ("g1") = __NR_execve;
register long __o0 __asm__ ("o0") = (long)(filename);
register long __o1 __asm__ ("o1") = (long)(argv);
register long __o2 __asm__ ("o2") = (long)(envp);
asm volatile ("t 0x6d\n\t"
"sub %%g0, %%o0, %0\n\t"
"movcc %%xcc, %%o0, %0\n\t"
: "=r" (__res), "=&r" (__o0)
: "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1)
: "cc");
return __res;
} | {
"url": "https://git.kernel.dk/cgit/linux-block/tree/arch/sparc/kernel/sys_sparc_64.c?id=a4679373cf4ee0e7792dc56205365732b725c2c1",
"source_domain": "git.kernel.dk",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "80296",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LIKYMP252UVTBTLGOTB7I7EJLLST4ZKC",
"WARC-Concurrent-To": "<urn:uuid:2025c980-3162-49b6-a168-cc14757cb478>",
"WARC-Date": "2023-03-31T06:40:25Z",
"WARC-IP-Address": "96.43.243.2",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:KQTIBTXISJPVHVU26TFYWCKOSGVHOWLR",
"WARC-Record-ID": "<urn:uuid:f215cbc5-d751-4a64-8711-57deca0739b2>",
"WARC-Target-URI": "https://git.kernel.dk/cgit/linux-block/tree/arch/sparc/kernel/sys_sparc_64.c?id=a4679373cf4ee0e7792dc56205365732b725c2c1",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:98ef999f-ce54-45d4-ab52-94bc4ea3d69c>"
},
"warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-81\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,
29,
73,
128,
130,
132,
134,
136,
138,
140,
142,
144,
146,
149,
152,
155,
158,
161,
164,
167,
170,
173,
176,
179,
182,
185,
188,
191,
194,
197,
200,
203,
206,
209,
212,
215,
218,
221,
224,
227,
230,
233,
236,
239,
242,
245,
248,
251,
254,
257,
260,
263,
266,
269,
272,
275,
278,
281,
284,
287,
290,
293,
296,
299,
302,
305,
308,
311,
314,
317,
320,
323,
326,
329,
332,
335,
338,
341,
344,
347,
350,
353,
356,
359,
362,
365,
368,
371,
374,
377,
380,
383,
386,
389,
392,
395,
398,
401,
404,
407,
410,
413,
416,
420,
424,
428,
432,
436,
440,
444,
448,
452,
456,
460,
464,
468,
472,
476,
480,
484,
488,
492,
496,
500,
504,
508,
512,
516,
520,
524,
528,
532,
536,
540,
544,
548,
552,
556,
560,
564,
568,
572,
576,
580,
584,
588,
592,
596,
600,
604,
608,
612,
616,
620,
624,
628,
632,
636,
640,
644,
648,
652,
656,
660,
664,
668,
672,
676,
680,
684,
688,
692,
696,
700,
704,
708,
712,
716,
720,
724,
728,
732,
736,
740,
744,
748,
752,
756,
760,
764,
768,
772,
776,
780,
784,
788,
792,
796,
800,
804,
808,
812,
816,
820,
824,
828,
832,
836,
840,
844,
848,
852,
856,
860,
864,
868,
872,
876,
880,
884,
888,
892,
896,
900,
904,
908,
912,
916,
920,
924,
928,
932,
936,
940,
944,
948,
952,
956,
960,
964,
968,
972,
976,
980,
984,
988,
992,
996,
1000,
1004,
1008,
1012,
1016,
1020,
1024,
1028,
1032,
1036,
1040,
1044,
1048,
1052,
1056,
1060,
1064,
1068,
1072,
1076,
1080,
1084,
1088,
1092,
1096,
1100,
1104,
1108,
1112,
1116,
1120,
1124,
1128,
1132,
1136,
1140,
1144,
1148,
1152,
1156,
1160,
1164,
1168,
1172,
1176,
1180,
1184,
1188,
1192,
1196,
1200,
1204,
1208,
1212,
1216,
1220,
1224,
1228,
1232,
1236,
1240,
1244,
1248,
1252,
1256,
1260,
1264,
1268,
1272,
1276,
1280,
1284,
1288,
1292,
1296,
1300,
1304,
1308,
1312,
1316,
1320,
1324,
1328,
1332,
1336,
1340,
1344,
1348,
1352,
1356,
1360,
1364,
1368,
1372,
1376,
1380,
1384,
1388,
1392,
1396,
1400,
1404,
1408,
1412,
1416,
1420,
1424,
1428,
1432,
1436,
1440,
1444,
1448,
1452,
1456,
1460,
1464,
1468,
1472,
1476,
1480,
1484,
1488,
1492,
1496,
1500,
1504,
1508,
1512,
1516,
1520,
1524,
1528,
1532,
1536,
1540,
1544,
1548,
1552,
1556,
1560,
1564,
1568,
1572,
1576,
1580,
1584,
1588,
1592,
1596,
1600,
1604,
1608,
1612,
1616,
1620,
1624,
1628,
1632,
1636,
1640,
1644,
1648,
1652,
1656,
1660,
1664,
1668,
1672,
1676,
1680,
1684,
1688,
1692,
1696,
1700,
1704,
1708,
1712,
1716,
1720,
1724,
1728,
1732,
1736,
1740,
1744,
1748,
1752,
1756,
1760,
1764,
1768,
1772,
1776,
1780,
1784,
1788,
1792,
1796,
1800,
1804,
1808,
1812,
1816,
1820,
1824,
1828,
1832,
1836,
1840,
1844,
1848,
1852,
1856,
1860,
1864,
1868,
1872,
1876,
1880,
1884,
1888,
1892,
1896,
1900,
1904,
1908,
1912,
1916,
1920,
1924,
1928,
1932,
1936,
1940,
1944,
1948,
1952,
1956,
1960,
1964,
1968,
1972,
1976,
1980,
1984,
1988,
1992,
1996,
2000,
2004,
2008,
2012,
2016,
2020,
2024,
2028,
2032,
2036,
2040,
2044,
2048,
2052,
2056,
2060,
2064,
2068,
2072,
2076,
2080,
2084,
2088,
2092,
2096,
2100,
2104,
2108,
2112,
2116,
2120,
2124,
2128,
2132,
2136,
2140,
2144,
2148,
2152,
2156,
2160,
2164,
2168,
2172,
2176,
2180,
2184,
2188,
2192,
2196,
2200,
2204,
2208,
2212,
2216,
2220,
2224,
2228,
2232,
2236,
2240,
2244,
2248,
2252,
2256,
2260,
2264,
2268,
2272,
2276,
2280,
2284,
2288,
2292,
2296,
2300,
2304,
2308,
2312,
2316,
2320,
2324,
2328,
2332,
2336,
2340,
2344,
2348,
2352,
2356,
2360,
2364,
2368,
2372,
2376,
2380,
2384,
2388,
2392,
2396,
2400,
2404,
2408,
2412,
2416,
2420,
2424,
2428,
2432,
2436,
2440,
2444,
2448,
2452,
2456,
2460,
2464,
2468,
2472,
2476,
2480,
2484,
2488,
2492,
2496,
2500,
2504,
2508,
2512,
2516,
2520,
2524,
2528,
2532,
2536,
2540,
2544,
2548,
2552,
2556,
2560,
2564,
2568,
2572,
2576,
2580,
2584,
2588,
2592,
2596,
2600,
2604,
2608,
2612,
2616,
2620,
2624,
2628,
2632,
2636,
2640,
2644,
2648,
2652,
2656,
2660,
2664,
2668,
2672,
2676,
2680,
2684,
2688,
2692,
2696,
2700,
2704,
2708,
2712,
2716,
2720,
2724,
2728,
2732,
2736,
2740,
2744,
2748,
2752,
2756,
2760,
2764,
2768,
2772,
2776,
2780,
2784,
2788,
2792,
2796,
2800,
2804,
2808,
2812,
2816,
2820,
2824,
2828,
2832,
2836,
2840,
2844,
2848,
2852,
2856,
2860,
2864,
2868,
2872,
2876,
2880,
2884,
2888,
2892,
2896,
2900,
2904,
2908,
2912,
2916,
2920,
2924,
2928,
2932,
2936,
2940,
2944,
2948,
2952,
2956,
2960,
2964,
2968,
2972,
2976,
2980,
2984,
2988,
2992,
2996,
3000,
3004,
3008,
3012,
3016,
3020,
3024,
3028,
3032,
3036,
3040,
3044,
3048,
3052,
3056,
3060,
3064,
3068,
3072,
3076,
3080,
3084,
3088,
3092,
3096,
3100,
3104,
3108,
3112,
3116,
3120,
3124,
3128,
3132,
3136,
3140,
3144,
3148,
3152,
3156,
3160,
3164,
3205,
3208,
3263,
3322,
3335,
3339,
3340,
3365,
3390,
3415,
3437,
3461,
3483,
3506,
3529,
3552,
3576,
3600,
3627,
3650,
3674,
3702,
3725,
3756,
3782,
3808,
3809,
3834,
3857,
3881,
3882,
3901,
3922,
3923,
3957,
3958,
4005,
4007,
4026,
4028,
4029,
4093,
4157,
4158,
4224,
4278,
4282,
4359,
4361,
4410,
4411,
4449,
4485,
4486,
4526,
4538,
4539,
4575,
4587,
4588,
4657,
4701,
4742,
4754,
4755,
4766,
4768,
4769,
4819,
4901,
4903,
4952,
4953,
4991,
5027,
5028,
5093,
5105,
5106,
5169,
5181,
5182,
5193,
5195,
5196,
5258,
5284,
5287,
5353,
5423,
5486,
5522,
5526,
5527,
5588,
5615,
5617,
5668,
5723,
5724,
5744,
5746,
5747,
5813,
5845,
5847,
5889,
5944,
5945,
5970,
5991,
6011,
6013,
6014,
6151,
6153,
6190,
6220,
6258,
6285,
6306,
6307,
6333,
6392,
6425,
6431,
6461,
6516,
6535,
6550,
6553,
6554,
6588,
6615,
6674,
6692,
6693,
6714,
6749,
6771,
6772,
6785,
6807,
6844,
6851,
6879,
6880,
6908,
6941,
6986,
7002,
7005,
7006,
7041,
7091,
7101,
7150,
7185,
7188,
7189,
7208,
7209,
7222,
7243,
7279,
7285,
7312,
7313,
7369,
7423,
7456,
7498,
7524,
7563,
7567,
7603,
7646,
7690,
7720,
7742,
7747,
7766,
7770,
7823,
7829,
7883,
7890,
7927,
7943,
7947,
7998,
8053,
8054,
8076,
8098,
8135,
8138,
8140,
8141,
8155,
8232,
8289,
8321,
8323,
8352,
8389,
8429,
8458,
8479,
8480,
8536,
8575,
8576,
8602,
8661,
8694,
8700,
8730,
8785,
8804,
8819,
8822,
8823,
8855,
8873,
8874,
8895,
8930,
8952,
8953,
8990,
9003,
9025,
9062,
9069,
9097,
9098,
9126,
9159,
9204,
9220,
9223,
9224,
9273,
9309,
9345,
9385,
9389,
9390,
9464,
9493,
9516,
9575,
9576,
9597,
9600,
9601,
9660,
9687,
9719,
9758,
9812,
9856,
9860,
9863,
9864,
9900,
9917,
9918,
9945,
9966,
10007,
10008,
10014,
10019,
10075,
10125,
10151,
10157,
10185,
10236,
10290,
10330,
10334,
10335,
10384,
10436,
10492,
10493,
10542,
10570,
10592,
10634,
10674,
10675,
10685,
10689,
10749,
10812,
10868,
10885,
10890,
10920,
10965,
11029,
11033,
11063,
11068,
11106,
11136,
11137,
11151,
11153,
11154,
11224,
11364,
11366,
11409,
11466,
11518,
11519,
11563,
11564,
11590,
11622,
11677,
11680,
11703,
11704,
11729,
11762,
11798,
11831,
11862,
11894,
11924,
11925,
11931,
12013,
12043,
12104,
12114,
12118,
12119,
12160,
12192,
12233,
12264,
12271,
12298,
12356,
12357,
12415,
12432,
12437,
12461,
12516,
12517,
12531,
12533,
12570,
12571,
12612,
12661,
12663,
12699,
12719,
12720,
12758,
12794,
12829,
12874,
12881,
12933,
12954,
12957,
12958,
12962,
13018,
13080,
13085,
13114,
13151,
13203,
13232,
13264,
13318,
13368,
13404,
13414,
13442,
13483,
13484,
13515,
13543,
13576,
13606,
13607,
13670,
13728,
13772,
13775,
13777,
13778,
13781,
13841,
13907,
13911,
13968,
13970,
13982,
13994,
13995,
14026,
14038,
14050,
14082,
14098,
14103,
14118,
14120,
14121,
14124,
14184,
14187,
14220,
14224,
14225,
14301,
14358,
14360,
14371,
14372,
14437,
14460,
14478,
14492,
14528,
14563,
14576,
14595,
14649,
14686,
14720,
14733,
14748,
14801,
14814,
14831,
14866,
14893,
14919,
14932,
14936,
14947,
14965,
14978,
14983,
14986,
15009,
15027,
15042,
15090,
15109,
15122,
15137,
15192,
15211,
15224,
15239,
15287,
15300,
15315,
15370,
15383,
15394,
15412,
15425,
15430,
15433,
15456,
15474,
15490,
15506,
15558,
15573,
15597,
15632,
15652,
15657,
15670,
15674,
15688,
15713,
15726,
15741,
15797,
15810,
15825,
15880,
15893,
15904,
15922,
15935,
15940,
15950,
15967,
15970,
15975,
15988,
15990,
15991,
16060,
16062,
16093,
16095,
16147,
16200,
16225,
16228,
16241,
16243,
16244,
16309,
16311,
16321,
16322,
16366,
16397,
16426,
16463,
16488,
16507,
16508,
16521,
16523,
16524,
16584,
16586,
16622,
16648,
16667,
16668,
16700,
16719,
16729,
16760,
16779,
16780,
16818,
16837,
16840,
16841,
16852,
16854,
16855,
16883,
16946,
17010,
17032,
17034,
17067,
17068,
17104,
17116,
17139,
17151,
17224,
17229,
17245,
17247,
17248,
17309,
17311,
17322,
17323,
17360,
17378,
17379,
17416,
17458,
17493,
17506,
17508,
17509,
17560,
17607,
17654,
17671,
17743,
17791,
17818,
17820,
17850,
17851,
17885,
17897,
17898,
17935,
17994,
18029,
18034,
18054,
18056,
18057,
18133,
18198,
18200,
18219,
18221,
18282,
18300,
18318,
18319,
18386,
18414,
18433,
18440,
18441,
18458,
18460,
18461,
18498,
18499,
18554,
18556,
18573,
18574,
18610,
18637,
18665,
18668,
18698,
18781,
18788,
18814,
18834,
18862,
18904,
18925,
18967,
18997,
19076,
19083,
19085,
19086,
19125,
19126,
19188,
19190,
19213,
19214,
19228,
19246,
19247,
19270,
19273,
19316,
19332,
19349,
19361,
19362,
19378,
19433,
19444,
19445,
19450,
19470,
19483,
19485,
19486,
19538,
19588,
19623,
19658,
19660,
19731,
19749,
19802,
19817,
19858,
19889,
19910,
19922,
20003,
20024,
20029,
20033,
20048,
20078,
20098,
20102,
20114,
20117,
20156,
20190,
20255,
20293,
20312,
20352,
20362,
20433,
20479,
20532,
20533,
20568,
20621,
20639,
20680,
20719,
20739,
20744,
20755,
20796,
20844,
20892,
20896,
20899,
20913,
20992,
21011,
21014,
21028,
21057,
21076,
21079,
21131,
21132,
21143,
21145,
21146,
21205,
21237,
21239,
21256,
21274,
21335,
21346,
21348,
21349,
21427,
21487,
21509,
21511,
21547,
21557,
21558,
21623,
21660,
21678,
21679,
21691,
21724,
21777,
21796,
21799,
21800,
21871,
21872,
21893,
21946,
21965,
21968,
21969,
21982,
21984,
21985,
21988,
22056,
22087,
22091,
22171,
22173,
22186,
22236,
22291,
22342,
22393,
22421,
22454,
22490,
22527,
22584,
22601,
22616
],
"line_end_idx": [
29,
73,
128,
130,
132,
134,
136,
138,
140,
142,
144,
146,
149,
152,
155,
158,
161,
164,
167,
170,
173,
176,
179,
182,
185,
188,
191,
194,
197,
200,
203,
206,
209,
212,
215,
218,
221,
224,
227,
230,
233,
236,
239,
242,
245,
248,
251,
254,
257,
260,
263,
266,
269,
272,
275,
278,
281,
284,
287,
290,
293,
296,
299,
302,
305,
308,
311,
314,
317,
320,
323,
326,
329,
332,
335,
338,
341,
344,
347,
350,
353,
356,
359,
362,
365,
368,
371,
374,
377,
380,
383,
386,
389,
392,
395,
398,
401,
404,
407,
410,
413,
416,
420,
424,
428,
432,
436,
440,
444,
448,
452,
456,
460,
464,
468,
472,
476,
480,
484,
488,
492,
496,
500,
504,
508,
512,
516,
520,
524,
528,
532,
536,
540,
544,
548,
552,
556,
560,
564,
568,
572,
576,
580,
584,
588,
592,
596,
600,
604,
608,
612,
616,
620,
624,
628,
632,
636,
640,
644,
648,
652,
656,
660,
664,
668,
672,
676,
680,
684,
688,
692,
696,
700,
704,
708,
712,
716,
720,
724,
728,
732,
736,
740,
744,
748,
752,
756,
760,
764,
768,
772,
776,
780,
784,
788,
792,
796,
800,
804,
808,
812,
816,
820,
824,
828,
832,
836,
840,
844,
848,
852,
856,
860,
864,
868,
872,
876,
880,
884,
888,
892,
896,
900,
904,
908,
912,
916,
920,
924,
928,
932,
936,
940,
944,
948,
952,
956,
960,
964,
968,
972,
976,
980,
984,
988,
992,
996,
1000,
1004,
1008,
1012,
1016,
1020,
1024,
1028,
1032,
1036,
1040,
1044,
1048,
1052,
1056,
1060,
1064,
1068,
1072,
1076,
1080,
1084,
1088,
1092,
1096,
1100,
1104,
1108,
1112,
1116,
1120,
1124,
1128,
1132,
1136,
1140,
1144,
1148,
1152,
1156,
1160,
1164,
1168,
1172,
1176,
1180,
1184,
1188,
1192,
1196,
1200,
1204,
1208,
1212,
1216,
1220,
1224,
1228,
1232,
1236,
1240,
1244,
1248,
1252,
1256,
1260,
1264,
1268,
1272,
1276,
1280,
1284,
1288,
1292,
1296,
1300,
1304,
1308,
1312,
1316,
1320,
1324,
1328,
1332,
1336,
1340,
1344,
1348,
1352,
1356,
1360,
1364,
1368,
1372,
1376,
1380,
1384,
1388,
1392,
1396,
1400,
1404,
1408,
1412,
1416,
1420,
1424,
1428,
1432,
1436,
1440,
1444,
1448,
1452,
1456,
1460,
1464,
1468,
1472,
1476,
1480,
1484,
1488,
1492,
1496,
1500,
1504,
1508,
1512,
1516,
1520,
1524,
1528,
1532,
1536,
1540,
1544,
1548,
1552,
1556,
1560,
1564,
1568,
1572,
1576,
1580,
1584,
1588,
1592,
1596,
1600,
1604,
1608,
1612,
1616,
1620,
1624,
1628,
1632,
1636,
1640,
1644,
1648,
1652,
1656,
1660,
1664,
1668,
1672,
1676,
1680,
1684,
1688,
1692,
1696,
1700,
1704,
1708,
1712,
1716,
1720,
1724,
1728,
1732,
1736,
1740,
1744,
1748,
1752,
1756,
1760,
1764,
1768,
1772,
1776,
1780,
1784,
1788,
1792,
1796,
1800,
1804,
1808,
1812,
1816,
1820,
1824,
1828,
1832,
1836,
1840,
1844,
1848,
1852,
1856,
1860,
1864,
1868,
1872,
1876,
1880,
1884,
1888,
1892,
1896,
1900,
1904,
1908,
1912,
1916,
1920,
1924,
1928,
1932,
1936,
1940,
1944,
1948,
1952,
1956,
1960,
1964,
1968,
1972,
1976,
1980,
1984,
1988,
1992,
1996,
2000,
2004,
2008,
2012,
2016,
2020,
2024,
2028,
2032,
2036,
2040,
2044,
2048,
2052,
2056,
2060,
2064,
2068,
2072,
2076,
2080,
2084,
2088,
2092,
2096,
2100,
2104,
2108,
2112,
2116,
2120,
2124,
2128,
2132,
2136,
2140,
2144,
2148,
2152,
2156,
2160,
2164,
2168,
2172,
2176,
2180,
2184,
2188,
2192,
2196,
2200,
2204,
2208,
2212,
2216,
2220,
2224,
2228,
2232,
2236,
2240,
2244,
2248,
2252,
2256,
2260,
2264,
2268,
2272,
2276,
2280,
2284,
2288,
2292,
2296,
2300,
2304,
2308,
2312,
2316,
2320,
2324,
2328,
2332,
2336,
2340,
2344,
2348,
2352,
2356,
2360,
2364,
2368,
2372,
2376,
2380,
2384,
2388,
2392,
2396,
2400,
2404,
2408,
2412,
2416,
2420,
2424,
2428,
2432,
2436,
2440,
2444,
2448,
2452,
2456,
2460,
2464,
2468,
2472,
2476,
2480,
2484,
2488,
2492,
2496,
2500,
2504,
2508,
2512,
2516,
2520,
2524,
2528,
2532,
2536,
2540,
2544,
2548,
2552,
2556,
2560,
2564,
2568,
2572,
2576,
2580,
2584,
2588,
2592,
2596,
2600,
2604,
2608,
2612,
2616,
2620,
2624,
2628,
2632,
2636,
2640,
2644,
2648,
2652,
2656,
2660,
2664,
2668,
2672,
2676,
2680,
2684,
2688,
2692,
2696,
2700,
2704,
2708,
2712,
2716,
2720,
2724,
2728,
2732,
2736,
2740,
2744,
2748,
2752,
2756,
2760,
2764,
2768,
2772,
2776,
2780,
2784,
2788,
2792,
2796,
2800,
2804,
2808,
2812,
2816,
2820,
2824,
2828,
2832,
2836,
2840,
2844,
2848,
2852,
2856,
2860,
2864,
2868,
2872,
2876,
2880,
2884,
2888,
2892,
2896,
2900,
2904,
2908,
2912,
2916,
2920,
2924,
2928,
2932,
2936,
2940,
2944,
2948,
2952,
2956,
2960,
2964,
2968,
2972,
2976,
2980,
2984,
2988,
2992,
2996,
3000,
3004,
3008,
3012,
3016,
3020,
3024,
3028,
3032,
3036,
3040,
3044,
3048,
3052,
3056,
3060,
3064,
3068,
3072,
3076,
3080,
3084,
3088,
3092,
3096,
3100,
3104,
3108,
3112,
3116,
3120,
3124,
3128,
3132,
3136,
3140,
3144,
3148,
3152,
3156,
3160,
3164,
3205,
3208,
3263,
3322,
3335,
3339,
3340,
3365,
3390,
3415,
3437,
3461,
3483,
3506,
3529,
3552,
3576,
3600,
3627,
3650,
3674,
3702,
3725,
3756,
3782,
3808,
3809,
3834,
3857,
3881,
3882,
3901,
3922,
3923,
3957,
3958,
4005,
4007,
4026,
4028,
4029,
4093,
4157,
4158,
4224,
4278,
4282,
4359,
4361,
4410,
4411,
4449,
4485,
4486,
4526,
4538,
4539,
4575,
4587,
4588,
4657,
4701,
4742,
4754,
4755,
4766,
4768,
4769,
4819,
4901,
4903,
4952,
4953,
4991,
5027,
5028,
5093,
5105,
5106,
5169,
5181,
5182,
5193,
5195,
5196,
5258,
5284,
5287,
5353,
5423,
5486,
5522,
5526,
5527,
5588,
5615,
5617,
5668,
5723,
5724,
5744,
5746,
5747,
5813,
5845,
5847,
5889,
5944,
5945,
5970,
5991,
6011,
6013,
6014,
6151,
6153,
6190,
6220,
6258,
6285,
6306,
6307,
6333,
6392,
6425,
6431,
6461,
6516,
6535,
6550,
6553,
6554,
6588,
6615,
6674,
6692,
6693,
6714,
6749,
6771,
6772,
6785,
6807,
6844,
6851,
6879,
6880,
6908,
6941,
6986,
7002,
7005,
7006,
7041,
7091,
7101,
7150,
7185,
7188,
7189,
7208,
7209,
7222,
7243,
7279,
7285,
7312,
7313,
7369,
7423,
7456,
7498,
7524,
7563,
7567,
7603,
7646,
7690,
7720,
7742,
7747,
7766,
7770,
7823,
7829,
7883,
7890,
7927,
7943,
7947,
7998,
8053,
8054,
8076,
8098,
8135,
8138,
8140,
8141,
8155,
8232,
8289,
8321,
8323,
8352,
8389,
8429,
8458,
8479,
8480,
8536,
8575,
8576,
8602,
8661,
8694,
8700,
8730,
8785,
8804,
8819,
8822,
8823,
8855,
8873,
8874,
8895,
8930,
8952,
8953,
8990,
9003,
9025,
9062,
9069,
9097,
9098,
9126,
9159,
9204,
9220,
9223,
9224,
9273,
9309,
9345,
9385,
9389,
9390,
9464,
9493,
9516,
9575,
9576,
9597,
9600,
9601,
9660,
9687,
9719,
9758,
9812,
9856,
9860,
9863,
9864,
9900,
9917,
9918,
9945,
9966,
10007,
10008,
10014,
10019,
10075,
10125,
10151,
10157,
10185,
10236,
10290,
10330,
10334,
10335,
10384,
10436,
10492,
10493,
10542,
10570,
10592,
10634,
10674,
10675,
10685,
10689,
10749,
10812,
10868,
10885,
10890,
10920,
10965,
11029,
11033,
11063,
11068,
11106,
11136,
11137,
11151,
11153,
11154,
11224,
11364,
11366,
11409,
11466,
11518,
11519,
11563,
11564,
11590,
11622,
11677,
11680,
11703,
11704,
11729,
11762,
11798,
11831,
11862,
11894,
11924,
11925,
11931,
12013,
12043,
12104,
12114,
12118,
12119,
12160,
12192,
12233,
12264,
12271,
12298,
12356,
12357,
12415,
12432,
12437,
12461,
12516,
12517,
12531,
12533,
12570,
12571,
12612,
12661,
12663,
12699,
12719,
12720,
12758,
12794,
12829,
12874,
12881,
12933,
12954,
12957,
12958,
12962,
13018,
13080,
13085,
13114,
13151,
13203,
13232,
13264,
13318,
13368,
13404,
13414,
13442,
13483,
13484,
13515,
13543,
13576,
13606,
13607,
13670,
13728,
13772,
13775,
13777,
13778,
13781,
13841,
13907,
13911,
13968,
13970,
13982,
13994,
13995,
14026,
14038,
14050,
14082,
14098,
14103,
14118,
14120,
14121,
14124,
14184,
14187,
14220,
14224,
14225,
14301,
14358,
14360,
14371,
14372,
14437,
14460,
14478,
14492,
14528,
14563,
14576,
14595,
14649,
14686,
14720,
14733,
14748,
14801,
14814,
14831,
14866,
14893,
14919,
14932,
14936,
14947,
14965,
14978,
14983,
14986,
15009,
15027,
15042,
15090,
15109,
15122,
15137,
15192,
15211,
15224,
15239,
15287,
15300,
15315,
15370,
15383,
15394,
15412,
15425,
15430,
15433,
15456,
15474,
15490,
15506,
15558,
15573,
15597,
15632,
15652,
15657,
15670,
15674,
15688,
15713,
15726,
15741,
15797,
15810,
15825,
15880,
15893,
15904,
15922,
15935,
15940,
15950,
15967,
15970,
15975,
15988,
15990,
15991,
16060,
16062,
16093,
16095,
16147,
16200,
16225,
16228,
16241,
16243,
16244,
16309,
16311,
16321,
16322,
16366,
16397,
16426,
16463,
16488,
16507,
16508,
16521,
16523,
16524,
16584,
16586,
16622,
16648,
16667,
16668,
16700,
16719,
16729,
16760,
16779,
16780,
16818,
16837,
16840,
16841,
16852,
16854,
16855,
16883,
16946,
17010,
17032,
17034,
17067,
17068,
17104,
17116,
17139,
17151,
17224,
17229,
17245,
17247,
17248,
17309,
17311,
17322,
17323,
17360,
17378,
17379,
17416,
17458,
17493,
17506,
17508,
17509,
17560,
17607,
17654,
17671,
17743,
17791,
17818,
17820,
17850,
17851,
17885,
17897,
17898,
17935,
17994,
18029,
18034,
18054,
18056,
18057,
18133,
18198,
18200,
18219,
18221,
18282,
18300,
18318,
18319,
18386,
18414,
18433,
18440,
18441,
18458,
18460,
18461,
18498,
18499,
18554,
18556,
18573,
18574,
18610,
18637,
18665,
18668,
18698,
18781,
18788,
18814,
18834,
18862,
18904,
18925,
18967,
18997,
19076,
19083,
19085,
19086,
19125,
19126,
19188,
19190,
19213,
19214,
19228,
19246,
19247,
19270,
19273,
19316,
19332,
19349,
19361,
19362,
19378,
19433,
19444,
19445,
19450,
19470,
19483,
19485,
19486,
19538,
19588,
19623,
19658,
19660,
19731,
19749,
19802,
19817,
19858,
19889,
19910,
19922,
20003,
20024,
20029,
20033,
20048,
20078,
20098,
20102,
20114,
20117,
20156,
20190,
20255,
20293,
20312,
20352,
20362,
20433,
20479,
20532,
20533,
20568,
20621,
20639,
20680,
20719,
20739,
20744,
20755,
20796,
20844,
20892,
20896,
20899,
20913,
20992,
21011,
21014,
21028,
21057,
21076,
21079,
21131,
21132,
21143,
21145,
21146,
21205,
21237,
21239,
21256,
21274,
21335,
21346,
21348,
21349,
21427,
21487,
21509,
21511,
21547,
21557,
21558,
21623,
21660,
21678,
21679,
21691,
21724,
21777,
21796,
21799,
21800,
21871,
21872,
21893,
21946,
21965,
21968,
21969,
21982,
21984,
21985,
21988,
22056,
22087,
22091,
22171,
22173,
22186,
22236,
22291,
22342,
22393,
22421,
22454,
22490,
22527,
22584,
22601,
22616,
22617
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 22617,
"ccnet_original_nlines": 1574,
"rps_doc_curly_bracket": 0.0065437499433755875,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.08657415956258774,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04162595048546791,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.56927889585495,
"rps_doc_frac_unique_words": 0.4988897144794464,
"rps_doc_mean_word_length": 5.4381937980651855,
"rps_doc_num_sentences": 82,
"rps_doc_symbol_to_word_ratio": 0.007035369984805584,
"rps_doc_unigram_entropy": 6.381505966186523,
"rps_doc_word_count": 2702,
"rps_doc_frac_chars_dupe_10grams": 0.08840343356132507,
"rps_doc_frac_chars_dupe_5grams": 0.18034571409225464,
"rps_doc_frac_chars_dupe_6grams": 0.1382877379655838,
"rps_doc_frac_chars_dupe_7grams": 0.13121001422405243,
"rps_doc_frac_chars_dupe_8grams": 0.12120593339204788,
"rps_doc_frac_chars_dupe_9grams": 0.10759493708610535,
"rps_doc_frac_chars_top_2gram": 0.05553286895155907,
"rps_doc_frac_chars_top_3gram": 0.006737439893186092,
"rps_doc_frac_chars_top_4gram": 0.010888800024986267,
"rps_doc_books_importance": -1940.5130615234375,
"rps_doc_books_importance_length_correction": -1940.5130615234375,
"rps_doc_openwebtext_importance": -1222.036865234375,
"rps_doc_openwebtext_importance_length_correction": -1222.036865234375,
"rps_doc_wikipedia_importance": -912.77392578125,
"rps_doc_wikipedia_importance_length_correction": -912.77392578125
},
"fasttext": {
"dclm": 0.9683166742324829,
"english": 0.3445093631744385,
"fineweb_edu_approx": 2.7298104763031006,
"eai_general_math": 0.4225234389305115,
"eai_open_web_math": 0.3181992173194885,
"eai_web_code": 0.21753084659576416
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.22",
"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": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,841,886,503,866,878,000 | Subject: Re: core dump filename format
To: Chris G. Demetriou <[email protected]>
From: Gandhi woulda smacked you <[email protected]>
List: tech-userlevel
Date: 09/10/1999 10:31:08
On 7 Sep 1999, Chris G. Demetriou wrote:
# If the process calls:
#
(any uid/gid setting function)
#
# successfully, or sets user or group ID on exec, the P_SUGID flag is
# set. (it is cleared only on non-set-id exec.) If P_SUGID is set, the
# process won't dump core. So, set-id programs are safe.
#
# I'd say that this inherited attribute -- as well as other attributes
# which should exist and be inherited, such as unaligned access handling
# -- should revert to their system-wide defaults upon set-id exec (and
# maybe anything that sets P_SUGID, but i'm less sure about that).
#
# Obviously, these attributes don't exist yet, so code to reset them or
# otherwise properly handle them can't exist yet. 8-)
So you're thinking that login now has to change its uid, and exec
something that execs the user's login shell. This means that a user's
login shell will not dump a core unless we jump through this hoop.
Pardon me for saying so, but it looks like we're adding hoops we don't
need to add.
#
# > At the very least, I'd suggest a little bit of thought about this before
# > it gets entrenched enough that when bugs are found workarounds need to be
# > invented, instead of just yanking the mechanism.
#
# yah.
#
#
#
# cgd
# --
# Chris Demetriou - [email protected] - http://www.netbsd.org/People/Pages/cgd.html
# Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
#
--*greywolf;
--
Microsoft:
"Just click on the START button and your journey to the Dark Side
will be complete!" | {
"url": "http://mail-index.netbsd.org/tech-userlevel/1999/09/10/0000.html",
"source_domain": "mail-index.netbsd.org",
"snapshot_id": "crawl=CC-MAIN-2016-22",
"warc_metadata": {
"Content-Length": "2272",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:JJP7NTNVO3YKZD2Q427DLAANFYTWFETB",
"WARC-Concurrent-To": "<urn:uuid:4af1735c-1fd4-4be2-ac04-c4fe19d50ff0>",
"WARC-Date": "2016-05-31T22:55:16Z",
"WARC-IP-Address": "199.233.217.205",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:SOYI2ZHZQZGAPUOS5HUFUHDF2HXTPFDZ",
"WARC-Record-ID": "<urn:uuid:4c3ac63e-b7d3-400e-833f-b118c72dfd0f>",
"WARC-Target-URI": "http://mail-index.netbsd.org/tech-userlevel/1999/09/10/0000.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9973177c-2a86-4832-990d-1b5ee0acc60e>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-185-217-139.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-22\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for May 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,
39,
79,
135,
156,
182,
223,
224,
248,
251,
282,
285,
355,
428,
486,
489,
560,
633,
704,
771,
774,
846,
901,
902,
968,
1039,
1106,
1107,
1178,
1191,
1192,
1193,
1194,
1197,
1274,
1352,
1405,
1408,
1415,
1418,
1421,
1424,
1430,
1436,
1517,
1588,
1591,
1592,
1593,
1610,
1613,
1624,
1691
],
"line_end_idx": [
39,
79,
135,
156,
182,
223,
224,
248,
251,
282,
285,
355,
428,
486,
489,
560,
633,
704,
771,
774,
846,
901,
902,
968,
1039,
1106,
1107,
1178,
1191,
1192,
1193,
1194,
1197,
1274,
1352,
1405,
1408,
1415,
1418,
1421,
1424,
1430,
1436,
1517,
1588,
1591,
1592,
1593,
1610,
1613,
1624,
1691,
1711
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1711,
"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.311750590801239,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02158273011445999,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.316546767950058,
"rps_doc_frac_unique_words": 0.6602316498756409,
"rps_doc_mean_word_length": 4.814671993255615,
"rps_doc_num_sentences": 21,
"rps_doc_symbol_to_word_ratio": 0.06714627891778946,
"rps_doc_unigram_entropy": 4.961025714874268,
"rps_doc_word_count": 259,
"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.00962310004979372,
"rps_doc_frac_chars_top_3gram": 0.024057740345597267,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -178.42889404296875,
"rps_doc_books_importance_length_correction": -166.90733337402344,
"rps_doc_openwebtext_importance": -99.20556640625,
"rps_doc_openwebtext_importance_length_correction": -99.20556640625,
"rps_doc_wikipedia_importance": -67.8712158203125,
"rps_doc_wikipedia_importance_length_correction": -59.506622314453125
},
"fasttext": {
"dclm": 0.287315309047699,
"english": 0.9052154421806335,
"fineweb_edu_approx": 1.540637731552124,
"eai_general_math": 0.7972026467323303,
"eai_open_web_math": 0.18569135665893555,
"eai_web_code": 0.5105898380279541
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.62",
"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": "5",
"label": "Evaluate"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "18",
"label": "Q&A Forum"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
9,019,560,496,928,066,000 | Javascript to read Registry Value
Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
oakguy
Posts: 1
Joined: Thu May 06, 2010 3:04 am
Javascript to read Registry Value
Post by oakguy »
I would like to read a registry value in my script and assign it to a variable but I have no clue when it comes to Jscript. The script has two functions with embeded that are called with onclick:
Code: Select all
<html>
<head>
<script language="javascript">
<!--
var value;
var Shell;
var cicserver;
Shell = new ActiveXObject("WScript.Shell");
value = Shell.RegRead("HKLMSoftwareInteractive IntelligenceEICNotifier");
if value = "servername1"
{ cicserver = "servername1"
}
else
{ cicserver = "servername2"
}
Thanks!!!
jvierra
Posts: 14459
Joined: Tue May 22, 2007 9:57 am
Contact:
Javascript to read Registry Value
Post by jvierra »
This is not shell scripting it's web scripting. YOu cannot read teh registry from aa web page. You need to use a local script; either vbs or jscript. YOu can also use an HTA.
Put this in a file with a .js extension and run it at a command prompt.
Code: Select all
var Shell = new ActiveXObject("WScript.Shell");
var value = Shell.RegRead("HKLMSoftwareInteractive IntelligenceEICNotifier");
if (value == "servername1"){
var cicserver = "servername1"
}else{
var cicserver = "servername2"
}
WScript.Echo( cicserver
jvierra
Posts: 14459
Joined: Tue May 22, 2007 9:57 am
Contact:
Javascript to read Registry Value
Post by jvierra »
This is as close as your going to get.
Code: Select all
<html>
<head>
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 2009">
<title>Document Title</title>
</head>
<script language="jscript">
var key = "HKLMSoftwareInteractive IntelligenceEICNotifier";
function doit(){
var t = document.getElementById("out");
var Shell = new ActiveXObject("WScript.Shell");
var value = Shell.RegRead(key);
if (value == "servername1"){
t.innerText = "servername1"
}else{
t.innerText = "servername2"
}
return false;
}
</script>
<body>
<input type="button" value="click" id="getit" onclick="js:doit()"/>
<input type="text" id="out" />
</body>
</html>
Must be run locally from an HTA file or with warnings from an HTML file.
Due to cross-domian restrictions it will probably not run on IE from a web server. To do that you would need to use ASP.NET and some fairly sophisticated techniques to get the registry info.
Locked | {
"url": "https://www.sapien.com/forums/viewtopic.php?f=20&t=4739",
"source_domain": "www.sapien.com",
"snapshot_id": "crawl=CC-MAIN-2020-29",
"warc_metadata": {
"Content-Length": "47461",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:QDFQCUEWEKHDXUVTGOTS34AKAR2PCVDT",
"WARC-Concurrent-To": "<urn:uuid:ed694d8e-e11d-464d-a9ff-35528700333d>",
"WARC-Date": "2020-07-16T05:05:22Z",
"WARC-IP-Address": "34.193.210.37",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2HQTE2UUTSY5SYWFWPQO52R27GULL35R",
"WARC-Record-ID": "<urn:uuid:6f69a223-2021-4254-ba61-a2028100d870>",
"WARC-Target-URI": "https://www.sapien.com/forums/viewtopic.php?f=20&t=4739",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:23579d31-28a5-4051-aa9d-7bcb8747aa70>"
},
"warc_info": "isPartOf: CC-MAIN-2020-29\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-143.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,
34,
35,
70,
82,
135,
136,
254,
261,
273,
280,
289,
322,
323,
357,
358,
375,
376,
572,
573,
590,
591,
600,
609,
643,
650,
666,
682,
712,
718,
767,
846,
850,
880,
913,
920,
930,
963,
968,
978,
979,
987,
1000,
1033,
1042,
1043,
1077,
1078,
1096,
1097,
1272,
1273,
1345,
1346,
1363,
1364,
1414,
1494,
1498,
1529,
1566,
1575,
1612,
1616,
1640,
1641,
1649,
1662,
1695,
1704,
1705,
1739,
1740,
1758,
1759,
1798,
1799,
1816,
1817,
1826,
1835,
1909,
1939,
1949,
1979,
2042,
2043,
2062,
2069,
2116,
2171,
2211,
2252,
2291,
2305,
2344,
2353,
2374,
2382,
2386,
2398,
2407,
2477,
2508,
2518,
2526,
2527,
2600,
2791,
2792
],
"line_end_idx": [
34,
35,
70,
82,
135,
136,
254,
261,
273,
280,
289,
322,
323,
357,
358,
375,
376,
572,
573,
590,
591,
600,
609,
643,
650,
666,
682,
712,
718,
767,
846,
850,
880,
913,
920,
930,
963,
968,
978,
979,
987,
1000,
1033,
1042,
1043,
1077,
1078,
1096,
1097,
1272,
1273,
1345,
1346,
1363,
1364,
1414,
1494,
1498,
1529,
1566,
1575,
1612,
1616,
1640,
1641,
1649,
1662,
1695,
1704,
1705,
1739,
1740,
1758,
1759,
1798,
1799,
1816,
1817,
1826,
1835,
1909,
1939,
1949,
1979,
2042,
2043,
2062,
2069,
2116,
2171,
2211,
2252,
2291,
2305,
2344,
2353,
2374,
2382,
2386,
2398,
2407,
2477,
2508,
2518,
2526,
2527,
2600,
2791,
2792,
2798
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2798,
"ccnet_original_nlines": 109,
"rps_doc_curly_bracket": 0.0050035701133310795,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.23633156716823578,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.019400350749492645,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.33862432837486267,
"rps_doc_frac_unique_words": 0.48882681131362915,
"rps_doc_mean_word_length": 5.410614490509033,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.873521327972412,
"rps_doc_word_count": 358,
"rps_doc_frac_chars_dupe_10grams": 0.09912235289812088,
"rps_doc_frac_chars_dupe_5grams": 0.2803304195404053,
"rps_doc_frac_chars_dupe_6grams": 0.24367578327655792,
"rps_doc_frac_chars_dupe_7grams": 0.11719153076410294,
"rps_doc_frac_chars_dupe_8grams": 0.09912235289812088,
"rps_doc_frac_chars_dupe_9grams": 0.09912235289812088,
"rps_doc_frac_chars_top_2gram": 0.015487870201468468,
"rps_doc_frac_chars_top_3gram": 0.03304078057408333,
"rps_doc_frac_chars_top_4gram": 0.04956118017435074,
"rps_doc_books_importance": -262.5165710449219,
"rps_doc_books_importance_length_correction": -262.5165710449219,
"rps_doc_openwebtext_importance": -181.2593994140625,
"rps_doc_openwebtext_importance_length_correction": -181.2593994140625,
"rps_doc_wikipedia_importance": -161.00794982910156,
"rps_doc_wikipedia_importance_length_correction": -161.00794982910156
},
"fasttext": {
"dclm": 0.032118141651153564,
"english": 0.7008014917373657,
"fineweb_edu_approx": 2.75636887550354,
"eai_general_math": 0.02985858917236328,
"eai_open_web_math": 0.16451603174209595,
"eai_web_code": 0.00043899001320824027
}
} | {
"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": "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": "-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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
1,813,599,133,001,637,000 | Reply
Occasional Contributor
Posts: 2
Registered: 09-22-2021
0
Learning HTML makes you the best at designing
Marketing objectives: It provides the best user experience possible through the best interfaces and runs AB tests without relying solely on the development team.
HTML instructs the web browser on how to display and define the content on social media. It is critical to understand how to find and edit Meta descriptions, title tags, and keywords for content marketing. If the software you use to download content does not have a Markdown or WYSIWYG interface, learning how to create hyperlinks, headers, paragraphs and spacing, images, and lists (and considering updating them) is helpful for proper formatting.
You must use HTML and CSS to design and encode a web application or email frontend. HTML structures the website and contains data for its content, whereas CSS adds style to visually appealing social media.
According to an autobiography writer, you can easily enjoy creating an interactive little game or mobile app using various existing tools.
HTML5 Allows Us To Define Our Content's INTENT.
We can't just define what the content element on the page means (for example, whether it's a paragraph, a header, or a link to an external resource), but we can also define our purpose content.
Aside from its global significance, it also helps on a personal level. The primary programming framework is HTML.
HTML is essential due to its web application. HTML Aids in the Introduction of new businesses to the digital world.
It prevents people from taking too significant a first step and then walking away. HTML has a wide range of applications, making it a robust programming language in today's digital world.
Occasional Visitor
Posts: 1
Registered: 09-28-2021
0
keep learning is definitely helps to improve HTML or web...
keep learning is definitely helps to improve HTML or web development skills.
Occasional Visitor
Posts: 1
Registered: 11-17-2021
0
Whether you're pursuing a career in development or simply...
Whether you're pursuing a career in development or simply looking for a valuable addition to your skill set, HTML is a great choice. Here is my website with html: https://proweb365.com/
Occasional Visitor
Posts: 1
Registered: 11-19-2021
0
Web Design Valley LLC. is a digital marketing firm specia...
Web Design Valley LLC. is a digital marketing firm specializing in custom web design, web development, and search engines optimization (SEO) for businesses and organizations.
Visit our website: https://webdesignvalley.com/
Highlighted
Occasional Visitor
Posts: 1
Registered: 11-22-2021
0
It is very important for any website to have blog on thei...
It is very important for any website to have blog on their website. This will help them to increase their brand value and it also brings business to them through it. I am having a writing service website in which I am having an https://www.devdiscourse.com/article/education/1788101-3-best-essay-writing-services-in-the-usa blog in which I post my articles and viewers also share their reviews in it. | {
"url": "http://community.telstrabusiness.com/t5/Welcome-Community-Guidelines/Learning-HTML-makes-you-the-best-at-designing/m-p/277/highlight/true",
"source_domain": "community.telstrabusiness.com",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "171046",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:L2LPMEHWYTBMBD3ATK22DN7GKXZZA5H5",
"WARC-Concurrent-To": "<urn:uuid:619ce087-725a-49f3-af84-95dbc9f6378b>",
"WARC-Date": "2022-01-18T08:30:49Z",
"WARC-IP-Address": "99.84.218.13",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DL4CPIH44FQVA4Q2Q6IYZBGJRUSCK27Y",
"WARC-Record-ID": "<urn:uuid:c189aef4-3e68-47c3-9b61-04d64357c5b6>",
"WARC-Target-URI": "http://community.telstrabusiness.com/t5/Welcome-Community-Guidelines/Learning-HTML-makes-you-the-best-at-designing/m-p/277/highlight/true",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bb90d5d0-1cb0-496c-88fb-887807ef5c1d>"
},
"warc_info": "isPartOf: CC-MAIN-2022-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-78\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,
6,
29,
38,
62,
64,
65,
111,
112,
274,
275,
724,
725,
931,
932,
1071,
1072,
1120,
1121,
1315,
1316,
1431,
1432,
1548,
1549,
1737,
1738,
1757,
1766,
1790,
1792,
1793,
1853,
1854,
1931,
1932,
1951,
1960,
1984,
1986,
1987,
2048,
2049,
2235,
2236,
2255,
2264,
2288,
2290,
2291,
2352,
2353,
2528,
2529,
2577,
2578,
2590,
2609,
2618,
2642,
2644,
2645,
2706,
2707
],
"line_end_idx": [
6,
29,
38,
62,
64,
65,
111,
112,
274,
275,
724,
725,
931,
932,
1071,
1072,
1120,
1121,
1315,
1316,
1431,
1432,
1548,
1549,
1737,
1738,
1757,
1766,
1790,
1792,
1793,
1853,
1854,
1931,
1932,
1951,
1960,
1984,
1986,
1987,
2048,
2049,
2235,
2236,
2255,
2264,
2288,
2290,
2291,
2352,
2353,
2528,
2529,
2577,
2578,
2590,
2609,
2618,
2642,
2644,
2645,
2706,
2707,
3107
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3107,
"ccnet_original_nlines": 63,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3441033959388733,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03715670108795166,
"rps_doc_frac_lines_end_with_ellipsis": 0.0625,
"rps_doc_frac_no_alph_words": 0.2116316556930542,
"rps_doc_frac_unique_words": 0.5031185150146484,
"rps_doc_mean_word_length": 5.174636363983154,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0.006462039891630411,
"rps_doc_unigram_entropy": 5.052396297454834,
"rps_doc_word_count": 481,
"rps_doc_frac_chars_dupe_10grams": 0.07151465862989426,
"rps_doc_frac_chars_dupe_5grams": 0.19606268405914307,
"rps_doc_frac_chars_dupe_6grams": 0.1430293321609497,
"rps_doc_frac_chars_dupe_7grams": 0.1430293321609497,
"rps_doc_frac_chars_dupe_8grams": 0.1430293321609497,
"rps_doc_frac_chars_dupe_9grams": 0.1430293321609497,
"rps_doc_frac_chars_top_2gram": 0.02732020989060402,
"rps_doc_frac_chars_top_3gram": 0.03535556048154831,
"rps_doc_frac_chars_top_4gram": 0.036962639540433884,
"rps_doc_books_importance": -269.479736328125,
"rps_doc_books_importance_length_correction": -269.479736328125,
"rps_doc_openwebtext_importance": -152.32725524902344,
"rps_doc_openwebtext_importance_length_correction": -152.32725524902344,
"rps_doc_wikipedia_importance": -121.07571411132812,
"rps_doc_wikipedia_importance_length_correction": -121.07571411132812
},
"fasttext": {
"dclm": 0.0222666896879673,
"english": 0.9010850191116333,
"fineweb_edu_approx": 1.9287654161453247,
"eai_general_math": 0.0037512800190597773,
"eai_open_web_math": 0.021074950695037842,
"eai_web_code": 0.020094389095902443
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "658.8",
"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": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "6",
"label": "Promotional/Advertisement"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-5,047,756,766,284,638,000 | [Overview][Resource strings][Constants][Types][Procedures and functions][Index] Reference for unit 'StrUtils' (#rtl)
RightBStr
Copy a given number of characters (bytes), counting from the right of a string.
Declaration
Source position: strutils.pp line 89
function RightBStr(
const AText: AnsiString;
const AByteCount: SizeInt
):AnsiString;
Arguments
AText
String to copy characters from.
AByteCount
Number of characters (bytes) to copy.
Function result
Resulting string.
Description
RightBStr returns a string containing the rightmost AByteCount bytes from the string AText. If AByteCount is larger than the length (in bytes) of AText, only as many bytes as available are returned.
Errors
None.
See also
LeftBStr
Copies Count characters starting at the left of a string.
AnsiRightStr
Copies a number of characters starting at the right of a string
RightStr
Copy a given number of characters, counting from the right of a string.
MidBStr
Copies a number of characters starting at a given position in a string.
Documentation generated on: Jun 22 2020 | {
"url": "https://www.freepascal.org/docs-html/3.2.0/rtl/strutils/rightbstr.html",
"source_domain": "www.freepascal.org",
"snapshot_id": "CC-MAIN-2024-18",
"warc_metadata": {
"Content-Length": "3838",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KMCNJVUOG7Y53MWB6QSMBG6PHF7R65PR",
"WARC-Concurrent-To": "<urn:uuid:4aaf2dfe-2988-49ea-b2f1-ff301971815b>",
"WARC-Date": "2024-04-23T01:44:09Z",
"WARC-IP-Address": "178.33.235.90",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ZGA6GLGA6KRIGXF2QTELAB36EY3AMSHO",
"WARC-Record-ID": "<urn:uuid:9de0a18e-bb59-4b6e-bc4e-a9ebbae38513>",
"WARC-Target-URI": "https://www.freepascal.org/docs-html/3.2.0/rtl/strutils/rightbstr.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:63241150-ab3e-42c5-bd7d-c85bf629e5d6>"
},
"warc_info": "isPartOf: CC-MAIN-2024-18\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for April 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-191\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,
117,
118,
128,
129,
209,
210,
222,
223,
260,
261,
281,
282,
309,
310,
338,
339,
353,
354,
364,
365,
371,
372,
375,
376,
408,
409,
420,
421,
424,
425,
463,
464,
480,
481,
499,
500,
512,
513,
712,
713,
720,
721,
727,
728,
737,
738,
747,
748,
751,
752,
810,
811,
824,
825,
828,
829,
893,
894,
903,
904,
907,
908,
980,
981,
989,
990,
993,
994,
1066,
1067,
1068
],
"line_end_idx": [
117,
118,
128,
129,
209,
210,
222,
223,
260,
261,
281,
282,
309,
310,
338,
339,
353,
354,
364,
365,
371,
372,
375,
376,
408,
409,
420,
421,
424,
425,
463,
464,
480,
481,
499,
500,
512,
513,
712,
713,
720,
721,
727,
728,
737,
738,
747,
748,
751,
752,
810,
811,
824,
825,
828,
829,
893,
894,
903,
904,
907,
908,
980,
981,
989,
990,
993,
994,
1066,
1067,
1068,
1107
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1107,
"ccnet_original_nlines": 71,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.29591837525367737,
"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.20918366312980652,
"rps_doc_frac_unique_words": 0.4802631735801697,
"rps_doc_mean_word_length": 5.6052632331848145,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0.005102039780467749,
"rps_doc_unigram_entropy": 3.934663772583008,
"rps_doc_word_count": 152,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.23591549694538116,
"rps_doc_frac_chars_dupe_6grams": 0.21596243977546692,
"rps_doc_frac_chars_dupe_7grams": 0.15023474395275116,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.04929576814174652,
"rps_doc_frac_chars_top_3gram": 0.10563380271196365,
"rps_doc_frac_chars_top_4gram": 0.038732390850782394,
"rps_doc_books_importance": -115.98198699951172,
"rps_doc_books_importance_length_correction": -115.98198699951172,
"rps_doc_openwebtext_importance": -58.61991500854492,
"rps_doc_openwebtext_importance_length_correction": -50.508487701416016,
"rps_doc_wikipedia_importance": -33.347496032714844,
"rps_doc_wikipedia_importance_length_correction": -33.347496032714844
},
"fasttext": {
"dclm": 0.03972018137574196,
"english": 0.6666616201400757,
"fineweb_edu_approx": 2.6499149799346924,
"eai_general_math": 0.09682416915893555,
"eai_open_web_math": 0.11646252870559692,
"eai_web_code": 0.13630157709121704
}
} | {
"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": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"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": "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": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
8,841,440,891,117,451,000 | Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
Sign up
Here's how it works:
1. Anybody can ask a question
2. Anybody can answer
3. The best answers are voted up and rise to the top
Is it possible to monitor the NTP drift value ( I mean measuring the time difference between the NTP server and the server that I am trying to monitor) using SNMP.
share|improve this question
migrated from stackoverflow.com Dec 5 '11 at 12:56
This question came from our site for professional and enthusiast programmers.
You can add, custom snmp oids to snmpd.conf and then request the oid as answer the drift value.You might write a shell script which triggers by the oid call to snmpd. Then it will response the result you might want to see. If i understand your question right. This might solve it. Anything you can do on console can call it and show its output as response via snmpd.conf.
share|improve this answer
might also look into the Nagios script called check_ntp – SpacemanSpiff Dec 5 '11 at 13:20
Your Answer
discard
By posting your answer, you agree to the privacy policy and terms of service. | {
"url": "http://serverfault.com/questions/337727/is-it-possible-to-monitor-ntp-through-snmp-in-linux",
"source_domain": "serverfault.com",
"snapshot_id": "crawl=CC-MAIN-2016-07",
"warc_metadata": {
"Content-Length": "70116",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:E7AF7V64E67YFOXZLS4BWPEOJBK4UBVW",
"WARC-Concurrent-To": "<urn:uuid:38f5bd73-b0ea-4665-ba9d-00d0d9902356>",
"WARC-Date": "2016-02-05T23:08:10Z",
"WARC-IP-Address": "104.16.47.232",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:ILZQNHYYK7VGEJDSCN6L4JTVZLAND6OO",
"WARC-Record-ID": "<urn:uuid:848ccd7d-bbcb-4369-9d28-0b37143c8ff1>",
"WARC-Target-URI": "http://serverfault.com/questions/337727/is-it-possible-to-monitor-ntp-through-snmp-in-linux",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:21de80d9-896c-45f4-b908-164440320f9a>"
},
"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,
124,
125,
133,
154,
186,
210,
265,
266,
430,
431,
459,
460,
511,
512,
590,
591,
963,
964,
990,
995,
1086,
1087,
1099,
1100,
1102,
1110,
1111
],
"line_end_idx": [
124,
125,
133,
154,
186,
210,
265,
266,
430,
431,
459,
460,
511,
512,
590,
591,
963,
964,
990,
995,
1086,
1087,
1099,
1100,
1102,
1110,
1111,
1188
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1188,
"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.39024388790130615,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.020325200632214546,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.18292683362960815,
"rps_doc_frac_unique_words": 0.5980392098426819,
"rps_doc_mean_word_length": 4.549019813537598,
"rps_doc_num_sentences": 17,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.543326377868652,
"rps_doc_word_count": 204,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.019396549090743065,
"rps_doc_frac_chars_top_3gram": 0.012931030243635178,
"rps_doc_frac_chars_top_4gram": 0.017241379246115685,
"rps_doc_books_importance": -124.94795989990234,
"rps_doc_books_importance_length_correction": -124.94795989990234,
"rps_doc_openwebtext_importance": -70.44258880615234,
"rps_doc_openwebtext_importance_length_correction": -70.4069595336914,
"rps_doc_wikipedia_importance": -50.152400970458984,
"rps_doc_wikipedia_importance_length_correction": -50.152400970458984
},
"fasttext": {
"dclm": 0.8010927438735962,
"english": 0.927062451839447,
"fineweb_edu_approx": 2.0484845638275146,
"eai_general_math": 0.023028550669550896,
"eai_open_web_math": 0.14581578969955444,
"eai_web_code": 0.000427419989136979
}
} | {
"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": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-2,219,383,883,624,994,600 | Extended Portable Bitmap Toolkit Distribution of 22nov89 Previous distribution 13sep89 Modified for VMS 19jun90 [Tape Editor's note: This material arrived JUST before the tapes went out. By compressing it and some executables elsewhere, I have been able to fit it onto the Spring '90 tapes. Check out AAAREADME.1ST for a list of all the (many!) formats this package converts between. Thanks to Ted Nieland for sending this off his Amiga VMSnet node. -Glenn Everhart, tapecopy editor] Included are a number of programs for converting various image formats to and from portable formats; plus some tools for manipulating the portable formats. The package is broken up into four parts (five parts if you count this one, the zeroth part). First is PBM, for bitmaps (1 bit per pixel). Then there is PGM, for grayscale images. Next is PPM, for full-color images. Last, there is PNM, which does content-independent manipulations on any of the three formats. These parts are semi-independent; if you're only going to deal with bitmaps, you don't have to install PGM and PPM, and this makes PNM run faster; if you want PGM, you must install PBM but can leave PPM out; but if you want PPM, you must install both PGM and PBM. PNM is optional but recommended. To install: (For VMS installation, see README.VMS) Unpack the files. Decide whether you want to use Imakefiles or Makefiles. If you want to use Makefiles: Edit the top-level Makefile, find each line with the string "CONFIGURE", and follow the directions for setting configuration options. Likewise edit pbmplus.h. Likewise edit pnm/Makefile. Make. When you're happy that things work ok, make install. If you want to use Imakefiles instead: Edit the top-level Imakefile, find each line with the string "CONFIGURE", and follow the directions for setting configuration options. Likewise edit pbmplus.h. Likewise edit pnm/Imakefile. Edit Makefile and */Makefile, look towards the end for the definition of TOP, and change it to point to your X11 tree. Save the original Makefiles, in case you later want to switch back to using them. Touch Imakefile, since you just editted Makefile. Make Makefile, make Makefiles, make depend, then make. When you're happy that things work ok, make install. I've tested this stuff under 4.2 BSD, 4.3 BSD, on Sun 3's 4's and 386's and Sequents and Vaxen, with cc and gcc. Nevertheless, I'm sure bugs remain. Feedback is welcome; send bug reports, enhancements, checks, money orders, etc. to the addresses below. Be sure to mention what version you have when sending bug reports! Jef Poskanzer [email protected] {ucbvax, lll-crg, sun!pacbell, apple, hplabs}!well!jef | {
"url": "http://mail.digiater.nl/openvms/decus/lt90a/pbmvms/aaareadme.txt",
"source_domain": "mail.digiater.nl",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "3137",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AQ5RVNSMPGK7H5LVDZKSHPEPXVWDPQJ6",
"WARC-Concurrent-To": "<urn:uuid:85b76086-7097-4944-9c6f-d8a529f85343>",
"WARC-Date": "2022-01-29T01:57:09Z",
"WARC-IP-Address": "185.92.71.115",
"WARC-Identified-Payload-Type": "text/plain",
"WARC-Payload-Digest": "sha1:SX7NVN7Z4YUC4542BVX4GVDRHGGHOCJX",
"WARC-Record-ID": "<urn:uuid:776532f9-306c-4196-b4b3-34e2f3f7d7ac>",
"WARC-Target-URI": "http://mail.digiater.nl/openvms/decus/lt90a/pbmvms/aaareadme.txt",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7917a169-6de4-4813-8ef7-e133ad38bee4>"
},
"warc_info": "isPartOf: CC-MAIN-2022-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-95\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0
],
"line_end_idx": [
2641
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2641,
"ccnet_original_nlines": 0,
"rps_doc_curly_bracket": 0.0007572899921797216,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3407917320728302,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05163510888814926,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.22891566157341003,
"rps_doc_frac_unique_words": 0.5539906024932861,
"rps_doc_mean_word_length": 4.894366264343262,
"rps_doc_num_sentences": 46,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.091301441192627,
"rps_doc_word_count": 426,
"rps_doc_frac_chars_dupe_10grams": 0.15635491907596588,
"rps_doc_frac_chars_dupe_5grams": 0.18513189256191254,
"rps_doc_frac_chars_dupe_6grams": 0.15635491907596588,
"rps_doc_frac_chars_dupe_7grams": 0.15635491907596588,
"rps_doc_frac_chars_dupe_8grams": 0.15635491907596588,
"rps_doc_frac_chars_dupe_9grams": 0.15635491907596588,
"rps_doc_frac_chars_top_2gram": 0.011990410275757313,
"rps_doc_frac_chars_top_3gram": 0.01726618967950344,
"rps_doc_frac_chars_top_4gram": 0.01726618967950344,
"rps_doc_books_importance": -198.25912475585938,
"rps_doc_books_importance_length_correction": -198.25912475585938,
"rps_doc_openwebtext_importance": -151.74771118164062,
"rps_doc_openwebtext_importance_length_correction": -151.74771118164062,
"rps_doc_wikipedia_importance": -122.97992706298828,
"rps_doc_wikipedia_importance_length_correction": -122.97992706298828
},
"fasttext": {
"dclm": 0.0382494293153286,
"english": 0.8808353543281555,
"fineweb_edu_approx": 1.519837498664856,
"eai_general_math": 0.4932144284248352,
"eai_open_web_math": 0.38140082359313965,
"eai_web_code": 0.1684408187866211
}
} | {
"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.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,882,266,469,279,772,000 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
So I am trying to define a class and I am using another array of a different class to define it.
//header file for Name.h
class Name {
string last;
string first;
};
//header file for Depositor.h
class Depositor {
Name name;
string ssn;};
//header file for Account.h
class Account {
Depositor depositor;
int acctnum;
string type;
double balance;
};
//header file for Bank.h
#include "Account.h"
class Bank {
Account account[]; //is this possible?
int active_accts;
};
When I am writing the cpp file I am running into a lot of problems!
//example of mutator
void Bank::setLastname(string lastname)
{
account.setLastname (lastname);
}
I didn't include the mutators and acessors that I wrote into the header file, but they are there and are public -- it won't compile. Can you help? Is it even valid to use an array of a class in Bank.h?
share|improve this question
6 Answers 6
up vote 0 down vote accepted
By declaring the value of the array in the header file and by adding a variable in the .cpp file you can solve all the problems and leave it as an array.
//header file
class Bank {
Account account[100];
int active_accts;
public:
//mutator
void setLastname (string,int);
};
//the implementation file
void Bank::setLastname (string last, int index)
{
account[index].setLastname(last);
}
this will solve all your problems
share|improve this answer
Is it even valid to use an array of a class in Bank.h?
Yes, but it has to have a fixed dimension, e.g.,
Account account[3];
A type always has a fixed size in C++, and since an array member variable forms part of the class's size, you need to specify how many elements are in the array.
If you don't know how many elements you are going to need, you can use a sequence container:
std::vector<Account> account;
share|improve this answer
Of course, a member array's size can be specified via a non-type template parameter. That's how Boost.Array works. – In silico Feb 16 '11 at 3:23
@In: Sure, but then it still becomes part of the type; the array underlying a boost::array<T, 3> has a dimension of 3: it's known and fixed, and boost::array<T, 3> is a different type from boost::array<T, 4>. – James McNellis Feb 16 '11 at 3:32
Right. The OP would still have to provide the size of the array at some time during compile time. – In silico Feb 16 '11 at 3:36
Instead of arrays, consider using vectors.
#include <vector>
// ...
class Bank {
std::vector<Account> accounts;
int active_accts;
};
share|improve this answer
Yes, though active_accts was probably an attempt at managing the size, which vector handles for you, and it would then be dropped. – Fred Nurk Feb 16 '11 at 1:35
• Account is not a nested class of Bank. Bank has a member data instance of type Account array.
• You can have a primitive array member in a class, but you must specify the size of the array in the class definition: Account account[42];. The reason is that when you #include the class definition in another compilation unit, and then instantiate an instance of the class, the compiler needs to know what the size of that instance is.
• It would be a wise idea to use std::vector<Account> rather than a primitive array. std::vector doesn't require committing to a particular size at construction; it grows dynamically. How come a std::vector doesn't require a size in the class definition, while a primitive array does? A std::vector holds as member a pointer to the elements on the heap. So the compiler does know the size of a std::vector; it uses the size of the pointer rather than the count of the elements.
share|improve this answer
"I didn't include the mutators and acessors that I wrote into the header file, but they are there and are public" Quote the OP, so that mutes your first and third point, as he is using mutators, and not accessing the variables directly. Otherwise valid answer. – dcousens Feb 16 '11 at 2:33
@Daniel True, fixed. Was a little sloppy in reading. :-S – wilhelmtell Feb 16 '11 at 3:15
account is an array of Accounts, which means you would need to do something like account[0].setLastname(lastname);
share|improve this answer
you can't call setLastname(lastname) on the whole array. You need to call it on a specific instance of the Account class inside the array, like this: account[0].setLastname(lastname);
On another note, you really should be storing an array of pointers to Account objects.
share|improve this answer
as noted in other answers, a vector is actually a better solution. It allows for an expandable storage location. You still need pointer though. – Scott M. Feb 16 '11 at 1:31
I don't see why you need pointers to Accounts. – Fred Nurk Feb 16 '11 at 1:36
Depending on how big the Account class is and how many there are, you could fill up the stack pretty easily. It's better to have an array of pointers to Account objects that are allocated on the heap instead of on the stack. – Scott M. Feb 16 '11 at 1:44
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/5011546/c-using-an-array-in-a-nested-class-definition-oop",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2015-18",
"warc_metadata": {
"Content-Length": "97951",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:YUNP3ZVZE5W6ABKNU3BMOH3KA6GC76HL",
"WARC-Concurrent-To": "<urn:uuid:e9172faa-9195-42ad-8032-621165d0e2b6>",
"WARC-Date": "2015-05-07T02:27:24Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:NFHT75OEBUVYSCFOFEIRTMXIXZW6VT4E",
"WARC-Record-ID": "<urn:uuid:b9ac2495-f19d-4102-8dbb-ea5839521d7d>",
"WARC-Target-URI": "http://stackoverflow.com/questions/5011546/c-using-an-array-in-a-nested-class-definition-oop",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5209c4c2-d942-4089-b018-f9fed38d9017>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-235-10-82.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-18\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
25,
157,
158,
255,
256,
283,
296,
313,
331,
335,
336,
367,
389,
408,
431,
432,
433,
434,
463,
483,
512,
533,
554,
578,
585,
586,
611,
632,
645,
688,
710,
713,
714,
782,
783,
804,
844,
846,
882,
884,
885,
1087,
1088,
1116,
1117,
1129,
1130,
1159,
1160,
1314,
1315,
1329,
1342,
1366,
1386,
1395,
1405,
1436,
1439,
1440,
1466,
1514,
1516,
1553,
1555,
1556,
1590,
1591,
1617,
1618,
1673,
1674,
1723,
1724,
1744,
1745,
1907,
1908,
2001,
2002,
2032,
2058,
2063,
2210,
2215,
2461,
2466,
2596,
2597,
2640,
2641,
2659,
2660,
2667,
2668,
2681,
2716,
2738,
2741,
2767,
2772,
2935,
3033,
3034,
3374,
3375,
3855,
3856,
3882,
3887,
4179,
4184,
4275,
4276,
4391,
4392,
4418,
4419,
4603,
4604,
4691,
4692,
4718,
4723,
4898,
4903,
4982,
4987,
5243,
5244,
5256,
5257,
5259,
5267,
5268,
5346,
5347
],
"line_end_idx": [
25,
157,
158,
255,
256,
283,
296,
313,
331,
335,
336,
367,
389,
408,
431,
432,
433,
434,
463,
483,
512,
533,
554,
578,
585,
586,
611,
632,
645,
688,
710,
713,
714,
782,
783,
804,
844,
846,
882,
884,
885,
1087,
1088,
1116,
1117,
1129,
1130,
1159,
1160,
1314,
1315,
1329,
1342,
1366,
1386,
1395,
1405,
1436,
1439,
1440,
1466,
1514,
1516,
1553,
1555,
1556,
1590,
1591,
1617,
1618,
1673,
1674,
1723,
1724,
1744,
1745,
1907,
1908,
2001,
2002,
2032,
2058,
2063,
2210,
2215,
2461,
2466,
2596,
2597,
2640,
2641,
2659,
2660,
2667,
2668,
2681,
2716,
2738,
2741,
2767,
2772,
2935,
3033,
3034,
3374,
3375,
3855,
3856,
3882,
3887,
4179,
4184,
4275,
4276,
4391,
4392,
4418,
4419,
4603,
4604,
4691,
4692,
4718,
4723,
4898,
4903,
4982,
4987,
5243,
5244,
5256,
5257,
5259,
5267,
5268,
5346,
5347,
5437
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 5437,
"ccnet_original_nlines": 137,
"rps_doc_curly_bracket": 0.0029428000561892986,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36175498366355896,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01655629090964794,
"rps_doc_frac_lines_end_with_ellipsis": 0.0072463802061975,
"rps_doc_frac_no_alph_words": 0.2549668848514557,
"rps_doc_frac_unique_words": 0.3506200611591339,
"rps_doc_mean_word_length": 4.5422773361206055,
"rps_doc_num_sentences": 60,
"rps_doc_symbol_to_word_ratio": 0.0033112599048763514,
"rps_doc_unigram_entropy": 5.125600814819336,
"rps_doc_word_count": 887,
"rps_doc_frac_chars_dupe_10grams": 0.06403574347496033,
"rps_doc_frac_chars_dupe_5grams": 0.11963266134262085,
"rps_doc_frac_chars_dupe_6grams": 0.10622982680797577,
"rps_doc_frac_chars_dupe_7grams": 0.10622982680797577,
"rps_doc_frac_chars_dupe_8grams": 0.06403574347496033,
"rps_doc_frac_chars_dupe_9grams": 0.06403574347496033,
"rps_doc_frac_chars_top_2gram": 0.01116902008652687,
"rps_doc_frac_chars_top_3gram": 0.015636630356311798,
"rps_doc_frac_chars_top_4gram": 0.020104240626096725,
"rps_doc_books_importance": -484.8988952636719,
"rps_doc_books_importance_length_correction": -484.8988952636719,
"rps_doc_openwebtext_importance": -211.26864624023438,
"rps_doc_openwebtext_importance_length_correction": -211.26864624023438,
"rps_doc_wikipedia_importance": -181.89646911621094,
"rps_doc_wikipedia_importance_length_correction": -181.89646911621094
},
"fasttext": {
"dclm": 0.5009056329727173,
"english": 0.8982176184654236,
"fineweb_edu_approx": 2.1919710636138916,
"eai_general_math": 0.04824531078338623,
"eai_open_web_math": 0.16065126657485962,
"eai_web_code": 0.0025451199617236853
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,624,310,650,117,415,000 | PercentageCalculator .pro Discount Percentage Fraction to % Decimal to %
28 percent of 0.6?
Percentage Calculator
What is % of Answer:
Percentage Calculator 2
is what percent of ? Answer: %
Percentage Calculator 3
is % of what? Answer:
We think you reached us looking for answers to questions like: What is 28 percent of 0.6? Or maybe: 28 percent of 0.6?
See the detailed solutions to these problems below.
How to work out percentages explained step-by-step
Learn how to solve percentage problems through examples.
In all the following questions consider that:
Solution for 'What is 28% of 0.6?'
Solution Steps
The following question is of the type "How much X percent of W", where W is the whole amount and X is the percentage figure or rate".
Let's say that you need to find 28 percent of 0.6. What are the steps?
Step 1: first determine the value of the whole amount. We assume that the whole amount is 0.6.
Step 2: determine the percentage, which is 28.
Step 3: Convert the percentage 28% to its decimal form by dividing 28 into 100 to get the decimal number 0.28:
28100 = 0.28
Notice that dividing into 100 is the same as moving the decimal point two places to the left.
28.0 → 2.80 → 0.28
Step 4: Finally, find the portion by multiplying the decimal form, found in the previous step, by the whole amount:
0.28 x 0.6 = 0.168 (answer).
The steps above are expressed by the formula:
P = W × X%100
This formula says that:
"To find the portion or the part from the whole amount, multiply the whole by the percentage, then divide the result by 100".
The symbol % means the percentage expressed in a fraction or multiple of one hundred.
Replacing these values in the formula, we get:
P = 0.6 × 28100 = 0.6 × 0.28 = 0.168 (answer)
Therefore, the answer is 0.168 is 28 percent of 0.6.
Solution for '28 is what percent of 0.6?'
The following question is of the type "P is what percent of W,” where W is the whole amount and P is the portion amount".
The following problem is of the type "calculating the percentage from a whole knowing the part".
Solution Steps
As in the previous example, here are the step-by-step solution:
Step 1: first determine the value of the whole amount. We assume that it is 0.6.
(notice that this corresponds to 100%).
Step 2: Remember that we are looking for the percentage 'percentage'.
To solve this question, use the following formula:
X% = 100 × PW
This formula says that:
"To find the percentage from the whole, knowing the part, divide the part by the whole then multiply the result by 100".
This formula is the same as the previous one shown in a different way in order to have percent (%) at left.
Step 3: replacing the values into the formula, we get:
X% = 100 × 280.6
X% = 28000.6
X% = 4,666.67 (answer)
So, the answer is 28 is 4,666.67 percent of 0.6
Solution for '0.6 is 28 percent of what?'
The following problem is of the type "calculating the whole knowing the part and the percentage".
Solution Steps:
Step 1: first determine the value of the part. We assume that the part is 0.6.
Step 2: identify the percent, which is 28.
Step 3: use the formula below:
W = 100 × PX%
This formula says that:
"To find the whole, divide the part by the percentage then multiply the result by 100".
This formula is the same as the above rearranged to show the whole at left.
Step 4: plug the values into the formula to get:
W = 100 × 0.628
W = 100 × 0.021428571428571
W = 2.1428571428571 (answer)
The answer, in plain words, is: 0.6 is 28% of 2.1428571428571.
Sample percentage problems | {
"url": "https://percentagecalculator.pro/What-is_28_percent-of_0.6_%3F",
"source_domain": "percentagecalculator.pro",
"snapshot_id": "crawl=CC-MAIN-2019-30",
"warc_metadata": {
"Content-Length": "42870",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:H23HMAEEF5WP3L4LBZ75OXGLYJDBYJFK",
"WARC-Concurrent-To": "<urn:uuid:e6d7f5fc-de73-4364-9767-1cd47cb5b451>",
"WARC-Date": "2019-07-20T07:19:28Z",
"WARC-IP-Address": "104.18.33.170",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5ZYY3RTMSYMDSLPRV727LSOF72XWZU3J",
"WARC-Record-ID": "<urn:uuid:1cae9d9c-b2ad-444a-9f46-96f73def9a55>",
"WARC-Target-URI": "https://percentagecalculator.pro/What-is_28_percent-of_0.6_%3F",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:906d8d55-7ff4-43d8-b416-6a3f00123ed2>"
},
"warc_info": "isPartOf: CC-MAIN-2019-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-143-3-249.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
73,
74,
93,
94,
116,
117,
139,
140,
164,
165,
196,
197,
221,
222,
244,
245,
364,
365,
417,
418,
469,
470,
527,
528,
574,
575,
610,
611,
626,
627,
761,
762,
833,
834,
929,
930,
977,
978,
1089,
1090,
1103,
1104,
1198,
1199,
1218,
1219,
1335,
1336,
1365,
1366,
1412,
1413,
1427,
1428,
1452,
1453,
1579,
1580,
1666,
1667,
1714,
1715,
1761,
1762,
1815,
1816,
1858,
1859,
1981,
1982,
2079,
2080,
2095,
2096,
2160,
2161,
2242,
2243,
2283,
2284,
2354,
2355,
2406,
2407,
2421,
2422,
2446,
2447,
2568,
2569,
2677,
2678,
2733,
2734,
2751,
2752,
2765,
2766,
2789,
2790,
2838,
2839,
2881,
2882,
2980,
2981,
2997,
2998,
3077,
3078,
3121,
3122,
3153,
3154,
3168,
3169,
3193,
3194,
3282,
3283,
3359,
3360,
3409,
3410,
3426,
3427,
3455,
3456,
3485,
3486,
3549,
3550
],
"line_end_idx": [
73,
74,
93,
94,
116,
117,
139,
140,
164,
165,
196,
197,
221,
222,
244,
245,
364,
365,
417,
418,
469,
470,
527,
528,
574,
575,
610,
611,
626,
627,
761,
762,
833,
834,
929,
930,
977,
978,
1089,
1090,
1103,
1104,
1198,
1199,
1218,
1219,
1335,
1336,
1365,
1366,
1412,
1413,
1427,
1428,
1452,
1453,
1579,
1580,
1666,
1667,
1714,
1715,
1761,
1762,
1815,
1816,
1858,
1859,
1981,
1982,
2079,
2080,
2095,
2096,
2160,
2161,
2242,
2243,
2283,
2284,
2354,
2355,
2406,
2407,
2421,
2422,
2446,
2447,
2568,
2569,
2677,
2678,
2733,
2734,
2751,
2752,
2765,
2766,
2789,
2790,
2838,
2839,
2881,
2882,
2980,
2981,
2997,
2998,
3077,
3078,
3121,
3122,
3153,
3154,
3168,
3169,
3193,
3194,
3282,
3283,
3359,
3360,
3409,
3410,
3426,
3427,
3455,
3456,
3485,
3486,
3549,
3550,
3576
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3576,
"ccnet_original_nlines": 132,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.33806148171424866,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0260047297924757,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3534278869628906,
"rps_doc_frac_unique_words": 0.25399360060691833,
"rps_doc_mean_word_length": 4.260383605957031,
"rps_doc_num_sentences": 72,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.374609470367432,
"rps_doc_word_count": 626,
"rps_doc_frac_chars_dupe_10grams": 0.0794900581240654,
"rps_doc_frac_chars_dupe_5grams": 0.2819647490978241,
"rps_doc_frac_chars_dupe_6grams": 0.20172478258609772,
"rps_doc_frac_chars_dupe_7grams": 0.20172478258609772,
"rps_doc_frac_chars_dupe_8grams": 0.12823396921157837,
"rps_doc_frac_chars_dupe_9grams": 0.12823396921157837,
"rps_doc_frac_chars_top_2gram": 0.038995131850242615,
"rps_doc_frac_chars_top_3gram": 0.028871389105916023,
"rps_doc_frac_chars_top_4gram": 0.024371949955821037,
"rps_doc_books_importance": -260.925537109375,
"rps_doc_books_importance_length_correction": -260.925537109375,
"rps_doc_openwebtext_importance": -173.5895233154297,
"rps_doc_openwebtext_importance_length_correction": -173.5895233154297,
"rps_doc_wikipedia_importance": -162.9413604736328,
"rps_doc_wikipedia_importance_length_correction": -162.9413604736328
},
"fasttext": {
"dclm": 0.974126935005188,
"english": 0.9111073017120361,
"fineweb_edu_approx": 3.4677388668060303,
"eai_general_math": 0.9989554286003113,
"eai_open_web_math": 0.8933340907096863,
"eai_web_code": 0.6036625504493713
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "513.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry"
}
},
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
1,616,316,425,788,755,200 | Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
I am trying to learn TCP/IP. Can anyone recommend some tools to help me better understand it?
share|improve this question
6 Answers 6
Scapy is a very good tool for forging packets in conjunction with wireshark, it may fit your needs.
share|improve this answer
+1, Interesting... thanks for the link! – l0c0b0x Dec 28 '09 at 13:52
I found this site a while ago for a friend, LearnTCPIP which she said helped her understand the basics, and is of course "free"
share|improve this answer
This does not seem like a very good site. They are much more interested in selling CDs than teaching. – Joel K Dec 28 '09 at 12:59
The first think you should know is that TCP and IP are different things and the original question you're asking is like asking about milk-and-cookies.
It's not light reading, but the fully authoritative source for all things TCP is the original RFC.
RFC 793
IP also has a RFC, but TCP is the harder of the two.
You didn't say why you need to know this.. Let's assume it's for an interview.
When I interview people looking for jobs who say they know TCP/IP I ask them about these sorts of things:
• Subnetting and CIDR
• How many /24s in a /22?
• What are the differences between TCP and UDP?
• Is TCP tunable? (what would you tune and why?)
• What are TCP and IP Options?
Good luck with your studies.
share|improve this answer
Though a lot of the application layer information is outdated, TCP/IP Illustrated, Volume 1: The Protocols is a great resource for learning.
share|improve this answer
I could not agree with this comment more. I used TCP/IP Illustrated to bootstrap into TCP/IP more than a decade ago. The fundamentals haven't changed, and the late W. Richard Stevens had a way of explaining complicated concepts that made them highly accessible. Buy this book. – Brian Clapper Dec 28 '09 at 14:34
The TCP/IP Guide (tcpipguide.com) is also good. – Gerald Combs Dec 28 '09 at 18:18
I have enjoyed the Security Now podcast (http://twit.tv/sn) which, over the years, has covered many aspects of the TCP/IP family of protocols.
Once you have learned the theory, nothing beats installing a protocol analyzer, such as wireshark (http://www.wireshark.org/) and getting some hands on.
share|improve this answer
Big fan of Security Now! which has made clear to a whole bunch of people why the field of computer security is harder than just putting a virus scanner on a computer and thinking that is the end of the problem. – Stephen Thompson Dec 28 '09 at 10:14
try using hping3,tcpdump and wireshark to understand and dissect the packets flowing across network.
Wireshark is very good tool for actually checking each and every byte of packets and analyzing how flags and different headers and crafted.
These all would only be helpful if have basic operating systems knowledge couple with a reading of TCP/IP illustrative volume 1 or some other basic networking book.
And if you use Linux you might also wanna check http://kernelnewbies.org/Documents/LinuxIPNetworking
share|improve this answer
Your Answer
discard
By posting your answer, you agree to the privacy policy and terms of service. | {
"url": "http://serverfault.com/questions/97657/what-tools-exist-for-learning-and-understanding-tcp-ip-more-quickly",
"source_domain": "serverfault.com",
"snapshot_id": "crawl=CC-MAIN-2014-52",
"warc_metadata": {
"Content-Length": "89166",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2EECC64TYNBTPDCSIMIJXWIR2K7YKYFR",
"WARC-Concurrent-To": "<urn:uuid:7fe0c6be-c130-4c7b-bf90-6eb4d963882e>",
"WARC-Date": "2014-12-20T21:55:54Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:4PYCJHMZT6JMXY6LC5L4HVTAWSAYAJ2U",
"WARC-Record-ID": "<urn:uuid:5e15dfb0-5025-49cf-8a44-42bfeba2db5c>",
"WARC-Target-URI": "http://serverfault.com/questions/97657/what-tools-exist-for-learning-and-understanding-tcp-ip-more-quickly",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:726c788e-9cdd-40ad-a0c7-6db6942e7502>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-231-17-201.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-52\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for December 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,
25,
162,
163,
257,
258,
286,
287,
299,
300,
400,
401,
427,
432,
503,
504,
632,
633,
659,
664,
796,
797,
948,
949,
1048,
1049,
1057,
1058,
1111,
1112,
1191,
1192,
1298,
1299,
1323,
1351,
1401,
1452,
1485,
1486,
1515,
1516,
1542,
1543,
1684,
1685,
1711,
1716,
2030,
2035,
2119,
2120,
2263,
2264,
2417,
2418,
2444,
2449,
2700,
2701,
2802,
2803,
2943,
2944,
3109,
3110,
3211,
3212,
3238,
3239,
3251,
3252,
3254,
3262,
3263
],
"line_end_idx": [
25,
162,
163,
257,
258,
286,
287,
299,
300,
400,
401,
427,
432,
503,
504,
632,
633,
659,
664,
796,
797,
948,
949,
1048,
1049,
1057,
1058,
1111,
1112,
1191,
1192,
1298,
1299,
1323,
1351,
1401,
1452,
1485,
1486,
1515,
1516,
1542,
1543,
1684,
1685,
1711,
1716,
2030,
2035,
2119,
2120,
2263,
2264,
2417,
2418,
2444,
2449,
2700,
2701,
2802,
2803,
2943,
2944,
3109,
3110,
3211,
3212,
3238,
3239,
3251,
3252,
3254,
3262,
3263,
3340
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3340,
"ccnet_original_nlines": 74,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.37130802869796753,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05485232174396515,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.213783398270607,
"rps_doc_frac_unique_words": 0.5152603387832642,
"rps_doc_mean_word_length": 4.6499104499816895,
"rps_doc_num_sentences": 40,
"rps_doc_symbol_to_word_ratio": 0.0014064699644222856,
"rps_doc_unigram_entropy": 5.218742847442627,
"rps_doc_word_count": 557,
"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.05096524953842163,
"rps_doc_frac_chars_top_4gram": 0.017374519258737564,
"rps_doc_books_importance": -286.6052551269531,
"rps_doc_books_importance_length_correction": -286.6052551269531,
"rps_doc_openwebtext_importance": -162.3123321533203,
"rps_doc_openwebtext_importance_length_correction": -162.3123321533203,
"rps_doc_wikipedia_importance": -116.4417724609375,
"rps_doc_wikipedia_importance_length_correction": -116.4417724609375
},
"fasttext": {
"dclm": 0.2219753861427307,
"english": 0.9473763108253479,
"fineweb_edu_approx": 2.198007106781006,
"eai_general_math": 0.0057871900498867035,
"eai_open_web_math": 0.266463041305542,
"eai_web_code": 0.00013529999705497175
}
} | {
"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": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "1",
"label": "Leftover HTML"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,340,116,951,517,196,300 | How to test private methods
To test a method you need to execute it, but calling private methods directly can be hard or even impossible, depending on the programming language you use. In this article I?ll primarily speak about Python and Java, but the described techniques surely can be applied to many other languages (but I can?t be sure about all of them).
What is a private method?
Have you ever asked yourself, why do you even need private methods? You need private data to maintain consistency, but why private methods?
Strictly speaking, you don?t. But they still be helpful at least for two major reasons:
• You want to extract some code that works with private data;
• You want to extract some code that doesn?t work with private data, but still doesn?t suit API (because user simple doesn?t care).
While the first one prevents private data corruption, the second merely makes your API cleaner.
Don?t test it
Surprisingly, when I first came to Java programming and googled ?How to test private method in Java?, the most popular answer was something like ?Why do you want to test private methods? Users call public methods, test them instead?.
Well, that sounds crazy for me. I surely can just ignore the fact that a public methods call a private one, just imagine that private method code is inlined, but that means that code of the private method will be tested again and again with every public method that calls the private one.
In the following example you really want to test private method, not the two almost identical public ones.
One can notice that some refactoring can allow me not to test the private method. That?s true and we will talk about it later. But testing _set_status without any changes is still clean and reasonable way to do. I don?t buy this ?don?t test private methods?.
Just call it
The simplest and most straightforward way to call a private method is, you know, call it. And that?s exactly what we do in Python and other languages that has private by convention (e. g. Perl).
To ?just call it? in Java we need to change visibility of the method.
The first way is to make method package private (no access modifier) and put tests into the same package. This is a fairly common practice, but you still might want (or already have) another code structure.
The second way is to make method public. To let people know you still don?t want to call this method you can use @VisibleForTestingannotation from Guava or any other convention you like (that?s actually what Python and Perl do). By the way, IDEA totally understands that annotation and will warn you about using such public method outside of tests.
Nested class
You can also put a test class inside a tested one (at least in Java), but that doesn?t look great. You have to use the same file for both classes, and your production binaries will actually contain test code.
Reflection
In some languages reflections will do fine, in Ruby it?s that simple:
But in Java such code is so heavy I gave up on idea of providing an example here. More than this, you have to abandon all cool stuff your favourite IDE does for you.
Eliminate private
Personally I prefer the ?just call it? method, and I like to use @VisibleForTesting in Java to make it happen.
But let us talk again about refactoring that allows me avoiding testing private methods (by eliminating them).
The point is to merge all private data and private methods into an object of another class that contains no private methods or data, but put the instance of that class into the only private attribute of the original class. Doesn?t sound simple, but it is, consider examples:
Before:
After:
So now you can freely test EntityPrivateData, the only thing that remains private is data attribute. Like I said before, you actually don?t need private methods, only private data.
The described method can be useful not only for testing private methods, but also for more expressive design of your software. You can use any number of such private data classes so they have more sense semantically, not only technically.
For me, the most important thing about this pattern is that it proves that you technically can eliminate all private methods. But I still doubt that it?s reasonable to do it every time, your code can bloat without any significant benefit.
This article was written with the help of Nikolay Rys.
See also
Testing private methods: easier than you think! – Axel Fontaine – Entrepreneur, Architect?
Why make things simple when you can also make them hard and long-winded? Haven’t you always been dreaming of needing 10?
axelfontaine.com
How do I test a class that has private methods, fields or inner classes?
How do I use JUnit to test a class that has internal private methods, fields or nested classes? It seems bad to change?
stackoverflow.com
No Responses
Write a response | {
"url": "https://911weknow.com/how-to-test-private-methods",
"source_domain": "911weknow.com",
"snapshot_id": "crawl=CC-MAIN-2021-04",
"warc_metadata": {
"Content-Length": "34415",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Q2ADQACWPRRXOTSKX2CE7LO3IIH2XWU2",
"WARC-Concurrent-To": "<urn:uuid:769f3091-64e8-4c87-9d8a-3048af7c676a>",
"WARC-Date": "2021-01-19T16:11:51Z",
"WARC-IP-Address": "167.179.99.161",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:CX7DH6D4BDN7QTAI7UNMXUMW3C2S7CAO",
"WARC-Record-ID": "<urn:uuid:651781dd-fd3f-4c92-87e9-b0b125e338e9>",
"WARC-Target-URI": "https://911weknow.com/how-to-test-private-methods",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c042b0eb-fab7-4b55-88b4-c1bfce107510>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-226.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,
28,
29,
362,
363,
389,
390,
530,
531,
619,
620,
684,
818,
819,
915,
916,
930,
931,
1165,
1166,
1455,
1456,
1563,
1564,
1823,
1824,
1837,
1838,
2033,
2034,
2104,
2105,
2312,
2313,
2662,
2663,
2676,
2677,
2886,
2887,
2898,
2899,
2969,
2970,
3136,
3137,
3155,
3156,
3267,
3268,
3379,
3380,
3655,
3656,
3664,
3665,
3672,
3673,
3854,
3855,
4094,
4095,
4334,
4335,
4390,
4391,
4400,
4401,
4492,
4493,
4614,
4615,
4632,
4633,
4706,
4707,
4827,
4828,
4846,
4847,
4860,
4861
],
"line_end_idx": [
28,
29,
362,
363,
389,
390,
530,
531,
619,
620,
684,
818,
819,
915,
916,
930,
931,
1165,
1166,
1455,
1456,
1563,
1564,
1823,
1824,
1837,
1838,
2033,
2034,
2104,
2105,
2312,
2313,
2662,
2663,
2676,
2677,
2886,
2887,
2898,
2899,
2969,
2970,
3136,
3137,
3155,
3156,
3267,
3268,
3379,
3380,
3655,
3656,
3664,
3665,
3672,
3673,
3854,
3855,
4094,
4095,
4334,
4335,
4390,
4391,
4400,
4401,
4492,
4493,
4614,
4615,
4632,
4633,
4706,
4707,
4827,
4828,
4846,
4847,
4860,
4861,
4877
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4877,
"ccnet_original_nlines": 81,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4577464759349823,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.016096580773591995,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13883300125598907,
"rps_doc_frac_unique_words": 0.35756853222846985,
"rps_doc_mean_word_length": 4.591179847717285,
"rps_doc_num_sentences": 77,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.094015598297119,
"rps_doc_word_count": 839,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.032710280269384384,
"rps_doc_frac_chars_dupe_6grams": 0.015057110227644444,
"rps_doc_frac_chars_dupe_7grams": 0.015057110227644444,
"rps_doc_frac_chars_dupe_8grams": 0.015057110227644444,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.05451713129878044,
"rps_doc_frac_chars_top_3gram": 0.013499479740858078,
"rps_doc_frac_chars_top_4gram": 0.008307370357215405,
"rps_doc_books_importance": -428.83990478515625,
"rps_doc_books_importance_length_correction": -428.83990478515625,
"rps_doc_openwebtext_importance": -265.3865661621094,
"rps_doc_openwebtext_importance_length_correction": -265.3865661621094,
"rps_doc_wikipedia_importance": -140.7830352783203,
"rps_doc_wikipedia_importance_length_correction": -140.7830352783203
},
"fasttext": {
"dclm": 0.2688814401626587,
"english": 0.9388028383255005,
"fineweb_edu_approx": 2.2151036262512207,
"eai_general_math": 0.742546796798706,
"eai_open_web_math": 0.14615392684936523,
"eai_web_code": 0.7925384044647217
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.13",
"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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,875,183,674,265,277,000 | Home > Resources > Apple Music Converter Tips > Play Apple Music on Windows Phone
Best Way to Play Apple Music on Windows Phone
Could We Use Apple Music in A Windows Phone?
Apple Music is a young streaming music service in the world of music. At first, the app was created only for iOS, but now, people can enjoy Apple Music on Android devices. Then a question is that how to play Apple Music on Windows phone? It seems that Windows Phone users are left out in the dark since there is no official news about the support of Windows smartphones. This is really frustrating!
Is there any other solution to help people play Apple Music songs on a Windows Phone?
Yes, it is not difficult to transfer your Apple Music songs to your Windows Phone for playing, although Apple Music app is still not available on Windows Phone currently. All you are supposed to do is remove DRM protection from your Apple Music songs downloaded on your computer, and then transfer them to your Windows Phone for enjoying.
play apple music on windows phone
NoteBurner Apple Music Converter is a professional Apple Music Converter, far much excellent than other converter, which will help you legally remove DRM from Apple Music songs and playlists and convert Apple Music files, audiobooks, or other downloaded music from iTunes or Apple Music to MP3, FLAC, AAC or WAV format at 10X faster speed with keeping lossless audio quality. In this way, you can freely move your Apple Music songs to your Windows Phone for enjoying.
The following is the detailed tutorial to guide you to remove DRM from Apple Music songs and transfer them to Windows Phone. Please download NoteBurner Apple Music Converter first before getting started.
Try It Free
Mac Version
Try It Free
Win Version
Part 1. Tutorial about How to Remove DRM from Apple Music
Step 1: Download and Launch NoteBurner Apple Music Converter
Download and install NoteBurner Apple Music Converter. After it, please launch the software.
main interface
Step 2: Add Apple Music Songs
Click the button "+" to add music, it will pop up a window, which will show you all of songs you have downloaded from Apple Music. You can choose any song you want to convert.
add music
Step 3: Choose Output Format
After the successful adding, please click the button "setting" to choose the output format as you need, in the pop-up window, you can choose output path, output format, and even the conversion speed. WAV, AAC, MP3, and FLAC are available to choose.
choose output format
Step 4: Remove DRM from Apple Music
After completing the above steps, the final one is clicking the button "Convert". Just a few second, it will succeed.
converting
Part 2: Transfer Converted Apple Music to Windows Phone
Step 1: Connect your Windows Phone to computer via USB cable.
Step 2: Open the output folder and select the converted music you want to copy.
After conversion done, you can find the converted audios by clicking history button.
find converted file
Step 3: Right-click the file you want to transfer in the output folder, select "Send to" and then click your Windows Phone.
Step 4: Wait for the files to copy.
What's next? Download NoteBurner Apple Music Converter now!
NoteBurner Apple Music Converter for Windows:
free download of noteburner m4p converter for windows purchase noteburner m4p converter for windows online
NoteBurner Apple Music Converter for Mac:
free download of noteburner m4p converter for mac purchase noteburner m4p converter for mac online
Related Articles:
What's New
NoteBurner Apple Music Converter
Try It Free
Mac Version
Try It Free
Win Version | {
"url": "http://noteburner.com/apple-music/play-apple-music-on-windows-phone.html",
"source_domain": "noteburner.com",
"snapshot_id": "crawl=CC-MAIN-2018-09",
"warc_metadata": {
"Content-Length": "41017",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:OGYLTEOR2TPPQO7NVOGDEYN7I7RT53HW",
"WARC-Concurrent-To": "<urn:uuid:9d62de3a-f326-4257-a6d4-a7a7627f5574>",
"WARC-Date": "2018-02-18T07:16:27Z",
"WARC-IP-Address": "107.182.231.52",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:KZW6ZPO7MSFH3PTXZQMP2A2MDZUPGIHI",
"WARC-Record-ID": "<urn:uuid:a78d511d-9ebd-43f3-9b0b-55c8ed1dc294>",
"WARC-Target-URI": "http://noteburner.com/apple-music/play-apple-music-on-windows-phone.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d610d4ba-d429-4b71-81f8-142385d8b8ff>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-165-200-214.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,
82,
83,
129,
130,
175,
176,
575,
576,
662,
663,
1002,
1003,
1037,
1038,
1506,
1507,
1711,
1712,
1725,
1737,
1750,
1762,
1763,
1764,
1822,
1823,
1884,
1885,
1978,
1979,
1994,
1995,
2025,
2026,
2202,
2203,
2213,
2214,
2243,
2244,
2493,
2494,
2515,
2516,
2552,
2553,
2671,
2672,
2683,
2684,
2685,
2741,
2742,
2804,
2805,
2885,
2886,
2971,
2972,
2992,
2993,
3117,
3118,
3154,
3155,
3215,
3216,
3262,
3375,
3417,
3522,
3523,
3541,
3542,
3553,
3554,
3587,
3588,
3601,
3613,
3626
],
"line_end_idx": [
82,
83,
129,
130,
175,
176,
575,
576,
662,
663,
1002,
1003,
1037,
1038,
1506,
1507,
1711,
1712,
1725,
1737,
1750,
1762,
1763,
1764,
1822,
1823,
1884,
1885,
1978,
1979,
1994,
1995,
2025,
2026,
2202,
2203,
2213,
2214,
2243,
2244,
2493,
2494,
2515,
2516,
2552,
2553,
2671,
2672,
2683,
2684,
2685,
2741,
2742,
2804,
2805,
2885,
2886,
2971,
2972,
2992,
2993,
3117,
3118,
3154,
3155,
3215,
3216,
3262,
3375,
3417,
3522,
3523,
3541,
3542,
3553,
3554,
3587,
3588,
3601,
3613,
3626,
3637
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3637,
"ccnet_original_nlines": 81,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3150289058685303,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023121390491724014,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13294798135757446,
"rps_doc_frac_unique_words": 0.3366336524486542,
"rps_doc_mean_word_length": 4.76897668838501,
"rps_doc_num_sentences": 30,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.703938007354736,
"rps_doc_word_count": 606,
"rps_doc_frac_chars_dupe_10grams": 0.02629758045077324,
"rps_doc_frac_chars_dupe_5grams": 0.25017300248146057,
"rps_doc_frac_chars_dupe_6grams": 0.16470588743686676,
"rps_doc_frac_chars_dupe_7grams": 0.12318339198827744,
"rps_doc_frac_chars_dupe_8grams": 0.053979240357875824,
"rps_doc_frac_chars_dupe_9grams": 0.053979240357875824,
"rps_doc_frac_chars_top_2gram": 0.10726644098758698,
"rps_doc_frac_chars_top_3gram": 0.06574393808841705,
"rps_doc_frac_chars_top_4gram": 0.08027681708335876,
"rps_doc_books_importance": -298.5550231933594,
"rps_doc_books_importance_length_correction": -298.5550231933594,
"rps_doc_openwebtext_importance": -147.91305541992188,
"rps_doc_openwebtext_importance_length_correction": -147.91305541992188,
"rps_doc_wikipedia_importance": -101.94339752197266,
"rps_doc_wikipedia_importance_length_correction": -101.94339752197266
},
"fasttext": {
"dclm": 0.018114030361175537,
"english": 0.8650705218315125,
"fineweb_edu_approx": 1.3171532154083252,
"eai_general_math": 0.00014615000691264868,
"eai_open_web_math": 0.027279140427708626,
"eai_web_code": 0.0001687400072114542
}
} | {
"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": "780.285",
"labels": {
"level_1": "Arts",
"level_2": "Music",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "6",
"label": "Promotional/Advertisement"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,533,037,194,843,971,300 | Importing entries from one termbase into another one with different termbase definitions
We created a brand new termbase for our team with MT 2021. We are now trying to import terms from our legacy termbase (also MT 2021) into the new, empty termbase. However, the termbase definitions of the two termbases are different. How can I still get the data into the new termbase? So far, I have not been able to import a single term. Is there now way to import the fields that match and to leave the other fields blank so that we can edit them later? Sure there must be any other way than manually adding all the terms again.
emoji
Parents Reply Children
No Data | {
"url": "https://community.rws.com/product-groups/trados-portfolio/trados-studio/f/multiterm/47428/importing-entries-from-one-termbase-into-another-one-with-different-termbase-definitions/152660",
"source_domain": "community.rws.com",
"snapshot_id": "CC-MAIN-2024-33",
"warc_metadata": {
"Content-Length": "199919",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:G23N2P4UGSGA74QKN6TLJDNKOELKZ46C",
"WARC-Concurrent-To": "<urn:uuid:66a9f287-deed-416e-add6-dcfbd9d70eb8>",
"WARC-Date": "2024-08-12T17:23:11Z",
"WARC-IP-Address": "54.154.78.102",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:4QGM7MXCBJ6TXRHESRGU3VHYT25FKOY3",
"WARC-Record-ID": "<urn:uuid:69d7eb6a-9f37-4db1-b6a4-5725cea871c2>",
"WARC-Target-URI": "https://community.rws.com/product-groups/trados-portfolio/trados-studio/f/multiterm/47428/importing-entries-from-one-termbase-into-another-one-with-different-termbase-definitions/152660",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2e6f604a-49c6-4299-84b8-10455d31a5f7>"
},
"warc_info": "isPartOf: CC-MAIN-2024-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-44\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,
89,
90,
622,
623,
629,
652
],
"line_end_idx": [
89,
90,
622,
623,
629,
652,
659
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 659,
"ccnet_original_nlines": 6,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.5151515007019043,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.030303029343485832,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.10606060922145844,
"rps_doc_frac_unique_words": 0.625,
"rps_doc_mean_word_length": 4.375,
"rps_doc_num_sentences": 8,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.136678218841553,
"rps_doc_word_count": 120,
"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.04571428894996643,
"rps_doc_frac_chars_top_3gram": 0.03809523954987526,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -73.55402374267578,
"rps_doc_books_importance_length_correction": -81.93711853027344,
"rps_doc_openwebtext_importance": -36.005985260009766,
"rps_doc_openwebtext_importance_length_correction": -44.38908386230469,
"rps_doc_wikipedia_importance": -36.39438247680664,
"rps_doc_wikipedia_importance_length_correction": -44.77748107910156
},
"fasttext": {
"dclm": 0.10625594854354858,
"english": 0.9268440008163452,
"fineweb_edu_approx": 1.1031146049499512,
"eai_general_math": 0.5255256295204163,
"eai_open_web_math": 0.24694836139678955,
"eai_web_code": 0.8640607595443726
}
} | {
"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": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,997,847,033,620,927,000 | alexoy
Members
• Content Count
52
• Joined
• Last visited
About alexoy
• Rank
Advanced Member
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
1. alexoy
Occlusion Queries bug
@Deltakosh, thanks, it helped and 2 new questions.. 1. Of course about performance differences - will there be? Static list of meshes vs dynamic. Will it be reordered on every frame? (noticeable with a big enough list?); 2. For modelling I use Blender. When I set a texture on a mesh - there is a texture's setting whether to use "Alpha" or not. If I set "Use", even if my image is not transparent at all - occlusion queries say the label is still visible. If I uncheck "Use" - everything is fine and the label becomes invisible when behind this mesh. Is this an expected behavior?
2. Hi, Probably there is a bug in occlusion queries - http://www.babylonjs-playground.com/#QDAZ80#15 Here a label is a thing that appears/disappears depending on the visibility of a sphere. I've noticed Occlusion Query takes into account only meshes that were created before it was enabled. If I add a box later - BJS doesn't understand that a sphere is behind the new box and my label stays visible. In my demo - in the beginning the label is not visible because the sphere is not visible, it's good. However, if you go to the right behind the box - label will always be visible. Is it normal and can be configured somehow or it's a bug?
3. alexoy
Hide a sprite
@trevordev, @Deltakosh, unfortunately it doesn't work for 100%. For some reason, later in the scene I can't hide a sprite - http://playground.babylonjs.com/#RHRF2N#1 - wait for 5 secs, everything should disappear, but only label disappears. For some reason it's only possible to init a sprite as not visible, but not possible to hide it later.
4. alexoy
Hide a sprite
@trevordev, lightning fast How often do you build babylon.js? Already wanted to try EDIT: oh.. "The Travis CI build is in progress"- lets wait for Travis
5. alexoy
Material for SPS
Hi, Could you tell more what is wrong here - https://www.babylonjs-playground.com/#YI6D05#3 ? Which prism should be rotated, but is not?
6. alexoy
Hide a sprite
Hi, Looks like there is no option to hide a sprite, like sprite.isVisible = false; - could you add it please? But please don't mention setting the size to 0 or removing/recreation the sprite it's an ugly hack, we do not do that with meshes and other things, right?!
7. @dbawel, and what can you say about http://www.babylonjs-playground.com/#QDAZ80#14 ? With "Occlusion Queries" I mean official docs with this topic. In this demo check also happens on every frame, but could be done once every 60 frames too, like in your example. In your opinion this way is much slower or why you don't like it?
8. Hi @dbawel, I remember this post. Actually some answers are mine. What method do you suggest as a base? Because rays calculations could be even more expensive - you need to cast them on every frame for every label/enemy, then find whether there is another mesh in between. Also going through all frustum meshes and finding the closest or comparing the distances doesn't make any sense in my case. But why you would avoid a "Occlusion Queries" method?
9. I've found out you have a thing named "Occlusion Queries" - is it good for my task or too expensive (there could be many players around)? Demo - http://www.babylonjs-playground.com/#QDAZ80#14 (2'nd sphere is always on top to make it easier to see what's happening)
10. @Deltakosh, you mean even if in front of camera there is a small mesh behind the second bigger mesh, so not visible to the viewer, frustum calculations will state that both meshes are in the same visibility state just because mathematically they are in front of camera? If Yes, what can I do then? I hope you agree that seeing the nickname of not visible enemy is bad
11. @Deltakosh, I mean whether I'm able to see the enemy directly, whether he is literally visible in front of my camera. While moving sometimes he is in front of me - then the label should be visible. If he goes behind the wall/house/etc - the label should disappear. Testing shows, that being behind the second mesh doesn't make the first one "isVisible = false", so probably the answer to you question is using frustum.
12. Hi all, Is there a flag in a BJS GUI system to automatically disable rendering of the GUI labels when the mesh they are attached to is not visible? Simple use case: you use labels to show user's names, and you shouldn't see the labels of the enemies which are not visible at the moment. Well.. because you shouldn't know where they are (behind the wall)
13. alexoy
babylon.worker.js ?
Hello! This is an old topic, but at this moment I'got the same question. In the repo I see that babylon.worker.js is regularly being updated, but docs say that the only thing we need to do to enable web workers is to set scene.workerCollisions = true (babylon.worker.js is mentioned nowhere). For example here: https://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#web-worker-based-collision-system-since-21 As this topic is without answer - the question is the same - do we need babylon.worker.js and when if Yes?
14. Just curious.. why in such topics (HTML5+JS vs Something) almost nobody mentions that JavaScript is a single-threaded thing? Your code have to be very efficient to make your game enjoyable, because performance is very important. I haven't used Unity, but fast searching shows there is multithreading in it, so potentially it should work faster with heavier applications, especially on normal multicore PCs. 4-8 cores are better than 1, aren't they? What do you think about that?
15. notRenderable is ignored if label is linked with a mesh, should it be like that? isVisible still works. @Deltakosh, by children you mean cases like when there is a GUI rectangle and a GUI label attached to it, so label is a child of the rect.? | {
"url": "http://www.html5gamedevs.com/profile/30699-alexoy/",
"source_domain": "www.html5gamedevs.com",
"snapshot_id": "crawl=CC-MAIN-2018-51",
"warc_metadata": {
"Content-Length": "98218",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:R2GHN33JRN3C6OQBEZHR6AQQQB7LXR27",
"WARC-Concurrent-To": "<urn:uuid:b1cab0a1-17a9-4757-9c6b-a70a57738837>",
"WARC-Date": "2018-12-10T21:33:10Z",
"WARC-IP-Address": "78.109.168.18",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:OWVCGIID63ERTKZIOR46CJAORYYRMZCM",
"WARC-Record-ID": "<urn:uuid:c1150992-bbfc-48a2-8647-99f0ee852261>",
"WARC-Target-URI": "http://www.html5gamedevs.com/profile/30699-alexoy/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:458322ae-86cb-4686-ad2c-3234dc460d06>"
},
"warc_info": "isPartOf: CC-MAIN-2018-51\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for December 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-180-67-225.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
7,
8,
16,
34,
35,
42,
53,
54,
71,
72,
85,
86,
95,
115,
116,
140,
141,
218,
219,
231,
232,
258,
259,
845,
1486,
1498,
1499,
1517,
1518,
1866,
1878,
1879,
1897,
1898,
2056,
2068,
2069,
2090,
2091,
2232,
2244,
2245,
2263,
2264,
2534,
2867,
3323,
3593,
3967,
4392,
4752,
4765,
4766,
4790,
4791,
5330,
5815
],
"line_end_idx": [
7,
8,
16,
34,
35,
42,
53,
54,
71,
72,
85,
86,
95,
115,
116,
140,
141,
218,
219,
231,
232,
258,
259,
845,
1486,
1498,
1499,
1517,
1518,
1866,
1878,
1879,
1897,
1898,
2056,
2068,
2069,
2090,
2091,
2232,
2244,
2245,
2263,
2264,
2534,
2867,
3323,
3593,
3967,
4392,
4752,
4765,
4766,
4790,
4791,
5330,
5815,
6064
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6064,
"ccnet_original_nlines": 57,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.412202388048172,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0245535708963871,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2232142835855484,
"rps_doc_frac_unique_words": 0.40020060539245605,
"rps_doc_mean_word_length": 4.64493465423584,
"rps_doc_num_sentences": 100,
"rps_doc_symbol_to_word_ratio": 0.008184519596397877,
"rps_doc_unigram_entropy": 5.406688690185547,
"rps_doc_word_count": 997,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.011228679679334164,
"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.010580870322883129,
"rps_doc_frac_chars_top_3gram": 0.011876479722559452,
"rps_doc_frac_chars_top_4gram": 0.011012740433216095,
"rps_doc_books_importance": -703.9823608398438,
"rps_doc_books_importance_length_correction": -703.9823608398438,
"rps_doc_openwebtext_importance": -406.19775390625,
"rps_doc_openwebtext_importance_length_correction": -406.19775390625,
"rps_doc_wikipedia_importance": -290.7685241699219,
"rps_doc_wikipedia_importance_length_correction": -290.7685241699219
},
"fasttext": {
"dclm": 0.9381076693534851,
"english": 0.9262807369232178,
"fineweb_edu_approx": 1.696875810623169,
"eai_general_math": 0.7036697864532471,
"eai_open_web_math": 0.1887112259864807,
"eai_web_code": 0.44798868894577026
}
} | {
"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": "4",
"label": "Analyze"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-702,099,107,508,299,100 | [Bug 8404] Refocus the figure element back to being a figure
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8404
James Graham <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #6 from James Graham <[email protected]> 2009-11-30 20:54:37 ---
I would expect a <figure> to be able to contain a <table> instead of an image.
They may be labeled differently, but in scientific literature tables are
presented in exactly the same way as graphics; both will be numbered, both may
have a long explanatory caption, etc. It is overkill to require two entirely
different markup structures in order to represent the same structure with one
case applying to graphics and the other to tables when the two cases are easily
distinguished based on the actual content.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 30 November 2009 20:54:47 UTC | {
"url": "https://lists.w3.org/Archives/Public/public-html-bugzilla/2009Nov/0291.html",
"source_domain": "lists.w3.org",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "10051",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NGJDIKFXMBHHFYAQCUTS5WCJ7VBMF3RI",
"WARC-Concurrent-To": "<urn:uuid:5cbdc6ed-c920-4015-b795-97226f8c47f2>",
"WARC-Date": "2023-09-24T01:47:24Z",
"WARC-IP-Address": "104.18.22.19",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:KFFDOOQDZYMC52MSLUWT7HJ5TVLPRWZ7",
"WARC-Record-ID": "<urn:uuid:6b43546e-bd1b-4d12-ad8b-4f45147b5f73>",
"WARC-Target-URI": "https://lists.w3.org/Archives/Public/public-html-bugzilla/2009Nov/0291.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a3847a50-85c5-4b52-95e8-4b931d0c7435>"
},
"warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-154\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,
61,
62,
113,
114,
115,
157,
158,
213,
290,
357,
358,
359,
360,
361,
439,
518,
591,
670,
747,
825,
905,
949,
950,
951,
955,
1028,
1081,
1117,
1118
],
"line_end_idx": [
61,
62,
113,
114,
115,
157,
158,
213,
290,
357,
358,
359,
360,
361,
439,
518,
591,
670,
747,
825,
905,
949,
950,
951,
955,
1028,
1081,
1117,
1118,
1167
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1167,
"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.2905983030796051,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017094019800424576,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3290598392486572,
"rps_doc_frac_unique_words": 0.7304964661598206,
"rps_doc_mean_word_length": 5.4539008140563965,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0.0042734998278319836,
"rps_doc_unigram_entropy": 4.453867435455322,
"rps_doc_word_count": 141,
"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.018205460160970688,
"rps_doc_frac_chars_top_3gram": 0.06762029230594635,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -101.61697387695312,
"rps_doc_books_importance_length_correction": -101.61697387695312,
"rps_doc_openwebtext_importance": -57.79452133178711,
"rps_doc_openwebtext_importance_length_correction": -57.00082778930664,
"rps_doc_wikipedia_importance": -48.15458679199219,
"rps_doc_wikipedia_importance_length_correction": -48.15458679199219
},
"fasttext": {
"dclm": 0.7375565767288208,
"english": 0.8463541865348816,
"fineweb_edu_approx": 2.267918109893799,
"eai_general_math": 0.7857468128204346,
"eai_open_web_math": 0.7213295698165894,
"eai_web_code": 0.04351044073700905
}
} | {
"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": "4",
"label": "Analyze"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-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": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-7,921,525,287,576,150,000 | 6.3.4. Explicit namespaces in import/export
ExplicitNamespaces
Implied by:
TypeOperators, TypeFamilies
Since:
7.6.1
Status:
Included in GHC2024
Enable use of explicit namespaces in module export lists, patterns, and expressions.
In an import or export list, such as
module M( f, (++) ) where ...
import N( f, (++) )
...
the entities f and (++) are values. However, with type operators (Type operators) it becomes possible to declare (++) as a type constructor. In that case, how would you export or import it?
The ExplicitNamespaces extension allows you to prefix the name of a type constructor in an import or export list with “type” to disambiguate this case, thus:
module M( f, type (++) ) where ...
import N( f, type (++) )
...
module N( f, type (++) ) where
data family a ++ b = L a | R b
The extension ExplicitNamespaces is implied by TypeOperators and (for some reason) by TypeFamilies.
In addition, with PatternSynonyms you can prefix the name of a data constructor in an import or export list with the keyword pattern, to allow the import or export of a data constructor without its parent type constructor (see Import and export of pattern synonyms).
Furthermore, ExplicitNamespaces permits the use of the type keyword in patterns and expressions:
f (type t) x = ... -- in a pattern
r = f (type Integer) 10 -- in an expression
This is used in conjunction with RequiredTypeArguments.
When ExplicitNamespaces is enabled, it is possible to use the type and data keywords to specify the namespace of the name used in a fixity signature or a WARNING/DEPRECATED pragma. This can be useful for disambiguating between names in different namespaces that may conflict with each other.
Here is an example of using namespace specifiers to set different fixities for type-level and term-level operators:
type f $ a = f a
f $ a = f a
infixl 9 type $ -- type-level $ is left-associative with priority 9
infixr 0 data $ -- term-level $ is right-associative with priority 0
Similarly, it can be used in pragmas to deprecate only one name in a namespace:
data Solo = MkSolo
pattern Solo = MkSolo
{-# DEPRECATED data Solo "Use `MkSolo` instead" #-}
type family Head xs where
Head (x : _) = x
pattern Head x <- (head -> x)
{-# WARNING in "x-partial" data Head "this is a partial type synonym" #-}
It is considered bad practice to use a fixity signature, WARNING pragma, or DEPRECATED pragma for a type-level name without an explicit type namespace, and doing so will become an error in a future version of GHC. | {
"url": "https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/explicit_namespaces.html",
"source_domain": "ghc.gitlab.haskell.org",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "23042",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BPOL4EB5W6KNE3P2E6GUS7EYUTNPQ4CU",
"WARC-Concurrent-To": "<urn:uuid:05f42cd2-6992-475f-9755-657a8bc28fb1>",
"WARC-Date": "2024-09-14T15:20:34Z",
"WARC-IP-Address": "145.40.64.137",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:4MNH7Q24ZCQY3U3SLTS6BYBKARW5B7KN",
"WARC-Record-ID": "<urn:uuid:f559c3f1-aef2-4fa8-b380-609580dd0e79>",
"WARC-Target-URI": "https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/explicit_namespaces.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a26b96bb-f1dd-4bb3-a8f2-01d03519c021>"
},
"warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-225\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,
44,
45,
64,
76,
77,
105,
106,
113,
114,
120,
121,
129,
130,
150,
151,
236,
237,
274,
275,
305,
327,
333,
334,
524,
525,
683,
684,
719,
746,
752,
783,
816,
817,
917,
918,
1185,
1186,
1283,
1284,
1325,
1370,
1371,
1427,
1428,
1720,
1721,
1837,
1838,
1855,
1867,
1868,
1936,
2005,
2006,
2086,
2087,
2106,
2107,
2129,
2181,
2182,
2208,
2227,
2228,
2258,
2259,
2333,
2334
],
"line_end_idx": [
44,
45,
64,
76,
77,
105,
106,
113,
114,
120,
121,
129,
130,
150,
151,
236,
237,
274,
275,
305,
327,
333,
334,
524,
525,
683,
684,
719,
746,
752,
783,
816,
817,
917,
918,
1185,
1186,
1283,
1284,
1325,
1370,
1371,
1427,
1428,
1720,
1721,
1837,
1838,
1855,
1867,
1868,
1936,
2005,
2006,
2086,
2087,
2106,
2107,
2129,
2181,
2182,
2208,
2227,
2228,
2258,
2259,
2333,
2334,
2547
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2547,
"ccnet_original_nlines": 68,
"rps_doc_curly_bracket": 0.0015704799443483353,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3677298426628113,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.028142590075731277,
"rps_doc_frac_lines_end_with_ellipsis": 0.057971011847257614,
"rps_doc_frac_no_alph_words": 0.255159467458725,
"rps_doc_frac_unique_words": 0.3857868015766144,
"rps_doc_mean_word_length": 4.802030563354492,
"rps_doc_num_sentences": 20,
"rps_doc_symbol_to_word_ratio": 0.016885550692677498,
"rps_doc_unigram_entropy": 4.577959060668945,
"rps_doc_word_count": 394,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.07188160717487335,
"rps_doc_frac_chars_dupe_6grams": 0.05496829003095627,
"rps_doc_frac_chars_dupe_7grams": 0.03911205008625984,
"rps_doc_frac_chars_dupe_8grams": 0.03911205008625984,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01321353018283844,
"rps_doc_frac_chars_top_3gram": 0.029598310589790344,
"rps_doc_frac_chars_top_4gram": 0.019027480855584145,
"rps_doc_books_importance": -239.70484924316406,
"rps_doc_books_importance_length_correction": -239.70484924316406,
"rps_doc_openwebtext_importance": -123.61734771728516,
"rps_doc_openwebtext_importance_length_correction": -123.61734771728516,
"rps_doc_wikipedia_importance": -81.43592071533203,
"rps_doc_wikipedia_importance_length_correction": -81.43592071533203
},
"fasttext": {
"dclm": 0.04345924034714699,
"english": 0.7377926707267761,
"fineweb_edu_approx": 2.951841115951538,
"eai_general_math": 0.9824250340461731,
"eai_open_web_math": 0.11292427778244019,
"eai_web_code": 0.9547432661056519
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
6,958,911,462,321,869,000 | detect context menu
Zexor
Well-known member
Joined
Nov 28, 2008
Messages
481
Programming Experience
3-5
Is there a way to detect if a right click context menu is opened when i hit a left click on a panel? since the menu will disappear by the time i left click the panel, i cant check it.
jmcilhinney
VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,255
Location
Sydney, Australia
Programming Experience
10+
I'm not sure that that would be possible. You could handle the Opened event of the ContextMenuStrip and set a flag but you'd have to reset that flag when the menu closes and so you still wouldn't catch it. What are you actually trying to achieve?
Zexor
Well-known member
Joined
Nov 28, 2008
Messages
481
Programming Experience
3-5
i am trying to catch a click event on a panel so that if it's context menu is open, the click is canceled.
jmcilhinney
VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,255
Location
Sydney, Australia
Programming Experience
10+
I just did a quick test and the Closed event of the ContextMenuStrip is raised before the MouseDown event of the Panel, so I'd say that that's conclusive evidence that you won't be able to do what you want with managed code alone. You may be able to intercept the Windows messages for the two and see if the order of the messages received allows you to detect something in the Panel before the menu is dismissed.
Zexor
Well-known member
Joined
Nov 28, 2008
Messages
481
Programming Experience
3-5
I used a global variable and a timer of 200ms to track the context menu status and it worked.
Top Bottom | {
"url": "https://vbdotnetforums.com/threads/detect-context-menu.59893/",
"source_domain": "vbdotnetforums.com",
"snapshot_id": "crawl=CC-MAIN-2020-24",
"warc_metadata": {
"Content-Length": "62464",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:N37G2Q7REAA5CRREU2XOGDCYB4YDVGLL",
"WARC-Concurrent-To": "<urn:uuid:bcf0e042-8173-45de-8741-9cea8aa2b3f9>",
"WARC-Date": "2020-06-02T04:22:21Z",
"WARC-IP-Address": "209.9.229.33",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:KEZUQRO5UUCR4G6METFH4TW5ZUZF2BFL",
"WARC-Record-ID": "<urn:uuid:d88150a7-8805-4d3c-bdef-973d1db0b973>",
"WARC-Target-URI": "https://vbdotnetforums.com/threads/detect-context-menu.59893/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:424b5aee-95bf-4623-a4ea-c8e4d0f8a429>"
},
"warc_info": "isPartOf: CC-MAIN-2020-24\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-62.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,
27,
28,
46,
53,
66,
75,
79,
102,
106,
290,
292,
293,
305,
306,
329,
342,
349,
362,
371,
378,
387,
405,
428,
432,
679,
681,
682,
688,
689,
707,
714,
727,
736,
740,
763,
767,
874,
876,
877,
889,
890,
913,
926,
933,
946,
955,
962,
971,
989,
1012,
1016,
1429,
1431,
1432,
1438,
1439,
1457,
1464,
1477,
1486,
1490,
1513,
1517,
1611,
1613
],
"line_end_idx": [
20,
21,
27,
28,
46,
53,
66,
75,
79,
102,
106,
290,
292,
293,
305,
306,
329,
342,
349,
362,
371,
378,
387,
405,
428,
432,
679,
681,
682,
688,
689,
707,
714,
727,
736,
740,
763,
767,
874,
876,
877,
889,
890,
913,
926,
933,
946,
955,
962,
971,
989,
1012,
1016,
1429,
1431,
1432,
1438,
1439,
1457,
1464,
1477,
1486,
1490,
1513,
1517,
1611,
1613,
1623
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1623,
"ccnet_original_nlines": 67,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4035608172416687,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02373887039721012,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.18694362044334412,
"rps_doc_frac_unique_words": 0.457446813583374,
"rps_doc_mean_word_length": 4.553191661834717,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.522062301635742,
"rps_doc_word_count": 282,
"rps_doc_frac_chars_dupe_10grams": 0.3419003188610077,
"rps_doc_frac_chars_dupe_5grams": 0.3419003188610077,
"rps_doc_frac_chars_dupe_6grams": 0.3419003188610077,
"rps_doc_frac_chars_dupe_7grams": 0.3419003188610077,
"rps_doc_frac_chars_dupe_8grams": 0.3419003188610077,
"rps_doc_frac_chars_dupe_9grams": 0.3419003188610077,
"rps_doc_frac_chars_top_2gram": 0.04672896862030029,
"rps_doc_frac_chars_top_3gram": 0.04672896862030029,
"rps_doc_frac_chars_top_4gram": 0.0607476606965065,
"rps_doc_books_importance": -163.8002166748047,
"rps_doc_books_importance_length_correction": -149.99533081054688,
"rps_doc_openwebtext_importance": -103.06809997558594,
"rps_doc_openwebtext_importance_length_correction": -103.06809997558594,
"rps_doc_wikipedia_importance": -81.55850982666016,
"rps_doc_wikipedia_importance_length_correction": -68.3753662109375
},
"fasttext": {
"dclm": 0.023485060781240463,
"english": 0.9388920664787292,
"fineweb_edu_approx": 0.9097468256950378,
"eai_general_math": 0.022838059812784195,
"eai_open_web_math": 0.06410974264144897,
"eai_web_code": 0.015345280058681965
}
} | {
"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": "5",
"label": "Social/Forum"
},
"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": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,988,773,292,304,396,000 | border
Propiedades Constitutivas
Esta es una propiedad abreviada para las siguientes propiedades CSS:
• border-color
• border-style
• border-width
Resumen
La propiedad border permite definir en una única regla todos los bordes de los elementos seleccionados. Se puede utilizar border para definir el o los valores siguientes: border-width, border-style, border-color.
Sintaxis
border: [border-width || border-style || border-color | inherit] ;
Valores
Ejemplos
Ver ejemplo en vivo
element {
border: 1px solid #000;
}
Notas importantes
Mientras que las propiedades border-width, border-style y border-color admiten hasta cuatro valores diferentes, ésta (border) no acepta más de uno por cada propiedad.
Especificaciones
Specification
CSS Backgrounds and Borders Module Level 3
# propdef-border
Compatibilidad con navegadores
BCD tables only load in the browser
Ver también
Descripción
Como sucede con todas las propiedades abreviadas, cualquier subvalor omitdo será definido a su valor inicial. Cabe destacar que la asignación de un valor personalizado a border-image no puede ser realizada mediante el uso de border, en todo caso éste útltimo lo fijaría a su valor inicial, por ejemplo, a none.
La propiedad abreviada border es especialmente útil cuando deseas que los cuatro bordes sean idénticos. Sin embargo, es posible hacerlos distintos utilzando las propiedades extensas (aquellas individuales que componen a la abreviada) border-width, border-style y border-color puesto que aceptan valores distintos por lado. Alternativamente, puedes modificar un borde a la vez con las propiedades físicas (p. ej. border-top) y lógicas (p. ej. border-block-start) del borde.
Bordes vs. contornos
Los bordes y los contornos son muy parecidos. Sin embargo, los contornos se distinguen de los bordes de la siguiente forma:
• Los contornos nunca toman espacio, ya que se dibujan fuera del contenido de un elemento.
• De conformidad con las especificaciones, si bien los contornos suelen ser rectangulares, no necesitan serlo. | {
"url": "https://developer.mozilla.org/es/docs/Web/CSS/border",
"source_domain": "developer.mozilla.org",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "357064",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7OAEPO77Q7IAZYVT5TPOMNQLYRZ4YF7U",
"WARC-Concurrent-To": "<urn:uuid:a6294af1-9d86-4237-9a6f-36bc7017e3e0>",
"WARC-Date": "2024-09-12T06:14:15Z",
"WARC-IP-Address": "34.111.97.67",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:D65N42M7HZ5X7A2XTA7TGIRRY73KO45N",
"WARC-Record-ID": "<urn:uuid:5a3ed616-f5aa-4657-97c7-5297bdbd8049>",
"WARC-Target-URI": "https://developer.mozilla.org/es/docs/Web/CSS/border",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c1d8f4dd-910a-4e91-aa12-13216e7eb64a>"
},
"warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-65\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
7,
8,
34,
35,
104,
105,
122,
139,
156,
157,
165,
166,
379,
380,
389,
390,
457,
458,
466,
467,
476,
477,
497,
498,
508,
536,
538,
539,
557,
558,
725,
726,
743,
744,
758,
801,
818,
819,
850,
851,
887,
888,
900,
901,
913,
914,
1225,
1226,
1699,
1700,
1721,
1722,
1846,
1847,
1940
],
"line_end_idx": [
7,
8,
34,
35,
104,
105,
122,
139,
156,
157,
165,
166,
379,
380,
389,
390,
457,
458,
466,
467,
476,
477,
497,
498,
508,
536,
538,
539,
557,
558,
725,
726,
743,
744,
758,
801,
818,
819,
850,
851,
887,
888,
900,
901,
913,
914,
1225,
1226,
1699,
1700,
1721,
1722,
1846,
1847,
1940,
2052
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2052,
"ccnet_original_nlines": 55,
"rps_doc_curly_bracket": 0.0009746599826030433,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.08115182816982269,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007853399962186813,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2146596908569336,
"rps_doc_frac_unique_words": 0.5783972144126892,
"rps_doc_mean_word_length": 5.777003288269043,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0.00523559981957078,
"rps_doc_unigram_entropy": 4.8372087478637695,
"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.05307599902153015,
"rps_doc_frac_chars_top_3gram": 0.013268999755382538,
"rps_doc_frac_chars_top_4gram": 0.04101327061653137,
"rps_doc_books_importance": -157.82887268066406,
"rps_doc_books_importance_length_correction": -157.82887268066406,
"rps_doc_openwebtext_importance": -73.20664978027344,
"rps_doc_openwebtext_importance_length_correction": -73.20664978027344,
"rps_doc_wikipedia_importance": -55.2774658203125,
"rps_doc_wikipedia_importance_length_correction": -55.2774658203125
},
"fasttext": {
"dclm": 0.5445395708084106,
"english": 0.00399465998634696,
"fineweb_edu_approx": 1.4013185501098633,
"eai_general_math": 0.00021333000040613115,
"eai_open_web_math": 0.7990591526031494,
"eai_web_code": 0.6241292357444763
}
} | {
"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": "-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": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "4",
"label": "Missing Images or Figures"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
3,467,997,763,961,544,000 | View source | Discuss this page | Page history | Printable version
Toolbox
Main Page
Upload file
What links here
Recent changes
Help
PDF Books
Add page
Show collection (0 pages)
Collections help
Search
ERP/3.0/Developers Guide/Reference/Entity Model/ADRole
This article is protected against manual editing because it is automatically generated from Openbravo meta-data. Learn more about writing and translating such documents.
Back button.png Back to ERP/3.0/Developers_Guide/Reference/Entity_Model#ADRole
ADRole
Define the role and add the client and organizations the role has access to. You can give users access to this role and modify the access of this role to windows, forms, processes and reports as well as tasks.
If the Role User Level is Manual, the as Select Role for with Data Access Restrictions
To the database table (AD_Role) of this entity.
Properties
Note:
Property Column Constraints Type Description
id* AD_Role_ID Mandatory
Max Length: 32
java.lang.String The Role determines security and access a user who has this Role will have in the System.
client AD_Client_ID Mandatory
ADClient A Client is a company or a legal entity. You cannot share data between Clients.
organization AD_Org_ID Mandatory
Organization An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.
active IsActive Mandatory
java.lang.Boolean There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:
(1) The system requires the record for auditing purposes. (2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.
creationDate Created Mandatory
java.util.Date The Created field indicates the date that this record was created.
createdBy CreatedBy Mandatory
ADUser The Created By field indicates the user who created this record.
updated Updated Mandatory
java.util.Date The Updated field indicates the date that this record was updated.
name# Name Mandatory
Max Length: 60
java.lang.String A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.
updatedBy UpdatedBy Mandatory
ADUser The Updated By field indicates the user who updated this record.
description Description Max Length: 255
java.lang.String A description is limited to 255 characters.
userLevel UserLevel Mandatory
Max Length: 60
java.lang.String The User Level field determines if users of this Role will have access to System level data, Organization level data, Client level data or Client and Organization level data.
currency C_Currency_ID Currency Indicates the currency to be used when processing this document.
approvalAmount AmtApproval java.math.BigDecimal The Approval Amount field indicates the amount limit this Role has for approval of documents.
primaryTreeMenu AD_Tree_Menu_ID ADTree Tree Menu
manual IsManual java.lang.Boolean The Manual check box indicates if the process will done manually.
processNow Processing java.lang.Boolean When this field is set as 'Y' a process is being performed on this record.
clientAdmin IS_Client_Admin Mandatory
java.lang.Boolean Defines the role as an administrator of the client it belongs to.
advanced IsAdvanced Mandatory
java.lang.Boolean Automatic (non manual) advanced roles are granted with features checked as advanced.
isrestrictbackend Isrestrictbackend Mandatory
java.lang.Boolean If checked, this role will not have access to the backend (ERP). It will however have access to other applications (such as the WebPOS)
forPortalUsers IsPortal Mandatory
java.lang.Boolean If checked, this role will have a simplified (portal) interface, where it only has available the workspace widgets.
portalAdmin IsPortalAdmin Mandatory
java.lang.Boolean If checked, the Portal Role will have Portal Administrator privileges
isWebServiceEnabled IsWebServiceEnabled Mandatory
java.lang.Boolean If checked, web services will be able to obtain data for users with this role. It applies to both JSON REST and XML REST web services
template IsTemplate Mandatory
java.lang.Boolean Template is checked when the element is used as a template.
recalculatePermissions Recalculatepermissions java.lang.Boolean This process recalculates role permissions, based on the role inheritance defined. Depending on the role type the behavior varies:
- If the role is a template one, the permissions for the role will be recalculated and also propagated to every role which is currently inheriting from this template. - If the role is not marked as template, just the permissions for this role are recalculated. For details - http://wiki.openbravo.com/wiki/Role#Permissions_Inheritance
aDAlertRecipientList ADAlertRecipient
aDFormAccessList ADFormAccess
aDPreferenceVisibleAtRoleList ADPreference
aDProcessAccessList ADProcessAccess
aDRoleInheritanceInheritFromList ADRoleInheritance
aDRoleInheritanceList ADRoleInheritance
aDRoleOrganizationList ADRoleOrganization
aDTableAccessList ADTableAccess
aDUserRolesList ADUserRoles
aDWindowAccessList ADWindowAccess
oBKMOWidgetClassAccessList OBKMO_WidgetClassAccess
oBUIAPPProcessAccessList OBUIAPP_Process_Access
obuiappViewRoleAccessList obuiapp_ViewRoleAccess
Java Entity Class
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2008-2019 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
*/
package org.openbravo.model.ad.access;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.openbravo.base.structure.ActiveEnabled;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.base.structure.OrganizationEnabled;
import org.openbravo.base.structure.Traceable;
import org.openbravo.client.application.ViewRoleAccess;
import org.openbravo.client.myob.WidgetClassAccess;
import org.openbravo.model.ad.alert.AlertRecipient;
import org.openbravo.model.ad.domain.Preference;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.ad.utility.Tree;
import org.openbravo.model.common.currency.Currency;
import org.openbravo.model.common.enterprise.Organization;
/**
* Entity class for entity ADRole (stored in table AD_Role).
*
* NOTE: This class should not be instantiated directly. To instantiate this
* class the {@link org.openbravo.base.provider.OBProvider} should be used.
*/
public class Role extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
private static final long serialVersionUID = 1L;
public static final String TABLE_NAME = "AD_Role";
public static final String ENTITY_NAME = "ADRole";
public static final String PROPERTY_ID = "id";
public static final String PROPERTY_CLIENT = "client";
public static final String PROPERTY_ORGANIZATION = "organization";
public static final String PROPERTY_ACTIVE = "active";
public static final String PROPERTY_CREATIONDATE = "creationDate";
public static final String PROPERTY_CREATEDBY = "createdBy";
public static final String PROPERTY_UPDATED = "updated";
public static final String PROPERTY_NAME = "name";
public static final String PROPERTY_UPDATEDBY = "updatedBy";
public static final String PROPERTY_DESCRIPTION = "description";
public static final String PROPERTY_USERLEVEL = "userLevel";
public static final String PROPERTY_CURRENCY = "currency";
public static final String PROPERTY_APPROVALAMOUNT = "approvalAmount";
public static final String PROPERTY_PRIMARYTREEMENU = "primaryTreeMenu";
public static final String PROPERTY_MANUAL = "manual";
public static final String PROPERTY_PROCESSNOW = "processNow";
public static final String PROPERTY_CLIENTADMIN = "clientAdmin";
public static final String PROPERTY_ADVANCED = "advanced";
public static final String PROPERTY_ISRESTRICTBACKEND = "isrestrictbackend";
public static final String PROPERTY_FORPORTALUSERS = "forPortalUsers";
public static final String PROPERTY_PORTALADMIN = "portalAdmin";
public static final String PROPERTY_ISWEBSERVICEENABLED = "isWebServiceEnabled";
public static final String PROPERTY_TEMPLATE = "template";
public static final String PROPERTY_RECALCULATEPERMISSIONS = "recalculatePermissions";
public static final String PROPERTY_ADALERTRECIPIENTLIST = "aDAlertRecipientList";
public static final String PROPERTY_ADFORMACCESSLIST = "aDFormAccessList";
public static final String PROPERTY_ADPREFERENCEVISIBLEATROLELIST = "aDPreferenceVisibleAtRoleList";
public static final String PROPERTY_ADPROCESSACCESSLIST = "aDProcessAccessList";
public static final String PROPERTY_ADROLEINHERITANCEINHERITFROMLIST = "aDRoleInheritanceInheritFromList";
public static final String PROPERTY_ADROLEINHERITANCELIST = "aDRoleInheritanceList";
public static final String PROPERTY_ADROLEORGANIZATIONLIST = "aDRoleOrganizationList";
public static final String PROPERTY_ADTABLEACCESSLIST = "aDTableAccessList";
public static final String PROPERTY_ADUSERROLESLIST = "aDUserRolesList";
public static final String PROPERTY_ADWINDOWACCESSLIST = "aDWindowAccessList";
public static final String PROPERTY_OBKMOWIDGETCLASSACCESSLIST = "oBKMOWidgetClassAccessList";
public static final String PROPERTY_OBUIAPPPROCESSACCESSLIST = "oBUIAPPProcessAccessList";
public static final String PROPERTY_OBUIAPPVIEWROLEACCESSLIST = "obuiappViewRoleAccessList";
public Role() {
setDefaultValue(PROPERTY_ACTIVE, true);
setDefaultValue(PROPERTY_MANUAL, true);
setDefaultValue(PROPERTY_PROCESSNOW, false);
setDefaultValue(PROPERTY_CLIENTADMIN, false);
setDefaultValue(PROPERTY_ADVANCED, false);
setDefaultValue(PROPERTY_ISRESTRICTBACKEND, false);
setDefaultValue(PROPERTY_FORPORTALUSERS, false);
setDefaultValue(PROPERTY_PORTALADMIN, false);
setDefaultValue(PROPERTY_ISWEBSERVICEENABLED, false);
setDefaultValue(PROPERTY_TEMPLATE, false);
setDefaultValue(PROPERTY_RECALCULATEPERMISSIONS, false);
setDefaultValue(PROPERTY_ADALERTRECIPIENTLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADFORMACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADPREFERENCEVISIBLEATROLELIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADPROCESSACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADROLEINHERITANCEINHERITFROMLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADROLEINHERITANCELIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADROLEORGANIZATIONLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADTABLEACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADUSERROLESLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_ADWINDOWACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_OBKMOWIDGETCLASSACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_OBUIAPPPROCESSACCESSLIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_OBUIAPPVIEWROLEACCESSLIST, new ArrayList<Object>());
}
@Override
public String getEntityName() {
return ENTITY_NAME;
}
public String getId() {
return (String) get(PROPERTY_ID);
}
public void setId(String id) {
set(PROPERTY_ID, id);
}
public Client getClient() {
return (Client) get(PROPERTY_CLIENT);
}
public void setClient(Client client) {
set(PROPERTY_CLIENT, client);
}
public Organization getOrganization() {
return (Organization) get(PROPERTY_ORGANIZATION);
}
public void setOrganization(Organization organization) {
set(PROPERTY_ORGANIZATION, organization);
}
public Boolean isActive() {
return (Boolean) get(PROPERTY_ACTIVE);
}
public void setActive(Boolean active) {
set(PROPERTY_ACTIVE, active);
}
public Date getCreationDate() {
return (Date) get(PROPERTY_CREATIONDATE);
}
public void setCreationDate(Date creationDate) {
set(PROPERTY_CREATIONDATE, creationDate);
}
public User getCreatedBy() {
return (User) get(PROPERTY_CREATEDBY);
}
public void setCreatedBy(User createdBy) {
set(PROPERTY_CREATEDBY, createdBy);
}
public Date getUpdated() {
return (Date) get(PROPERTY_UPDATED);
}
public void setUpdated(Date updated) {
set(PROPERTY_UPDATED, updated);
}
public String getName() {
return (String) get(PROPERTY_NAME);
}
public void setName(String name) {
set(PROPERTY_NAME, name);
}
public User getUpdatedBy() {
return (User) get(PROPERTY_UPDATEDBY);
}
public void setUpdatedBy(User updatedBy) {
set(PROPERTY_UPDATEDBY, updatedBy);
}
public String getDescription() {
return (String) get(PROPERTY_DESCRIPTION);
}
public void setDescription(String description) {
set(PROPERTY_DESCRIPTION, description);
}
public String getUserLevel() {
return (String) get(PROPERTY_USERLEVEL);
}
public void setUserLevel(String userLevel) {
set(PROPERTY_USERLEVEL, userLevel);
}
public Currency getCurrency() {
return (Currency) get(PROPERTY_CURRENCY);
}
public void setCurrency(Currency currency) {
set(PROPERTY_CURRENCY, currency);
}
public BigDecimal getApprovalAmount() {
return (BigDecimal) get(PROPERTY_APPROVALAMOUNT);
}
public void setApprovalAmount(BigDecimal approvalAmount) {
set(PROPERTY_APPROVALAMOUNT, approvalAmount);
}
public Tree getPrimaryTreeMenu() {
return (Tree) get(PROPERTY_PRIMARYTREEMENU);
}
public void setPrimaryTreeMenu(Tree primaryTreeMenu) {
set(PROPERTY_PRIMARYTREEMENU, primaryTreeMenu);
}
public Boolean isManual() {
return (Boolean) get(PROPERTY_MANUAL);
}
public void setManual(Boolean manual) {
set(PROPERTY_MANUAL, manual);
}
public Boolean isProcessNow() {
return (Boolean) get(PROPERTY_PROCESSNOW);
}
public void setProcessNow(Boolean processNow) {
set(PROPERTY_PROCESSNOW, processNow);
}
public Boolean isClientAdmin() {
return (Boolean) get(PROPERTY_CLIENTADMIN);
}
public void setClientAdmin(Boolean clientAdmin) {
set(PROPERTY_CLIENTADMIN, clientAdmin);
}
public Boolean isAdvanced() {
return (Boolean) get(PROPERTY_ADVANCED);
}
public void setAdvanced(Boolean advanced) {
set(PROPERTY_ADVANCED, advanced);
}
public Boolean isRestrictbackend() {
return (Boolean) get(PROPERTY_ISRESTRICTBACKEND);
}
public void setRestrictbackend(Boolean isrestrictbackend) {
set(PROPERTY_ISRESTRICTBACKEND, isrestrictbackend);
}
public Boolean isForPortalUsers() {
return (Boolean) get(PROPERTY_FORPORTALUSERS);
}
public void setForPortalUsers(Boolean forPortalUsers) {
set(PROPERTY_FORPORTALUSERS, forPortalUsers);
}
public Boolean isPortalAdmin() {
return (Boolean) get(PROPERTY_PORTALADMIN);
}
public void setPortalAdmin(Boolean portalAdmin) {
set(PROPERTY_PORTALADMIN, portalAdmin);
}
public Boolean isWebServiceEnabled() {
return (Boolean) get(PROPERTY_ISWEBSERVICEENABLED);
}
public void setWebServiceEnabled(Boolean isWebServiceEnabled) {
set(PROPERTY_ISWEBSERVICEENABLED, isWebServiceEnabled);
}
public Boolean isTemplate() {
return (Boolean) get(PROPERTY_TEMPLATE);
}
public void setTemplate(Boolean template) {
set(PROPERTY_TEMPLATE, template);
}
public Boolean isRecalculatePermissions() {
return (Boolean) get(PROPERTY_RECALCULATEPERMISSIONS);
}
public void setRecalculatePermissions(Boolean recalculatePermissions) {
set(PROPERTY_RECALCULATEPERMISSIONS, recalculatePermissions);
}
@SuppressWarnings("unchecked")
public List<AlertRecipient> getADAlertRecipientList() {
return (List<AlertRecipient>) get(PROPERTY_ADALERTRECIPIENTLIST);
}
public void setADAlertRecipientList(List<AlertRecipient> aDAlertRecipientList) {
set(PROPERTY_ADALERTRECIPIENTLIST, aDAlertRecipientList);
}
@SuppressWarnings("unchecked")
public List<FormAccess> getADFormAccessList() {
return (List<FormAccess>) get(PROPERTY_ADFORMACCESSLIST);
}
public void setADFormAccessList(List<FormAccess> aDFormAccessList) {
set(PROPERTY_ADFORMACCESSLIST, aDFormAccessList);
}
@SuppressWarnings("unchecked")
public List<Preference> getADPreferenceVisibleAtRoleList() {
return (List<Preference>) get(PROPERTY_ADPREFERENCEVISIBLEATROLELIST);
}
public void setADPreferenceVisibleAtRoleList(List<Preference> aDPreferenceVisibleAtRoleList) {
set(PROPERTY_ADPREFERENCEVISIBLEATROLELIST, aDPreferenceVisibleAtRoleList);
}
@SuppressWarnings("unchecked")
public List<ProcessAccess> getADProcessAccessList() {
return (List<ProcessAccess>) get(PROPERTY_ADPROCESSACCESSLIST);
}
public void setADProcessAccessList(List<ProcessAccess> aDProcessAccessList) {
set(PROPERTY_ADPROCESSACCESSLIST, aDProcessAccessList);
}
@SuppressWarnings("unchecked")
public List<RoleInheritance> getADRoleInheritanceInheritFromList() {
return (List<RoleInheritance>) get(PROPERTY_ADROLEINHERITANCEINHERITFROMLIST);
}
public void setADRoleInheritanceInheritFromList(List<RoleInheritance> aDRoleInheritanceInheritFromList) {
set(PROPERTY_ADROLEINHERITANCEINHERITFROMLIST, aDRoleInheritanceInheritFromList);
}
@SuppressWarnings("unchecked")
public List<RoleInheritance> getADRoleInheritanceList() {
return (List<RoleInheritance>) get(PROPERTY_ADROLEINHERITANCELIST);
}
public void setADRoleInheritanceList(List<RoleInheritance> aDRoleInheritanceList) {
set(PROPERTY_ADROLEINHERITANCELIST, aDRoleInheritanceList);
}
@SuppressWarnings("unchecked")
public List<RoleOrganization> getADRoleOrganizationList() {
return (List<RoleOrganization>) get(PROPERTY_ADROLEORGANIZATIONLIST);
}
public void setADRoleOrganizationList(List<RoleOrganization> aDRoleOrganizationList) {
set(PROPERTY_ADROLEORGANIZATIONLIST, aDRoleOrganizationList);
}
@SuppressWarnings("unchecked")
public List<TableAccess> getADTableAccessList() {
return (List<TableAccess>) get(PROPERTY_ADTABLEACCESSLIST);
}
public void setADTableAccessList(List<TableAccess> aDTableAccessList) {
set(PROPERTY_ADTABLEACCESSLIST, aDTableAccessList);
}
@SuppressWarnings("unchecked")
public List<UserRoles> getADUserRolesList() {
return (List<UserRoles>) get(PROPERTY_ADUSERROLESLIST);
}
public void setADUserRolesList(List<UserRoles> aDUserRolesList) {
set(PROPERTY_ADUSERROLESLIST, aDUserRolesList);
}
@SuppressWarnings("unchecked")
public List<WindowAccess> getADWindowAccessList() {
return (List<WindowAccess>) get(PROPERTY_ADWINDOWACCESSLIST);
}
public void setADWindowAccessList(List<WindowAccess> aDWindowAccessList) {
set(PROPERTY_ADWINDOWACCESSLIST, aDWindowAccessList);
}
@SuppressWarnings("unchecked")
public List<WidgetClassAccess> getOBKMOWidgetClassAccessList() {
return (List<WidgetClassAccess>) get(PROPERTY_OBKMOWIDGETCLASSACCESSLIST);
}
public void setOBKMOWidgetClassAccessList(List<WidgetClassAccess> oBKMOWidgetClassAccessList) {
set(PROPERTY_OBKMOWIDGETCLASSACCESSLIST, oBKMOWidgetClassAccessList);
}
@SuppressWarnings("unchecked")
public List<org.openbravo.client.application.ProcessAccess> getOBUIAPPProcessAccessList() {
return (List<org.openbravo.client.application.ProcessAccess>) get(PROPERTY_OBUIAPPPROCESSACCESSLIST);
}
public void setOBUIAPPProcessAccessList(List<org.openbravo.client.application.ProcessAccess> oBUIAPPProcessAccessList) {
set(PROPERTY_OBUIAPPPROCESSACCESSLIST, oBUIAPPProcessAccessList);
}
@SuppressWarnings("unchecked")
public List<ViewRoleAccess> getObuiappViewRoleAccessList() {
return (List<ViewRoleAccess>) get(PROPERTY_OBUIAPPVIEWROLEACCESSLIST);
}
public void setObuiappViewRoleAccessList(List<ViewRoleAccess> obuiappViewRoleAccessList) {
set(PROPERTY_OBUIAPPVIEWROLEACCESSLIST, obuiappViewRoleAccessList);
}
}
Retrieved from "http://wiki.openbravo.com/wiki/ERP/3.0/Developers_Guide/Reference/Entity_Model/ADRole"
This page has been accessed 1,705 times. This page was last modified on 24 June 2019, at 15:58. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License. | {
"url": "http://wiki.openbravo.com/wiki/ERP/3.0/Developers_Guide/Reference/Entity_Model/ADRole",
"source_domain": "wiki.openbravo.com",
"snapshot_id": "crawl=CC-MAIN-2019-39",
"warc_metadata": {
"Content-Length": "105194",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CMZMI6EIXCRXXFNII3KWIZ3R6OEJEWAD",
"WARC-Concurrent-To": "<urn:uuid:30570a9c-fdc4-404d-a080-c2d2b0ff1da6>",
"WARC-Date": "2019-09-20T18:08:59Z",
"WARC-IP-Address": "18.202.162.220",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:37S6V5BSIGMPWWR7ZW6AMXOOP3VSQLMB",
"WARC-Record-ID": "<urn:uuid:7fd149bd-03dc-4d1f-86fb-418a9edda7d5>",
"WARC-Target-URI": "http://wiki.openbravo.com/wiki/ERP/3.0/Developers_Guide/Reference/Entity_Model/ADRole",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c534ecb8-9901-4368-9a10-6c4c86d6b7cf>"
},
"warc_info": "isPartOf: CC-MAIN-2019-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-127.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
70,
78,
88,
100,
116,
131,
136,
137,
147,
156,
182,
199,
200,
207,
208,
263,
264,
434,
515,
516,
517,
524,
525,
735,
822,
823,
871,
872,
883,
884,
890,
891,
936,
961,
976,
1083,
1113,
1202,
1235,
1381,
1407,
1710,
1711,
1992,
1993,
2024,
2106,
2136,
2208,
2234,
2316,
2337,
2352,
2590,
2620,
2692,
2732,
2793,
2823,
2838,
3030,
3127,
3269,
3318,
3418,
3533,
3571,
3655,
3685,
3788,
3834,
3988,
4022,
4156,
4192,
4280,
4330,
4482,
4512,
4590,
4785,
4786,
5121,
5122,
5160,
5190,
5233,
5269,
5320,
5360,
5402,
5434,
5462,
5496,
5547,
5595,
5644,
5645,
5646,
5664,
5665,
5667,
5669,
5673,
5749,
5825,
5901,
5977,
6053,
6116,
6192,
6268,
6344,
6367,
6407,
6471,
6530,
6555,
6616,
6691,
6695,
6735,
6737,
6767,
6796,
6820,
6844,
6846,
6898,
6949,
7001,
7059,
7107,
7164,
7217,
7270,
7320,
7366,
7411,
7465,
7525,
7530,
7592,
7596,
7674,
7751,
7756,
7870,
7924,
7980,
8036,
8088,
8148,
8220,
8280,
8352,
8418,
8480,
8536,
8602,
8672,
8738,
8802,
8878,
8956,
9016,
9084,
9154,
9218,
9300,
9376,
9446,
9532,
9596,
9688,
9776,
9856,
9962,
10048,
10160,
10250,
10342,
10424,
10502,
10586,
10686,
10782,
10880,
10882,
10903,
10952,
11001,
11055,
11110,
11162,
11223,
11281,
11336,
11399,
11451,
11517,
11599,
11677,
11768,
11849,
11943,
12026,
12110,
12189,
12266,
12346,
12434,
12520,
12607,
12614,
12616,
12631,
12668,
12697,
12704,
12706,
12735,
12778,
12785,
12787,
12823,
12854,
12861,
12863,
12896,
12943,
12950,
12952,
12996,
13035,
13042,
13044,
13089,
13148,
13155,
13157,
13219,
13270,
13277,
13279,
13312,
13360,
13367,
13369,
13414,
13453,
13460,
13462,
13499,
13550,
13557,
13559,
13613,
13664,
13671,
13673,
13707,
13755,
13762,
13764,
13812,
13857,
13864,
13866,
13898,
13944,
13951,
13953,
13997,
14038,
14045,
14047,
14078,
14123,
14130,
14132,
14172,
14207,
14214,
14216,
14250,
14298,
14305,
14307,
14355,
14400,
14407,
14409,
14447,
14499,
14506,
14508,
14562,
14611,
14618,
14620,
14656,
14706,
14713,
14715,
14765,
14810,
14817,
14819,
14856,
14907,
14914,
14916,
14966,
15009,
15016,
15018,
15063,
15122,
15129,
15131,
15195,
15250,
15257,
15259,
15299,
15353,
15360,
15362,
15422,
15479,
15486,
15488,
15521,
15569,
15576,
15578,
15623,
15662,
15669,
15671,
15708,
15760,
15767,
15769,
15822,
15869,
15876,
15878,
15916,
15969,
15976,
15978,
16033,
16082,
16089,
16091,
16126,
16176,
16183,
16185,
16234,
16277,
16284,
16286,
16328,
16387,
16394,
16396,
16461,
16522,
16529,
16531,
16572,
16628,
16635,
16637,
16698,
16753,
16760,
16762,
16800,
16853,
16860,
16862,
16917,
16966,
16973,
16975,
17019,
17080,
17087,
17089,
17158,
17223,
17230,
17232,
17267,
17317,
17324,
17326,
17375,
17418,
17425,
17427,
17476,
17540,
17547,
17549,
17626,
17697,
17704,
17706,
17742,
17803,
17876,
17883,
17885,
17971,
18038,
18045,
18047,
18083,
18136,
18201,
18208,
18210,
18284,
18343,
18350,
18352,
18388,
18454,
18532,
18539,
18541,
18641,
18726,
18733,
18735,
18771,
18830,
18901,
18908,
18910,
18993,
19058,
19065,
19067,
19103,
19177,
19263,
19270,
19272,
19383,
19474,
19481,
19483,
19519,
19582,
19657,
19664,
19666,
19755,
19824,
19831,
19833,
19869,
19934,
20011,
20018,
20020,
20112,
20183,
20190,
20192,
20228,
20283,
20350,
20357,
20359,
20436,
20497,
20504,
20506,
20542,
20593,
20656,
20663,
20665,
20736,
20793,
20800,
20802,
20838,
20895,
20964,
20971,
20973,
21053,
21116,
21123,
21125,
21161,
21231,
21313,
21320,
21322,
21423,
21502,
21509,
21511,
21547,
21644,
21753,
21760,
21762,
21888,
21963,
21970,
21972,
22008,
22074,
22152,
22159,
22161,
22257,
22334,
22341,
22343,
22346,
22347,
22450,
22451
],
"line_end_idx": [
70,
78,
88,
100,
116,
131,
136,
137,
147,
156,
182,
199,
200,
207,
208,
263,
264,
434,
515,
516,
517,
524,
525,
735,
822,
823,
871,
872,
883,
884,
890,
891,
936,
961,
976,
1083,
1113,
1202,
1235,
1381,
1407,
1710,
1711,
1992,
1993,
2024,
2106,
2136,
2208,
2234,
2316,
2337,
2352,
2590,
2620,
2692,
2732,
2793,
2823,
2838,
3030,
3127,
3269,
3318,
3418,
3533,
3571,
3655,
3685,
3788,
3834,
3988,
4022,
4156,
4192,
4280,
4330,
4482,
4512,
4590,
4785,
4786,
5121,
5122,
5160,
5190,
5233,
5269,
5320,
5360,
5402,
5434,
5462,
5496,
5547,
5595,
5644,
5645,
5646,
5664,
5665,
5667,
5669,
5673,
5749,
5825,
5901,
5977,
6053,
6116,
6192,
6268,
6344,
6367,
6407,
6471,
6530,
6555,
6616,
6691,
6695,
6735,
6737,
6767,
6796,
6820,
6844,
6846,
6898,
6949,
7001,
7059,
7107,
7164,
7217,
7270,
7320,
7366,
7411,
7465,
7525,
7530,
7592,
7596,
7674,
7751,
7756,
7870,
7924,
7980,
8036,
8088,
8148,
8220,
8280,
8352,
8418,
8480,
8536,
8602,
8672,
8738,
8802,
8878,
8956,
9016,
9084,
9154,
9218,
9300,
9376,
9446,
9532,
9596,
9688,
9776,
9856,
9962,
10048,
10160,
10250,
10342,
10424,
10502,
10586,
10686,
10782,
10880,
10882,
10903,
10952,
11001,
11055,
11110,
11162,
11223,
11281,
11336,
11399,
11451,
11517,
11599,
11677,
11768,
11849,
11943,
12026,
12110,
12189,
12266,
12346,
12434,
12520,
12607,
12614,
12616,
12631,
12668,
12697,
12704,
12706,
12735,
12778,
12785,
12787,
12823,
12854,
12861,
12863,
12896,
12943,
12950,
12952,
12996,
13035,
13042,
13044,
13089,
13148,
13155,
13157,
13219,
13270,
13277,
13279,
13312,
13360,
13367,
13369,
13414,
13453,
13460,
13462,
13499,
13550,
13557,
13559,
13613,
13664,
13671,
13673,
13707,
13755,
13762,
13764,
13812,
13857,
13864,
13866,
13898,
13944,
13951,
13953,
13997,
14038,
14045,
14047,
14078,
14123,
14130,
14132,
14172,
14207,
14214,
14216,
14250,
14298,
14305,
14307,
14355,
14400,
14407,
14409,
14447,
14499,
14506,
14508,
14562,
14611,
14618,
14620,
14656,
14706,
14713,
14715,
14765,
14810,
14817,
14819,
14856,
14907,
14914,
14916,
14966,
15009,
15016,
15018,
15063,
15122,
15129,
15131,
15195,
15250,
15257,
15259,
15299,
15353,
15360,
15362,
15422,
15479,
15486,
15488,
15521,
15569,
15576,
15578,
15623,
15662,
15669,
15671,
15708,
15760,
15767,
15769,
15822,
15869,
15876,
15878,
15916,
15969,
15976,
15978,
16033,
16082,
16089,
16091,
16126,
16176,
16183,
16185,
16234,
16277,
16284,
16286,
16328,
16387,
16394,
16396,
16461,
16522,
16529,
16531,
16572,
16628,
16635,
16637,
16698,
16753,
16760,
16762,
16800,
16853,
16860,
16862,
16917,
16966,
16973,
16975,
17019,
17080,
17087,
17089,
17158,
17223,
17230,
17232,
17267,
17317,
17324,
17326,
17375,
17418,
17425,
17427,
17476,
17540,
17547,
17549,
17626,
17697,
17704,
17706,
17742,
17803,
17876,
17883,
17885,
17971,
18038,
18045,
18047,
18083,
18136,
18201,
18208,
18210,
18284,
18343,
18350,
18352,
18388,
18454,
18532,
18539,
18541,
18641,
18726,
18733,
18735,
18771,
18830,
18901,
18908,
18910,
18993,
19058,
19065,
19067,
19103,
19177,
19263,
19270,
19272,
19383,
19474,
19481,
19483,
19519,
19582,
19657,
19664,
19666,
19755,
19824,
19831,
19833,
19869,
19934,
20011,
20018,
20020,
20112,
20183,
20190,
20192,
20228,
20283,
20350,
20357,
20359,
20436,
20497,
20504,
20506,
20542,
20593,
20656,
20663,
20665,
20736,
20793,
20800,
20802,
20838,
20895,
20964,
20971,
20973,
21053,
21116,
21123,
21125,
21161,
21231,
21313,
21320,
21322,
21423,
21502,
21509,
21511,
21547,
21644,
21753,
21760,
21762,
21888,
21963,
21970,
21972,
22008,
22074,
22152,
22159,
22161,
22257,
22334,
22341,
22343,
22346,
22347,
22450,
22451,
22632
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 22632,
"ccnet_original_nlines": 534,
"rps_doc_curly_bracket": 0.0068928999826312065,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.12029162049293518,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.050425268709659576,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3663426637649536,
"rps_doc_frac_unique_words": 0.37026405334472656,
"rps_doc_mean_word_length": 9.58553409576416,
"rps_doc_num_sentences": 187,
"rps_doc_symbol_to_word_ratio": 0.0009113000123761594,
"rps_doc_unigram_entropy": 5.577147960662842,
"rps_doc_word_count": 1742,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.023715419694781303,
"rps_doc_frac_chars_dupe_6grams": 0.013055459596216679,
"rps_doc_frac_chars_dupe_7grams": 0.009941309690475464,
"rps_doc_frac_chars_dupe_8grams": 0.0045514400117099285,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.026350459083914757,
"rps_doc_frac_chars_top_3gram": 0.03970535099506378,
"rps_doc_frac_chars_top_4gram": 0.05371901020407677,
"rps_doc_books_importance": -1676.8076171875,
"rps_doc_books_importance_length_correction": -1676.8076171875,
"rps_doc_openwebtext_importance": -757.8018188476562,
"rps_doc_openwebtext_importance_length_correction": -757.8018188476562,
"rps_doc_wikipedia_importance": -443.2461242675781,
"rps_doc_wikipedia_importance_length_correction": -443.2461242675781
},
"fasttext": {
"dclm": 0.5368562340736389,
"english": 0.5018724203109741,
"fineweb_edu_approx": 2.2751574516296387,
"eai_general_math": 0.05184727907180786,
"eai_open_web_math": 0.023981690406799316,
"eai_web_code": 0.6291407346725464
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "658.4018",
"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": "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": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,034,342,674,365,806,000 | Может ли разумный человек,
учитывая опыт прошедших веков,
питать хоть малейшую надежду на светлое будущее человечества? Может, если свяжется с мной!
10001
2009 27 января
Вложения в форме обратной связи стандартного com_contact (!J1.0.хх !J1.5)
Тривиальная задача - в стандартной форме обратной связи сделать возможность прикрепления файлов к письму. Для этого будем использовать стандартную функцию mosMail, у которой, среди прочих, есть параметр $attachment, поскольку вся функция mosmail завязана на phpmailer. Итак по порядку.
Добавляем в components\com_contact\contact.html.php в форму обратной связи кнопку выбора файла
1
<input name="file" type="file" id="file">
Файл components\com_contact\contact.php в функции function sendmail() делаем что-то вроде
1
23
45
67
89
10
//USE STANDART ATTACHMENT FUNCTION
$tempdir = $mosConfig_absolute_path."/images/";$namefile = $_FILES['file']['name'];
$filetemp = $tempdir.$namefile;move_uploaded_file($_FILES['file']['tmp_name'], $tempdir.$namefile);
$attachment = $tempdir.$namefile;$success = mosMail( $email, $name, $contact[0]->email_to, $mosConfig_fromname .': '. $subject, $text, $mode=0, $cc=NULL, $bcc=NULL, $attachment);
if (!$success) { mosErrorAlert( _CONTACT_FORM_NC );
}
Аспекты с загрузкой файла на сервер, проверки типа и формата и прочее - не затрагиваю, ибо пишем по необходимости в каждом конкретном случае. То есть что самое главное - задать значением переменной $attachment как путь к файлу на сервере. В приведенном примере - это файл, загруженный из формы обратной связи. Для Joomla 1.5 класса JMail все в принципе аналогично, почитать можно здесь E-Mail Class. Provides a common interface to send e-mail from the Joomla! Framework Чуть более подробно по 1.5: 1 - В саму форму не забываем добавить enctype="multipart/form-data" 2 - не забываем про абсолютные пути к папке для временного файла
1
$tempdir = JPATH_ROOT."/images/";
3 - собственно функция вложения теперь упрощена, после того как мы получили файл в переменную
1
2
$attachment достаточно написать
$mail->addAttachment( $attachment );
перед
1
$sent = $mail->Send();
и все, получили почтовое письмо с вложением
883
2009 19 января
Show\hide в формах (checkbox && Jquery)
Show hide в формах checkbox JqueryБанальнейшая вещь в своей приятности - по клику на элемент показать\скрыть содержимое определенного блока. Понадобилось мне сделать такую полезность для большой формы - при отмеченном checkbox дать пользователю возможность выбора определенных параметров. Собственно решение ниже. Понадобится дополнительное включение jquery, весь же остальной код приведен ниже.
1
23
45
67
89
1011
1213
1415
16
$(document).ready(function(){
//по умолчанию скрываем DIV $("#tblview").css("display","none");
// добавляем onclick на checkbox w/id param $("#param").click(function(){
// If checked if ($("#param").is(":checked"))
{ //показываем скрытый слой
$("#tblview").show("fast"); } else {
//скрываем его $("#tblview").hide("fast");
} });
});
1
23
4
<form>
<input id="param" type="checkbox" /><label for="param">показать скрытый элемент:</label></form>
<div id="tblview">Скрытое содержимое блока</div>
Пример работы
560
2008 20 декабря
Мамбот внутренней навигации (Content Item Navigation)
Мамбот внутренней навигации pb_nearest_article
Представляю вашему вниманию маленький, но полезный мамбот pb_nearest_article, заменяющий кнопки "назад - вперед" на сочетание "название предыдущей статьи - название следующей статьи". Мамбот полезен в сфере SEO так и для удобства ориентации посетителей сайта.
Последовательность действий:
- установить и опубликовать мамбот
- в глобальной конфигурации в вкладке CONTENT установить опцию "Content Item Navigation:" в NO
479
2008 19 ноября
Overlib в Joomla 1.0.x
Palych (зараза такая) спросил, а я и не знал. Потому нашли и фиксируем - кастомизация внешнего вида стандартных тултипов в Joomla 1.0.хх
Собственно на событие
1
onmouseover="return overlib('.$overlibmetadescimg.', BELOW, RIGHT);" onmouseout="return nd();"
Отрабатывает скрипт includes\js\overlib_mini.js
Что нужно сделать, чтобы изменить оформление (цвета, шрифты etc):
1 - внести изменения в сам файл, переменные типа ol_fgcolor. Код не структурирован, разобраться - ногу сломать
2 - Command Reference от автора скрипта.
P.S. конечно, есть и лучшие скрипты оверлибов, но раз уж нам дан стандартный - пользуем его.
Метки:
552
2008 19 ноября
Highslide and Mosets Tree
В связи с новым проектом на Joomla 1.5 будем накапливать опыт хаков мосетса, дабы не было ничего забытого. Итак задача - в описании итема сделать сразу вывод всех картинок превьюшек и добавить на onclick js эффект. Изначально имеем уже установленный и настроенный Protos LightBox 1.1 Highslide for Joomla 1.5
Файл components\com_mtree\templates\используемый шаблон\sub_listingDetails.tpl.php Находим строки
1
23
45
67
89
10
if ($this->link->link_image) {
echo '<div class="thumbnail' . (($this->config->getTemParam('imageDirectionListingSummary','right')=='right') ? '':'-left') . '">'; echo '<a href="' . sefReltoAbs('index.php?option=com_mtree&task=viewimage&img_id=' . $this->link->img_id . '&Itemid=' . $this->Itemid) . '">';
$this->plugin( 'mt_image', $this->link->link_image, '3', $this->link->link_name ); echo '</a>';
if( $this->total_images > 1 ) { echo '<div style="width:' . ($this->config->get('resize_listing_size') + 10) . 'px"><a href="' . sefReltoAbs('index.php?option=com_mtree&task=viewgallery&link_id=' . $this->link->link_id . '&Itemid=' . $this->Itemid) . '">' . $this->_MT_LANG->VIEW_GALLERY . '</a></div>';
} echo '</div>';
}
на
1
23
45
foreach ($this->images as $image) {
echo '<a id="thumb1" class="highslide" onclick="return hs.expand(this)" href="components/com_mtree/img/listings/o/' . $image->filename . '">'; $this->plugin( 'mt_image', $image->filename, '3', $this->link->link_name . ' - ' . $image->filename);
echo '</a>';}
443
2008 04 ноября
Плагин Author Details for CB 1.2 && Joomla 1.5
Написан простенький плагин Author Details for CB v 1.0.
Тестировался на Community Builder 1.2 RC 3
В чем суть - в режим подробного просмотра (когда $view == 'article') после текста материала добавляются нужные поля профиля пользователя из CB.
871
2008 29 октября
Показ чего-либо от времени суток
Часто требуется напрямую в index.php шаблона или в другом месте сделать показ (к примеру) картинки в шапке либо вообще загрузку другого CSS файла в зависимости от времени суток. Потому публикую практически идентичные варианты, предложенные на форуме. Вариант от raduga
1
<img src="/images/<?php echo (date("%H")>=7 && date("%H")<18)? "dnevnaya" : "nochnaya" ?>.jpg">
Мой, чуть более упрощенный для восприятия вариант
1
23
45
if (date("%H") >= '7' && date("%H") < '18') {
echo '<img src="/images/dnevnaya.jpg">';} else {
echo '<img src="/images/nocnaya.jpg">';}
Так, для памяти :) (тема на форуме)
536
2008 29 октября
Склонения в датах (joomla 1.0.хх)
Вопрос поднял VETERINAR, поделился реализацией столь банальной вещи, как для даты создания материала склонять "Февраля" вместо "Февраль" В языковом файле находим строку DEFINE('_DATE_FORMAT_LC' и перед ней добавляем такой вот массив:
1
23
45
67
89
1011
1213
14
$mon_date=array('01'=>"января",
'02'=>"февраля", '03'=>"марта",
'04'=>"апреля", '05'=>"мая",
'06'=>"июня", '07'=>"июля",
'08'=>"августа", '09'=>"сентября",
'10'=>"октября", '11'=>"ноября",
'12'=>"декабря",);$mon=date("m");
$m=$mon_date["$mon"];
И для самой константы вывода даты пишем так:
1
DEFINE('_DATE_FORMAT_LC',"%A, %d ".$m." %Y"); //Используйте PHP strftime формат
1558
2008 28 октября
Модуль карусель товаров для Virtuemart (jquery)
jquery carusel По просьбе Sulpher написан модуль вывода товаров текущей категории для Virtuemart с эффектом прокрутки в виде карусели (jcarousellite - Joomla 1.0.хх). Возможности:
• Показывать модуль в режиме просмотра категории и при просмотре товара (последнее отключается)
• Картинка товара служит ссылкой на его описание (для каждого товара картинка должна быть указана, вариант с отсутствием изображения товара не рассматривался и в разработку не включался)
• Количество выбираемых изображений категории (по умолчанию 0 - все товары текущей категории)
• Возможность автопрокрутки изображений в карусели
• Указание шага прокрутки и скорости в секундах для автопрокрутки
• Возможность отключения загрузки скрипта Jquery, если уже используется на сайте
• По умолчанию стили модуля рассчитаны на 4 изображения, шириной 150px и высотой 114px
Обновления:
• Модуль обновлен до версии 1.0.1 - исправлена ошибка конфликтов Jquery модуля и Mootools функции добавления товара в корзину
Демо здесь - ссылко Качать здесь P.S. 18 января добавлены модификации модуля: - возможность цикличной прокрутки картинок - подгрузка содержимого на ajax, что не вызывает зависания страницы при первом запуске. Данные модификации не вошли в официальный релиз, опубликованный на форуме. Лиц заинтересованных прошу в комменты
571
2008 21 октября
Protos LightBox 1.1 Highslide for Joomla 1.5
По необходимости нашел данный плагин для линейки 1.5 и для удобства сообщества выкладываю чуть подправленную версию Автор Ivo Apostolov Лицензия Non-Commercial
Что сделано:
• Переведен на русский язык (у кого совсем уж туго с иностранным), файлы сохранены в UTF-8
• Исправлена ошибка в файле стилей в пути к иконке zoomin.cur
• Добавил 5 стилей стандартного Highslide в плагин
Установка и использование: 1 - установить плагины protos.lightbox и protos.lightbox.js, опубликовать оба. 2 - в настройках плагина Protos Lightbox выставить ширину\высоту превьюшек, указать папку (от images/stories), если пусто - при использовании плагина указывать картинки из корня images/stories. 3 - в режиме редактирования материала вписать теги: [code]{limage}test.jpg{/limage}[/code] либо если не указана папка в настройках плагина [code]{limage}test/test.jpg{/limage}[/code] 4 - при необходимости изменить стиль рамки всплывающего окна - внести изменения в файл plugins\system\protos.lightbox.js.php, параметр hs.outlineType. Доступные стили - beveled, drop-shadow, glossy-dark, outer-glow, rounded-black, rounded-white Вот и всё, по всем вопросам работы плагина - обращайтесь к автору. P.S. меня смутил только один момент - невозможность задать ALT для изображения (в качестве временного решения задал путь до изображения, можно исправить в plugins\content\protos.lightbox.php, строка 61 с формированием $limage), но не смертельно для меня. Найдутся желающие пофиксить - буду радый protos.lightbox.zip protos.lightbox.js.zip
440
2008 21 октября
Приятные JS скрипты
javascript Дабы сильно не дублироваться, но и не потерять полезные скрипты - ссылко на разные приятные скрипты в специализированном разделе joomlaforum.ru
2612
2008 21 октября
Новое поле в форме регистрации (joomla1.5)
Встал вопрос добавить дополнительное поле в форму регистрации пользователей стандартными средствами, приготовился к глубокому копанию в коде движка (помятуя аналогичный хак для 1.0.хх), но с удивлением для себя обнаружил безумную простоту действия. Потому по порядку. Добавлять мы будем поле city (текстового типа)
1201
2008 21 октября
WordPress или первая нетрезвая заметка
Волею судеб оказавшить на несколько дней не у дел и в лежачем положении подумалось реализовать старую мысль, до которой ноги никак не доносили мозги, а именно нормальный человеческий блог, вместо жутких поделок а-ля ЖЖ Остановился, естественно, на WordPress (далее ВП).
456
2007 10 июня
Бот или админ - вот в чем вопрос...
Старый боян из жизни. Немного юмора от коллеги из переписки. ОНА - представитель поддержки софтины ОН - админ конторы, использующей софтину Далее без комментариев... | {
"url": "http://blog.pbelkov.net/?start=80",
"source_domain": "blog.pbelkov.net",
"snapshot_id": "crawl=CC-MAIN-2019-09",
"warc_metadata": {
"Content-Length": "95967",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KRT2625T57LDEL5MTCQ275YKC7PYILPZ",
"WARC-Concurrent-To": "<urn:uuid:10f39d9a-4243-43b8-9d0b-5cf91a01b207>",
"WARC-Date": "2019-02-19T01:53:28Z",
"WARC-IP-Address": "87.236.19.60",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:VJOCFDHG2NTDAOAR3S5QMBH7R3BLYYXP",
"WARC-Record-ID": "<urn:uuid:5a49b981-e248-42ac-85ef-e742d239450d>",
"WARC-Target-URI": "http://blog.pbelkov.net/?start=80",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:be1c798f-c4e4-49b4-94d6-ddbdfdf0d991>"
},
"warc_info": "isPartOf: CC-MAIN-2019-09\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-101-220-24.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,
27,
58,
149,
150,
156,
171,
172,
246,
247,
533,
628,
630,
672,
762,
764,
767,
770,
773,
776,
779,
814,
898,
998,
1177,
1229,
1231,
1862,
1864,
1898,
1992,
1994,
1996,
2029,
2066,
2072,
2074,
2097,
2141,
2145,
2160,
2161,
2201,
2202,
2599,
2601,
2604,
2607,
2610,
2613,
2618,
2623,
2628,
2631,
2661,
2741,
2830,
2907,
2974,
3050,
3140,
3169,
3173,
3175,
3178,
3180,
3187,
3283,
3332,
3346,
3350,
3366,
3367,
3421,
3422,
3469,
3470,
3730,
3731,
3760,
3761,
3796,
3891,
3892,
3896,
3911,
3912,
3935,
3936,
4073,
4074,
4096,
4098,
4193,
4241,
4307,
4418,
4459,
4552,
4559,
4563,
4578,
4579,
4605,
4606,
4915,
5013,
5015,
5018,
5021,
5024,
5027,
5030,
5061,
5351,
5462,
5789,
5821,
5823,
5826,
5828,
5831,
5834,
5870,
6138,
6160,
6164,
6179,
6180,
6227,
6228,
6284,
6285,
6328,
6472,
6473,
6477,
6493,
6494,
6527,
6528,
6797,
6799,
6896,
6946,
6948,
6951,
6954,
7000,
7049,
7090,
7126,
7130,
7146,
7147,
7181,
7182,
7416,
7418,
7421,
7424,
7427,
7430,
7435,
7440,
7443,
7475,
7554,
7630,
7705,
7787,
7867,
7925,
7947,
7992,
7994,
8074,
8079,
8095,
8096,
8144,
8145,
8325,
8423,
8612,
8708,
8761,
8829,
8912,
9001,
9013,
9141,
9463,
9467,
9483,
9484,
9529,
9530,
9690,
9703,
9796,
9860,
9913,
11047,
11051,
11067,
11068,
11088,
11089,
11244,
11249,
11265,
11266,
11309,
11310,
11625,
11626,
11631,
11647,
11648,
11687,
11688,
11958,
11959,
11963,
11976,
11977,
12013,
12014
],
"line_end_idx": [
27,
58,
149,
150,
156,
171,
172,
246,
247,
533,
628,
630,
672,
762,
764,
767,
770,
773,
776,
779,
814,
898,
998,
1177,
1229,
1231,
1862,
1864,
1898,
1992,
1994,
1996,
2029,
2066,
2072,
2074,
2097,
2141,
2145,
2160,
2161,
2201,
2202,
2599,
2601,
2604,
2607,
2610,
2613,
2618,
2623,
2628,
2631,
2661,
2741,
2830,
2907,
2974,
3050,
3140,
3169,
3173,
3175,
3178,
3180,
3187,
3283,
3332,
3346,
3350,
3366,
3367,
3421,
3422,
3469,
3470,
3730,
3731,
3760,
3761,
3796,
3891,
3892,
3896,
3911,
3912,
3935,
3936,
4073,
4074,
4096,
4098,
4193,
4241,
4307,
4418,
4459,
4552,
4559,
4563,
4578,
4579,
4605,
4606,
4915,
5013,
5015,
5018,
5021,
5024,
5027,
5030,
5061,
5351,
5462,
5789,
5821,
5823,
5826,
5828,
5831,
5834,
5870,
6138,
6160,
6164,
6179,
6180,
6227,
6228,
6284,
6285,
6328,
6472,
6473,
6477,
6493,
6494,
6527,
6528,
6797,
6799,
6896,
6946,
6948,
6951,
6954,
7000,
7049,
7090,
7126,
7130,
7146,
7147,
7181,
7182,
7416,
7418,
7421,
7424,
7427,
7430,
7435,
7440,
7443,
7475,
7554,
7630,
7705,
7787,
7867,
7925,
7947,
7992,
7994,
8074,
8079,
8095,
8096,
8144,
8145,
8325,
8423,
8612,
8708,
8761,
8829,
8912,
9001,
9013,
9141,
9463,
9467,
9483,
9484,
9529,
9530,
9690,
9703,
9796,
9860,
9913,
11047,
11051,
11067,
11068,
11088,
11089,
11244,
11249,
11265,
11266,
11309,
11310,
11625,
11626,
11631,
11647,
11648,
11687,
11688,
11958,
11959,
11963,
11976,
11977,
12013,
12014,
12179
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 12179,
"ccnet_original_nlines": 228,
"rps_doc_curly_bracket": 0.002299040090292692,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.025369979441165924,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024101480841636658,
"rps_doc_frac_lines_end_with_ellipsis": 0.008733619935810566,
"rps_doc_frac_no_alph_words": 0.7945031523704529,
"rps_doc_frac_unique_words": 0.6041369438171387,
"rps_doc_mean_word_length": 6.402282238006592,
"rps_doc_num_sentences": 148,
"rps_doc_symbol_to_word_ratio": 0.0029598299879580736,
"rps_doc_unigram_entropy": 6.341610431671143,
"rps_doc_word_count": 1402,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.019607840105891228,
"rps_doc_frac_chars_dupe_6grams": 0.014260250143706799,
"rps_doc_frac_chars_dupe_7grams": 0.011809269897639751,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.0023395700845867395,
"rps_doc_frac_chars_top_3gram": 0.003342249896377325,
"rps_doc_frac_chars_top_4gram": 0.003119430039077997,
"rps_doc_books_importance": -1076.3233642578125,
"rps_doc_books_importance_length_correction": -1076.3233642578125,
"rps_doc_openwebtext_importance": -618.1282958984375,
"rps_doc_openwebtext_importance_length_correction": -618.1282958984375,
"rps_doc_wikipedia_importance": -464.654052734375,
"rps_doc_wikipedia_importance_length_correction": -464.654052734375
},
"fasttext": {
"dclm": 0.04418313875794411,
"english": 0.0003297099901828915,
"fineweb_edu_approx": 2.3313629627227783,
"eai_general_math": -0.000009890000001178123,
"eai_open_web_math": 0.41684895753860474,
"eai_web_code": 0.9999998807907104
}
} | {
"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": "2",
"label": "Click Here References"
}
},
"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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,670,009,028,585,872,000 |
Eclipse Community Forums
Forum Search:
Search Help Register Login Home
Home » Eclipse Projects » EGL Development Tools » How do you convert a string to a date?
How do you convert a string to a date? [message #1015118] Wed, 27 February 2013 14:08 Go to next message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Is there a built in function to convert a string to a date?
I have an input field for a date value, which is entered in DD/MM/YYYY format. I would like to convert this to a date variable.
I tried the following but this appears to assume my date format is MM/DD/YYYY and I can't work out if there's a method of defining the date format that should be used.
d date = "25/12/2012";
I could create a function to do this but wondered if there was a function already built in to EDT. I couldn't find anything in the documentation.
Richard
Re: How do you convert a string to a date? [message #1015137 is a reply to message #1015118] Wed, 27 February 2013 14:49 Go to previous messageGo to next message
Matt Heitz is currently offline Matt Heitz
Messages: 36
Registered: July 2009
Member
Hi Richard,
Here's the comment on the operator that converts strings to dates. It explains what happens when you assign a string to a date.
/**
* {@Operation narrow} Converts a string to a date. The string is parsed
* by searching for the month, then the day, then the year. One or two digits
* can be specified for the month and day. The year requires a minimum of one
* digit and a maximum of at least four digits (in other words, some implementations
* can support years beyond 9999). One separator character is required between
* the month and day, and another between the day and year. The separator
* character can be anything, even a digit (though that's probably a bad idea)
* and the two separator characters don't have to be identical.
*
* @throws TypeCastException if the string can't be parsed into a date.
*/
This operator is the function EDate.asDate(). I believe you can see the source if you type EDate in the editor, select it, and press F3. The same goes for the rest of our data types. They're all defined in .egl files and you can see their source so you know what all the functions do. The comments are written in a style similar to Javadoc so that we might make a tool to produce API docs from the source code.
We don't have a built-in function that does the conversion using a date format that you specify. We do have the reverse: StringLib.format(date, formatStr). Maybe we should add StringLib.parse(dateStr, formatStr).
-Matt
Re: How do you convert a string to a date? [message #1015245 is a reply to message #1015137] Wed, 27 February 2013 21:13 Go to previous messageGo to next message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Matt,
Yes, I'd seen the comments in the source but at the back of my mind I was sure I'd seen a function to perform date conversion, possibly in one of the supplied libraries, though this may have been in EGLCE or RBD.
Thanks for the confirmation, I'll write a function to perform the conversion.
Richard
Re: How do you convert a string to a date? [message #1015264 is a reply to message #1015245] Wed, 27 February 2013 22:52 Go to previous message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Just in case anyone might find it useful, I've attached a project with a DateHelperLib library part (built with EDT 0.8.2). This includes a format() function that takes a date string and optional date format string and returns a date variable.
The only format string that it deals with (at the moment) is "dd/MM/yyyy", which is also the default, if the format string is not passed. I love overloaded functions.
There's a sample RUI handler that demonstrates the function.
Richard
Previous Topic:EGL Program: parameters to main function
Next Topic:What's next???
Goto Forum:
Current Time: Tue Sep 16 19:46:38 GMT 2014
Powered by FUDForum. Page generated in 0.02661 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software | {
"url": "http://www.eclipse.org/forums/index.php/t/457535/",
"source_domain": "www.eclipse.org",
"snapshot_id": "crawl=CC-MAIN-2014-41",
"warc_metadata": {
"Content-Length": "43828",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:T4DHWGG645DVNVKNNS6MFRMBQVVRQ75C",
"WARC-Concurrent-To": "<urn:uuid:c5a67489-bfae-4443-bf86-7453f852589d>",
"WARC-Date": "2014-09-16T19:46:38Z",
"WARC-IP-Address": "198.41.30.198",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:U2DKO7GVNVVYKULZM6ATMMJPOTCOJT34",
"WARC-Record-ID": "<urn:uuid:63a10a32-16a7-41ab-9976-20daa5e813e6>",
"WARC-Target-URI": "http://www.eclipse.org/forums/index.php/t/457535/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5cf425b3-f0e5-4083-a677-8509b2fcb7c2>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-196-40-205.us-west-1.compute.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-41\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for September 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,
1,
2,
27,
41,
42,
88,
177,
282,
335,
348,
372,
392,
399,
459,
460,
588,
589,
757,
780,
781,
782,
928,
929,
937,
1099,
1142,
1155,
1177,
1184,
1196,
1197,
1325,
1326,
1330,
1404,
1483,
1562,
1647,
1727,
1803,
1882,
1948,
1951,
2023,
2027,
2028,
2029,
2440,
2441,
2654,
2655,
2661,
2823,
2876,
2889,
2913,
2933,
2940,
2946,
2947,
3160,
3161,
3239,
3240,
3248,
3392,
3445,
3458,
3482,
3502,
3509,
3753,
3754,
3921,
3922,
3983,
3984,
3992,
4048,
4074,
4086,
4089,
4090,
4091,
4134,
4135,
4190,
4214,
4215,
4243
],
"line_end_idx": [
1,
2,
27,
41,
42,
88,
177,
282,
335,
348,
372,
392,
399,
459,
460,
588,
589,
757,
780,
781,
782,
928,
929,
937,
1099,
1142,
1155,
1177,
1184,
1196,
1197,
1325,
1326,
1330,
1404,
1483,
1562,
1647,
1727,
1803,
1882,
1948,
1951,
2023,
2027,
2028,
2029,
2440,
2441,
2654,
2655,
2661,
2823,
2876,
2889,
2913,
2933,
2940,
2946,
2947,
3160,
3161,
3239,
3240,
3248,
3392,
3445,
3458,
3482,
3502,
3509,
3753,
3754,
3921,
3922,
3983,
3984,
3992,
4048,
4074,
4086,
4089,
4090,
4091,
4134,
4135,
4190,
4214,
4215,
4243,
4296
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4296,
"ccnet_original_nlines": 90,
"rps_doc_curly_bracket": 0.0004655499942600727,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.346808522939682,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03510637953877449,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24148936569690704,
"rps_doc_frac_unique_words": 0.4107883870601654,
"rps_doc_mean_word_length": 4.571230888366699,
"rps_doc_num_sentences": 50,
"rps_doc_symbol_to_word_ratio": 0.007446810137480497,
"rps_doc_unigram_entropy": 5.085685729980469,
"rps_doc_word_count": 723,
"rps_doc_frac_chars_dupe_10grams": 0.14765506982803345,
"rps_doc_frac_chars_dupe_5grams": 0.21785174310207367,
"rps_doc_frac_chars_dupe_6grams": 0.19606657326221466,
"rps_doc_frac_chars_dupe_7grams": 0.17307110130786896,
"rps_doc_frac_chars_dupe_8grams": 0.15642964839935303,
"rps_doc_frac_chars_dupe_9grams": 0.15642964839935303,
"rps_doc_frac_chars_top_2gram": 0.021180029958486557,
"rps_doc_frac_chars_top_3gram": 0.01906202919781208,
"rps_doc_frac_chars_top_4gram": 0.024205749854445457,
"rps_doc_books_importance": -450.02606201171875,
"rps_doc_books_importance_length_correction": -450.02606201171875,
"rps_doc_openwebtext_importance": -274.9739074707031,
"rps_doc_openwebtext_importance_length_correction": -274.9739074707031,
"rps_doc_wikipedia_importance": -196.21804809570312,
"rps_doc_wikipedia_importance_length_correction": -196.21804809570312
},
"fasttext": {
"dclm": 0.04483234882354736,
"english": 0.8621484041213989,
"fineweb_edu_approx": 1.5862364768981934,
"eai_general_math": 0.02057374082505703,
"eai_open_web_math": 0.12441664934158325,
"eai_web_code": 0.0006117799784988165
}
} | {
"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": "5",
"label": "Social/Forum"
},
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,688,287,852,929,953,000 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I am trying to get the HTML5 offline cached version of a website to display when the network is down inside of a webview.
I have overridden onReceivedError ok, and when the network is down this method is called. Problem is that it displays the generic "Web Page is not available" message.
How can I get it to display the HTML5 cached version of the page? The offline storage of the webapp is definately working, as it works fine in the desktop version of Firefox and Chrome.
I know I can call loadData into the view manually in onReceivedError, but im not sure where I can get the HTML5 cached value from.
Note: If I set some dummy data in loadData such as view.loadData(Uri.encode("<html><div>Page load failed</div></html>"), "text/html", "UTF-8"); and then click back (by detecting back event and calling webview.goBack(); then the cached version of the page is displayed ok.
Here are some lines of code I added to setup the webview:
webview.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
webview.getSettings().setAppCacheMaxSize(1024*1024*8);
webview.getSettings().setAppCachePath("/data/data/com.stuff.android/cache");
webview.getSettings().setAllowFileAccess(true);
webview.getSettings().setAppCacheEnabled(true);
webview.getSettings().setDomStorageEnabled(true);
webview.getSettings().setJavaScriptEnabled(true);
share|improve this question
add comment
3 Answers
up vote 5 down vote accepted
+50
Try to find out the network status using
private boolean isNetworkAvailable() {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null;
}
(Android - detect whether there is an Internet connection available)
This also needs
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
in your AndroidManifest.xml
Now you can set the cache behaviour either to LOAD_CACHE_ONLY or to LOAD_NO_CACHE, depending on whether a network connection is available, with
webview.getSettings().setCacheMode(...)
share|improve this answer
this is probably the "cleanest" solution, so ill give you the bounty points :) – Marty Dec 22 '11 at 0:28
add comment
I think a good solution would be to use LOAD_NORMAL and onReceivedError Navigate BACK. I think this will load the cache according to the documentation (not sure if I remember correctly) but be carefull no to get stuck in an infinite loop
It is weird.. According to the documentation:
Override the way the cache is used. The way the cache is used is based on the navigation option. For a normal page load, the cache is checked and content is re-validated as needed. When navigating back, content is not revalidated, instead the content is just pulled from the cache. This function allows the client to override this behavior.
However the behavior you want does not seem to be one of these:
1. LOAD_CACHE_ELSE_NETWORK
Use cache if content is there, even if expired (eg, history nav) If it is not in the cache, load from network.
2. LOAD_CACHE_ONLY
Don't use the network, load from cache only.
3. LOAD_DEFAULT
Default cache usage pattern
4. LOAD_NORMAL
Normal cache usage pattern
5. LOAD_NO_CACHE
Don't use the cache, load from network
I do not know if you can subclass the WebView to get the desired flow.
share|improve this answer
sorry forgot to mention, i edited my question .. – Marty Dec 14 '11 at 22:33
@Marty did you try to change LOAD_DEFAULT to LOAD_NORMAL – Sherif elKhatib Dec 15 '11 at 7:48
still just has generic "Web Page not available" message when the net connection is down when i use LOAD_NORMAL – Marty Dec 15 '11 at 23:19
I created a "workaround" where i load up the LOAD_NO_CACHE version, if that fails then in onReceivedError i load the LOAD_CACHE_ONLY version .. i have this working, but its quite a dodgy work around, i was hoping for a clean solution. its a bit silly it doesnt have native support for this .. – Marty Dec 20 '11 at 2:26
I think a good solution would be to use LOAD_NORMAL and onReceivedError Navigate BACK. I think this will load the cache according to the documentation (not sure if I remember correctly) but be carefull no to get stuck in an infinite loop – Sherif elKhatib Dec 20 '11 at 7:03
add comment
Does it not work if you simply let the browser handle this? Specify the manifest in the HTML tag like this:
<html manifest="mycache.appcache">
...and the browser should automatically use it when there's no connection available, you shouldn't need to change any settings at all.
share|improve this answer
add comment
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/8467998/displaying-cached-version-of-webview-in-android",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-10",
"warc_metadata": {
"Content-Length": "81376",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:F33AGEBVFCMPRJ4MRBSX4GRVC6A6G44E",
"WARC-Concurrent-To": "<urn:uuid:3c3cf6b7-f30b-4cbe-849d-99dc78a293a2>",
"WARC-Date": "2014-03-15T08:05:34Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:HLMONNIB7XWY7TCIEXSFVYKTGFL5LMGG",
"WARC-Record-ID": "<urn:uuid:60583431-6236-4485-9e76-58de1131ea29>",
"WARC-Target-URI": "http://stackoverflow.com/questions/8467998/displaying-cached-version-of-webview-in-android",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:05049b51-257f-437f-8b83-43585af9d48f>"
},
"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,
25,
157,
158,
280,
281,
448,
449,
635,
636,
767,
768,
1040,
1041,
1099,
1100,
1162,
1242,
1319,
1367,
1415,
1465,
1515,
1543,
1555,
1556,
1566,
1567,
1596,
1600,
1601,
1642,
1643,
1682,
1727,
1809,
1889,
1927,
1929,
1930,
1999,
2000,
2016,
2017,
2092,
2093,
2121,
2122,
2266,
2267,
2307,
2333,
2335,
2442,
2454,
2455,
2693,
2694,
2695,
2741,
2742,
3083,
3084,
3148,
3149,
3178,
3179,
3294,
3295,
3316,
3317,
3366,
3367,
3385,
3386,
3418,
3419,
3436,
3437,
3468,
3469,
3488,
3489,
3532,
3533,
3534,
3605,
3606,
3607,
3633,
3635,
3713,
3715,
3810,
3812,
3952,
3954,
4275,
4277,
4553,
4565,
4566,
4674,
4675,
4710,
4711,
4846,
4847,
4873,
4885,
4886,
4898,
4899,
4901,
4909,
4910,
4988,
4989
],
"line_end_idx": [
25,
157,
158,
280,
281,
448,
449,
635,
636,
767,
768,
1040,
1041,
1099,
1100,
1162,
1242,
1319,
1367,
1415,
1465,
1515,
1543,
1555,
1556,
1566,
1567,
1596,
1600,
1601,
1642,
1643,
1682,
1727,
1809,
1889,
1927,
1929,
1930,
1999,
2000,
2016,
2017,
2092,
2093,
2121,
2122,
2266,
2267,
2307,
2333,
2335,
2442,
2454,
2455,
2693,
2694,
2695,
2741,
2742,
3083,
3084,
3148,
3149,
3178,
3179,
3294,
3295,
3316,
3317,
3366,
3367,
3385,
3386,
3418,
3419,
3436,
3437,
3468,
3469,
3488,
3489,
3532,
3533,
3534,
3605,
3606,
3607,
3633,
3635,
3713,
3715,
3810,
3812,
3952,
3954,
4275,
4277,
4553,
4565,
4566,
4674,
4675,
4710,
4711,
4846,
4847,
4873,
4885,
4886,
4898,
4899,
4901,
4909,
4910,
4988,
4989,
5079
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 5079,
"ccnet_original_nlines": 117,
"rps_doc_curly_bracket": 0.0003937800065614283,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.35542169213294983,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0401606410741806,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2359437793493271,
"rps_doc_frac_unique_words": 0.4217686951160431,
"rps_doc_mean_word_length": 5.3278913497924805,
"rps_doc_num_sentences": 65,
"rps_doc_symbol_to_word_ratio": 0.0020080299582332373,
"rps_doc_unigram_entropy": 5.178718090057373,
"rps_doc_word_count": 735,
"rps_doc_frac_chars_dupe_10grams": 0.09805923700332642,
"rps_doc_frac_chars_dupe_5grams": 0.14147089421749115,
"rps_doc_frac_chars_dupe_6grams": 0.10827375203371048,
"rps_doc_frac_chars_dupe_7grams": 0.09805923700332642,
"rps_doc_frac_chars_dupe_8grams": 0.09805923700332642,
"rps_doc_frac_chars_dupe_9grams": 0.09805923700332642,
"rps_doc_frac_chars_top_2gram": 0.018386110663414,
"rps_doc_frac_chars_top_3gram": 0.009193049743771553,
"rps_doc_frac_chars_top_4gram": 0.020684370771050453,
"rps_doc_books_importance": -415.6626892089844,
"rps_doc_books_importance_length_correction": -415.6626892089844,
"rps_doc_openwebtext_importance": -262.74163818359375,
"rps_doc_openwebtext_importance_length_correction": -262.74163818359375,
"rps_doc_wikipedia_importance": -170.24534606933594,
"rps_doc_wikipedia_importance_length_correction": -170.24534606933594
},
"fasttext": {
"dclm": 0.024435220286250114,
"english": 0.7984702587127686,
"fineweb_edu_approx": 1.4829291105270386,
"eai_general_math": 0.09433776140213013,
"eai_open_web_math": 0.36891961097717285,
"eai_web_code": 0.005787310190498829
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,679,659,289,446,677,000 |
Why You Should Use NSFetchedResultsController?
NSFetchedResultsController is a very useful class provided by the CoreData framework. It solves many performance issues you frequently run into while reading a large amount of data from database and displaying that data using a UITableview, UICollectionView or MKMapView. You should always use the fetched results controller unless you have a good reason not to. In this post, I would like to show you why using a fetched results controller is a good idea.
Consider an app that shows a list of news feed related to Apple products using a table view. We will call this app FeedLoader. When a row in feed table view is tapped, it shows more information about the feed in a detail view.
feed_loader_app.png
Initial Design #
We can approach the design of this app in multiple ways, but the one below will provide us a good context for discussing why not using a fetched results controller might not be a good idea.
without_fetchedresultscontroller_design.png
Although the figure above has a lot of boxes, the design is not that complicated. I will walk you through it. Not wanting to create a God class that consumes every responsibility in the app, I have created multiple classes each responsible for one thing. The app is primarily responsible for following tasks:
I won’t explain every aspect of the FeedLoader app in this post. I will highlight only those that are relevant to the discussion of NSFetchedResultsController. I have tried to write the code for FeedLoader in a clean way. Hopefully, you will be able to read it with relative ease.
Download News Feed #
Let’s assume that there exists a news feed service that provides API for fetching news published between certain dates. When the user enters the feed list view, the process of downloading the latest news feed is initiated. Once the feed is downloaded, we persist them in a local database. That way we don’t need to make unnecessary calls to the news feed service when we want to show the feed that was already downloaded in the past.
To keep things simple, we will read feed data from a JSON file stored locally instead of downloading it from a remote feed service. We can accommodate this change in our design by creating a protocol named FeedFetcher and a concrete class named FileFeedFetcher that conforms to this protocol.
@protocol FeedFetcher <NSObject>
- (void)fetchFeedWithCompletionHandler:
(void(^)(id JSON, NSError *error))handler;
@end
@interface FileFeedFetcher : NSObject <FeedFetcher>
@end
@implementation FileFeedFetcher
- (void)fetchFeedWithCompletionHandler:
(void (^)(id JSON, NSError *error))handler
{
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"feeds"
ofType:@"json"];
NSData *jsonData = [NSData dataWithContentsOfFile:filePath];
NSError *error = nil;
NSArray *jsonObjects = [NSJSONSerialization JSONObjectWithData:jsonData
options:0
error:&error];
if (jsonObjects == nil) {
NSLog(@"Unable to parse feeds JSON: %@", error.description);
handler(nil, error);
}
else {
handler(jsonObjects, nil);
}
}
@end
In the future, when we actually download a list of feeds from a remote server, we can easily create a class named ServerFeedFetcher that conforms to the FeedFetcher protocol as well. We can then inject a server feed fetcher instead of a file feed fetcher without having to change anything in FeedManager.
feed_fetcher_interface.png
@implementation ObjectConfigurator
- (FeedManager *)feedManager {
FeedManager *feedManager = [[FeedManager alloc] init];
[feedManager setFeedFetcher:[[ServerFeedFetcher alloc] init]];
// ...
return feedManager;
}
@end
ObjectConfigurator provides a light-weight framework for injecting dependencies. You can checkout the create_basic_setup branch from FeedLoader repo to see its full implementation. Through out this blog post, I will ask you to checkout a specific branch so that you can see various stages of the app in code as we change its design iteratively.
Persist News Feed Locally #
Once the FeedManager has retrieved feed JSON (either from a remote service or a local JSON file), it tells FeedBuilder to build Feed objects from that JSON. FeedBuilder creates a new Feed object only if one with the same source URL already doesn’t exist in database. When the builder is done creating Feed objects, it will tell FeedDataManager to persist them in a local database. Finally, it returns the Feed objects back to the FeedManager.
FeedDataManager provides a layer of abstraction on top of Core Data. Instead of passing around the managed object context to any class that might need to query feed related data from the database and sprinkling complex fetch request code all over the place, we can simply ask FeedDataManager to perform specific data related task for us. For example, checking whether a Feed object with a specific source URL already exists or not.
Display News Feed #
FeedListViewController uses custom cells of type FeedCard to display the feed information in a UITableView. Rather than creating the cells itself, the list view controller delegates that task to an object that conforms to the FeedListDataSource protocol. (A default implementation of the FeedListDataSource protocol is provided in FeedListDefaultDataSource class). The data source accepts an array of Feed objects. When the table view needs to display a cell at a specific indexpath, it asks the data source to provide that cell. The data source then creates a FeedCard instance, populates it with feed data and gives it to the tableview.
Download and Cache Feed Image #
All information required to display a news feed is persisted in database except the image data. Feed objects store image URL but not the actual image data. A third party library called SDWebImage is used to asynchronously download images from a remote server and cache them locally on disk. SDWebImage adds a category to the UIImageView class. As a result, we can initiate the loading and caching of images by sending setImageWithURL:placeholderImage: message directly to the image view included in a feed card. Images are loaded only when needed, i.e., when a feed card is visible to the user.
UIImage *placeholder = [UIImage imageNamed:@"feedPlaceholderImage"];
[self.feedImageView sd_setImageWithURL:[NSURL URLWithString:feed.imageUrl]
placeholderImage:placeholder];
Caching Feed Data #
At this point, if you run the app second time, you will notice that the feed list is empty. The issue here is that FeedBuilder doesn’t create a new Feed object if one with the same source URL already exists in database.
@implementation FeedBuilder
- (NSArray *)feedsFromJSON:(NSArray *)JSON {
NSMutableArray *feedsArray = [NSMutableArray array];
for (NSDictionary *feedDict in JSON) {
if ([self feedExistsInDatabase:feedDict]) {
continue;
}
Feed *feed = [self.feedDataManager newFeed];
[self fillInDetailsForFeed:feed
fromDictionary:feedDict];
[feedsArray addObject:feed];
}
[self.feedDataManager saveData];
return [feedsArray copy];
}
@end
First time we run the app, there are no Feed objects stored in the database at all. Therefore, the builder creates five new feed objects and returns them to the feed manager. On the second run, the feed builder doesn’t create any because all five feed items in feeds.json file have already been persisted in the database. As a result, the builder returns an empty array to the feed manager. To fix this issue, we need to return locally saved feeds if the builder doesn’t create new ones. We could easily accomplish that by adding following code to buildFeedsFromJSON: method in FeedManager:
if ([feeds count] == 0) {
feeds = [self.feedDataManager allFeed];
}
However, that seems like a bit of a hack to me. Also, if you look inside feeds.json file, there are only five feed items in there. Therefore, loading them all into the feed list table view won’t cause any performance issues for now. In reality the number of news feed that needs to be displayed will be much higher than five. Although, Apple engineers have done a fantastic job of optimizing UITableView, we still need to take care of the issue of not loading too many table view rows up-front by ourselves. What we need here is a proper caching mechanism that will not only retrieve feeds from a local database if we are unable to fetch new ones from a remote server, but also is smart enough to not load too many rows unless the user needs them. This approach will make scrolling through the table view quite smooth. It will also prevent the overall memory footprint from increasing unnecessarily. Let’s start building a foundation for that caching mechanism. The first thing we need to do is create FeedCache class.
@class FeedBuilder;
@class FeedDataManager;
@interface FeedCache : NSObject
- (void)setFeedBuilder:(FeedBuilder *)feedBuilder;
- (void)setFeedDataManager:(FeedDataManager *)feedDataManager;
- (NSArray *)cachedFeed;
- (NSArray *)addFeedToCacheFromJSON:(NSArray *)feedJSON;
@end
@interface FeedCache ()
@property (nonatomic) FeedBuilder *feedBuilder;
@property (nonatomic) FeedDataManager *feedDataManager;
@end
@implementation FeedCache
- (NSArray *)cachedFeed {
return [self.feedDataManager allFeedSortedByKey:@"publishedDate"
ascending:NO];
}
- (NSArray *)addFeedToCacheFromJSON:(NSArray *)feedJSON {
NSMutableArray *feeds = [NSMutableArray array];
for (NSDictionary *feedDict in feedJSON) {
if ([self feedExistsInDatabase:feedDict]) {
continue;
}
Feed *feed = [self.feedDataManager newFeed];
[self.feedBuilder fillInDetailsForFeed:feed
fromJSON:feedDict];
[feeds addObject:feed];
}
[self.feedDataManager saveData];
[self sortFeedsByPublishedDate:feeds];
return [feeds copy];
}
- (BOOL)feedExistsInDatabase:(NSDictionary *)feed {
return [self.feedDataManager feedExistsWithSourceUrl:feed[@"url"]];
}
- (void)sortFeedsByPublishedDate:(NSMutableArray *)feeds {
[feeds sortUsingComparator:^NSComparisonResult(Feed *feed1, Feed *feed2) {
// The minus sign here has the effect of reversing
// order from ascending to descending.
return -[feed1.publishedDate compare:feed2.publishedDate];
}];
}
@end
When asked for cached feeds, FeedCache returns all feeds in the database stored thus far. It also allows us to add new feeds into the cache. It essentially means taking the feed JSON, creating new instances of Feed objects from that JSON, saving them into the database and returning them back to the caller. Now FeedManager can delegate the task of building Feed objects from JSON to FeedCache instead of FeedBuilder.
- (void)buildFeedsFromJSON:(NSArray *)JSON {
NSArray *newlyFetchedFeeds =
[self.feedCache addFeedToCacheFromJSON:JSON];
if ([self.delegate respondsToSelector:
@selector(feedManager:didReceiveFeeds:)])
{
[self.delegate feedManager:self
didReceiveFeeds:newlyFetchedFeeds];
}
}
Now when FeedManager is asked to fetch the latest feeds, it can simply return the ones in cache while the new ones are still being fetched.
- (NSArray *)fetchFeeds {
[self.feedFetcher fetchFeedWithCompletionHandler:
^(id JSON, NSError *error)
{
if (error) {
NSLog(@"Unable to fetch feeds.");
}
else {
[self buildFeedsFromJSON:JSON];
}
}];
return [self.feedCache cachedFeed];
}
The original problem of empty list when we run the app second time can now be solved by displaying the cached feeds when user enters the feed list view.
- (void)viewDidLoad {
// ...
[self fetchFeeds];
}
- (void)fetchFeeds {
NSArray *feeds = [self.feedManager fetchFeeds];
[self.dataSource setFeeds:feeds];
[self.feedTableView reloadData];
}
Now that we can fetch feeds incrementally, we need to give the table view data source an ability to add new feeds to its collection.
@protocol FeedListTableDataSource
<UITableViewDataSource, UITableViewDelegate>
- (void)setFeeds:(NSArray *)feeds;
- (void)addFeeds:(NSArray *)feeds;
@end
@implementation FeedListTableDefaultDataSource
// ...
- (void)addFeeds:(NSArray *)feeds {
[self setFeeds:[self.feeds arrayByAddingObjectsFromArray:feeds]];
}
@end
Finally, we need to insert new rows into the table view when we receive new feeds from a remote server.
@implementation FeedListViewController
//...
- (void)feedManager:(FeedManager *)manager
didReceiveFeeds:(NSArray *)feeds
{
NSLog(@"Feed manager did receive %ld feeds", (long)[feeds count]);
[self.dataSource addFeeds:feeds];
[self insertFeedsIntoTableView:feeds];
}
- (void)insertFeedsIntoTableView:(NSArray *)feeds {
if ([feeds count] > 0) {
NSMutableArray *newRows = [NSMutableArray array];
for (int i = 0; i < [feeds count]; i++) {
[newRows addObject:[NSIndexPath indexPathForRow:i
inSection:0]];
}
[self.feedTableView
insertRowsAtIndexPaths:newRows
withRowAnimation:UITableViewRowAnimationTop];
}
}
@end
With the addition of caching, our initial design has evolved a bit as shown in figure below.
basic_caching.png
Following diagram shows feed data flow from end-to-end with caching in place.
feed_display_workflow_with_caching.png
You can checkout the add_caching branch from FeedLoader repo to see all the caching related code.
Now that we have a basic caching mechanism in place, we can make it more robust by providing a way to specify how many feeds we want to fetch rather than returning everything in the database. We can also remove feeds that are not visible to the user from the table view data source. Currently, it holds onto each feed added to its collection which is quite inefficient because the collection could grow infinitely as we keep fetching new feeds. As you can see the to-do list for a robust cache keeps growing and growing as we add new performance related requirements.
This is where the fetched results controller provided by Apple comes very handy. In addition to solving all caching related problems we have encountered so far, the fetched results controller also provides following:
NSFetchedResultsController to the Rescue #
Rather than going down a rabbit hole of implementing our own caching solution, let’s give NSFetchedResultsController a try. First thing we need to do is expose the managed object context used by our Core Data stack via the data manager. The fetched results controller interacts with Core Data directly via the managed object context. Ideally, I would have liked not to leak this implementation detail related to database to our business logic but if we want to use the fetched results controller we have no other choice.
You can checkout the replace_caching_implementation_with_fetched_results_controller branch from FeedLoader repo if you would like to follow along with the code listed in this section.
@interface FeedDataManager : NSObject
// ...
@property (nonatomic, readonly) NSManagedObjectContext
*managedObjectContext;
@end
Now instead of manually adding the new list of feed returned by FeedManager to the data source, we can simply give it a fetched results controller.
@implementation FeedListViewController
- (void)viewDidLoad {
// ...
[self.dataSource
setFetchedResultsController:self.fetchedResultsController];
}
@end
We also need to modify the FeedListTableDataSource protocol to take the fetched results controller instead of manually setting the feed array.
@protocol FeedListTableDataSource
<UITableViewDataSource, UITableViewDelegate>
- (void)setFetchedResultsController:
(NSFetchedResultsController *)controller;
@end
When we create a fetched results controller, we need to give it a fetch request that contains details such as which entity to fetch and how many of them to fetch in a batch. We can also tell it to sort the result by certain attributes such as publishedDate. Here is the code that creates a fetched results controller:
- (NSFetchedResultsController *)fetchedResultsController {
if (_fetchedResultsController == nil) {
NSFetchRequest *fetchRequest =
[NSFetchRequest fetchRequestWithEntityName:@"Feed"];
NSSortDescriptor *sortByPublishedDate =
[[NSSortDescriptor alloc] initWithKey:@"publishedDate"
ascending:NO];
fetchRequest.sortDescriptors = @[sortByPublishedDate];
fetchRequest.fetchBatchSize = 10;
NSManagedObjectContext *context =
self.feedDataManager.managedObjectContext;
_fetchedResultsController =
[[NSFetchedResultsController alloc]
initWithFetchRequest:fetchRequest
managedObjectContext:context
sectionNameKeyPath:nil
cacheName:nil];
_fetchedResultsController.delegate = self;
}
return _fetchedResultsController;
}
Finally, we need to implement the delegate methods the fetched results controller will call when the managed objects in Core Data are created, updated or deleted.
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller {
[self.feedTableView beginUpdates];
}
- (void)controller:(NSFetchedResultsController *)controller
didChangeObject:(id)anObject
atIndexPath:(NSIndexPath *)indexPath
forChangeType:(NSFetchedResultsChangeType)type
newIndexPath:(NSIndexPath *)newIndexPath
{
UITableView *tableView = self.feedTableView;
switch(type) {
case NSFetchedResultsChangeInsert:
[tableView insertRowsAtIndexPaths:@[newIndexPath]
withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeDelete:
[tableView deleteRowsAtIndexPaths:@[indexPath]
withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeUpdate:
[tableView reloadRowsAtIndexPaths:@[indexPath]
withRowAnimation:UITableViewRowAnimationNone];
break;
case NSFetchedResultsChangeMove:
[tableView deleteRowsAtIndexPaths:@[indexPath]
withRowAnimation:UITableViewRowAnimationFade];
[tableView insertRowsAtIndexPaths:@[newIndexPath]
withRowAnimation:UITableViewRowAnimationFade];
break;
}
}
- (void)controller:(NSFetchedResultsController *)controller
didChangeSection:(id )sectionInfo
atIndex:(NSUInteger)sectionIndex
forChangeType:(NSFetchedResultsChangeType)type
{
switch(type) {
case NSFetchedResultsChangeInsert:
[self.feedTableView
insertSections:[NSIndexSet indexSetWithIndex:sectionIndex]
withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeDelete:
[self.feedTableView
deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex]
withRowAnimation:UITableViewRowAnimationFade];
break;
default:
break;
}
}
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[self.feedTableView endUpdates];
}
When the fetched results controller is about to start sending change notifications, it will call the controllerWillChangeContent delegate method. We need to prepare the feed table view for updates in that method by calling beginUpdates. If a Feed managed object is created, deleted or updated in database, we insert, delete or update a table view row respectively. When all current change notifications provided by the fetched results controller have been received, we need to tell the table view to process all pending updates by calling endUpdates in controllerDidChangeContent: delegate method.
Now we can remove all traces of FeedCache class and let the fetched results controller take over. Here is how the design looks after replacing our own caching implementation with the fetched results controller:
with_fetchedresultscontroller_design.png
The end-to-end feed data flow has also changed with introduction of the fetched results controller.
feed_display_workflow_with_nsfetchedresultscontroller.png
Conclusion #
You might be thinking that this blog post has been a giant waste of time and I agree with you. In the beginning I mentioned that you should always use a fetched results controller unless you have a good reason not to. I could have stopped there and moved on with our lives, but I went on and on to show you why it’s a good idea to do that. We started with a code base that didn’t have any caching mechanism in place. We implemented our own caching and then replaced it with a NSFetchedResultsController instance.
In one of the projects I worked on, I came very close to implementing functionalities already provided by NSFetchedResultsController. I thought I would share that experience with you so that you won’t waste time trying to reinvent the wheel like I did.
The full code for FeedLoader app is available on GitHub.
113
Kudos
113
Kudos
Now read this
How to Debug Significant Location Change in iOS
If an app has registered to listen for significant location change notifications, but is subsequently terminated, iOS will automatically relaunch the app into the background, if a new notification arrives. iOS generates significant... Continue →
| {
"url": "https://pawanpoudel.svbtle.com/why-use-nsfetchedresultscontroller",
"source_domain": "pawanpoudel.svbtle.com",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "38435",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:NZZCY7W7AG24HNXRPJM2GUTHMTQIDQCL",
"WARC-Concurrent-To": "<urn:uuid:b43b12d8-3ed2-4a24-9f8c-47ab7fe7b86a>",
"WARC-Date": "2021-05-15T18:10:59Z",
"WARC-IP-Address": "52.200.5.190",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:SONC2JOSY7Z7HHWAKFP4YBXKXWTIOXZV",
"WARC-Record-ID": "<urn:uuid:d52a2c03-2f14-42aa-a91d-63eea13beed7>",
"WARC-Target-URI": "https://pawanpoudel.svbtle.com/why-use-nsfetchedresultscontroller",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c150db05-95e7-40d2-909d-b1401bdb52fe>"
},
"warc_info": "isPartOf: CC-MAIN-2021-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-224.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
2,
3,
50,
51,
508,
509,
736,
737,
757,
758,
775,
776,
966,
967,
1011,
1012,
1321,
1322,
1603,
1604,
1625,
1626,
2060,
2061,
2354,
2355,
2388,
2389,
2429,
2476,
2477,
2482,
2534,
2539,
2540,
2572,
2573,
2613,
2661,
2663,
2736,
2810,
2811,
2876,
2902,
2978,
3047,
3123,
3153,
3222,
3251,
3257,
3268,
3303,
3309,
3311,
3312,
3317,
3318,
3623,
3624,
3651,
3652,
3687,
3688,
3719,
3778,
3845,
3856,
3857,
3881,
3883,
3884,
3889,
3890,
4235,
4236,
4264,
4265,
4708,
4709,
5141,
5142,
5162,
5163,
5802,
5803,
5835,
5836,
6431,
6432,
6501,
6576,
6629,
6630,
6650,
6651,
6871,
6872,
6900,
6901,
6946,
7003,
7004,
7047,
7099,
7121,
7131,
7132,
7185,
7225,
7271,
7272,
7309,
7315,
7316,
7353,
7383,
7385,
7386,
7391,
7392,
7983,
7984,
8010,
8054,
8056,
8057,
9076,
9077,
9097,
9121,
9122,
9154,
9155,
9206,
9269,
9270,
9295,
9352,
9353,
9358,
9382,
9383,
9431,
9487,
9488,
9493,
9494,
9520,
9521,
9547,
9616,
9673,
9675,
9676,
9734,
9786,
9787,
9834,
9886,
9908,
9918,
9919,
9972,
10024,
10082,
10114,
10120,
10121,
10158,
10201,
10202,
10227,
10229,
10230,
10282,
10354,
10356,
10357,
10416,
10495,
10554,
10601,
10668,
10676,
10678,
10679,
10684,
10685,
11103,
11104,
11149,
11183,
11237,
11238,
11281,
11331,
11337,
11378,
11433,
11439,
11441,
11442,
11582,
11583,
11609,
11663,
11699,
11705,
11726,
11772,
11782,
11797,
11841,
11851,
11859,
11860,
11900,
11902,
11903,
12056,
12057,
12079,
12094,
12117,
12119,
12120,
12141,
12193,
12231,
12268,
12270,
12271,
12404,
12405,
12440,
12489,
12490,
12525,
12560,
12561,
12566,
12613,
12620,
12621,
12657,
12727,
12729,
12730,
12735,
12736,
12840,
12841,
12880,
12886,
12887,
12930,
12967,
12969,
13040,
13078,
13121,
13123,
13124,
13176,
13205,
13263,
13313,
13375,
13440,
13450,
13451,
13480,
13523,
13587,
13593,
13595,
13596,
13601,
13602,
13695,
13696,
13714,
13715,
13793,
13794,
13833,
13834,
13932,
13933,
14501,
14502,
14719,
14720,
14763,
14764,
15285,
15286,
15470,
15471,
15509,
15516,
15572,
15599,
15600,
15605,
15606,
15754,
15755,
15794,
15795,
15817,
15828,
15850,
15918,
15920,
15921,
15926,
15927,
16070,
16071,
16106,
16155,
16156,
16193,
16239,
16240,
16245,
16246,
16564,
16565,
16624,
16668,
16707,
16772,
16773,
16825,
16896,
16955,
16956,
17019,
17061,
17062,
17104,
17159,
17160,
17196,
17244,
17294,
17339,
17378,
17410,
17411,
17462,
17468,
17469,
17507,
17509,
17510,
17673,
17674,
17753,
17792,
17794,
17795,
17855,
17887,
17931,
17983,
18030,
18032,
18081,
18082,
18101,
18144,
18206,
18282,
18301,
18302,
18345,
18404,
18480,
18499,
18500,
18543,
18602,
18678,
18697,
18698,
18739,
18798,
18874,
18875,
18937,
19013,
19032,
19038,
19040,
19041,
19101,
19137,
19181,
19233,
19235,
19254,
19297,
19329,
19404,
19467,
19486,
19487,
19530,
19562,
19637,
19700,
19719,
19720,
19737,
19756,
19762,
19764,
19765,
19843,
19880,
19882,
19883,
20481,
20482,
20693,
20694,
20735,
20736,
20836,
20837,
20895,
20896,
20909,
20910,
21423,
21424,
21677,
21678,
21735,
21736,
21738,
21742,
21748,
21750,
21754,
21760,
21761,
21775,
21776,
21824,
21825,
22071,
22072
],
"line_end_idx": [
2,
3,
50,
51,
508,
509,
736,
737,
757,
758,
775,
776,
966,
967,
1011,
1012,
1321,
1322,
1603,
1604,
1625,
1626,
2060,
2061,
2354,
2355,
2388,
2389,
2429,
2476,
2477,
2482,
2534,
2539,
2540,
2572,
2573,
2613,
2661,
2663,
2736,
2810,
2811,
2876,
2902,
2978,
3047,
3123,
3153,
3222,
3251,
3257,
3268,
3303,
3309,
3311,
3312,
3317,
3318,
3623,
3624,
3651,
3652,
3687,
3688,
3719,
3778,
3845,
3856,
3857,
3881,
3883,
3884,
3889,
3890,
4235,
4236,
4264,
4265,
4708,
4709,
5141,
5142,
5162,
5163,
5802,
5803,
5835,
5836,
6431,
6432,
6501,
6576,
6629,
6630,
6650,
6651,
6871,
6872,
6900,
6901,
6946,
7003,
7004,
7047,
7099,
7121,
7131,
7132,
7185,
7225,
7271,
7272,
7309,
7315,
7316,
7353,
7383,
7385,
7386,
7391,
7392,
7983,
7984,
8010,
8054,
8056,
8057,
9076,
9077,
9097,
9121,
9122,
9154,
9155,
9206,
9269,
9270,
9295,
9352,
9353,
9358,
9382,
9383,
9431,
9487,
9488,
9493,
9494,
9520,
9521,
9547,
9616,
9673,
9675,
9676,
9734,
9786,
9787,
9834,
9886,
9908,
9918,
9919,
9972,
10024,
10082,
10114,
10120,
10121,
10158,
10201,
10202,
10227,
10229,
10230,
10282,
10354,
10356,
10357,
10416,
10495,
10554,
10601,
10668,
10676,
10678,
10679,
10684,
10685,
11103,
11104,
11149,
11183,
11237,
11238,
11281,
11331,
11337,
11378,
11433,
11439,
11441,
11442,
11582,
11583,
11609,
11663,
11699,
11705,
11726,
11772,
11782,
11797,
11841,
11851,
11859,
11860,
11900,
11902,
11903,
12056,
12057,
12079,
12094,
12117,
12119,
12120,
12141,
12193,
12231,
12268,
12270,
12271,
12404,
12405,
12440,
12489,
12490,
12525,
12560,
12561,
12566,
12613,
12620,
12621,
12657,
12727,
12729,
12730,
12735,
12736,
12840,
12841,
12880,
12886,
12887,
12930,
12967,
12969,
13040,
13078,
13121,
13123,
13124,
13176,
13205,
13263,
13313,
13375,
13440,
13450,
13451,
13480,
13523,
13587,
13593,
13595,
13596,
13601,
13602,
13695,
13696,
13714,
13715,
13793,
13794,
13833,
13834,
13932,
13933,
14501,
14502,
14719,
14720,
14763,
14764,
15285,
15286,
15470,
15471,
15509,
15516,
15572,
15599,
15600,
15605,
15606,
15754,
15755,
15794,
15795,
15817,
15828,
15850,
15918,
15920,
15921,
15926,
15927,
16070,
16071,
16106,
16155,
16156,
16193,
16239,
16240,
16245,
16246,
16564,
16565,
16624,
16668,
16707,
16772,
16773,
16825,
16896,
16955,
16956,
17019,
17061,
17062,
17104,
17159,
17160,
17196,
17244,
17294,
17339,
17378,
17410,
17411,
17462,
17468,
17469,
17507,
17509,
17510,
17673,
17674,
17753,
17792,
17794,
17795,
17855,
17887,
17931,
17983,
18030,
18032,
18081,
18082,
18101,
18144,
18206,
18282,
18301,
18302,
18345,
18404,
18480,
18499,
18500,
18543,
18602,
18678,
18697,
18698,
18739,
18798,
18874,
18875,
18937,
19013,
19032,
19038,
19040,
19041,
19101,
19137,
19181,
19233,
19235,
19254,
19297,
19329,
19404,
19467,
19486,
19487,
19530,
19562,
19637,
19700,
19719,
19720,
19737,
19756,
19762,
19764,
19765,
19843,
19880,
19882,
19883,
20481,
20482,
20693,
20694,
20735,
20736,
20836,
20837,
20895,
20896,
20909,
20910,
21423,
21424,
21677,
21678,
21735,
21736,
21738,
21742,
21748,
21750,
21754,
21760,
21761,
21775,
21776,
21824,
21825,
22071,
22072,
22073
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 22073,
"ccnet_original_nlines": 458,
"rps_doc_curly_bracket": 0.00335251004435122,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.304657518863678,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.012054789811372757,
"rps_doc_frac_lines_end_with_ellipsis": 0.013071900233626366,
"rps_doc_frac_no_alph_words": 0.24356164038181305,
"rps_doc_frac_unique_words": 0.29192546010017395,
"rps_doc_mean_word_length": 6.370729923248291,
"rps_doc_num_sentences": 161,
"rps_doc_symbol_to_word_ratio": 0.004109589848667383,
"rps_doc_unigram_entropy": 5.762763500213623,
"rps_doc_word_count": 2576,
"rps_doc_frac_chars_dupe_10grams": 0.006459080148488283,
"rps_doc_frac_chars_dupe_5grams": 0.05691305175423622,
"rps_doc_frac_chars_dupe_6grams": 0.03753580152988434,
"rps_doc_frac_chars_dupe_7grams": 0.022302109748125076,
"rps_doc_frac_chars_dupe_8grams": 0.0196209903806448,
"rps_doc_frac_chars_dupe_9grams": 0.006459080148488283,
"rps_doc_frac_chars_top_2gram": 0.01535554975271225,
"rps_doc_frac_chars_top_3gram": 0.02632381021976471,
"rps_doc_frac_chars_top_4gram": 0.01974285952746868,
"rps_doc_books_importance": -1388.545654296875,
"rps_doc_books_importance_length_correction": -1388.545654296875,
"rps_doc_openwebtext_importance": -763.0042724609375,
"rps_doc_openwebtext_importance_length_correction": -763.0042724609375,
"rps_doc_wikipedia_importance": -420.3843078613281,
"rps_doc_wikipedia_importance_length_correction": -420.3843078613281
},
"fasttext": {
"dclm": 0.22842144966125488,
"english": 0.7917002439498901,
"fineweb_edu_approx": 2.270272731781006,
"eai_general_math": 0.3074790835380554,
"eai_open_web_math": 0.06582658737897873,
"eai_web_code": 0.8878105282783508
}
} | {
"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": "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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,501,118,353,073,785,000 | As for your link cheaters, in the interest rate of internet honesty and fair play, webmasters who offer a reciprocal exchanging links should respect the design. If someone links to you should honor the hyperlink exchange and reciprocate. Written documents adding the other party’s url to your webpages. Or, if you have decided to be able to reciprocate anyway have the professional courtesy to email the other party proclaiming that their link has not been common.
As customer is required to spread their legs in numerous embarrassing positions, acting in the matter of fact way, treating because normal, will allow a person feel a little less self-conscious. Remember, that’s how the aesthetician views it.
You additionally need one of the little bit patient if you head off into the brave new world of internet dating. Not all marriages are “love initially site,” effectively if yours is, it could take a associated with looking a person “site” special someone. รีวิว ฮิโรชิม่า And so, much more . in the ride!
When in fact stop and think about it, manage your new friend’s reaction is going to be if when you meet the very first time it’s obvious you’re not the person they thought they were going to be seeing? “Oh . hi. I see that you may have been dishonest with me from the get-go here, but hey, I’m still thinking offering a great shot at having an open, trusting relationship for the long-term” Obviously not.
Items that lack certain qualities can be ruined by attempts to engrave them. Many items today are not solid metal but are cast a great inexpensive alloy and plated finish. Frightened hirohima cases quality plating can survive some engraving processes but more not the plating will peal or allow corrosion under the engraving causing severe problems down the trail.
Tip: Pay attention to narrowly defined niche markets where your product or service solves a dedicated need in the customers. Focus your marketing on them instead of trying to reach a broadly defined general market. You’ll generate more sales and view a better return on your advertising outlay.
But then what? May to start marketing items and getting people with your website! A lot of individuals are turned off when they discover this particular is a demanding method that requires a strong amount of hard work, time, And money!
Leave a Reply
Your email address will not be published. | {
"url": "https://cyjlawyer.com/web-site-savvy-for-pet-care-business-owners/",
"source_domain": "cyjlawyer.com",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "110543",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:D4DCK2HIK7W3IE773QZPBLUH2E6QF53I",
"WARC-Concurrent-To": "<urn:uuid:a807b245-abfa-4d66-9853-5b614b9b0ccb>",
"WARC-Date": "2022-08-11T20:18:32Z",
"WARC-IP-Address": "188.165.142.123",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:76SM2HRPTA6KVG64O5WAR4YAW4EUZ2AI",
"WARC-Record-ID": "<urn:uuid:c39b1a56-49e7-4c9b-aebf-45ccb8f47f97>",
"WARC-Target-URI": "https://cyjlawyer.com/web-site-savvy-for-pet-care-business-owners/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1ac7a194-20b2-4343-83cf-96f44593046e>"
},
"warc_info": "isPartOf: CC-MAIN-2022-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-103\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,
465,
466,
709,
710,
1015,
1016,
1422,
1423,
1788,
1789,
2084,
2085,
2321,
2322,
2336,
2337
],
"line_end_idx": [
465,
466,
709,
710,
1015,
1016,
1422,
1423,
1788,
1789,
2084,
2085,
2321,
2322,
2336,
2337,
2378
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2378,
"ccnet_original_nlines": 16,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.45588234066963196,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.006302520167082548,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1428571343421936,
"rps_doc_frac_unique_words": 0.6324999928474426,
"rps_doc_mean_word_length": 4.8125,
"rps_doc_num_sentences": 24,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.201062202453613,
"rps_doc_word_count": 400,
"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.010389610193669796,
"rps_doc_frac_chars_top_3gram": 0.009350650012493134,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -211.10940551757812,
"rps_doc_books_importance_length_correction": -211.10940551757812,
"rps_doc_openwebtext_importance": -113.1109390258789,
"rps_doc_openwebtext_importance_length_correction": -113.1109390258789,
"rps_doc_wikipedia_importance": -99.99497985839844,
"rps_doc_wikipedia_importance_length_correction": -99.99497985839844
},
"fasttext": {
"dclm": 0.022848550230264664,
"english": 0.9457474946975708,
"fineweb_edu_approx": 1.2339744567871094,
"eai_general_math": 0.0010514899622648954,
"eai_open_web_math": 0.11300981044769287,
"eai_web_code": 0.0002881899999920279
}
} | {
"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": "658.8",
"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": "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": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
7,476,898,056,941,772,000 | Migrating to Git from SVN for debian PHP packaging
We have moved to git! for helpful usage info, see PHP/GitUsage.
The pkg-php team has decided to move at least a subset of the current svn projects into git. namely, php5. other packagers are invited to follow suit but at this point there doesn't seem to be interest in forcing everything to migrate.
importing previous history
however, with the "best" option there are some problems converting to git:
so, it sounds like we'll be going for the "better" option. Mark Hershberger has done an initial stab at this: http://mah.everybody.org/php.git .
handling branches in git
handling tags in git
commit messages in git
standard commit messages should be a short one-line description, optionally followed by a blank line and free-form prose describing the commit.
commits that address specific bugs should mention so in the free-form section, matching the "git dch" friendly meta syntax "^Closes: #nnnnnn". this also allows for hooks to catch the specific changes and do stuff like email the bts.
handling debian/changelog
changes to debian/changelog should be distinct from the fixes that they describe. i.e. a security fix shouldn't include both the fix and the changelog entry in the same commit, it makes merging harder.
mentioning closed bugs manually is fine, but if one puts the bug ref in the commit message then this can be automatically generated too.
desired hooks
i've been interested in getting my hands a bit more dirty with git hooks, so anything that we can't assemble from existing parts i'd be happy to hack together (sean)
for future investigation | {
"url": "https://wiki.debian.org/PHP/GitMigration?action=recall&rev=6",
"source_domain": "wiki.debian.org",
"snapshot_id": "crawl=CC-MAIN-2021-39",
"warc_metadata": {
"Content-Length": "15922",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7S5WBT6AHPYWGLC5SPGDXP2ZCK57VWY6",
"WARC-Concurrent-To": "<urn:uuid:80b04fef-c4b6-43f9-8dea-79024347a127>",
"WARC-Date": "2021-09-16T11:43:39Z",
"WARC-IP-Address": "82.195.75.112",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:VH22FMT5QTETKPKJWHKLAACHYFL7MKM6",
"WARC-Record-ID": "<urn:uuid:3b7e12e0-b2cb-4f10-ac37-df74d6aa3f84>",
"WARC-Target-URI": "https://wiki.debian.org/PHP/GitMigration?action=recall&rev=6",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:22d9eaa1-a3a2-4867-8702-1a31252baa1b>"
},
"warc_info": "isPartOf: CC-MAIN-2021-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-48\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,
51,
52,
116,
117,
353,
354,
381,
382,
457,
458,
603,
604,
629,
630,
651,
652,
675,
676,
820,
821,
1054,
1055,
1081,
1082,
1284,
1285,
1422,
1423,
1437,
1438,
1604,
1605
],
"line_end_idx": [
51,
52,
116,
117,
353,
354,
381,
382,
457,
458,
603,
604,
629,
630,
651,
652,
675,
676,
820,
821,
1054,
1055,
1081,
1082,
1284,
1285,
1422,
1423,
1437,
1438,
1604,
1605,
1629
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1629,
"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.40059345960617065,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.008902080357074738,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.16320474445819855,
"rps_doc_frac_unique_words": 0.6539924144744873,
"rps_doc_mean_word_length": 4.908745288848877,
"rps_doc_num_sentences": 19,
"rps_doc_symbol_to_word_ratio": 0.0029673599638044834,
"rps_doc_unigram_entropy": 4.848092555999756,
"rps_doc_word_count": 263,
"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.01161890011280775,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -139.0094757080078,
"rps_doc_books_importance_length_correction": -125.21158599853516,
"rps_doc_openwebtext_importance": -70.23258972167969,
"rps_doc_openwebtext_importance_length_correction": -70.23258972167969,
"rps_doc_wikipedia_importance": -48.22604751586914,
"rps_doc_wikipedia_importance_length_correction": -35.2227783203125
},
"fasttext": {
"dclm": 0.3736904263496399,
"english": 0.8788933753967285,
"fineweb_edu_approx": 1.1146881580352783,
"eai_general_math": 0.7264063954353333,
"eai_open_web_math": 0.35761576890945435,
"eai_web_code": 0.9175928831100464
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.135",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.72",
"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": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-5,852,393,714,055,898,000 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I would like to use:
src="my_generated_image_from_php.jpg"
instead of
src="my_php_image.php"
How do I do it?
my_php_image.php like:
<?php
......
Header('Content-type: image/png');
imagepng($im2);
imagedestroy($im2);
......
?>
share|improve this question
1
Put them in the same directory? – Ben May 17 '11 at 2:30
Do you mean how do you get a php file to show up as .jpg? You would have to use mod_rewrite – tlunter May 17 '11 at 2:35
4 Answers 4
You are probably thinking about URL rewriting (mod_rewrite), which is used to serve something with different URL.
my_generated_image_from_php.jpeg (hiding real extension of the file called - 'php') may then get you the same thing as my_php_image.php?image=my_generated_image_from_php.jpeg.
When it comes to MIME-type and header of the script's response, it would be good if you could include it, but this is not required to achieve what you expect.
share|improve this answer
You'll need to send an image header along with the image binary in your my_php_image.php file like so:
header("Content-Type: image/jpeg");
echo file_get_contents("my_generated_image_from_php.jpeg");
Obviously, you'll need to make sure the relative path of the image is correct for it to work. Otherwise, just use an absolute path from the root directory.
If you do this, you'll be able to use the second option as the image source.
share|improve this answer
Here's how Drupal does it. Your URL to the image looks like index.php?q=some/path/to/the/image.jpg but if your webserver is set up right these simple rules:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
Now PHP can extract the request path with
$request_path = strtok($_SERVER['REQUEST_URI'], '?')
$base_path_len = strlen(rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/'));
// Unescape and strip $base_path prefix, leaving q without a leading slash.
$path = substr(urldecode($request_path), $base_path_len + 1);
Once you have done this as BraedenP says you just need the correct HTTP headers and off you go.
share|improve this answer
If I understand you correctly you will need to save your php generated image as an actual image file. I would start reading here:
http://php.net/manual/en/function.imagejpeg.php
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/6025601/how-to-generate-a-php-image-for-src",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2015-11",
"warc_metadata": {
"Content-Length": "79259",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:YTSVKK5CUDDXNZWVPML3O5HEDBMXNBJX",
"WARC-Concurrent-To": "<urn:uuid:c15b7595-2a61-4998-864d-403d782a9428>",
"WARC-Date": "2015-03-01T09:13:09Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:4GNCS6JTSFUAIIFSS22HESVF4FUERFNZ",
"WARC-Record-ID": "<urn:uuid:c1268ff3-7541-4bec-b4a7-710810a22c2b>",
"WARC-Target-URI": "http://stackoverflow.com/questions/6025601/how-to-generate-a-php-image-for-src",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:96d9cacc-cb82-4ed5-9b6f-188af44e5141>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-28-5-156.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-11\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for February 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,
157,
158,
179,
180,
218,
219,
230,
231,
254,
255,
271,
272,
295,
296,
302,
314,
354,
375,
400,
417,
421,
449,
453,
511,
516,
638,
639,
651,
652,
766,
767,
943,
944,
1103,
1104,
1130,
1131,
1234,
1235,
1271,
1331,
1332,
1488,
1489,
1566,
1567,
1593,
1594,
1751,
1752,
1788,
1824,
1852,
1853,
1895,
1896,
1949,
2021,
2097,
2159,
2160,
2256,
2257,
2283,
2284,
2414,
2415,
2463,
2464,
2490,
2491,
2503,
2504,
2506,
2514,
2515,
2593,
2594
],
"line_end_idx": [
25,
157,
158,
179,
180,
218,
219,
230,
231,
254,
255,
271,
272,
295,
296,
302,
314,
354,
375,
400,
417,
421,
449,
453,
511,
516,
638,
639,
651,
652,
766,
767,
943,
944,
1103,
1104,
1130,
1131,
1234,
1235,
1271,
1331,
1332,
1488,
1489,
1566,
1567,
1593,
1594,
1751,
1752,
1788,
1824,
1852,
1853,
1895,
1896,
1949,
2021,
2097,
2159,
2160,
2256,
2257,
2283,
2284,
2414,
2415,
2463,
2464,
2490,
2491,
2503,
2504,
2506,
2514,
2515,
2593,
2594,
2684
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2684,
"ccnet_original_nlines": 79,
"rps_doc_curly_bracket": 0.0014903099508956075,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3298429250717163,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.029668409377336502,
"rps_doc_frac_lines_end_with_ellipsis": 0.02500000037252903,
"rps_doc_frac_no_alph_words": 0.273996502161026,
"rps_doc_frac_unique_words": 0.551075279712677,
"rps_doc_mean_word_length": 5.3521504402160645,
"rps_doc_num_sentences": 41,
"rps_doc_symbol_to_word_ratio": 0.006980800069868565,
"rps_doc_unigram_entropy": 4.968270301818848,
"rps_doc_word_count": 372,
"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.040180809795856476,
"rps_doc_frac_chars_top_3gram": 0.0441989004611969,
"rps_doc_frac_chars_top_4gram": 0.009040679782629013,
"rps_doc_books_importance": -258.9199523925781,
"rps_doc_books_importance_length_correction": -258.9199523925781,
"rps_doc_openwebtext_importance": -118.64077758789062,
"rps_doc_openwebtext_importance_length_correction": -118.64077758789062,
"rps_doc_wikipedia_importance": -94.46257019042969,
"rps_doc_wikipedia_importance_length_correction": -94.46257019042969
},
"fasttext": {
"dclm": 0.7981986403465271,
"english": 0.8732360005378723,
"fineweb_edu_approx": 2.5430960655212402,
"eai_general_math": 0.0006008099881000817,
"eai_open_web_math": 0.24958688020706177,
"eai_web_code": 0.00008153999806381762
}
} | {
"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": "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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,982,490,219,445,836,000 | Closed Bug 593310 Opened 11 years ago Closed 11 years ago
show checkerboard for waiting-to-be-filled regions with browser elements as browsing surface
Categories
(Firefox for Android Graveyard :: General, defect, P1)
ARM
Android
defect
Tracking
(fennec2.0b4+)
VERIFIED FIXED
Tracking Status
fennec 2.0b4+ ---
People
(Reporter: blassey, Assigned: cjones)
References
Details
Attachments
(2 files, 3 obsolete files)
Attached patch patch (obsolete) — Splinter Review
This works, but its pretty simple so I assume it can be made faster.
Attachment #471797 - Flags: review?(mark.finkle)
I assumed we were moving this checkerboard handling into the platform?
I thought so too, but got a different impression when I asked cjones about it.
Comment on attachment 471797 [details] [diff] [review]
patch
Why change the background position at all? This probably is a really bad idea for performance.
Attachment #471797 - Flags: review-
(In reply to comment #3)
> Comment on attachment 471797 [details] [diff] [review]
> patch
>
> Why change the background position at all? This probably is a really bad idea
> for performance.
So that the chrckerbpard moves with the page and we don't look stalled. This is the behavior we've always had in fennec
Fwiw, this performs just fine on the nexus one
tracking-fennec: --- → 2.0b1+
OS: Linux → Android
Hardware: x86_64 → ARM
I heard some feedback that there might be a percieved performance issue. I'd like to not rush this for b1 and talk to roc (and others) about alternatives. Moving to beta2.
tracking-fennec: 2.0b1+ → 2.0b2+
Assignee: nobody → webapps
Duplicate of this bug: 597113
Brad mentioned that we could use mozAnimationFrame to make this faster. Let's try it.
Priority: -- → P1
Should be easy enough. Calls to scrollers are all mozAnimationFrame rate limited now anyways. Also, there are some other shadow layers changes afloat that may improve checkerboard perf as well.
If we want to stick with a checkerboard-style (i.e. repeated pattern, doesn't have to be a checkerboard) background, probably the maximally efficient way to implement that at the layers level is to create a PatternLayer type and allow the frontend to control which image is used for the source. Then we would set a visible area for the PatternLayer that fills whatever the shadow layer tree leaves empty, and draw the pattern with EXTEND_REPEAT. We would only need to allocate enough memory for the pattern image itself, not for the size of the area it occupied. This area can fluctuate wildly and can cover the entire <browser> surface. Drawing it to should be just a series of memcpy()s basically, so perf shouldn't suffer from the compression. This would work really well in GL too: we could allocate a texture the size of the pattern and use GL_REPEAT.
We could probably fold ColorLayer into PatternLayer to save code.
roc, how does that sound?
Folding ColorLayer into PatternLayer probably isn't a good idea.
How about adding a repeat flag to ImageLayer? Setting it would cause the image to be repeated to fill the entire visible region. The top-left of the image would still be anchored to 0,0 in the layer's coordinate system.
Ah, that sounds good. That should be a nice optimization for background-attached with a repeated image as well.
Actually, to get the sampling of repeated images right, instead of a "repeat flag" the new parameter should be a "tiling rectangle". The image is conceptually tiled to fill the rectangle before being clipped/transformed/sampled. You can't just manipulate the visible region or clip rect to get the effect of the tiling rectangle, because the tiling rectangle can restrict which pixels of the source image are sampled.
OK, I think I understand what you mean. We can still implement that efficiently with cairo, right? (Seems easy in theory.)
No, it's actually a huge pain to implement with cairo. See imgFrame::Draw. It's the right API though.
But you can implement the simple cases you care about --- such as when the tile rect contains the entire visible region --- very easily and just use a slow temporary-surface path for the other cases.
I thought about this some more, and we'd save at best about 1MB per <browser remote> with the tiling optimization. That's nothing to sneeze at, but before deciding if it's worthwhile, can someone please write out the UX goals for the checkerboard?
- what coordinate space is the checkerboard relative to
- how does it behave when the page is zoomed
- how is it rendered when there's a non-rectangular undefined region
If this is going to be complicated to implement, I'd rather keep it in XUL/HTML.
tracking-fennec: 2.0b2+ → 2.0b3+
Comment on attachment 471797 [details] [diff] [review]
patch
Let's give this a go and see what feedback we get.
Attachment #471797 - Flags: review?(mark.finkle) → review+
Comment on attachment 471797 [details] [diff] [review]
patch
Clearing Ben's r- since we have had no better patches since this patch
Attachment #471797 - Flags: review-
Whiteboard: [fennec-checkin-postb2][has-patch]
pushed the front-end patch after some unbitrotting:
http://hg.mozilla.org/mobile-browser/rev/55388b6a8d7d
Let's see how this works
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-checkin-postb2][has-patch]
The checkerboard doesn't move in a local desktop build of mine, it just stays fixed wrt viewport. My impression was that the goal of the checkerboard was to shot the user that panning events were being processed even though new pixels weren't rendered yet. If that's so, I'm not sure this impl quite does the trick because the entire screen can stay unchanged for an arbitrarily long time during panning.
(In reply to comment #21)
> The checkerboard doesn't move in a local desktop build of mine, it just stays
> fixed wrt viewport. My impression was that the goal of the checkerboard was to
> shot the user that panning events were being processed even though new pixels
> weren't rendered yet. If that's so, I'm not sure this impl quite does the
> trick because the entire screen can stay unchanged for an arbitrarily long time
> during panning.
That is so, so it sounds like this bit-rotted over the last 2.5 months.
Attached patch bitrot fix (obsolete) — Splinter Review
This patch fixes some bitrot that kept the checkerboard from moving
Attachment #489871 - Flags: review?(mbrubeck)
Comment on attachment 489871 [details] [diff] [review]
bitrot fix
Could you factor out the 2 repeated lines into a new method, updateBackgroundPosition(x,y)? r+ with that change.
Attachment #489871 - Flags: review?(mbrubeck) → review+
verified FIXED on builds:
Mozilla/5.0 (Maemo; Linux armv71; rv:2.0b8pre) Gecko/20101111 Namoroka/4.0b8pre Fennec/4.0b3pre
and
Mozilla/5.0 (Android; Linux armv71; rv:2.0b8pre) Gecko/20101111 Namoroka/4.0b8pre Fennec/4.0b3pre
Status: RESOLVED → VERIFIED
This seems to have regressed panning performance. Backing out. We can try to land again after bug 606730 lands.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
With the patches from both bug 606730 and this bug applied, panning smoothness is no longer noticeably regressed, but the repainting delay after panning still seems to be regressed.
Moving to blocking final. We should have some improvements landed by then that might make this work better.
tracking-fennec: 2.0b3+ → 2.0+
tracking-fennec: 2.0+ → 2.0b4+
We need to decide how best to approach this issue. The front-end patch was backed out again due to perceived panning regressions. We also show checkerboard (or gray areas without this patch) much more often than say Fennec 1.1
Can we also, increase the size of our render area to decrease the checkerboarding? I assume there is a memory size cost if we increase our render area.
(In reply to comment #17)
> I thought about this some more, and we'd save at best about 1MB per <browser
> remote> with the tiling optimization. That's nothing to sneeze at, but before
> deciding if it's worthwhile, can someone please write out the UX goals for the
> checkerboard?
>
> - what coordinate space is the checkerboard relative to
> - how does it behave when the page is zoomed
> - how is it rendered when there's a non-rectangular undefined region
>
> If this is going to be complicated to implement, I'd rather keep it in
> XUL/HTML.
The basic goal of the checkerboard is to let the user know something is happening when panning outpaces rendering. A checkerboard impl goals include:
* Show motion when panning. The appearance of motion is a visual queue to the user that something is happening.
* Do not zoom. The checkerboard should not participate in any content zooming and should always be rendered at a fixed scale.
* I'm not sure how often non-rectangular regions would be encountered, but the checkerboard should act as a background to any undefined/unrendered area of the screen.
Any other issues people can think of?
stechz, have you started on this? If not, I'll probably have time to poke next week.
(In reply to comment #32)
> * Show motion when panning. The appearance of motion is a visual queue to the
> user that something is happening.
> * Do not zoom. The checkerboard should not participate in any content zooming
> and should always be rendered at a fixed scale.
So from this, it sounds like this spec might suffice
- "checkerboard space" point <0, 0> == document <0, 0>
- checkerboard space has units of device pixels, independent of document-space scaling/app-units etc.
- the checkerboard area is conceptually infinite
This would mean that
- panning a <browser>'s content by <dx, dy> device pixels also translates the checkerboard top-left point within the <browser> by <dx, dy>
- if fuzzy-zooming a <browser>'s content changes its document origin by <dx, dy> device pixels, then the checkerboard top-left translates by <dx, dy>
The second implication above means that if, say, the viewport top-left of web content were <100, 100>, and the entire <browser> were checkerboard, and the user pinch-zoomed, then the checkerboard would move translate horizontally and vertically during the pinch-zoom animation. I'm not sure if this squares with comment 32.
No, have not started yet. Feel free to claim.
Assignee: ben → nobody
Assignee: nobody → jones.chris.g
See long comment in BuildBackgroundPatternFor().
Before anyone objects, yes GetBackgroundImage() is probably the grossest bit of code ever written, but figuring out how to get a background down from the frontend to RenderFrameParent shouldn't block the initial landing, I don't think. Might be a long discussion there. The placeholder image is the existing checkerboard.png image from mobile-browser, shrunk to 16x16, and converted to rgb565.
This patch also includes
- rebuild ContainerLayer for shadow tree each time, instead of only when things changed. Should be fast and caching got a lot more complicated by this patch.
- removal of assertions made obsolete by this patch
- removal of some dead code
- minor indentation and style fixes
I'll get an android build up after dinner.
Attachment #471797 - Attachment is obsolete: true
Attachment #489871 - Attachment is obsolete: true
Attachment #505624 - Flags: review?(tnikkel)
Attachment #505624 - Flags: review?(ben)
Should also note we can tune perf by changing the size of the background image, to fit the cairo path we're hitting here, but this seemed fast enough on my galaxy S already. Will poke more with the upcoming build.
Build with a 16x16 pattern
http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-16x16.apk
and one with a 32x32
http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-32x32.apk
The 32x32 one seems a bit more distracting to me, but maybe we could lighten the gray or something.
Comment on attachment 505624 [details] [diff] [review]
Bug 593310: Add initial support for drawing a moving, default background where shadow-layer content is undefined (as efficiently as possible)
>+already_AddRefed<gfxASurface>
>+GetBackgroundImage()
>+{
>+ // XXX TODO FIXME/bug XXXXXX: this is obviously a hacky placeloader
>+ // impl. Unclear how the background pattern source should be set.
Hmm. How about a URI as a preference for the checkerboard image?
It otherwise looks good to me, but I'm no expert of this code. Nice cleanup too.
Attachment #505624 - Flags: review?(ben)
(In reply to comment #41)
> Hmm. How about a URI as a preference for the checkerboard image?
OK, this is the discussion I wanted to postpone :(.
- for this implementation to be simple+fast with GL (out of the box anyway), the dimensions of the image need to be a power of 2
- what's the maximum allowed image size?
- what formats do we allow? is SVG OK?
- what happens if the URI is invalid or doesn't meet one of the above criteria?
If we wanted to do this right, I also think the background should be specified as CSS-ily as possible. At minimum, a <browser> property, at best, re-use background-repeat but fast-path it.
I missed the above comment. I have no objections to landing this with generating the background image (and filing a followup).
OK; I thought you cleared the review request as a "virtual r-".
Just to be clear, my point in wanting to put off this discussion is, if for beta4 the checkerboard background is going to just be a dirty hack, one is good as the next to me. A pref implies some modicum of support, which I don't believe we want to be true :).
Attachment #505624 - Flags: review+
(In reply to comment #43)
> I missed the above comment. I have no objections to landing this with
> generating the background image (and filing a followup).
Agreed. We can work out this part later. Maybe looking to see how other C++
code acquires image resources.
My favorite is fast-path for CSS background-image repeat property.
(In reply to comment #45)
> Agreed. We can work out this part later. Maybe looking to see how other C++
> code acquires image resources.
Getting the image bits isn't a problem, but there are several others. Filed bug 627828.
(In reply to comment #40)
> Build with a 16x16 pattern
>
> http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-16x16.apk
>
> and one with a 32x32
>
> http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-32x32.apk
>
> The 32x32 one seems a bit more distracting to me, but maybe we could lighten
> the gray or something.
Any updates on which size is preferred?
(In reply to comment #49)
> (In reply to comment #40)
> > Build with a 16x16 pattern
> >
> > http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-16x16.apk
> >
> > and one with a 32x32
> >
> > http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm-32x32.apk
> >
> > The 32x32 one seems a bit more distracting to me, but maybe we could lighten
> > the gray or something.
>
> Any updates on which size is preferred?
I think the 16x16 works well. The 32x32 was harder for my eyes to track while panning.
Comment on attachment 506618 [details] [diff] [review]
Add initial support for drawing a moving, default background where shadow-layer content is undefined (as efficiently as possible), v2
There's no attempt to retain the checkerboard image layer. For GL this is going to re-upload the checkerboard pattern every time. Is that OK?
Otherwise looks good.
Attachment #506618 - Flags: review?(tnikkel) → review+
(In reply to comment #51)
> There's no attempt to retain the checkerboard image layer. For GL this is going
> to re-upload the checkerboard pattern every time. Is that OK?
Probably not. See bug 628566 comment 0.
http://hg.mozilla.org/mozilla-central/rev/8d160fb8f2db
http://hg.mozilla.org/mozilla-central/rev/bfd44071cce9
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
FTR, I landed with the 16x16 checkerboard, but I've still got the patch for 32x32 if we want to switch at the last minute. It's pretty trivial to do regardless.
I'm not seeing the checkerboard pattern in Fennec trunk builds. Do we need to enable something in mobile-browser?
Nope. I've been running local builds on my phone since last week without problems, but they weren't always with up-to-date m-b. Rebuilding now.
Yeah, I'm not seeing it either with m-b tip. Will look after lunch.
I just landed a followup fix for bug 627273 that wfm locally. Mind giving it a try?
I posted a build that's ~beta4 candidate here
http://people.mozilla.com/~cjones/fennec-4.0b4pre.en-US.eabi-arm.apk
m-c f2ac3e4722c4, m-b da68f67cc6ad
Depends on: 629475
Commenting on bug Bug 624444 and got to this one.
I was unaware of this improvement; Now I know the idea is to give the user the perception of "something's still happening".
However, when I first tried b4, the checker pattern immediately made me feel something was wrong. While using b3 I never had the need for the application to tell me it was still alive; Now I have the application permanently reminding me that it's working.
My perception is: beta4 is much slower than beta3. Turns out that it's mostly wrong perception (but it's still very important).
As an analogy with the desktop firefox, when a page is loading we see the missing spots as white bg as they get filled, and that's what I'm used to.
I vote for going back to good'ol white (or whatever is the bg color of the page)
Verified fixed on:
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110915
Firefox/9.0a1 Fennec/9.0a1
Device: Samsung Galaxy S
OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug. | {
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=593310",
"source_domain": "bugzilla.mozilla.org",
"snapshot_id": "crawl=CC-MAIN-2021-25",
"warc_metadata": {
"Content-Length": "233680",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:K4LTLRSYRTFGUKGYJTKMM2XWZLUIEXOJ",
"WARC-Concurrent-To": "<urn:uuid:954f9181-4073-407a-abfd-f268eab45783>",
"WARC-Date": "2021-06-23T19:47:37Z",
"WARC-IP-Address": "35.160.77.0",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5RNJMHIPM3B4XUX2E653KS6B7ON4D7II",
"WARC-Record-ID": "<urn:uuid:ac29b87a-f723-410c-ad78-b1d56d85f087>",
"WARC-Target-URI": "https://bugzilla.mozilla.org/show_bug.cgi?id=593310",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bbe49a65-c7dc-4890-b9ef-167c55866244>"
},
"warc_info": "isPartOf: CC-MAIN-2021-25\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-168.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,
58,
59,
152,
153,
164,
165,
220,
221,
225,
233,
240,
241,
250,
251,
266,
267,
282,
298,
316,
317,
324,
325,
363,
364,
375,
376,
384,
385,
397,
398,
426,
427,
477,
546,
595,
666,
745,
800,
806,
807,
902,
938,
963,
1020,
1028,
1031,
1111,
1130,
1131,
1251,
1298,
1328,
1348,
1371,
1543,
1576,
1603,
1633,
1719,
1737,
1931,
2793,
2794,
2860,
2861,
2887,
2952,
2953,
3173,
3286,
3704,
3829,
3931,
4131,
4380,
4381,
4438,
4484,
4554,
4555,
4636,
4669,
4724,
4730,
4731,
4782,
4841,
4896,
4902,
4903,
4974,
5010,
5057,
5109,
5163,
5164,
5189,
5212,
5233,
5257,
5304,
5711,
5737,
5817,
5899,
5979,
6056,
6138,
6156,
6157,
6229,
6284,
6352,
6398,
6453,
6464,
6465,
6579,
6635,
6661,
6662,
6758,
6759,
6763,
6764,
6862,
6890,
7002,
7030,
7054,
7236,
7344,
7375,
7406,
7633,
7634,
7786,
7812,
7891,
7972,
8053,
8069,
8072,
8131,
8179,
8251,
8254,
8327,
8339,
8340,
8490,
8602,
8728,
8895,
8896,
8934,
9020,
9046,
9126,
9162,
9242,
9292,
9293,
9346,
9402,
9505,
9555,
9556,
9577,
9717,
9868,
9869,
10194,
10240,
10263,
10296,
10345,
10346,
10742,
10743,
10768,
10928,
10981,
11010,
11047,
11048,
11091,
11141,
11191,
11236,
11277,
11492,
11519,
11520,
11595,
11596,
11617,
11618,
11693,
11694,
11794,
11849,
11991,
11992,
12024,
12047,
12051,
12123,
12194,
12195,
12260,
12261,
12342,
12383,
12409,
12476,
12477,
12529,
12530,
12660,
12702,
12743,
12824,
12825,
13015,
13142,
13206,
13207,
13468,
13504,
13530,
13602,
13661,
13662,
13738,
13769,
13836,
13862,
13940,
13973,
13974,
14063,
14089,
14118,
14121,
14198,
14201,
14224,
14227,
14304,
14307,
14386,
14411,
14412,
14452,
14478,
14506,
14537,
14542,
14621,
14626,
14651,
14656,
14735,
14740,
14821,
14848,
14851,
14893,
14894,
14981,
15036,
15170,
15171,
15313,
15314,
15336,
15391,
15417,
15499,
15563,
15564,
15605,
15660,
15715,
15743,
15776,
15800,
15962,
16077,
16223,
16292,
16377,
16423,
16424,
16493,
16494,
16529,
16548,
16598,
16599,
16724,
16725,
16726,
16982,
16983,
16984,
17112,
17113,
17114,
17263,
17264,
17265,
17346,
17365,
17423,
17450,
17475,
17491,
17519
],
"line_end_idx": [
58,
59,
152,
153,
164,
165,
220,
221,
225,
233,
240,
241,
250,
251,
266,
267,
282,
298,
316,
317,
324,
325,
363,
364,
375,
376,
384,
385,
397,
398,
426,
427,
477,
546,
595,
666,
745,
800,
806,
807,
902,
938,
963,
1020,
1028,
1031,
1111,
1130,
1131,
1251,
1298,
1328,
1348,
1371,
1543,
1576,
1603,
1633,
1719,
1737,
1931,
2793,
2794,
2860,
2861,
2887,
2952,
2953,
3173,
3286,
3704,
3829,
3931,
4131,
4380,
4381,
4438,
4484,
4554,
4555,
4636,
4669,
4724,
4730,
4731,
4782,
4841,
4896,
4902,
4903,
4974,
5010,
5057,
5109,
5163,
5164,
5189,
5212,
5233,
5257,
5304,
5711,
5737,
5817,
5899,
5979,
6056,
6138,
6156,
6157,
6229,
6284,
6352,
6398,
6453,
6464,
6465,
6579,
6635,
6661,
6662,
6758,
6759,
6763,
6764,
6862,
6890,
7002,
7030,
7054,
7236,
7344,
7375,
7406,
7633,
7634,
7786,
7812,
7891,
7972,
8053,
8069,
8072,
8131,
8179,
8251,
8254,
8327,
8339,
8340,
8490,
8602,
8728,
8895,
8896,
8934,
9020,
9046,
9126,
9162,
9242,
9292,
9293,
9346,
9402,
9505,
9555,
9556,
9577,
9717,
9868,
9869,
10194,
10240,
10263,
10296,
10345,
10346,
10742,
10743,
10768,
10928,
10981,
11010,
11047,
11048,
11091,
11141,
11191,
11236,
11277,
11492,
11519,
11520,
11595,
11596,
11617,
11618,
11693,
11694,
11794,
11849,
11991,
11992,
12024,
12047,
12051,
12123,
12194,
12195,
12260,
12261,
12342,
12383,
12409,
12476,
12477,
12529,
12530,
12660,
12702,
12743,
12824,
12825,
13015,
13142,
13206,
13207,
13468,
13504,
13530,
13602,
13661,
13662,
13738,
13769,
13836,
13862,
13940,
13973,
13974,
14063,
14089,
14118,
14121,
14198,
14201,
14224,
14227,
14304,
14307,
14386,
14411,
14412,
14452,
14478,
14506,
14537,
14542,
14621,
14626,
14651,
14656,
14735,
14740,
14821,
14848,
14851,
14893,
14894,
14981,
15036,
15170,
15171,
15313,
15314,
15336,
15391,
15417,
15499,
15563,
15564,
15605,
15660,
15715,
15743,
15776,
15800,
15962,
16077,
16223,
16292,
16377,
16423,
16424,
16493,
16494,
16529,
16548,
16598,
16599,
16724,
16725,
16726,
16982,
16983,
16984,
17112,
17113,
17114,
17263,
17264,
17265,
17346,
17365,
17423,
17450,
17475,
17491,
17519,
17592
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 17592,
"ccnet_original_nlines": 320,
"rps_doc_curly_bracket": 0.00005683999916072935,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.337496817111969,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.028294669464230537,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2658679485321045,
"rps_doc_frac_unique_words": 0.28792911767959595,
"rps_doc_mean_word_length": 5.027685642242432,
"rps_doc_num_sentences": 248,
"rps_doc_symbol_to_word_ratio": 0.006117769982665777,
"rps_doc_unigram_entropy": 5.845535755157471,
"rps_doc_word_count": 2709,
"rps_doc_frac_chars_dupe_10grams": 0.27745962142944336,
"rps_doc_frac_chars_dupe_5grams": 0.3198238015174866,
"rps_doc_frac_chars_dupe_6grams": 0.297283411026001,
"rps_doc_frac_chars_dupe_7grams": 0.28436124324798584,
"rps_doc_frac_chars_dupe_8grams": 0.28436124324798584,
"rps_doc_frac_chars_dupe_9grams": 0.27745962142944336,
"rps_doc_frac_chars_top_2gram": 0.027533039450645447,
"rps_doc_frac_chars_top_3gram": 0.007268719840794802,
"rps_doc_frac_chars_top_4gram": 0.012922169640660286,
"rps_doc_books_importance": -1515.4400634765625,
"rps_doc_books_importance_length_correction": -1515.4400634765625,
"rps_doc_openwebtext_importance": -869.2097778320312,
"rps_doc_openwebtext_importance_length_correction": -869.2097778320312,
"rps_doc_wikipedia_importance": -684.6148681640625,
"rps_doc_wikipedia_importance_length_correction": -684.6148681640625
},
"fasttext": {
"dclm": 0.0697774887084961,
"english": 0.9143004417419434,
"fineweb_edu_approx": 1.4224880933761597,
"eai_general_math": 0.5164694786071777,
"eai_open_web_math": 0.4654582142829895,
"eai_web_code": 0.43479377031326294
}
} | {
"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": "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": "-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": "18",
"label": "Q&A Forum"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
7,288,232,433,391,190,000 | You asked: How do I filter duplicate rows in SQL Server?
How do you delete duplicate rows in SQL Server?
To delete the duplicate rows from the table in SQL Server, you follow these steps:
1. Find duplicate rows using GROUP BY clause or ROW_NUMBER() function.
2. Use DELETE statement to remove the duplicate rows.
How do I eliminate the duplicate rows?
Remove duplicate values
1. Select the range of cells that has duplicate values you want to remove. Tip: Remove any outlines or subtotals from your data before trying to remove duplicates.
2. Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates. …
3. Click OK.
How can we avoid duplicate records in SQL without distinct?
Below are alternate solutions :
1. Remove Duplicates Using Row_Number. WITH CTE (Col1, Col2, Col3, DuplicateCount) AS ( SELECT Col1, Col2, Col3, ROW_NUMBER() OVER(PARTITION BY Col1, Col2, Col3 ORDER BY Col1) AS DuplicateCount FROM MyTable ) SELECT * from CTE Where DuplicateCount = 1.
2. Remove Duplicates using group By.
How do I remove duplicate rows in select query?
The go to solution for removing duplicate rows from your result sets is to include the distinct keyword in your select statement. It tells the query engine to remove duplicates to produce a result set in which every row is unique. The group by clause can also be used to remove duplicates.
IT IS INTERESTING: What is readObject in Java?
How do I select duplicate rows in SQL?
To select duplicate values, you need to create groups of rows with the same values and then select the groups with counts greater than one. You can achieve that by using GROUP BY and a HAVING clause.
How do I remove duplicates from a query?
Remove duplicate rows
1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel.
2. Select a column by clicking the column header. …
3. Select Home > Remove Rows > Remove Duplicates.
How do you delete one record from duplicates in SQL?
So to delete the duplicate record with SQL Server we can use the SET ROWCOUNT command to limit the number of rows affected by a query. By setting it to 1 we can just delete one of these rows in the table. Note: the select commands are just used to show the data prior and after the delete occurs.
How prevent duplicate rows in SQL JOIN?
The keyword DISTINCT is used to eliminate duplicate rows from a query result: SELECT DISTINCT … FROM A JOIN B ON … However, you can sometimes (possibly even ‘often’, but not always) avoid the need for it if the tables are organized correctly and you are joining correctly.
What is difference between unique and distinct?
The main difference between unique and distinct is that UNIQUE is a constraint that is used on the input of data and ensures data integrity. While DISTINCT keyword is used when we want to query our results or in other words, output the data.
IT IS INTERESTING: Is MySQL similar to MS Access?
What causes duplicate rows in SQL?
If you do not include DISTINCT in a SELECT clause, you might find duplicate rows in your result, because SQL returns the JOB column’s value for each row that satisfies the search condition. Null values are treated as duplicate rows for DISTINCT.
How do I find duplicate rows in SQL using Rowid?
Use the rowid pseudocolumn. DELETE FROM your_table WHERE rowid not in (SELECT MIN(rowid) FROM your_table GROUP BY column1, column2, column3); Where column1 , column2 , and column3 make up the identifying key for each record. You might list all your columns. | {
"url": "https://d5websoft.com/hints/you-asked-how-do-i-filter-duplicate-rows-in-sql-server.html",
"source_domain": "d5websoft.com",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "72413",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RT47YFYNVBTYHRLIILH3KTINVAZQ37CK",
"WARC-Concurrent-To": "<urn:uuid:a57c5275-ad69-4f62-831b-cd4f5c9a632f>",
"WARC-Date": "2022-01-21T01:58:43Z",
"WARC-IP-Address": "144.126.128.2",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:7ZDXOR5VQY27VM2SVJ4R6EECODRSTYOG",
"WARC-Record-ID": "<urn:uuid:ac22ccce-86ad-463f-be4f-999df81af326>",
"WARC-Target-URI": "https://d5websoft.com/hints/you-asked-how-do-i-filter-duplicate-rows-in-sql-server.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bfb2fc70-26b9-4853-90a1-f1915bec4410>"
},
"warc_info": "isPartOf: CC-MAIN-2022-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-101\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,
57,
58,
106,
107,
190,
191,
264,
320,
321,
360,
361,
385,
386,
552,
685,
700,
701,
761,
762,
794,
795,
1050,
1089,
1090,
1138,
1139,
1429,
1430,
1478,
1479,
1518,
1519,
1719,
1720,
1761,
1762,
1784,
1785,
1987,
2041,
2093,
2094,
2147,
2148,
2445,
2446,
2486,
2487,
2760,
2761,
2809,
2810,
3052,
3053,
3104,
3105,
3140,
3141,
3387,
3388,
3437,
3438
],
"line_end_idx": [
57,
58,
106,
107,
190,
191,
264,
320,
321,
360,
361,
385,
386,
552,
685,
700,
701,
761,
762,
794,
795,
1050,
1089,
1090,
1138,
1139,
1429,
1430,
1478,
1479,
1518,
1519,
1719,
1720,
1761,
1762,
1784,
1785,
1987,
2041,
2093,
2094,
2147,
2148,
2445,
2446,
2486,
2487,
2760,
2761,
2809,
2810,
3052,
3053,
3104,
3105,
3140,
3141,
3387,
3388,
3437,
3438,
3695
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3695,
"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.3221476376056671,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.09530200809240341,
"rps_doc_frac_lines_end_with_ellipsis": 0.0317460298538208,
"rps_doc_frac_no_alph_words": 0.16778522729873657,
"rps_doc_frac_unique_words": 0.3333333432674408,
"rps_doc_mean_word_length": 4.560821533203125,
"rps_doc_num_sentences": 53,
"rps_doc_symbol_to_word_ratio": 0.005369130056351423,
"rps_doc_unigram_entropy": 4.774721622467041,
"rps_doc_word_count": 633,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04018012061715126,
"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.07204710692167282,
"rps_doc_frac_chars_top_3gram": 0.04156564176082611,
"rps_doc_frac_chars_top_4gram": 0.03740907832980156,
"rps_doc_books_importance": -356.96661376953125,
"rps_doc_books_importance_length_correction": -356.96661376953125,
"rps_doc_openwebtext_importance": -248.4593048095703,
"rps_doc_openwebtext_importance_length_correction": -248.4593048095703,
"rps_doc_wikipedia_importance": -175.1210174560547,
"rps_doc_wikipedia_importance_length_correction": -175.1210174560547
},
"fasttext": {
"dclm": 0.9653005003929138,
"english": 0.8164364099502563,
"fineweb_edu_approx": 2.736255645751953,
"eai_general_math": 0.830079197883606,
"eai_open_web_math": 0.06001460924744606,
"eai_web_code": 0.9409527778625488
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.746",
"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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
8,249,829,055,047,215,000 | topic email body ignores line returns in General Power Automate Discussion https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55211#M10929 <P>Hello,</P><P>I have a problem that I cannot figure out.</P><P>I have a flow that collects the body of an e-mail and puts it on the body of an event. In doing that I converted from HTML to text. I then e-mail that content. </P><P>When I run the flow on that second e-mail the text collapses into several few lines in what seems a random way (it does not really matter it is random, I would just like it would not do it).</P><P>so if the original mail reads:</P><P>«</P><P>Bananas</P><P>Oranges</P><P>Peaches</P><P>»</P><P>The second mail looks like that but without formatting and the third looks like:</P><P>«</P><P>Bananas Oranges Peaches</P><P>»</P><P> </P><P>Any ideas?</P><P>N</P><P> </P> Fri, 08 Sep 2017 00:31:19 GMT nsgma 2017-09-08T00:31:19Z email body ignores line returns https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55211#M10929 <P>Hello,</P><P>I have a problem that I cannot figure out.</P><P>I have a flow that collects the body of an e-mail and puts it on the body of an event. In doing that I converted from HTML to text. I then e-mail that content. </P><P>When I run the flow on that second e-mail the text collapses into several few lines in what seems a random way (it does not really matter it is random, I would just like it would not do it).</P><P>so if the original mail reads:</P><P>«</P><P>Bananas</P><P>Oranges</P><P>Peaches</P><P>»</P><P>The second mail looks like that but without formatting and the third looks like:</P><P>«</P><P>Bananas Oranges Peaches</P><P>»</P><P> </P><P>Any ideas?</P><P>N</P><P> </P> Fri, 08 Sep 2017 00:31:19 GMT https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55211#M10929 nsgma 2017-09-08T00:31:19Z Re: email body ignores line returns https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55222#M10930 <P>Are you using the Outlook connector? I tried the scenario you described and used the "Html to text" connector. It mostly preserved the formatting of my email:</P><P> </P><P>Original message:</P><P>"Unique</P><P>formatting</P><P>example"</P><P> </P><P>Output:</P><P>"Unique</P><P> </P><P>formatting</P><P> </P><P>example"</P><P> </P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HtmlToTextConverter.png" style="width: 600px;"><img src="https://powerusers.microsoft.com/t5/image/serverpage/image-id/11124iDE20105079EDC3E5/image-size/large/is-moderation-mode/true?v=v2&px=999" role="button" title="HtmlToTextConverter.png" alt="HtmlToTextConverter.png" /></span></P> Fri, 08 Sep 2017 02:45:58 GMT https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55222#M10930 melim 2017-09-08T02:45:58Z Re: email body ignores line returns https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55300#M10931 <P>Hi <LI-USER uid="6824"></LI-USER></P><P>It's on the second round that it happens - meaning if you go through the flow a second time with the same message.</P><P>But actually it is quite easy to replicate, if your message is not html but rich or plain text the line breaks will go so</P><P>«</P><P>Rice</P><P>Pasta</P><P>Patatoes</P><P>»</P><P>becomes</P><P> </P><P>«</P><P>RicePastaPatatoes</P><P>»</P><P> </P><P>Is there a to check if a message is html or not?</P><P>Is the only way to work with the body of a message to convert to text?</P><P> </P><P>Thanks,N</P> Fri, 08 Sep 2017 10:39:42 GMT https://powerusers.microsoft.com/t5/General-Power-Automate/email-body-ignores-line-returns/m-p/55300#M10931 nsgma 2017-09-08T10:39:42Z | {
"url": "https://powerusers.microsoft.com/rss/message?board.id=MPAForum&message.id=10929",
"source_domain": "powerusers.microsoft.com",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "6490",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2T3BOFE7OBHH5FK2VJLLQKFWOQQIWEXG",
"WARC-Concurrent-To": "<urn:uuid:188de22e-b67d-41a9-a001-86ba22f9fef8>",
"WARC-Date": "2022-06-26T06:37:54Z",
"WARC-IP-Address": "23.1.59.115",
"WARC-Identified-Payload-Type": "application/rss+xml",
"WARC-Payload-Digest": "sha1:J2KW2XGCGUZHAVETPPQU7OJF6BRU6SEQ",
"WARC-Record-ID": "<urn:uuid:939d2744-ad7f-4da2-9d9c-dede444b67a6>",
"WARC-Target-URI": "https://powerusers.microsoft.com/rss/message?board.id=MPAForum&message.id=10929",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:acd56f04-cd62-4694-a401-30a8ee30bfe8>"
},
"warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-185\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0
],
"line_end_idx": [
3931
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3931,
"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.1901172548532486,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.1532663255929947,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3911222815513611,
"rps_doc_frac_unique_words": 0.3825857639312744,
"rps_doc_mean_word_length": 7.617414474487305,
"rps_doc_num_sentences": 38,
"rps_doc_symbol_to_word_ratio": 0.005862649995833635,
"rps_doc_unigram_entropy": 4.637226104736328,
"rps_doc_word_count": 379,
"rps_doc_frac_chars_dupe_10grams": 0.4218912422657013,
"rps_doc_frac_chars_dupe_5grams": 0.4606858193874359,
"rps_doc_frac_chars_dupe_6grams": 0.4419812858104706,
"rps_doc_frac_chars_dupe_7grams": 0.4218912422657013,
"rps_doc_frac_chars_dupe_8grams": 0.4218912422657013,
"rps_doc_frac_chars_dupe_9grams": 0.4218912422657013,
"rps_doc_frac_chars_top_2gram": 0.012123310007154942,
"rps_doc_frac_chars_top_3gram": 0.015587110072374344,
"rps_doc_frac_chars_top_4gram": 0.027710430324077606,
"rps_doc_books_importance": -497.466796875,
"rps_doc_books_importance_length_correction": -497.466796875,
"rps_doc_openwebtext_importance": -310.4770202636719,
"rps_doc_openwebtext_importance_length_correction": -310.4770202636719,
"rps_doc_wikipedia_importance": -259.6246337890625,
"rps_doc_wikipedia_importance_length_correction": -259.6246337890625
},
"fasttext": {
"dclm": 0.029791949316859245,
"english": 0.6957040429115295,
"fineweb_edu_approx": 1.2201119661331177,
"eai_general_math": 0.48851072788238525,
"eai_open_web_math": 0.2508264183998108,
"eai_web_code": 0.14801877737045288
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "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": "1",
"label": "Leftover HTML"
},
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-469,763,124,683,641,600 | /[pcre]/code/tags/pcre-1.03/Tech.Notes
ViewVC logotype
Contents of /code/tags/pcre-1.03/Tech.Notes
Parent Directory Parent Directory | Revision Log Revision Log
Revision 10 - (show annotations)
Sat Feb 24 21:38:15 2007 UTC (13 years, 1 month ago) by nigel
File size: 7401 byte(s)
Tag code/trunk as code/tags/pcre-1.03.
1 Technical Notes about PCRE
2 --------------------------
3
4 Many years ago I implemented some regular expression functions to an algorithm
5 suggested by Martin Richards. These were not Unix-like in form, and were quite
6 restricted in what they could do by comparison with Perl. The interesting part
7 about the algorithm was that the amount of space required to hold the compiled
8 form of an expression was known in advance. The code to apply an expression did
9 not operate by backtracking, as the Henry Spencer and Perl code does, but
10 instead checked all possibilities simultaneously by keeping a list of current
11 states and checking all of them as it advanced through the subject string. (In
12 the terminology of Jeffrey Friedl's book, it was a "DFA algorithm".) When the
13 pattern was all used up, all remaining states were possible matches, and the
14 one matching the longest subset of the subject string was chosen. This did not
15 necessarily maximize the individual wild portions of the pattern, as is
16 expected in Unix and Perl-style regular expressions.
17
18 By contrast, the code originally written by Henry Spencer and subsequently
19 heavily modified for Perl actually compiles the expression twice: once in a
20 dummy mode in order to find out how much store will be needed, and then for
21 real. The execution function operates by backtracking and maximizing (or
22 minimizing in Perl) the amount of the subject that matches individual wild
23 portions of the pattern. This is a "NFA algorithm".
24
25 For this set of functions, I tried at first to invent an algorithm that used an
26 amount of store bounded by a multiple of the number of characters in the
27 pattern, to save on compiling time. However, because of the greater complexity
28 in Perl regular expressions, I couldn't do this. In any case, a first pass
29 through the pattern is needed, in order to find internal flag settings like
30 (?i). So it works by running a very degenerate first pass to calculate a
31 maximum store size, and then a second pass to do the real compile - which may
32 use a bit less than the predicted amount of store. The idea is that this is
33 going to turn out faster because the first pass is degenerate and the second
34 can just store stuff straight into the vector. It does make the compiling
35 functions bigger, of course, but they have got quite big anyway to handle all
36 the Perl stuff.
37
38 The compiled form of a pattern is a vector of bytes, containing items of
39 variable length. The first byte in an item is an opcode, and the length of the
40 item is either implicit in the opcode or contained in the data bytes which
41 follow it. A list of all the opcodes follows:
42
43 Opcodes with no following data
44 ------------------------------
45
46 These items are all just one byte long
47
48 OP_END end of pattern
49 OP_ANY match any character
50 OP_SOD match start of data: \A
51 OP_CIRC ^ (start of data, or after \n in multiline)
52 OP_NOT_WORD_BOUNDARY \W
53 OP_WORD_BOUNDARY \w
54 OP_NOT_DIGIT \D
55 OP_DIGIT \d
56 OP_NOT_WHITESPACE \S
57 OP_WHITESPACE \s
58 OP_NOT_WORDCHAR \W
59 OP_WORDCHAR \w
60 OP_CUT analogue of Prolog's "cut"
61 OP_EOD match end of data: \Z
62 OP_DOLL $ (end of data, or before \n in multiline)
63
64
65 Repeating single characters
66 ---------------------------
67
68 The common repeats (*, +, ?) when applied to a single character appear as
69 two-byte items using the following opcodes:
70
71 OP_STAR
72 OP_MINSTAR
73 OP_PLUS
74 OP_MINPLUS
75 OP_QUERY
76 OP_MINQUERY
77
78 Those with "MIN" in their name are the minimizing versions. Each is followed by
79 the character that is to be repeated. Other repeats make use of
80
81 OP_UPTO
82 OP_MINUPTO
83 OP_EXACT
84
85 which are followed by a two-byte count (most significant first) and the
86 repeated character. OP_UPTO matches from 0 to the given number. A repeat with a
87 non-zero minimum and a fixed maximum is coded as an OP_EXACT followed by an
88 OP_UPTO (or OP_MINUPTO).
89
90
91 Repeating character types
92 -------------------------
93
94 Repeats of things like \d are done exactly as for single characters, except
95 that instead of a character, the opcode for the type is stored in the data
96 byte. The opcodes are:
97
98 OP_TYPESTAR
99 OP_TYPEMINSTAR
100 OP_TYPEPLUS
101 OP_TYPEMINPLUS
102 OP_TYPEQUERY
103 OP_TYPEMINQUERY
104 OP_TYPEUPTO
105 OP_TYPEMINUPTO
106 OP_TYPEEXACT
107
108
109 Matching a character string
110 ---------------------------
111
112 The OP_CHARS opcode is followed by a one-byte count and then that number of
113 characters. If there are more than 255 characters in sequence, successive
114 instances of OP_CHARS are used.
115
116
117 Character classes
118 -----------------
119
120 OP_CLASS is used for a character class. It is followed by a 32-byte bit map
121 containing a 1 bit for every character that is acceptable. The bits are counted
122 from the least significant end of each byte.
123
124
125 Back references
126 ---------------
127
128 OP_REF is followed by a single byte containing the reference number.
129
130
131 Repeating character classes and back references
132 -----------------------------------------------
133
134 In both cases, the repeat information follows the base item. The matching code
135 looks at the following opcode to see if it is one of
136
137 OP_CRSTAR
138 OP_CRMINSTAR
139 OP_CRPLUS
140 OP_CRMINPLUS
141 OP_CRQUERY
142 OP_CRMINQUERY
143 OP_CRRANGE
144 OP_CRMINRANGE
145
146 All but the last two are just single-byte items. The others are followed by
147 four bytes of data, comprising the minimum and maximum repeat counts.
148
149
150 Brackets and alternation
151 ------------------------
152
153 A pair of non-identifying (round) brackets is wrapped round each expression at
154 compile time, so alternation always happens in the context of brackets.
155 Non-identifying brackets use the opcode OP_BRA, while identifying brackets use
156 OP_BRA+1, OP_BRA+2, etc. [Note for North Americans: "bracket" to some English
157 speakers, including myself, can be round, square, or curly. Hence this usage.]
158
159 A bracket opcode is followed by two bytes which give the offset to the next
160 alternative OP_ALT or, if there aren't any branches, to the matching KET
161 opcode. Each OP_ALT is followed by two bytes giving the offset to the next one,
162 or to the KET opcode.
163
164 OP_KET is used for subpatterns that do not repeat indefinitely, while
165 OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or
166 maximally respectively. All three are followed by two bytes giving (as a
167 positive number) the offset back to the matching BRA opcode.
168
169 If a subpattern is quantified such that it is permitted to match zero times, it
170 is preceded by one of OP_BRAZERO or OP_BRAMINZERO. These are single-byte
171 opcodes which tell the matcher that skipping this subpattern entirely is a
172 valid branch.
173
174 A subpattern with an indefinite maximum repetition is replicated in the
175 compiled data its minimum number of times (or once with a BRAZERO if the
176 minimum is zero), with the final copy terminating with a KETRMIN or KETRMAX as
177 appropriate.
178
179 A subpattern with a bounded maximum repetition is replicated up to the maximum
180 number of times, with BRAZERO or BRAMINZERO before each replication after the
181 minimum. In effect, (abc){2,5} becomes (abc)(abc)(abc)?(abc)?(abc)?.
182
183
184 Assertions
185 ----------
186
187 Assertions are just like other subpatterns, but starting with one of the
188 opcodes OP_ASSERT or OP_ASSERT_NOT.
189
190
191 Once-only subpatterns
192 ---------------------
193
194 These are also just like other subpatterns, but they start with the opcode
195 OP_ONCE.
196
197
198 Philip Hazel
199 October 1997
ViewVC Help
Powered by ViewVC 1.1.5 | {
"url": "https://vcs.pcre.org/pcre/code/tags/pcre-1.03/Tech.Notes?revision=10&view=markup&sortby=file&pathrev=363",
"source_domain": "vcs.pcre.org",
"snapshot_id": "crawl=CC-MAIN-2020-16",
"warc_metadata": {
"Content-Length": "34520",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KPBOZ4QYBKAF42IMA2TNAHNEJYVXYQQW",
"WARC-Concurrent-To": "<urn:uuid:6d98b89e-aa58-41d9-a4db-999bf06be9e1>",
"WARC-Date": "2020-03-28T09:46:40Z",
"WARC-IP-Address": "131.111.8.88",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:3KKHICYN4Q2IXDCRWUFSIU7D3VM2SSRT",
"WARC-Record-ID": "<urn:uuid:ae45c266-18f2-4aea-8f0d-8e4679599939>",
"WARC-Target-URI": "https://vcs.pcre.org/pcre/code/tags/pcre-1.03/Tech.Notes?revision=10&view=markup&sortby=file&pathrev=363",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:f3bf88ef-09cd-4d0e-8506-7608f66b439d>"
},
"warc_info": "isPartOf: CC-MAIN-2020-16\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-212.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,
39,
55,
56,
100,
101,
163,
164,
165,
198,
260,
284,
323,
352,
381,
383,
464,
545,
626,
707,
789,
865,
946,
1028,
1109,
1189,
1271,
1346,
1402,
1405,
1483,
1562,
1641,
1717,
1795,
1850,
1853,
1936,
2012,
2094,
2172,
2251,
2327,
2408,
2487,
2567,
2644,
2725,
2744,
2747,
2823,
2905,
2983,
3032,
3035,
3069,
3103,
3106,
3148,
3151,
3176,
3206,
3240,
3295,
3322,
3345,
3364,
3379,
3403,
3423,
3445,
3463,
3500,
3532,
3586,
3589,
3592,
3623,
3654,
3657,
3734,
3781,
3784,
3795,
3809,
3820,
3834,
3846,
3861,
3864,
3947,
4014,
4017,
4028,
4042,
4054,
4057,
4132,
4215,
4294,
4322,
4325,
4328,
4357,
4386,
4389,
4468,
4546,
4572,
4575,
4590,
4608,
4624,
4643,
4660,
4680,
4696,
4715,
4732,
4736,
4740,
4772,
4804,
4808,
4888,
4966,
5002,
5006,
5010,
5032,
5054,
5058,
5138,
5222,
5271,
5275,
5279,
5299,
5319,
5323,
5396,
5400,
5404,
5456,
5508,
5512,
5595,
5652,
5656,
5670,
5687,
5701,
5718,
5733,
5751,
5766,
5784,
5788,
5868,
5942,
5946,
5950,
5979,
6008,
6012,
6095,
6171,
6254,
6336,
6419,
6423,
6503,
6580,
6664,
6690,
6694,
6768,
6848,
6925,
6990,
6994,
7078,
7155,
7234,
7252,
7256,
7332,
7409,
7492,
7509,
7513,
7596,
7678,
7751,
7755,
7759,
7774,
7789,
7793,
7870,
7910,
7914,
7918,
7944,
7970,
7974,
8053,
8066,
8070,
8074,
8091,
8108,
8109,
8123
],
"line_end_idx": [
39,
55,
56,
100,
101,
163,
164,
165,
198,
260,
284,
323,
352,
381,
383,
464,
545,
626,
707,
789,
865,
946,
1028,
1109,
1189,
1271,
1346,
1402,
1405,
1483,
1562,
1641,
1717,
1795,
1850,
1853,
1936,
2012,
2094,
2172,
2251,
2327,
2408,
2487,
2567,
2644,
2725,
2744,
2747,
2823,
2905,
2983,
3032,
3035,
3069,
3103,
3106,
3148,
3151,
3176,
3206,
3240,
3295,
3322,
3345,
3364,
3379,
3403,
3423,
3445,
3463,
3500,
3532,
3586,
3589,
3592,
3623,
3654,
3657,
3734,
3781,
3784,
3795,
3809,
3820,
3834,
3846,
3861,
3864,
3947,
4014,
4017,
4028,
4042,
4054,
4057,
4132,
4215,
4294,
4322,
4325,
4328,
4357,
4386,
4389,
4468,
4546,
4572,
4575,
4590,
4608,
4624,
4643,
4660,
4680,
4696,
4715,
4732,
4736,
4740,
4772,
4804,
4808,
4888,
4966,
5002,
5006,
5010,
5032,
5054,
5058,
5138,
5222,
5271,
5275,
5279,
5299,
5319,
5323,
5396,
5400,
5404,
5456,
5508,
5512,
5595,
5652,
5656,
5670,
5687,
5701,
5718,
5733,
5751,
5766,
5784,
5788,
5868,
5942,
5946,
5950,
5979,
6008,
6012,
6095,
6171,
6254,
6336,
6419,
6423,
6503,
6580,
6664,
6690,
6694,
6768,
6848,
6925,
6990,
6994,
7078,
7155,
7234,
7252,
7256,
7332,
7409,
7492,
7509,
7513,
7596,
7678,
7751,
7755,
7759,
7774,
7789,
7793,
7870,
7910,
7914,
7918,
7944,
7970,
7974,
8053,
8066,
8070,
8074,
8091,
8108,
8109,
8123,
8148
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 8148,
"ccnet_original_nlines": 213,
"rps_doc_curly_bracket": 0.0002454599889460951,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.35166871547698975,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.055624231696128845,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2744128704071045,
"rps_doc_frac_unique_words": 0.4848484694957733,
"rps_doc_mean_word_length": 4.582409381866455,
"rps_doc_num_sentences": 61,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.825312614440918,
"rps_doc_word_count": 1353,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.025806449353694916,
"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.016129029914736748,
"rps_doc_frac_chars_top_3gram": 0.011612899601459503,
"rps_doc_frac_chars_top_4gram": 0.006290319841355085,
"rps_doc_books_importance": -795.6886596679688,
"rps_doc_books_importance_length_correction": -795.6886596679688,
"rps_doc_openwebtext_importance": -488.2124938964844,
"rps_doc_openwebtext_importance_length_correction": -488.2124938964844,
"rps_doc_wikipedia_importance": -424.9132080078125,
"rps_doc_wikipedia_importance_length_correction": -424.9132080078125
},
"fasttext": {
"dclm": 0.2837975025177002,
"english": 0.8623684048652649,
"fineweb_edu_approx": 2.597440242767334,
"eai_general_math": 0.8788759112358093,
"eai_open_web_math": 0.3405059576034546,
"eai_web_code": 0.8661507964134216
}
} | {
"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.72",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,379,224,872,685,356,500 | Bài giảng Conducting Security Audits
Protocol Analyzer Also called a sniffer Captures each packet to decode and analyze its contents Can fully decode application-layer network protocols The different parts of the protocol can be analyzed for any suspicious behavior
pptx46 trang | Chia sẻ: vutrong32 | Ngày: 16/10/2018 | Lượt xem: 182 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Bài giảng Conducting Security Audits, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Conducting Security AuditsContentsDefine privilege auditsDescribe how usage audits can protect securityList the methodologies used for monitoring to detect security-related anomaliesDescribe the different monitoring toolsPrivilege AuditingA privilege can be considered a subject’s access level over an objectPrinciple of least privilegeUsers should be given only the minimal amount of privileges necessary to perform his or her job functionPrivilege auditingReviewing a subject’s privileges over an objectRequires knowledge of privilege management, how privileges are assigned, and how to audit these security settingsPrivilege ManagementThe process of assigning and revoking privileges to objectsThe roles of owners and custodians are generally well-establishedThe responsibility for privilege management can be either centralized or decentralizedCentralized and Decentralized StructuresIn a centralized structureOne unit is responsible for all aspects of assigning or revoking privilegesAll custodians are part of that unitPromotes uniform security policiesSlows response, frustrates usersA decentralized organizational structure for privilege managementDelegates the authority for assigning or revoking privileges more closely to the geographic location or end userRequires IT staff at each location to manage privilegesAssigning PrivilegesThe foundation for assigning privilegesThe existing access control model for the hardware or software being usedRecall that there are four major access control models:Mandatory Access Control (MAC)Discretionary Access Control (DAC)Role Based Access Control (RBAC)Rule Based Access Control (RBAC)Auditing System Security SettingsAuditing system security settings for user privileges involves:A regular review of user access and rightsUsing group policiesImplementing storage and retention policiesUser access and rights reviewIt is important to periodically review user access privileges and rightsMost organizations have a written policy that mandates regular reviewsAuditing System Security SettingsUser Access and Rights Review (continued)Reviewing user access rights for logging into the network can be performed on the network serverReviewing user permissions over objects can be viewed on the network serverUser Access and Rights Review (continued)Group PoliciesInstead of setting the same configuration baseline on each computer, a security template can be createdSecurity templateA method to configure a suite of baseline security settingsOn a Microsoft Windows computer, one method to deploy security templates is to use Group PoliciesA feature that provides centralized management and configuration of computers and remote users who are using Active Directory (AD)Group Policy Objects (GPOs)The individual elements or settings within group policies are known as Group Policy Objects (GPOs). GPOs are a defined collection of available settings that can be applied to user objects or AD computersSettings are manipulated using administrative template files that are included within the GPOStorage and Retention PoliciesHealth Insurance Portability and Accountability Act (HIPPA)Sarbanes-Oxley ActRequire organizations to store data for specified time periodsRequire data to be stored securelyHIPPA Sanction for Unlocked DumpstersInformation Lifecycle Management (ILM)A set of strategies for administering, maintaining, and managing computer storage systems in order to retain dataILM strategies are typically recorded in storage and retention policies Which outline the requirements for data storageData classificationAssigns a level of business importance, availability, sensitivity, security and regulation requirements to dataData CategoriesData CategoriesGrouping data into categories often requires the assistance of the users who save and retrieve the data on a regular basisThe next step is to assign the data to different levels or “tiers” of storage and accessibilityContentsDefine privilege auditsDescribe how usage audits can protect securityList the methodologies used for monitoring to detect security-related anomaliesDescribe the different monitoring toolsUsage AuditingAudits what objects a user has actually accessedInvolves an examination of which subjects are accessing specific objects and how frequentlySometimes access privileges can be very complexUsage auditing can help reveal incorrect permissionsInheritancePermissions given to a higher level “parent” will also be inherited by a lower level “child”Inheritance becomes more complicated with GPOsPrivilege InheritanceGPO InheritanceGPO inheritanceAllows administrators to set a base security policy that applies to all users in the Microsoft ADOther administrators can apply more specific policies at a lower levelThat apply only to subsets of users or computersGPOs that are inherited from parent containers are processed firstFollowed by the order that policies were linked to a container objectLog ManagementA log is a record of events that occurLogs are composed of log entriesEach entry contains information related to a specific event that has occurredLogs have been used primarily for troubleshooting problemsLog managementThe process for generating, transmitting, storing, analyzing, and disposing of computer security log dataApplication and Hardware LogsSecurity application logsAntivirus softwareRemote Access SoftwareAutomated patch update serviceSecurity hardware logsNetwork intrusion detection systems and host and network intrusion prevention systemsDomain Name System (DNS)Authentication serversProxy serversFirewallsAntivirus LogsDNS LogsFirewall LogsFirewall LogsTypes of items that should be examined in a firewall log include:IP addresses that are being rejected and droppedProbes to ports that have no application services running on themSource-routed packetsPackets from outside with false internal source addressesSuspicious outbound connectionsUnsuccessful loginsOperating System LogsSystem eventsSignificant actions performed by the operating systemShutting down the systemStarting a serviceSystem EventsSystem events that are commonly recorded include:Client requests and server responsesUsage informationLogs based on audit recordsThe second common type of security-related operating system logsAudit records that are commonly recorded include:Account activity, such as escalating privilegesOperational information, such as application startup and shutdownWindows 7 Event LogsLog Management BenefitsA routine review and analysis of logs helps identifySecurity incidentsPolicy violationsFraudulent activityOperational problems Logs can also help resolve problemsLog Management BenefitsLogs helpPerform auditing analysisThe organization’s internal investigationsIdentify operational trends and long-term problemsDemonstrate compliance with laws and regulatory requirementsChange ManagementA methodology for making changes and keeping track of those changesTwo major types of changes Any change in system architectureNew servers, routers, etc.Data classificationDocuments moving from Confidential to Standard, or Top Secret to SecretChange Management Team (CMT)Created to oversee changesAny proposed change must first be approved by the CMTThe team typically has: Representatives from all areas of IT (servers, network, enterprise server, etc.)Network securityUpper-level managementChange Management Team (CMT) DutiesReview proposed changesEnsure that the risk and impact of the planned change is clearly understoodRecommend approval, disapproval, deferral, or withdrawal of a requested changeCommunicate proposed and approved changes to co-workersContentsDefine privilege auditsDescribe how usage audits can protect securityList the methodologies used for monitoring to detect security-related anomaliesDescribe the different monitoring toolsAnomaly-based MonitoringDetecting abnormal traffic BaselineA reference set of data against which operational data is comparedWhenever there is a significant deviation from this baseline, an alarm is raisedAdvantageDetect the anomalies quicklyAnomaly-based MonitoringDisadvantagesFalse positivesAlarms that are raised when there is no actual abnormal behaviorNormal behavior can change easily and even quicklyAnomaly-based monitoring is subject to false positivesSignature-based MonitoringCompares activities against signaturesRequires access to an updated database of signaturesWeaknessesThe signature databases must be constantly updatedAs the number of signatures grows the behaviors must be compared against an increasingly large number of signatures New attacks will be missed, because there is no signature for themBehavior-based MonitoringAdaptive and proactive instead of reactiveUses the “normal” processes and actions as the standardContinuously analyzes the behavior of processes and programs on a systemAlerts the user if it detects any abnormal actionsAdvantageNot necessary to update signature files or compile a baseline of statistical behaviorBehavior-based MonitoringMonitoring ToolsPerformance baselines and monitorsPerformance baselineA reference set of data established to create the “norm” of performance for a system or systemsData is accumulated through the normal operations of the systems and networks through performance monitorsOperational data is compared with the baseline data to determine how closely the norm is being met and if any adjustments need to be madeSystem MonitorA low-level system programMonitors hidden activity on a deviceSome system monitors have a Web-based interfaceSystem monitors generally have a fully customizable notification systemThat lets the owner design the information that is collected and made availableProtocol AnalyzerAlso called a snifferCaptures each packet to decode and analyze its contentsCan fully decode application-layer network protocolsThe different parts of the protocol can be analyzed for any suspicious behavior
Các file đính kèm theo tài liệu này:
• pptx08_conducting_security_audits_6248.pptx
Tài liệu liên quan | {
"url": "http://tailieu.tv/tai-lieu/bai-giang-conducting-security-audits-31936/",
"source_domain": "tailieu.tv",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "21440",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SQH2LHBDSFV54PNRXSQVGZS7VYJBEXRI",
"WARC-Concurrent-To": "<urn:uuid:20281f05-3d8a-4484-a0a2-bd026a408251>",
"WARC-Date": "2019-08-22T02:31:53Z",
"WARC-IP-Address": "123.31.26.86",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:GIV5Z3MHH23HDF3PTHVT32I5KFIWTBC4",
"WARC-Record-ID": "<urn:uuid:231b90cb-b1fe-424b-b45e-8a48a0117171>",
"WARC-Target-URI": "http://tailieu.tv/tai-lieu/bai-giang-conducting-security-audits-31936/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a80b9910-ae88-4cfa-a5e3-9e05784fb226>"
},
"warc_info": "isPartOf: CC-MAIN-2019-35\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-188.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
37,
38,
267,
268,
359,
495,
10378,
10379,
10416,
10417,
10465
],
"line_end_idx": [
37,
38,
267,
268,
359,
495,
10378,
10379,
10416,
10417,
10465,
10483
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 10483,
"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.33019500970840454,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.011432410217821598,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.08002690225839615,
"rps_doc_frac_unique_words": 0.4853493571281433,
"rps_doc_mean_word_length": 6.824943542480469,
"rps_doc_num_sentences": 5,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.8409881591796875,
"rps_doc_word_count": 1331,
"rps_doc_frac_chars_dupe_10grams": 0.06494936347007751,
"rps_doc_frac_chars_dupe_5grams": 0.08520475775003433,
"rps_doc_frac_chars_dupe_6grams": 0.07177454978227615,
"rps_doc_frac_chars_dupe_7grams": 0.07177454978227615,
"rps_doc_frac_chars_dupe_8grams": 0.06494936347007751,
"rps_doc_frac_chars_dupe_9grams": 0.06494936347007751,
"rps_doc_frac_chars_top_2gram": 0.00495376018807292,
"rps_doc_frac_chars_top_3gram": 0.008586529642343521,
"rps_doc_frac_chars_top_4gram": 0.010237780399620533,
"rps_doc_books_importance": -666.6974487304688,
"rps_doc_books_importance_length_correction": -666.6974487304688,
"rps_doc_openwebtext_importance": -359.23419189453125,
"rps_doc_openwebtext_importance_length_correction": -359.23419189453125,
"rps_doc_wikipedia_importance": -253.96084594726562,
"rps_doc_wikipedia_importance_length_correction": -253.96084594726562
},
"fasttext": {
"dclm": 0.17265534400939941,
"english": 0.8436715006828308,
"fineweb_edu_approx": 2.423468828201294,
"eai_general_math": 0.24541056156158447,
"eai_open_web_math": 0.1535508632659912,
"eai_web_code": 0.39114880561828613
}
} | {
"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": "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": "2",
"label": "Click Here References"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,118,436,633,011,295,400 | Designing a private cloud storage architecture using object storage
When designing a private cloud using object storage, you need to consider the data that will live on it, and how data will be migrated and recalled.
What you will learn: When you're designing a private cloud using object storage, you'll need to consider the data that will live on it, the volume of data, and how data will be migrated and recalled.
The fact that data is growing isn't a surprise to any IT professional. The greater challenge is the inability to purge old information while the pace of growth continues. Add to that a new reality: Data generation and collection is no longer confined to just users. Devices such as smartphones and cameras are collecting data faster than humans can. As a result, it's become widely apparent that traditional network-attached storage-based systems are unable to scale to meet these demands.
Many data centers are now looking to build their own private cloud storage architecture based on object storage. This article provides step-by-step guidance for designing an object-based, private cloud storage architecture.
A common architecture as a starting point
Object storage systems assign each file an object ID. To access an object, you provide the system with the ID and the system will retrieve it. Object storage systems are a simple flat architecture, as opposed to a more traditional POSIX file system in which data is organized in a hierarchical folder structure.
Most object storage systems start with a similar architecture, regardless of the type of data to be stored. From a hardware perspective, they tend to be nodal in nature. This means the object store is made up of a group of servers, called nodes, with internal storage that is aggregated and presented as a common pool to the attaching applications. It's the responsibility of this software to perform the aggregation, manage the object database and maintain reliability.
It's important to understand how the object storage system will store data. Will it replicate or use erasure coding? In both cases, each object is sent to a node for encoding. In most systems, this is done on a round-robin basis so no single node becomes overwhelmed.
In the replication use case, the object is copied to x number of other nodes, with varying levels of sophistication on where those other nodes might be physically located. Erasure coding segments the object into parts and then distributes those parts across a large number of discrete nodes. Think of replication as similar to mirroring, in which a complete copy of the object is made a number of user- or data-defined times. The system always ensures there are x number of copies available in the object store. Think of erasure coding as RAID, where an object is segmented, then a parity segment is created to rebuild the data in case a node fails.
When you talk with vendors about object storage, you'll likely be offered two distinct choices: a vendor-specific, turnkey solution or a vendor-agnostic software solution. The former may cost more but require less time to get up and running. However, it requires the purchase of new, dedicated hardware. The software solution may be less expensive, especially because some current offerings enable you to use an existing array or storage internal to the server. But these offerings require time to choose and implement because you have to research the various hardware components within your design and then integrate them into your infrastructure. There is also an increased burden on your IT shop to support a hardware-agnostic software offering.
The reality is that neither of these solutions is always better than the other; they're just different. The choice is largely dependent on the time and expertise your organization has available to dedicate to the project.
Time to understand the data
Once you understand the architecture, the next step in successfully designing a private cloud storage infrastructure is to understand the data that will live on it. Most organizations will have one of two data types: a type that supports billions of very small files or a type that supports millions of very large files. In most cases, the billions of small files require random access to a large quantity of those small files. A common example is a large analytics environment where thousands of data points are selected from the billions of files stored so that better decisions can be made. In these environments, random I/O performance is very important, which makes it a key requirement of the selected system. In many cases, solid-state drives (SSDs) are required to store the metadata needed to locate files quickly.
The other use case involves bulk data movement, where very large chunks of data are accessed in a sequential fashion. An example might be a media content distributor that needs to stream audio or video to a large number of users. In this instance, random I/O isn't nearly as important as bandwidth and throughput. These systems tend to have a very high number of nodes in their storage cluster and data is dispersed across all of them. In most cases, hard drive performance, as long as high quantities of drives are available, is perfectly acceptable.
In most cases, data centers don't have a mixture of both data types, at least to the extent that both data types are absolutely critical to the business. For the rare business that requires both data types, a perfectly mixed platform doesn't yet exist on the market. While the software may be the same, the architecture layout needs to vary between these data types.
Native access to storage
The next step is to understand how data is migrated to the object storage system. There are two common ways to accomplish this. First, almost all object storage systems are accessed via a Representational State Transfer (REST) application programming interface. This capability allows applications to directly access storage via simple "get" and "put" commands. No longer does an application have to go through a gateway or file system or, worse, embed SCSI commands.
Native access to storage via the application is an ideal capability. The application knows the state of data better than an external software package that can only rank data by data or size. In addition, the application probably understands value and can better predict when data would be needed again. The downside to application integration is that while simple, it requires access to the actual application source code and not all systems have ready access to this.
When the application source code is inaccessible or there's no time to modify the application, a gateway approach may be best. Many object storage systems have the ability to present a CIFS, NFS and even SCSI (Fibre Channel or iSCSI) translation layer so applications can use object storage without alteration. While this gateway approach doesn't provide the fine-grained customization of data placement, it does provide quick access to the other attributes of object storage.
A logical path for most companies is to start with a gateway approach so the application can begin using the object store immediately. Then, over time, capabilities can be natively added to the application. Gateways are available from many object storage providers, and there are a number of third-party add-ons. My suggestion would be to make separate decisions regarding your choice of object storage software and the gateway system that fits your specific needs.
File size, ingest rates are key
Regardless of how the data will be sent to the object store, it's important to understand the volume of data that will be sent to the store. This is partly affected by the size of files described above, as well as the amount of data that needs to be ingested over a given period of time. If files are relatively small and are sent to the object store on a modest basis, then the ingest rate is inconsequential. If thousands or millions of small files are sent to the object store from a variety of sources, it can become a challenge. And if a few very large files are ingested, and the speed that the ingestion occurs is important, that can be also a factor.
Thousands of small files can best be handled by a large node-count system with plenty of hard disk drives. The system, as mentioned above, may also benefit from being able to store metadata information on SSDs. Not all object storage systems have the ability to store metadata separately from the actual data; if this is a requirement for your specific use case, you should verify that the vendor provides it.
In the case of ingesting very large files, a high drive-count situation may not help since the data is typically received by a single node before it's distributed across the entire object store. In other words, the bandwidth per node becomes an issue. In these situations, you may be better served by having a very fast set of hard drives or even SSDs on a few targeted ingestion nodes.
Total recall
How data is recalled also impacts the design. With replication, the least busy node is responsible for sending all the data, so you're limited to the bandwidth of a single node. With erasure coding, all the nodes that have a segment of the object will send data to the requesting application. For large bulk transfers of a low number of files, erasure coding is typically best. For the transfer of a high number of small files, both methods deliver about the same performance.
The framework offered here for designing a private cloud should be shared with the various vendors offering an object storage solution to you. Look for systems that are specifically designed to handle your type of data, your data protection needs, and the rate your data needs to be ingested and recalled. Solutions will typically vary along these lines, but there will be a few that specialize in your specific requirements.
About the author:
George Crump is a longtime contributor to TechTarget, as well as president and founder of Storage Switzerland LLC, an IT analyst firm focused on the storage and virtualization segments. Before founding Storage Switzerland, George was chief technology officer in charge of technology testing, integration and product selection at one of the largest data storage integrators in the U.S.
This was first published in December 2013
Dig Deeper
PRO+
Content
Find more PRO+ content and other member only offers, here.
1 comment
Oldest
Forgot Password?
No problem! Submit your e-mail address below. We'll send you an email containing your password.
Your password has been sent to:
-ADS BY GOOGLE
SearchStorage
SearchSolidStateStorage
SearchVirtualStorage
SearchAWS
SearchDisasterRecovery
SearchDataBackup
SearchSMBStorage
Close | {
"url": "http://searchcloudstorage.techtarget.com/feature/Designing-a-private-cloud-storage-architecture-using-object-storage",
"source_domain": "searchcloudstorage.techtarget.com",
"snapshot_id": "crawl=CC-MAIN-2015-32",
"warc_metadata": {
"Content-Length": "102382",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:6L7Z2C54BSABPY6GWY5DUJHJJ3J4NKHC",
"WARC-Concurrent-To": "<urn:uuid:e771742f-5915-4cee-9329-777bce3c3b92>",
"WARC-Date": "2015-07-31T11:20:21Z",
"WARC-IP-Address": "206.19.49.154",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:6QXDUB5Q7KCNP2PQK5K3ARGJ4BS7V3JO",
"WARC-Record-ID": "<urn:uuid:d139fcf4-d27a-4c92-b364-47850ae2beaa>",
"WARC-Target-URI": "http://searchcloudstorage.techtarget.com/feature/Designing-a-private-cloud-storage-architecture-using-object-storage",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ecfcc77e-895c-45f1-87a9-e02e227e5aeb>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-236-191-2.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-32\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
68,
69,
218,
219,
419,
420,
910,
911,
1135,
1136,
1178,
1179,
1491,
1492,
1963,
1964,
2232,
2233,
2883,
2884,
3633,
3634,
3856,
3857,
3885,
3886,
4710,
4711,
5263,
5264,
5631,
5632,
5657,
5658,
6126,
6127,
6596,
6597,
7074,
7075,
7541,
7542,
7574,
7575,
8234,
8235,
8645,
8646,
9033,
9034,
9047,
9048,
9525,
9526,
9952,
9953,
9971,
10356,
10357,
10399,
10400,
10411,
10412,
10417,
10418,
10426,
10427,
10486,
10487,
10497,
10498,
10506,
10507,
10524,
10525,
10621,
10622,
10654,
10655,
10670,
10671,
10685,
10686,
10710,
10711,
10732,
10733,
10743,
10744,
10767,
10768,
10785,
10786,
10803,
10804
],
"line_end_idx": [
68,
69,
218,
219,
419,
420,
910,
911,
1135,
1136,
1178,
1179,
1491,
1492,
1963,
1964,
2232,
2233,
2883,
2884,
3633,
3634,
3856,
3857,
3885,
3886,
4710,
4711,
5263,
5264,
5631,
5632,
5657,
5658,
6126,
6127,
6596,
6597,
7074,
7075,
7541,
7542,
7574,
7575,
8234,
8235,
8645,
8646,
9033,
9034,
9047,
9048,
9525,
9526,
9952,
9953,
9971,
10356,
10357,
10399,
10400,
10411,
10412,
10417,
10418,
10426,
10427,
10486,
10487,
10497,
10498,
10506,
10507,
10524,
10525,
10621,
10622,
10654,
10655,
10670,
10671,
10685,
10686,
10710,
10711,
10732,
10733,
10743,
10744,
10767,
10768,
10785,
10786,
10803,
10804,
10809
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 10809,
"ccnet_original_nlines": 95,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4230392277240753,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013235289603471756,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11127451062202454,
"rps_doc_frac_unique_words": 0.3329583704471588,
"rps_doc_mean_word_length": 4.926321506500244,
"rps_doc_num_sentences": 91,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.481081485748291,
"rps_doc_word_count": 1778,
"rps_doc_frac_chars_dupe_10grams": 0.008448449894785881,
"rps_doc_frac_chars_dupe_5grams": 0.05297407880425453,
"rps_doc_frac_chars_dupe_6grams": 0.04167142137885094,
"rps_doc_frac_chars_dupe_7grams": 0.03641967847943306,
"rps_doc_frac_chars_dupe_8grams": 0.01644022949039936,
"rps_doc_frac_chars_dupe_9grams": 0.008448449894785881,
"rps_doc_frac_chars_top_2gram": 0.02671537920832634,
"rps_doc_frac_chars_top_3gram": 0.013700190000236034,
"rps_doc_frac_chars_top_4gram": 0.012558509595692158,
"rps_doc_books_importance": -775.2799072265625,
"rps_doc_books_importance_length_correction": -775.2799072265625,
"rps_doc_openwebtext_importance": -515.0346069335938,
"rps_doc_openwebtext_importance_length_correction": -515.0346069335938,
"rps_doc_wikipedia_importance": -417.09033203125,
"rps_doc_wikipedia_importance_length_correction": -417.09033203125
},
"fasttext": {
"dclm": 0.3811537027359009,
"english": 0.9474705457687378,
"fineweb_edu_approx": 2.722956418991089,
"eai_general_math": 0.6028424501419067,
"eai_open_web_math": 0.16641926765441895,
"eai_web_code": 0.6823331713676453
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.72",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,513,996,812,328,192,000 | Generator functions in C++
In the previous post we had a look at the proposal of introducing resumable functions into the C++ standard to support writing asynchronous code modeled on the C# async/await pattern.
We saw that it is already possible to experiment with the future resumable and await keywords in Visual Studio, by installing the latest November 2013 CTP. But the concept of resumable functions is not limited to asynchrony; in this post we’ll see how it can be expanded to support generator functions.
Generator functions and lazy evaluation
In several languages, like C# and Python, generator functions provide the ability of lazily producing the values in a sequence only when they are needed. In C# a generator (or iterator) is a method that contains at least one yield statement and that returns an IEnumerable<T>.
For example, the following C# code produces the sequence of Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21, …):
IEnumerable<T> Fibonacci()
{
int a = 0;
int b = 1;
while (true) {
yield return b;
int tmp = a + b;
a = b;
b = tmp;
}
}
A generator acts in two phases. When it is called, it just sets up a resumable function, preparing for its execution, and returns some enumerator (in the case of C#, an IEnumerable<T>). But the actual execution is deferred to the moment when the values are actually enumerated and pulled from the sequence, for example with a foreach statement:
foreach (var num in Fibonacci())
{
Console.WriteLine("{0}", num);
}
Note that the returned sequence is potentially infinite; its enumeration could go on indefinitely (if we ignore the integer overflows).
Of course there is nothing particularly special about doing the same thing in C++. While STL collections are usually eagerly evaluated (all their values are produced upfront) it is not difficult to write a collection that provides iterators that calculate their current value on the spot, on the base of some state or heuristic.
What gives a particular expressive power to generators is the ability to pause the execution each time a new value is generated, yielding control back to the caller, and then to resume the execution exactly from the point where it had suspended. A generator is therefore a special form of coroutine, limited in the sense that it may only yield back to its caller.
The yield statement hides all the complexity inherent in the suspension and resumption of the function; the developer can express the logic of the sequence plainly, without having to setup callbacks or continuations.
From resumable functions to generators (and beyond)
It would be nice to bring the expressive power of generators to our good old C++, and naturally there is already some work going on for this. In this proposal Gustaffson et al. explain how generator functions could be supported by the language as an extension of resumable functions, making it possible to write code like:
sequence<int> fibonacci() resumable
{
int a = 0;
int b = 1;
while (true)
{
yield b;
int tmp = a + b;
a = b;
b = tmp;
}
}
Here, the proposal introduces two new concepts, the type sequence<T> and the yield keyword.
– sequence<T> is a (STL-like) collection that only supports iteration and only provides an input iterator.
– The yield statement suspends the execution of the function and returns one item from the sequence to the caller.
In C# terms, sequence<T> and its iterator are respectively the equivalent of an IEnumerable<T> and IEnumerator<T>. But while the C# generators are implemented with a state machine, in C++ the suspension and resumption would be implemented, as we’ll see, with stackful coroutines.
Once we had a lazy-evaluated sequence<T> we could write client code to pull a sequence of values, which would be generated one at the time, and only when requested:
sequence<int> fibs = fibonacci();
for (auto it = fibs.begin(); it != fibs.end(); ++it)
{
std::cout << *it << std::endl;
}
In C++11 we could also simplify the iteration with a range-based for loop:
sequence<int> fibs = fibonacci();
for (auto it : fibs)
{
std::cout << *it << std::endl;
}
More interestingly, we could define other resumable functions that manipulate the elements of a sequence, lazily producing another sequence. This example, taken from Gustaffson’s proposal, shows a lazy version of std::transform():
template<typename Iter>
sequence<int> lazy_tform(Iter beg, Iter end, std::function<int(int)> func) resumable
{
for (auto iter = beg; iter != end; ++iter)
{
yield func(*iter);
}
}
Moving further with this idea, we could pull another page out of the C# playbook and enrich the sequence class with a whole set of composable, deferred query operators, a la LINQ:
template <typename T>
class sequence
{
public:
template <typename Predicate> bool all(Predicate predicate);
[...]
static sequence<int> range(int from, int to);
template <typename TResult> sequence<TResult> select(std::function<TResult(T)> selector);
sequence<T> take(int count);
sequence<T> where(std::function<bool(T)> predicate);
};
Lazy sequences
Certainly, resumable generators would be a very interesting addition to the standard. But how would they work? We saw that the Visual Studio CTP comes with a first implementation of resumable functions built over the PPL task library, but in this case the CTP is of little help, since it does not support generator functions yet. Maybe they will be part of a future release… but why to wait? We can implement them ourselves! 🙂
In the rest of this post I’ll describe a possible simple implementation of C++ lazy generators.
Let’s begin with the lazy sequence<T> class. This is a STL-like collection which only needs to support input iterators, with a begin() and an end() method.
Every instance of this class must somehow be initialized with a functor that represents the generator function that will generate the values of the sequence. We’ll see later what can be a good prototype for it.
As we said, the evaluation of this function must be deferred to the moment when the values are retrieved, one by one, via the iterator. All the logic for executing, suspending and resuming the generator will actually be implemented by the iterator class, which therefore needs to have a reference to the same functor.
So, our first cut at the sequence class could be something like this:
template<typename T>
class sequence_iterator
{
// TO DO
};
template<typename T>
class sequence
{
public:
typedef typename sequence_iterator<T> iterator;
typedef ??? functor;
sequence(functor func) : _func(func) { }
iterator begin() {
return iterator(_func);
}
iterator end() {
return iterator();
}
private:
functor _func;
};
Step by step
The sequence<T> class should not do much more than create iterators. The interesting code is all in the sequence iterator, which is the object that has the ability to actually generate the values.
Let’s go back to our Fibonacci generator and write some code that iterates through it:
sequence<int> fibonacci() resumable
{
int a = 0;
int b = 1;
while (true)
{
yield b;
int tmp = a + b;
a = b;
b = tmp;
}
}
auto fibs = fibonacci();
for (auto it : fibs)
{
std::cout << *it << std::endl;
}
How should this code really work? Let’s follow its execution step by step.
1. First, we call the function fibonacci(), which returns an object of type sequence<int>. Note that at this point the execution of the function has not even started yet. We just need to return a sequence object somehow associated to the body of the generator, which will be executed later.
2. The returned sequence is copied into the variable fibs. We need to define what does it mean to copy a sequence: should we allow copy operations? Should we enforce move semantic?
3. Given the sequence fibs, we call the begin() method which returns an iterator “pointing ” to the first element of the sequence. The resumable function should start running the moment the iterator is created and execute until a first value is yielded (or until it completes, in case of empty sequences).
4. When the end() method is called, the sequence returns an iterator that represents the fact that the generator has completed and there are no more values to enumerate.
5. The operator == () should behave as expected, returning true if both iterators are at the same position of the same sequence, or both pointing at the end of the sequence.
6. The operator *() will return the value generated by the last yield statement (i.e., the current value of the sequence).
7. At each step of the iteration, when operator ++() is called, the execution of the generator function will be resumed, and will continue until either the next yield statement updates the current value or until the function returns.
Putting all together, we can begin to write some code for the sequence_iterator class:
template<typename T>
class sequence_iterator
{
public:
typedef ??? functor;
sequence_iterator(functor func) {
// initializes the iterator from the generator functors, executes the functors
// until it terminates or yields.
}
sequence_iterator() : _func(func) {
// must represent the end of the sequence
}
bool operator == (const sequence_iterator& rhs) {
// true if the iterators are at the same position.
}
bool operator != (const sequence_iterator& rhs) {
return !(*this==rhs);
}
const T& operator * () const {
return _currentVal;
}
sequence_iterator operator ++ () {
// resume execution
return *this;
}
private:
T _currentVal;
};
The behavior of the iterator is fairly straightforward, but there are a few interesting things to note. The first is that evidently a generator function does not do what it says: looking at the code of the fibonacci() function there is no statement that actually returns a sequence<T>; what the code does is simply to yield the sequence elements, one at the time.
So who creates the sequence<T> object? Clearly, the implementation of generators cannot be purely library-based. We can put in a library the code for the sequence<T> and for its iterators, we can also put in a library the platform-dependent code that manages the suspension and resumptions of generators. But it will be up to the compiler to generate the appropriate code that creates a sequence<T> object for a generator function. More on this later.
Also, we should note that there is no asynchrony or concurrency involved in this process. The function could resume in the same thread where it suspended.
Generators as coroutines
The next step is to implement the logic to seamlessly pause and resume a generator. A generator can be seen as an asymmetric coroutine, where the asymmetry lies in the fact that the control can be only yielded back to the caller, contrary to the case of symmetric coroutines that can yield control to any other coroutine at any time.
Unfortunately coroutines cannot be implemented in a platform-independent way. In Windows we can use Win32 Fibers (as I described in this very old post) while on POSIX, you can use the makecontext()/swapcontext() API. There is also a very nice Boost library that we could leverage for this purpose.
But let’s ignore the problems of portability, for the moment, and assume that we have a reliable way to implement coroutines. How should we use them in an iterator? We can encapsulate the non-portable code in a class __resumable_func that exposes this interface:
template <typename TRet>
class __resumable_func
{
typedef std::function<void(__resumable_func&)> TFunc;
public:
__resumable_func(TFunc func);
void yieldReturn(const TRet& value);
void yieldBreak();
void resume();
const TRet& getCurrent() const;
bool isEos() const;
}
The class is templatized on the type of the values produced by the generator and provides methods to yield one value (yieldReturn()), to retrieve the current value (i.e., the latest value yielded) and to resume the execution and move to the next value.
It should also provide methods to terminate the enumeration (yieldBreak()) and to tell if we have arrived at the end of the sequence (isEos()).
The function object passed to the constructor represents the generator function itself that we want to run. More precisely, it is the function that will be executed as a coroutine, and its prototype tells us that this function, in order to be able to suspend execution, needs a reference to the __resumable_func object that is running the coroutine itself.
In fact the compiler should transform the code of a generator into the (almost identical) code of a lambda that uses the __resumable_func object to yield control and emit a new value.
For example, going back again to our fibonacci() generator, we could expect the C++ compiler to transform the code we wrote:
sequence<int> fibonacci() resumable
{
int a = 0;
int b = 1;
while (true)
{
yield b;
int tmp = a + b;
a = b;
b = tmp;
}
}
into this lambda expression:
auto __fibonacci_func([](__resumable_func<int>& resFn) {
int a = 0;
int b = 1;
while (true)
{
resFn.yieldReturn(b);
int tmp = a + b;
a = b;
b = tmp;
}
});
where the yield statement has been transformed into a call to __resumable_func::yieldReturn().
Likewise, client code that invokes this function, like:
sequence<int> fibs = fibonacci();
should be transformed by the compiler into a call to the sequence constructor, passing this lambda as argument:
sequence<int> fibs(__fibonacci_func);
Sequence iterators
We can ignore the details of the implementation of __resumable_func<T> coroutines for the moment and, assuming that we have them working, we can now complete the implementation of the sequence_iterator class:
template <typename T>
class sequence_iterator
{
std::unique_ptr<__resumable_func<T>> _resumableFunc;
sequence_iterator() :
_resumableFunc(nullptr)
{
}
sequence_iterator(const std::function<void(__resumable_func<T>&)> func) :
_resumableFunc(new __resumable_func<T>(func))
{
}
sequence_iterator(const sequence_iterator& rhs) = delete;
sequence_iterator& operator = (const sequence_iterator& rhs) = delete;
sequence_iterator& operator = (sequence_iterator&& rhs) = delete;
public:
sequence_iterator(sequence_iterator&& rhs) :
_resumableFunc(std::move(rhs._resumableFunc))
{
}
sequence_iterator& operator++()
{
_ASSERT(_resumableFunc != nullptr);
_resumableFunc->resume();
return *this;
}
bool operator==(const sequence_iterator& _Right) const
{
if (_resumableFunc == _Right._resumableFunc) {
return true;
}
if (_resumableFunc == nullptr) {
return _Right._resumableFunc->isEos();
}
if (_Right._resumableFunc == nullptr) {
return _resumableFunc->isEos();
}
return (_resumableFunc->isEos() == _Right._resumableFunc->isEos());
}
bool operator!=(const sequence_iterator& _Right) const
{
return (!(*this == _Right));
}
const T& operator*() const
{
_ASSERT(_resumableFunc != nullptr);
return (_resumableFunc->getCurrent());
}
};
The logic here is very simple. Internally, a sequence_iterator contains a __resumable_func object, to run the generator as a coroutine. The default constructor creates an iterator that points at the end of the sequence. Another constructor accepts as argument the generator function that we want to run and starts executing it in a coroutine and the function will run until either it yields a value or terminates, giving the control back to the constructor. In this way we create an iterator that points at the beginning of the sequence.
If a value was yielded, we can call the dereference-operator to retrieve it from the __resumable_func object. If the function terminated, instead, the iterator will already point at the end of the sequence. The equality operator takes care of equating an iterator whose function has terminated to the end()-iterators created with the default constructor. Incrementing the iterator means resuming the execution of the coroutine, from the point it had suspended, giving it the opportunity to produce another value.
Note that, since the class owns the coroutine object, we disable copy constructors and assignment operators and only declare the move constructor, to pass the ownership of the coroutine.
Composable sequence operators
Almost there! We have completed our design, but there are still a few details to work out. The most interesting are related to the lifetime and copyability of sequence objects. What should happen with code like this?
sequence<int> fibs1 = fibonacci();
sequence<int> fibs2 = fibs1;
for (auto it1 : fibs1) {
for (auto it2 : fibs2) {
...
}
}
If we look at how we defined class sequence<T>, apparently there is no reason why we should prevent the copy of sequence objects. In fact, sequence<T> is an immutable class. Its only data member is the std::function object that wraps the functor we want to run.
However, even though we don’t modify this functor object, we do execute it. This object could have been constructed from a lambda expression that captured some variables, either by value or by reference. Since one of the captured variables could be a reference to the same sequence<T> object that created that iterator, we need to ensure that the sequence object will always outlive its functors, and allowing copy-semantics suddenly becomes complicated.
This brings us to LINQ and to the composability of sequences. Anyone who has worked with C# knows that what makes enumerable types truly powerful and elegant is the ability to apply chains of simple operators that transform the elements of a sequence into another sequence. LINQ to Objects is built on the concept of a data pipeline: we start with a data source which implements IEnumerable<T>, and we can compose together a number of query operators, defined as extension methods to the Enumerable class.
For example, this very, very useless query in C# generates the sequence of all square roots of odd integers between 0 and 10:
var result = Enumerable.Range(0, 10)
.Where(n => n%2 == 1)
.Select(n => Math.Sqrt(n));
Similarly, to make the C++ sequence<T> type really powerful we should make it composable and enrich it with a good range of LINQ-like operators to generate, filter, aggregate, group, sort and generally transform sequences.
These are just a few of the operators that we could define in the sequence<T> class:
template <typename T>
class sequence
{
public:
[...]
static sequence<int> range(int from, int to);
template <typename TResult> sequence<TResult> select(std::function<TResult(T)> selector);
sequence<T> where(std::function<bool(T)> predicate);
};
to finally be able to write the same (useless) query:
sequence<double> result = sequence<int>::range(0, 10)
.where([](int n) { return n => n%2 == 1; })
.select([](int n) { return sqrt(n); });
Let’s try to implement select(), as an experiment. It is conceptually identical to the lazy_tform() method we saw before, but now defined in the sequence class. A very naïve implementation could be as follows:
// Projects each element of a sequence into a new form. (NOT WORKING!)
template <typename TResult>
sequence<TResult> select(std::function<TResult(T)> selector)
{
auto func = [this, selector](__resumable_func<T>& rf) {
for (T t : *this)
{
auto val = selector(t);
rf.yieldReturn(val);
}
};
return sequence<TResult>(func);
}
It should be now clear how it works: first we create a generator functor, in this case with a lambda expression, and then we return a new sequence constructed on this functor. The point is that the lambda needs to capture the “parent” sequence object to be able to iterate through the values of its sequence.
Unfortunately this code is very brittle. What happens when we compose more operators, using the result of one as the input of the next one in the chain? When we write:
sequence<double> result = sequence<int>::range(0, 10)
.where([](int n) { return n => n%2 == 1; })
.select([](int n) { return sqrt(n); });
there are (at least) three temporary objects created here, of type sequence<T>, and their lifetime is tied to that of the expression, so they are deleted before the whole statement completes.
A chain of sequences
The situation is like in the figure: the functor of each sequence in the chain is a lambda that has captured a pointer to the previous sequence object. The problem is in the deferred execution: nothing really happens until we enumerate the resulting sequence through its iterator, but as soon as we do so each sequence starts pulling values from its predecessor, which has already been deleted.
Temporary objects and deferred execution really do not get along nicely at all. On one hand in order to compose sequences we have to deal with temporaries that can be captured in a closure and then deleted long before being used. On the other hand, the sequence iterators, and their underlying coroutines, should not be copied and can outlive the instance of the sequence that generated them.
We can enforce move semantics on the sequence<T> class, but then what do we capture in a generator like select() that acts on a sequence?
As often happens, a possible solution requires adding another level of indirection. We introduce a new class, sequence_impl<T>, which represents a particular application of a generator function closure:
template <typename T>
class sequence_impl
{
public:
typedef std::function<void(__resumable_func<T>&)> functor;
private:
const functor _func;
sequence_impl(const sequence_impl& rhs) = delete;
sequence_impl(sequence_impl&& rhs) = delete;
sequence_impl& operator = (const sequence_impl& rhs) = delete;
sequence_impl& operator = (sequence_impl&& rhs) = delete;
public:
sequence_impl(const functor func) : _func(std::move(func)) {}
sequence_iterator<T> begin() const
{
// return iterator for beginning of sequence
return iterator(_func);
}
sequence_iterator<T> end() const
{
// return iterator for end of sequence
return iterator();
}
};
A sequence_impl<T> is neither copiable nor movable and only provides methods to iterate through it.
The sequence<T> class now keeps only a shared pointer to the unique instance of a sequence_impl<T> that represents that particular application of the generator function. Now we can support chained sequences by allowing move semantics on the sequence<T> class.
template <typename T>
class sequence
{
std::shared_ptr<sequence_impl<T>> _impl;
sequence(const sequence& rhs) = delete;
sequence& operator = (const sequence& rhs) = delete;
public:
typedef typename sequence_impl<T>::iterator iterator;
typedef typename sequence_impl<T>::functor functor;
sequence(functor func) {
_impl(std::make_shared<sequence_impl<T>>(func))
}
sequence(sequence&& rhs) {
_impl = std::move(rhs._impl);
}
sequence& operator = (sequence&& rhs) {
_impl = std::move(rhs._impl);
}
iterator begin() const {
return _impl->begin();
}
iterator end() const {
return _impl->end();
}
};
The diagram below illustrates the relationships between the classes involved in the implementation of lazy sequences:
genFunc2
LINQ operators
Ok, now we have really almost done. The only thing left to do, if we want, is to write a few sequence-manipulation operators, modeled on the example of the LINQ-to-objects. I’ll list just a few, as example:
// Determines whether all elements of a sequence satisfy a condition.
bool all(std::function<bool(T)> predicate)
{
if (nullptr == predicate) {
throw std::exception();
}
for (auto t : *_impl)
{
if (!predicate(t)) {
return false;
}
}
return true;
}
// Returns an empty sequence
static sequence<T> empty()
{
auto fn = [](__resumable_func<T>& rf) {
rf.yieldBreak();
};
return sequence<T>(fn);
}
// Generates a sequence of integral numbers within a specified range [from, to).
static sequence<int> range(int from, int to)
{
if (to < from) {
throw std::exception();
}
auto fn = [from, to](__resumable_func<T>& rf) {
for (int i = from; i < to; i++) {
rf.yieldReturn(i);
}
};
return sequence<int>(fn);
}
// Projects each element of a sequence into a new form.
template <typename TResult>
sequence<TResult> select(std::function<TResult(T)> selector)
{
if (nullptr == selector) {
throw std::exception();
}
std::shared_ptr<sequence_impl<T>> impl = _impl;
auto fn = [impl, selector](__resumable_func<T>& rf) {
for (T t : *impl)
{
auto val = selector(t);
rf.yieldReturn(val);
}
};
return sequence<TResult>(fn);
}
// Returns a specified number of contiguous elements from the start of a sequence.
sequence<T> take(int count)
{
if (count < 0) {
throw std::exception();
}
std::shared_ptr<sequence_impl<T>> impl = _impl;
auto fn = [impl, count](__resumable_func<T>& rf) {
auto it = impl->begin();
for (int i = 0; i < count && it != impl->end(); i++, ++it) {
rf.yieldReturn(*it);
}
};
return sequence<T>(fn);
}
// Filters a sequence of values based on a predicate.
sequence<T> where(std::function<bool(T)> predicate)
{
if (nullptr == predicate) {
throw std::exception();
}
std::shared_ptr<sequence_impl<T>> impl = _impl;
auto fn = [impl, predicate](__resumable_func<T>& rf) {
for (auto item : *impl)
{
if (predicate(item)) {
rf.yieldReturn(item);
}
}
};
return sequence<T>(fn);
}
We could write many more, but I think these should convey the idea.
Example: a prime numbers generator
As a final example, the following query lazily provides the sequence of prime numbers (smaller than INT_MAX), using a very simple, brute-force algorithm. It is definitely not the fastest generator of prime numbers, it’s maybe a little cryptic, but it’s undoubtedly quite compact!
sequence<int> primes(int max)
{
return sequence<int>::range(2, max)
.where([](int i) {
return sequence<int>::range(2, (int)sqrt(i) + 2)
.all([i](int j) { return (i % j) != 0; });
});
}
Conclusion
In this article I rambled about generators in C++, describing a new sequence<T> type that model lazy enumerators and that could be implemented as an extension of resumable functions, as specified in N3858. I have described a possible implementation based on coroutines and introduced the possibility of extending the sequence class with a set of composable operators.
If you are curious and want to play with my sample implementation, you can find a copy of the sources here. Nothing too fancy, just the code that I showed in this post.
Appendix – Coroutines in Win32
Having completed my long ramble on the “platform independent” aspects of C++ generators, it’s time to go back to the point we left open: how to implement, on Windows, the coroutines that we encapsulated in the __resumable_func class?
We saw that the Visual Studio CTP comes with a first implementation of resumable functions, built over the PPL task library and using Win32 fibers as side-stacks. Even though the CTP does not support generator functions yet, my first idea was to just extend the <pplawait.h> library to implement them. However the code there is specialized for resumable functions that suspend awaitingfor some task, andit turns out that we can reuse only part of their code because, even if we are still dealing with resumable functions, the logic of await and yield are quite different.
In the case of await, functions can be suspended (possibly multiple times) waiting for some other task to complete. This means switching to a fiber associated to the task after having set up a continuation that will be invoked after the task completes, to switch the control back to the current fiber. When the function terminates, the control goes back to the calling fiber, returning the single return value of the async resumable function.
In the case of yield, we never suspend to call external async methods. Instead, we can suspend multiple times going back to the calling fiber, each time by returning one of the values that compose the sequence. So, while the implementation of the await keyword needs to leverage the support of PPL tasks, the concept of generator functions does not imply any concurrency or multithreading and using the PPL is not necessary.
Actually, there are ways to implement yield with await) but I could not find a simple way to use the new __await keyword without spawning new threads (maybe this could be possible with a custom PPL scheduler?)
So I chose to write the code for coroutines myself; the idea here is not very different from the one I described in a very old post (it looks like I keep rewriting the same post :-)) but now I can take advantage of the fiber-based code from the CTP’s <pplawait.h> library.
Win32 Fibers
Let’s delve into the details of the implementation. Before all, let me summarize once again the Win32 Fiber API.
Fibers were added to Windows NT to support cooperative multitasking. They can be thought as lightweight threads that must be manually scheduled by the application. In other words, fibers are a perfect tool to implement coroutines sequencing.
When a fiber is created, with CreateFiber, it is passed a fiber-start function. The OS then assigns it a separate stack and sets up execution to begin at this fiber-start function. To schedule a fiber we need to “switch” to it manually with SwitchToFiber and once it is running, a fiber can then suspend itself only by explicitly yielding execution to another fiber, also by calling SwitchToFiber.
SwitchToFiber only works from a fiber to another, so the first thing to do is to convert the current thread into a fiber, with ConvertThreadToFiber. Finally, when we have done using fibers, we can convert the main fiber back to a normal thread with ConvertFiberToThread.
The __resumable_func class
We want to put all the logic to handle the suspension and resumption of a function in the __resumable_func<T> class, as described before.
In our case we don’t need symmetric coroutines; we just need the ability of returning control to the calling fiber. So our class will contain a handle to the “caller” fiber and a handle to the fiber we want to run.
#include <functional>
#include <pplawait.h>
template <typename TRet>
class __resumable_func : __resumable_func_base
{
typedef std::function<void(__resumable_func&)> TFunc;
TFunc _func;
TRet _currentValue;
LPVOID _pFiber;
LPVOID _pCallerFiber;
Concurrency::details::__resumable_func_fiber_data* _pFuncData;
public:
__resumable_func(TFunc func);
~__resumable_func();
void yieldReturn(TRet value);
void yieldBreak();
void resume();
const TRet& getCurrent() const const { return _currentValue; }
bool isEos() const { return _pFiber == nullptr; }
private:
static void yield();
static VOID CALLBACK ResumableFuncFiberProc(PVOID lpParameter);
};
The constructor stores a copy of the generator function to run, creates a new fiber object specifying ResumableFuncFiberProc as the function to execute, and immediately switches the execution to this fiber:
__resumable_func(TFunc func) :
_currentValue(TRet()),
_pFiber(nullptr),
_func(func),
_pFuncData(nullptr)
{
// Convert the current thread to a fiber. This is needed because the thread needs to "be"
// a fiber in order to be able to switch to another fiber.
ConvertCurrentThreadToFiber();
_pCallerFiber = GetCurrentFiber();
// Create a new fiber (or re-use an existing one from the pool)
_pFiber = Concurrency::details::POOL CreateFiberEx(Concurrency::details::fiberPool.commitSize,
Concurrency::details::fiberPool.allocSize, FIBER_FLAG_FLOAT_SWITCH, &ResumableFuncFiberProc, this);
if (!_pFiber) {
throw std::bad_alloc();
}
// Switch to the newly created fiber. When this "returns" the functor has either returned,
// or issued an 'yield' statement.
::SwitchToFiber(_pFiber);
_pFuncData->suspending = false;
_pFuncData->Release();
}
The fiber will start from the fiber procedure, which has the only task of running the generator function in the context of the fiber:
// Entry proc for the Resumable Function Fiber.
static VOID CALLBACK ResumableFuncFiberProc(PVOID lpParameter)
{
LPVOID threadFiber;
// This function does not formally return, due to the SwitchToFiber call at the bottom.
// This scope block is needed for the destructors of the locals in this block to fire
// before we do the SwitchToFiber.
{
Concurrency::details::__resumable_func_fiber_data funcDataOnFiberStack;
__resumable_func* pThis = (__resumable_func*)lpParameter;
// The callee needs to setup some more stuff after we return (which would be either on
// yield or an ordinary return). Hence the callee needs the pointer to the func_data
// on our stack. This is not unsafe since the callee has a refcount on this structure
// which means the fiber will continue to live.
pThis->_pFuncData = &funcDataOnFiberStack;
Concurrency::details::POOL SetFiberData(&funcDataOnFiberStack);
funcDataOnFiberStack.threadFiber = pThis->_pCallerFiber;
funcDataOnFiberStack.resumableFuncFiber = GetCurrentFiber();
// Finally calls the function in the context of the fiber. The execution can be
// suspended by calling yield
pThis->_func(*pThis);
// Here the function has completed. We set return to true meaning this is the
// final 'real' return and not one of the 'yield' returns.
funcDataOnFiberStack.returned = true;
pThis->_pFiber = nullptr;
threadFiber = funcDataOnFiberStack.threadFiber;
}
// Return to the calling fiber.
::SwitchToFiber(threadFiber);
// On a normal fiber this function won't exit after this point. However, if the fiber is
// in a fiber-pool and re-used we can get control back. So just exit this function, which
// will cause the fiber pool to spin around and re-enter.
}
There are two ways to suspend the execution of the generator function running in the fiber and to yield control back to the caller. The first is to yield a value, which will be stored in a data member:
void yieldReturn(TRet value)
{
_currentValue = value;
yield();
}
The second is to immediately terminate the sequence, for example with a return statement or reaching the end of the function. The compiler should translate a return into a call to the yieldBreak method:
void yieldBreak()
{
_pFiber = nullptr;
yield();
}
To yield the control we just need to switch back to the calling fiber:
static void yield()
{
_ASSERT(IsThreadAFiber());
Concurrency::details::__resumable_func_fiber_data* funcDataOnFiberStack =
Concurrency::details::__resumable_func_fiber_data::GetCurrentResumableFuncData();
// Add-ref's the fiber. Even though there can only be one thread active in the fiber
// context, there can be multiple threads accessing the fiber data.
funcDataOnFiberStack->AddRef();
_ASSERT(funcDataOnFiberStack);
funcDataOnFiberStack->verify();
// Mark as busy suspending. We cannot run the code in the 'then' statement
// concurrently with the await doing the setting up of the fiber.
_ASSERT(!funcDataOnFiberStack->suspending);
funcDataOnFiberStack->suspending = true;
// Make note of the thread that we're being called from (Note that we'll always resume
// on the same thread).
funcDataOnFiberStack->awaitingThreadId = GetCurrentThreadId();
_ASSERT(funcDataOnFiberStack->resumableFuncFiber == GetCurrentFiber());
// Return to the calling fiber.
::SwitchToFiber(funcDataOnFiberStack->threadFiber);
}
Once we have suspended, incrementing the iterator will resume the execution by calling resume, which will switch to this object’s fiber:
void resume()
{
_ASSERT(IsThreadAFiber());
_ASSERT(_pFiber != nullptr);
_ASSERT(_pFuncData != nullptr);
_ASSERT(!_pFuncData->suspending);
_ASSERT(_pFuncData->awaitingThreadId == GetCurrentThreadId());
// Switch to the fiber. When this "returns" the functor has either returned, or issued
// an 'yield' statement.
::SwitchToFiber(_pFiber);
_ASSERT(_pFuncData->returned || _pFuncData->suspending);
_pFuncData->suspending = false;
if (_pFuncData->returned) {
_pFiber = nullptr;
}
_pFuncData->Release();
}
The destructor just needs to convert the current fiber back to a normal thread, but only when there are no more fibers running in the thread. For this reason we need to keep a per-thread fiber count, which is incremented every time we create a __resumable_funcand decremented every time we destroy it.
~__resumable_func()
{
if (_pCallerFiber != nullptr) {
ConvertFiberBackToThread();
}
}
class __resumable_func_base
{
__declspec(thread) static int ts_count;
protected:
// Convert the thread to a fiber.
static void ConvertCurrentThreadToFiber()
{
if (!IsThreadAFiber())
{
// Convert the thread to a fiber. Use FIBER_FLAG_FLOAT_SWITCH on x86.
LPVOID threadFiber = ConvertThreadToFiberEx(nullptr, FIBER_FLAG_FLOAT_SWITCH);
if (threadFiber == NULL) {
throw std::bad_alloc();
}
ts_count = 1;
}
else
{
ts_count++;
}
}
// Convert the fiber back to a thread.
static void ConvertFiberBackToThread()
{
if (--ts_count == 0)
{
if (ConvertFiberToThread() == FALSE) {
throw std::bad_alloc();
}
}
}
};
__declspec(thread) int __resumable_func_base::ts_count = 0;
And this is all we need to have resumable generators in C++, on Windows. The complete source code can be found here.
6 thoughts on “Generator functions in C++
Leave a Reply
Fill in your details below or click an icon to log in:
WordPress.com Logo
You are commenting using your WordPress.com account. Log Out / Change )
Twitter picture
You are commenting using your Twitter account. Log Out / Change )
Facebook photo
You are commenting using your Facebook account. Log Out / Change )
Google+ photo
You are commenting using your Google+ account. Log Out / Change )
Connecting to %s | {
"url": "https://paoloseverini.wordpress.com/2014/06/09/generator-functions-in-c/",
"source_domain": "paoloseverini.wordpress.com",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "108145",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GR6SPKEBBJIVBKXUWS5ZLAAKE27SMWTV",
"WARC-Concurrent-To": "<urn:uuid:2ef9d08e-e98e-40f6-8d17-00c110d5b90b>",
"WARC-Date": "2017-03-26T05:19:16Z",
"WARC-IP-Address": "192.0.78.12",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:4OLGEYPVCWQVQ2I3ZA7AWZBVTUPJ3HQ2",
"WARC-Record-ID": "<urn:uuid:ed247bf0-bf7c-41de-94ad-73666f5262e2>",
"WARC-Target-URI": "https://paoloseverini.wordpress.com/2014/06/09/generator-functions-in-c/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0a4e1bb8-08fa-4418-9215-e5d90729038e>"
},
"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,
27,
28,
212,
213,
516,
517,
557,
558,
835,
836,
945,
946,
973,
975,
990,
1005,
1024,
1048,
1073,
1088,
1105,
1111,
1113,
1114,
1459,
1460,
1493,
1495,
1530,
1532,
1533,
1669,
1670,
1999,
2000,
2364,
2365,
2582,
2583,
2635,
2636,
2959,
2960,
2996,
2998,
3013,
3028,
3045,
3051,
3068,
3093,
3108,
3125,
3131,
3133,
3134,
3226,
3227,
3341,
3342,
3464,
3465,
3745,
3746,
3911,
3912,
3946,
3999,
4001,
4036,
4038,
4039,
4114,
4115,
4149,
4170,
4172,
4207,
4209,
4210,
4441,
4442,
4466,
4551,
4553,
4600,
4606,
4633,
4639,
4641,
4642,
4822,
4823,
4845,
4860,
4862,
4870,
4935,
4945,
4995,
5089,
5122,
5179,
5182,
5183,
5198,
5199,
5626,
5627,
5723,
5724,
5880,
5881,
6092,
6093,
6411,
6412,
6482,
6483,
6504,
6528,
6530,
6543,
6546,
6567,
6582,
6584,
6592,
6644,
6669,
6670,
6715,
6738,
6770,
6776,
6797,
6824,
6830,
6831,
6840,
6859,
6862,
6863,
6876,
6877,
7074,
7075,
7162,
7163,
7199,
7201,
7216,
7231,
7248,
7254,
7271,
7296,
7311,
7328,
7334,
7336,
7337,
7362,
7383,
7385,
7420,
7422,
7423,
7498,
7499,
7792,
7975,
8283,
8455,
8631,
8756,
8992,
8993,
9080,
9081,
9102,
9126,
9128,
9136,
9161,
9162,
9200,
9287,
9329,
9335,
9375,
9425,
9431,
9485,
9544,
9550,
9604,
9634,
9640,
9675,
9703,
9709,
9748,
9776,
9798,
9804,
9805,
9814,
9833,
9836,
9837,
10201,
10202,
10654,
10655,
10810,
10811,
10836,
10837,
11171,
11172,
11470,
11471,
11734,
11735,
11760,
11783,
11785,
11843,
11844,
11852,
11886,
11887,
11928,
11951,
11970,
11971,
12007,
12031,
12033,
12034,
12287,
12288,
12432,
12433,
12790,
12791,
12975,
12976,
13101,
13102,
13138,
13140,
13155,
13170,
13187,
13193,
13210,
13235,
13250,
13267,
13273,
13275,
13276,
13305,
13306,
13363,
13378,
13393,
13410,
13416,
13446,
13471,
13486,
13503,
13509,
13513,
13514,
13609,
13610,
13666,
13667,
13701,
13702,
13814,
13815,
13853,
13854,
13873,
13874,
14083,
14084,
14106,
14130,
14132,
14189,
14190,
14216,
14248,
14254,
14260,
14261,
14339,
14393,
14399,
14405,
14406,
14468,
14543,
14613,
14614,
14622,
14671,
14725,
14731,
14737,
14738,
14774,
14780,
14824,
14858,
14880,
14886,
14887,
14946,
14952,
15007,
15032,
15042,
15043,
15084,
15135,
15145,
15146,
15194,
15238,
15248,
15249,
15325,
15331,
15332,
15391,
15397,
15434,
15440,
15441,
15472,
15478,
15522,
15569,
15575,
15578,
15579,
16117,
16118,
16631,
16632,
16819,
16820,
16850,
16851,
17068,
17069,
17104,
17133,
17158,
17187,
17199,
17205,
17207,
17208,
17470,
17471,
17926,
17927,
18433,
18434,
18560,
18561,
18598,
18624,
18656,
18657,
18880,
18881,
18966,
18967,
18989,
19004,
19006,
19014,
19024,
19074,
19168,
19225,
19228,
19229,
19283,
19284,
19338,
19386,
19430,
19431,
19642,
19643,
19714,
19742,
19803,
19805,
19865,
19891,
19901,
19937,
19970,
19980,
19987,
20023,
20025,
20026,
20335,
20336,
20504,
20505,
20559,
20607,
20651,
20652,
20844,
20845,
20866,
20867,
21262,
21263,
21656,
21794,
21795,
21998,
21999,
22021,
22041,
22043,
22051,
22114,
22115,
22124,
22149,
22150,
22204,
22253,
22320,
22382,
22383,
22391,
22457,
22458,
22497,
22503,
22556,
22588,
22594,
22631,
22637,
22684,
22711,
22717,
22720,
22721,
22821,
22822,
23082,
23083,
23105,
23120,
23122,
23167,
23168,
23212,
23269,
23270,
23278,
23336,
23392,
23393,
23422,
23478,
23484,
23515,
23553,
23559,
23603,
23641,
23647,
23648,
23677,
23708,
23714,
23741,
23770,
23776,
23779,
23780,
23898,
23899,
23908,
23909,
23924,
23925,
24132,
24133,
24203,
24246,
24248,
24280,
24312,
24318,
24319,
24345,
24351,
24380,
24406,
24416,
24422,
24439,
24441,
24442,
24471,
24498,
24500,
24544,
24569,
24576,
24604,
24606,
24607,
24688,
24733,
24735,
24756,
24788,
24794,
24795,
24847,
24889,
24920,
24930,
24937,
24967,
24969,
24970,
25026,
25054,
25115,
25117,
25148,
25180,
25186,
25187,
25239,
25297,
25323,
25333,
25369,
25402,
25412,
25419,
25453,
25455,
25456,
25539,
25567,
25569,
25590,
25622,
25628,
25629,
25681,
25736,
25769,
25838,
25871,
25881,
25888,
25916,
25918,
25919,
25973,
26025,
26027,
26059,
26091,
26097,
26098,
26150,
26209,
26241,
26251,
26286,
26324,
26338,
26348,
26355,
26383,
26385,
26386,
26454,
26455,
26490,
26491,
26771,
26772,
26802,
26804,
26844,
26871,
26932,
26991,
27007,
27009,
27010,
27021,
27022,
27390,
27391,
27560,
27561,
27592,
27593,
27827,
27828,
28400,
28401,
28844,
28845,
29270,
29271,
29481,
29482,
29755,
29756,
29769,
29770,
29884,
29885,
30127,
30128,
30526,
30527,
30798,
30799,
30826,
30827,
30965,
30966,
31181,
31182,
31204,
31226,
31227,
31252,
31299,
31301,
31359,
31360,
31377,
31401,
31421,
31447,
31514,
31515,
31523,
31557,
31582,
31583,
31617,
31640,
31659,
31660,
31727,
31781,
31782,
31791,
31816,
31884,
31887,
31888,
32095,
32096,
32131,
32162,
32188,
32209,
32237,
32243,
32341,
32408,
32447,
32490,
32491,
32563,
32666,
32778,
32802,
32838,
32848,
32849,
32948,
32991,
33025,
33026,
33066,
33097,
33103,
33104,
33238,
33239,
33291,
33358,
33364,
33392,
33393,
33489,
33583,
33626,
33636,
33720,
33790,
33791,
33890,
33987,
34085,
34145,
34200,
34201,
34277,
34278,
34347,
34420,
34421,
34513,
34555,
34589,
34590,
34680,
34751,
34801,
34839,
34899,
34909,
34910,
34950,
34988,
34989,
35086,
35184,
35250,
35256,
35257,
35459,
35460,
35493,
35499,
35530,
35547,
35553,
35554,
35757,
35758,
35776,
35778,
35801,
35814,
35816,
35817,
35888,
35889,
35913,
35919,
35954,
36036,
36130,
36131,
36224,
36300,
36340,
36341,
36380,
36420,
36421,
36504,
36578,
36630,
36679,
36680,
36775,
36807,
36878,
36879,
36959,
36960,
37000,
37060,
37066,
37067,
37204,
37205,
37223,
37229,
37264,
37301,
37341,
37383,
37454,
37455,
37550,
37583,
37617,
37618,
37683,
37723,
37759,
37790,
37800,
37831,
37837,
37838,
38140,
38141,
38161,
38163,
38199,
38235,
38241,
38243,
38244,
38272,
38274,
38318,
38319,
38330,
38368,
38414,
38420,
38451,
38461,
38543,
38634,
38673,
38713,
38727,
38753,
38763,
38776,
38786,
38810,
38820,
38826,
38827,
38870,
38913,
38919,
38948,
38958,
39009,
39049,
39063,
39073,
39079,
39082,
39142,
39143,
39260,
39261,
39303,
39304,
39318,
39319,
39374,
39375,
39394,
39395,
39467,
39468,
39484,
39485,
39551,
39552,
39567,
39568,
39635,
39636,
39650,
39651,
39717,
39718
],
"line_end_idx": [
27,
28,
212,
213,
516,
517,
557,
558,
835,
836,
945,
946,
973,
975,
990,
1005,
1024,
1048,
1073,
1088,
1105,
1111,
1113,
1114,
1459,
1460,
1493,
1495,
1530,
1532,
1533,
1669,
1670,
1999,
2000,
2364,
2365,
2582,
2583,
2635,
2636,
2959,
2960,
2996,
2998,
3013,
3028,
3045,
3051,
3068,
3093,
3108,
3125,
3131,
3133,
3134,
3226,
3227,
3341,
3342,
3464,
3465,
3745,
3746,
3911,
3912,
3946,
3999,
4001,
4036,
4038,
4039,
4114,
4115,
4149,
4170,
4172,
4207,
4209,
4210,
4441,
4442,
4466,
4551,
4553,
4600,
4606,
4633,
4639,
4641,
4642,
4822,
4823,
4845,
4860,
4862,
4870,
4935,
4945,
4995,
5089,
5122,
5179,
5182,
5183,
5198,
5199,
5626,
5627,
5723,
5724,
5880,
5881,
6092,
6093,
6411,
6412,
6482,
6483,
6504,
6528,
6530,
6543,
6546,
6567,
6582,
6584,
6592,
6644,
6669,
6670,
6715,
6738,
6770,
6776,
6797,
6824,
6830,
6831,
6840,
6859,
6862,
6863,
6876,
6877,
7074,
7075,
7162,
7163,
7199,
7201,
7216,
7231,
7248,
7254,
7271,
7296,
7311,
7328,
7334,
7336,
7337,
7362,
7383,
7385,
7420,
7422,
7423,
7498,
7499,
7792,
7975,
8283,
8455,
8631,
8756,
8992,
8993,
9080,
9081,
9102,
9126,
9128,
9136,
9161,
9162,
9200,
9287,
9329,
9335,
9375,
9425,
9431,
9485,
9544,
9550,
9604,
9634,
9640,
9675,
9703,
9709,
9748,
9776,
9798,
9804,
9805,
9814,
9833,
9836,
9837,
10201,
10202,
10654,
10655,
10810,
10811,
10836,
10837,
11171,
11172,
11470,
11471,
11734,
11735,
11760,
11783,
11785,
11843,
11844,
11852,
11886,
11887,
11928,
11951,
11970,
11971,
12007,
12031,
12033,
12034,
12287,
12288,
12432,
12433,
12790,
12791,
12975,
12976,
13101,
13102,
13138,
13140,
13155,
13170,
13187,
13193,
13210,
13235,
13250,
13267,
13273,
13275,
13276,
13305,
13306,
13363,
13378,
13393,
13410,
13416,
13446,
13471,
13486,
13503,
13509,
13513,
13514,
13609,
13610,
13666,
13667,
13701,
13702,
13814,
13815,
13853,
13854,
13873,
13874,
14083,
14084,
14106,
14130,
14132,
14189,
14190,
14216,
14248,
14254,
14260,
14261,
14339,
14393,
14399,
14405,
14406,
14468,
14543,
14613,
14614,
14622,
14671,
14725,
14731,
14737,
14738,
14774,
14780,
14824,
14858,
14880,
14886,
14887,
14946,
14952,
15007,
15032,
15042,
15043,
15084,
15135,
15145,
15146,
15194,
15238,
15248,
15249,
15325,
15331,
15332,
15391,
15397,
15434,
15440,
15441,
15472,
15478,
15522,
15569,
15575,
15578,
15579,
16117,
16118,
16631,
16632,
16819,
16820,
16850,
16851,
17068,
17069,
17104,
17133,
17158,
17187,
17199,
17205,
17207,
17208,
17470,
17471,
17926,
17927,
18433,
18434,
18560,
18561,
18598,
18624,
18656,
18657,
18880,
18881,
18966,
18967,
18989,
19004,
19006,
19014,
19024,
19074,
19168,
19225,
19228,
19229,
19283,
19284,
19338,
19386,
19430,
19431,
19642,
19643,
19714,
19742,
19803,
19805,
19865,
19891,
19901,
19937,
19970,
19980,
19987,
20023,
20025,
20026,
20335,
20336,
20504,
20505,
20559,
20607,
20651,
20652,
20844,
20845,
20866,
20867,
21262,
21263,
21656,
21794,
21795,
21998,
21999,
22021,
22041,
22043,
22051,
22114,
22115,
22124,
22149,
22150,
22204,
22253,
22320,
22382,
22383,
22391,
22457,
22458,
22497,
22503,
22556,
22588,
22594,
22631,
22637,
22684,
22711,
22717,
22720,
22721,
22821,
22822,
23082,
23083,
23105,
23120,
23122,
23167,
23168,
23212,
23269,
23270,
23278,
23336,
23392,
23393,
23422,
23478,
23484,
23515,
23553,
23559,
23603,
23641,
23647,
23648,
23677,
23708,
23714,
23741,
23770,
23776,
23779,
23780,
23898,
23899,
23908,
23909,
23924,
23925,
24132,
24133,
24203,
24246,
24248,
24280,
24312,
24318,
24319,
24345,
24351,
24380,
24406,
24416,
24422,
24439,
24441,
24442,
24471,
24498,
24500,
24544,
24569,
24576,
24604,
24606,
24607,
24688,
24733,
24735,
24756,
24788,
24794,
24795,
24847,
24889,
24920,
24930,
24937,
24967,
24969,
24970,
25026,
25054,
25115,
25117,
25148,
25180,
25186,
25187,
25239,
25297,
25323,
25333,
25369,
25402,
25412,
25419,
25453,
25455,
25456,
25539,
25567,
25569,
25590,
25622,
25628,
25629,
25681,
25736,
25769,
25838,
25871,
25881,
25888,
25916,
25918,
25919,
25973,
26025,
26027,
26059,
26091,
26097,
26098,
26150,
26209,
26241,
26251,
26286,
26324,
26338,
26348,
26355,
26383,
26385,
26386,
26454,
26455,
26490,
26491,
26771,
26772,
26802,
26804,
26844,
26871,
26932,
26991,
27007,
27009,
27010,
27021,
27022,
27390,
27391,
27560,
27561,
27592,
27593,
27827,
27828,
28400,
28401,
28844,
28845,
29270,
29271,
29481,
29482,
29755,
29756,
29769,
29770,
29884,
29885,
30127,
30128,
30526,
30527,
30798,
30799,
30826,
30827,
30965,
30966,
31181,
31182,
31204,
31226,
31227,
31252,
31299,
31301,
31359,
31360,
31377,
31401,
31421,
31447,
31514,
31515,
31523,
31557,
31582,
31583,
31617,
31640,
31659,
31660,
31727,
31781,
31782,
31791,
31816,
31884,
31887,
31888,
32095,
32096,
32131,
32162,
32188,
32209,
32237,
32243,
32341,
32408,
32447,
32490,
32491,
32563,
32666,
32778,
32802,
32838,
32848,
32849,
32948,
32991,
33025,
33026,
33066,
33097,
33103,
33104,
33238,
33239,
33291,
33358,
33364,
33392,
33393,
33489,
33583,
33626,
33636,
33720,
33790,
33791,
33890,
33987,
34085,
34145,
34200,
34201,
34277,
34278,
34347,
34420,
34421,
34513,
34555,
34589,
34590,
34680,
34751,
34801,
34839,
34899,
34909,
34910,
34950,
34988,
34989,
35086,
35184,
35250,
35256,
35257,
35459,
35460,
35493,
35499,
35530,
35547,
35553,
35554,
35757,
35758,
35776,
35778,
35801,
35814,
35816,
35817,
35888,
35889,
35913,
35919,
35954,
36036,
36130,
36131,
36224,
36300,
36340,
36341,
36380,
36420,
36421,
36504,
36578,
36630,
36679,
36680,
36775,
36807,
36878,
36879,
36959,
36960,
37000,
37060,
37066,
37067,
37204,
37205,
37223,
37229,
37264,
37301,
37341,
37383,
37454,
37455,
37550,
37583,
37617,
37618,
37683,
37723,
37759,
37790,
37800,
37831,
37837,
37838,
38140,
38141,
38161,
38163,
38199,
38235,
38241,
38243,
38244,
38272,
38274,
38318,
38319,
38330,
38368,
38414,
38420,
38451,
38461,
38543,
38634,
38673,
38713,
38727,
38753,
38763,
38776,
38786,
38810,
38820,
38826,
38827,
38870,
38913,
38919,
38948,
38958,
39009,
39049,
39063,
39073,
39079,
39082,
39142,
39143,
39260,
39261,
39303,
39304,
39318,
39319,
39374,
39375,
39394,
39395,
39467,
39468,
39484,
39485,
39551,
39552,
39567,
39568,
39635,
39636,
39650,
39651,
39717,
39718,
39734
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 39734,
"ccnet_original_nlines": 894,
"rps_doc_curly_bracket": 0.0055368198081851006,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3229862451553345,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023837590590119362,
"rps_doc_frac_lines_end_with_ellipsis": 0.0011173200327903032,
"rps_doc_frac_no_alph_words": 0.2698100805282593,
"rps_doc_frac_unique_words": 0.21064770221710205,
"rps_doc_mean_word_length": 5.437632083892822,
"rps_doc_num_sentences": 267,
"rps_doc_symbol_to_word_ratio": 0.002226589946076274,
"rps_doc_unigram_entropy": 5.8235979080200195,
"rps_doc_word_count": 5203,
"rps_doc_frac_chars_dupe_10grams": 0.03739573061466217,
"rps_doc_frac_chars_dupe_5grams": 0.14067581295967102,
"rps_doc_frac_chars_dupe_6grams": 0.09674113243818283,
"rps_doc_frac_chars_dupe_7grams": 0.06093595176935196,
"rps_doc_frac_chars_dupe_8grams": 0.058815211057662964,
"rps_doc_frac_chars_dupe_9grams": 0.04548988863825798,
"rps_doc_frac_chars_top_2gram": 0.008306230418384075,
"rps_doc_frac_chars_top_3gram": 0.005054430104792118,
"rps_doc_frac_chars_top_4gram": 0.002332810079678893,
"rps_doc_books_importance": -3104.710205078125,
"rps_doc_books_importance_length_correction": -3104.710205078125,
"rps_doc_openwebtext_importance": -2393.3798828125,
"rps_doc_openwebtext_importance_length_correction": -2393.3798828125,
"rps_doc_wikipedia_importance": -1909.9222412109375,
"rps_doc_wikipedia_importance_length_correction": -1909.9222412109375
},
"fasttext": {
"dclm": 0.6406934857368469,
"english": 0.8078462481498718,
"fineweb_edu_approx": 2.557462215423584,
"eai_general_math": 0.973053514957428,
"eai_open_web_math": 0.2264772653579712,
"eai_web_code": 0.9348534345626831
}
} | {
"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": "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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"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": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,309,078,947,759,625,700 | Shades88 Shades88 - 1 year ago 87
Java Question
java client example for Kafka Producer, send method not accepting KeyedMessage
I am running kafka 2.9.1-0.8.2.1. I included jars provided in libs/ directory within main kafka directory. Now I am trying to run a java producer example as per what is given here https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example. Now
producer.send
method seems to be accepting this kind of argument
Seq<KeyedMessage<String, String>>
. In the example, object of KeyedMessage is not converted into anything. When I try to do the same I get incompatible types compiler error.
Here's the code
import kafka.producer.KeyedMessage;
import kafka.producer.ProducerConfig;
import java.util.Properties;
import kafka.producer.Producer;
import scala.collection.Seq;
public class KakfaProducer {
public static void main(String [] args) {
Properties prop = new Properties();
prop.put("metadata.broker.list", "localhost:9092");
prop.put("serializer.class","kafka.serializer.StringEncoder");
//prop.put("partitioner.class", "example.producer.SimplePartitioner");
ProducerConfig producerConfig = new ProducerConfig(prop);
Producer<String,String> producer = new <String,String>Producer(producerConfig);
String topic = "test";
KeyedMessage<String,String> message = new <String,String>KeyedMessage(topic, "Hello Test message");
producer.send(message);
producer.close();
}
}
And that commented code is giving me class def not found exception. I tried to look a lot on net, but it's not helping.
There are two kinds of jars in that libs/ directory. One is kafka-client and other one is just kafka and version number. Am I including wrong jar? Which one do I need to work with?
Answer Source
For the first problem, instead of importing scala API, import Java one. So, instead of using:
import kafka.producer.Producer;
please use:
import kafka.javaapi.producer.Producer;
SimplePartitioner code can be found below. Add it to the corresponding directory:
import kafka.producer.Partitioner;
import kafka.utils.VerifiableProperties;
public class SimplePartitioner implements Partitioner {
public SimplePartitioner (VerifiableProperties props) {
}
public int partition(Object key, int numPartitions) {
int partition = 0;
String stringKey = (String) key;
int offset = stringKey.lastIndexOf('.');
if (offset > 0) {
partition = Integer.parseInt( stringKey.substring(offset+1)) % numPartitions;
}
return partition;
}
} | {
"url": "https://codedump.io/share/FbI3ntsQMZAs/1/java-client-example-for-kafka-producer-send-method-not-accepting-keyedmessage",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2017-34",
"warc_metadata": {
"Content-Length": "41070",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:HMTJJMZFWGZ5NRYWGLDR2U6DROXJTGQ3",
"WARC-Concurrent-To": "<urn:uuid:dc6d0585-9ad6-4a41-89a6-9f6c6b26a974>",
"WARC-Date": "2017-08-20T15:28:37Z",
"WARC-IP-Address": "84.22.103.185",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WXFRJVCI5PNYTDZF6CKX23PHQ7EXM44U",
"WARC-Record-ID": "<urn:uuid:d58645f1-554a-43e3-9823-e33ef7abb020>",
"WARC-Target-URI": "https://codedump.io/share/FbI3ntsQMZAs/1/java-client-example-for-kafka-producer-send-method-not-accepting-keyedmessage",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8ea620f9-9a61-4cb9-a1f3-73e7b6f3a804>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-224-23.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,
34,
48,
49,
128,
129,
387,
388,
402,
453,
487,
627,
628,
644,
645,
681,
719,
748,
780,
809,
810,
839,
881,
917,
969,
1032,
1103,
1161,
1241,
1264,
1364,
1388,
1406,
1408,
1410,
1411,
1412,
1532,
1533,
1714,
1715,
1729,
1730,
1824,
1825,
1857,
1858,
1870,
1871,
1911,
1912,
1994,
1995,
2030,
2071,
2072,
2128,
2188,
2194,
2195,
2253,
2280,
2321,
2370,
2396,
2485,
2495,
2520,
2524
],
"line_end_idx": [
34,
48,
49,
128,
129,
387,
388,
402,
453,
487,
627,
628,
644,
645,
681,
719,
748,
780,
809,
810,
839,
881,
917,
969,
1032,
1103,
1161,
1241,
1264,
1364,
1388,
1406,
1408,
1410,
1411,
1412,
1532,
1533,
1714,
1715,
1729,
1730,
1824,
1825,
1857,
1858,
1870,
1871,
1911,
1912,
1994,
1995,
2030,
2071,
2072,
2128,
2188,
2194,
2195,
2253,
2280,
2321,
2370,
2396,
2485,
2495,
2520,
2524,
2525
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2525,
"ccnet_original_nlines": 68,
"rps_doc_curly_bracket": 0.004752479959279299,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1701323240995407,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018903590738773346,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3667296767234802,
"rps_doc_frac_unique_words": 0.625,
"rps_doc_mean_word_length": 7.080882549285889,
"rps_doc_num_sentences": 61,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.912752628326416,
"rps_doc_word_count": 272,
"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.0031152600422501564,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -242.3782958984375,
"rps_doc_books_importance_length_correction": -242.3782958984375,
"rps_doc_openwebtext_importance": -188.67837524414062,
"rps_doc_openwebtext_importance_length_correction": -188.67837524414062,
"rps_doc_wikipedia_importance": -111.7287826538086,
"rps_doc_wikipedia_importance_length_correction": -111.7287826538086
},
"fasttext": {
"dclm": 0.8498213291168213,
"english": 0.6378323435783386,
"fineweb_edu_approx": 2.771437644958496,
"eai_general_math": 0.9308627843856812,
"eai_open_web_math": 0.05886644124984741,
"eai_web_code": 0.9756874442100525
}
} | {
"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": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,068,024,366,988,787,000 | How to root Utok D35
How to root Utok D35
If you need root for Utok D35 read the full article and follow our instructions.
Root on the Android OS
This superuser account in the operating system that has elevated privileges to access files. Superuser can block ads in apps, edit system files, install the firmware CyanogenMod, ParanoidAndroid or MIUI, change the menu.
The possibilities are endless: you can fully customize your smartphone itself, Android – an operating system based on Linux and is therefore very flexibly configured in the right hands.
To learn more, you can use this article possible root access.
How to root Utok D35
To become root, we need a microUSB cable, mobile device and computer.
1. Turn on your mobile device via USB debugging
2. Connect it to your computer via MicroUSB wire
3. download program Rootkhp PRO 3.2 or later, and run on a PC
4. use instructions on how to use Rootkhp PRO
The process of obtaining root access will take place smoothly if you follow the instructions of our items.
Video how to use Rootkhp Pro
Video instructions on using the program on your computer. | {
"url": "http://android8firmware.pro/how-to-root-utok-d35/",
"source_domain": "android8firmware.pro",
"snapshot_id": "crawl=CC-MAIN-2020-40",
"warc_metadata": {
"Content-Length": "31882",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:HKHXAIEMKDI3OV3UYYCQ4JFKYXYHXWNC",
"WARC-Concurrent-To": "<urn:uuid:a836c1bd-c705-47a5-ba95-8239c09bc2e1>",
"WARC-Date": "2020-09-19T02:57:11Z",
"WARC-IP-Address": "172.67.220.216",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:N4GR2AM3OJNWD7P37GLENAWSOJZO2ASP",
"WARC-Record-ID": "<urn:uuid:445b6d45-0b03-42db-846f-7c21e2af0dc7>",
"WARC-Target-URI": "http://android8firmware.pro/how-to-root-utok-d35/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0c5a3e9b-aec8-4912-9ce7-2d8c0d675275>"
},
"warc_info": "isPartOf: CC-MAIN-2020-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-226.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,
125,
126,
149,
150,
371,
372,
558,
620,
621,
642,
643,
713,
714,
764,
815,
879,
927,
928,
1035,
1036,
1065,
1066
],
"line_end_idx": [
21,
22,
43,
44,
125,
126,
149,
150,
371,
372,
558,
620,
621,
642,
643,
713,
714,
764,
815,
879,
927,
928,
1035,
1036,
1065,
1066,
1123
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1123,
"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.3640553057193756,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04608295112848282,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13824884593486786,
"rps_doc_frac_unique_words": 0.5440414547920227,
"rps_doc_mean_word_length": 4.606217384338379,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.385324001312256,
"rps_doc_word_count": 193,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09448818862438202,
"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.028121480718255043,
"rps_doc_frac_chars_top_3gram": 0.030371200293302536,
"rps_doc_frac_chars_top_4gram": 0.04386952146887779,
"rps_doc_books_importance": -103.02273559570312,
"rps_doc_books_importance_length_correction": -103.02273559570312,
"rps_doc_openwebtext_importance": -67.66270446777344,
"rps_doc_openwebtext_importance_length_correction": -61.35078811645508,
"rps_doc_wikipedia_importance": -60.17646026611328,
"rps_doc_wikipedia_importance_length_correction": -60.17646026611328
},
"fasttext": {
"dclm": 0.10075926780700684,
"english": 0.8480337858200073,
"fineweb_edu_approx": 2.029712200164795,
"eai_general_math": 0.04924631118774414,
"eai_open_web_math": 0.07744240760803223,
"eai_web_code": 0.001841429970227182
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.162",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"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": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-108,842,232,778,480,300 | Related Articles
Related Articles
Next higher number with same number of set bits
• Difficulty Level : Hard
• Last Updated : 07 Nov, 2019
Given a number x, find next number with same number of 1 bits in it’s binary representation.
For example, consider x = 12, whose binary representation is 1100 (excluding leading zeros on 32 bit machine). It contains two logic 1 bits. The next higher number with two logic 1 bits is 17 (100012).
Algorithm:
When we observe the binary sequence from 0 to 2n – 1 (n is # of bits), right most bits (least significant) vary rapidly than left most bits. The idea is to find right most string of 1’s in x, and shift the pattern to right extreme, except the left most bit in the pattern. Shift the left most bit in the pattern (omitted bit) to left part of x by one position. An example makes it more clear,
x = 156
10
x = 10011100
(2)
10011100
00011100 - right most string of 1's in x
00000011 - right shifted pattern except left most bit ------> [A]
00010000 - isolated left most bit of right most 1's pattern
00100000 - shiftleft-ed the isolated bit by one position ------> [B]
10000000 - left part of x, excluding right most 1's pattern ------> [C]
10100000 - add B and C (OR operation) ------> [D]
10100011 - add A and D which is required number 163
(10)
After practicing with few examples, it easy to understand. Use the below given program for generating more sets.
Program Design:
We need to note few facts of binary numbers. The expression x & -x will isolate right most set bit in x (ensuring x will use 2’s complement form for negative numbers). If we add the result to x, right most string of 1’s in x will be reset, and the immediate ‘0’ left to this pattern of 1’s will be set, which is part [B] of above explanation. For example if x = 156, x & -x will result in 00000100, adding this result to x yields 10100000 (see part D). We left with the right shifting part of pattern of 1’s (part A of above explanation).
There are different ways to achieve part A. Right shifting is essentially a division operation. What should be our divisor? Clearly, it should be multiple of 2 (avoids 0.5 error in right shifting), and it should shift the right most 1’s pattern to right extreme. The expression (x & -x) will serve the purpose of divisor. An EX-OR operation between the number X and expression which is used to reset right most bits, will isolate the rightmost 1’s pattern.
A Correction Factor:
Note that we are adding right most set bit to the bit pattern. The addition operation causes a shift in the bit positions. The weight of binary system is 2, one shift causes an increase by a factor of 2. Since the increased number (rightOnesPattern in the code) being used twice, the error propagates twice. The error needs to be corrected. A right shift by 2 positions will correct the result.
The popular name for this program is same number of one bits.
C++
filter_none
edit
close
play_arrow
link
brightness_4
code
#include<iostream>
using namespace std;
typedef unsigned int uint_t;
// this function returns next higher number with same number of set bits as x.
uint_t snoob(uint_t x)
{
uint_t rightOne;
uint_t nextHigherOneBit;
uint_t rightOnesPattern;
uint_t next = 0;
if(x)
{
// right most set bit
rightOne = x & -(signed)x;
// reset the pattern and set next higher bit
// left part of x will be here
nextHigherOneBit = x + rightOne;
// nextHigherOneBit is now part [D] of the above explanation.
// isolate the pattern
rightOnesPattern = x ^ nextHigherOneBit;
// right adjust pattern
rightOnesPattern = (rightOnesPattern)/rightOne;
// correction factor
rightOnesPattern >>= 2;
// rightOnesPattern is now part [A] of the above explanation.
// integrate new pattern (Add [D] and [A])
next = nextHigherOneBit | rightOnesPattern;
}
return next;
}
int main()
{
int x = 156;
cout<<"Next higher number with same number of set bits is "<<snoob(x);
getchar();
return 0;
}
chevron_right
Java
filter_none
edit
close
play_arrow
link
brightness_4
code
// Java Implementation on above approach
class GFG
{
// this function returns next higher
// number with same number of set bits as x.
static int snoob(int x)
{
int rightOne, nextHigherOneBit, rightOnesPattern, next = 0;
if(x > 0)
{
// right most set bit
rightOne = x & -x;
// reset the pattern and set next higher bit
// left part of x will be here
nextHigherOneBit = x + rightOne;
// nextHigherOneBit is now part [D] of the above explanation.
// isolate the pattern
rightOnesPattern = x ^ nextHigherOneBit;
// right adjust pattern
rightOnesPattern = (rightOnesPattern)/rightOne;
// correction factor
rightOnesPattern >>= 2;
// rightOnesPattern is now part [A] of the above explanation.
// integrate new pattern (Add [D] and [A])
next = nextHigherOneBit | rightOnesPattern;
}
return next;
}
// Driver code
public static void main (String[] args)
{
int x = 156;
System.out.println("Next higher number with same" +
"number of set bits is "+snoob(x));
}
}
// This code is contributed by mits
chevron_right
Python 3
filter_none
edit
close
play_arrow
link
brightness_4
code
# This function returns next
# higher number with same
# number of set bits as x.
def snoob(x):
next = 0
if(x):
# right most set bit
rightOne = x & -(x)
# reset the pattern and
# set next higher bit
# left part of x will
# be here
nextHigherOneBit = x + int(rightOne)
# nextHigherOneBit is
# now part [D] of the
# above explanation.
# isolate the pattern
rightOnesPattern = x ^ int(nextHigherOneBit)
# right adjust pattern
rightOnesPattern = (int(rightOnesPattern) /
int(rightOne))
# correction factor
rightOnesPattern = int(rightOnesPattern) >> 2
# rightOnesPattern is now part
# [A] of the above explanation.
# integrate new pattern
# (Add [D] and [A])
next = nextHigherOneBit | rightOnesPattern
return next
# Driver Code
x = 156
print("Next higher number with " +
"same number of set bits is"
snoob(x))
# This code is contributed by Smita
chevron_right
C#
filter_none
edit
close
play_arrow
link
brightness_4
code
// C# Implementation on above approach
using System;
class GFG
{
// this function returns next higher
// number with same number of set bits as x.
static int snoob(int x)
{
int rightOne, nextHigherOneBit,
rightOnesPattern, next = 0;
if(x > 0)
{
// right most set bit
rightOne = x & -x;
// reset the pattern and set next higher bit
// left part of x will be here
nextHigherOneBit = x + rightOne;
// nextHigherOneBit is now part [D]
// of the above explanation.
// isolate the pattern
rightOnesPattern = x ^ nextHigherOneBit;
// right adjust pattern
rightOnesPattern = (rightOnesPattern) / rightOne;
// correction factor
rightOnesPattern >>= 2;
// rightOnesPattern is now part [A]
// of the above explanation.
// integrate new pattern (Add [D] and [A])
next = nextHigherOneBit | rightOnesPattern;
}
return next;
}
// Driver code
static void Main()
{
int x = 156;
Console.WriteLine("Next higher number with same" +
"number of set bits is " + snoob(x));
}
}
// This code is contributed by mits
chevron_right
PHP
filter_none
edit
close
play_arrow
link
brightness_4
code
<?php
// This function returns next higher number
// with same number of set bits as x.
function snoob($x)
{
$next = 0;
if($x)
{
// right most set bit
$rightOne = $x & - $x;
// reset the pattern and set next higher
// bit left part of x will be here
$nextHigherOneBit = $x + $rightOne;
// nextHigherOneBit is now part [D] of
// the above explanation.
// isolate the pattern
$rightOnesPattern = $x ^ $nextHigherOneBit;
// right adjust pattern
$rightOnesPattern = intval(($rightOnesPattern) /
$rightOne);
// correction factor
$rightOnesPattern >>= 2;
// rightOnesPattern is now part [A]
// of the above explanation.
// integrate new pattern (Add [D] and [A])
$next = $nextHigherOneBit | $rightOnesPattern;
}
return $next;
}
// Driver Code
$x = 156;
echo "Next higher number with same "
"number of set bits is " . snoob($x);
// This code is contributed by ita_c
?>
chevron_right
Output:
Next higher number with same number of set bits is 163
Usage: Finding/Generating subsets.
Variations:
1. Write a program to find a number immediately smaller than given, with same number of logic 1 bits? (Pretty simple)
2. How to count or generate the subsets available in the given set?
References:
1. A nice presentation here.
2. Hackers Delight by Warren (An excellent and short book on various bit magic algorithms, a must for enthusiasts)
3. C A Reference Manual by Harbison and Steele (A good book on standard C, you can access code part of this post here).
Venki. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
My Personal Notes arrow_drop_up
Recommended Articles
Page : | {
"url": "https://www.geeksforgeeks.org/next-higher-number-with-same-number-of-set-bits/",
"source_domain": "www.geeksforgeeks.org",
"snapshot_id": "crawl=CC-MAIN-2021-04",
"warc_metadata": {
"Content-Length": "166884",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7DY75Z2HULTQMXDO3FYNQO7235LO4U6O",
"WARC-Concurrent-To": "<urn:uuid:c39fae29-bef7-43b6-93ad-c649e796a8f3>",
"WARC-Date": "2021-01-21T21:00:59Z",
"WARC-IP-Address": "23.221.74.16",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UDTT22CRBX5TEJU44M4DWIGSXGUTNTFF",
"WARC-Record-ID": "<urn:uuid:07cf9c46-a28b-4cfb-bc4d-9fdb0fb51101>",
"WARC-Target-URI": "https://www.geeksforgeeks.org/next-higher-number-with-same-number-of-set-bits/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:477984fe-0113-429b-babc-04d7628e0326>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-99.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,
17,
18,
35,
36,
84,
112,
144,
145,
238,
239,
441,
442,
453,
454,
847,
848,
856,
857,
860,
861,
862,
863,
876,
877,
881,
882,
891,
932,
998,
1058,
1127,
1199,
1249,
1301,
1302,
1307,
1308,
1421,
1422,
1438,
1439,
1978,
1979,
2436,
2437,
2458,
2459,
2854,
2855,
2856,
2857,
2919,
2920,
2924,
2925,
2937,
2938,
2943,
2949,
2950,
2961,
2962,
2967,
2980,
2985,
2986,
3005,
3008,
3029,
3032,
3061,
3064,
3143,
3166,
3168,
3171,
3190,
3217,
3244,
3247,
3266,
3269,
3277,
3281,
3284,
3310,
3341,
3344,
3393,
3428,
3465,
3468,
3534,
3537,
3564,
3609,
3612,
3640,
3692,
3695,
3720,
3748,
3751,
3817,
3820,
3867,
3915,
3919,
3922,
3937,
3939,
3942,
3953,
3955,
3970,
4043,
4046,
4059,
4071,
4073,
4074,
4088,
4089,
4090,
4095,
4096,
4108,
4109,
4114,
4120,
4121,
4132,
4133,
4138,
4151,
4156,
4157,
4198,
4208,
4210,
4217,
4255,
4300,
4324,
4326,
4329,
4389,
4392,
4402,
4404,
4407,
4433,
4456,
4459,
4508,
4543,
4580,
4583,
4649,
4652,
4679,
4724,
4727,
4755,
4807,
4810,
4835,
4863,
4866,
4932,
4935,
4982,
5030,
5032,
5035,
5048,
5050,
5053,
5068,
5109,
5111,
5128,
5184,
5240,
5242,
5244,
5247,
5283,
5284,
5298,
5299,
5300,
5309,
5310,
5322,
5323,
5328,
5334,
5335,
5346,
5347,
5352,
5365,
5370,
5371,
5400,
5427,
5454,
5468,
5475,
5488,
5499,
5510,
5539,
5567,
5578,
5611,
5641,
5672,
5690,
5735,
5746,
5777,
5808,
5837,
5867,
5920,
5931,
5962,
6015,
6058,
6069,
6097,
6151,
6162,
6201,
6241,
6252,
6285,
6313,
6364,
6380,
6383,
6397,
6405,
6441,
6476,
6512,
6515,
6551,
6552,
6566,
6567,
6568,
6571,
6572,
6584,
6585,
6590,
6596,
6597,
6608,
6609,
6614,
6627,
6632,
6633,
6672,
6686,
6696,
6698,
6705,
6743,
6788,
6812,
6814,
6817,
6854,
6890,
6897,
6911,
6917,
6924,
6954,
6981,
6988,
7041,
7080,
7121,
7128,
7173,
7210,
7217,
7248,
7297,
7304,
7336,
7394,
7401,
7430,
7462,
7469,
7514,
7551,
7558,
7609,
7661,
7667,
7684,
7686,
7689,
7704,
7724,
7726,
7743,
7798,
7858,
7860,
7862,
7865,
7901,
7902,
7916,
7917,
7918,
7922,
7923,
7935,
7936,
7941,
7947,
7948,
7959,
7960,
7965,
7978,
7983,
7984,
7991,
7994,
8039,
8077,
8096,
8098,
8113,
8120,
8131,
8137,
8144,
8174,
8205,
8212,
8262,
8305,
8349,
8356,
8404,
8438,
8445,
8476,
8528,
8535,
8567,
8625,
8681,
8688,
8717,
8750,
8757,
8802,
8839,
8846,
8897,
8952,
8958,
8961,
8979,
8981,
8984,
8999,
9009,
9046,
9089,
9092,
9129,
9132,
9133,
9147,
9148,
9149,
9150,
9158,
9159,
9214,
9215,
9250,
9251,
9263,
9264,
9384,
9454,
9455,
9467,
9468,
9499,
9616,
9738,
9739,
9871,
9872,
10044,
10045,
10077,
10098
],
"line_end_idx": [
17,
18,
35,
36,
84,
112,
144,
145,
238,
239,
441,
442,
453,
454,
847,
848,
856,
857,
860,
861,
862,
863,
876,
877,
881,
882,
891,
932,
998,
1058,
1127,
1199,
1249,
1301,
1302,
1307,
1308,
1421,
1422,
1438,
1439,
1978,
1979,
2436,
2437,
2458,
2459,
2854,
2855,
2856,
2857,
2919,
2920,
2924,
2925,
2937,
2938,
2943,
2949,
2950,
2961,
2962,
2967,
2980,
2985,
2986,
3005,
3008,
3029,
3032,
3061,
3064,
3143,
3166,
3168,
3171,
3190,
3217,
3244,
3247,
3266,
3269,
3277,
3281,
3284,
3310,
3341,
3344,
3393,
3428,
3465,
3468,
3534,
3537,
3564,
3609,
3612,
3640,
3692,
3695,
3720,
3748,
3751,
3817,
3820,
3867,
3915,
3919,
3922,
3937,
3939,
3942,
3953,
3955,
3970,
4043,
4046,
4059,
4071,
4073,
4074,
4088,
4089,
4090,
4095,
4096,
4108,
4109,
4114,
4120,
4121,
4132,
4133,
4138,
4151,
4156,
4157,
4198,
4208,
4210,
4217,
4255,
4300,
4324,
4326,
4329,
4389,
4392,
4402,
4404,
4407,
4433,
4456,
4459,
4508,
4543,
4580,
4583,
4649,
4652,
4679,
4724,
4727,
4755,
4807,
4810,
4835,
4863,
4866,
4932,
4935,
4982,
5030,
5032,
5035,
5048,
5050,
5053,
5068,
5109,
5111,
5128,
5184,
5240,
5242,
5244,
5247,
5283,
5284,
5298,
5299,
5300,
5309,
5310,
5322,
5323,
5328,
5334,
5335,
5346,
5347,
5352,
5365,
5370,
5371,
5400,
5427,
5454,
5468,
5475,
5488,
5499,
5510,
5539,
5567,
5578,
5611,
5641,
5672,
5690,
5735,
5746,
5777,
5808,
5837,
5867,
5920,
5931,
5962,
6015,
6058,
6069,
6097,
6151,
6162,
6201,
6241,
6252,
6285,
6313,
6364,
6380,
6383,
6397,
6405,
6441,
6476,
6512,
6515,
6551,
6552,
6566,
6567,
6568,
6571,
6572,
6584,
6585,
6590,
6596,
6597,
6608,
6609,
6614,
6627,
6632,
6633,
6672,
6686,
6696,
6698,
6705,
6743,
6788,
6812,
6814,
6817,
6854,
6890,
6897,
6911,
6917,
6924,
6954,
6981,
6988,
7041,
7080,
7121,
7128,
7173,
7210,
7217,
7248,
7297,
7304,
7336,
7394,
7401,
7430,
7462,
7469,
7514,
7551,
7558,
7609,
7661,
7667,
7684,
7686,
7689,
7704,
7724,
7726,
7743,
7798,
7858,
7860,
7862,
7865,
7901,
7902,
7916,
7917,
7918,
7922,
7923,
7935,
7936,
7941,
7947,
7948,
7959,
7960,
7965,
7978,
7983,
7984,
7991,
7994,
8039,
8077,
8096,
8098,
8113,
8120,
8131,
8137,
8144,
8174,
8205,
8212,
8262,
8305,
8349,
8356,
8404,
8438,
8445,
8476,
8528,
8535,
8567,
8625,
8681,
8688,
8717,
8750,
8757,
8802,
8839,
8846,
8897,
8952,
8958,
8961,
8979,
8981,
8984,
8999,
9009,
9046,
9089,
9092,
9129,
9132,
9133,
9147,
9148,
9149,
9150,
9158,
9159,
9214,
9215,
9250,
9251,
9263,
9264,
9384,
9454,
9455,
9467,
9468,
9499,
9616,
9738,
9739,
9871,
9872,
10044,
10045,
10077,
10098,
10104
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 10104,
"ccnet_original_nlines": 414,
"rps_doc_curly_bracket": 0.0025732400827109814,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2854166626930237,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02656250074505806,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3218750059604645,
"rps_doc_frac_unique_words": 0.2454819232225418,
"rps_doc_mean_word_length": 4.982680797576904,
"rps_doc_num_sentences": 65,
"rps_doc_symbol_to_word_ratio": 0.012500000186264515,
"rps_doc_unigram_entropy": 4.94503927230835,
"rps_doc_word_count": 1328,
"rps_doc_frac_chars_dupe_10grams": 0.4254193603992462,
"rps_doc_frac_chars_dupe_5grams": 0.4958440363407135,
"rps_doc_frac_chars_dupe_6grams": 0.4867764711380005,
"rps_doc_frac_chars_dupe_7grams": 0.4867764711380005,
"rps_doc_frac_chars_dupe_8grams": 0.4506573975086212,
"rps_doc_frac_chars_dupe_9grams": 0.4361492991447449,
"rps_doc_frac_chars_top_2gram": 0.022668879479169846,
"rps_doc_frac_chars_top_3gram": 0.027202660217881203,
"rps_doc_frac_chars_top_4gram": 0.03385220095515251,
"rps_doc_books_importance": -854.0575561523438,
"rps_doc_books_importance_length_correction": -854.0575561523438,
"rps_doc_openwebtext_importance": -487.2713317871094,
"rps_doc_openwebtext_importance_length_correction": -487.2713317871094,
"rps_doc_wikipedia_importance": -400.3255615234375,
"rps_doc_wikipedia_importance_length_correction": -400.3255615234375
},
"fasttext": {
"dclm": 0.2738279104232788,
"english": 0.602770209312439,
"fineweb_edu_approx": 2.4200680255889893,
"eai_general_math": 0.5390833616256714,
"eai_open_web_math": 0.27821046113967896,
"eai_web_code": 0.045421238988637924
}
} | {
"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.3",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Arithmetic"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-5,456,366,394,945,362,000 | Anonymous Inner Classes are local classes that are declared and instantiated inline.
learn more… | top users | synonyms
2
votes
1answer
25 views
Is it possible to access getVal() function inside displayMsg() function?
Is it possible to access the getVal() function inside displayMsg () function? I tried to create an annonymous inner-class with function getVal() and I want to call the getVal() function ...
0
votes
2answers
64 views
using Anonymous inner class - conflicts in adding listeners and passing instances
I am newbie in android and learning first time. I am making a very simple snippet something like when user clicks the button, the app should show a Toast message. I have read many tutorials on the ...
3
votes
2answers
141 views
Can you create anonymous inner classes in Swift?
I'm tired of declaring entire classes as having the ability to handle UIAlertView clicks by making them extend UIAlertViewDelegate. It starts to feel messy and wrong when I have multiple possible ...
11
votes
1answer
150 views
Code behaves different after converting anonymous class to lambda
I'm trying to refactor this code to use a lambda instead of anonymous class. It's a simple list of items in a GUI. I register a different listener to each item, and the last item created does ...
0
votes
1answer
41 views
Trying to add ActionListener to a buttonArray
I am not exactly sure what is wrong with my code but, in the process of adding the ActionListeners, I get the error : "local variables referenced from an inner class must be final or effectively ...
0
votes
4answers
63 views
Field is declared as private but I'm able to access directly
I have a class Foo which extends Dialog (SWT). I defined a data-member private Bazz bazz Within this class I defined a method called GetOkListener() which basically returns an SelectionListener ...
3
votes
5answers
63 views
declaring function while instantiating a class
I came across the following java code, and i am not sure what it means. Can we write code in '{' after we instantiate a class , eg new TestClass { */ code goes here */ } But when i try to run the ...
0
votes
2answers
44 views
Getting inner class type name
I'm trying to get the name of a type (which is an interface) that is instantiated within a class but the available methods I've tried do not return the actual name of the type. Example: To get the ...
3
votes
2answers
106 views
Anonymous inner Comparable class in Java method? [duplicate]
My professor offered this bit of code in an exercise about scope and lifetime: class AnonymousInnerClassInMethod { public static void main(String[] args) { int local = 1; ...
1
vote
3answers
113 views
Confused about anonymous classes vs anonymous inner class
I went searching to learn how to do lambda expressions in Java, but instead a confusion came up for me. So my understanding of an anonymous class is this: public class SomeObject { public static ...
-2
votes
1answer
34 views
Creating inner anonymous classes that extend other classes [closed]
I know this works: class Main{ public static void main(String[]args){ AbstractClass object = new AbstractClass(){ ... }; } } It creates an object with implicitly extends the ...
4
votes
3answers
46 views
Access an instance of a class from anonymous class argument
I can't seem to find an answer to this through all the anonymous inner class questions on the site. public void start() { /* Ask the user to login */ final LoginFrame login; login = new ...
0
votes
3answers
32 views
Need explanation on a method-call
In the code below: public File[] findFiles (String path) { FilenameFilter textFilter = new FilenameFilter() { @override public boolean accept(File dir, String name) { ...
21
votes
1answer
1k views
Lambda behaving differently than anonymous inner class
While doing some basic lambda exercises, the output from an apparently identical anonymous inner class was giving me a different output than the lambda. interface Supplier<T> { T get(T t); ...
2
votes
2answers
63 views
Runnable Inline Class declaration - able to access outer non-final variables
In the code below, I am wondering why the run() in the inline class is able to access the outer class variable - semaphore (even though it is not declared final). private Semaphore semaphore = ...
1
vote
3answers
94 views
If the usage of “new” keyword in Java implies memory allocation, why is it not the case for an anonymous inner class?
As a beginner in Java, I've been taught that the usage of the "new" keyword leads to the invocation of a constructor and thereby memory allocation for the object. If that is indeed the case, what ...
-1
votes
3answers
87 views
Why use Anonymous Inner classes, and what are the alternatives?
I've recently got into Android and have been looking at examples about Inner classes but don't really understand what the use of them is. They are used often when making listeners and when making a ...
0
votes
1answer
58 views
Anonymous Inner Class in Java not working. Why?
The class in question is this. As you can see, it's very simple. Just to learn about the workings of anonymous inner classes. In this case I am getting 4 errors saying that the symbols WaterLevel and ...
3
votes
3answers
88 views
Build an anonymous inner class and call its methods
I searched for this but unfortunately failed to find matches, I have this local anonymous inner class inside a method like this:- new Object(){ public void open(){ // do some stuff } ...
29
votes
7answers
2k views
Difference between new Test() and new Test() { }
What is the difference between these two ways of instantiating new objects of a class as follows: Test t1=new Test(); Test t2=new Test(){ }; When I tried the following code, I could see that both ...
2
votes
2answers
180 views
Groovy - closures vs methods - the difference
If you look very carefully at the picture included, you will notice that you can refactor Groovy code using the Eclipse IDE and convert a method to a closure and vice versa. So, what exactly is a ...
4
votes
2answers
87 views
Instantiating anonymous inner classes in Java with additional interface implementation
Let's say I have the following two class/interface definitions: public abstract class FooClass { public abstract void doFoo(); } and public interface BarInterface { public void doBar(); ...
2
votes
2answers
650 views
How to inject an anonymous inner class with dagger?
It's posible inject an anonymous class? I'm having the following error: java.lang.IllegalArgumentException: No inject registered for members/com.acme.MyFragment$1. You must explicitly add it to ...
4
votes
2answers
68 views
Accessing outer inner class from nester inner class
I have the following code: public class Bar {} public class FooBar {} public class Foo { public void method() { new Bar() { void otherMethod() { } void ...
0
votes
0answers
21 views
AnTLR rewrite of code in C#
I have the following code in Java: public class XLexer extends antlr.CharScanner implements TokenStream { public Token nextToken() { return null; } public TokenStream plumb() ...
0
votes
1answer
88 views
anonymous-inner-classes vs static field
I prefer to use static field for instances of classes that not store his state in fields instead anonymous-inner-classes. I think this good practice for to less memory and GC usage if method sort(or ...
2
votes
2answers
61 views
How am I accessing my main class from an anonymous class?
I thought I had a good grasp of what I was doing but whenever I feel like I have a good handle on something, I'm proven wrong :) The code in question is this @Override protected void ...
0
votes
2answers
197 views
Dynamic Android Table
I ran into another problem. Found a tutorial on how to create a dynamic table,followed it but mine doesnt seems to work,when adding the dynamic rows. The static column headings works fine. public ...
1
vote
1answer
210 views
How would an anonymous class get GC'd in picasso on Android?
Can someone explain to me the comment here: Don't create anonymous class of Target when calling Picasso as might get garbage collected. Keep a member field as a strong reference to prevent it ...
4
votes
1answer
149 views
JDK Hashmap Source Code - Anonymous Inner Classes and Abstract Instantiation?
Problem I'm trying to understand how Sun implemented the entrySet, keySet and values methods of the HashMap class but I'm coming across code that doesn't make sense to me. I understand conceptually ...
0
votes
2answers
442 views
Instantiate Java anonymous inner class with generic using Class in variable
Is it possible in Java 7 to instantiate an anonymous inner class with a generic type using a Class object that I have in hand? Here's the simplified version of the generic class I'm trying to ...
0
votes
1answer
55 views
Why should we change the modifiers of fields outside an inner class to final?
I have a question about why should we set a field final when we use it in an innerclass? for example why should we set the modifier of textField to final? My question is that why it will not be ...
0
votes
2answers
55 views
In Java how can I access a variable from outside the anonymous class [duplicate]
for example: for (int i = 0; i < 10; i++){ SomeClass something = new SomeClass(); something.setOnClickListener(new OnClickListener() { public void onClick(){ doSomething(i); ...
0
votes
2answers
298 views
Java Eclipse android syntax errors with anonymous inner class
I am trying to program a sort of 'menu' in android with 3 buttons, and OnClickListeners recording input from each. However, I am getting some strange syntax errors. Here is my MainActivity.java: ...
1
vote
1answer
78 views
Why can't the aop execute when a method is called from anonymous class' method?
Here is my custom annotation AnnoLogExecTime and class AOP: @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface AnnoLogExecTime { } @Aspect @Service public ...
3
votes
3answers
80 views
How does the interface in anonymous inner class work?
interface MyInter { public void display(); } class OuterClass8 { public static void main(String arg[]) { MyInter mi=new MyInter() { public void display() { ...
0
votes
3answers
48 views
Why am I getting this error as I try from withing the anonymous class?
I get an error that says : no suitable method found for showMessageDialog(<anonymous Runnable>,String,String,int) as I try to use the JOptionPane.show... method. Why is that ? private void ...
4
votes
4answers
113 views
java, reflection , innerclass,
Hi i want to get the object of inner class using reflection but i am getting some error in it. code is:- package reflaction; public class MyReflection { public static void main(String[] args) throws ...
2
votes
2answers
33 views
How do I get this parameter?
public class Test{ ClassB fieldB; public Test(ClassA instanceA){ fieldB = new ClassB(); fieldB.setOnClickListener(new OnClickListener() { @Override public void ...
1
vote
0answers
338 views
How to return object from an anonymous inner class in java
If I have the following function : public class Product { public String barCode; public String name; public Category category; public double price; public Store store; ...
-2
votes
2answers
539 views
Class Name for Java anonymous class [duplicate]
Class A{ public void test(){ B b = new B(); System.out.println( "Class Name: " + b.createClassC().getClass() ); } } Class B{ public C createClassC(){ C c = new C(){ @Override ...
4
votes
3answers
280 views
How to use inner class in practical [closed]
Why would someone use an inner class? The same functionality can be achieved with a local class or subclass. An example would also be appreciated.
0
votes
1answer
225 views
Android: override onDraw without subclassing when View has been instantiated from xml
I have a class ConditionalEditText which is a compound custom view containing an EditText and a TextView. The layout of this view is defined in XML. I want to override the onDraw method of the ...
0
votes
0answers
13 views
Eclipse requesting different parameters wheter I use a class as an anonymous inner class or not
I uploaded this. The quick fix points to same crazy parameters that don't make any sense when I try to implement this class as an anonymous inner class. Take a look and see if you can crack what's ...
1
vote
2answers
70 views
Java generics: Infering the type from another method?
I have a decorator which I'd like to make generic in a special way. Usage: new ExceptionHandler() { public <T extends IrcEvent> void doIt( T msg, IrcBotProxy ...
4
votes
5answers
592 views
Java ActionListeners
I am going to be developing a game in Java, and it will have many listeners( action, key, mouse, etc..). My Question is what is the preferable way to implement the listeners. Method 1: ...
-1
votes
1answer
577 views
Use of Anonymous Inner Class in java
public SampleBehaviour otherway(final String st) { return new SampleBehaviour() { private String str = st; @Override public void print() { ...
1
vote
2answers
73 views
Interface as a method's parameter
I have a problem with naming following situation {...} X.a; a.addListener( new ListenerForX(){ // some interface methods }); {...} It is the same as: {...} X.a; a.addListener( new XListener()); ...
1
vote
1answer
409 views
javafx Anonymous Application class
I'm used to Swing and am exploring javafx. In swing I'd create a class that extends Jpanel and then be able to test that class with a couple of lines of code in that class that created a JFrame. So ...
4
votes
2answers
109 views
Pass outer anon class ref to a method in an inner anon class
How to pass outer anon class ref to a method in an inner anon class in Java? I have a method that makes async call to a server - sendCall(some_args, callback). The callback is represented by ... | {
"url": "http://stackoverflow.com/questions/tagged/anonymous-inner-class",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-41",
"warc_metadata": {
"Content-Length": "187240",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7BI7AOJFAWDUQJPBND2T34M3QGN64676",
"WARC-Concurrent-To": "<urn:uuid:514ad35a-2d98-4224-a15f-3fa4dcb9bf36>",
"WARC-Date": "2014-09-18T13:55:41Z",
"WARC-IP-Address": "198.252.206.16",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:RU3MF74HJFAIEH62ZGF53WG3SJS7NAR6",
"WARC-Record-ID": "<urn:uuid:0be5423c-7a5c-4e63-bd81-8b524e0dbdba>",
"WARC-Target-URI": "http://stackoverflow.com/questions/tagged/anonymous-inner-class",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:acceef78-ca72-4f23-b99f-62b3a5a95695>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-196-40-205.us-west-1.compute.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-41\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for September 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,
85,
86,
121,
122,
124,
130,
138,
147,
148,
221,
222,
412,
414,
420,
429,
438,
439,
521,
522,
723,
725,
731,
740,
750,
751,
800,
801,
1001,
1004,
1010,
1018,
1028,
1029,
1095,
1096,
1292,
1294,
1300,
1308,
1317,
1318,
1364,
1365,
1564,
1566,
1572,
1581,
1590,
1591,
1652,
1653,
1851,
1853,
1859,
1868,
1877,
1878,
1925,
1926,
2126,
2128,
2134,
2143,
2152,
2153,
2183,
2184,
2385,
2387,
2393,
2402,
2412,
2413,
2474,
2475,
2650,
2652,
2657,
2666,
2676,
2677,
2735,
2736,
2935,
2938,
2944,
2952,
2961,
2962,
3030,
3031,
3209,
3211,
3217,
3226,
3235,
3236,
3296,
3297,
3487,
3489,
3495,
3504,
3513,
3514,
3548,
3549,
3720,
3723,
3729,
3737,
3746,
3747,
3802,
3803,
3996,
3998,
4004,
4013,
4022,
4023,
4100,
4101,
4298,
4300,
4305,
4314,
4323,
4324,
4442,
4443,
4643,
4646,
4652,
4661,
4670,
4671,
4735,
4736,
4938,
4940,
4946,
4954,
4963,
4964,
5012,
5013,
5217,
5219,
5225,
5234,
5243,
5244,
5296,
5297,
5484,
5487,
5493,
5502,
5511,
5512,
5561,
5562,
5762,
5764,
5770,
5779,
5789,
5790,
5836,
5837,
6037,
6039,
6045,
6054,
6063,
6064,
6151,
6152,
6342,
6344,
6350,
6359,
6369,
6370,
6422,
6423,
6621,
6623,
6629,
6638,
6647,
6648,
6700,
6701,
6857,
6859,
6865,
6874,
6883,
6884,
6912,
6913,
7092,
7094,
7100,
7108,
7117,
7118,
7158,
7159,
7362,
7364,
7370,
7379,
7388,
7389,
7447,
7448,
7635,
7637,
7643,
7652,
7662,
7663,
7685,
7686,
7886,
7888,
7893,
7901,
7911,
7912,
7973,
7974,
8170,
8172,
8178,
8186,
8196,
8197,
8275,
8276,
8478,
8480,
8486,
8495,
8505,
8506,
8582,
8583,
8779,
8781,
8787,
8795,
8804,
8805,
8883,
8884,
9082,
9084,
9090,
9099,
9108,
9109,
9190,
9191,
9369,
9371,
9377,
9386,
9396,
9397,
9459,
9460,
9659,
9661,
9666,
9674,
9683,
9684,
9764,
9765,
9967,
9969,
9975,
9984,
9993,
9994,
10048,
10049,
10209,
10211,
10217,
10226,
10235,
10236,
10307,
10308,
10501,
10503,
10509,
10518,
10528,
10529,
10560,
10561,
10764,
10766,
10772,
10781,
10790,
10791,
10820,
10821,
10985,
10987,
10992,
11001,
11011,
11012,
11071,
11072,
11244,
11247,
11253,
11262,
11272,
11273,
11321,
11322,
11501,
11503,
11509,
11518,
11528,
11529,
11574,
11575,
11722,
11724,
11730,
11738,
11748,
11749,
11835,
11836,
12033,
12035,
12041,
12050,
12059,
12060,
12156,
12157,
12358,
12360,
12365,
12374,
12383,
12384,
12438,
12439,
12601,
12603,
12609,
12618,
12628,
12629,
12650,
12651,
12840,
12843,
12849,
12857,
12867,
12868,
12905,
12906,
13049,
13051,
13056,
13065,
13074,
13075,
13109,
13110,
13308,
13310,
13315,
13323,
13333,
13334,
13369,
13370,
13572,
13574,
13580,
13589,
13599,
13600,
13661,
13662
],
"line_end_idx": [
85,
86,
121,
122,
124,
130,
138,
147,
148,
221,
222,
412,
414,
420,
429,
438,
439,
521,
522,
723,
725,
731,
740,
750,
751,
800,
801,
1001,
1004,
1010,
1018,
1028,
1029,
1095,
1096,
1292,
1294,
1300,
1308,
1317,
1318,
1364,
1365,
1564,
1566,
1572,
1581,
1590,
1591,
1652,
1653,
1851,
1853,
1859,
1868,
1877,
1878,
1925,
1926,
2126,
2128,
2134,
2143,
2152,
2153,
2183,
2184,
2385,
2387,
2393,
2402,
2412,
2413,
2474,
2475,
2650,
2652,
2657,
2666,
2676,
2677,
2735,
2736,
2935,
2938,
2944,
2952,
2961,
2962,
3030,
3031,
3209,
3211,
3217,
3226,
3235,
3236,
3296,
3297,
3487,
3489,
3495,
3504,
3513,
3514,
3548,
3549,
3720,
3723,
3729,
3737,
3746,
3747,
3802,
3803,
3996,
3998,
4004,
4013,
4022,
4023,
4100,
4101,
4298,
4300,
4305,
4314,
4323,
4324,
4442,
4443,
4643,
4646,
4652,
4661,
4670,
4671,
4735,
4736,
4938,
4940,
4946,
4954,
4963,
4964,
5012,
5013,
5217,
5219,
5225,
5234,
5243,
5244,
5296,
5297,
5484,
5487,
5493,
5502,
5511,
5512,
5561,
5562,
5762,
5764,
5770,
5779,
5789,
5790,
5836,
5837,
6037,
6039,
6045,
6054,
6063,
6064,
6151,
6152,
6342,
6344,
6350,
6359,
6369,
6370,
6422,
6423,
6621,
6623,
6629,
6638,
6647,
6648,
6700,
6701,
6857,
6859,
6865,
6874,
6883,
6884,
6912,
6913,
7092,
7094,
7100,
7108,
7117,
7118,
7158,
7159,
7362,
7364,
7370,
7379,
7388,
7389,
7447,
7448,
7635,
7637,
7643,
7652,
7662,
7663,
7685,
7686,
7886,
7888,
7893,
7901,
7911,
7912,
7973,
7974,
8170,
8172,
8178,
8186,
8196,
8197,
8275,
8276,
8478,
8480,
8486,
8495,
8505,
8506,
8582,
8583,
8779,
8781,
8787,
8795,
8804,
8805,
8883,
8884,
9082,
9084,
9090,
9099,
9108,
9109,
9190,
9191,
9369,
9371,
9377,
9386,
9396,
9397,
9459,
9460,
9659,
9661,
9666,
9674,
9683,
9684,
9764,
9765,
9967,
9969,
9975,
9984,
9993,
9994,
10048,
10049,
10209,
10211,
10217,
10226,
10235,
10236,
10307,
10308,
10501,
10503,
10509,
10518,
10528,
10529,
10560,
10561,
10764,
10766,
10772,
10781,
10790,
10791,
10820,
10821,
10985,
10987,
10992,
11001,
11011,
11012,
11071,
11072,
11244,
11247,
11253,
11262,
11272,
11273,
11321,
11322,
11501,
11503,
11509,
11518,
11528,
11529,
11574,
11575,
11722,
11724,
11730,
11738,
11748,
11749,
11835,
11836,
12033,
12035,
12041,
12050,
12059,
12060,
12156,
12157,
12358,
12360,
12365,
12374,
12383,
12384,
12438,
12439,
12601,
12603,
12609,
12618,
12628,
12629,
12650,
12651,
12840,
12843,
12849,
12857,
12867,
12868,
12905,
12906,
13049,
13051,
13056,
13065,
13074,
13075,
13109,
13110,
13308,
13310,
13315,
13323,
13333,
13334,
13369,
13370,
13572,
13574,
13580,
13589,
13599,
13600,
13661,
13662,
13856
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 13856,
"ccnet_original_nlines": 403,
"rps_doc_curly_bracket": 0.005340650212019682,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.32188063859939575,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03435805067420006,
"rps_doc_frac_lines_end_with_ellipsis": 0.12128712981939316,
"rps_doc_frac_no_alph_words": 0.20940324664115906,
"rps_doc_frac_unique_words": 0.29723605513572693,
"rps_doc_mean_word_length": 4.857725620269775,
"rps_doc_num_sentences": 140,
"rps_doc_symbol_to_word_ratio": 0.02025315910577774,
"rps_doc_unigram_entropy": 5.547526836395264,
"rps_doc_word_count": 2207,
"rps_doc_frac_chars_dupe_10grams": 0.008954389952123165,
"rps_doc_frac_chars_dupe_5grams": 0.04617106914520264,
"rps_doc_frac_chars_dupe_6grams": 0.014177779667079449,
"rps_doc_frac_chars_dupe_7grams": 0.008954389952123165,
"rps_doc_frac_chars_dupe_8grams": 0.008954389952123165,
"rps_doc_frac_chars_dupe_9grams": 0.008954389952123165,
"rps_doc_frac_chars_top_2gram": 0.02425147034227848,
"rps_doc_frac_chars_top_3gram": 0.031900011003017426,
"rps_doc_frac_chars_top_4gram": 0.013711409643292427,
"rps_doc_books_importance": -1309.2213134765625,
"rps_doc_books_importance_length_correction": -1309.2213134765625,
"rps_doc_openwebtext_importance": -841.7359619140625,
"rps_doc_openwebtext_importance_length_correction": -841.7359619140625,
"rps_doc_wikipedia_importance": -649.1739501953125,
"rps_doc_wikipedia_importance_length_correction": -649.1739501953125
},
"fasttext": {
"dclm": 0.28269529342651367,
"english": 0.8669757843017578,
"fineweb_edu_approx": 1.5809639692306519,
"eai_general_math": 0.048377688974142075,
"eai_open_web_math": 0.11522465944290161,
"eai_web_code": 0.047643180936574936
}
} | {
"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": "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": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-255,874,147,463,886,300 | view test/javax/imageio/stream/StreamCloserLeak/run_test.sh @ 6038:884402437aad
7072120: No mac os x support in several regression tests Reviewed-by: anthony, serb
author kshefov
date Tue, 30 Oct 2012 12:47:35 +0100
parents d45bc4307996
children 6ffd64541a6c
line wrap: on
line source
#!/bin/ksh -p
#
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# @test
# @bug 6788096
# @summary Test simulates the case of multiple applets executed in
# the same VM and verifies that ImageIO shutdown hook
# StreamCloser does not cause a leak of classloaders.
#
# @build test.Main
# @build testapp.Main
# @run shell run_test.sh
# There are several resources which need to be present before many
# shell scripts can run. Following are examples of how to check for
# many common ones.
#
# Note that the shell used is the Korn Shell, KSH
#
# Also note, it is recommended that make files NOT be used. Rather,
# put the individual commands directly into this file. That way,
# it is possible to use command line arguments and other shell tech-
# niques to find the compiler, etc on different systems. For example,
# a different path could be used depending on whether this were a
# Solaris or Win32 machine, which is more difficult (if even possible)
# in a make file.
# Beginning of subroutines:
status=1
#Call this from anywhere to fail the test with an error message
# usage: fail "reason why the test failed"
fail()
{ echo "The test failed :-("
echo "$*" 1>&2
echo "exit status was $status"
exit $status
} #end of fail()
#Call this from anywhere to pass the test with a message
# usage: pass "reason why the test passed if applicable"
pass()
{ echo "The test passed!!!"
echo "$*" 1>&2
exit 0
} #end of pass()
# end of subroutines
# The beginning of the script proper
# Checking for proper OS
OS=`uname -s`
case "$OS" in
SunOS )
VAR="One value for Sun"
DEFAULT_JDK=/
FILESEP="/"
PATHSEP=":"
TMP="/tmp"
;;
Linux )
VAR="A different value for Linux"
DEFAULT_JDK=/
FILESEP="/"
PATHSEP=":"
TMP="/tmp"
;;
Darwin )
VAR="A different value for MacOSX"
DEFAULT_JDK=/usr
FILESEP="/"
PATHSEP=":"
TMP="/tmp"
;;
Windows* )
VAR="A different value for Win32"
DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0"
FILESEP="\\"
PATHSEP=";"
TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
;;
CYGWIN* )
VAR="A different value for Cygwin"
DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0"
FILESEP="/"
PATHSEP=";"
TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
;;
# catch all other OSs
* )
echo "Unrecognized system! $OS"
fail "Unrecognized system! $OS"
;;
esac
# Want this test to run standalone as well as in the harness, so do the
# following to copy the test's directory into the harness's scratch directory
# and set all appropriate variables:
if [ -z "${TESTJAVA}" ] ; then
# TESTJAVA is not set, so the test is running stand-alone.
# TESTJAVA holds the path to the root directory of the build of the JDK
# to be tested. That is, any java files run explicitly in this shell
# should use TESTJAVA in the path to the java interpreter.
# So, we'll set this to the JDK spec'd on the command line. If none
# is given on the command line, tell the user that and use a cheesy
# default.
# THIS IS THE JDK BEING TESTED.
if [ -n "$1" ] ;
then TESTJAVA=$1
else echo "no JDK specified on command line so using default!"
TESTJAVA=$DEFAULT_JDK
fi
TESTSRC=.
TESTCLASSES=.
STANDALONE=1;
fi
echo "JDK under test is: $TESTJAVA"
############### YOUR TEST CODE HERE!!!!!!! #############
#All files required for the test should be in the same directory with
# this file. If converting a standalone test to run with the harness,
# as long as all files are in the same directory and it returns 0 for
# pass, you should be able to cut and paste it into here and it will
# run with the test harness.
# This is an example of running something -- test
# The stuff below catches the exit status of test then passes or fails
# this shell test as appropriate ( 0 status is considered a pass here )
echo "Create TestApp.jar..."
if [ -f TestApp.jar ] ; then
rm -f TestApp.jar
fi
${TESTJAVA}/bin/jar -cvf TestApp.jar -C ${TESTCLASSES} testapp
if [ $? -ne "0" ] ; then
fail "Failed to create TestApp.jar"
fi
echo "Create Test.jar..."
if [ -f Test.jar ] ; then
rm -f Test.jar
fi
${TESTJAVA}/bin/jar -cvf Test.jar -C ${TESTCLASSES} test
if [ $? -ne 0 ] ; then
fail "Failed to create Test.jar"
fi
# Prepare temp dir for cahce files
mkdir ./tmp
if [ $? -ne 0 ] ; then
fail "Unable to create temp directory."
fi
# Verify that all classoladers are destroyed
${TESTJAVA}/bin/java -cp Test.jar test.Main
if [ $? -ne 0 ] ; then
fail "Test FAILED: some classloaders weren't destroyed."
fi
# Verify that ImageIO shutdown hook works correcly
${TESTJAVA}/bin/java -cp Test.jar -DforgetSomeStreams=true test.Main
if [ $? -ne 0 ] ; then
fail "Test FAILED: some classloaders weren't destroyed of shutdown hook failed."
fi
# sanity check: verify that all cache files were deleted
cache_files=`ls tmp`
if [ "x${cache_files}" != "x" ] ; then
echo "WARNING: some cache files was not deleted: ${cache_files}"
fi
echo "Test done."
status=$?
if [ $status -eq "0" ] ; then
pass ""
else
fail "Test failed due to test plugin was not found."
fi | {
"url": "http://hg.openjdk.java.net/bsd-port/jdk8/jdk/file/884402437aad/test/javax/imageio/stream/StreamCloserLeak/run_test.sh",
"source_domain": "hg.openjdk.java.net",
"snapshot_id": "crawl=CC-MAIN-2020-05",
"warc_metadata": {
"Content-Length": "20890",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SRDKY7LAVIWDTQFYTKFQYM3HNDCJXXIR",
"WARC-Concurrent-To": "<urn:uuid:e8bddbe2-81b7-44d7-8101-876698ec03b8>",
"WARC-Date": "2020-01-18T11:19:12Z",
"WARC-IP-Address": "137.254.56.63",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:AXR44ACGARMHKMWCAHBJPDBKEGIKCC4C",
"WARC-Record-ID": "<urn:uuid:80b55c9f-f79e-4b35-91a9-4f706d9cbdd1>",
"WARC-Target-URI": "http://hg.openjdk.java.net/bsd-port/jdk8/jdk/file/884402437aad/test/javax/imageio/stream/StreamCloserLeak/run_test.sh",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5bbd7a00-0595-4e07-b469-e492e3cb16a6>"
},
"warc_info": "isPartOf: CC-MAIN-2020-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-27.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,
80,
81,
165,
180,
217,
238,
260,
274,
286,
300,
302,
381,
445,
447,
518,
589,
634,
636,
711,
783,
855,
929,
955,
957,
1033,
1106,
1170,
1172,
1246,
1319,
1332,
1334,
1335,
1337,
1347,
1371,
1443,
1511,
1579,
1581,
1607,
1636,
1664,
1665,
1732,
1802,
1823,
1825,
1875,
1877,
1946,
2013,
2083,
2155,
2222,
2294,
2313,
2314,
2315,
2343,
2352,
2353,
2417,
2460,
2467,
2497,
2515,
2549,
2565,
2583,
2584,
2641,
2698,
2705,
2734,
2752,
2762,
2780,
2781,
2802,
2803,
2804,
2841,
2842,
2867,
2881,
2895,
2906,
2936,
2956,
2974,
2992,
3009,
3018,
3019,
3030,
3070,
3090,
3108,
3126,
3143,
3152,
3153,
3165,
3206,
3229,
3247,
3265,
3282,
3291,
3292,
3306,
3346,
3397,
3416,
3434,
3483,
3492,
3493,
3507,
3548,
3609,
3627,
3645,
3694,
3703,
3704,
3729,
3736,
3775,
3814,
3823,
3828,
3829,
3901,
3980,
4018,
4019,
4050,
4112,
4187,
4260,
4322,
4394,
4465,
4479,
4514,
4534,
4557,
4626,
4657,
4663,
4676,
4693,
4710,
4713,
4749,
4750,
4751,
4810,
4811,
4881,
4952,
5022,
5091,
5120,
5121,
5171,
5242,
5314,
5315,
5344,
5345,
5374,
5396,
5399,
5400,
5463,
5464,
5489,
5529,
5532,
5533,
5559,
5585,
5604,
5607,
5608,
5665,
5666,
5689,
5726,
5729,
5730,
5765,
5777,
5800,
5844,
5847,
5848,
5893,
5937,
5960,
6021,
6024,
6025,
6026,
6077,
6146,
6169,
6254,
6257,
6258,
6315,
6336,
6337,
6376,
6445,
6448,
6449,
6467,
6468,
6478,
6479,
6509,
6521,
6526,
6583
],
"line_end_idx": [
80,
81,
165,
180,
217,
238,
260,
274,
286,
300,
302,
381,
445,
447,
518,
589,
634,
636,
711,
783,
855,
929,
955,
957,
1033,
1106,
1170,
1172,
1246,
1319,
1332,
1334,
1335,
1337,
1347,
1371,
1443,
1511,
1579,
1581,
1607,
1636,
1664,
1665,
1732,
1802,
1823,
1825,
1875,
1877,
1946,
2013,
2083,
2155,
2222,
2294,
2313,
2314,
2315,
2343,
2352,
2353,
2417,
2460,
2467,
2497,
2515,
2549,
2565,
2583,
2584,
2641,
2698,
2705,
2734,
2752,
2762,
2780,
2781,
2802,
2803,
2804,
2841,
2842,
2867,
2881,
2895,
2906,
2936,
2956,
2974,
2992,
3009,
3018,
3019,
3030,
3070,
3090,
3108,
3126,
3143,
3152,
3153,
3165,
3206,
3229,
3247,
3265,
3282,
3291,
3292,
3306,
3346,
3397,
3416,
3434,
3483,
3492,
3493,
3507,
3548,
3609,
3627,
3645,
3694,
3703,
3704,
3729,
3736,
3775,
3814,
3823,
3828,
3829,
3901,
3980,
4018,
4019,
4050,
4112,
4187,
4260,
4322,
4394,
4465,
4479,
4514,
4534,
4557,
4626,
4657,
4663,
4676,
4693,
4710,
4713,
4749,
4750,
4751,
4810,
4811,
4881,
4952,
5022,
5091,
5120,
5121,
5171,
5242,
5314,
5315,
5344,
5345,
5374,
5396,
5399,
5400,
5463,
5464,
5489,
5529,
5532,
5533,
5559,
5585,
5604,
5607,
5608,
5665,
5666,
5689,
5726,
5729,
5730,
5765,
5777,
5800,
5844,
5847,
5848,
5893,
5937,
5960,
6021,
6024,
6025,
6026,
6077,
6146,
6169,
6254,
6257,
6258,
6315,
6336,
6337,
6376,
6445,
6448,
6449,
6467,
6468,
6478,
6479,
6509,
6521,
6526,
6583,
6585
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6585,
"ccnet_original_nlines": 228,
"rps_doc_curly_bracket": 0.004555809777230024,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2531120181083679,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.07261411100625992,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3354080319404602,
"rps_doc_frac_unique_words": 0.3958560526371002,
"rps_doc_mean_word_length": 4.844056606292725,
"rps_doc_num_sentences": 72,
"rps_doc_symbol_to_word_ratio": 0.07607191801071167,
"rps_doc_unigram_entropy": 5.379265785217285,
"rps_doc_word_count": 917,
"rps_doc_frac_chars_dupe_10grams": 0.02791534923017025,
"rps_doc_frac_chars_dupe_5grams": 0.10153084248304367,
"rps_doc_frac_chars_dupe_6grams": 0.08869878202676773,
"rps_doc_frac_chars_dupe_7grams": 0.08869878202676773,
"rps_doc_frac_chars_dupe_8grams": 0.0562809482216835,
"rps_doc_frac_chars_dupe_9grams": 0.02791534923017025,
"rps_doc_frac_chars_top_2gram": 0.0141828004270792,
"rps_doc_frac_chars_top_3gram": 0.0056281001307070255,
"rps_doc_frac_chars_top_4gram": 0.010130570270121098,
"rps_doc_books_importance": -637.1834716796875,
"rps_doc_books_importance_length_correction": -637.1834716796875,
"rps_doc_openwebtext_importance": -335.3346862792969,
"rps_doc_openwebtext_importance_length_correction": -335.3346862792969,
"rps_doc_wikipedia_importance": -213.18580627441406,
"rps_doc_wikipedia_importance_length_correction": -213.18580627441406
},
"fasttext": {
"dclm": 0.06370025873184204,
"english": 0.8026328086853027,
"fineweb_edu_approx": 2.062624216079712,
"eai_general_math": 0.937382698059082,
"eai_open_web_math": 0.4241597652435303,
"eai_web_code": 0.502094566822052
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.02",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-2,606,678,462,467,840,000 | SELinux/Tutorials/The security context of a process
From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.
The security context of a process
When working on a Linux system, you are undoubtedly aware that there are processes running all around. Processes (sometimes also referred to as tasks) are generally speaking applications that are running. For instance, on a booted Linux system, you might find processes such as sshd (the OpenSSH daemon, used to provide secure remote shells towards the system), crond (the Cron daemon, used to run certain commands at predefined time(intervals)) or udevd (the device handling daemon, which receives kernel events and acts on those towards the system), but also user processes like bash (a user shell), xinit (the graphical X server session application) or even ps (the command to show running processes).
Processes on Linux
From a process listing, more advanced administrators will be able to tell you what each process is (supposed to be) doing. This is because these processes have names that are known to match a given application - sshd is the secure shell daemon.
user $ps
PID TTY TIME CMD
540 pts/4 00:00:00 bash
2286 pts/4 00:00:00 ps
In the above example, two processes are listed. The first one is the user shell (where bash stands for Bourne Again SHell) and most likely the shell that the user is currently working in, i.e. the application in which he just typed ps) and the second one is the ps application (short for processes, the application that is showing the output of the running processes). Of course, many more are running on a Linux system, but without additional arguments to the ps command, it only outputs the applications running within the current session of the user.
Let's take a look at a few other processes. In the next command, we ask for all running processes on the system (-e) with additional information (-f), but limit the output to those processes that have auditd and sshd in their name. We'll run this as the root Linux user, since some hardened Linux systems do not allow regular users to view processes of other users.
root #ps -ef | grep -E '(auditd|sshd)'
root 3934 1 0 20:30 ? 00:00:00 /sbin/auditd
root 3946 2 0 20:30 ? 00:00:00 [kauditd]
root 4159 1 0 20:30 ? 00:00:00 /usr/sbin/sshd
root 4240 1 0 21:03 tty1 00:00:00 grep -E (auditd|sshd)
In this example, we notice four processes in the output:
1. the auditd process, which is the Linux audit daemon (responsible for handling audit events and writing them to the audit log files)
2. the kauditd kernel process, which is a part of the Linux kernel responsible for the kernel audit events (and communicates with the auditd process). The special brackets surrounding it are telling you that this is not a regular (userland) process (launched through a command), but a kernel process (started/managed by the Linux kernel itself)
3. the sshd secure shell daemon
4. the grep command we just used to filter the output of the previous command
Now, although seasoned administrators are well able to tell you what these processes are (supposed to be) doing, they will also tell you that these processes are all running as the Linux root user, the all-powerful administrator account on Unix and Linux systems. And because of that, all these applications have the same powers over the system as the root user does.
Privileges of processes
As long as applications behave as they should, and users are not abusing the applications, then having them run as root is okay. And although root-running applications have all the powers of the root user, because they are written with a few tasks in mind (how difficult is it to write an audit daemon, or a secure shell daemon, with no bugs in, right?) they are often seen as sufficiently trustworthy to run on a system.
But then comes in the evil, malicious person. A user with little to no specific privileges on the system (a regular user account, or perhaps not even an account at all) who is trying to interact with one of these root-running processes in a way that these applications suddenly misbehave and give the user root access (privilege escalation in case the user was running as a non-privileged account and now holds root privileges) or allows the user to launch commands through the root-running process (remote command execution).
Bugs in applications that allow such attacks are called vulnerabilities and are not new to administrators and engineers. Even for applications closely developed for security purposes, such as the audit daemon or secure shell daemon, such vulnerabilities arise from time to time. An example would be CVE-2008-1628 where the Linux audit daemon (version lower than 1.7) has a vulnerability that could potentially lead to code execution (and thus privilege escalation). An important aspect of system security is thus to keep track of security updates - do not allow your system to run old software versions that are known to be vulnerable to one or more exploitable bugs. Or even better, don't run old software. Period.
On Gentoo, you can use glsa-check to verify if your system is running any software provided by a package that is known to be vulnerable. Although not perfect (it requires the Gentoo security team to create Gentoo Linux Security Advisories before the tool can detect potential vulnerabilities) it is one of the many measures you can take to stay secure.
root #glsa-check -t all
This system is not affected by any of the listed GLSAs
Another method would be to keep track of all CVEs (reports describing vulnerabilities in software, hardware and operating systems) applicable to your system. Tools like cvechecker can help you in this.
But constantly upgrading your software still doesn't protect the system from being attacked. Software might be vulnerable without a fix at hand (for instance in case of 0day exploits, where the vendor or developer of the software is not yet or just very recently been made aware of the vulnerability, and has not had the time to update its software) or the fix might not have been packaged by your Linux distribution yet. And in some companies, security fixes, even when released by the distribution, take weeks or even months to be pushed out to the production systems.
One of the core problems at hand are the privileges of the process that is being attacked. Applications that run as root are prone to be attacked in the hope to get root access on the system (and thus be all powerful). Because of this, application engineers have been using various methods to lower the privileges under which the application is running.
• Some applications use a split process setup, where one very small application runs as root (because it needs to, for instance to bind on a TCP or UDP port lower than 1024, or to access certain system resources) and the other one runs as a non-root user. The non-root running application is the main application and attempts to securely communicate with the first process. This way, the likelihood that a vulnerability is found in the (small) root-running process is lowered.
• Some applications use Linux capabilities and drop the capabilities that they don't need. Capabilities are one way of reducing root privileges, but are not in scope of this tutorial set.
• Some applications don't run as root - period. A relational database such as postgresql or mysql is developed to run as its own, dedicated (non-root) user. As a result, vulnerabilities in these applications are less likely to result in total system compromise, although the databases themselves are still compromised.
• Some applications run in a chroot jail (which stands for change root), which means that the application is run without a full view on the system. Instead, it is only aware of a small set of files, specifically placed to allow the application to run - and nothing more. A successful exploit against such an application would result in privilege escalation within a chroot jail, where the attacker can hopefully not break out. Thus, the attacker still has no rights to get confidential information from outside the chroot (as he cannot see or find this information).
Another powerful method is to run the application within a Mandatory Access Control confined environment, of which SELinux is a nice example.
Confining applications
What SELinux does is to allow the applications to run, with just those privileges the applications need. The privileges that SELinux supports are much, much more fine-grained than what is known without SELinux. Where an application previously ran with the privileges of the user (such as root), it now runs with the privileges of a specifically crafted domain, identified by a security context.
Let's take a look at our previous example, but now ask ps to also display the security contexts of the running processes. I'm going to drop the "more information" option (-f) for readability reasons (but I'll include grep in the filter then, since dropping the "more information" will also not display the arguments of the grep command and we need it later).
root #ps -eZ | grep -E '(auditd|sshd|grep)'
system_u:system_r:auditd_t root 3934 ? 00:00:00 /sbin/auditd
system_u:system_r:kernel_t root 3946 ? 00:00:00 [kauditd]
system_u:system_r:sshd_t root 4159 ? 00:00:00 /usr/sbin/sshd
root:sysadm_r:sysadm_t root 4240 ? 00:00:00 grep
On a RedHat Enterprise Linux 6 system, the output might be similar to the following:
root #ps -eZ | grep -E '(auditd|sshd|grep)'
system_u:system_r:auditd_t:s0 root 3934 ? 00:00:00 /sbin/auditd
system_u:system_r:kernel_t:s0 root 3946 ? 00:00:00 [kauditd]
system_u:system_r:sshd_t:s0-s0:c0.c1023 root 4159 ? 00:00:00 /usr/sbin/sshd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 4240 ? 00:00:00 grep
The security context of the process is the first column in the output. It is simply put a specific label assigned to a process, which informs SELinux about the rights and privileges that are allowed to be granted on the process. It is the combination of this label (the context) together with the run-time user under which the process is running (root in the above example) that defines that the process is allowed to do on a system.
Just like with the run-time user,
• several processes can be assigned the same label (context).
Just like many processes could run under a dedicated mysql account, multiple processes can run with the same context assigned to them, like system_u:system_r:mysqld_t
• a process is always assigned one and exactly one label (context).
Just like processes either run as root, mysql or (but never and) another user, they are always running in one security context, never multiple contexts at once
However, there is a huge difference that sets apart SELinux from the regular permission system, which is the Mandatory part of the access control system.
Unlike the run-time user, which can be changed at will by the application itself (root users can change their Linux identity towards any user they like, and non-root users can too if they are able to authenticate themselves properly), a process cannot change its security context without it being explicitly allowed (as one of the permissions granted to the security context). It is the policy that defines how and when contexts can change, and this is not at the discretion of the application or user. Hence the name, Mandatory access control versus Discretionary access control.
This mandatory part of the access control is what makes SELinux powerful in reducing the likelihood that vulnerable applications are exploited to do what they are not supposed to: since the application cannot control the security context in which it is running, any 'hostile take-over' of the process will not result in any privilege escalation beyond what the policy tells us that the application is allowed to do.
What you need to remember
That's it for the first part of the tutorials (many more will follow).
What you should remember from this tutorial is that
1. a process is assigned a security context which, just like with the user under which the process runs, helps Linux in identifying what the application should and shouldn't be allowed to do, and
2. that a security context cannot change at the discretion of the process, but is instead governed by the SELinux policy itself
Next, we will take a look at what these privileges and permissions are towards regular files and directories. | {
"url": "https://wiki.gentoo.org/wiki/SELinux/Tutorials/The_security_context_of_a_process",
"source_domain": "wiki.gentoo.org",
"snapshot_id": "crawl=CC-MAIN-2022-49",
"warc_metadata": {
"Content-Length": "37906",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LF46LERLQRDFTM24EN5YAZEOY3IPPBQ3",
"WARC-Concurrent-To": "<urn:uuid:36730e23-6620-4ad5-b315-4fb06af94a3c>",
"WARC-Date": "2022-11-26T09:28:43Z",
"WARC-IP-Address": "204.187.15.5",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2ZWQUIYX3EN5R4LZI55674ELKSKWC5LK",
"WARC-Record-ID": "<urn:uuid:8e38111f-3ee4-4ef8-b671-7791f0b34bfa>",
"WARC-Target-URI": "https://wiki.gentoo.org/wiki/SELinux/Tutorials/The_security_context_of_a_process",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:35cfcf03-1fad-44dc-838e-e6caf2ad41cb>"
},
"warc_info": "isPartOf: CC-MAIN-2022-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-103\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
52,
53,
70,
104,
169,
170,
204,
205,
910,
911,
930,
931,
1176,
1177,
1186,
1211,
1237,
1261,
1262,
1816,
1817,
2183,
2184,
2223,
2284,
2342,
2405,
2475,
2476,
2533,
2534,
2671,
3018,
3052,
3132,
3133,
3501,
3502,
3526,
3527,
3949,
3950,
4477,
4478,
5194,
5195,
5548,
5549,
5573,
5628,
5629,
5831,
5832,
6403,
6404,
6758,
6759,
7238,
7428,
7749,
8318,
8319,
8461,
8462,
8485,
8486,
8881,
8882,
9241,
9242,
9286,
9358,
9427,
9501,
9565,
9566,
9651,
9652,
9696,
9799,
9899,
10004,
10099,
10100,
10534,
10535,
10569,
10570,
10634,
10805,
10875,
11039,
11040,
11194,
11195,
11776,
11777,
12193,
12194,
12220,
12221,
12292,
12293,
12345,
12346,
12544,
12674,
12675
],
"line_end_idx": [
52,
53,
70,
104,
169,
170,
204,
205,
910,
911,
930,
931,
1176,
1177,
1186,
1211,
1237,
1261,
1262,
1816,
1817,
2183,
2184,
2223,
2284,
2342,
2405,
2475,
2476,
2533,
2534,
2671,
3018,
3052,
3132,
3133,
3501,
3502,
3526,
3527,
3949,
3950,
4477,
4478,
5194,
5195,
5548,
5549,
5573,
5628,
5629,
5831,
5832,
6403,
6404,
6758,
6759,
7238,
7428,
7749,
8318,
8319,
8461,
8462,
8485,
8486,
8881,
8882,
9241,
9242,
9286,
9358,
9427,
9501,
9565,
9566,
9651,
9652,
9696,
9799,
9899,
10004,
10099,
10100,
10534,
10535,
10569,
10570,
10634,
10805,
10875,
11039,
11040,
11194,
11195,
11776,
11777,
12193,
12194,
12220,
12221,
12292,
12293,
12345,
12346,
12544,
12674,
12675,
12784
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 12784,
"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.419279009103775,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0066614397801458836,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.19396552443504333,
"rps_doc_frac_unique_words": 0.26843658089637756,
"rps_doc_mean_word_length": 4.893313884735107,
"rps_doc_num_sentences": 88,
"rps_doc_symbol_to_word_ratio": 0.00156739994417876,
"rps_doc_unigram_entropy": 5.410594940185547,
"rps_doc_word_count": 2034,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.03195016831159592,
"rps_doc_frac_chars_dupe_6grams": 0.011654780246317387,
"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.01105193980038166,
"rps_doc_frac_chars_top_3gram": 0.007234000135213137,
"rps_doc_frac_chars_top_4gram": 0.003315580077469349,
"rps_doc_books_importance": -936.60693359375,
"rps_doc_books_importance_length_correction": -936.60693359375,
"rps_doc_openwebtext_importance": -611.5927124023438,
"rps_doc_openwebtext_importance_length_correction": -611.5927124023438,
"rps_doc_wikipedia_importance": -337.6023864746094,
"rps_doc_wikipedia_importance_length_correction": -337.6023864746094
},
"fasttext": {
"dclm": 0.20659363269805908,
"english": 0.9350866675376892,
"fineweb_edu_approx": 2.557642936706543,
"eai_general_math": 0.9369218945503235,
"eai_open_web_math": 0.36674171686172485,
"eai_web_code": 0.9553588628768921
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.8222",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.822",
"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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-7,247,877,181,268,979,000 | What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 137 Stack Exchange communities.
I'd like to see a few more advanced search filters:
• maximum question votes
• maximum views
• maximum answers
• date ranges
• minimum asker rep
The existing search filters are a promising start, but more options required!
share|improve this question
10
Ping... can this be implemented? – RCIX Jan 9 '10 at 3:44
6 Answers 6
up vote 18 down vote accepted
I like this idea to filter out the useless cartoon/joke questions. I can think of no reason why adding this feature to the advanced search would be a negative addition, and it should be trivially simple to implement.
share|improve this answer
3
So, realizing this is now a three year old question, and I came to ask the exact same thing - why is this not yet implemented? – Chris Jan 1 '13 at 15:49
I know this is an old question, however I went here to ask this very question.
I think this is a very valid feature to be able to filter by asker-rep. The fear of loosing potential answers from high-rep visitors is very valid, however, wouldn't peoples race for rep by answering simple questions prevent that? As it is now, you certainly miss 99.8% of all questions anyway because you cannot keep up. That would also help newbies help newbies, aswell as earning reps because of fewer answers from high-rep visitors.
Even though I filter out lots of questions by tags, I still only see questions from the last 6 minutes. And I don't visit stackoverflow every 6 minutes...
And what about a feature to only show questions with interesting tags? Is that possible? I can filter by each individual tag, but not all questions with either one of my interesting tags AFAIK.
share|improve this answer
Indeed. I've pretty much stopped answering questions from Stack Overflow's front page, because it doesn't have this feature or one like it. Instead, I go by a couple of tag RSS feeds I follow in Google Reader, which are usually delayed by several hours. I spend no more than 3 minutes a day on average now on SO, and I'm sure I'm missing lots of questions I could contribute uniquely to. – Barry Kelly Dec 5 '09 at 3:01
I'm in favour of this, especially if it's coupled with 'favourite searches':
• When I'm in a generous mood, I could seek out newbies (we sort-of have this with first-post review)
• When I'm in a snobby mood, I could keep the newbies at bay with my whip & chair (lion tamer, not kink)
The flip-flop of mood is partly due to the patterns I've noticed in quality when different timezones come online.
The obvious drawback is that it could encourage fence-sitters to always ignore new users (it shouldn't affect answer rates from established pro or anti). It also makes it more difficult for quality new users gain rep.
The big danger with this is that 'low rep' only reflects how actively involved a user has been, not what their skill level is - I'd guess that there are lurkers on SO, who browse to expand general knowledge, but don't often comment/ask/answer.
I think the safest way to implement this would be to allow a shadow-rep for a question, so 'mentors' can allow high-quality newbie posts to break-through a low-rep filter. No idea what this means for the back-end. As it's out-of-scope here, I've created http://meta.stackexchange.com/questions/89468/flag-not-tag-for-mentor as a related discussion.
share|improve this answer
I think "Minimum rep filter" is needed because:
It's already possible to employ that filter manually. I for instance tend to avoid spending time on "user128238"s question because it feels like the guy probably won't care to follow up (12% accept rate is also a sign). Being an active member of community is a plus in that sense. Althugh manual works, it's getting harder and harder to find a question from someone with at least three digits rep.
Therefore a minimum rep filter is a motivating factor for newbies to get more intellectual juice out of SO. If he doesn't care for the web site, he doesn't get the answer. Motivation is twofold, newbies also need to answer more questions in their own caliber to get credibility on the web site.
I have been getting more and more tired to find questions which I can answer. The ones I find usually have 10 answers already 8 saying the same thing, 1 being Jon Skeet, 1 is a clueless one having -3 score. I can only cling to newest+unanswered and hope something worthwhile comes along in three refreshes then I'm out. This needs to be fixed.
share|improve this answer
I'm here to learn from asking & answering questions. Seeing more content cluttering up the site with the sole purpose of encouraging gaming of the system would only serve to push me away.
I don't want to give the impression that your feature requests are invalid, I'm just not sure they're in line with the goals of the site(s) (obviously I can't speak for Jeff/Joel, hence the uncertain phrasing).
Maybe you can get what you're after by filtering to only show questions tagged with more advanced topics. I'm not sure that rep-gaming gimmicks are going to keep anyone around long-term.
share|improve this answer
2
Eh? Where did I advocate rep-gaming? What did I say that encourages it? Basically, I want to reduce the influence help vampires have on the site, otherwise I'll stop visiting, simple as that. slash7.com/pages/vampires – Barry Kelly Sep 2 '09 at 14:39
And I really really don't see how adding a new advanced search feature to the site is going to "encourage gaming of the system". I'm really at a loss as to the nature of your answer. – Barry Kelly Sep 2 '09 at 14:41
Maybe I misread, I thought you'd stated that you wanted a search feature specifically to help get a badge? (hard to tell now that it's been edited down) – Kara Marfia Sep 2 '09 at 15:11
You can look at the old edit, I never mentioned badge, I only advocated the feature. I thought that my personal motivations were clouding my specific request, though, so I removed that. – Barry Kelly Sep 2 '09 at 15:18
The primary motive for not implementing that feature would be to force people to see newbie questions, even if they do not want to see them. I doubt the people who would use that feature will end up answering the newbie questions anyway. – sashoalm Apr 16 '14 at 4:56
Rep is a cumulative value from all of a user's activities; if the questions they are asking are in topics they aren't experts in (or are just curiousities) then they're no better than a user with no rep.
I've seen lots of Q's and A's from user's with several thousand rep points that are on par with any beginner question. For your intended use rep would need to be topic-specific: "Show me questions related to Widgets where OP's Widget Rep > 5000"
share|improve this answer
3
IME, it doesn't generally work that way. People with high rep usually ask deeper and more thorny questions related to their general area of expertise, rather than naif questions in unrelated areas. But my primary motivation with asking this question is to avoid me being bored with SO and drifting away, as a front page of trivial questions are less and less interesting to me. – Barry Kelly Sep 2 '09 at 14:33
There is also simply the issue of vampires: slash7.com/pages/vampires - this problem is pretty bad once it sets in, and it invariably does. – Barry Kelly Sep 2 '09 at 14:36
3
Strongly disagree on this; although out-of-comfort-area posters don't know the details of the topic, basic concepts are similar. Code is either multi-context (including processes, threads, interrupts, etc), or it isn't. It's either mostly event-driven, or not. Most languages a C-style syntax. Many problems are logic-based, even when experienced in the context of a specific language. – Phil Lello May 1 '11 at 17:27
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged . | {
"url": "http://meta.stackexchange.com/questions/19659/search-filters-by-minimum-rep-maximum-views-maximum-answers-etc/112005",
"source_domain": "meta.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2015-11",
"warc_metadata": {
"Content-Length": "95489",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DJIUCQ4NCMPXFIX7WVWKQTA7BCTOLA77",
"WARC-Concurrent-To": "<urn:uuid:361929db-7b1f-4047-ab3c-573452c261ff>",
"WARC-Date": "2015-02-28T14:09:02Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:CDAC3LVNYDDTPPZMPAIJW2PYNZEXAJRT",
"WARC-Record-ID": "<urn:uuid:86c0b253-8541-40f3-be1b-561e7636c014>",
"WARC-Target-URI": "http://meta.stackexchange.com/questions/19659/search-filters-by-minimum-rep-maximum-views-maximum-answers-etc/112005",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fed1bae7-ed05-4874-b0d9-cfaace8b2417>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-28-5-156.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-11\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for February 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,
16,
173,
174,
226,
227,
254,
272,
292,
308,
330,
331,
409,
410,
438,
443,
502,
503,
515,
516,
546,
547,
764,
765,
791,
795,
950,
951,
1030,
1031,
1468,
1469,
1624,
1625,
1819,
1820,
1846,
1851,
2272,
2273,
2350,
2351,
2455,
2562,
2563,
2677,
2678,
2896,
2897,
3141,
3142,
3491,
3492,
3518,
3519,
3567,
3568,
3966,
3967,
4262,
4263,
4607,
4608,
4634,
4635,
4823,
4824,
5035,
5036,
5223,
5224,
5250,
5254,
5506,
5511,
5728,
5733,
5920,
5925,
6145,
6150,
6419,
6420,
6624,
6625,
6871,
6872,
6898,
6902,
7314,
7319,
7493,
7497,
7916,
7917,
7958,
7959
],
"line_end_idx": [
16,
173,
174,
226,
227,
254,
272,
292,
308,
330,
331,
409,
410,
438,
443,
502,
503,
515,
516,
546,
547,
764,
765,
791,
795,
950,
951,
1030,
1031,
1468,
1469,
1624,
1625,
1819,
1820,
1846,
1851,
2272,
2273,
2350,
2351,
2455,
2562,
2563,
2677,
2678,
2896,
2897,
3141,
3142,
3491,
3492,
3518,
3519,
3567,
3568,
3966,
3967,
4262,
4263,
4607,
4608,
4634,
4635,
4823,
4824,
5035,
5036,
5223,
5224,
5250,
5254,
5506,
5511,
5728,
5733,
5920,
5925,
6145,
6150,
6419,
6420,
6624,
6625,
6871,
6872,
6898,
6902,
7314,
7319,
7493,
7497,
7916,
7917,
7958,
7959,
8025
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 8025,
"ccnet_original_nlines": 96,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.402793288230896,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03631284832954407,
"rps_doc_frac_lines_end_with_ellipsis": 0.010309279896318913,
"rps_doc_frac_no_alph_words": 0.20949721336364746,
"rps_doc_frac_unique_words": 0.40679189562797546,
"rps_doc_mean_word_length": 4.504335403442383,
"rps_doc_num_sentences": 75,
"rps_doc_symbol_to_word_ratio": 0.0011173200327903032,
"rps_doc_unigram_entropy": 5.681216239929199,
"rps_doc_word_count": 1384,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01844722032546997,
"rps_doc_frac_chars_dupe_6grams": 0.015239009633660316,
"rps_doc_frac_chars_dupe_7grams": 0.015239009633660316,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01796598918735981,
"rps_doc_frac_chars_top_3gram": 0.02117420919239521,
"rps_doc_frac_chars_top_4gram": 0.007699709851294756,
"rps_doc_books_importance": -754.85888671875,
"rps_doc_books_importance_length_correction": -754.85888671875,
"rps_doc_openwebtext_importance": -433.0741882324219,
"rps_doc_openwebtext_importance_length_correction": -433.0741882324219,
"rps_doc_wikipedia_importance": -334.52587890625,
"rps_doc_wikipedia_importance_length_correction": -334.52587890625
},
"fasttext": {
"dclm": 0.12402772903442383,
"english": 0.9633976221084595,
"fineweb_edu_approx": 1.104938268661499,
"eai_general_math": 0.2742317318916321,
"eai_open_web_math": 0.3003185987472534,
"eai_web_code": 0.026214299723505974
}
} | {
"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": "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": "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": "5",
"label": "Comment Section"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-5,313,869,057,250,035,000 | http://qs321.pair.com?node_id=1190860
in reply to Re^7: Think Perl 6 (new book)
in thread Think Perl 6 (new book)
What if a bunch of people joined and decided that Perl is not relevant and we should start discussing python/ruby/js ?
Then an appropriate thread would be started, and either a new site or section would be opened. All by suggestion and vote. Again, that is the part of the beauty of this site.
Wouldn't happen.
Which part? :p
The part where a bunch of relative newcomers would be able to sway the site entirely away from Perl.
One important aspect of our bureaucratic momentum is the fact that one must be at least a Friar to have moderation power. Then, of course, one can't be a janitor or other power user without the action of the gods, who tend toward the conservative on such matters. So for your scenario to have any realistic chance of happening, it would have to be a massive, highly coordinated campaign, over a very long period of time. So, yeah, if the Chinese government really wanted to undermine PerlMonks, they could possibly do it. :-)
... either a new site or section would be opened.
There's a big difference between a site and a section. If many people wanted, say, a "JavaJunkies", they'd just go and do it. No restraints; no votes necessary. If they thought there should be a new section, well, they're likely to be disappointed (not that this policy is absolutely immutable for all time, however).
All by suggestion and vote.
I'm curious how you expect we could run a vote with sufficient participation such that the results would be considered anything close to a mandate.
I know you didn't say specifically that we could use the site's existing polls feature, but I'll note that, out of the 425 polls to date, the feature was almost never used to solicit real input from the monks, and not since 2001 or so. (Should Perl Gurus receive mega XP?)
Relevant discussion: Polls on PM issues
The real problem, with polls or any other technique we have or might come up with, is in getting sufficiently broad-based input from the membership. If only a few people weigh in, why should we consider that compelling? And, yes, you might argue that "Maybe only the active members' opinions matter anyway," but how do we know who's really active? If vkon, say -- who as of today hasn't logged in in several weeks -- misses the discussion and poll, then we're misunderestimating the active membership, and the results lose trustworthiness.
Elsewhere, tye noted another problem with using polls: "Trying to build a democracy out of a poll where only a single person gets to compose the question to be voted upon" would be stupid.
Lastly, I think it's worth noting -- though it may seem anathema to some -- that not everyone's opinion is equally valid. I'd be far more inclined to trust a consensus of dozens of long-time members than of hundreds of newbs. Not because seniority is inherently more worthy -- I hate classism as much as anyone -- but because they have a greater familiarity and understanding of how this site and this community work.
I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies. | {
"url": "http://qs321.pair.com/~monkads/?node_id=1190860;displaytype=print",
"source_domain": "qs321.pair.com",
"snapshot_id": "CC-MAIN-2024-18",
"warc_metadata": {
"Content-Length": "5343",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:EPQL5T5VFLJPUTJLYC34N3WIISOQPBNQ",
"WARC-Concurrent-To": "<urn:uuid:ddcbac58-aa99-4fb9-b517-23b2f95f6ef1>",
"WARC-Date": "2024-04-13T22:59:32Z",
"WARC-IP-Address": "66.39.36.186",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:6GLKBEHSS6HX5NRWCDOYT3CORKCLOC2S",
"WARC-Record-ID": "<urn:uuid:3fb2bd7c-838d-49e3-af7d-197da9521694>",
"WARC-Target-URI": "http://qs321.pair.com/~monkads/?node_id=1190860;displaytype=print",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:05c7acd2-e90c-4881-a819-7739871585a9>"
},
"warc_info": "isPartOf: CC-MAIN-2024-18\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for April 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-118\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
38,
39,
40,
82,
116,
117,
236,
411,
428,
443,
444,
545,
546,
1072,
1073,
1123,
1124,
1442,
1443,
1471,
1472,
1620,
1621,
1894,
1895,
1935,
1936,
2476,
2477,
2666,
2667,
3085,
3086
],
"line_end_idx": [
38,
39,
40,
82,
116,
117,
236,
411,
428,
443,
444,
545,
546,
1072,
1073,
1123,
1124,
1442,
1443,
1471,
1472,
1620,
1621,
1894,
1895,
1935,
1936,
2476,
2477,
2666,
2667,
3085,
3086,
3172
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3172,
"ccnet_original_nlines": 33,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4706744849681854,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013196480460464954,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17448680102825165,
"rps_doc_frac_unique_words": 0.526605486869812,
"rps_doc_mean_word_length": 4.543119430541992,
"rps_doc_num_sentences": 32,
"rps_doc_symbol_to_word_ratio": 0.001466279965825379,
"rps_doc_unigram_entropy": 5.210481643676758,
"rps_doc_word_count": 545,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06058157980442047,
"rps_doc_frac_chars_dupe_6grams": 0.02907915972173214,
"rps_doc_frac_chars_dupe_7grams": 0.02907915972173214,
"rps_doc_frac_chars_dupe_8grams": 0.02907915972173214,
"rps_doc_frac_chars_dupe_9grams": 0.02907915972173214,
"rps_doc_frac_chars_top_2gram": 0.016962839290499687,
"rps_doc_frac_chars_top_3gram": 0.008077540434896946,
"rps_doc_frac_chars_top_4gram": 0.010500810109078884,
"rps_doc_books_importance": -307.6057434082031,
"rps_doc_books_importance_length_correction": -307.6057434082031,
"rps_doc_openwebtext_importance": -194.28707885742188,
"rps_doc_openwebtext_importance_length_correction": -194.28707885742188,
"rps_doc_wikipedia_importance": -146.00430297851562,
"rps_doc_wikipedia_importance_length_correction": -146.00430297851562
},
"fasttext": {
"dclm": 0.547950267791748,
"english": 0.9694913029670715,
"fineweb_edu_approx": 1.5809831619262695,
"eai_general_math": 0.7842479348182678,
"eai_open_web_math": 0.3429417610168457,
"eai_web_code": 0.6099957227706909
}
} | {
"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": "302.22",
"labels": {
"level_1": "Social sciences",
"level_2": "",
"level_3": "Social psychology"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "5",
"label": "Comment Section"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,234,599,130,689,961,200 | Home > Standard Error > Proportion Standard Error Excel
Proportion Standard Error Excel
Contents
Let p1 be the proportion of successes in n1 trials of the first distribution and let p2 be the proportion of successes in n2 trials of the second distribution. To find the confidence interval at 95% I used the Excel equation =CONFIDENCE(0.025, 0.01505, 1100) and got the value 0.00102. Since we are trying to estimate a population proportion, we choose the sample proportion (0.40) as the sample statistic. For convenience, we repeat the key steps below. useful reference
What can I do? Taal: Nederlands Contentlocatie: Nederland Beperkte modus: Uit Geschiedenis Help Laden... The presumption is that the distributions for each of these are proportional. What is the 99% confidence interval for the proportion of readers who would like more coverage of local news? (A) 0.30 to 0.50 (B) 0.32 to 0.48 (C) 0.35 to 0.45 have a peek at this web-site
Calculate Sample Proportion In Excel
Log in om ongepaste content te melden. it is not so likely that you will select the same person twice). They can be time-consuming and complex.
1. ExcelIsFun 9.602 weergaven 4:41 Excel Statistics 74: Taking a Sample with RAND & VLOOKUP - Duur: 13:42.
2. You can change this preference below.
3. Thanks for your help.
4. Laden...
Can we conclude that the majority of voters (from the population) are in favor? Cody Tabbert 5.475 weergaven 11:38 Meer suggesties laden... Under these circumstances, use the standard error. Standard Error Of The Proportion Calculator In this case, imagine that the data in column A represent the kilometres per litre found for a sample of 5 new cars tested by the manufacturer.
NORMDIST(.53, .5, 0.01505, TRUE) = .976889 > .95, and so we can reject the null hypothesis and conclude with 95% confidence that the population will vote in favor of the tax Excel Proportion Formula Het beschrijft hoe wij gegevens gebruiken en welke opties je hebt. This introduces additional error, which is acceptable for large values of n.
Beoordelingen zijn beschikbaar wanneer de video is verhuurd.
ExcelIsFun 9.394 weergaven 25:48 Excel Statistics 78 Relationship Standard Error & Sample Size - Duur: 4:41. Standard Error Of Proportion Formula Geüpload op 4 feb. 2012Download file: https://people.highline.edu/mgirvin/E...Topics:1. Identify a sample statistic. See NORM.DIST and SQRT functionsThis is for the Highline Community College Busn 210 Statistical Analysis for Business and Economics taught by Michael Girvin Categorie Onderwijs Licentie Standaard YouTube-licentie Meer weergeven Minder
Excel Proportion Formula
Your cache administrator is webmaster. https://support.microsoft.com/en-us/kb/214076 See NORMDIST function for probability calculations.Busn 210 Business Statistical Using Excel Highline Community College taught by Mike Gel excelisfun Girvin Categorie Onderwijs Licentie Standaard YouTube-licentie Meer weergeven Minder weergeven Laden... Calculate Sample Proportion In Excel Calculation of Standard Error in binomial standard deviation is made easier here using this online calculator. Excel Proportion Confidence Interval Elsewhere on this site, we show how to compute the margin of error when the sampling distribution is approximately normal.
Estimation Requirements The approach described in this lesson is valid whenever the following conditions are met: The sampling method is simple random sampling. see here Laden... Since the above requirements are satisfied, we can use the following four-step approach to construct a confidence interval. Kies je taal. How To Find Standard Error Of Proportion
SalkindList Price: $67.00Buy Used: $0.01Buy New: $7.11The Mortgage Encyclopedia: The Authoritative Guide to Mortgage Programs, Practices, Prices and Pitfalls, Second EditionJack GuttentagList Price: $30.00Buy Used: $13.18Buy New: $27.87Barron's AP StatisticsMartin Sternstein Learn more You're viewing YouTube in Dutch. Use the sample proportion to estimate the population proportion. this page Meer weergeven Laden...
Khan Academy 455.215 weergaven 10:52 Statistics: Sampling Distribution of Sample Proportions - Duur: 6:43. Sample Proportion Formula Laden... SEp = sqrt[ p * ( 1 - p ) / n ] * sqrt[ ( N - n ) / ( N - 1 ) ] where p is the
the population mean) will be within 2.5% of the sample mean? (i.e.
The same data can be used to demonstrate how to calculate the sample standard deviation in Excel. Sluiten Meer informatie View this message in English Je gebruikt YouTube in het Nederlands. the standard error) We can use this fact to do hypothesis testing as was done for the normal distribution. Sample Proportion Probability Calculator Find standard deviation or standard error.
This information is presented as column A of the spreadsheet (figure 5). Khan Academy 333.593 weergaven 14:28 Mod-01 Lec-04 Sampling distribution - Duur: 1:01:37. Over Pers Auteursrecht Videomakers Adverteren Ontwikkelaars +YouTube Voorwaarden Privacy Beleid & veiligheid Feedback verzenden Probeer iets nieuws! http://bsdupdates.com/standard-error/proportion-standard-error-of-the-mean.php Beoordelingen zijn beschikbaar wanneer de video is verhuurd.
ExcelIsFun 8.168 weergaven 14:50 Introduction to Pivot Tables, Charts, and Dashboards in Excel (Part 1) - Duur: 14:48. variance? Thus a sample of size 1,537 is sufficient. Inloggen Transcript Statistieken 10.096 weergaven 10 Vind je dit een leuke video?
Thus the maximum s.e. = = . In addition to constructing a confidence interval, the Wizard creates a summary report that lists key findings and documents analytical techniques. Sluiten Meer informatie View this message in English Je gebruikt YouTube in het Nederlands. Later herinneren Nu bekijken Conform de wetgeving ten aanzien van de bescherming van gegevens verzoeken we je even de tijd te nemen om de belangrijkste punten van ons Privacybeleid door te
craig sapp 9.757 weergaven 18:42 Using Excel to estimate a proportion - Duur: 32:08. Laden... For this problem, it will be the t statistic having 1599 degrees of freedom and a cumulative probability equal to 0.995. Dit beleid geldt voor alle services van Google.
This formula uses the standard deviation and not the standard error as the second argument. Sluiten Ja, nieuwe versie behouden Ongedaan maken Sluiten Deze video is niet beschikbaar. ExcelIsFun 16.972 weergaven 10:31 Meer suggesties laden... Thanks.
ExcelIsFun 6.989 weergaven 16:24 Sampling Distributions: proportion - Duur: 3:22. Transcript Het interactieve transcript kan niet worden geladen. Learn more You're viewing YouTube in Dutch. Het beschrijft hoe wij gegevens gebruiken en welke opties je hebt.
Bezig... Log in om dit toe te voegen aan de afspeellijst 'Later bekijken' Toevoegen aan Afspeellijsten laden... | {
"url": "http://bsdupdates.com/standard-error/proportion-standard-error-excel.php",
"source_domain": "bsdupdates.com",
"snapshot_id": "crawl=CC-MAIN-2018-05",
"warc_metadata": {
"Content-Length": "13989",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:EGCUKMJVWYMN5K5BTNWDTQ7WVDDYZA3U",
"WARC-Concurrent-To": "<urn:uuid:f05469ea-bd7c-4fbe-9120-309c4d131f06>",
"WARC-Date": "2018-01-20T08:43:41Z",
"WARC-IP-Address": "104.24.102.193",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UDQ7PYDXGN3V2N3Y6AUGIJA5YWYUXO5Q",
"WARC-Record-ID": "<urn:uuid:3d8ca144-614a-433b-b5bd-c724554d1e6d>",
"WARC-Target-URI": "http://bsdupdates.com/standard-error/proportion-standard-error-excel.php",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7165270a-8d8b-48ea-900b-b39e2357629b>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-180-62-156.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,
56,
57,
89,
90,
99,
100,
572,
573,
946,
947,
984,
985,
1129,
1130,
1239,
1282,
1309,
1323,
1324,
1703,
1704,
2047,
2048,
2109,
2110,
2608,
2609,
2634,
2635,
3282,
3283,
3641,
3642,
4061,
4062,
4283,
4284,
4351,
4352,
4733,
4734,
5186,
5187,
5441,
5442,
5899,
5900,
6163,
6164,
6413,
6414,
6671,
6672
],
"line_end_idx": [
56,
57,
89,
90,
99,
100,
572,
573,
946,
947,
984,
985,
1129,
1130,
1239,
1282,
1309,
1323,
1324,
1703,
1704,
2047,
2048,
2109,
2110,
2608,
2609,
2634,
2635,
3282,
3283,
3641,
3642,
4061,
4062,
4283,
4284,
4351,
4352,
4733,
4734,
5186,
5187,
5441,
5442,
5899,
5900,
6163,
6164,
6413,
6414,
6671,
6672,
6783
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6783,
"ccnet_original_nlines": 53,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2150297611951828,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014880949631333351,
"rps_doc_frac_lines_end_with_ellipsis": 0.055555559694767,
"rps_doc_frac_no_alph_words": 0.2901785671710968,
"rps_doc_frac_unique_words": 0.4668705463409424,
"rps_doc_mean_word_length": 5.535168170928955,
"rps_doc_num_sentences": 118,
"rps_doc_symbol_to_word_ratio": 0.008928569965064526,
"rps_doc_unigram_entropy": 5.5790815353393555,
"rps_doc_word_count": 981,
"rps_doc_frac_chars_dupe_10grams": 0.048618778586387634,
"rps_doc_frac_chars_dupe_5grams": 0.13406997919082642,
"rps_doc_frac_chars_dupe_6grams": 0.12228360772132874,
"rps_doc_frac_chars_dupe_7grams": 0.11197052896022797,
"rps_doc_frac_chars_dupe_8grams": 0.0990791916847229,
"rps_doc_frac_chars_dupe_9grams": 0.0990791916847229,
"rps_doc_frac_chars_top_2gram": 0.028729280456900597,
"rps_doc_frac_chars_top_3gram": 0.00828729011118412,
"rps_doc_frac_chars_top_4gram": 0.010313079692423344,
"rps_doc_books_importance": -598.43603515625,
"rps_doc_books_importance_length_correction": -598.43603515625,
"rps_doc_openwebtext_importance": -380.8910217285156,
"rps_doc_openwebtext_importance_length_correction": -380.8910217285156,
"rps_doc_wikipedia_importance": -310.75640869140625,
"rps_doc_wikipedia_importance_length_correction": -310.75640869140625
},
"fasttext": {
"dclm": 0.02217436023056507,
"english": 0.5179799199104309,
"fineweb_edu_approx": 2.522592544555664,
"eai_general_math": 0.5921340584754944,
"eai_open_web_math": 0.824876606464386,
"eai_web_code": 0.053670529276132584
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "519.5",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Probabilities; or, Mathematical statistics"
}
},
"secondary": {
"code": "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": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,016,184,030,897,768,300 | dcsimg
www.webdeveloper.com
Results 1 to 4 of 4
Thread: A tricky height setting
1. #1
Join Date
Jan 2009
Posts
24
A tricky height setting
Hello.
Here is the live site which I am trying to remove all of the frames from.
http://www.gmmstudios.com/
Here is my Work in progress site.
http://patrickrauland.com/gmm/
The tricky part is that I need the content area to be as tall as the browser will allow, and then to add a scroll bar. I want to be able to always see the navigation on the left.
I also want the nav section to show as much of the background as possible, without showing so much that it adds a scroll bar.
How can I do this in CSS? It seems to me that if I want a scroll bar for the content section that I have to set a specific height. Is there a way of setting
2. #2
Join Date
Aug 2009
Location
England
Posts
29
I've noticed a bit of code in your stylesheet under #nav: height: 1168px;
Try setting this to 100% first off and see what happens. You've also set the height of the #content_pane section to 500px, try setting this to *px (I forget if this is correct syntax or not though).
I am a Freelance Developer. Please go to www.aaroncatlin.com for more information and contact details.
NB: If I respond to you with a code snippet that doesn't quite work, I apologise. I type my responses very fast and can occasionally make a typo.
3. #3
Join Date
Jan 2009
Posts
24
Thanks for the quick reply. That didn't quite solve the issue.
setting the #nav height to 100% will make that section as tall as your browser is. If the user scrolls down, there will be unfilled space.
I tried setting the #content_pane to *px but that didn't do anything. I also tried 100% and that didn't do anything.
Last edited by BFTrick; 08-14-2009 at 03:05 PM.
4. #4
Join Date
Apr 2009
Posts
122
Hi Bftrick,
Make a copy of your style sheet and replace the style.css styles with:
Code:
HTML {
MIN-HEIGHT: 100%; height: 100%;
}
BODY {
FONT-SIZE: 12px; MIN-HEIGHT: 100%; height: 100%; overflow-y: scroll;
}
H3 {
FONT-SIZE: 18px; FONT-WEIGHT: normal
}
H2 {
FONT-SIZE: 24px
}
#header {
BACKGROUND: url(http://www.gmmstudios.com/Pictures/f...ckground.gif); HEIGHT: 83px
}
#nav {
BACKGROUND-IMAGE: url(http://www.gmmstudios.com/Pictures/F...ckground.gif); POSITION: absolute; WIDTH: 160px; TOP: 83px; LEFT: 0px
}
#nav TABLE TR {
HEIGHT: 40px
}
#content_pane {
PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #00abea; PADDING-LEFT: 160px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
#content-bg {
PADDING-BOTTOM: 10px; BACKGROUND-COLOR: white
}
#content {
PADDING-BOTTOM: 0px; PADDING-LEFT: 50px; WIDTH: 500px; PADDING-RIGHT: 0px; BACKGROUND: url(http://www.gmmstudios.com/Pictures/Background.gif) no-repeat; PADDING-TOP: 50px
}
#content H1 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content H2 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content H3 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content H4 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content H5 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content H6 {
FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
}
#content A IMG {
FILTER: alpha(opacity='95'); opacity: 0.95
}
#content A:hover IMG {
FILTER: alpha(opacity='100'); opacity: 1
}
#page {
height: 100%;
}
What i've done is take off the height on the nav as its not needed, and told the HTML / Body to have 100% height.
You might want to play about with this to get it just as you want, but this should hopefully help you on your way. Hope this helps
- Andy
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
HTML5 Development Center
Recent Articles | {
"url": "http://www.webdeveloper.com/forum/showthread.php?214945-A-tricky-height-setting",
"source_domain": "www.webdeveloper.com",
"snapshot_id": "crawl=CC-MAIN-2016-26",
"warc_metadata": {
"Content-Length": "71569",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:M4FSVKAERSYLHZGM2DZSVAHB6XDF5YKF",
"WARC-Concurrent-To": "<urn:uuid:f27f7cb6-c506-4658-8496-72a4cb89ba9f>",
"WARC-Date": "2016-06-26T22:16:52Z",
"WARC-IP-Address": "70.42.23.121",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:G75CVDUFH2HBZRV53LL6H2VA7X5LNWKQ",
"WARC-Record-ID": "<urn:uuid:e97558d1-f901-47fb-a956-afc4d797ed91>",
"WARC-Target-URI": "http://www.webdeveloper.com/forum/showthread.php?214945-A-tricky-height-setting",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:f97c999f-0579-4458-82d9-2b65a64c9bc9>"
},
"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,
7,
28,
48,
49,
81,
82,
90,
104,
117,
127,
134,
135,
163,
164,
175,
176,
254,
255,
286,
287,
325,
326,
361,
362,
545,
546,
676,
677,
838,
839,
847,
861,
874,
887,
899,
909,
916,
994,
995,
1198,
1305,
1306,
1456,
1457,
1465,
1479,
1492,
1502,
1509,
1576,
1723,
1724,
1845,
1897,
1898,
1906,
1920,
1933,
1943,
1951,
1967,
2042,
2043,
2053,
2064,
2101,
2107,
2118,
2192,
2198,
2207,
2249,
2255,
2264,
2285,
2291,
2305,
2393,
2399,
2410,
2546,
2552,
2572,
2590,
2596,
2616,
2727,
2733,
2751,
2802,
2808,
2823,
2999,
3005,
3023,
3088,
3094,
3112,
3177,
3183,
3201,
3266,
3272,
3290,
3355,
3361,
3379,
3444,
3450,
3468,
3533,
3539,
3560,
3608,
3614,
3641,
3687,
3693,
3705,
3724,
3730,
3848,
3849,
3984,
3995,
3996,
4015,
4016,
4043,
4044,
4119,
4120,
4141,
4142,
4162,
4163,
4196,
4225,
4258,
4290,
4296,
4321,
4322,
4323,
4324
],
"line_end_idx": [
7,
28,
48,
49,
81,
82,
90,
104,
117,
127,
134,
135,
163,
164,
175,
176,
254,
255,
286,
287,
325,
326,
361,
362,
545,
546,
676,
677,
838,
839,
847,
861,
874,
887,
899,
909,
916,
994,
995,
1198,
1305,
1306,
1456,
1457,
1465,
1479,
1492,
1502,
1509,
1576,
1723,
1724,
1845,
1897,
1898,
1906,
1920,
1933,
1943,
1951,
1967,
2042,
2043,
2053,
2064,
2101,
2107,
2118,
2192,
2198,
2207,
2249,
2255,
2264,
2285,
2291,
2305,
2393,
2399,
2410,
2546,
2552,
2572,
2590,
2596,
2616,
2727,
2733,
2751,
2802,
2808,
2823,
2999,
3005,
3023,
3088,
3094,
3112,
3177,
3183,
3201,
3266,
3272,
3290,
3355,
3361,
3379,
3444,
3450,
3468,
3533,
3539,
3560,
3608,
3614,
3641,
3687,
3693,
3705,
3724,
3730,
3848,
3849,
3984,
3995,
3996,
4015,
4016,
4043,
4044,
4119,
4120,
4141,
4142,
4162,
4163,
4196,
4225,
4258,
4290,
4296,
4321,
4322,
4323,
4324,
4339
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4339,
"ccnet_original_nlines": 145,
"rps_doc_curly_bracket": 0.00875778030604124,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2358393371105194,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.10092688351869583,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.35118433833122253,
"rps_doc_frac_unique_words": 0.44407346844673157,
"rps_doc_mean_word_length": 4.8681135177612305,
"rps_doc_num_sentences": 49,
"rps_doc_symbol_to_word_ratio": 0.027806390076875687,
"rps_doc_unigram_entropy": 5.16552209854126,
"rps_doc_word_count": 599,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.14060357213020325,
"rps_doc_frac_chars_dupe_6grams": 0.12620027363300323,
"rps_doc_frac_chars_dupe_7grams": 0.1111111119389534,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03292180970311165,
"rps_doc_frac_chars_top_3gram": 0.0658436194062233,
"rps_doc_frac_chars_top_4gram": 0.07613168656826019,
"rps_doc_books_importance": -448.95233154296875,
"rps_doc_books_importance_length_correction": -448.95233154296875,
"rps_doc_openwebtext_importance": -257.5020751953125,
"rps_doc_openwebtext_importance_length_correction": -257.5020751953125,
"rps_doc_wikipedia_importance": -177.76832580566406,
"rps_doc_wikipedia_importance_length_correction": -177.76832580566406
},
"fasttext": {
"dclm": 0.03332417830824852,
"english": 0.7983947992324829,
"fineweb_edu_approx": 1.0057587623596191,
"eai_general_math": 0.04733860120177269,
"eai_open_web_math": 0.21941226720809937,
"eai_web_code": 0.0026519899256527424
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
7,682,755,515,713,741,000 | Manjaro 5.10 Kernel will not boot
5 months ago
If - like me - you get stuck on boot after Manjaro updates to Linux Kernel 5.10, the solution is pretty simple:
1. Boot into 5.9 (you can choose the option in the grub boot menu
2. Reinstall the 5.10 kernel with:
sudo pacman -S linux510
3. For good measure, reinstall the Nvidia driver (if you have an Nvidia card, that is) with:
sudo pacman -S linux510-nvidia
After that, the 5.10 kernel should boot. | {
"url": "https://pedroassuncao.com/posts/manjaro-510-kernel-will-not-boot",
"source_domain": "pedroassuncao.com",
"snapshot_id": "crawl=CC-MAIN-2021-25",
"warc_metadata": {
"Content-Length": "59301",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:5HUL6OXQ42MOTXZI3AAFSPYUNABMG4L7",
"WARC-Concurrent-To": "<urn:uuid:a0633c3e-f8e5-4bed-b966-74efc8dfc497>",
"WARC-Date": "2021-06-23T17:03:01Z",
"WARC-IP-Address": "139.162.215.102",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5ZD2ZY3RBPAXHMIDKICRF3LBNMWMUU7T",
"WARC-Record-ID": "<urn:uuid:22a97954-0df3-443b-bbeb-432036c4c3ea>",
"WARC-Target-URI": "https://pedroassuncao.com/posts/manjaro-510-kernel-will-not-boot",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:688647d9-517b-43e9-b97e-6578d14d3cd0>"
},
"warc_info": "isPartOf: CC-MAIN-2021-25\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-19.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,
34,
35,
48,
49,
161,
162,
230,
267,
295,
390,
425,
426
],
"line_end_idx": [
34,
35,
48,
49,
161,
162,
230,
267,
295,
390,
425,
426,
466
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 466,
"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.2702702581882477,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018018020316958427,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.342342346906662,
"rps_doc_frac_unique_words": 0.654321014881134,
"rps_doc_mean_word_length": 4.222222328186035,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.7965087890625,
"rps_doc_word_count": 81,
"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.07894737273454666,
"rps_doc_frac_chars_top_3gram": 0.07017543911933899,
"rps_doc_frac_chars_top_4gram": 0.08771929889917374,
"rps_doc_books_importance": -35.70125198364258,
"rps_doc_books_importance_length_correction": -39.13088607788086,
"rps_doc_openwebtext_importance": -16.369123458862305,
"rps_doc_openwebtext_importance_length_correction": -19.798757553100586,
"rps_doc_wikipedia_importance": -13.44173812866211,
"rps_doc_wikipedia_importance_length_correction": -16.87137222290039
},
"fasttext": {
"dclm": 0.26575130224227905,
"english": 0.7100518941879272,
"fineweb_edu_approx": 1.065102219581604,
"eai_general_math": 0.2408396601676941,
"eai_open_web_math": 0.0471801795065403,
"eai_web_code": 0.009247359819710255
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.456",
"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": "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": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,068,297,384,403,933,000 | Expressions and Equations End of Unit
starstarstarstarstarstarstarstarstarstar
by Courtney Paull
| 10 Questions
1
1
5x + 4x - x = 40
x = ?
2
1
Which of the following is equivalent to the expression below:
5x + 3 + 6x + 6
20x
8x + 12
11x + 9
20 + x
3
1
x + 7x - 90 = 8x + 90
True
False
4
1
x + 7x - 90 = 8x + 90
Explain your answer from problem 3.
5
1
Ann had $120 to spend on books. After buying 10 books she had $8.30 left.
If each book costs the same, let b be the cost of each book
Write an algebraic equation that represents the situation:
6
1
Simplify the expression:
2(3x + 6)
7
1
4(2x + 3) = 44
What is the value of x?
8
1
Five people visited a local restaurant to get some lunch. A burger costs 6 dollars and a bottle of apple juice costs an unknown amount. If all five people ordered a burger and a bottle of apple juice, write a numerical expression to show the amount of money the restaurant made for this order.
Which expression matches the story. (Choose all that apply)
5*x + 6
5(6 + x)
5*6 + x
5*6 + 5*x
9
1
The cost of trip to the water park costs $85. The trip cost includes $15 for lunch and 1 pass for the wet rides and 1 pass for the dry rides. The cost of each pass is the same. Let p be the price of one pass
Write an algebraic equation that represents the cost of the trip using p
10
1
The cost of trip to the water park costs $85. The trip cost includes $15 for lunch and 1 pass for the wet rides and 1 pass for the dry rides. The cost of each pass is the same.
Let p be the price of one pass
What is the cost of one pass?
Add to my formatives list
Formative uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to the Terms of Service and Privacy Policy. | {
"url": "https://goformative.com/library/5bfb3689b763ca000184cea6",
"source_domain": "goformative.com",
"snapshot_id": "crawl=CC-MAIN-2020-10",
"warc_metadata": {
"Content-Length": "55053",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DOFD2FGWXB6QO56OIQ7EUCDULJFUNYLD",
"WARC-Concurrent-To": "<urn:uuid:cd7584c6-2d19-4ee0-a88c-af8529883bd7>",
"WARC-Date": "2020-02-28T03:23:45Z",
"WARC-IP-Address": "52.21.20.147",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:E2L6ZRAH22JXHXDXUTVR6GKIEYJWLQSJ",
"WARC-Record-ID": "<urn:uuid:7268b761-fabb-49cb-804e-c098a1f70beb>",
"WARC-Target-URI": "https://goformative.com/library/5bfb3689b763ca000184cea6",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fc4927f0-31bc-463e-867b-de1d1c84afae>"
},
"warc_info": "isPartOf: CC-MAIN-2020-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-69.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,
38,
79,
97,
112,
114,
116,
133,
139,
141,
143,
205,
221,
225,
233,
241,
248,
250,
252,
274,
279,
285,
287,
289,
311,
347,
349,
351,
425,
485,
544,
546,
548,
573,
583,
585,
587,
602,
626,
628,
630,
925,
985,
993,
1002,
1010,
1020,
1022,
1024,
1232,
1305,
1308,
1310,
1487,
1518,
1519,
1549,
1575,
1576
],
"line_end_idx": [
38,
79,
97,
112,
114,
116,
133,
139,
141,
143,
205,
221,
225,
233,
241,
248,
250,
252,
274,
279,
285,
287,
289,
311,
347,
349,
351,
425,
485,
544,
546,
548,
573,
583,
585,
587,
602,
626,
628,
630,
925,
985,
993,
1002,
1010,
1020,
1022,
1024,
1232,
1305,
1308,
1310,
1487,
1518,
1519,
1549,
1575,
1576,
1741
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1741,
"ccnet_original_nlines": 58,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3278301954269409,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.002358489902690053,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.30188679695129395,
"rps_doc_frac_unique_words": 0.42363113164901733,
"rps_doc_mean_word_length": 3.734870433807373,
"rps_doc_num_sentences": 19,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.507266998291016,
"rps_doc_word_count": 347,
"rps_doc_frac_chars_dupe_10grams": 0.24228395521640778,
"rps_doc_frac_chars_dupe_5grams": 0.354938268661499,
"rps_doc_frac_chars_dupe_6grams": 0.354938268661499,
"rps_doc_frac_chars_dupe_7grams": 0.3055555522441864,
"rps_doc_frac_chars_dupe_8grams": 0.24228395521640778,
"rps_doc_frac_chars_dupe_9grams": 0.24228395521640778,
"rps_doc_frac_chars_top_2gram": 0.03780864179134369,
"rps_doc_frac_chars_top_3gram": 0.0486111082136631,
"rps_doc_frac_chars_top_4gram": 0.03395061939954758,
"rps_doc_books_importance": -166.1522979736328,
"rps_doc_books_importance_length_correction": -156.455322265625,
"rps_doc_openwebtext_importance": -71.79920196533203,
"rps_doc_openwebtext_importance_length_correction": -71.79920196533203,
"rps_doc_wikipedia_importance": -61.66720199584961,
"rps_doc_wikipedia_importance_length_correction": -55.988407135009766
},
"fasttext": {
"dclm": 0.9946298599243164,
"english": 0.9063623547554016,
"fineweb_edu_approx": 1.2170573472976685,
"eai_general_math": 0.9646481275558472,
"eai_open_web_math": 0.057284120470285416,
"eai_web_code": 0.03294051066040993
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "512",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
},
"secondary": {
"code": "372.7",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Education, Elementary and Kindergarten"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "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": "6",
"label": "Content Listing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,081,751,387,591,224,000 | Resolviendo errores de instalación de Python
Autor: | Última modificación: 26 de diciembre de 2023 | Tiempo de Lectura: 3 minutos
Temas en este post: ,
Algunos de nuestros reconocimientos:
Premios KeepCoding
En el mundo de la programación y el desarrollo web, Python es uno de los lenguajes de programación más populares y versátiles. Su facilidad de uso y su amplia comunidad de desarrolladores han contribuido a su creciente adopción en la industria. Sin embargo, como con cualquier herramienta, a veces surgen problemas durante la instalación. En este artículo, explorarás algunos de los errores de instalación de Python más comunes y cómo resolverlos.
Lo que debes saber sobre los errores de instalación de Python
Antes de sumergirte en el emocionante mundo de la programación en Python, es crucial tener una instalación correcta y funcional del lenguaje. Aquí es donde comienzan los errores de instalación de Python que debes conocer:
El Python.exe no se encuentra
Uno de los errores de instalación de Python más comunes al que se enfrentan los principiantes es el mensaje de error que indica que «python.exe» no se encuentra. Este error ocurre cuando el sistema no puede localizar el ejecutable de Python en las rutas de acceso predeterminadas.
Para resolver este problema, se debe agregar Python a las variables de entorno del sistema.
1. Abre la configuración avanzada del sistema en tu ordenador.
2. Haz clic en «Variables de entorno».
3. En la sección «Variables del sistema», busca la variable PATH y haz clic en «Editar».
4. Agrega la ruta de acceso al directorio donde se encuentra el ejecutable de Python (por ejemplo, C:\PythonXX\).
5. Asegúrate de guardar los cambios y reiniciar tu línea de comandos para que los cambios surtan efecto.
Mensajes de error crípticos
Durante la instalación de Python, a veces puedes encontrar mensajes de error crípticos que no proporcionan información clara sobre el problema. Esto puede ser frustrante, pero hay formas de abordar este problema.
Si te encuentras con un mensaje de error que no comprendes, lo primero que debe hacer es visitar el sitio web oficial de Python. Allí, puedes encontrar documentación detallada, preguntas frecuentes y soluciones para problemas comunes de instalación.
La versión de Python no es la correcta
En ocasiones, es posible que desees instalar una versión específica de Python, pero accidentalmente termines con una versión diferente. Esto puede llevar a problemas de compatibilidad en tu cadena de suministro de desarrollo.
Cuando ejecutes el comando para instalar Python, asegúrate de especificar la versión que deseas. Por ejemplo, para instalar Python 3.8, puedes utilizar el siguiente comando:
python3.8 -m venv mi_entorno
Ruta de acceso incorrecta
La ruta de acceso es una parte crucial de la instalación de Python, ya que determina dónde buscar los ejecutables y bibliotecas necesarios. Asegurarse de que la ruta de acceso sea correcta es esencial para evitar errores.
Si no has configurado correctamente la ruta de acceso o la has modificado accidentalmente, es posible que Python no funcione como se esperaba.
Para verificar la ruta de acceso actual, puedes abrir una línea de comandos y ejecutar el siguiente comando:
echo %PATH%
Asegúrate de que la ruta de acceso incluya la ubicación correcta de Python.
Cerrando el ciclo con los errores de instalación de Python
En el mundo del desarrollo web y la programación, la instalación correcta de Python es el primer paso hacia el éxito. Resolver errores de instalación de Python puede ser un desafío, pero con las soluciones adecuadas, puedes superar cualquier obstáculo en tu camino hacia la programación en Python.
Si sientes que necesitas más orientación y capacitación en el desarrollo web y en los errores de instalación de Python, KeepCoding está aquí para ayudarte. Nuestro Desarrollo Web Full Stack Bootcamp ofrece una experiencia de aprendizaje completa y transformadora que te permitirá dominar Python y otras tecnologías web clave.
Al unirte a nuestro bootcamp, no solo adquirirás habilidades técnicas sólidas, sino que también experimentarás un cambio de vida. La industria tecnológica tiene una demanda constante de profesionales altamente cualificados y ofrece salarios atractivos y estabilidad laboral. Con KeepCoding, puedes darle un giro decisivo a tu carrera y abrir las puertas a oportunidades emocionantes en el mundo de la tecnología. ¡Pide información ya mismo y transforma tu futuro!
👉 Descubre más del Desarrollo Web Full Stack Bootcamp ¡Descarga el temario!
👉 Prueba el Bootcamp Gratis por una Semana ¡Empieza ahora mismo!
👉 Conoce nuestros otros Bootcamps en Programación y Tecnología
¡CONVOCATORIA ABIERTA!
Desarrollo Web
Full Stack Bootcamp
Clases en Directo | Profesores en Activo | Temario 100% actualizado | {
"url": "https://keepcoding.io/blog/errores-de-instalacion-de-python/",
"source_domain": "keepcoding.io",
"snapshot_id": "CC-MAIN-2024-10",
"warc_metadata": {
"Content-Length": "282171",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:XOSEBD3EYJFVRG3HTQEJGS3JQTLBT2GL",
"WARC-Concurrent-To": "<urn:uuid:ec5ada64-f90e-459d-9558-b11d7a9f9570>",
"WARC-Date": "2024-03-03T09:27:55Z",
"WARC-IP-Address": "172.66.43.120",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:MEWIQ7KB4KBUH4PTNGMNQ73E5RNHHBHZ",
"WARC-Record-ID": "<urn:uuid:a71b38ff-1e1e-457e-802d-076fa3465334>",
"WARC-Target-URI": "https://keepcoding.io/blog/errores-de-instalacion-de-python/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ac2113bc-64b6-4c87-b520-4e246bd94c54>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-169\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,
45,
46,
131,
153,
154,
191,
192,
211,
212,
660,
661,
723,
724,
946,
947,
977,
978,
1259,
1260,
1352,
1353,
1418,
1459,
1550,
1666,
1773,
1774,
1802,
1803,
2016,
2017,
2267,
2268,
2307,
2308,
2534,
2535,
2709,
2710,
2739,
2740,
2766,
2767,
2989,
2990,
3133,
3134,
3243,
3244,
3256,
3257,
3333,
3334,
3393,
3394,
3692,
3693,
4019,
4020,
4484,
4485,
4561,
4562,
4627,
4628,
4691,
4692,
4715,
4716,
4731,
4732,
4752,
4753
],
"line_end_idx": [
45,
46,
131,
153,
154,
191,
192,
211,
212,
660,
661,
723,
724,
946,
947,
977,
978,
1259,
1260,
1352,
1353,
1418,
1459,
1550,
1666,
1773,
1774,
1802,
1803,
2016,
2017,
2267,
2268,
2307,
2308,
2534,
2535,
2709,
2710,
2739,
2740,
2766,
2767,
2989,
2990,
3133,
3134,
3243,
3244,
3256,
3257,
3333,
3334,
3393,
3394,
3692,
3693,
4019,
4020,
4484,
4485,
4561,
4562,
4627,
4628,
4691,
4692,
4715,
4716,
4731,
4732,
4752,
4753,
4820
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4820,
"ccnet_original_nlines": 73,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.0740305483341217,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.00587543984875083,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13513514399528503,
"rps_doc_frac_unique_words": 0.41689008474349976,
"rps_doc_mean_word_length": 5.3632707595825195,
"rps_doc_num_sentences": 45,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.024300575256348,
"rps_doc_word_count": 746,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.10747312754392624,
"rps_doc_frac_chars_dupe_6grams": 0.06398399919271469,
"rps_doc_frac_chars_dupe_7grams": 0.022494379431009293,
"rps_doc_frac_chars_dupe_8grams": 0.022494379431009293,
"rps_doc_frac_chars_dupe_9grams": 0.022494379431009293,
"rps_doc_frac_chars_top_2gram": 0.0339915007352829,
"rps_doc_frac_chars_top_3gram": 0.04998749867081642,
"rps_doc_frac_chars_top_4gram": 0.045988500118255615,
"rps_doc_books_importance": -327.836181640625,
"rps_doc_books_importance_length_correction": -327.836181640625,
"rps_doc_openwebtext_importance": -205.72738647460938,
"rps_doc_openwebtext_importance_length_correction": -205.72738647460938,
"rps_doc_wikipedia_importance": -119.87440490722656,
"rps_doc_wikipedia_importance_length_correction": -119.87440490722656
},
"fasttext": {
"dclm": 0.9894870519638062,
"english": 0.0007488700211979449,
"fineweb_edu_approx": 1.2402738332748413,
"eai_general_math": 0.00034498999593779445,
"eai_open_web_math": 0.4723849892616272,
"eai_web_code": 0.566550076007843
}
} | {
"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": "378.166",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Education, Higher and Universities and colleges"
}
}
},
"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": "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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
1,715,940,505,735,463,700 |
Wat is het verschil tussen Zend Framework 1 en 2
De grootste verschil tussen Zend Framework 1 en 2 is dat Zend 1 is een open source PHP framework dat compatibel is met PHP 5 terwijl Zend 2 een open source PHP framework is dat compatibel is met PHP 5.3+ met extra functies dan Zend 1 zoals namespace, late static binding, lambda-functies en sluitingen.
Er zijn een aantal frameworks in PHP. Deze frameworks bestaan uit vereiste klassen om webapplicaties te ontwikkelen. Een dergelijk raamwerk is Zend, een open source die het architecturale patroon van Model, View en Controller (MVC) ondersteunt. Het biedt elke PHP-stack en Zend-server om Zend framework-applicaties uit te voeren. Zend 1 en 2 zijn twee versies van het Zend-framework. Zend 1 is niet achterwaarts compatibel met Zend 2 omdat PHP 5.3+ de meeste beschikbare componenten opnieuw beschrijft.
Key Areas Covered
1. Wat is Zend Framework 1
- Definitie, functionaliteit
2. Wat is Zend Framework 2
- Definitie, functionaliteit
3. Wat is het verschil tussen Zend Framework 1 en 2
- Vergelijking van belangrijke verschillen
Sleutelbegrippen
Zend Framework 1, Zend Framework 2
Wat is Zend Framework 1
Zend framework 1 is een open source framework dat gebruik maakt van PHP 5. Het implementeert 100% object-georiënteerde code. Het heeft een componentstructuur en volgt een losjes gekoppelde architectuur. Daarom kunnen de programmeurs de componenten afzonderlijk in hun toepassingen gebruiken. Het wordt ook wel 'use at will'-ontwerp genoemd. Er zijn verschillende componenten beschikbaar in de standaardbibliotheek die kunnen worden gebruikt om een krachtige en uitbreidbare webtoepassing te ontwikkelen. Zend 1 biedt een aantal functies, waaronder database-abstractie en formuliercomponenten. Verder zijn er Zend_Auth en Zend Acl voor gebruikersauthenticatie en autorisatie.
Wat is Zend Framework 2
Zend framework 2 is een framework dat PHP 5.3+ gebruikt. Het ondersteunt objectoriëntatie en bestaat uit functies zoals naamruimten, late statische binding, lambda-functies en sluitingen. Bovendien volgt het SOLID objectgericht ontwerpprincipe. Hoewel Zend-technologieën dit raamwerk hebben ontwikkeld, hebben andere bedrijven zoals Google, Microsoft en StrickIron ook ondersteuning geboden om het te verbeteren. Verder zijn er wereldwijd veel bijdragers die Zend 2 ondersteunen.Bovendien volgt Zend framework 2 een unieke componentstructuur. Elke component heeft weinig afhankelijkheden van andere componenten. Dus, de ontwikkelaars kunnen deze componenten gemakkelijk gebruiken zoals ze willen. Het biedt ook database-abstractie, formulierencomponent voor validatie en filtering. Verder zijn er componenten om gebruikersauthenticatie en autorisatie te bieden tegen alle gebruikelijke credential-stores. Daarom kan de programmeur dit onderdeel gebruiken voor hun toepassingen. Bovendien vermindert het de algehele ontwikkelingstijd.
Verschil tussen Zend Framework 1 en 2
Definitie
Zend framework 1 is een open source framework voor het ontwikkelen van webapplicaties en services met PHP 5. Zend Framework 2 daarentegen is een open source framework voor het ontwikkelen van webapplicaties en services met behulp van PHP 5.3+.
Compatibele PHP-versie
Dus, de belangrijksteverschil tussen Zend Framework 1 en 2 is de compatibiliteit van de PHP-versie. Dat is; het Zend-framework 1 is compatibel met PHP 5 terwijl het Zend-framework compatibel is met PHP 5.3 of hoger.
Kenmerken
Zend 2 heeft extra functies dan Zend 1, zoals naamruimte, late statische binding, lambda-functies en sluitingen. Dit is dus een belangrijk verschil tussen Zend Framework 1 en 2.
Type
Bovendien is Zend 1 een oudere versie, terwijl Zend 2 een nieuwere versie is.
Snelheid
Snelheid is ook een groot verschil tussen Zend Framework 1 en 2. Zend 2 is langzamer dan Zend 1 omdat het meer functies op de achtergrond aanroept dan Zend 1.
Grootte van de installatie
Een ander verschil tussen Zend Framework 1 en 2 is dat terwijl de Zend 1-bestandsgrootte 30MB is, de Zend 2-bestandsgrootte ongeveer 2,5MB (Zipped) is.
Conclusie
Het belangrijkste verschil tussen Zend Framework 1 en 2 is dat Zend 1 een open source PHP framework is dat compatibel is met PHP 5 terwijl Zend 2 een open source PHP framework is dat compatibel is met PHP 5.3+ met extra features dan Zend 1 zoals namespace , late statische binding, lambda-functies en sluitingen.
Referentie:
1. "Overzicht" Zend Framework 2 2.4.13dev Documentatie, hier beschikbaar.
2. Zend. "Handleiding - Documentatie." Zend Framework, hier beschikbaar.
Afbeelding met dank aan:
1. "ZendFramework-Logo" door Zend Technologies - (Public Domain) via Commons Wikimedia | {
"url": "https://nl.sawakinome.com/articles/technology/what-is-the-difference-between-zend-framework-1-and-2.html",
"source_domain": "nl.sawakinome.com",
"snapshot_id": "crawl=CC-MAIN-2019-09",
"warc_metadata": {
"Content-Length": "19603",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VV7ZMQLXO37H25SB75NFYFTTTBIICO43",
"WARC-Concurrent-To": "<urn:uuid:3d1d73cb-867f-41ab-ac57-31370d00ef72>",
"WARC-Date": "2019-02-17T06:21:26Z",
"WARC-IP-Address": "104.31.82.217",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:EQTTXZL4OR5VMTOFLARIEVK67C7D6MH7",
"WARC-Record-ID": "<urn:uuid:4292d7d0-aa1a-466b-82fd-b011198f7a60>",
"WARC-Target-URI": "https://nl.sawakinome.com/articles/technology/what-is-the-difference-between-zend-framework-1-and-2.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:57a4db9a-aeb9-4480-9fb3-ef3e3d5237b8>"
},
"warc_info": "isPartOf: CC-MAIN-2019-09\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-156-82-108.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,
1,
50,
51,
354,
355,
860,
861,
879,
880,
907,
941,
968,
1002,
1054,
1102,
1103,
1120,
1121,
1156,
1157,
1181,
1182,
1859,
1860,
1884,
1885,
2919,
2920,
2958,
2959,
2969,
2970,
3215,
3216,
3239,
3240,
3456,
3457,
3467,
3468,
3646,
3647,
3652,
3653,
3731,
3732,
3741,
3742,
3901,
3902,
3929,
3930,
4082,
4083,
4093,
4094,
4407,
4408,
4420,
4421,
4495,
4568,
4569,
4594,
4595
],
"line_end_idx": [
1,
50,
51,
354,
355,
860,
861,
879,
880,
907,
941,
968,
1002,
1054,
1102,
1103,
1120,
1121,
1156,
1157,
1181,
1182,
1859,
1860,
1884,
1885,
2919,
2920,
2958,
2959,
2969,
2970,
3215,
3216,
3239,
3240,
3456,
3457,
3467,
3468,
3646,
3647,
3652,
3653,
3731,
3732,
3741,
3742,
3901,
3902,
3929,
3930,
4082,
4083,
4093,
4094,
4407,
4408,
4420,
4421,
4495,
4568,
4569,
4594,
4595,
4681
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4681,
"ccnet_original_nlines": 65,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.049940548837184906,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.027348389849066734,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2473246157169342,
"rps_doc_frac_unique_words": 0.3348017632961273,
"rps_doc_mean_word_length": 5.610866546630859,
"rps_doc_num_sentences": 57,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.641406536102295,
"rps_doc_word_count": 681,
"rps_doc_frac_chars_dupe_10grams": 0.13478146493434906,
"rps_doc_frac_chars_dupe_5grams": 0.2860507667064667,
"rps_doc_frac_chars_dupe_6grams": 0.24627061188220978,
"rps_doc_frac_chars_dupe_7grams": 0.1886940598487854,
"rps_doc_frac_chars_dupe_8grams": 0.15781208872795105,
"rps_doc_frac_chars_dupe_9grams": 0.1442030966281891,
"rps_doc_frac_chars_top_2gram": 0.07484952360391617,
"rps_doc_frac_chars_top_3gram": 0.05129547044634819,
"rps_doc_frac_chars_top_4gram": 0.04710809141397476,
"rps_doc_books_importance": -386.4835510253906,
"rps_doc_books_importance_length_correction": -386.4835510253906,
"rps_doc_openwebtext_importance": -265.9039306640625,
"rps_doc_openwebtext_importance_length_correction": -265.9039306640625,
"rps_doc_wikipedia_importance": -165.69544982910156,
"rps_doc_wikipedia_importance_length_correction": -165.69544982910156
},
"fasttext": {
"dclm": 0.2590510845184326,
"english": 0.002495859982445836,
"fineweb_edu_approx": 1.2318130731582642,
"eai_general_math": 0.00003338000169605948,
"eai_open_web_math": 0.818756103515625,
"eai_web_code": 0.3786519169807434
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.13324",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "4",
"label": "Missing Images or Figures"
}
},
"document_type_v2": {
"primary": {
"code": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,324,429,489,363,241,000 | My favorite watchOS 10 feature, no one will care
Apple calls watchOS 10 a “milestone update for the Apple Watch”. I’ve been running the pre-release software update for a few days now and I think that describes it aptly. Apple didn’t jettison watchOS as we know it and went back to the drawing board with a completely different idea. Instead, watchOS 10 overhauls built-in apps with a design fit for modern displays and redesigns navigation to include a new widget system.
Designed for the big screens
There’s a lot to like about watchOS 10 for the Apple Watch. Along with the back and forth of which buttons and gestures do what, watchOS is also bouncier and smoother while remaining tastefully understated. There’s just the right amount of playfulness in the subtle way complications momentarily appear when your screen goes from always-on mode to fully active mode. The app grid retains its honeycomb roots, but a fixed width and vertical scrolling bring order to the rebellious chaos that caused many users to prefer the clunky list mode view.
watchOS 10 is also crucial for the introduction of vertical scrolling in the system. This approach matches the software behavior to the hardware movement of the Digital Crown. This is similar to recent versions of watchOS, only this time Apple has combined the sorting organization of horizontal pagination within apps with more information-rich vertical views. The result is full-screen paginated views, often using color to add character and a sense of place.
dealing with mental health
That’s all well and good, but what about the overall utility of watchOS 10? After running watchOS 10 for a few days, I think I’ve settled on my favorite feature. But first, I have to give credit for a feature I already use and hope will be useful: mood and emotion logging. I’ve talked about how the Apple Watch excels at physical health insights on this site, but had no idea when it comes to mental health in 2019:
Two years ago I first wrote about my health and fitness journey with the Apple Watch. The last few years have been eventful (to say the least) so an update is in order. I started 2017 with optimism, faced new challenges in my personal life that turned my world upside down, witnessed the birth of my son and moved to a new house with my family.
My health and fitness journey and experience with running peaked in the spring, then I quit my healthy routines after a difficult summer experience triggered a crippling depression — not the first episode I’ve experienced, but the worst. Much like physical health, mental health has long been difficult for me to deal with for a variety of reasons. […]
Mental health isn’t as easy to monitor as physical health, and neither category has a single suite of best practices that works for everyone. […]
Mental health is just as important as physical health, if not more so. Think of the mind as a muscle, even if the Apple Watch can’t measure its exertion in the same way.
Four years later, there’s an answer on watchOS 10:
Mental health is just as important as physical health, and research shows that thinking about your state of mind can help build emotional awareness and resilience. The Mindfulness app in watchOS 10 allows users to discreetly and conveniently log their current emotions and daily moods. Users can rotate the digital crown to scroll through engaging, multi-dimensional shapes to choose how they’re feeling, what has the greatest impact on them, and to describe how they’re feeling.
In the Health app in iOS 17 and iPadOS 17, users can gain valuable insights into what might be contributing to their state of mind – be it associations or lifestyle factors like sleep or exercise. Additionally, depression and anxiety assessments commonly used in clinics are now easily accessible in the Health app and can help users determine their risk level, connect to resources available in their area, and create a PDF to share with their doctor can share.
Mood and emotion logging has been a great encouragement to me so far. What started out as a Breathe app has now evolved into a more comprehensive app that allows you to log how you’re feeling now and how you’ve been feeling overall in a day. You don’t have to be interested in breathing exercises or thought-provoking images to benefit from the mindfulness app on Apple Watch. I also tried the anxiety and depression test available through the Health app on iPhone and iPad. I take both medications and found that my responses were different than if I hadn’t.
I really love that mental health tools and resources are becoming a part of iOS and watchOS without having to discover and download additional apps. I believe that mood and emotion recording will help me and I am confident that these tools will be of use to anyone who tries them. These updates will help many people.
hot season
Something I suspect people care a lot less about still stands out as it’s something I use every day and watch every hour. It’s not as powerful as mental health, but it’s very important to me. That’s the humidity percentage as a complication of Apple’s Weather app. Seriously. I live on the Gulf Coast where humidity is a better indicator of outdoor comfort than temperature.
It’s always hot in summer and it doesn’t really matter how hot it is. Humidity, on the other hand, is an important indicator of how comfortable or uncomfortable it will be to go outside: I like 90 degrees and 55 percent humidity better than 80 degrees and 85 percent humidity. Humidity has been a data point in Apple Weather for a while, but watchOS 10 is the first release to include a watch face complication for it. Thinking about it as we review things I’ve written over the last decade, here’s from 2018:
Humidity data is included with Carrot Weather ($4.99 + $3.99/year subscription). This might be overkill for my use – just to show the humidity data in the infograph – but I like it. It’s often very humid where I live and 80°C can feel very different depending on how humid it is outside.
Apple’s calendar and weather apps could provide data for these complications, but it’s early days for the Apple Watch Series 4 and Infograph corner complications. I’m glad there are other apps that fill the gaps.
The omission of humidity is actually a bit stranger. Apple presents this data in the iPhone Weather app but not in the Apple Watch Weather app; The only way to check without a third-party app is to use Siri. Air quality and UV index are new in watchOS 5 and present quite a complication, but where I live neither are important variables.
One, two, three, four, five years later… I would say watchOS 10 is indeed a milestone update for the Apple Watch.
FTC: We use income generating auto affiliate links. More. | {
"url": "https://teknojava.com/my-favorite-watchos-10-feature-no-one-will-care/",
"source_domain": "teknojava.com",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "62889",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:6I2YVD2ZBO7M5P2XJX3RJ4ABFXOIGW3A",
"WARC-Concurrent-To": "<urn:uuid:dc3561e1-1a0e-48dd-b477-6e013aa5e62e>",
"WARC-Date": "2023-09-27T09:24:17Z",
"WARC-IP-Address": "172.67.197.156",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:BR2RQDGEBQRQCSXFL5JUHC4EEUPDSEBC",
"WARC-Record-ID": "<urn:uuid:527e1523-4a08-4066-8fb3-67463fd71ca7>",
"WARC-Target-URI": "https://teknojava.com/my-favorite-watchos-10-feature-no-one-will-care/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fd47b591-72fa-43a3-ae13-e796ea7e961c>"
},
"warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-200\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,
49,
50,
473,
474,
503,
504,
1050,
1051,
1513,
1514,
1541,
1542,
1959,
1960,
2305,
2306,
2659,
2660,
2806,
2807,
2977,
2978,
3029,
3030,
3510,
3511,
3974,
3975,
4535,
4536,
4854,
4855,
4866,
4867,
5242,
5243,
5753,
5754,
6042,
6043,
6256,
6257,
6595,
6596,
6710,
6711
],
"line_end_idx": [
49,
50,
473,
474,
503,
504,
1050,
1051,
1513,
1514,
1541,
1542,
1959,
1960,
2305,
2306,
2659,
2660,
2806,
2807,
2977,
2978,
3029,
3030,
3510,
3511,
3974,
3975,
4535,
4536,
4854,
4855,
4866,
4867,
5242,
5243,
5753,
5754,
6042,
6043,
6256,
6257,
6595,
6596,
6710,
6711,
6768
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6768,
"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.44208210706710815,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.022727269679307938,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1334310919046402,
"rps_doc_frac_unique_words": 0.42028987407684326,
"rps_doc_mean_word_length": 4.646206378936768,
"rps_doc_num_sentences": 57,
"rps_doc_symbol_to_word_ratio": 0.002199409995228052,
"rps_doc_unigram_entropy": 5.528254985809326,
"rps_doc_word_count": 1173,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.02568807080388069,
"rps_doc_frac_chars_dupe_6grams": 0.016513759270310402,
"rps_doc_frac_chars_dupe_7grams": 0.016513759270310402,
"rps_doc_frac_chars_dupe_8grams": 0.016513759270310402,
"rps_doc_frac_chars_dupe_9grams": 0.016513759270310402,
"rps_doc_frac_chars_top_2gram": 0.018165139481425285,
"rps_doc_frac_chars_top_3gram": 0.016697250306606293,
"rps_doc_frac_chars_top_4gram": 0.008807339705526829,
"rps_doc_books_importance": -646.8435668945312,
"rps_doc_books_importance_length_correction": -646.8435668945312,
"rps_doc_openwebtext_importance": -357.85894775390625,
"rps_doc_openwebtext_importance_length_correction": -357.85894775390625,
"rps_doc_wikipedia_importance": -258.20904541015625,
"rps_doc_wikipedia_importance_length_correction": -258.20904541015625
},
"fasttext": {
"dclm": 0.025957230478525162,
"english": 0.9480857849121094,
"fineweb_edu_approx": 1.5496485233306885,
"eai_general_math": 0.033380091190338135,
"eai_open_web_math": 0.0887225866317749,
"eai_web_code": 0.01959783025085926
}
} | {
"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": "616.89",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Medicine",
"level_3": "Pathology and Diseases"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "1",
"label": "News/Editorial"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-2,534,053,285,215,007,000 | How to use the follow me tool in Google SketchUp
The “follow me” tool in GoogleSketchUp can make a 2D object 3-dimensional, making it follow a path that you specify. The SketchUp follow me tool allows you to create these objects at various angles. To become a SketchUp pro and learn how to work efficiently in this software it is important to know how to work your way around these various tools.
To learn how to use the follow me tool in Google SketchUp look at the steps given below.
Step # 1 – Create a shape and its path
To understand the workings of this tool, create a rectangle and use the line tool to create a path extending from this shape.
Draw a shape and its path
Step # 2 – Select the “follow me” tool
To select the “follow me” tool go to the “tool” menu and select the “follow me” option.
Choose the “follow me” tool
Step # 3 – Use the “follow me” tool
Now select the “follow me” tool, click on the rectangle and move the cursor along the path. The shape automatically extends till your path.
This is only possible for shapes. If you draw a line and use the “follow me” tool on it, the tool has no effect.
Work with the “follow me” tool
Step # 4 – Make a circle and its path in the same direction
Make a circle and a path from it; however in this path, the “follow me” tool does not work. This is because the line that is made is on the same axis as the circle.
Draw a circle and its path in the same direction
Step # 5 – Make a path with a different direction
Make another path which is not in the same direction as the shape itself. The “follow me” tool will now extrude the shape.
Create a path in a different direction
Step # 6 – Alter the size of the shape
Once you have made the shape and you feel like increasing the length of the shape, then the “follow me” tool does not work, the “Push/Pull” tool can be used instead. The length of it can be shortened though, even the remaining path that you did not cover can be deleted by selecting it and pressing the “delete” option. Both the “follow me” and the “Push/Pull” tool in GoogleSketchUp cannot extrude a circular surface as shown by the message that pops up once you hover above the object.
Learning about these tools allows you to become a SketchUp pro and enables you to work more efficiently on your drawings.
Change the size of the shape | {
"url": "https://howtech.tv/graphics/how-to-use-the-follow-me-tool-in-google-sketchup/",
"source_domain": "howtech.tv",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "24427",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:L2RQMUQL7QH2NEKJAPOBCVRVGBW772N3",
"WARC-Concurrent-To": "<urn:uuid:4ebb2b0e-92e2-4332-8e18-b1a65c079b89>",
"WARC-Date": "2019-08-19T10:17:24Z",
"WARC-IP-Address": "142.93.189.21",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HYG6RZF2I6PHOES62GDFFBQ4RJADVIWB",
"WARC-Record-ID": "<urn:uuid:e9b0eef1-ddac-4a16-b176-f6dfb16fc2da>",
"WARC-Target-URI": "https://howtech.tv/graphics/how-to-use-the-follow-me-tool-in-google-sketchup/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8128101b-dedd-47bb-ae08-33f8c2baf9c6>"
},
"warc_info": "isPartOf: CC-MAIN-2019-35\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-10.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
49,
50,
398,
487,
488,
489,
528,
529,
655,
656,
682,
683,
722,
723,
811,
812,
840,
841,
877,
878,
1018,
1131,
1132,
1163,
1164,
1224,
1225,
1390,
1391,
1440,
1441,
1491,
1492,
1615,
1616,
1655,
1656,
1695,
1696,
2184,
2306,
2307
],
"line_end_idx": [
49,
50,
398,
487,
488,
489,
528,
529,
655,
656,
682,
683,
722,
723,
811,
812,
840,
841,
877,
878,
1018,
1131,
1132,
1163,
1164,
1224,
1225,
1390,
1391,
1440,
1441,
1491,
1492,
1615,
1616,
1655,
1656,
1695,
1696,
2184,
2306,
2307,
2335
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2335,
"ccnet_original_nlines": 42,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4582524299621582,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0019417499424889684,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1611650437116623,
"rps_doc_frac_unique_words": 0.33710408210754395,
"rps_doc_mean_word_length": 4.144796371459961,
"rps_doc_num_sentences": 19,
"rps_doc_symbol_to_word_ratio": 0.011650489643216133,
"rps_doc_unigram_entropy": 4.375811576843262,
"rps_doc_word_count": 442,
"rps_doc_frac_chars_dupe_10grams": 0.042576421052217484,
"rps_doc_frac_chars_dupe_5grams": 0.25491267442703247,
"rps_doc_frac_chars_dupe_6grams": 0.13646288216114044,
"rps_doc_frac_chars_dupe_7grams": 0.11135371029376984,
"rps_doc_frac_chars_dupe_8grams": 0.08078602701425552,
"rps_doc_frac_chars_dupe_9grams": 0.08078602701425552,
"rps_doc_frac_chars_top_2gram": 0.07096070051193237,
"rps_doc_frac_chars_top_3gram": 0.09224890917539597,
"rps_doc_frac_chars_top_4gram": 0.10207424312829971,
"rps_doc_books_importance": -233.2746124267578,
"rps_doc_books_importance_length_correction": -233.2746124267578,
"rps_doc_openwebtext_importance": -136.78079223632812,
"rps_doc_openwebtext_importance_length_correction": -136.78079223632812,
"rps_doc_wikipedia_importance": -109.85980987548828,
"rps_doc_wikipedia_importance_length_correction": -109.85980987548828
},
"fasttext": {
"dclm": 0.11548417806625366,
"english": 0.9123712182044983,
"fineweb_edu_approx": 3.1556131839752197,
"eai_general_math": 0.9007654786109924,
"eai_open_web_math": 0.2507607936859131,
"eai_web_code": 0.6059523820877075
}
} | {
"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": "691.00285",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Building",
"level_3": "Building materials"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "4",
"label": "Missing Images or Figures"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-9,053,451,997,469,829,000 | Personal tools
Haskell Quiz/Housie/Solution Dolio
From HaskellWiki
Jump to: navigation, search
This solution uses a two pronged approach to the problem. Naively generating and testing books is too slow. However, if one looks only at whether spaces are empty or filled, the search space is sufficiently small to generate random candidates and search for a valid result among them. This search results in a template for the book, which can then be filled in (with some additional constraint checking) to get the final result.
Since the algorithm involves randomly guessing candidate results, it's possible for it to take a very long time. However, in practice, results usually appear in a matter of seconds.
This code makes use of the random monad.
module Main where
import Control.Monad
import Data.List
import MonadRandom
-- Some handy datatypes and aliases
type Card a = [[a]]
type Book a = [Card a]
data Slot = Filled | Vacant deriving (Eq)
-- Some general functions
combinations :: [a] -> [a] -> [[a]]
combinations xs [] = [xs]
combinations [] ys = [ys]
combinations (x:xs) (y:ys) = map (x:) (combinations xs (y:ys))
++ map (y:) (combinations (x:xs) ys)
splitAtM :: MonadPlus m => Int -> [a] -> m ([a], [a])
splitAtM _ [] = mzero
splitAtM n xs = return $ splitAt n xs
select :: MonadRandom m => [a] -> m (a, [a])
select xs = do i <- getRandomR (0, length xs - 1)
let (f, x:l) = splitAt i xs
return (x, f ++ l)
stream :: MonadRandom m => [a] -> m [a]
stream rs = map (rs !!) `liftM` getRandomRs (0, length rs - 1)
slice :: Int -> [a] -> [[a]]
slice n x@(_:tx) = take n x : slice n tx
-- Some problem-specific functions
rowTemplates :: [[Slot]]
rowTemplates = combinations (replicate 5 Filled) (replicate 4 Vacant)
bounds :: [(Int, Int)]
bounds = zip (1: [10, 20 .. 80]) ([9, 19 .. 79] ++ [90])
validateCol :: [Int] -> Bool
validateCol c = nc == (nub . sort $ nc)
where nc = filter (> 0) c
-- For creating an entire book
bookTemplates :: MonadRandom m => [[Slot]] -> m [[[Slot]]]
bookTemplates rs = (filter validateBookTemplate . slice 18) `liftM` stream rs
validateBookTemplate :: [[Slot]] -> Bool
validateBookTemplate b = and $ zipWith (==) fls bls
where
fls = map (length . filter (== Filled)) . transpose $ b
bls = map (length . uncurry enumFromTo) bounds
fillBook :: MonadRandom m => [[Slot]] -> m (Book Int)
fillBook bt = liftM (unfoldr (splitAtM 3) . transpose)
. mapM fill . zip bounds . transpose $ bt
where
fill (b,c) = do c' <- f (uncurry enumFromTo b) c
if all validateCol (unfoldr (splitAtM 3) c')
then return c'
else fill (b, c)
f _ [] = return []
f b (Vacant:xs) = liftM (0:) (f b xs)
f b (Filled:xs) = do (r, b') <- select b
liftM (r:) (f b' xs)
-- For output
intercalate s = concat . intersperse s
showCard = unlines . map (intercalate "|") . map (map showN)
where
showN n
| n == 0 = " "
| n < 10 = " " ++ show n
| otherwise = show n
showBook = intercalate "\n" . map showCard
main = bookTemplates rowTemplates >>= fillBook . head
>>= putStrLn . showBook | {
"url": "http://www.haskell.org/haskellwiki/index.php?title=Haskell_Quiz/Housie/Solution_Dolio&redirect=no",
"source_domain": "www.haskell.org",
"snapshot_id": "crawl=CC-MAIN-2014-10",
"warc_metadata": {
"Content-Length": "28784",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BYSTL2KZ37B4YL33UAAP2ABMEKIJXWZI",
"WARC-Concurrent-To": "<urn:uuid:acf4d909-5fed-46da-9618-aa7d0411e407>",
"WARC-Date": "2014-03-14T06:33:40Z",
"WARC-IP-Address": "88.198.224.243",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:GG2SCN6TOQK4VNHVDTGFDU7DURQEYHMR",
"WARC-Record-ID": "<urn:uuid:1bf63b1d-62bc-4ee4-8751-393a82aa1417>",
"WARC-Target-URI": "http://www.haskell.org/haskellwiki/index.php?title=Haskell_Quiz/Housie/Solution_Dolio&redirect=no",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bdc5d985-b7dc-4ca7-afef-8695a2e51677>"
},
"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,
15,
16,
51,
52,
69,
70,
98,
99,
100,
529,
530,
712,
713,
754,
755,
773,
775,
796,
813,
815,
834,
836,
872,
892,
915,
917,
959,
961,
987,
1023,
1049,
1075,
1138,
1202,
1204,
1258,
1280,
1318,
1320,
1365,
1415,
1458,
1492,
1494,
1534,
1597,
1599,
1628,
1669,
1671,
1706,
1731,
1801,
1803,
1826,
1883,
1885,
1914,
1954,
1981,
1983,
2014,
2073,
2151,
2153,
2194,
2246,
2253,
2310,
2358,
2360,
2414,
2469,
2527,
2534,
2584,
2646,
2681,
2718,
2747,
2786,
2828,
2871,
2873,
2887,
2926,
2928,
2989,
2996,
3005,
3028,
3060,
3085,
3087,
3130,
3132,
3186
],
"line_end_idx": [
15,
16,
51,
52,
69,
70,
98,
99,
100,
529,
530,
712,
713,
754,
755,
773,
775,
796,
813,
815,
834,
836,
872,
892,
915,
917,
959,
961,
987,
1023,
1049,
1075,
1138,
1202,
1204,
1258,
1280,
1318,
1320,
1365,
1415,
1458,
1492,
1494,
1534,
1597,
1599,
1628,
1669,
1671,
1706,
1731,
1801,
1803,
1826,
1883,
1885,
1914,
1954,
1981,
1983,
2014,
2073,
2151,
2153,
2194,
2246,
2253,
2310,
2358,
2360,
2414,
2469,
2527,
2534,
2584,
2646,
2681,
2718,
2747,
2786,
2828,
2871,
2873,
2887,
2926,
2928,
2989,
2996,
3005,
3028,
3060,
3085,
3087,
3130,
3132,
3186,
3221
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3221,
"ccnet_original_nlines": 97,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.21087533235549927,
"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.42970821261405945,
"rps_doc_frac_unique_words": 0.4610091745853424,
"rps_doc_mean_word_length": 4.612385272979736,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.950466632843018,
"rps_doc_word_count": 436,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01491795014590025,
"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.005967179778963327,
"rps_doc_frac_chars_top_3gram": 0.004475390072911978,
"rps_doc_frac_chars_top_4gram": 0.0039781201630830765,
"rps_doc_books_importance": -321.02081298828125,
"rps_doc_books_importance_length_correction": -321.02081298828125,
"rps_doc_openwebtext_importance": -151.29217529296875,
"rps_doc_openwebtext_importance_length_correction": -151.29217529296875,
"rps_doc_wikipedia_importance": -97.28507232666016,
"rps_doc_wikipedia_importance_length_correction": -97.28507232666016
},
"fasttext": {
"dclm": 0.6202176213264465,
"english": 0.7356351613998413,
"fineweb_edu_approx": 3.2789065837860107,
"eai_general_math": 0.8634242415428162,
"eai_open_web_math": 0.5867764949798584,
"eai_web_code": 0.2638888955116272
}
} | {
"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.3",
"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": "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": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-517,344,848,543,320,640 | In particle animation, where did the Vect setting go?
Hi Everyone,
What I’m trying to do is to create an interesting video background using nothing but particles, I set up a single plane emitting particles and then two field objects effecting the particle 1 wind and 1 vortex. The problem I’m running into is that when changing the shape of the particles by using the object particle type, the particles no longer face the vector as the they do with the ‘line’ setting. the physics tab seems to only orient the particle based on emission, the ‘dynamic’ button even when turned on only rotates them slightly in odd directions. I’ve tried rotate the object used as particles. I searched all over the internet and the only solution I found was the ‘Vect’ button, that is no longer in the current versions of blender. I am using version 2.49. Is there a good replacement for the ‘vect’ function?
Any help is appreciated.
• Sam
I figured it out, sorry for the extra thread
Hi ! I was also looking for this answer… I can’t find the “vector” button anywhere, and it’s necessary for the look I’m trying to achieve based on a tutorial I’m following.
soooo what was the solution you figured out?
Thanks!
Also forgot to ask… In the tutorial that I’m doing, the emitter is a circle with 6 vertices.
I can’t seem to figure out how to get all six vertices to emit as in the tutorial. The idea is to get a symmetrical shape where all 6 vertices emit particles as lines or points . In the Tut, using mostly default settings (from 2.41) just giving the particles velocity from the normals seems to give a nice stream of particles from all 6, mine does what appears to be 99% of the particles coming from one vertex.
Is there a setting in 2.49 that makes all vertices emit simultaneously?
Thanks! | {
"url": "https://blenderartists.org/t/in-particle-animation-where-did-the-vect-setting-go/471775",
"source_domain": "blenderartists.org",
"snapshot_id": "CC-MAIN-2023-06",
"warc_metadata": {
"Content-Length": "30866",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UI77QAOTK4B5NVLFZ2JKPE6O6B5VKCCV",
"WARC-Concurrent-To": "<urn:uuid:30ff606a-e5ec-48e9-aae5-cdd637a70102>",
"WARC-Date": "2023-02-03T00:30:36Z",
"WARC-IP-Address": "104.21.51.156",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:XVX7XO2IM7HUDTKSKUTB77PECYETMYMD",
"WARC-Record-ID": "<urn:uuid:012fc795-891c-4efc-a7b9-d6891b9e5911>",
"WARC-Target-URI": "https://blenderartists.org/t/in-particle-animation-where-did-the-vect-setting-go/471775",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c92896e4-e2c8-4d65-82ba-c3064c31f5cc>"
},
"warc_info": "isPartOf: CC-MAIN-2023-06\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January/February 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-96\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,
54,
55,
68,
69,
894,
895,
920,
921,
929,
930,
975,
976,
1149,
1150,
1195,
1196,
1204,
1205,
1298,
1299,
1711,
1712,
1784,
1785
],
"line_end_idx": [
54,
55,
68,
69,
894,
895,
920,
921,
929,
930,
975,
976,
1149,
1150,
1195,
1196,
1204,
1205,
1298,
1299,
1711,
1712,
1784,
1785,
1792
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1792,
"ccnet_original_nlines": 24,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.44102564454078674,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03589744120836258,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1794871836900711,
"rps_doc_frac_unique_words": 0.5295950174331665,
"rps_doc_mean_word_length": 4.423676013946533,
"rps_doc_num_sentences": 22,
"rps_doc_symbol_to_word_ratio": 0.005128209944814444,
"rps_doc_unigram_entropy": 4.704222679138184,
"rps_doc_word_count": 321,
"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.0338028185069561,
"rps_doc_frac_chars_top_3gram": 0.015492959879338741,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -158.43922424316406,
"rps_doc_books_importance_length_correction": -153.0211639404297,
"rps_doc_openwebtext_importance": -117.1067123413086,
"rps_doc_openwebtext_importance_length_correction": -117.1067123413086,
"rps_doc_wikipedia_importance": -80.06825256347656,
"rps_doc_wikipedia_importance_length_correction": -79.41301727294922
},
"fasttext": {
"dclm": 0.364169180393219,
"english": 0.9433045983314514,
"fineweb_edu_approx": 1.7294623851776123,
"eai_general_math": 0.9927994608879089,
"eai_open_web_math": 0.2986205220222473,
"eai_web_code": 0.49758315086364746
}
} | {
"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": "006.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Cognitive science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,120,775,428,812,130,300 | Search Results - VBForums
Search:
Type: Posts; User: NickThissen
Page 1 of 13 1 2 3 4
Search: Search took 0.09 seconds.
1. Re: [Extension] Set control properties across threads
I'm not sure so quickly what is happening but it seems like a rather complicated mess. My extensions were mainly used to access a simple property without having to worry about cross-thread issues,...
2. Re: Shape Editor, including many shapes, Resize and more
Rotation of shapes is not supported. You could however create a new shape that has a Rotation property, and draw your rotated rectangle accordingly inside the current bounds. That would require a...
3. Replies
13
Views
1,295
VS 2010 Re: Show NUD with Inches mark
If you override the OnValidating method you can get a little closer. Check if the Text ends with the unit character in the OnValidating method, and if it does you trim it out. Now, if you tab out of...
4. Replies
58
Views
41,659
Re: [Ready] Visual Studio 2010 Menu/ToolStrip
You set it when you want to change to happen. Most likely when your form loads: so in the Form_Loaded event for example.
5. Replies
58
Views
41,659
Re: [Ready] Visual Studio 2010 Menu/ToolStrip
Probably this is enough:
toolstrip.Renderer.RoundedEdges = False
(where 'toolstrip' is your Vs2010ToolStripRenderer).
6. Replies
58
Views
41,659
Re: [Ready] Visual Studio 2010 Menu/ToolStrip
For the squared off edges, you can probably simply set the RoundedEdges property of the Vs2010ToolStripRenderer to False. If that doesn't help, then I'm probably drawing those edges myself and you'd...
7. Re: Line Control - Resizable/Movable at Runtime
A line control would typically consist of just two control points. My shape editor is not flexible enough for that unfortunately, all its shapes have four control points on a rectangular boundary....
8. [WPF] ListView losing GridView display when applying custom ItemContainerStyle
Hi,
I have a ListView with its View set to a GridView, with some GridViewColumns defined. Basically I want it to look like a normal ListView on windows 7.
Unfortunately, even on windows 7...
9. Replies
33
Views
20,245
Re: [WIP] Double TrackBar
I did not add vertical orientation. I was planning to do that but I didn't need it so it wasn't a priority. It shouldn't be too hard though, you'll basically have to take a look at the code that...
10. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
Well, if the normal ContextMenuStrip doesn't behave as you want either then the problem is not my CustomContextMenuStrip. Perhaps you'd be better off posting the problem in the regular forum where...
11. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
That's not really the normal way to show a contextmenustrip, usually you use assign it to the ContextMenuStrip property of the control you want it to show for, and it will show on a right-click.
...
12. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
I doubt it has something to do with my custom ContextMenuStrip, because all it does is set the Renderer property. Try replacing it with a regular ContextMenuStrip and see if that does the same thing?
13. Replies
1
Views
453
VS 2010 Struggling with jQuery in grid
Hi,
I have a grid in which the last column displays a (usually large) piece of text (a description of the item). What I'm trying to do is quite simple: instead of showing this large piece of text...
14. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
I'm not sure, if you drag an AppearanceControl to your form (in design-time) and then press the [...] button in the property grid for the CustomAppearance property, the editor as shown in the third...
15. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
So you are trying to use the frmAppearanceEditor form manually, for your own use? Why? That form is used by the AppearanceControl when you open the Custom appearance property, it shows the preview...
16. Re: 100% Customizable MenuStrip / ToolStrip / StatusStrip, including common presets
Most likely you don't have a reference to System.Drawing, which includes the System.Drawing.Drawing2D namespace in which the Color type exists. You mention a Class Library project which indeed by...
17. VS 2010 Re: Registering custom / user controls problem
Hmmm that might work... I'll try that.
18. VS 2010 Re: Registering custom / user controls problem
sapator: tried that, didn't work, same result.
Gep: also tried LoadControl, same result again.
It seems to be impossible :(
The reason I want it like this is because BaseControl is a...
19. VS 2010 Registering custom / user controls problem
Hi,
I have a WebUserControl, let's call it "BaseControl.ascx" that acts as a base control for a custom control (a class that inherits BaseControl). Inside BaseControl I have a couple of regular...
20. Re: Installed new SSD - old HDD giving problems
Here's an update:
I've been switching around the cables (swapped cables between HDD 1 and 2) and ports (swapped between 1 and 2), used new cables for HDD1 and HDD2, nothing helps, the same problem...
21. Re: [Adobe PhotoShop CS5 Extended Version 12] - Transparent Color
BMP doesn't support transparent colors. An application typically uses 1 color after which it turns every pixel of that color 'transparent'. Don't think that has anything to do with the image format...
22. Re: Installed new SSD - old HDD giving problems
Hmm Ill have to check that tomorrow evening, I cannot see any jumpers without taking it out and ill have to take out some other stuff before I can take out this drive... is there no way to check the...
23. Installed new SSD - old HDD giving problems
Hi,
I have recently bought a SSD and installed it today. It works fine, but now it seems one of my other regular HDDs is giving me problems. Let me explain.
The situation before the SSD:
HDD 1...
24. Replies
4
Views
377
Re: Using a delegate
You could associate an Action with each CheckBox, and Invoke the Actions associated with the checked checkboxes. How you do this association is up to you, you could have a Dictionary(Of CheckBox,...
25. Secure communication between app and webservice
Hi,
I am building an Android app that users can use to read (and maybe later post on) a forum for a particular website. Since the forum has no API to communicate with it whatsoever (it seems to be...
26. VS 2010 Re: Webservice needs to return a large string
Again, really useful... Thanks!! Is it just for WCF though or can I test the "regular" asmx file webservices too? I really don't have a clue what the difference is actually :/
27. VS 2010 Re: Webservice needs to return a large string
That seems really useful, thanks.
28. VS 2010 Re: Webservice needs to return a large string
Thanks, but I already tried that too.
I just saw what I'm doing wrong... Seems stupid but it doesn't seem to be explained anywhere lol. I was trying to edit the web.config of the webservice....
29. VS 2010 Webservice needs to return a large string
Hi,
I am building a webservice that reads some HTML source code from a website and sends it back to the client. The service however is failing to send the data because it is too large. I keep...
30. Replies
15
Views
5,933
VS 2010 Re: Custom controls not showing up in toolbox
Nope! Tried a few more things, failed and gave up. Started from scratch in WPF.
31. Replies
58
Views
41,659
Re: [Ready] Visual Studio 2010 Menu/ToolStrip
Read the 'Usage' part of the first post again. For VS2008 or higher all you need to do is copy the files you downloaded to whatever location (for example your VS20xx Projects folder). Then in the...
32. Replies
58
Views
41,659
Re: [Ready] Visual Studio 2010 Menu/ToolStrip
What are the errors?
33. Re: The "What do you think of how my app looks" thread
In my case it's quite simple. I just have (in a separate project) a Plugin abstract class with some properties that the inheritor has to implement, like the title of the window and a Content property...
34. Re: The "What do you think of how my app looks" thread
The colors are the same as in the sim, so people know what they mean. As for the font sizes, you typically won't care about the drivers that far away from you, only those close to you. That's why I...
35. Re: The "What do you think of how my app looks" thread
Here's my latest work, still a work in progress but I think it's coming along nicely :)
http://www.nickthissen.nl/Images/Persistent/tmp5B65.png
It's a 'black box' application for a racing sim,...
36. Re: Move and Resize a Control or a Borderless Form - using window messages (smooth!)
It doesn't need a panel, you can just as well call my MoveForm code in the MouseClick of the Form itself. A Panel is just a neat example because that's a typical way to mimic a titlebar (you usually...
37. Re: Move and Resize a Control or a Borderless Form - using window messages (smooth!)
It comes down to the same thing in the end. Why is it simpler? It's more code and harder to understand imo.
38. Re: Custom VisualStudio2008 style MenuStrip and ToolStrip Renderer
I have not done a Windows 7 theme in winforms. I have got a pretty decent one in WPF though. If you can use WPF then I could try to tidy it up a bit and post it.
39. Re: Custom VisualStudio2008 style MenuStrip and ToolStrip Renderer
I think you control the size via the size of the icons actually. I've done this several times but I can remember I'm always struggling with it, trying various things until it just suddenly becomes...
40. Re: [.NET 2.0+] Visual Studios "My Project" Tab Control (Updated! 12/9/2009)
JB, you can stop a property from being serialized to the designer by adding a function ShouldSerialize<property> and return false. The designer will look for this property (and assume true if it...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4
Featured
Click Here to Expand Forum to Full Width
Survey posted by VBForums. | {
"url": "http://www.vbforums.com/search.php?s=b209685adb57721b993a6bb31c8842ad&searchid=7039919",
"source_domain": "www.vbforums.com",
"snapshot_id": "crawl=CC-MAIN-2015-18",
"warc_metadata": {
"Content-Length": "101263",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SHJNA4XBQCCYTIAMGQQOUXXGH2FPMHGR",
"WARC-Concurrent-To": "<urn:uuid:9b9e699e-86fa-40b4-9244-a57d8dffb2df>",
"WARC-Date": "2015-04-21T01:29:04Z",
"WARC-IP-Address": "70.42.23.121",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:LZSFIDVER277I47TUQNTNYT6FGGHSDAU",
"WARC-Record-ID": "<urn:uuid:fd1844e5-98f8-4724-b845-a7f5039ab18a>",
"WARC-Target-URI": "http://www.vbforums.com/search.php?s=b209685adb57721b993a6bb31c8842ad&searchid=7039919",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:535e76f1-d427-477c-8319-d50438dfa11c>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-235-10-82.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-18\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
26,
27,
35,
36,
67,
68,
89,
90,
124,
125,
184,
185,
389,
451,
452,
655,
668,
675,
685,
695,
696,
738,
739,
945,
958,
965,
975,
986,
987,
1037,
1038,
1163,
1176,
1183,
1193,
1204,
1205,
1255,
1256,
1285,
1286,
1330,
1387,
1400,
1407,
1417,
1428,
1429,
1479,
1480,
1686,
1739,
1740,
1944,
2028,
2029,
2037,
2038,
2193,
2233,
2246,
2253,
2263,
2274,
2275,
2305,
2306,
2508,
2598,
2599,
2803,
2893,
2894,
3093,
3101,
3191,
3192,
3396,
3410,
3416,
3426,
3434,
3435,
3478,
3479,
3487,
3488,
3687,
3777,
3778,
3983,
4073,
4074,
4278,
4368,
4369,
4572,
4633,
4634,
4677,
4738,
4739,
4790,
4791,
4843,
4844,
4877,
4878,
4944,
5001,
5002,
5010,
5011,
5208,
5262,
5263,
5285,
5286,
5472,
5544,
5545,
5750,
5804,
5805,
6011,
6061,
6062,
6070,
6071,
6228,
6229,
6263,
6276,
6290,
6296,
6306,
6314,
6315,
6340,
6341,
6544,
6598,
6599,
6607,
6608,
6808,
6868,
6869,
7049,
7109,
7110,
7148,
7208,
7209,
7251,
7252,
7253,
7413,
7469,
7470,
7478,
7479,
7674,
7688,
7695,
7705,
7715,
7716,
7774,
7775,
7859,
7873,
7880,
7890,
7901,
7902,
7952,
7953,
8156,
8170,
8177,
8187,
8198,
8199,
8249,
8250,
8275,
8336,
8337,
8544,
8605,
8606,
8811,
8872,
8873,
8965,
8966,
9026,
9027,
9083,
9174,
9175,
9381,
9472,
9473,
9585,
9658,
9659,
9825,
9898,
9899,
10103,
10186,
10187,
10389,
10412,
10433,
10434,
10435,
10436,
10445,
10446,
10447,
10488,
10489
],
"line_end_idx": [
26,
27,
35,
36,
67,
68,
89,
90,
124,
125,
184,
185,
389,
451,
452,
655,
668,
675,
685,
695,
696,
738,
739,
945,
958,
965,
975,
986,
987,
1037,
1038,
1163,
1176,
1183,
1193,
1204,
1205,
1255,
1256,
1285,
1286,
1330,
1387,
1400,
1407,
1417,
1428,
1429,
1479,
1480,
1686,
1739,
1740,
1944,
2028,
2029,
2037,
2038,
2193,
2233,
2246,
2253,
2263,
2274,
2275,
2305,
2306,
2508,
2598,
2599,
2803,
2893,
2894,
3093,
3101,
3191,
3192,
3396,
3410,
3416,
3426,
3434,
3435,
3478,
3479,
3487,
3488,
3687,
3777,
3778,
3983,
4073,
4074,
4278,
4368,
4369,
4572,
4633,
4634,
4677,
4738,
4739,
4790,
4791,
4843,
4844,
4877,
4878,
4944,
5001,
5002,
5010,
5011,
5208,
5262,
5263,
5285,
5286,
5472,
5544,
5545,
5750,
5804,
5805,
6011,
6061,
6062,
6070,
6071,
6228,
6229,
6263,
6276,
6290,
6296,
6306,
6314,
6315,
6340,
6341,
6544,
6598,
6599,
6607,
6608,
6808,
6868,
6869,
7049,
7109,
7110,
7148,
7208,
7209,
7251,
7252,
7253,
7413,
7469,
7470,
7478,
7479,
7674,
7688,
7695,
7705,
7715,
7716,
7774,
7775,
7859,
7873,
7880,
7890,
7901,
7902,
7952,
7953,
8156,
8170,
8177,
8187,
8198,
8199,
8249,
8250,
8275,
8336,
8337,
8544,
8605,
8606,
8811,
8872,
8873,
8965,
8966,
9026,
9027,
9083,
9174,
9175,
9381,
9472,
9473,
9585,
9658,
9659,
9825,
9898,
9899,
10103,
10186,
10187,
10389,
10412,
10433,
10434,
10435,
10436,
10445,
10446,
10447,
10488,
10489,
10515
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 10515,
"ccnet_original_nlines": 225,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3694150149822235,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03500691056251526,
"rps_doc_frac_lines_end_with_ellipsis": 0.13274335861206055,
"rps_doc_frac_no_alph_words": 0.2427452802658081,
"rps_doc_frac_unique_words": 0.35853514075279236,
"rps_doc_mean_word_length": 4.572356700897217,
"rps_doc_num_sentences": 150,
"rps_doc_symbol_to_word_ratio": 0.016121599823236465,
"rps_doc_unigram_entropy": 5.689408302307129,
"rps_doc_word_count": 1693,
"rps_doc_frac_chars_dupe_10grams": 0.08500193804502487,
"rps_doc_frac_chars_dupe_5grams": 0.19093139469623566,
"rps_doc_frac_chars_dupe_6grams": 0.18628084659576416,
"rps_doc_frac_chars_dupe_7grams": 0.18628084659576416,
"rps_doc_frac_chars_dupe_8grams": 0.1772380769252777,
"rps_doc_frac_chars_dupe_9grams": 0.15295182168483734,
"rps_doc_frac_chars_top_2gram": 0.007750940043479204,
"rps_doc_frac_chars_top_3gram": 0.0072342101484537125,
"rps_doc_frac_chars_top_4gram": 0.020152440294623375,
"rps_doc_books_importance": -985.9999389648438,
"rps_doc_books_importance_length_correction": -985.9999389648438,
"rps_doc_openwebtext_importance": -589.8158569335938,
"rps_doc_openwebtext_importance_length_correction": -589.8158569335938,
"rps_doc_wikipedia_importance": -423.1136474609375,
"rps_doc_wikipedia_importance_length_correction": -423.1136474609375
},
"fasttext": {
"dclm": 0.048544108867645264,
"english": 0.9185722470283508,
"fineweb_edu_approx": 1.371116280555725,
"eai_general_math": 0.3294981122016907,
"eai_open_web_math": 0.2758088707923889,
"eai_web_code": 0.017474530264735222
}
} | {
"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": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "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": "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": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,516,572,402,965,154,000 | Topic: PHP 5.2.11
Hi Remi,
do you plan to continue to provide php 5.2 packages?
It would allow everyone not (yet) updating to php 5.3 to "yum update -x 'php-*5.3*'" to stay up to date with php 5.2.
Anyway thanks for your work :-)
Ralf
Re: PHP 5.2.11
No,
Se other discussion about this.
I'm only interested by providing latest version, ans stuff I use
+
Laptop: Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi | {
"url": "https://forum.remirepo.net/viewtopic.php?pid=232",
"source_domain": "forum.remirepo.net",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "16569",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Q4NSCFYKSL65QQXVHZ6GILGGKZ6HMMCT",
"WARC-Concurrent-To": "<urn:uuid:94bed0f4-1988-42cd-8f71-cf0c41f8cdac>",
"WARC-Date": "2024-05-25T14:00:17Z",
"WARC-IP-Address": "109.238.14.107",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:6BSDFBNAU5DXKTZ2THNWLWYA53UR5D2P",
"WARC-Record-ID": "<urn:uuid:29403c89-0c7b-4140-a551-56568b432c47>",
"WARC-Target-URI": "https://forum.remirepo.net/viewtopic.php?pid=232",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2e06e03d-8d04-4c72-8e85-9c7e36605e07>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-204\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,
28,
29,
82,
83,
201,
202,
234,
235,
240,
241,
256,
257,
261,
262,
294,
295,
361,
362,
364,
365,
414,
464,
498
],
"line_end_idx": [
18,
19,
28,
29,
82,
83,
201,
202,
234,
235,
240,
241,
256,
257,
261,
262,
294,
295,
361,
362,
364,
365,
414,
464,
498,
552
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 552,
"ccnet_original_nlines": 25,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20567375421524048,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.056737590581178665,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.40425533056259155,
"rps_doc_frac_unique_words": 0.7692307829856873,
"rps_doc_mean_word_length": 4.373626232147217,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.1042327880859375,
"rps_doc_word_count": 91,
"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.035175878554582596,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -67.71680450439453,
"rps_doc_books_importance_length_correction": -81.59984588623047,
"rps_doc_openwebtext_importance": -40.61788558959961,
"rps_doc_openwebtext_importance_length_correction": -54.50093078613281,
"rps_doc_wikipedia_importance": -23.426498413085938,
"rps_doc_wikipedia_importance_length_correction": -37.30954360961914
},
"fasttext": {
"dclm": 0.20082074403762817,
"english": 0.7550516724586487,
"fineweb_edu_approx": 0.6364466547966003,
"eai_general_math": 0.0045906901359558105,
"eai_open_web_math": 0.17644363641738892,
"eai_web_code": 0.00007724999886704609
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.136",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.02",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-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": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,493,226,526,944,551,000 | //
you're reading...
Uncategorized
Ganking Red Herrings
Maybe it’s because the route to our new home lead me through wide swaths of high security space, maybe the thoughts that will spill from my mind momentarily have simply cooked there for too long. Today I am going to put out some musings about highsec, PvP and emergent gameplay.
[tl;dr The debate on highsec as being “too safe” misses the point. The Sandbox paradigm has to be expanded. As an example I propose a political system for highsec.]
Red Herrings in the Sandbox
Let me be blunt: I tend to believe the ever ongoing discussion on the utility of highsec ganking, miner bumping and war declarations is falling short of the true challenge of discussing the design of a game like EVE. In fact it is a red herring which distracts from the true issues at stake. The question is not whether to make highsec safer or more dangerous. The question is: how can the Sandbox paradigm be developed in high security space?
How do you build a game which thrives on player interaction? This is not as trivial a question as it may seem. Every player has his own idea how he want’s to play the game and what he understands under a “thriving game”. On the other hand the game has to be supported by CCP and they state explicitly that without the Sandbox concept where players create content for other players they would simply not be able to keep pace with players consuming the content. As such EVE is a game of creation rather than consumption. And for this concept to work it is imperative that there are interactions between players. I should say that I am a little bid biased at this point. There might be players who just enjoy the nice scenery of EVE, who would love to look at their mining lasers chewing up rocks just because rock-eating lasers are awesome. There are those that like to run missions and fight against red crosses. I am happy to have those guys in the game, it is awesome that there are people enjoying these sides of EVE. But I think CCP should not attempt to make those play styles a driving motivation for developing the game, precisely because of the statement that they will not be able to keep pace once they commit to supply content consumers with more and more food.
In order to unify the two issues of having players with very different wants in the game but also the necessity to root the game in player interaction, the Sandbox attempts to provide a diverse menu of ways for players to interact. Now the above mentioned discussion seems to revolve about the question whether there are more valuable forms of interaction (PvP combat?) than others (participating in the market?). I believe the more relevant question is, how can you increase possibilities for player vs player interaction without having to force people into uncomfortable play styles?
Excursus: Loss
Before I go on here, there is one important piece in the puzzle that has to be examined. It is the issue of danger and of loss. It is an issue of risk and reward. It’s why I have been writing player versus player interaction in contrast to player-to-player interaction. Now, I totally believe that cooperative player interactions are a vital part of the game and an tremendously interesting area of game design, however, in order to generate challenges the game designer still needs a means of posing problems (which could then be subsequently be solved cooperatively). In the Sandbox the designer empowers the (groups of) players to generate the problems of other (groups of) players. This clarifies why there needs to be player against player interaction, but why do we need to loose stuff? I believe arguments like “because EVE is dark and gritty” or “because in EVE reward can only be gained at a risk” are superficial and only scratch the surface of the deeper reason, why there needs to be loss in player vs player interaction. “The market is only driven by the demand for equipment created by combat PvP” probably hits a bit closer to the mark. In complex systems theory there is a term called dissipative structures. It is used to describe an almost universal feature of emergent patterns in complex systems. Dissipative means there is a mechanism for loss in the system and only this mechanism allows the emergence of interesting structures. Without a loss mechanism, emergence would simply violate the second law of thermo dynamics. We could do that in a computer simulation But I am getting carried away. Dissipative structures are an interesting topic in themselves and I hope to write about them soon in my “Mathematics of the Sandbox” series. For now, however, let’s return to the original question of this post.
Empower the Economist and the Politician
In order to stick to the sandbox paradigm, high security state could be developed in ways that increases player vs player interaction by widening the possibilities that players can interact and compete beyond combat PvP and market wars. In order to resolve the tension between the fundamentalist sandbox defenders and the proponents of a save high sec, new features have to be introduced into the game which allow for additional player interactions.
An extension of the market to include a stock exchange is probably the most straight forward proposal in that direction. Tools for players to setup money lender shops (or even banks), keep track of their credit lines in game and setup interest rates etc. More flexibility in the contract system has already been discussed several times and CCP seems to be open to the suggestion, although it is very unclear when this could happen. For example it would be interesting to provide a tool that formalizes clearing house trades, involving a neutral, trusted party which acts as the go-between and acknowledges contract fulfilment conditions. In order to promote player interaction via such tools there need to be better tools for advertisement of player created services. Contracts available at the current station should scroll over a bulletin board on the undock, be visible in the captains quarters, be audio-broadcasted inside the station (?). People could pay for advertisement space. A few simple predefined building blocks to design your add would be completely ok.
There is one component in high security space that I find strangely missing. It is something that has the potential to embrace everybody from the most social highsec player to the solo mission runner. It’s politics. Let’s face it, capsuleers might not be the governments of the four empires, but a group with these demigod-like abilities will definitely have a big political influence. Maybe there are capsuleer councils that at least advice the governments and have a say in capsuleer related issues. Each empire would have a slightly different political system. The Galente will have extensive democratic structures with the most sophisticated voting system, possibly practicing basic democracy for a lot of decisions. Minmatar will have local tribe assemblies where decision are taken by those that are present. Decisions will only affect a constellation though. The Amarr will have a system where influence is based on standing towards important empire factions. There are regular votes, but not everybody’s voice is equally regarded. Finally the Caldari will have a system in which corps can vote on decisions. And even the voting system they invented is based on market mechanisms with different competing proposals being bought into by voting corporations.
But what would the capsuleers be deciding? That is the most difficult question and will require a profound change to how high security space works. It is important that for the system to have any chance of functioning there must be consequences on decisions that impact the live of Bob the miner. On the other hand the systems has to be robust against exploits. I believe nothing like this has been ever attempted in gaming history (that’s why we have to do it in EVE) so it would make sense to start with small things. Taxes are an obvious issue that could be voted on. For this to work there have to be consequences from lowering taxes, otherwise players would obviously just down vote taxes. So first of all split taxes in highsec into an empire part and the corp part. The corp tax may remain as it is in the current system. Empire tax is voted on by the residents of the respective empire (using different voting systems). What happens if one tries to do away with taxes? Well, taxes are spend on infrastructure. If players choose to down vote taxes infrastructure will start to deteriorate. There will be longer waiting times at jump gates or on the docking. The number of industry slots in stations decreases. The reach of visible market orders is reduced to the constellation level. Jump gates go down for periods of time. Police service gets delayed or even ceases to exist. Security status of systems plumets. There are all kinds of nasty things that could happen based on tax-payer money. Incursions would be a huge sink of tax money. Especially if they are not dealt with.
At later stages interesting opportunities might arise when such a political system is tied together with faction warfare. After all, who pays for all these nice faction ships available in the militia LP-stores? Depending on how well the system works at later stages there could be several budgets of tax money that need to be filled (police, jump gates, CONCORD, station infrastructure, communication infrastructure…) and votes would go out for the distribution of tax money onto the different areas.
All This would make the world of EVE more dynamic and if done well, in the sense that the voting tool has to be put right under the nose of the players, would include much more players in actual emergent gameplay in ways that might be more appealing to many than combat PvP.
Let me remark that having players vote on additional rules of the game is a prominent feature of many of the best boardgames out there. The political cards of Twilight Imperium are just one example that shows that such a system can indeed work very well. What is important though, is the frequency at which votes would be held. This is a balancing issue and would have to be tried out. One per month seems reasonable but it very much depends on how the system is implemented.
I think building a political system into EVE empire space would be a challenge that certainly is not easy to master, requiring a lot of development resources on CCPs side, but it has such a great potential that it cannot be just dismissed. Actually many of the tools and mechanism that would be needed could immediately be recycled to implement a true bottom-up sovereignty concept for nullsec!
Small steps will not suffice to resolve the tension that builds around the save highsec. There need to be radical steps to expand the Sandbox concept into the carebear realm.
Fly smart! Chira.
Advertisements
About chiralityeve
A rookie capsuleer exploring the depths of New Eden
Discussion
Trackbacks/Pingbacks
1. Pingback: Imperial Waves of Sound | States of Entanglement - 10/04/2013
Leave a Reply
Fill in your details below or click an icon to log in:
WordPress.com Logo
You are commenting using your WordPress.com account. Log Out / Change )
Twitter picture
You are commenting using your Twitter account. Log Out / Change )
Facebook photo
You are commenting using your Facebook account. Log Out / Change )
Google+ photo
You are commenting using your Google+ account. Log Out / Change )
Connecting to %s
Categories
Copyright Notice
EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website.
%d bloggers like this: | {
"url": "https://spindensity.wordpress.com/2013/02/20/ganking-red-herrings/",
"source_domain": "spindensity.wordpress.com",
"snapshot_id": "crawl=CC-MAIN-2018-05",
"warc_metadata": {
"Content-Length": "56923",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SKTSPS4YSWKELTCAM5A6XHB5CZFVHW5S",
"WARC-Concurrent-To": "<urn:uuid:5ce3182e-418b-4e53-ae69-e35749507a34>",
"WARC-Date": "2018-01-22T23:52:05Z",
"WARC-IP-Address": "192.0.78.12",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:OVCS3FTTNVGL2P6C2BJQHHVICYUW7EQN",
"WARC-Record-ID": "<urn:uuid:952a799b-ba1c-4386-84a2-a0705575f70e>",
"WARC-Target-URI": "https://spindensity.wordpress.com/2013/02/20/ganking-red-herrings/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4fa9f5ff-3fec-4b6b-be74-f9a7014ac6bb>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-239-184-55.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,
3,
21,
35,
36,
57,
58,
337,
338,
503,
504,
532,
533,
977,
978,
2250,
2251,
2837,
2838,
2853,
2854,
4683,
4684,
4725,
4726,
5176,
5177,
6248,
6249,
7514,
7515,
9100,
9101,
9603,
9604,
9879,
9880,
10356,
10357,
10752,
10753,
10928,
10929,
10947,
10948,
10963,
10964,
10983,
10984,
11036,
11037,
11048,
11049,
11070,
11071,
11148,
11149,
11163,
11164,
11219,
11220,
11239,
11240,
11312,
11313,
11329,
11330,
11396,
11397,
11412,
11413,
11480,
11481,
11495,
11496,
11562,
11563,
11580,
11581,
11592,
11593,
11610,
11611,
12254
],
"line_end_idx": [
3,
21,
35,
36,
57,
58,
337,
338,
503,
504,
532,
533,
977,
978,
2250,
2251,
2837,
2838,
2853,
2854,
4683,
4684,
4725,
4726,
5176,
5177,
6248,
6249,
7514,
7515,
9100,
9101,
9603,
9604,
9879,
9880,
10356,
10357,
10752,
10753,
10928,
10929,
10947,
10948,
10963,
10964,
10983,
10984,
11036,
11037,
11048,
11049,
11070,
11071,
11148,
11149,
11163,
11164,
11219,
11220,
11239,
11240,
11312,
11313,
11329,
11330,
11396,
11397,
11412,
11413,
11480,
11481,
11495,
11496,
11562,
11563,
11580,
11581,
11592,
11593,
11610,
11611,
12254,
12276
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 12276,
"ccnet_original_nlines": 83,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.45619335770606995,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018126890063285828,
"rps_doc_frac_lines_end_with_ellipsis": 0.011904760263860226,
"rps_doc_frac_no_alph_words": 0.10142426192760468,
"rps_doc_frac_unique_words": 0.36905917525291443,
"rps_doc_mean_word_length": 4.815712928771973,
"rps_doc_num_sentences": 115,
"rps_doc_symbol_to_word_ratio": 0.0008631899836473167,
"rps_doc_unigram_entropy": 5.751560688018799,
"rps_doc_word_count": 2062,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.02779456041753292,
"rps_doc_frac_chars_dupe_6grams": 0.01591137982904911,
"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.005639479961246252,
"rps_doc_frac_chars_top_3gram": 0.003524669911712408,
"rps_doc_frac_chars_top_4gram": 0.008459210395812988,
"rps_doc_books_importance": -1036.1314697265625,
"rps_doc_books_importance_length_correction": -1036.1314697265625,
"rps_doc_openwebtext_importance": -602.1669311523438,
"rps_doc_openwebtext_importance_length_correction": -602.1669311523438,
"rps_doc_wikipedia_importance": -454.3835754394531,
"rps_doc_wikipedia_importance_length_correction": -454.3835754394531
},
"fasttext": {
"dclm": 0.15506547689437866,
"english": 0.9597919583320618,
"fineweb_edu_approx": 1.6984270811080933,
"eai_general_math": 0.10591161251068115,
"eai_open_web_math": 0.1831396222114563,
"eai_web_code": 0.010776219889521599
}
} | {
"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": "320.0285",
"labels": {
"level_1": "Social sciences",
"level_2": "Political science",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "4",
"label": "Analyze"
},
"secondary": {
"code": "5",
"label": "Evaluate"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "9",
"label": "Personal/Misc"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "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": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,240,458,209,692,147,700 | Due to shifting worldwide trends and technological advancements, traditional television has been on the decrease for some years. The increasing spread of the internet has made everything, including television, more accessible. Thanks to internet protocol television, you may now watch your favorite shows and movies whenever you want (IPTV internet protocol television). IPTV has swiftly swept the market because to its enhanced user experience, which is the number-one consumer requirement in today’s fast-paced world.
But what precisely is IPTV? What is the mechanism behind it? Is it all good? Is there nothing bad about it? These are just a few of the issues we’ll discuss in this post.
Let’s begin with the fundamentals.
• What Is IPTV and How Does It Work?
IPTV stands for internet protocol television, which means that instead of using antennas, satellite dishes, or fiber-optic cables, consumers get television shows through the internet. To put it another way, IPTV internet protocol television broadcasts video content over the internet.
Although IPTV content distribution differs from that of internet video platforms such as YouTube or over-the-top (OTT) services such as Netflix, it shares many of its advantages. IPTV, for example, allows subscribers to subscribe to video on demand (VOD) programming and view live broadcasts. This allows people to watch their favorite episodes whenever they want while still being able to watch live events and programming on traditional television.
Because of its versatility, IPTV internet protocol television outperforms traditional television and is regarded as the medium’s future.
• What Is IPTV and How Does It Work?
Traditional television transmits analog signals to consumers through wires, allowing them to view only the currently aired material. Users can only control when and what they see in these situations by using external recording equipment.
The way IPTV internet protocol television operates varies a lot. Unlike traditional television, which can only transmit live programming, IPTV uses servers to store content. This allows users the ability to request applications at any time. After a user chooses a show to view, the content is converted to digital format and sent to their playback device in packets over the internet protocol. Before they reach the end-users, the files will be compressed and optimized for streaming.
However, in order for any of the above to work, your TV must be able to interpret signals sent through the internet protocol. Unfortunately, not all TVs can set up an IPTV service straight once because most of them can’t interpret signals without assistance. If your TV isn’t IPTV internet protocol television compatible, you’ll need to get an IPTV set-top box.
• What Is an IPTV Box?
An IPTV box, often known as a set-top box, is a device that converts streaming internet protocol signals into a format that a television can understand and reproduce. In other words, set-top boxes translate the internet protocol’s language. These boxes are frequently linked to the television by HDMI or AV connections, or, in the case of newer devices, over Wi-Fi.
You won’t need a set-top box if you prefer to stream IPTV internet protocol television from your computer because PCs can already read data sent over the internet protocol. Those who don’t want to spend money on a set-top box but still want to view IPTV on their TVs can mirror their computer displays on the TV and watch from there.
• Types of IPTV Formats:
IPTV, as previously stated, provides a variety of extra services and video formats in addition to standard television broadcasts. Most IPTV internet protocol television systems provide one of three content formats:
• Live TV – Similar to traditional television, live IPTV allows viewers to live stream television programming in real time. Live TV is most commonly used to broadcast live events such as sporting events, conferences, and so on.
• Video on Demand (VOD) – VOD IPTV services function similarly to other OTT providers in that you pay a monthly membership fee in exchange for access to a vast library of movies that you can watch whenever you want.
• Time-Shifted TV — Also known as “catch-up TV,” this service allows customers to watch previously broadcast television episodes at a later time. However, there is one key distinction between time-shifted TV and VOD. Users of time-shifted television may only revisit past programs for a limited amount of time. Broadcasts are often available for a few days before fading. Anything older than that is termed a video on demand (VOD).
With the ability to view live broadcasts, catch up on missed episodes, and watch on-demand programming, IPTV internet protocol television clearly outperforms its conventional equivalent in terms of options and user experience.
Let’s take a brief look at all of IPTV’s advantages and disadvantages.
• IPTV’s Advantages and Disadvantages:
Although IPTV provides tremendous flexibility and user experience, it is much more than that. It’s also important to consider both sides of the argument, as IPTV internet protocol television isn’t without flaws. Here are some of the most noteworthy IPTV advantages and disadvantages as you can also check out this page to see why you should choose our IPTV LIT subscription service:
Pros:
• Simple to Set Up and Use – To get started, all you need to do is purchase a set-top box and connect it to your television. In addition, newer models’ Wi-Fi connectivity simplifies the procedure greatly.
• It’s 100 percent digital – As the world becomes increasingly digital, switching to digital television offers a solid foundation for the future and new technology.
• IPTV Allows Smooth Simultaneous Streaming of Various Programs — IPTV internet protocol television services allow customers to watch multiple programs on different devices at the same time (TV, PC, Mobile, etc.).
• Variety of Service Types – IPTV provides a wide range of services to cater to a wide range of user preferences.
• Allows Users to Enjoy a Commercial-Free Experience – Many people despise advertising, so the ability to skip or fast-forward through them is a significant increase in quality of life.
• Incredibly Effortless in terms of time — IPTV’s attraction to customers throughout the world stems from the absence of needing to wait for your program to begin at a set time and the ability to skip ads.
Cons:
• Network Overloads May Cause Technical Troubles – If too many people view the same program at the same time, the network may become overloaded, resulting in buffering or playback issues.
• Users Have No to No Control Over Channel-Related Issues – If a channel’s server has a mistake, viewers have little choice except to wait.
• Synchronization Issues Are All Too Common – Viewers may suffer synchronization issues as a result of normal network speed and quality changes. If this happens, it will have a significant impact on the quality of the user experience.
As you can see, IPTV internet protocol television isn’t perfect, and it has certain drawbacks when compared to regular television. But, given how quickly technology advances, we shouldn’t be shocked if these few concerns are resolved sooner rather than later. Besides, wouldn’t you agree that the UX improvements IPTV brings to the table far outweigh these potential issues?
• Is IPTV the Way of the Future?
The future of IPTV is difficult to predict, but we have enough data to make an educated judgment.
People currently have less time to watch television, and the desire for personalized programming is at an all-time high. As a result, having the flexibility that IPTV internet protocol television provides is becoming increasingly important in today’s environment. And, with internet video platforms delivering on-demand programming at an all-time high, the television business must find a means to compete. Fortunately, IPTV turned out to be the ideal option!
You still don’t trust us? Let’s get down to business!
Globally, demand for IPTV services is increasing at a rate of 30–35 percent each year. The anticipated market value of IPTV internet protocol television adds to this trend. The IPTV industry was valued $40.85 billion in 2019 alone, according to Mordor Intelligence, and it’s only projected to expand. Experts believe that by 2025, the figure might be as high as $104 billion!
When you consider the above, as well as the fact that conventional broadcasting firms are facing an increasing number of competitors in the shape of OTT platforms like Netflix and Hulu, it’s evident that they must find a method to stay relevant in the market. And IPTV internet protocol television has shown to be just that!
• So, what does IPTV’s future hold?
In the increasingly competitive internet video broadcasting sector, we feel that nothing is definite, but the odds are that it will continue to rise. After all, the only way for traditional television to survive the digital era is to embrace it and figure out how to adapt.
IPTV LIT might be the ideal answer!
Select your currency
USD United States (US) dollar
EUR Euro | {
"url": "https://iptvlit.com/what-is-iptv-internet-protocol-television-and-how-it-works-the-only-iptv-you-will-ever-need/",
"source_domain": "iptvlit.com",
"snapshot_id": "crawl=CC-MAIN-2022-40",
"warc_metadata": {
"Content-Length": "237097",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2NDXLTKSN4A4D35LDJ6UX2Q2HVTQ3KZR",
"WARC-Concurrent-To": "<urn:uuid:41157ee2-e837-4ad4-ba70-dc3ee9795aaa>",
"WARC-Date": "2022-10-07T10:09:32Z",
"WARC-IP-Address": "198.54.115.46",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:Z6GWLELDBAZXKIDQ2NKB2PPQKZCYMT4H",
"WARC-Record-ID": "<urn:uuid:cef86000-b078-49f7-8fdb-0092b6d390a7>",
"WARC-Target-URI": "https://iptvlit.com/what-is-iptv-internet-protocol-television-and-how-it-works-the-only-iptv-you-will-ever-need/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9f12fe27-38f5-4ef1-bdcc-458864aae316>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-62\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,
520,
521,
692,
693,
728,
729,
768,
769,
1058,
1059,
1514,
1515,
1656,
1657,
1696,
1697,
1939,
1940,
1946,
1947,
2436,
2437,
2803,
2804,
2829,
2830,
3200,
3201,
3539,
3540,
3567,
3568,
3787,
3788,
4020,
4240,
4676,
4677,
4908,
4909,
4984,
4985,
5026,
5027,
5414,
5415,
5425,
5426,
5635,
5804,
6022,
6140,
6330,
6540,
6541,
6551,
6552,
6744,
6888,
7127,
7128,
7507,
7508,
7543,
7544,
7642,
7643,
8103,
8104,
8158,
8159,
8535,
8536,
8861,
8862,
8864,
8865,
8903,
8904,
9178,
9179,
9215,
9216,
9237,
9267
],
"line_end_idx": [
520,
521,
692,
693,
728,
729,
768,
769,
1058,
1059,
1514,
1515,
1656,
1657,
1696,
1697,
1939,
1940,
1946,
1947,
2436,
2437,
2803,
2804,
2829,
2830,
3200,
3201,
3539,
3540,
3567,
3568,
3787,
3788,
4020,
4240,
4676,
4677,
4908,
4909,
4984,
4985,
5026,
5027,
5414,
5415,
5425,
5426,
5635,
5804,
6022,
6140,
6330,
6540,
6541,
6551,
6552,
6744,
6888,
7127,
7128,
7507,
7508,
7543,
7544,
7642,
7643,
8103,
8104,
8158,
8159,
8535,
8536,
8861,
8862,
8864,
8865,
8903,
8904,
9178,
9179,
9215,
9216,
9237,
9267,
9275
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 9275,
"ccnet_original_nlines": 85,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.38221970200538635,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04133635014295578,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1506228744983673,
"rps_doc_frac_unique_words": 0.3696969747543335,
"rps_doc_mean_word_length": 4.998653411865234,
"rps_doc_num_sentences": 81,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.545477390289307,
"rps_doc_word_count": 1485,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.025596119463443756,
"rps_doc_frac_chars_dupe_6grams": 0.007274690084159374,
"rps_doc_frac_chars_dupe_7grams": 0.007274690084159374,
"rps_doc_frac_chars_dupe_8grams": 0.007274690084159374,
"rps_doc_frac_chars_dupe_9grams": 0.007274690084159374,
"rps_doc_frac_chars_top_2gram": 0.043109260499477386,
"rps_doc_frac_chars_top_3gram": 0.056042030453681946,
"rps_doc_frac_chars_top_4gram": 0.05658090114593506,
"rps_doc_books_importance": -745.2820434570312,
"rps_doc_books_importance_length_correction": -745.2820434570312,
"rps_doc_openwebtext_importance": -495.5697937011719,
"rps_doc_openwebtext_importance_length_correction": -495.5697937011719,
"rps_doc_wikipedia_importance": -211.35108947753906,
"rps_doc_wikipedia_importance_length_correction": -211.35108947753906
},
"fasttext": {
"dclm": 0.05758922919631004,
"english": 0.9422615170478821,
"fineweb_edu_approx": 2.0377352237701416,
"eai_general_math": 0.06826894730329514,
"eai_open_web_math": 0.2201283574104309,
"eai_web_code": 0.014644919894635677
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "621.384",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Engineering",
"level_3": "Mechanical engineering and Machinery"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,634,365,757,964,076,000 | Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.
What is meta?
Here's how it works:
1. Any Stack Exchange user can ask a question
2. The community provides support, votes on ideas, and reports bugs
3. Your voice helps shape the way Stack Exchange operates
As one of the people being characterized as having an 'itchy trigger finger' on the delete link, I wanted to offer up a constructive suggestion for how to radically reduce the number of deletions while still accomplishing the goals that the deletions have been trying to meet. I don't necessarily believe that this is exactly the right recipe, but I hope that there's a contagious germ of a good idea in here.
1. As a convention, delete almost nothing. Maybe leave all deletion to diamonds. The question of spam/offense flags I leave to others' opinions.
2. A strong merge tool and a redirect mechanism. This would be viewed as distinct from deletion. This process would move the valid answers to the chosen target question, remove the answers from the closed question, and link the closed question to the chosen target to get to the answers. So we retain the full search goodness of the closed question. Link the other way as well, in case some of the moved answers are hard to understand without the context of the closed question. Instead of a vote to move a question from closed to the merge process, diamonds and other with some amount of rep (> 10K?) would be trusted to do this as individuals after some time has passed in which the question has not reopened.
3. Closed questions for S&A, NARQ, and OT would be indexed differently. The search field would search the ANSWERS, but not the QUESTIONS. So any answer goodness remains reachable, but troll, poll, and dull questions would appear rarely on anyone's screens.
4. No new votes on closed questions and their answers.
5. No rep from closed questions and their answers. I could see that this could be a headache for the devs. Perhaps a rule like: votes are wiped from a closed question once it's stayed closed for two weeks? Yes, this would unfairly penalize people who put effort into answering poor questions. I ask: how often would this punish the innocent? Perhaps infrequently enough to be tolerable?
In other words, my proposal here is to make closing somewhat more stringent -- to move much of the purpose of 'delete' into the orbit of 'close,' reducing the desire or incentive or need to delete. Once a question is closed, it's off the front page and is no longer a gross 'broken window.' If we then remove the rep value of inappropriate questions, and we make them less prominent in search, perhaps that's all.
EDIT
Or, if you don't like this (and someone doesn't), I have another idea. Radical Edit Surgery. Faced, for example, with a troll question that has a useful answer attached, edit it down to a sensible question that goes with the answer.
** ANOTHER EDIT **
A really gnarly problem here is that answers are permanently nailed to questions. We don't have votes to delete truly awful answers to good questions, and we want to preserve good answers to bad questions. But we don't want to live with the bad questions.
share|improve this question
I like the first three points, maybe they could put a reference in migrated answers back to the closed question (in other words, only on the answers migrated).
I disagree with points 4 & 5 since I think those who give good answers should still get their just reward.
Also realize that some questions are only closed because they no longer apply (too localized), but they could have been good viable questions when first proposed (yes, this is a rare occurence).
share|improve this answer
I see your point on 5, and I edited to incorporate your point of view. On 4, I've always found it really odd that closed questions (and their answers) continue to accept votes. Got another idea for how to curtail rep accumulation from muppets? Always assuming that you share my view of that problem, which you are perfectly welcome to reject. – Rosinante May 26 '10 at 6:06
@ros, I don't really see any problem with closed questions and their answers getting votes. They will hopefully be getting votes like any other post gets votes, and therefore deserve them. Now, what wouldn't bother me is doing a migration of the good answers, and then leaving a stub of the question as a milepost marker for searches, which itself wouldn't need to be voted on. Then people are driven to the duplicated question, and can vote for those answers there. – Lance Roberts May 26 '10 at 17:08
Didn't we already fix deletions?
• 10k rep users get 5 deletion votes per day on questions they don't own - deletion rules on questions one does own are still in effect
• popular questions require more deletion votes to be deleted, at a ratio of 20:1 - a question's popularity is defined by the sum of its score plus all its answers' scores. For example, a question with score 20 will require 4 deletion votes (3 base votes + 1 popularity vote).
share|improve this answer
6
Jeff, you fixed the problem with a few users deleting more aggressively than the broad consensus would have it, but you may have introduced a "Can we encourage more deleting" problem parallel to the problem we currently have closing bad questions (and I don't mean just the "fun" and "subjective" ones, either). I'm waiting to see if this makes the "You can't [close|delete] this, it isn't t any worse than [execrable example]" problem worse. My money is on "Yes". – dmckee May 26 '10 at 8:57
2
Jeff, you have turned down the throttle on delete. You haven't changed the 10K tools for collaborating on deletion. So, I'm concerned that the tools will clog with 1-vote posts, and the broken windows will multiply. I suppose we'll all see. – Rosinante May 26 '10 at 12:05
5
@Jeff "Fix" in the sense of "hack" - yes. – nb69307 May 26 '10 at 15:44
2
There'll be no fix 'till redirection happens on merges. This is just trading one problem for another... – Shog9 May 26 '10 at 15:47
6
@Jeff: I assume that in the long run those changes will simply result in almost nothing getting deleted anymore. As I see it, the appeal of deleting was always that you actually could get something done. You voted, bad posts disappeared and the list of question with pending delete votes got shorter. You got the feeling of actually cleaning up the site. Throwing in your petty three delete votes against a constant stream of noise questions just feels futile. So you wonder why you should do this work if it wont make any noticeable difference. – sth May 26 '10 at 16:11
2
This is a bit like saying you "fixed" the problem of high fuel costs by limiting every driver's top speed to 40 kph and requiring an extra passenger for every 10 km of distance. I believe that the purpose of this question was to suggest (or at least discuss) ways to improve the situation without the knee-jerk politician's syllogism. – Aarobot May 26 '10 at 16:35
+1, I liked your fix and am happy about it, but still think there are more options to look into in regards to migration. – Lance Roberts May 26 '10 at 17:10
I don't know how to make it simpler to collaborate on migrations, but there has to be a way. The hardest part (for me) is fining two socks close enough in color to make a pair. – Tim Post Jun 26 '10 at 13:36
@Tim why fine a sock? Did it cross the road? – Rosinante Jun 27 '10 at 2:32
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged . | {
"url": "http://meta.stackexchange.com/questions/51226/a-proposal-for-a-lot-less-deleting?answertab=votes",
"source_domain": "meta.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2016-07",
"warc_metadata": {
"Content-Length": "86670",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2HE45RWTRA2KFZBJW7HV4JPR6AGQ5VJN",
"WARC-Concurrent-To": "<urn:uuid:7067b319-0518-4994-a83c-70a74426df10>",
"WARC-Date": "2016-02-13T19:36:33Z",
"WARC-IP-Address": "104.16.116.182",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:M7E3PAJMQYM3DJN22WDRT5NPGDPV35NH",
"WARC-Record-ID": "<urn:uuid:4f0378eb-afe5-4b27-832c-24e2777d27a5>",
"WARC-Target-URI": "http://meta.stackexchange.com/questions/51226/a-proposal-for-a-lot-less-deleting?answertab=votes",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:84952220-016c-4a53-89b2-550219955064>"
},
"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,
157,
158,
172,
193,
241,
311,
371,
372,
782,
783,
930,
931,
1645,
1646,
1905,
1906,
1963,
1964,
2353,
2354,
2768,
2769,
2774,
2775,
3008,
3009,
3028,
3029,
3285,
3286,
3314,
3315,
3475,
3476,
3583,
3584,
3779,
3780,
3806,
3811,
4185,
4190,
4693,
4694,
4727,
4728,
4866,
5145,
5171,
5175,
5668,
5672,
5945,
5949,
6021,
6025,
6157,
6161,
6733,
6737,
7102,
7107,
7264,
7269,
7477,
7482,
7558,
7559,
7600,
7601
],
"line_end_idx": [
157,
158,
172,
193,
241,
311,
371,
372,
782,
783,
930,
931,
1645,
1646,
1905,
1906,
1963,
1964,
2353,
2354,
2768,
2769,
2774,
2775,
3008,
3009,
3028,
3029,
3285,
3286,
3314,
3315,
3475,
3476,
3583,
3584,
3779,
3780,
3806,
3811,
4185,
4190,
4693,
4694,
4727,
4728,
4866,
5145,
5171,
5175,
5668,
5672,
5945,
5949,
6021,
6025,
6157,
6161,
6733,
6737,
7102,
7107,
7264,
7269,
7477,
7482,
7558,
7559,
7600,
7601,
7667
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 7667,
"ccnet_original_nlines": 70,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4093107581138611,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.021765420213341713,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.20677146315574646,
"rps_doc_frac_unique_words": 0.386212021112442,
"rps_doc_mean_word_length": 4.417346000671387,
"rps_doc_num_sentences": 81,
"rps_doc_symbol_to_word_ratio": 0.0006045899935998023,
"rps_doc_unigram_entropy": 5.560622692108154,
"rps_doc_word_count": 1349,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.033898308873176575,
"rps_doc_frac_chars_dupe_6grams": 0.013760699890553951,
"rps_doc_frac_chars_dupe_7grams": 0.0073837898671627045,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.0073837898671627045,
"rps_doc_frac_chars_top_3gram": 0.010068800300359726,
"rps_doc_frac_chars_top_4gram": 0.013592880219221115,
"rps_doc_books_importance": -738.8606567382812,
"rps_doc_books_importance_length_correction": -738.8606567382812,
"rps_doc_openwebtext_importance": -320.4864501953125,
"rps_doc_openwebtext_importance_length_correction": -320.4864501953125,
"rps_doc_wikipedia_importance": -228.43075561523438,
"rps_doc_wikipedia_importance_length_correction": -228.43075561523438
},
"fasttext": {
"dclm": 0.19997519254684448,
"english": 0.9723309278488159,
"fineweb_edu_approx": 1.3535043001174927,
"eai_general_math": 0.6241766810417175,
"eai_open_web_math": 0.39670783281326294,
"eai_web_code": 0.06987661123275757
}
} | {
"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": "302.22",
"labels": {
"level_1": "Social sciences",
"level_2": "",
"level_3": "Social psychology"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "5",
"label": "Comment Section"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
3,995,945,009,514,447,400 | Talk:Linux Standard Base
From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Linux (Rated Start-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Linux, a collaborative effort to improve the coverage of Linux on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start This article has been rated as Start-Class on the project's quality scale.
Mid This article has been rated as Mid-importance on the project's importance scale.
relation to IEEE POSIX / SUS[edit]
So, is LSB part of IEEE POSIX / SUS or is LSB competely separate from IEEE POSIX / SUS ? If a programmer states that he works with IEEE POSIX / SUS systems, would that include Linux too or would he have to add that he has experience with LSB systems apart from IEEE POSIX / SUS ?
LSB includes by reference the Single Unix Specification. The reverse is not true. Daniel Quinlan 13:39, Mar 26, 2005 (UTC)
criticism[edit]
It seems to me that starting the article with 'critisism' is somehow wrong. Critisism is better off being down below, since otherwise it'll make it all look a lot worse. Just my two cents....
Roy Sigurd Karlsbakk 21:10, Sept 17, 2006
copyvio[edit]
I removed a passage that was copied verbatim from here. I couldn't find any evidence that it was released under the GFDL. PuerExMachina 20:46, 11 March 2007 (UTC)
If you look here you'll see it's CC-BY-SA. bufalo_1973 (talk) 10:34, 8 August 2008 (UTC)
As I understand the situation, CC-BY-SA content can't be relicensed under the GFDL. PuerExMachina (talk) 06:45, 10 August 2008 (UTC)
LSB idea[edit]
The article used conclusion that Linux is not the operating system, as it is counted in computer science, because it is a monolith kernel and not a microkernel. The LSB standard was designed for Linux Operating System to avoid fragmenting it, when it is used OS on a different software systems (distributions). The LSB standard rules what libraries and system applications (versions) a software system need to include, so the closed source applications could be designed for Linux operating system. LSB sures that applications could run on different distributions (software systems) as designed, without worrying different versions of system softwares. http://www.usenix.org/publications/login/2006-04/openpdfs/herder.pdf The article should be written as LSB and computer science definates the operating system and so on the Linux as the OS.
No meat[edit]
This article is missing the meat - some content of the LSB standard, the most important content by some measure. As it is it is just a bunch of links. --Mortense (talk) 01:26, 16 November 2010 (UTC)
In a horrible state just is LSB's online presence is[edit]
This article is on WikiProject Linux but I am offended I see little edits like `s/ ISO / International Organization for Standardization /g` in the article's history, yet...
1/ It's outdated:
redirect to linuxfoundation.org home page full of marketspeak-laced press releases and blogs;
times out;
just a dead link NXDOMAIN (and the 2nd level, freestandards.org redirects to linuxfoundation.org).
2/ It doesn't serve its purpose well:
• "ISO standard" section lists every single part of the spec for every single architecture (is that necessary?)
- all links to costly (~190+ Euro) PDFs at the ISO Catalogue, followed by a reference to ISO Publicly Available Standards (server directory listing with .zip-ed files, an attempt to download it leads to License agreement warning user that (s)he is 'about to download a document protected by copyright law').
I suggest just listing mentioning ISO number for each specified architecture, with both links to the Abstract in the Catalogue and direct links to the .zip (informing users it's a PDF in a ZIP and that they don't have to pay for just reading it).
I think most people come to see the WP page to get to know what it is and what it is for, and to get the thing itself (because it's a standard and a FOSS standard).
• This WP article just deviates from the common structure most nominated articles have:
Details on what LSB specifies are very limited, version history too detailed, yet no information on the standard's origin and formation and motivation behind it.
Wikipedia readers should be informed about the abysmal state of matters concerning Linux 'Standard' Base. A reader should easily find out the standard is copyright protected and hardly accessible, and given clearest instructions which will lead him/her to the standard itself with least hassle possible because (s)he has a right to at least download a copy.
Criticism section should be expanded with something explaining that it seems Linux Foundation basically doesn't care about LSB or anything, judging from their web presence at least (once a reputable source of such a dispute is found).
I'm also in hope someone at Linux Foundation will notice WP article mentions in what sad shape their own web presence is.
Do you know why it has decayed so much?
--
I have little time and done no big edits on WP but will do it one day even if it meant no sleep.
I appologize for being socially inept and confrontational.
I haven't edited the article yet because of no feedback received yet. This talk page entry should also serve myself as an outline.
My first edits of this article will be small and incremental. 87.197.105.141 (talk) 13:29, 21 February 2013 (UTC)
External links modified[edit]
Hello fellow Wikipedians,
I have just modified one external link on Linux Standard Base. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).
Question? Archived sources still need to be checked
Cheers.—cyberbot IITalk to my owner:Online 05:30, 1 April 2016 (UTC) | {
"url": "https://en.wikipedia.org/wiki/Talk:Linux_Standard_Base",
"source_domain": "en.wikipedia.org",
"snapshot_id": "crawl=CC-MAIN-2016-44",
"warc_metadata": {
"Content-Length": "41994",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SYCUJTPTKODABS74DIHDO6ZNNMRW5ZWR",
"WARC-Concurrent-To": "<urn:uuid:1b8f836c-134d-46af-a576-fece7b772a92>",
"WARC-Date": "2016-10-22T04:42:02Z",
"WARC-IP-Address": "208.80.154.224",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:42IECFZ5QFR5PODPGLKXRODJWB7PMRKU",
"WARC-Record-ID": "<urn:uuid:78cd0796-31e8-4128-ac19-8b25de4bcfb9>",
"WARC-Target-URI": "https://en.wikipedia.org/wiki/Talk:Linux_Standard_Base",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:51b81438-483f-431d-8d7f-091884a161ff>"
},
"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,
25,
26,
64,
92,
146,
417,
519,
606,
608,
609,
644,
645,
925,
926,
1049,
1050,
1066,
1067,
1259,
1260,
1302,
1303,
1317,
1318,
1481,
1482,
1571,
1704,
1705,
1720,
1721,
2563,
2564,
2578,
2579,
2778,
2779,
2838,
2839,
3012,
3013,
3031,
3032,
3126,
3127,
3138,
3139,
3238,
3239,
3240,
3278,
3279,
3393,
3394,
3702,
3703,
3950,
3951,
3952,
4117,
4118,
4208,
4209,
4371,
4372,
4730,
4731,
4966,
4967,
4968,
5090,
5130,
5131,
5134,
5231,
5232,
5295,
5426,
5540,
5541,
5571,
5572,
5598,
5599,
5877,
5878,
6035,
6036,
6088,
6089
],
"line_end_idx": [
25,
26,
64,
92,
146,
417,
519,
606,
608,
609,
644,
645,
925,
926,
1049,
1050,
1066,
1067,
1259,
1260,
1302,
1303,
1317,
1318,
1481,
1482,
1571,
1704,
1705,
1720,
1721,
2563,
2564,
2578,
2579,
2778,
2779,
2838,
2839,
3012,
3013,
3031,
3032,
3126,
3127,
3138,
3139,
3238,
3239,
3240,
3278,
3279,
3393,
3394,
3702,
3703,
3950,
3951,
3952,
4117,
4118,
4208,
4209,
4371,
4372,
4730,
4731,
4966,
4967,
4968,
5090,
5130,
5131,
5134,
5231,
5232,
5295,
5426,
5540,
5541,
5571,
5572,
5598,
5599,
5877,
5878,
6035,
6036,
6088,
6089,
6157
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 6157,
"ccnet_original_nlines": 90,
"rps_doc_curly_bracket": 0.0006496700225397944,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3677269220352173,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05585724860429764,
"rps_doc_frac_lines_end_with_ellipsis": 0.021978020668029785,
"rps_doc_frac_no_alph_words": 0.21334367990493774,
"rps_doc_frac_unique_words": 0.46316853165626526,
"rps_doc_mean_word_length": 4.891019344329834,
"rps_doc_num_sentences": 57,
"rps_doc_symbol_to_word_ratio": 0.0015515900449827313,
"rps_doc_unigram_entropy": 5.5722503662109375,
"rps_doc_word_count": 991,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.023107079789042473,
"rps_doc_frac_chars_dupe_6grams": 0.010315660387277603,
"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.005776769947260618,
"rps_doc_frac_chars_top_3gram": 0.009903029538691044,
"rps_doc_frac_chars_top_4gram": 0.00742727005854249,
"rps_doc_books_importance": -550.8936767578125,
"rps_doc_books_importance_length_correction": -550.8936767578125,
"rps_doc_openwebtext_importance": -328.5672302246094,
"rps_doc_openwebtext_importance_length_correction": -328.5672302246094,
"rps_doc_wikipedia_importance": -224.822265625,
"rps_doc_wikipedia_importance_length_correction": -224.822265625
},
"fasttext": {
"dclm": 0.039045751094818115,
"english": 0.9497354030609131,
"fineweb_edu_approx": 1.6970847845077515,
"eai_general_math": 0.18710404634475708,
"eai_open_web_math": 0.3053533434867859,
"eai_web_code": 0.009302199818193913
}
} | {
"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": "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": "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": "5",
"label": "Social/Forum"
}
},
"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": "5",
"label": "Comment Section"
},
"secondary": {
"code": "18",
"label": "Q&A Forum"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
5,828,985,485,898,766,000 | Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.
Fixes
Fix: Minecraft not Responding 1.14 [Complete Guide]
Minecraft is undoubtedly the most popular game and is played all around the world. Its cross-platform play is available for Xbox One, PS4, Nintendo Switch, etc and the game can be found in the most popular gaming stores like Steam easily. The game is very robust and easy to play therefore is preferred by several gaming geeks but recently they’ve gone through Minecraft not responding 1.14 issue that has been addressed in the guide below.
Minecraft Error
What causes Minecraft 1.14 not responding issue?
After going through the user guides that were used to fix this error, we concluded that the following are the reasons behind its occurrence.
• Discord Overlay: If you are using Discord on your computer, you are surely familiar with the Discord Overlay feature. However useful, this feature can sometimes trigger the Minecraft 1.14 not responding error while trying to launch the game and it prevents it from working properly.
• Outdated Device Drivers: Your drivers should be updated to the latest version at all times to ensure the complete functionality of the computer. If your drivers are outdated and haven’t been updated to the latest versions, then they can trigger incompatibilities with the game or the operating system which can result in the Minecraft 1.14 not responding error.
• Outdated Java Version: Java is a very important software that is required by Minecraft to work properly. This software should also be updated to the latest version side by side with the game to accommodate for new features and bug fixes. If your Java version is outdated, it can trigger the Minecraft 1.14 not responding error.
• Java’s Cache: In some cases, your Java installation might have acquired some corrupted cache due to which its functionality might be limited and that can trigger the Minecraft 1.14 not responding error on your computer. It is best to replace this cache with the new one to ensure the proper functionality of the software.
• Old Game Version: If Minecraft isn’t updated to the latest version it can trigger the Minecraft not responding error due to incompatibility with the game servers which require the game to be the latest version released by Mojang.
Now that you are familiar with the triggers that are behind this error, we can move on towards implementing fixes for the Minecraft 1.14 not responding issue.
Before you start:
1. Take the power adapter of your router out of the socket and wait for it to completely shut down.
Removing the Plug from the socket to fix minecraft not responding 1.14
Removing the Plug from the socket
2. Now detach all the power cords from your computer and shut it down.
3. After waiting for a couple of minutes, reinsert the power adapter of the router and your computer back into the socket, restart it and wait till your computer acquires complete network signals.
4. Afterward, open your browser and check whether the Minecraft servers are working properly or not, maybe they would be under maintenance.
Fixing the Minecraft not responding 1.14 issue:
Solution 1: Eradicate Minecraft from task manager
1. Press “Shift + Ctrl + Esc” simultaneously on the keyboard to open the “Task Manager”.
2. Now locate and select “MinecraftLauncher.exe” right-click on it and select “End Task”.
Terminate minecraft to fix minecraft not responding 1.14 issue
Terminating Minecraft
Solution 2: Grant Minecraft administrator privileges
1. From the desktop, right-click on Minecraft Launcher and select “Properties”.
2. Now proceed to the “Compatability” mode and check the box that is associated with “Run this program as an administrator”.
Run as administrator
Running a program as an administrator
3. Now apply the changes and check whether the minecraft java not responding 1.14 issue still persists.
Solution 3: Run Minecraft in Compatability mode
1. Navigate to the desktop, right-click on Minecraft and select “Properties”.
2. Now move to the “Compatability” mode and check the box that is associated with “Run this program in compatibility mode for” option.
Run in compatibility mode
Running in compatibility mode
3. Now select a version of Windows, apply the settings and launch Minecraft and see whether the error is rectified.
Solution 4: Disable Discord overlay
1. Open Discord and click on the “Settings” located at the bottom of the screen.
Choose Settings
Click on Settings
2. Now navigate to the “Overlay” tab from the left pane and “Disable” the toggle button parallel to the “Enable In-game overlay” option located at the right side of the window.
Enable overlay to fix minecraft not responding 1.14 error
Enabling Overlay
Solution 5: Disable incompatible software
1. Press “Shift + Ctrl + Esc” simultaneously on the keyboard to open the “Task Manager”.
2. Now locate and select any incompatible software under the “Processes” tab, right-click on it and select “End Task”.
End Tasks to fix minecraft not responding 1.14 issue
Ending Tasks
3. A list of Incompatible softwares that are responsible for triggering such kind of errors on Minecraft are indexed on Minecraft’s website.
Solution 6: Update your device drivers
1. Open “Google Chrome” or any other browser and download Driver Easy.
2. Double-click on the downloaded executable file and install and Driver Easy by following the on-screen instructions.
3. Now run the software and click the Scan Now” button.
Click Scan Now to fix minecraft not responding 1.14 issue
Click Scan Now
4. Now a list will appear that will be comprising all the outdated drivers on your computer. You can update them manually by clicking the update button parallel to every driver or you can update them collectively by clicking the Update all” button at the bottom.
Update Drivers to get rid of minecraft not responding 1.14 issue
Updating Drivers
5. Now restart your computer and check whether the minecraft not responding 1.14 issue is rectified.
Solution 7: Disable certain mods
1. Login to your Minecraft “Control Panel” and stop your server.
2. From the “File” menu, select “FTP File Access” and enter your FTP password.
FTP File Access
Choose FTP FIle Access
3. From the “Server folder” list, click on the “Mods” folder.
Choose Mods
Choosing Mods
4. Now select the mod you want to disable and click on the “Rename” button at the top of the page.
5. Now add “.disable” at the end of the mod name. (For Example: change “Baubles.jar” to “Baubles.jar.disable”).
Rename mods to fix minecraft not responding 1.14 issue
Renaming mods
6. Now “Apply” the changes and exit your FTP connection.
7. Restart your server and check whether the minecraft 1.14 not responding issue is rectified.
Solution 8: Uninstall ByteFence or any other anti-virus software
1. Press “Windows key + R” on the keyboard to open the run box and search for “appwiz.cpl”.
Run Command to fix minecraft not responding 1.14 issue
Running Command
2. Now locate “ByteFence” or any other third-party antivirus software from the list of Softwares installed on your computer, right-click on it and select “Uninstall”.
Uninstall ByteFence
Uninstalling ByteFence
3. Now launch Minecraft again and check whether the error minecraft not responding 1.14 issue persists. If it still exists there is no need to worry, proceed to the next potential fix stated below.
Solution 9: Use Malwarebytes ADWCleaner
1. Open “Google Chrome” or any other browser and download ADWCleaner.
2. Double-click on the downloaded executable file and install the software by following the on-screen instructions.
3. Now launch the tool and click on the “Scan” button to start the scanning process.
Scan for viruses to fix minecraft not responding 1.14 issue
Scanning for viruses
4. When your system has been scanned look for any potential threats and if there are any delete them and afterward check whether the error is rectified.
Solution 10: Update JAVA and JAVA SE Runtime
JAVA:
1. Right-click on “This PC” and select “Properties.”
Choosing Properties
Choose Properties
2. Under the “System” section, note down your “System Type”.
Note your system type to fix minecraft not responding 1.14 problem
Note system type
3. Now launch “Google Chrome” or any other browser and download the JAVA version that is compatible with your system.
4. Now right-click on the downloaded executable file and select “Extract here”. Now select the extracted folder and hit “Ctrl + C” from the on the keyboard to copy the folder.
5. Now navigate to the following path in your directory and paste the copied folder here.
C:\Program Files\Java (for 32 bit)
C:\Program Files (x86)\Java (for 64 bit)
6. Now launch “Minecraft’s Mode Manager” and click on the “Edit Profile” button located at the bottom of the screen.
7. Now check the box parallel to “Executable”, under the “Java settings (Advanced)” section, and paste the path of your JAVA file that you just replaced in the directory.
JAVA SE Runtime:
1. Press “Windows + R” on the keyboard to open the run box and search for “Control Panel”.
Searching Control panel
Searching Control panel
2. Now locate and double-click on the “JAVA” icon, navigate to the “JAVA” tab and click on the “View” button.
Click on view option to fix minecraft not responding 1.14 issue
Choose View Option
3. Now check the box parallel to the latest “Latest Java Runtime version” and click “OK” to save settings.
Enable settings
Enabling Settings
4. Now save the changes and close the JAVA control panel.
5. Now restart your PC and launch Minecraft to see whether the error persists.
Solution 11: Clear JAVA cache
1. Press “Windows + R” on the keyboard to open the run box and search for “Control Panel”.
Search Control Panel
Searching Control panel
2. Now locate and double-click on the “JAVA” icon and choose “Settings” located under the Temporary Internet Files” section.
Choosing Temporary files
Choosing Temporary Internet Files
3. Now click on the “Delete Files” option and then click on “OK”.
Delete Temporary Files to fix minecraft not responding 1.14 issue
Delete Temporary Files
4. After removing the cache hopefully, the error would be rectified.
Solution 12: Change the Modded server’s location
Many people have reported that this error was triggered on their computer because they had placed the “Modded server” in the “.minecraft” folder. They resolved the error on their PC simply by copying the modded server from .minecraft folder to the “modpack” folder.
Solution 13: Perform a clean boot
1. Press “Windows key + R” on the keyboard to open the run box and search for “msconfig”.
Typing in "Msconfig"
Typing in “Msconfig”
2. Navigate to the “Services” tab and check the box parallel to “Hide all Microsoft services”.
Hide Microsoft services
Hiding Microsoft services
3. Now click on the “Disable all” button then click on “OK”.
4. Navigate to the “Startup” tab and select “Open Task Manager”.
Open Task manager
Opening Task Manager
5. Under the “Startup” tab, select an application that you don’t want to be started at the time of boot, and select “Disable”.
Disabling startup apps
Disable all startup applications
Solution 14: Update Minecraft
1. Press “Windows key + R” on the keyboard to open the run box and search for “%appdata%”.
Run command
Running the command
2. Now locate and double-click on the “.minecraft” folder.
3. Navigate to the “Version” folder, press “Ctrl + A” from the keyboard, and hit the “Delete” key.
Update minecraft to fix minecraft not responding 1.14 issue
Updating Minecraft
4. When the deletion process is complete, launch Minecraft to automatically detect the changes.
Solution 15: Reinstall Minecraft
1. Press “Windows key + R” from the keyboard to open the run box and search for “appwiz.cpl”.
Run command
Running the command
2. Now locate Minecraft from the list of Softwares installed on your computer, right-click on it and select “Uninstall”.
Uninstall minecraft
Uninstalling Minecraft
3. Now launch a browser and download Minecraft from its official website.
Solution 16: Check for Windows updates
1. Press “Windows + I” keys on the keyboard to open “Settings” and choose “Update and Security”.
Choose Update and security option
Click on Update and Security
2. Navigate to the “Windows Update” tab from the left side of the screen and select “Check for Updates”.
Check for updates
Check for updates
3. When the Windows is updated, launch Minecraft to see whether the minecraft not responding 1.14 issue has been rectified.
If you are still unable to fix this issue, you can contact us for any further assistance.
Alan Adams
Alan is a hardcore tech enthusiast that lives and breathes tech. When he is not indulged in playing the latest video games, he helps users with technical problems that they might run into. Alan is a Computer Science Graduate with a Masters in Data Science.
Back to top button | {
"url": "https://techisours.com/fix-minecraft-not-responding-1-14/",
"source_domain": "techisours.com",
"snapshot_id": "CC-MAIN-2023-23",
"warc_metadata": {
"Content-Length": "237192",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:3SJTWML3YA5VUHCRGAT7AYWUE3O3JOKK",
"WARC-Concurrent-To": "<urn:uuid:3f400aa7-7515-4a1a-b67b-eb029642be7e>",
"WARC-Date": "2023-05-30T11:37:37Z",
"WARC-IP-Address": "104.21.44.221",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5SPWZTQ56E67MAL5PNIEL63VS42NIDWZ",
"WARC-Record-ID": "<urn:uuid:f42f0417-5a9e-498e-9a67-80d1b8e66e9b>",
"WARC-Target-URI": "https://techisours.com/fix-minecraft-not-responding-1-14/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8c020151-d13d-4efd-9f50-eb5b0193b214>"
},
"warc_info": "isPartOf: CC-MAIN-2023-23\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-247\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,
141,
147,
148,
200,
201,
642,
643,
659,
660,
709,
710,
851,
852,
1139,
1505,
1837,
2163,
2397,
2398,
2557,
2558,
2576,
2577,
2679,
2754,
2792,
2865,
3064,
3206,
3207,
3255,
3256,
3306,
3307,
3398,
3490,
3557,
3583,
3584,
3637,
3638,
3720,
3847,
3872,
3914,
4020,
4021,
4069,
4070,
4150,
4287,
4317,
4351,
4469,
4470,
4506,
4507,
4590,
4610,
4632,
4811,
4873,
4894,
4895,
4937,
4938,
5029,
5150,
5207,
5224,
5367,
5368,
5407,
5408,
5481,
5602,
5660,
5722,
5741,
6006,
6075,
6096,
6199,
6200,
6233,
6234,
6301,
6382,
6402,
6429,
6493,
6509,
6527,
6628,
6742,
6801,
6819,
6878,
6975,
6976,
7041,
7042,
7136,
7195,
7215,
7384,
7408,
7435,
7635,
7636,
7676,
7677,
7749,
7867,
7954,
8018,
8043,
8198,
8199,
8244,
8245,
8251,
8306,
8330,
8352,
8415,
8486,
8507,
8627,
8805,
8897,
8944,
8991,
9110,
9283,
9300,
9393,
9421,
9449,
9561,
9629,
9652,
9761,
9781,
9803,
9863,
9944,
9945,
9975,
9976,
10069,
10094,
10122,
10249,
10278,
10316,
10384,
10454,
10481,
10552,
10553,
10602,
10603,
10869,
10870,
10904,
10905,
10997,
11022,
11047,
11144,
11172,
11202,
11265,
11332,
11354,
11379,
11508,
11535,
11572,
11573,
11603,
11604,
11697,
11713,
11737,
11798,
11899,
11963,
11986,
12084,
12085,
12118,
12119,
12215,
12231,
12255,
12378,
12402,
12429,
12505,
12506,
12545,
12546,
12645,
12683,
12716,
12823,
12845,
12867,
12993,
12994,
13084,
13085,
13096,
13097,
13354
],
"line_end_idx": [
141,
147,
148,
200,
201,
642,
643,
659,
660,
709,
710,
851,
852,
1139,
1505,
1837,
2163,
2397,
2398,
2557,
2558,
2576,
2577,
2679,
2754,
2792,
2865,
3064,
3206,
3207,
3255,
3256,
3306,
3307,
3398,
3490,
3557,
3583,
3584,
3637,
3638,
3720,
3847,
3872,
3914,
4020,
4021,
4069,
4070,
4150,
4287,
4317,
4351,
4469,
4470,
4506,
4507,
4590,
4610,
4632,
4811,
4873,
4894,
4895,
4937,
4938,
5029,
5150,
5207,
5224,
5367,
5368,
5407,
5408,
5481,
5602,
5660,
5722,
5741,
6006,
6075,
6096,
6199,
6200,
6233,
6234,
6301,
6382,
6402,
6429,
6493,
6509,
6527,
6628,
6742,
6801,
6819,
6878,
6975,
6976,
7041,
7042,
7136,
7195,
7215,
7384,
7408,
7435,
7635,
7636,
7676,
7677,
7749,
7867,
7954,
8018,
8043,
8198,
8199,
8244,
8245,
8251,
8306,
8330,
8352,
8415,
8486,
8507,
8627,
8805,
8897,
8944,
8991,
9110,
9283,
9300,
9393,
9421,
9449,
9561,
9629,
9652,
9761,
9781,
9803,
9863,
9944,
9945,
9975,
9976,
10069,
10094,
10122,
10249,
10278,
10316,
10384,
10454,
10481,
10552,
10553,
10602,
10603,
10869,
10870,
10904,
10905,
10997,
11022,
11047,
11144,
11172,
11202,
11265,
11332,
11354,
11379,
11508,
11535,
11572,
11573,
11603,
11604,
11697,
11713,
11737,
11798,
11899,
11963,
11986,
12084,
12085,
12118,
12119,
12215,
12231,
12255,
12378,
12402,
12429,
12505,
12506,
12545,
12546,
12645,
12683,
12716,
12823,
12845,
12867,
12993,
12994,
13084,
13085,
13096,
13097,
13354,
13372
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 13372,
"ccnet_original_nlines": 217,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.312051385641098,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013978090137243271,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2300717830657959,
"rps_doc_frac_unique_words": 0.2634560763835907,
"rps_doc_mean_word_length": 4.935788631439209,
"rps_doc_num_sentences": 199,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.398392200469971,
"rps_doc_word_count": 2118,
"rps_doc_frac_chars_dupe_10grams": 0.10837957262992859,
"rps_doc_frac_chars_dupe_5grams": 0.30017217993736267,
"rps_doc_frac_chars_dupe_6grams": 0.259422242641449,
"rps_doc_frac_chars_dupe_7grams": 0.20394107699394226,
"rps_doc_frac_chars_dupe_8grams": 0.14492060244083405,
"rps_doc_frac_chars_dupe_9grams": 0.11813659965991974,
"rps_doc_frac_chars_top_2gram": 0.034819211810827255,
"rps_doc_frac_chars_top_3gram": 0.04208914935588837,
"rps_doc_frac_chars_top_4gram": 0.045437149703502655,
"rps_doc_books_importance": -1103.4788818359375,
"rps_doc_books_importance_length_correction": -1103.4788818359375,
"rps_doc_openwebtext_importance": -657.16845703125,
"rps_doc_openwebtext_importance_length_correction": -657.16845703125,
"rps_doc_wikipedia_importance": -522.365966796875,
"rps_doc_wikipedia_importance_length_correction": -522.365966796875
},
"fasttext": {
"dclm": 0.2083720564842224,
"english": 0.8512332439422607,
"fineweb_edu_approx": 1.3277429342269897,
"eai_general_math": 0.15641343593597412,
"eai_open_web_math": 0.05668365955352783,
"eai_web_code": 0.044510070234537125
}
} | {
"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.457",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "1",
"label": "Factual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,608,818,125,565,444,000 | C5-E EtherNetIP/USB Online-Handbuch
Objektverzeichnis Beschreibung
Übersicht
In diesem Kapitel finden Sie eine Beschreibung aller Objekte.
Sie finden hier Angaben zu:
• Funktionen
• Objektbeschreibungen ("Index")
• Wertebeschreibungen ("Subindices")
• Beschreibungen von Bits
• Beschreibung des Objekts
Aufbau der Objektbeschreibung
Die Beschreibung der Objekteinträge ist immer gleich aufgebaut und besteht im Normalfall aus folgenden Abschnitten:
Funktion
In diesem Abschnitt wird kurz die Funktion des Objektverzeichnisses beschrieben.
Objektbeschreibung
Diese Tabelle gibt detailliert Auskunft über den Datentyp, Vorgabewerte und dergleichen. Eine genaue Beschreibung findet sich im Abschnitt "Objektbeschreibung"
Wertebeschreibung
Diese Tabelle ist nur bei dem Datentyp "Array" oder "Record" verfügbar und gibt genaue Auskunft über die Untereinträge. Eine genauere Beschreibung der Einträge findet sich im Abschnitt "Wertebeschreibung"
Beschreibung
Hier werden genauere Angaben zu den einzelnen Bits eines Eintrags gemacht oder eventuelle Zusammensetzungen erläutert. Eine genauere Beschreibung findet sich im Abschnitt "Beschreibung"
Objektbeschreibung
Die Objektbeschreibung besteht aus einer Tabelle, welche folgende Einträge enthält:
Index
Benennt den Index des Objekts in Hexadezimalschreibweise.
Objektname
Der Name des Objekts.
Object Code
Der Typ des Objekts. Das kann einer der folgenden Einträge sein:
• VARIABLE: In dem Fall besteht das Objekt nur aus einer Variable, die mit dem Subindex 0 indiziert wird.
• ARRAY: Diese Objekte bestehen immer aus einem Subindex 0 - welcher die Menge der Untereinträge angibt - und den Untereinträgen selber ab dem Index 1. Der Datentyp innerhalb eines Arrays ändert sich nie, das heißt, Untereintrag 1 und alle folgenden Einträge haben immer den gleichen Datentyp.
• RECORD: Diese Objekte bestehen immer aus einem Untereintrag mit dem Subindex 0 - welcher die Menge der Untereinträge angibt - und den Untereinträgen selber ab dem Index 1. Im Gegensatz zu einem ARRAY kann der Datentyp der Subeinträge variieren, das bedeutet, dass beispielsweise Untereintrag 1 einen anderen Datentyp als Untereintrag 2 haben kann.
• VISIBLE_STRING: Das Objekt beschreibt eine in ASCII codierte Zeichenkette. Die Länge des Strings wird in Subindex 0 angegeben, die einzelnen Zeichen sind ab Subindex 1 gespeichert. Diese Zeichenketten sind nicht durch ein Null-Zeichen terminiert.
Datentyp
Hier wird die Größe und die Interpretation des Objekts angegeben. Für den Object Code "VARIABLE" gilt folgende Schreibweise:
• Es wird unterschieden zwischen Einträgen die vorzeichenbehaftet sind, das wird mit dem Präfix "SIGNED" bezeichnet. Für die vorzeichenunbehafteten Einträge wird das Präfix "UNSIGNED" benutzt.
• Die Größe der Variable in Bit wird an das Präfix angestellt und kann entweder 8, 16 oder 32 sein.
Speicherbar
Hier wird beschreiben ob dieses Objekt speicherbar ist und wenn ja, unter welcher Kategorie.
Firmware Version
Hier ist die Firmwareversion eingetragen, ab der das Objekt verfügbar ist.
Änderungshistorie (ChangeLog)
Hier werden eventuelle Änderungen an dem Objekt notiert.
Zudem gibt es noch die Einträge für den Datentyp "VARIABLE" folgende Tabelleneinträge:
Zugriff
Hier wird die Zugriffsbeschränkung eingetragen. Folgende Beschränkungen gibt es:
• "lesen/schreiben": Das Objekt kann sowohl gelesen, als auch geschrieben werden
• "nur lesen": Das Objekt kann nur aus dem Objektverzeichnis gelesen werden. Setzen eines Werte ist nicht möglich.
PDO-Mapping
Einige Bussysteme, wie CANopen oder EtherCAT unterstützen ein PDO-Mapping. In diesem Tabelleneintrag wird beschrieben, ob das Objekt in ein Mapping eingefügt werden darf und in welches. Dabei gibt es folgende Bezeichnungen:
• "no": Das Objekt darf in kein Mapping eingetragen werden.
• "TX-PDO": Das Objekt darf in ein RX Mapping eingetragen werden.
• "RX-PDO": Das Objekt dar in ein TX Mapping eingetragen werden.
Zulässige Werte
In einigen Fällen ist es nur erlaubt, bestimmte Werte in das Objekt zu schreiben. Sollte das der Fall sein, werden diese Werte hier aufgelistet. Besteht keine Beschränkung bleibt das Feld leer.
Vorgabewert
Um die Steuerung beim Einschalten in einen gesicherten Zustand zu bringen ist es nötig, einige Objekte mit Werten vorzubelegen. Der Wert, der beim Start der Steuerung in das Objekt geschrieben wird, wird in diesem Tabelleneintrag notiert.
Wertebeschreibung
Anmerkung: Der Übersichtlichkeit halber werden einige Subindizes zusammengefasst, wenn die Einträge alle den gleichen Namen haben.
In der Tabelle mit der Überschrift "Wertebeschreibung" werden alle Daten für Untereinträge mit Subindex 1 oder höher aufgelistet. Die Tabelle beinhaltet folgende Einträge:
Subindex
Nummer des aktuell beschriebenen Untereintrages.
Name
Der Name des Untereintrages.
Datentyp
Hier wird die Größe und die Interpretation des Untereintrages angegeben. Hier gilt immer folgende Schreibweise:
• Es wird unterschieden zwischen Einträgen die vorzeichenbehaftet sind, das wird mit dem Präfix "SIGNED" bezeichnet. Für die vorzeichenunbehafteten Einträge wird das Präfix "UNSIGNED" benutzt.
• Die Größe der Variable in Bit wird an das Präfix angestellt und kann entweder 8, 16 oder 32 sein.
Zugriff
Hier wird die Zugriffsbeschränkung für den Untereintrag eingetragen. Folgende Beschränkungen gibt es:
• "lesen/schreiben": Das Objekt kann sowohl gelesen, als auch geschrieben werden
• "nur lesen": Das Objekt kann nur aus dem Objektverzeichnis gelesen werden. Setzen eines Wertes ist nicht möglich.
PDO-Mapping
Einige Bussysteme, wie CANopen oder EtherCAT unterstützen ein PDO-Mapping. In diesem Tabelleneintrag wird beschrieben, ob der Untereintrag in ein Mapping eingefügt werden darf und in welches. Dabei gibt es folgende Bezeichnungen:
• "no": Das Objekt darf in kein Mapping eingetragen werden.
• "TX-PDO": Das Objekt darf in ein RX Mapping eingetragen werden.
• "RX-PDO": Das Objekt darf in ein TX Mapping eingetragen werden.
Zulässige Werte
In einigen Fällen ist es nur erlaubt, bestimmte Werte in den Untereintrag zu schreiben. Sollte das der Fall sein, werden diese Werte hier aufgelistet. Besteht keine Beschränkung, bleibt das Feld leer.
Vorgabewert
Um die Steuerung beim Einschalten in einen gesicherten Zustand zu bringen ist es nötig, einige Untereinträge mit Werten vor zu belegen. Der Wert, welcher beim Start der Steuerung in den Untereintrag geschrieben wird, wird in diesem Tabelleneintrag notiert.
Beschreibung
Dieser Abschnitt kann vorhanden sein, wenn die Benutzung zusätzliche Information verlangt. Sollten einzelne Bits eines Objekts oder Untereintrags unterschiedliche Bedeutung haben, so werden Diagramme wie im nachfolgenden Beispiel verwendet.
Beispiel: Das Objekt ist 8 Bit groß, Bit 0 und 1 haben separat eine Funktion. Bit 2 und 3 sind zu einer Funktion zusammengefasst, für Bit 4 bis 7 gilt das gleiche.
Beispiel [4]
Beschreibung der Bits 4 bis einschließlich 7, diese Bits gehören logisch zusammen. Die 4 in den eckigen Klammern gibt die Anzahl der zusammengehörigen Bits an. Oftmals wird an der Stelle noch eine Liste mit möglichen Werten und deren Beschreibung angehängt.
Beispiel [2]
Beschreibung der Bits 3 und 2, diese Bits gehören logisch zusammen. Die 2 in den eckigen Klammern gibt die Anzahl der zusammengehörigen Bits an.
• Wert 00b: Die Beschreibung an dieser Stelle gilt, wenn Bit 2 und Bit 3 auf "0" sind.
• Wert 01b: Die Beschreibung an dieser Stelle gilt, wenn Bit 2 auf "0" und Bit 3 auf "1" ist.
• Wert 10b: Die Beschreibung an dieser Stelle gilt, wenn Bit 2 auf "1" und Bit 3 auf "0" ist.
• Wert 11b: Die Beschreibung an dieser Stelle gilt, wenn Bit 2 und Bit 3 auf "1" sind.
B
Beschreibung des Bits B, auf die Längenangabe wird bei einem einzelnen Bit verzichtet.
A
Beschreibung des Bits A, Bits mit grauen Hintergrund bleiben ungenutzt.
▶ next
Contents | {
"url": "https://us.nanotec.com/products/manual/C5E_EtherNetIP_USB_DE/object_dictionary%252Fobject_dir_intro.html/",
"source_domain": "us.nanotec.com",
"snapshot_id": "crawl=CC-MAIN-2019-51",
"warc_metadata": {
"Content-Length": "136623",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UARVOBVOLPQ63GZA4BLWNTG3JNRJOFUP",
"WARC-Concurrent-To": "<urn:uuid:81bb7f6f-ad38-41f6-9868-a38d7dfce454>",
"WARC-Date": "2019-12-11T00:09:56Z",
"WARC-IP-Address": "104.26.11.10",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:RYGRSZZVOCHM625J7HWBRZ7TH44HHEE2",
"WARC-Record-ID": "<urn:uuid:fb07a049-baa6-43f2-8f88-221e6477f7e6>",
"WARC-Target-URI": "https://us.nanotec.com/products/manual/C5E_EtherNetIP_USB_DE/object_dictionary%252Fobject_dir_intro.html/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b82ff5ac-de69-4aae-9709-4a387d0f221f>"
},
"warc_info": "isPartOf: CC-MAIN-2019-51\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for December 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-194.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,
36,
37,
68,
69,
79,
80,
142,
143,
171,
172,
187,
222,
261,
289,
318,
319,
349,
350,
466,
467,
476,
557,
576,
736,
754,
959,
972,
1158,
1159,
1178,
1179,
1263,
1264,
1270,
1328,
1339,
1361,
1373,
1438,
1546,
1842,
2194,
2445,
2454,
2579,
2774,
2876,
2888,
2981,
2998,
3073,
3103,
3160,
3161,
3248,
3249,
3257,
3338,
3421,
3538,
3550,
3774,
3836,
3904,
3971,
3987,
4181,
4193,
4432,
4433,
4451,
4452,
4583,
4584,
4756,
4757,
4766,
4815,
4820,
4849,
4858,
4970,
5165,
5267,
5275,
5377,
5460,
5578,
5590,
5820,
5882,
5950,
6018,
6034,
6235,
6247,
6504,
6505,
6518,
6519,
6760,
6761,
6925,
6926,
6939,
7197,
7210,
7355,
7444,
7540,
7636,
7725,
7727,
7814,
7816,
7888,
7897,
7898
],
"line_end_idx": [
36,
37,
68,
69,
79,
80,
142,
143,
171,
172,
187,
222,
261,
289,
318,
319,
349,
350,
466,
467,
476,
557,
576,
736,
754,
959,
972,
1158,
1159,
1178,
1179,
1263,
1264,
1270,
1328,
1339,
1361,
1373,
1438,
1546,
1842,
2194,
2445,
2454,
2579,
2774,
2876,
2888,
2981,
2998,
3073,
3103,
3160,
3161,
3248,
3249,
3257,
3338,
3421,
3538,
3550,
3774,
3836,
3904,
3971,
3987,
4181,
4193,
4432,
4433,
4451,
4452,
4583,
4584,
4756,
4757,
4766,
4815,
4820,
4849,
4858,
4970,
5165,
5267,
5275,
5377,
5460,
5578,
5590,
5820,
5882,
5950,
6018,
6034,
6235,
6247,
6504,
6505,
6518,
6519,
6760,
6761,
6925,
6926,
6939,
7197,
7210,
7355,
7444,
7540,
7636,
7725,
7727,
7814,
7816,
7888,
7897,
7898,
7906
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 7906,
"ccnet_original_nlines": 118,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.028404949232935905,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02549161948263645,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.21558630466461182,
"rps_doc_frac_unique_words": 0.2805628776550293,
"rps_doc_mean_word_length": 5.74230432510376,
"rps_doc_num_sentences": 73,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.210346221923828,
"rps_doc_word_count": 1137,
"rps_doc_frac_chars_dupe_10grams": 0.39454740285873413,
"rps_doc_frac_chars_dupe_5grams": 0.47848060727119446,
"rps_doc_frac_chars_dupe_6grams": 0.4450911283493042,
"rps_doc_frac_chars_dupe_7grams": 0.4242610037326813,
"rps_doc_frac_chars_dupe_8grams": 0.40925103425979614,
"rps_doc_frac_chars_dupe_9grams": 0.40925103425979614,
"rps_doc_frac_chars_top_2gram": 0.023433910682797432,
"rps_doc_frac_chars_top_3gram": 0.02205543965101242,
"rps_doc_frac_chars_top_4gram": 0.011487210169434547,
"rps_doc_books_importance": -576.2977905273438,
"rps_doc_books_importance_length_correction": -576.2977905273438,
"rps_doc_openwebtext_importance": -289.2967224121094,
"rps_doc_openwebtext_importance_length_correction": -289.2967224121094,
"rps_doc_wikipedia_importance": -234.43301391601562,
"rps_doc_wikipedia_importance_length_correction": -234.43301391601562
},
"fasttext": {
"dclm": 0.49934786558151245,
"english": 0.0004994400078430772,
"fineweb_edu_approx": 1.855035424232483,
"eai_general_math": 0.019282279536128044,
"eai_open_web_math": 0.6735451221466064,
"eai_web_code": 0.8137955665588379
}
} | {
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
3,815,759,528,303,378,000 | Vertopal — Free Online Converter
Upload to Clouds
Drop Files Anywhere to Upload
Convert PJPEG to EPSI
Convert PJPEG pictures to EPSI format, edit and optimize pictures online and free.
Loading Uploader...
if you have uploaded a file, it will be displayed.
Confirm Cancel
Progressive JPEG Image (.pjpeg)
PJPEG Converter
Encapsulated PostScript (.epsi)
EPSI and EPS both stand for an identical format. EPSI, short for Encapsulated PostScript Interchange, is a vector file format developed by Adobe Systems. It is often used for professional and high-quality image printing and retains individual coding on color and size, allowing images to maintain their resolution when scaled. EPSI was designed to simplify the process of incorporating images and illustrations into text-based documents. EPSI is the same as plain EPS, except that it has a preview image inside it.
EPSI Converter More About EPSI
How to convert PJPEG to EPSI?
1. Upload PJPEG File
Drag & drop or browse your device to select and upload your PJPEG file.
2. Select PJPEG Tools
Before clicking the Convert button, use any available PJPEG to EPSI tools.
3. Download Your EPSI
You will be redirected to the download page to see the conversion status and download your EPSI file.
Convert PJPEG to EPSI
Tools
PJPEG Rotate
Rotate PJPEG to right (90° clockwise), to left (90° counter-clockwise), 180°, and convert it to EPSI.
PJPEG Flip
Flip PJPEG vertically and/or horizontally (flop), and convert it to EPSI.
Frequently Asked Questions
How to change PJPEG format to EPSI?
To change PJPEG format to EPSI, upload your PJPEG file to proceed to the preview page. Use any available tools if you want to edit and manipulate your PJPEG file. Click on the convert button and wait for the convert to complete. Download the converted EPSI file afterward.
Convert Files on Desktop
macOS
Windows
Linux
Convert PJPEG to EPSI on macOS
Follow steps below if you have installed Vertopal CLI on your macOS system.
1. Open macOS Terminal.
2. Either cd to PJPEG file location or include path to your input file.
3. Paste and execute the command below, substituting in your PJPEG_INPUT_FILE name or path. $ vertopal convert PJPEG_INPUT_FILE --to epsi
Convert PJPEG to EPSI on Windows
Follow steps below if you have installed Vertopal CLI on your Windows system.
1. Open Command Prompt or Windows PowerShell.
2. Either cd to PJPEG file location or include path to your input file.
3. Paste and execute the command below, substituting in your PJPEG_INPUT_FILE name or path. $ vertopal convert PJPEG_INPUT_FILE --to epsi
Convert PJPEG to EPSI on Linux
Follow steps below if you have installed Vertopal CLI on your Linux system.
1. Open Linux Terminal.
2. Either cd to PJPEG file location or include path to your input file.
3. Paste and execute the command below, substituting in your PJPEG_INPUT_FILE name or path. $ vertopal convert PJPEG_INPUT_FILE --to epsi
Loading, Please Wait... | {
"url": "https://www.vertopal.com/en/convert/pjpeg-to-epsi",
"source_domain": "www.vertopal.com",
"snapshot_id": "CC-MAIN-2023-40",
"warc_metadata": {
"Content-Length": "49763",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MFNNQKRDKIBFW6EWISYCTHK65RGTIXGR",
"WARC-Concurrent-To": "<urn:uuid:14a9ab06-5527-4f4e-a7cd-633dd9638190>",
"WARC-Date": "2023-10-04T22:20:09Z",
"WARC-IP-Address": "172.67.153.192",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:C5L54L2JWHC5WJFUFSNRM57HO7SD4KBY",
"WARC-Record-ID": "<urn:uuid:b9598bc7-6df8-46a1-94ad-f53e992e41ad>",
"WARC-Target-URI": "https://www.vertopal.com/en/convert/pjpeg-to-epsi",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:08298904-ff81-48c7-ba48-bf986f24c167>"
},
"warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-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,
33,
50,
80,
81,
103,
104,
187,
188,
208,
259,
274,
275,
307,
308,
324,
325,
357,
358,
873,
874,
905,
906,
936,
937,
960,
961,
1037,
1038,
1062,
1063,
1142,
1143,
1167,
1168,
1274,
1275,
1297,
1298,
1304,
1305,
1318,
1319,
1421,
1422,
1433,
1434,
1508,
1509,
1536,
1537,
1573,
1574,
1847,
1848,
1873,
1874,
1880,
1888,
1894,
1895,
1926,
1927,
2003,
2004,
2030,
2104,
2244,
2245,
2278,
2279,
2357,
2358,
2406,
2480,
2620,
2621,
2652,
2653,
2729,
2730,
2756,
2830,
2970,
2971
],
"line_end_idx": [
33,
50,
80,
81,
103,
104,
187,
188,
208,
259,
274,
275,
307,
308,
324,
325,
357,
358,
873,
874,
905,
906,
936,
937,
960,
961,
1037,
1038,
1062,
1063,
1142,
1143,
1167,
1168,
1274,
1275,
1297,
1298,
1304,
1305,
1318,
1319,
1421,
1422,
1433,
1434,
1508,
1509,
1536,
1537,
1573,
1574,
1847,
1848,
1873,
1874,
1880,
1888,
1894,
1895,
1926,
1927,
2003,
2004,
2030,
2104,
2244,
2245,
2278,
2279,
2357,
2358,
2406,
2480,
2620,
2621,
2652,
2653,
2729,
2730,
2756,
2830,
2970,
2971,
2994
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2994,
"ccnet_original_nlines": 84,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2951699495315552,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.10017888993024826,
"rps_doc_frac_lines_end_with_ellipsis": 0.023529410362243652,
"rps_doc_frac_no_alph_words": 0.1717352420091629,
"rps_doc_frac_unique_words": 0.3494736850261688,
"rps_doc_mean_word_length": 4.930526256561279,
"rps_doc_num_sentences": 46,
"rps_doc_symbol_to_word_ratio": 0.003577820025384426,
"rps_doc_unigram_entropy": 4.523886680603027,
"rps_doc_word_count": 475,
"rps_doc_frac_chars_dupe_10grams": 0.2993168234825134,
"rps_doc_frac_chars_dupe_5grams": 0.34457728266716003,
"rps_doc_frac_chars_dupe_6grams": 0.32066610455513,
"rps_doc_frac_chars_dupe_7grams": 0.2993168234825134,
"rps_doc_frac_chars_dupe_8grams": 0.2993168234825134,
"rps_doc_frac_chars_dupe_9grams": 0.2993168234825134,
"rps_doc_frac_chars_top_2gram": 0.038428690284490585,
"rps_doc_frac_chars_top_3gram": 0.032877881079912186,
"rps_doc_frac_chars_top_4gram": 0.04611442983150482,
"rps_doc_books_importance": -350.3750305175781,
"rps_doc_books_importance_length_correction": -350.3750305175781,
"rps_doc_openwebtext_importance": -225.48379516601562,
"rps_doc_openwebtext_importance_length_correction": -225.48379516601562,
"rps_doc_wikipedia_importance": -200.8488311767578,
"rps_doc_wikipedia_importance_length_correction": -200.8488311767578
},
"fasttext": {
"dclm": 0.1305912733078003,
"english": 0.7440954446792603,
"fineweb_edu_approx": 1.787831425666809,
"eai_general_math": 0.020585419610142708,
"eai_open_web_math": 0.07752407342195511,
"eai_web_code": 0.004831369966268539
}
} | {
"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.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
687,422,347,763,187,200 | m:n-Beziehung per ListView-Checkbox pflegen
Das Festlegen von Daten für einfache m:n-Beziehungen, die nur die reine Verknüpfung zwischen zwei Tabellen herstellen, ohne weitere Daten zu liefern, gelingt auf verschiedene Arten. In diesem Beitrag stellen wir eine Möglichkeit über das ListView-Steuerelement und hier speziell über die Kontrollkästchen der einzelnen Einträge vor.
Die Verwaltung von Daten in m:n-Beziehungen haben wir in Access im Unternehmen schon auf verschiedenste Arten durchgeführt – sogar mit Kontrollkästchen (siehe m:n-Beziehung per Kontrollkästchen verwalten, www.access-im-unternehmen.de/723). Die dortige Lösung hatte jedoch den Nachteil, dass diese allzusehr nach Datenblatt aussah (s. Bild 1). Das bekommen wir noch ein wenig professioneller hin!
pic002.png
Bild 1: Eine bekannte Lösung …
Die Lösung dieses Beitrags sieht im fertigen Zustand wie in Bild 2 aus. Das Formular heißt frmFahrzeugeAusstattungsmerkmale und ist an die Tabelle tblFahrzeuge gebunden.
pic001.png
Bild 2: … und die Variante dieses Beitrags
Datenmodell
Die im ListView angezeigten Datensätze stammen aus der Tabelle tblAusstattungsmerkmale. Für die Beziehung zwischen Fahrzeugen und Ausstattungsmerkmalen und somit auch für die Haken in den Kontrollkästchen ist die Tabelle tblFahrzeugeAusstattungsmerkmale verantwortlich. Diese Tabelle enthält ein Primärschlüsselfeld sowie zwei Fremdschlüsselfelder zu den Feldern FahrzeugID und AusstattungsmerkmalID der beiden zu verknüpfenden Tabellen. Für diese beiden Felder legen Sie einen zusammengesetzten eindeutigen Schlüssel zusammen, damit jede Kombination aus Fahrzeug und Ausstattungsmerkmal nur einmal vorkommen kann (s. Bild 4 aus.
pic004.png
Bild 3: Dieser Index sorgt für eindeutige Kombinationen aus Fahrzeugen und Ausstattungsmerkmalen
pic003.png
Bild 4: Das Datenmodell der Beispieldatenbank
Die Tabelle tblFahrzeugeAusstattungsmerkmale enthält nur Daten, wenn ein Fahrzeug ein Ausstattungsmerkmal besitzt. Zum Hinzufügen eines Ausstattungsmerkmals erstellt man einen Datensatz in dieser Tabelle, der auf die entsprechende Kombination aus Fahrzeug und Ausstattungsmerkmal verweist. Soll ein Ausstattungsmerkmal entfernt werden, löscht man analog den betroffenen Eintrag.
Aufbau des Formulars
Das Formular enthält die zwei Felder der Tabelle tblFahrzeuge sowie das ListView-Steuerelement lstListView (s. Bild 5). Das Füllen des ListView-Steuerelements mit den Daten erfolgt in zwei Schritten:
pic005.png
Bild 5: Das Formular in der Entwurfsansicht
• Im ersten Schritt werden alle Einträge der Tabelle tblAusstattungsmerkmale hinzugefügt. Dabei wird für jeden Eintrag ein ListView-Element angelegt.
• Im zweiten Schritt werden die Kontrollkästchen der ListView-Elemente in Abhängigkeit vom aktuellen Fahrzeug und von den Ausstattungsmerkmalen aktiviert.
Das ListView-Steuerelement soll auf das Anklicken des Kontrollkästchens reagieren und eine Ereignisprozedur auslösen, welche die Daten der Tabelle tblFahrzeugeAusstattungsmerkmale aktualisiert. Damit dies geschehen kann, benötigen wir eine mit dem Schlüsselwort WithEvent deklarierte Variable, die auf das ListView-Steuerelement verweist. Die Deklaration nehmen Sie im Kopf des Klassenmoduls des Formulars vor (sollte dies noch nicht vorhanden sein, stellen Sie die Formulareigenschaft Hat Modul auf den Wert Ja ein):
Dim WithEvents objListView As MSComctlLib.ListView
Beim Laden des Formulars stellt die Ereignisprozedur aus Listing 1 einige Eigenschaften des ListView-Steuerelements ein. Besonders wichtig ist hier der Wert True für die Eigenschaft Checkboxes. Danach ruft sie die Prozedur ListViewFuellen auf, die für das Eintragen aller Ausstattungsmerkmale verantwortlich ist.
Listing 1: Initialisieren des ListView-Steuerelements beim Laden des Formulars
Private Sub Form_Load()
Set objListView = Me!ctlListView.Object
With objListView
.Checkboxes = True
.Appearance = ccFlat
.BorderStyle = ccNone
.View = lvwList
.Arrange = lvwAutoTop
.LabelWrap = False
.ListItems.Clear
End With
ListViewFuellen
End Sub
Füllen des ListView-Steuerelements
Das reine Füllen des ListView-Steuerelements mit den Ausstattungsmerkmalen übernimmt die Prozedur ListViewFuellen (s. Bild 6).
Listing 2: Füllen des ListView-Steuerelements mit den Ausstattungsmerkmalen
Ende des frei verfügbaren Teil. Wenn Du mehr lesen möchtest, hole Dir ...
den kompletten Artikel im PDF-Format mit Beispieldatenbank
diesen und alle anderen Artikel mit dem Jahresabo
Schreibe einen Kommentar | {
"url": "https://access-im-unternehmen.de/mnBeziehung_per_ListViewCheckbox_pflegen/",
"source_domain": "access-im-unternehmen.de",
"snapshot_id": "CC-MAIN-2024-33",
"warc_metadata": {
"Content-Length": "196270",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MZ5DR3SNGEWROS73IM2WXXRMIQERHUJN",
"WARC-Concurrent-To": "<urn:uuid:171e243d-339d-4d8f-b9ed-2c6b8d4e0b34>",
"WARC-Date": "2024-08-07T21:47:24Z",
"WARC-IP-Address": "194.163.171.28",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5AUAUH2UBWVHINMDT47PH65KTGV4W7YY",
"WARC-Record-ID": "<urn:uuid:8a9e6089-7356-4d24-8d5d-c8bbfb7fd62c>",
"WARC-Target-URI": "https://access-im-unternehmen.de/mnBeziehung_per_ListViewCheckbox_pflegen/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:31abd99f-a6fe-489e-8f4f-c26386b122ad>"
},
"warc_info": "isPartOf: CC-MAIN-2024-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-170\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,
44,
45,
378,
379,
775,
776,
787,
788,
819,
820,
990,
991,
1002,
1003,
1046,
1047,
1059,
1060,
1690,
1691,
1702,
1703,
1800,
1801,
1812,
1813,
1859,
1860,
2239,
2240,
2261,
2262,
2462,
2463,
2474,
2475,
2519,
2520,
2672,
2829,
2830,
3348,
3349,
3400,
3401,
3714,
3715,
3794,
3795,
3819,
3863,
3884,
3911,
3940,
3970,
3994,
4024,
4051,
4076,
4089,
4109,
4117,
4118,
4153,
4154,
4281,
4282,
4358,
4359,
4433,
4434,
4493,
4494,
4544,
4545
],
"line_end_idx": [
44,
45,
378,
379,
775,
776,
787,
788,
819,
820,
990,
991,
1002,
1003,
1046,
1047,
1059,
1060,
1690,
1691,
1702,
1703,
1800,
1801,
1812,
1813,
1859,
1860,
2239,
2240,
2261,
2262,
2462,
2463,
2474,
2475,
2519,
2520,
2672,
2829,
2830,
3348,
3349,
3400,
3401,
3714,
3715,
3794,
3795,
3819,
3863,
3884,
3911,
3940,
3970,
3994,
4024,
4051,
4076,
4089,
4109,
4117,
4118,
4153,
4154,
4281,
4282,
4358,
4359,
4433,
4434,
4493,
4494,
4544,
4545,
4569
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4569,
"ccnet_original_nlines": 75,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.032531820237636566,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.001414429978467524,
"rps_doc_frac_lines_end_with_ellipsis": 0.02631578966975212,
"rps_doc_frac_no_alph_words": 0.18387553095817566,
"rps_doc_frac_unique_words": 0.5071428418159485,
"rps_doc_mean_word_length": 6.824999809265137,
"rps_doc_num_sentences": 49,
"rps_doc_symbol_to_word_ratio": 0.004243279807269573,
"rps_doc_unigram_entropy": 5.251715660095215,
"rps_doc_word_count": 560,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06384091824293137,
"rps_doc_frac_chars_dupe_6grams": 0.030873889103531837,
"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.03924646973609924,
"rps_doc_frac_chars_top_3gram": 0.033490318804979324,
"rps_doc_frac_chars_top_4gram": 0.02747252956032753,
"rps_doc_books_importance": -349.8351745605469,
"rps_doc_books_importance_length_correction": -349.8351745605469,
"rps_doc_openwebtext_importance": -208.4419403076172,
"rps_doc_openwebtext_importance_length_correction": -208.4419403076172,
"rps_doc_wikipedia_importance": -135.6226348876953,
"rps_doc_wikipedia_importance_length_correction": -135.6226348876953
},
"fasttext": {
"dclm": 0.9183803796768188,
"english": 0.0014570599887520075,
"fineweb_edu_approx": 1.9475008249282837,
"eai_general_math": 0.014166359789669514,
"eai_open_web_math": 0.5120143890380859,
"eai_web_code": 0.40215474367141724
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.452",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "1",
"label": "Truncated Snippets"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-7,792,347,202,435,145,000 | fishbone fishbone - 9 months ago 37
PHP Question
Symfony2 remove id field from submitted form data
My Symfony2 form has a text field containing the entity's ID.
I used the following to achieve this:
$formBuilder->add('id', TextType::class, ['attr' => ['readonly' => true]])
When submitting the form, which represents an existing entity, the ID is passed and Doctrine searches for an accessor method to modify the ID. At this point, an exception is thrown, as the entity doesn't allow to change the ID.
What is the common way in Symfony2 to provide a read-only field, which is not meant to be saved?
Answer
readonly is for clients. It indicates that client can't change the value of the element. But it is going to be submitted with form.
If you don't want element's value to be submitted use disabled instead. | {
"url": "https://codedump.io/share/5JlBEiTg3SzV/1/symfony2-remove-id-field-from-submitted-form-data",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "25547",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MOL6IMTIB4OISEKYR7ASJTDUFCEMPR33",
"WARC-Concurrent-To": "<urn:uuid:1f2fa26b-aca0-4bd8-946d-d66d3d48447c>",
"WARC-Date": "2017-03-25T22:15:31Z",
"WARC-IP-Address": "84.22.103.185",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:UO6CXZFXLLIXQICSPY3TXVZT4YX63SIG",
"WARC-Record-ID": "<urn:uuid:692fdd4b-d74a-4571-b53a-710c4a3933c9>",
"WARC-Target-URI": "https://codedump.io/share/5JlBEiTg3SzV/1/symfony2-remove-id-field-from-submitted-form-data",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e7891975-d6e0-4e0a-801c-6f9c2a2ebabc>"
},
"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,
36,
49,
50,
100,
101,
163,
164,
202,
203,
278,
279,
280,
508,
509,
606,
607,
614,
615,
747,
748
],
"line_end_idx": [
36,
49,
50,
100,
101,
163,
164,
202,
203,
278,
279,
280,
508,
509,
606,
607,
614,
615,
747,
748,
819
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 819,
"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.3764044940471649,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0337078683078289,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.20224718749523163,
"rps_doc_frac_unique_words": 0.644444465637207,
"rps_doc_mean_word_length": 4.651851654052734,
"rps_doc_num_sentences": 8,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.214594841003418,
"rps_doc_word_count": 135,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.023885350674390793,
"rps_doc_frac_chars_top_3gram": 0.041401270776987076,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -53.36573028564453,
"rps_doc_books_importance_length_correction": -53.36573028564453,
"rps_doc_openwebtext_importance": -37.82669448852539,
"rps_doc_openwebtext_importance_length_correction": -37.76382827758789,
"rps_doc_wikipedia_importance": -31.253700256347656,
"rps_doc_wikipedia_importance_length_correction": -31.253700256347656
},
"fasttext": {
"dclm": 0.3410657048225403,
"english": 0.9031769633293152,
"fineweb_edu_approx": 1.7015780210494995,
"eai_general_math": 0.7024261951446533,
"eai_open_web_math": 0.19621634483337402,
"eai_web_code": 0.12335413694381714
}
} | {
"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": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-8,275,144,296,740,867,000 | How to use the 500px api [solved]
If the documentation exists that shows how easy it is to use to 500px api, I’ve not been able to find it. This post resolves that by sharing my findings and the solution I’m using in a WordPress plugin I’ve been working on.
The problem…
I wanted to tweet photos from 500px at random intervals to improve the visual impact of my twitter feed.
Using the 500px api…
It sounds simple enough but I hit a roadblock: I couldn’t find an example for how to authenticate using oauth and call their api. The best I found was this example provided as part of their official documentation. It doesn’t give a solution — it suggests edits to an existing piece of code to get you started. One line on that page was a massive help:
500px.com oAuth is actually quite similar to Twitter’s
Hmmm… I already had a working connection to Twitter based on the incredibly easy to use TwitterAPIExchange.php code by J7mbo. That got me thinking:
What if I could reuse that code?
It was a far better solution than the original page’s suggestion so I decided to give it a go.
Step 1: Register a new 500px app…
…to get your consumer keys, required by oauth to authenticate and gain access to the apis. (You can do this by logging in to 500px and visiting the Account | Settings page.)
This is the first difference: unlike Twitter which requires a pair of keys and a pair of tokens, the 500px api only provides you with a pair of keys: Consumer key and Secret key.
What about the tokens? As it turns out, you don’t actually need them for 500px.
Step 2: Setting up your keys for oauth…
This is super simple as shown in the code fragment below.
[snippet slug=500px-oauth-setup lang=php]
Step 3: Specifying the api and request…
For this example we’re going to grab a set of 20 images from the ‘Highest Rated’ collection using the ‘photos’ api (documentation available here). The next code fragment shows how I set these up, note there is a subtle difference here from the original Twitter example given by J7mbo.
[snippet slug=500px-api-parameters lang=php]
Step 4: Call the api…
This just boils down to create the object, call the functions with the parameters we set up in steps 1 and 2.
[snippet slug=500px-authenticate-call-api lang=php]
Note the TwitterAPIExchange method calls can be daisy chained together. I chose not to here as a matter of personal coding style choice because I find the code much easier to read.
Step 5: Decode the output…
The result of the api call is a JSON encoded array containing the data pertaining to 20 images on 500px. To make it useful, we need to decode it, rewriting the last line in the snippet above thus…
[snippet slug=500px-json-decode-api-result lang=php]
Step 6: Adding a little protection
During testing I hit a snag. I’d built it into a WordPress plugin and the code worked fine on my MacBook running MAMPP, but crashed under XAMPP on Windows. I traced it to the TwitterAPIExchange class throwing an exception in the call to performRequest().
Trapping it with a try-catch block revealed the issue to be a missing ssl certificate on my XAMPP installation. I’ve shown that modification to the code in the next code fragment.
[snippet slug=500px-exception-handling lang=php]
The (almost) completed code…
[snippet slug=500px-complete-api-call lang=php]
Conclusion…
The last snippet, above, shows our final function. It’s a cut down version of the one I’m using within the plugin for clarity. It will need to be modified to suit your own needs. For example making it more generic by passing the api URL, feature and method.
If you do use it, please drop me a comment below 🙂
Share your thoughts... | {
"url": "https://qtsoftware.co.uk/info-nuggets/how-to-use-the-500px-api-solved/",
"source_domain": "qtsoftware.co.uk",
"snapshot_id": "crawl=CC-MAIN-2017-34",
"warc_metadata": {
"Content-Length": "89412",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:E6EBR5HQ6MNB2QW46SQDRRHOQK2RGJH5",
"WARC-Concurrent-To": "<urn:uuid:60b9e2be-a0f0-4acd-b9df-db357f8e939f>",
"WARC-Date": "2017-08-17T05:58:56Z",
"WARC-IP-Address": "104.27.138.1",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:T67DJOFLH7UVVV6C7ICF5B557B4HGSOU",
"WARC-Record-ID": "<urn:uuid:63f7244f-df85-4d1c-8a45-1a02750df69e>",
"WARC-Target-URI": "https://qtsoftware.co.uk/info-nuggets/how-to-use-the-500px-api-solved/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ec3027e2-71de-4f9e-98f8-01629a1bb6af>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-145-237-23.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,
34,
35,
259,
260,
273,
274,
379,
380,
401,
402,
754,
755,
810,
811,
959,
960,
993,
994,
1089,
1090,
1124,
1125,
1299,
1300,
1479,
1480,
1560,
1561,
1601,
1602,
1660,
1661,
1703,
1704,
1744,
1745,
2030,
2031,
2076,
2077,
2099,
2100,
2210,
2211,
2263,
2264,
2445,
2446,
2473,
2474,
2671,
2672,
2725,
2726,
2761,
2762,
3017,
3018,
3198,
3199,
3248,
3249,
3278,
3279,
3327,
3328,
3340,
3341,
3599,
3600,
3651,
3652
],
"line_end_idx": [
34,
35,
259,
260,
273,
274,
379,
380,
401,
402,
754,
755,
810,
811,
959,
960,
993,
994,
1089,
1090,
1124,
1125,
1299,
1300,
1479,
1480,
1560,
1561,
1601,
1602,
1660,
1661,
1703,
1704,
1744,
1745,
2030,
2031,
2076,
2077,
2099,
2100,
2210,
2211,
2263,
2264,
2445,
2446,
2473,
2474,
2671,
2672,
2725,
2726,
2761,
2762,
3017,
3018,
3198,
3199,
3248,
3249,
3278,
3279,
3327,
3328,
3340,
3341,
3599,
3600,
3651,
3652,
3674
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3674,
"ccnet_original_nlines": 72,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3762376308441162,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.028465349227190018,
"rps_doc_frac_lines_end_with_ellipsis": 0.1506849229335785,
"rps_doc_frac_no_alph_words": 0.18069307506084442,
"rps_doc_frac_unique_words": 0.4730158746242523,
"rps_doc_mean_word_length": 4.59841251373291,
"rps_doc_num_sentences": 33,
"rps_doc_symbol_to_word_ratio": 0.01608910970389843,
"rps_doc_unigram_entropy": 5.143450736999512,
"rps_doc_word_count": 630,
"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.006903689820319414,
"rps_doc_frac_chars_top_3gram": 0.007248879875987768,
"rps_doc_frac_chars_top_4gram": 0.007594060152769089,
"rps_doc_books_importance": -343.8493957519531,
"rps_doc_books_importance_length_correction": -343.8493957519531,
"rps_doc_openwebtext_importance": -214.35223388671875,
"rps_doc_openwebtext_importance_length_correction": -214.35223388671875,
"rps_doc_wikipedia_importance": -204.5946044921875,
"rps_doc_wikipedia_importance_length_correction": -204.5946044921875
},
"fasttext": {
"dclm": 0.033424850553274155,
"english": 0.8478118777275085,
"fineweb_edu_approx": 1.9028940200805664,
"eai_general_math": 0.7697761654853821,
"eai_open_web_math": 0.0700492262840271,
"eai_web_code": 0.20180851221084595
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
6,188,370,432,484,989,000 | Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
PerlMonks
Re: Capturing cookies
by edan (Curate)
on Dec 29, 2004 at 16:19 UTC ( #418012=note: print w/ replies, xml ) Need Help??
in reply to Capturing cookies
Untested code:
use CGI::Cookie; use strict; my %cookies = CGI::Cookie->fetch(); warn "$_: " . $cookies{$_}->value() for keys %cookies;
--
edan
Comment on Re: Capturing cookies
Download Code
Log In?
Username:
Password:
What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418012]
help
Chatterbox?
and the web crawler heard nothing...
How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2015-12-01 01:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?
Results (791 votes), past polls | {
"url": "http://www.perlmonks.org/?node_id=418012",
"source_domain": "www.perlmonks.org",
"snapshot_id": "crawl=CC-MAIN-2015-48",
"warc_metadata": {
"Content-Length": "18814",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RJOL7XUW6EQS3H5ZEZRJMTITZ3WJQ2VV",
"WARC-Concurrent-To": "<urn:uuid:82e44baa-2883-4dab-a079-48b8c8c3e77e>",
"WARC-Date": "2015-12-01T01:50:59Z",
"WARC-IP-Address": "209.197.123.153",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:F5TN76TMP4BOQ2TE4EYKPB6JNLFXYXYC",
"WARC-Record-ID": "<urn:uuid:00600ca1-8546-453f-acff-17c277019890>",
"WARC-Target-URI": "http://www.perlmonks.org/?node_id=418012",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ba0caa9e-9289-4bb1-b7cd-fb95a0aba421>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-71-132-137.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-48\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for Nov 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,
63,
102,
104,
116,
117,
139,
140,
157,
238,
239,
240,
270,
271,
286,
287,
407,
410,
415,
416,
417,
450,
464,
465,
473,
483,
493,
494,
514,
532,
545,
558,
588,
593,
605,
642,
643,
681,
694,
730,
757,
767,
780,
792,
803,
821,
822,
935,
936,
937,
938,
939,
940,
941,
942,
943,
944,
945,
946,
947,
948,
949
],
"line_end_idx": [
63,
102,
104,
116,
117,
139,
140,
157,
238,
239,
240,
270,
271,
286,
287,
407,
410,
415,
416,
417,
450,
464,
465,
473,
483,
493,
494,
514,
532,
545,
558,
588,
593,
605,
642,
643,
681,
694,
730,
757,
767,
780,
792,
803,
821,
822,
935,
936,
937,
938,
939,
940,
941,
942,
943,
944,
945,
946,
947,
948,
949,
984
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 984,
"ccnet_original_nlines": 61,
"rps_doc_curly_bracket": 0.002032520016655326,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.16894976794719696,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.031963471323251724,
"rps_doc_frac_lines_end_with_ellipsis": 0.016129029914736748,
"rps_doc_frac_no_alph_words": 0.3652968108654022,
"rps_doc_frac_unique_words": 0.8014184236526489,
"rps_doc_mean_word_length": 5.035460948944092,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0.00913241971284151,
"rps_doc_unigram_entropy": 4.623134136199951,
"rps_doc_word_count": 141,
"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.0676056295633316,
"rps_doc_frac_chars_top_3gram": 0.0507042296230793,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -104.2441177368164,
"rps_doc_books_importance_length_correction": -104.2441177368164,
"rps_doc_openwebtext_importance": -69.36373138427734,
"rps_doc_openwebtext_importance_length_correction": -55.389591217041016,
"rps_doc_wikipedia_importance": -48.83406066894531,
"rps_doc_wikipedia_importance_length_correction": -48.83406066894531
},
"fasttext": {
"dclm": 0.09374535083770752,
"english": 0.7942624688148499,
"fineweb_edu_approx": 2.0489494800567627,
"eai_general_math": -0.000008230000275943894,
"eai_open_web_math": 0.10223562270402908,
"eai_web_code": -0.000010009999641624745
}
} | {
"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": "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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-3,475,259,445,813,636,000 | Friday, November 02, 2007
Open social insecurity
Everyone is praising google's open social initiative. So let me do the opposite and try to put together a few weak points:
• Open social apps already have been hacked.
• Open social is not really open yet, only the client API has been published so far. It allows to put iframe apps with Javascript based business logic (or should I say "social logic") into open social containers such as orkut. Currently you have to join the waiting list, to get notified when the server API specification gets published.
Dave Winer goes even a step further and criticizes the motivation behind open social:
Standards devised by one tech company whose main purpose is to undermine another tech company, usually don't work. Permalink to this paragraph
In this case it's Google trying to undermine Facebook. Permalink to this paragraph
And I don't think it's going to work. Permalink to this paragraph
Time will tell ...
[Update:] Just after posting, I found more critique thoughts, by Julien Bond:
As a geek it pisses me off because there's absolutely no accountability or transparency in how those standards are developed. It's every bit as bad as MS trying to force the Word XML standard through the standards bodies. Google is something of a black box. There's no way to influence them. Stuff appears out of the black box fully formed.
And here a detailed article about, exploiting open social XSS vulnerabilities on ning.
1 comment:
Anonymous said...
Wow! Makes one really think twice about the whole concept.
| {
"url": "https://rsaccon.blogspot.com/2007/11/open-social-insecurity.html",
"source_domain": "rsaccon.blogspot.com",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "59556",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:47T6WWUD4X2RW6GJMFTIU5NZNZ57RRUU",
"WARC-Concurrent-To": "<urn:uuid:75db4e5b-1980-434b-8c5f-80782e198d3a>",
"WARC-Date": "2024-09-10T15:18:17Z",
"WARC-IP-Address": "142.251.163.132",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:QN4APKE2HRAEOKUBWFIJ2COHLQMSSC2K",
"WARC-Record-ID": "<urn:uuid:18255ea8-6a9e-4e11-958b-0408daa1ef3d>",
"WARC-Target-URI": "https://rsaccon.blogspot.com/2007/11/open-social-insecurity.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4139d156-3f53-45a6-aef6-2a744ff25f15>"
},
"warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-192\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
26,
27,
50,
51,
174,
221,
561,
647,
790,
791,
874,
875,
941,
942,
961,
962,
1040,
1041,
1382,
1383,
1470,
1471,
1482,
1483,
1501,
1502,
1561,
1562
],
"line_end_idx": [
26,
27,
50,
51,
174,
221,
561,
647,
790,
791,
874,
875,
941,
942,
961,
962,
1040,
1041,
1382,
1383,
1470,
1471,
1482,
1483,
1501,
1502,
1561,
1562,
1563
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1563,
"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.40645161271095276,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025806449353694916,
"rps_doc_frac_lines_end_with_ellipsis": 0.06896551698446274,
"rps_doc_frac_no_alph_words": 0.1548387110233307,
"rps_doc_frac_unique_words": 0.6563706398010254,
"rps_doc_mean_word_length": 4.77606201171875,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0.006451610010117292,
"rps_doc_unigram_entropy": 4.895975112915039,
"rps_doc_word_count": 259,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04527081921696663,
"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.05658851936459541,
"rps_doc_frac_chars_top_3gram": 0.03637833148241043,
"rps_doc_frac_chars_top_4gram": 0.058205340057611465,
"rps_doc_books_importance": -159.93406677246094,
"rps_doc_books_importance_length_correction": -147.29249572753906,
"rps_doc_openwebtext_importance": -76.90543365478516,
"rps_doc_openwebtext_importance_length_correction": -76.90543365478516,
"rps_doc_wikipedia_importance": -48.642696380615234,
"rps_doc_wikipedia_importance_length_correction": -34.89415740966797
},
"fasttext": {
"dclm": 0.08790212869644165,
"english": 0.9625023007392883,
"fineweb_edu_approx": 1.7842005491256714,
"eai_general_math": 0.07223671674728394,
"eai_open_web_math": 0.24246728420257568,
"eai_web_code": 0.014119209721684456
}
} | {
"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": "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": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-6,619,652,872,975,391,000 | MATLAB Answers
Advantages of mwsize (Cross-Platform Flexibility)?
2 views (last 30 days)
Steradiant
Steradiant on 23 Dec 2020
Edited: James Tursa on 21 Jan 2021
Hello,
in the documentation there is the hint to use mwsize rather than int for Cross-Platform Flexibility. What is the actual advantage? The backround of my question is the following: I want to write (and partly already have written) C-Code which I wan to use in MATLAB. I tried to find a good workflow to extend the existing C-Code and use it in MATLAB. The big problem I came across is the debugging. I found this very helpful Blog entry: https://blogs.mathworks.com/developer/2018/06/19/mex-debugging-vscode/ nevertheless, it is pretty cumbersome to debug like this all the time. Especially because MATLAB might crash pretty often because bugs happen during development of new C-Code. Therefore, I thought it would be better to write the code in a C IDE and just put the wrapper mexFunction around my code at the end. My question is, if I loose a lot of performance if i do it this way?
Furthermore, a question arose regarding the 'MATLAB Support for Interleaved Complex API in MEX Functions'. Which API is preferred for high speed applications?
Accepted Answer
James Tursa
James Tursa on 21 Jan 2021
Edited: James Tursa on 21 Jan 2021
"Furthermore, a question arose regarding the 'MATLAB Support for Interleaved Complex API in MEX Functions'. Which API is preferred for high speed applications?"
This is somewhat of a moot point given that the choice is determined by the MATLAB version you are using. If you are using R2017b or earlier, then you will be using two separate Real/Imaginary data areas. If you are using R2018a or later, then you will be using a single interleaved Complex data area. There are no MATLAB versions that simultaneously support both methods. Compiling a mex routine in R2018a or later with the -R2017b memory model option simply forces the mex routine to do a copy-in/copy-out on all complex variables in the background. It does not change the underlying storage scheme of the variable data, which is always interleaved complex in R2018a and later.
As to which is faster, that depends on what you are doing. Note that the BLAS and LAPACK complex linear algebra library routines that MATLAB uses only support the interleaved complex data model (in every version of MATLAB, not just R2018a and later), so that drives the comments below. E.g.,
Matrix Multiply real * complex:
The R2017b separate storage scheme will be faster because the BLAS matrix multiply routines can be called directly without any intermediate data copying needed. I.e., the individual real*real and real*imaginary pieces can be done by making two calls to the real BLAS matrix multiply routine and the results stuffed directly into the MATLAB output variable. For the R2018a interleaved storage scheme to use the complex BLAS matrix multiply routine in this case, it must first deep copy the real variable into a complex variable with imaginary part 0, and then make the call. So extra wasted memory and time to do the intermediate deep data copy for R2018a and lots of extra unnecessary 0 multiplies.
Linear Algebra calls to complex LAPACK routines:
The R2018a interleaved storage scheme will be faster because the input can be passed directly to the LAPACK routine and the output stuffed directly into a MATLAB variable. No intermediate deep data copying needed. For the R2017b separate storage scheme to use the complex LAPACK routine, it must first deep copy the separate real/imaginary data areas into a single contiguous interleaved area and then pass that to the LAPACK routine. Then it must take the interleaved result and deep copy it into two separate real/imaginary data areas for output back to MATLAB. So extra wasted memory and time to do the intermediate deep data copies.
More Answers (1)
Walter Roberson
Walter Roberson on 23 Dec 2020
In C, int is permitted to be 16 bits or larger. It is common for compilers to treat int as 32 bits. It is uncommon for compilers to treat int as 64 bits: 64 bits is typically long int or long long.
Meanwhile, mwsize is defined as 64 bits provided that large array dims is enabled, which it should be for any 64 bit target.
Using int puts the correctness of your code at the mercy of the compiler default integer size, instead of using a fixed size as is required by MATLAB
5 Comments
Walter Roberson
Walter Roberson on 20 Jan 2021
At some point in the future, Mathworks might decide to switch to (for example) 80 bits for matlab class double. Interfaces coded in mxDouble would make the transition automatically, but code that uses C or C++ double would have to be upgraded.
Also, some vendors such as IBM are actively pursuing non-IEEE-754 floating-point, as some of the design choices of 754 are limiting performance improvements (in particular, signaling nan and denormalized numbers)
Sign in to comment.
Tags
Products
Release
R2020b
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Translated by | {
"url": "https://fr.mathworks.com/matlabcentral/answers/701282-advantages-of-mwsize-cross-platform-flexibility",
"source_domain": "fr.mathworks.com",
"snapshot_id": "crawl=CC-MAIN-2021-25",
"warc_metadata": {
"Content-Length": "152791",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RAPCXQ2GB3DTV7QEDJM4TQMXSLG2OJOI",
"WARC-Concurrent-To": "<urn:uuid:3f800de4-e1ab-43fc-95fd-369fb6fdca6b>",
"WARC-Date": "2021-06-20T22:36:47Z",
"WARC-IP-Address": "23.220.132.54",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:NMWU3JAMPWVCUBC72UIZY53EK2XTLWWN",
"WARC-Record-ID": "<urn:uuid:14df43dd-6fc8-4b8d-8a8d-7cb6baef3e30>",
"WARC-Target-URI": "https://fr.mathworks.com/matlabcentral/answers/701282-advantages-of-mwsize-cross-platform-flexibility",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:89b434b8-e924-4e48-9412-005ae2168da3>"
},
"warc_info": "isPartOf: CC-MAIN-2021-25\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-123.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,
15,
16,
67,
68,
91,
102,
128,
163,
170,
1054,
1213,
1214,
1230,
1231,
1243,
1270,
1305,
1466,
2146,
2438,
2470,
3169,
3218,
3855,
3856,
3873,
3874,
3890,
3921,
4119,
4244,
4394,
4407,
4423,
4454,
4698,
4911,
4912,
4932,
4933,
4938,
4939,
4948,
4949,
4950,
4958,
4959,
4966,
4967,
4991,
4992,
5074,
5075,
5090,
5091
],
"line_end_idx": [
15,
16,
67,
68,
91,
102,
128,
163,
170,
1054,
1213,
1214,
1230,
1231,
1243,
1270,
1305,
1466,
2146,
2438,
2470,
3169,
3218,
3855,
3856,
3873,
3874,
3890,
3921,
4119,
4244,
4394,
4407,
4423,
4454,
4698,
4911,
4912,
4932,
4933,
4938,
4939,
4948,
4949,
4950,
4958,
4959,
4966,
4967,
4991,
4992,
5074,
5075,
5090,
5091,
5104
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 5104,
"ccnet_original_nlines": 55,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36736735701560974,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.049049049615859985,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1501501500606537,
"rps_doc_frac_unique_words": 0.38895416259765625,
"rps_doc_mean_word_length": 4.823736667633057,
"rps_doc_num_sentences": 47,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.2529826164245605,
"rps_doc_word_count": 851,
"rps_doc_frac_chars_dupe_10grams": 0.08964677155017853,
"rps_doc_frac_chars_dupe_5grams": 0.21851401031017303,
"rps_doc_frac_chars_dupe_6grams": 0.16102313995361328,
"rps_doc_frac_chars_dupe_7grams": 0.11985383927822113,
"rps_doc_frac_chars_dupe_8grams": 0.08964677155017853,
"rps_doc_frac_chars_dupe_9grams": 0.08964677155017853,
"rps_doc_frac_chars_top_2gram": 0.02192448079586029,
"rps_doc_frac_chars_top_3gram": 0.008769789710640907,
"rps_doc_frac_chars_top_4gram": 0.01023142971098423,
"rps_doc_books_importance": -486.99468994140625,
"rps_doc_books_importance_length_correction": -486.99468994140625,
"rps_doc_openwebtext_importance": -265.6092529296875,
"rps_doc_openwebtext_importance_length_correction": -265.6092529296875,
"rps_doc_wikipedia_importance": -249.0663604736328,
"rps_doc_wikipedia_importance_length_correction": -249.0663604736328
},
"fasttext": {
"dclm": 0.08618056774139404,
"english": 0.8857899308204651,
"fineweb_edu_approx": 2.1698520183563232,
"eai_general_math": 0.966742992401123,
"eai_open_web_math": 0.4539099931716919,
"eai_web_code": 0.7851875424385071
}
} | {
"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": "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": "4",
"label": "Missing Images or Figures"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
7,472,601,556,233,513,000 | MMO Javascript
Thursday, February 21, 2013
All Around the World
Only available in the US..
Blizzcon this year will be in November, which is great news for fans of Warcraft across the world. However, getting there if you don't live in the US is likely to be expensive, especially in the current Economic climate, which is why there'll undoubtedly be access to live streams (with the inevitable Battle Pet carrot attached) in an attempt to assuage the fact that this event seems to have become a rather US-centric affair. Before people start poking me, I am not a fool. I am well aware why this is the case. It does not take a genius to work out that to run an event of this size is not cheap, and it is logistically a nightmare. Therefore, doing it in your back garden is always going to be easier than upping sticks and going somewhere else, especially when you have a guaranteed audience who are already scrabbling for hotel rooms without even knowing how much tickets will cost. The key with these things is consistency, after all.
For the record, the streams don't ever count as consolation. I've done a lot of cons in my time and absolutely nothing substitutes for the Real Thing. That's a simple truth, based on the fact that one person alone in front of a screen does not equate to 2000 screaming people in a hall. I'll also admit that every time I've bought a stream in the past it's just been for the pet and had nothing to do with the actual content. That's a bonus, it's meeting people that's the real reason you go to a Blizzcon. I am aware of people who've done the trip UK to US but as a mother of two for whom that weekend co-incides with term time... this is where my demographic becomes a distinct disadvantage. Not that I could even afford the air fare for four of us, let alone the hotel and ticket price. Even if I could, there's a responsibility to keep my children educated ahead of my desire to dress as a Dwarf, even though that particular idea is a very compelling one.
It also brings home to me the realisation that there is part of this gaming 'experience' that I may never get a chance to take part in, and that actually makes me sad. Even if Blizzard did decide to move the whole shebang to (let's say) Paris, it might yet be impossible to fit everything around the family commitments: however, I know that if there were even the smallest chance to do so I'd jump on it, as I'm sure thousands and thousands of other European Warcraft fans would. Blizzard will know this too, and maybe we can hope for another Warcraft-centric event on European soil this year that might give those of us who don't live in the US a chance to descend on. I know that Blizzard has a modest presence at a number of European gaming 'events' throughout the year but it does often feel as they are just to maintain appearances.
Needless to say, by the time I get to November I will undoubtedly be happy to watch as the various streams of static and moving information come flowing out of the convention centre, perhaps with details on the new Blizzard MMO or on what might be in store for Warcraft after Pandaria. However, sitting here surrounded by tissues and cough remedies, watching my Twitter feed rave about and event that won't happen for eight months, you may have to forgive me for feeling as blue as the image I've used to head this post... :(
2 comments:
Andrew Sutherland said...
The Mists launch had a similicast. I wonder what the logistics would be to set up mini-cons at each regional base? Stream the feed from the main event into the main hall and stage rp/dance/cosplay competitions in the quiet periods when regional time is out of wack with the US.
Angelya said...
I'm with you here. The last Blizzcon just looked like sooo much fun, but with a young family it will be next to impossible to head off to the US to join in. I guess we'll just have to be content with watching the feeds :( | {
"url": "http://www.alternative-blog.net/2013/02/all-around-world_6833.html?showComment=1361452169559",
"source_domain": "www.alternative-blog.net",
"snapshot_id": "crawl=CC-MAIN-2013-20",
"warc_metadata": {
"Content-Length": "217726",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MTQFWVXMC4W4FOIHE5J45AAOFRAJDQED",
"WARC-Concurrent-To": "<urn:uuid:a223338a-349b-416c-ace2-78d47aed1c24>",
"WARC-Date": "2013-05-18T11:31:34Z",
"WARC-IP-Address": "173.194.74.121",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:T53IVIIA4HS2VOUDJPDS3SCVFYCEZX76",
"WARC-Record-ID": "<urn:uuid:37962c71-026c-495d-8803-4cbaf86d46a4>",
"WARC-Target-URI": "http://www.alternative-blog.net/2013/02/all-around-world_6833.html?showComment=1361452169559",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1c526cdd-0aef-4dbf-984f-437f00e95ba9>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-60-113-184.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2013-20\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for Spring 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,
15,
16,
44,
45,
66,
67,
94,
95,
1038,
1039,
1999,
2000,
2838,
2839,
3366,
3367,
3379,
3380,
3406,
3407,
3685,
3686,
3702,
3703
],
"line_end_idx": [
15,
16,
44,
45,
66,
67,
94,
95,
1038,
1039,
1999,
2000,
2838,
2839,
3366,
3367,
3379,
3380,
3406,
3407,
3685,
3686,
3702,
3703,
3924
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3924,
"ccnet_original_nlines": 24,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.5124555230140686,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.034400951117277145,
"rps_doc_frac_lines_end_with_ellipsis": 0.07999999821186066,
"rps_doc_frac_no_alph_words": 0.11981020122766495,
"rps_doc_frac_unique_words": 0.4895688593387604,
"rps_doc_mean_word_length": 4.287899971008301,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0.004744959995150566,
"rps_doc_unigram_entropy": 5.295812129974365,
"rps_doc_word_count": 719,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.009730779565870762,
"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.009730779565870762,
"rps_doc_frac_chars_top_3gram": 0.006811549887061119,
"rps_doc_frac_chars_top_4gram": 0.00843334011733532,
"rps_doc_books_importance": -370.0930480957031,
"rps_doc_books_importance_length_correction": -370.0930480957031,
"rps_doc_openwebtext_importance": -229.6948699951172,
"rps_doc_openwebtext_importance_length_correction": -229.6948699951172,
"rps_doc_wikipedia_importance": -173.6011962890625,
"rps_doc_wikipedia_importance_length_correction": -173.6011962890625
},
"fasttext": {
"dclm": 0.06666755676269531,
"english": 0.978847861289978,
"fineweb_edu_approx": 1.0542126893997192,
"eai_general_math": 0.0835723876953125,
"eai_open_web_math": 0.11357420682907104,
"eai_web_code": 0.012584749609231949
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "004.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "338.9",
"labels": {
"level_1": "Social sciences",
"level_2": "Economics",
"level_3": "Industries, Prices, and Microeconomics"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-1,462,939,135,710,365,400 | Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Our project involves 5 developers in China and 3 developers in U.S. The server machine in China is considered the master machine. I want to setup a mirror of the repo from China server to U.S. server such that our local developers can repo sync much faster. Right now a repo init / sync from China server took 5 hours.
As an example, assume the China server is called server1.china.com and the U.S. server is called server2.usa.com.
The project is pulled from China server using the command:
repo init -u ssh://server1.china.com/projectA/standard.git -b release17
repo sync
I want to be able to setup a local mirror such that pulling the project becomes:
repo init -u ssh://server2.usa.com/projectA/standard.git -b release 17
repo sync
I would expect to also need a cron job to run periodically to pull latest changes from server1 to server2 after the initial setup.
I have seen discussions of using git clone --mirror but not quite sure it will give exactly what I needed.
Thanks
share|improve this question
This question is probably more appropriate for one of the other stack exchange forums, as it is not about programming – Tim Dean Jan 5 at 0:45
Looks like a duplicate of stackoverflow.com/questions/6136789/…. – Magnus Bäck Jan 5 at 2:04
1 Answer 1
What you want is repo init --mirror, from repo init -h:
--mirror create a replica of the remote repositories rather
than a client working directory
After you have created it you can keep it up to date with repo sync.
share|improve this answer
After doing this, I had to modify the .repo/manifests/default.xml file, as in this post – trapezoid Dec 6 at 20:57
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/20928486/setup-mirror-repo-from-overseas-server-to-local-server",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-52",
"warc_metadata": {
"Content-Length": "71865",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:G6CIGBKL4Y6L7QJ5ZZDSGVU756QBQRD6",
"WARC-Concurrent-To": "<urn:uuid:64d22417-f41e-453c-a72b-1d3397867569>",
"WARC-Date": "2014-12-28T04:53:18Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:EZLHDX2H7SGEEJOGKTXCFB3MY4PPSTWP",
"WARC-Record-ID": "<urn:uuid:81b627e4-8c14-463b-b59e-58dfe15c2d6a>",
"WARC-Target-URI": "http://stackoverflow.com/questions/20928486/setup-mirror-repo-from-overseas-server-to-local-server",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:eeed7e52-e822-46b4-9dd3-90aa5c91cfee>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-231-17-201.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-52\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for December 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,
25,
157,
158,
477,
478,
592,
593,
652,
653,
725,
735,
736,
817,
818,
889,
899,
900,
1031,
1032,
1139,
1140,
1147,
1148,
1176,
1181,
1325,
1330,
1424,
1425,
1436,
1437,
1493,
1494,
1565,
1617,
1618,
1687,
1688,
1714,
1719,
1835,
1836,
1848,
1849,
1851,
1859,
1860,
1938,
1939
],
"line_end_idx": [
25,
157,
158,
477,
478,
592,
593,
652,
653,
725,
735,
736,
817,
818,
889,
899,
900,
1031,
1032,
1139,
1140,
1147,
1148,
1176,
1181,
1325,
1330,
1424,
1425,
1436,
1437,
1493,
1494,
1565,
1617,
1618,
1687,
1688,
1714,
1719,
1835,
1836,
1848,
1849,
1851,
1859,
1860,
1938,
1939,
2029
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2029,
"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.34953704476356506,
"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.21296295523643494,
"rps_doc_frac_unique_words": 0.5349544286727905,
"rps_doc_mean_word_length": 4.720364570617676,
"rps_doc_num_sentences": 32,
"rps_doc_symbol_to_word_ratio": 0.0023148099426180124,
"rps_doc_unigram_entropy": 4.826318740844727,
"rps_doc_word_count": 329,
"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.025756599381566048,
"rps_doc_frac_chars_top_3gram": 0.028976179659366608,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -195.90316772460938,
"rps_doc_books_importance_length_correction": -195.90316772460938,
"rps_doc_openwebtext_importance": -124.95658111572266,
"rps_doc_openwebtext_importance_length_correction": -124.95658111572266,
"rps_doc_wikipedia_importance": -80.44245910644531,
"rps_doc_wikipedia_importance_length_correction": -80.44245910644531
},
"fasttext": {
"dclm": 0.07132034748792648,
"english": 0.9142343401908875,
"fineweb_edu_approx": 1.5214097499847412,
"eai_general_math": 0.0003077999863307923,
"eai_open_web_math": 0.04144870862364769,
"eai_web_code": -4.799999828719592e-7
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.135",
"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": "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": "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": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
389,287,198,198,270,850 | dcsimg
October 20, 2018
Hot Topics:
Getting Started with the Greenfoot Java IDE
• July 29, 2008
• By Richard G. Baldwin
• Send Email »
• More Articles »
Programming Notes # Hs00301
Preface
What is Greenfoot?
Greenfoot is a combination of a Java IDE that provides a class browser, compilation, interactive execution, single-step execution, a code editor, etc., on one hand and a framework for creating two-dimensional animations, games, and simulations on the other hand (see Greenfoot Home in Resources). Greenfoot is also available free of charge.
Relatively painless, fun, and engaging
Greenfoot provides a painless, fun, and engaging entry point for novice programmers but also supports the full power of the Java programming language for more advanced programmers.
A harmonic wave simulator
Click here to open a page containing a harmonic wave simulator in a separate browser window (or in a separate tab on your browser). Click the Run button at the bottom and move the blue bead to activate the wave motion. Move the Amplitude, Frequency, and Damping sliders to change the physics of the simulation. Flip the switch on the upper left to switch between manual operation and an oscillator. (Note that your browser must support Java 1.5 or later for this applet to run properly.)
Fun and engaging
Greenfoot is fun and engaging because Greenfoot makes it relatively easy for novice programmers to create 2D games, animations, and simulations.
Powerful
Greenfoot is powerful because it allows for the use of the same Java code that an advanced Java programmer would use in a major Java project. Included in that power is the ability to do any or all of the following:
• Execute the scenario (project) inside the IDE, either in single-step mode or run mode.
• Export the scenario as a Java applet in a JAR file with an accompanying HTML file.
• Export the scenario as an application in an executable JAR file.
• Publish the scenario on the Greenfoot web site for review and comment by others.
Terminology - scenario or project
As a matter of clarification, most of the Greenfoot documentation uses the word scenario to describe what might be referred to as a project in other programming environments and IDEs. For purposes of this tutorial, the two terms are interchangeable.
Viewing tip
I recommend that you open another copy of this document in a separate browser window and use the following links to easily find and view the figures and listings while you are reading about them.
Figures
• Figure 1. Visual manifestation of the Greenfoot IDE.
• Figure 2. Context menu for the World class.
• Figure 3. Dialog for specifying name and image for new class.
• Figure 4. Context menu for the MyWorld class.
• Figure 5. The source code editor.
• Figure 6. Context menu for the Actor class.
• Figure 7. Result of selecting the new MyActor() option.
• Figure 8. Lots of spiders.
• Figure 9. The Greenfoot IDE in Run mode.
• Figure 10. The context menu for a MyActor object.
• Figure 11. Method inheritance information for a MyActor object.
• Figure 12. An Object Inspector window.
• Figure 13. Export dialog.
Listings
• Listing 1. Class definition code for the class named MyWorld.
• Listing 2. Class definition code for the class named MyActor.
Supplementary material
I recommend that you also study the other lessons in my extensive collection of online programming tutorials. You will find a consolidated index at www.DickBaldwin.com.
A simple Greenfoot scenario
I'm going to begin by giving you a look at a very simple Greenfoot scenario. The visual manifestation of the Greenfoot IDE, version 1,4,1 is shown in Figure 1.
Figure 1. Visual manifestation of the Greenfoot IDE.
The stage and the actors
This is an animation scenario involving a stage and an actor. The blue rectangle on the left in Figure 1 is the stage upon which the actors perform. (In this scenario, there is only one actor, which is represented by an image of a spider. Note, however, that there could be many actors in a more complicated scenario.)
Classes and objects
If you are a beginner in OOP, you may not yet know about classes and objects. If so, you will simply need to bear with me at this point. I want to make certain that I am using proper terminology throughout, even when I haven't yet explained that terminology.
Classes and objects
This stage is the visual manifestation of an object created from the class named MyWorld shown in the class diagram on the right in Figure 1. The spider is the visual manifestation of an object created from the class named MyActor shown in the class diagram on the right.
A quick explanation of classes and objects
I have much more to say about classes and objects in other lessons on my website (see Dick Baldwin's Programming Tutorials in Resources). For now, suffice it to say that a class is analogous to a set of blueprints or plans from which something can be constructed. An object is the thing that is constructed from those blueprints.
Overall behavior
A little later, I will show you the Java code that produces the behavior that I am about to describe. This scenario is designed to animate the spider and cause it to move diagonally down and to the right across the stage toward the lower right corner.
At the bottom of Figure 1, you see a button labeled Act and another button labeled Run. Each time the button labeled Act is clicked, the spider will move one step to the right and one step down. (I will explain what I mean by one step later.) If the button labeled Run is clicked, the spider will move in incremental steps toward the lower right corner. The effect of clicking the Run button is the same as if someone were to repeatedly click the Act button. When the spider reaches the lower right boundary of the stage, it will stop.
The Reset button and the speed slider
You can also see a button labeled Reset in Figure 1. This button does what most buttons labeled reset do. It resets the program.
There is also a speed slider on the bottom of the IDE but it doesn't show in Figure 1. This slider is used to increase or decrease the animation speed. (The slider doesn't show in Figure 1 because I had to manually reduce the width of the IDE to make it fit into this narrow publication format.)
The classes named World and Actor
The classes named World and Actor are part of the Greenfoot IDE and are always there when you create a new scenario. Their purpose is to make it easy to write animation, game, and simulation scenarios in addition to more general-purpose Java programs. A custom API is also included with the IDE to support that purpose.
To define the class named MyWorld so that I could construct an object from that class to represent the stage, I extended (or inherited from) the class named World. The arrow that points from MyWorld up to World in the class diagram on the right side of Figure 1 indicates that MyWorld extends World. Similarly, to define the class named MyActor so that I could construct an object from that class, I extended the class named Actor.
What does it mean to extend or inherit from another class?
For the benefit of beginners, let's consider a hypothetical analogy. (Experienced Java programmers can skip this section.) Assume that you go to an architect to purchase a set of plans to build a new house. Assume also that the architect has in her files, a general set of plans named World that describes features of all the houses in the development where your house is going to be built. She makes a copy of those plans and that copy becomes a part of the plans for your new house.
Assume that she draws additional plans that refer to everything in theWorld plans and supplements that information with information that is peculiar to your house, such as the types of appliances, the types of bathroom fixtures, the floor coverings, etc. She names the second set of plans MyWorld, and they also become part of the plans for your new house. In effect, the second set of plans has extended the original set of plans and the overall plans for your house include both World and MyWorld.
The architect delivers the two sets of plans to you and you deliver them to the construction contractor who uses them to build your new house. Your new house will have characteristics that are common to all of the houses in the development and will also have characteristics that are peculiar to your individual house.
A fairly good analogy
This is a fairly good analogy to the concept of classes, inheritance, and objects in Java. The two sets of construction plans are analogous to the two classes shown by the two upper boxes in the class diagram in Figure 1. The completed house is analogous to an object that is constructed from those two classes (the stage in this case). The Java code constructs an object from the plans (class) named MyWorld, and the characteristics defined the plans (class) named World are included in the object through inheritance.
The Java code that constructs the object is analogous to the construction contractor that constructs your new house.
You could also say that the two sets of construction plans are analogous to the two classes shown by the two boxes in the lower right in Figure 1, and that the completed house is analogous to the object that is constructed from those two classes (represented by the spider image).
The class definition code
Listing 1 shows the class definition code for the class named MyWorld.
Listing 1. Class definition code for the class named MyWorld.
import greenfoot.*;
/**
The purpose of this class is simply to illustrate a
couple of basic things about Greenfoot.
*/
public class MyWorld extends World
{
public MyWorld()//constructor
{
// Create a new world
super(20, 20, 10);
}//end constructor
}//end MyWorld class
You don't need to worry too much about the details of the code shown in Listing 1 at this time. However, there are a couple of things that are worthy of note.
Color
Even though Java code is never actually colored, I added color to the code in Listing 1 to make it easier to discuss.
The class named MyWorld extends World
Note first the code shown in blue in Listing 1. This code stipulates that the new class named MyWorld extends (inherits from) the class named World. That satisfies the inheritance relationship shown by the top two classes in Figure 1.
Terminology
Objects are constructed from classes.
The constructor
The code shown in red is called a constructor. This code is analogous to the construction contractor that built your new house in the earlier discussion. The purpose of this code is to cause the object to come into existence and to occupy memory.
The stage
You can write general-purpose Java programs using Greenfoot that pretty much ignore most of what you see in Figure 1. However, if you want to use Greenfoot to create a 2D animation, game, or simulation, the easiest thing to do is to take advantage of the structure for the stage and the actors that already exist in the IDE.
If you don't need a stage...
If you are writing a general-purpose Java program that doesn't need a stage, just set the super parameters to (1,1,1).
The stage in a Greenfoot scenario is always a rectangular grid of square cells. The statement in Listing 1 that begins with the word super specifies that the dimensions of the stage for this scenario are 20 cells by 20 cells. The first number is the width of the stage in cells and the second number is the height of the stage in cells. The third number specifies that each cell is a square that is ten pixels on each side.
The spider jerks along
If you write and run this scenario, you will see that the spider moves along rather jerkily, with each step taken by the spider being from the center of the current cell to the center of the next cell along the diagonal path. We could make the spider move much more smoothly by increasing the number of cells and making each cell smaller. However, this would also cause the spider to appear to move more slowly because it would have to take more steps to move the same physical distance on the stage.
Class definition code for the class named MyActor
The code that defines the class named MyActor is shown in Listing 2.
Listing 2. Class definition code for the class named MyActor.
import greenfoot.*;
/**
The purpose of this class is simply to illustrate a
couple of basic things about Greenfoot.
*/
public class MyActor extends Actor
{
public void act()
{
setLocation(getX()+1,getY()+1);
}//end method act
}//end class MyActor
Color added
Once again, I added color to make the code easier to discuss. Beginning with the code shown in blue, the class named MyActor extends the class named Actor satisfying the inheritance relationship given by the two corresponding classes shown in Figure 1.
The method named act
The code shown in red is the definition of a method named act. This method is executed once each time the Act button at the bottom of Figure 1 is clicked. Also, as mentioned earlier, his method is executed repeatedly when the Run button in Figure 1 is clicked.
The purpose of this method is to cause the spider to move diagonally across the stage, moving down and to the right. The stage is represented by a Cartesian coordinate system with the origin at the upper left corner. The x-axis is the horizontal axis and the y axis is the vertical axis. The positive x-direction is to the right. Contrary to what you might expect, the positive y-direction is down the screen instead of up.
Each cell width constitutes one unit on the respective axes with the cell in the upper-left corner having a coordinate value of 0,0.There are 20 cells across and 20 cells down.herefore, the coordinate value of the cell at the upper-right corner is 19,0. The coordinate value of the cell at the bottom left corner is 0,19, and the coordinate value of the cell at the bottom right corner is 19,19.
Make the spider move
The code in the act method in Listing 2 causes the spider to move one cell to the right and one cell down each time the method is executed. This is accomplished by calling the setLocation method to cause the spider's new location to be one cell to the right and one cell down from the current cell. This, in turn is accomplished by getting the x and y coordinate values of the current cell, adding one to each of those values, and using those two sums to define the new location.
Convenience features
This IDE provides several convenience features that make it easy for novice programmers to get something interesting up and running quickly without having to know a lot about Java programming. As mentioned earlier, it is also possible for more advanced Java programmers to use the IDE to write Java applications or applets that exercise the full power of Java, completely ignoring most of the convenience features of the IDE if they choose to do so. Thus, Greenfoot provides a little something for everybody. In this lesson, I will concentrate on the use of the convenience features.
Right-click on the World class
If you right-click on the World class, the context menu shown in Figure 2 will appear.
Figure 2. Context menu for the World class.
This context menu provides three options:
• Open editor
• Inspect
• New subclass...
What is a subclass?
In Java, a class that extends or inherits from another class is often referred to as a subclass of the original class. Note however that class is a keyword while subclass is simply jargon. Therefore, I will refer to every class simply as a class even if it extends another class.
The New subclass option
When you start developing a new scenario, only the World class and the Actor class are pre-defined. It is up to you to extend the World class into a new class that represents your particular world and it is up to you to extend the Actor class into one or more new classes that represent the actors in your scenario.
Creating classes with program code
If you know how to do so, you can also define new classes by writing the Java code to define the classes while ignoring the New subclass option in the context menu of Figure 2. If you create classes outside Greenfoot, and store them in the scenario directory, they will be detected and shown in the class diagram (see Figure 2) when the scenario is opened.
You create a new class to represent your world by selecting the New subclass option in the context menu in Figure 2. When you do, the dialog shown in Figure 3 will appear.
Figure 3. Dialog for specifying name and image for new class.
What does this dialog want from you?
The dialog shown in Figure 2 is asking you to specify a name for your new class and to select an image that will represent your new class as the background image on the stage.You type the name in the text field at the top of Figure 2. Then click on one of the many images that are shown and click the Ok button to select the image.
If you want to import and use an image file that is not part of the Greenfoot distribution, you can click the button labeled Browse for more images to find and select a different image file.
If you want the new world to have a plain white background, you can simply enter the name for the class and click the Ok button.
What do the blue stripes mean?
When you click the Ok button, the dialog will be dismissed and the new class will appear as a subclass of the World class as shown in Figure 1. At that point in time, the box that represents the new class will contain light blue diagonal stripes similar to those shown in the MyActor class in Figure 2. The stripes mean that the class needs to be compiled before it can be used. You can compile the class by clicking the button labeled Compile all at the bottom of Figure 2. (You can also compile the class from within the editor that I will discuss shortly.)
The Inspect option
You can open a class inspector on the World class by selecting the Inspect option in Figure 2. Many different classes and objects can be inspected in Greenfoot in order to obtain more information about the class or the object. I am going to defer a discussion of inspection until later while discussing an object of a more interesting class.
The Open editor option
Selecting the Open editor option in Figure 2 will open the source code of the World class definition in a text editor allowing you to view the definition of the class. However, the World and Actor classes are read-only and cannot be modified. I will defer a discussion of the editor until later while discussing the class named MyWorld.
Context menu for the MyWorld class
If you right-click on the MyWorld class, the context menu shown in Figure 4 will appear.
Figure 4. Context menu for the MyWorld class.
The Open editor option
Probably the first option that you will use from this context menu is the Open editor option so I will begin the discussion with that option. Selection of this option will cause the text editor shown in Figure 5 to appear on the screen. (Note that it was necessary for me to reduce the size of the image to force it to fit into this narrow publication format. As a result, some of the text in Figure 5 isn't very legible.)
Figure 5. The source code editor.
Putting some meat on the skeleton
Skeleton code for a new class is automatically created whenever you create a new class using the New subclass option shown in Figure 4. The first time you select the Open editor option in the context menu for the new class, the skeleton code will appear in the editor. The image shown in Figure 5 was captured after I modified the skeleton code to produce the source code shown in Listing 1.
The editor is a fairly standard source-code editor with a few features designed specifically for use with Greenfoot. I'm not going to bore you with all of the operational details of the editor because I doubt that you need those details. You can probably figure out most of what you need to know on your own with a little experimentation.
Source code versus documentation
There is one aspect of the editor that is different from the norm and worth mentioning. Whenever you create a scenario in Greenfoot, standard Java documentation is automatically generated for all of the classes in the scenario. I explain the format of that documentation a separate document titled The Importance of Sun's Java Documentation (see Resources).
You will notice that there is a pull-down list in the upper right corner of Figure 5. That list contains the following two options:
• Source Code
• Documentation
When Source Code is selected, the window serves as a source code editor for the class. When Documentation is selected, the window serves as a non-editable display window for the standard documentation of the class being edited.
Compiling the source code
Any time you modify the source code for a class, you must compile the new source code before you can use the modified class. You can compile the modified source code in at least three ways:
• Click the Compile button shown in Figure 5.
• Pull down the Tools menu in Figure 5 and select Compile.
• Click the Compile all button in Figure 1.
Whenever a class needs to be compiled, it will appear with diagonal lines as shown by the MyActor class in Figure 2.
The new MyWorld() option
Getting back to the context menu in Figure 4, the new MyWorld() option is used to create a new object from the class named MyWorld. However, whenever you modify the code and then compile the class, a new object for the modified class is automatically created. Therefore, you probably won't need to use this option very often, if at all.
The New subclass option
There may be situations where you would want to define a new class that extends or inherits from the class named MyWorld in Figure 4. If so, you can do that by selecting New subclass in Figure 4, providing a name for the new class, selecting an image for the new class, etc.
The Set image... and Remove options
If you decide to change the image for the class after it has been created, the Set image... option can be used for that purpose.
As the name implies, the Remove option can be used to delete a class from the scenario if you decide that you don't need it after all.
Context menu for the Actor class
Right-clicking the Actor class produces the context menu shown in Figure 6.
Figure 6. Context menu for the Actor class.
This should look familiar
By now, you should have a pretty good idea of the purpose of each of the options in the context menu. As is the case with the World class, you can open the Actor class and view the class definition in the editor. However, as I mentioned earlier, the Actor and World classes are read-only and cannot be modified.
I selected the New subclass option to create the class named MyActor shown in Figure 1. When you select that option, the dialog shown in Figure 3 will appear. As with the MyWorld class discussed earlier, you use this dialog to specify a name for the new class and to select an image that will represent objects of the new class on the stage. If you don't select an image, the default image, which is a small green footprint, will be used.
The context menu for the MyActor class
If you right click on the MyActor class, a context menu similar to the one shown in Figure 4 will appear. The only difference will be that the first option will be titled new MyActor() instead of new MyWorld().
The purpose of each option in this context menu is the same as the purpose of each corresponding option that I explained earlier in conjunction with the class named MyWorld. There is one major difference, however. Whereas you will rarely need to create new objects of the class named MyWorld, you may need to create objects of the MyActor class. Creating objects of the MyActor class can be accomplished in at least three ways:
1. Select the new MyActor() option from the context menu for the class.
2. Left-click the MyActor class once, hold down the Shift key and left-click the location on the stage where you want the object to appear.
3. Write standard Java code to create a new object of the class and add it to your new world. (One way to do this by calling the addObject method in the constructor for your new world.)
Selecting the new MyActor() option from the context menu
The result of selecting the new MyActor() option is shown in Figure 7. However, Figure 7 doesn't show the mouse pointer, which is a critical part of the picture. (Just pretend that you can see the mouse pointer pointing to the spider immediately to the left of the box for the class named MyActor.)
Figure 7. Result of selecting the new MyActor() option.
A new object is created
When you select new MyActor() from the context menu for the MyActor class, a new object of the class is created and the image that represents the object is attached to the mouse pointer. You can drag the image and drop it in the desired location on the stage. Initially the red circle with the diagonal line shown in Figure 7 will appear on top of the image indicating that you can't drop the object in that location. This symbol will disappear once you drag the image into the stage area, indicating that it is okay to drop the object anywhere in the stage area.
Left-click the MyActor class once, hold down the Shift key, etc.
There is no way for me to produce a single image illustrating the methodology indicated by option 2 in the above list. You will simply have to try it for yourself to get the feel of it. However, the result of using this procedure to create a large number of objects of the MyActor class (very quickly) and place them in various locations on the stage is shown in Figure 8.
Figure 8. Lots of spiders.
All the spiders behave the same
Because all of the spiders shown in Figure 8 were created from the same class, and the behavior of all objects created from that class is defined by the class definition shown in Listing 2, clicking the Run button in the bottom of Figure 8 causes all of the spiders to move in parallel diagonal paths down and to the right until they reach the boundary of the stage. Once they reach the boundary, they move along that boundary until they all bunch up on top of one another in the bottom right corner as shown in Figure 9.
Figure 9. The Greenfoot IDE in Run mode.
The Run button is now a Pause button
However, my purpose in showing you Figure 9 was not to show you the spiders bunched up in the bottom right corner. Rather, my purpose was to show you what happens to the Run button in Figure 1 when you click it. As you can see in Figure 9, the Run button has turned into a Pause button. Once you click theRun button, the scenario will continue to run until one of the following occurs:
• You click the Pause button.
• The scenario is terminated by program code (not covered in this tutorial).
• You click the X-button in the upper right corner of Figure 9.
• A few other possibilities such as turning of the power to the computer.
You can drag and drop the spiders
When you click the Pause button, the scenario will stop running and the button will revert to a Run button. Note, however, that the spiders won't return to their original locations as shown in Figure 8 because there is no code in the program to cause them to do so. However, you can grab each spider with the mouse pointer and drag it to any location you choose on the stage when the scenario is not in the Run mode. You can't drag the spiders around when the scenario is in the Run mode because the location of each spider is being controlled by the repeated execution of the setLocation method shown in Listing 2.
The context menu for a MyActor object
Right-clicking one of the spiders will produce the context menu shown in Figure 10.
Figure 10. The context menu for a MyActor object.
Second-level information
If you point to one of the top two options in the context menu in Figure 10, information regarding the methods inherited into the object will be presented as shown in Figure 11.
Figure 11. Method inheritance information for a MyActor object.
If you are just learning how to program in Java, you probably won't understand it even if I try to explain the information shown in Figure 11. You will learn about those things in due time. If you are further along in your understanding of Java programming, you probably don't need an explanation anyway so I won't provide one.
Only one method in the class definition
The context menu for an object shows all of the methods that are defined in the class from which the object was created. The class named MyActor defined only one method, and that is the method named act as shown in Listing 2. Therefore, the only method shown in the context menu in Figure 10 is the method named act.
One interesting feature of the context menu is that you can click on a method name in the context menu and that method will be executed one time. This makes it possible to individually execute new methods that you write and compile so that you can confirm proper behavior of each method independently of the other methods in the class definition. However, this isn't too useful with theact method because exactly the same thing happens each time you click theAct button at the bottom of Figure 1. Therefore, this scenario isn't very useful for demonstrating the usefulness of this capability.
Selecting the inspect option
Selecting the inspect option from the context menu for an object will cause an Object Inspector window similar to the one shown in Figure 12 to open.
Figure 12. An Object Inspector window.
Some information is intuitively obvious and some is not
Some of the information in Figure 12, such as the current location of the object in x and y coordinate values and the rotation of the object is intuitively obvious. Some is not so obvious. For example, if you double-click on the top box containing a crooked arrow, a second object inspector window will open containing information about the parent (container) object of the current object. In this case, the container is the object that was created from the class named MyWorld, which I have been referring to as the stage.
If you double-click on the bottom box containing a crooked arrow, another object inspector window will open containing information about the spider image that represents the object on the stage. That object inspector also contains some arrows, which can be double-clicked. The bottom line is that the Inspect option on an object's context menu makes it possible for you obtain information about the object itself, and also to obtain information about other objects to which that object is linked.
Object linkages
The object created from the MyActor class is linked to the object created from the MyWorld class because it is physically contained in that object on the stage. It is linked to an object that was originally created from a file containing an image of a spider because that image is being used to visually represent the object on the stage. That image object, by the way, was created from a class named GreenfootImage, which is one of the relatively hidden parts of the Greenfoot IDE that mainly does its work behind the scenes and out of sight.
The context menu for the stage
Right clicking the label myWorld at the top of Figure 1 causes a context menu to pop up for the object that was created from the class named MyWorld. There is nothing on that menu that I haven't already discussed, so there is no point in me discussing that context menu further.
Scenario Information
Clicking the button labeled Scenario Information at the top right of Figure 1 opens a text editor on a file named README.TXT. This file is contained in the folder that contains the scenario files. The text that is contained in the file when it opens encourages the developer to describe the scenario for the benefit of users who may later need that information.
The target audience
According to recent correspondence with Michael Kölling,
"Today, we are using Greenfoot with high school kids (age 14 and up), and at college and university level. I'd claim that as the target audience. We needed to get a bit of experience with actual classroom situations to see where the lower bound in the age group is, and 14 works well (as does anything older), and I wouldn't recommend it much below that age."
Having taught computer programming at the community college level for about fifteen years and having taught Java OOP since 1997, I am of the opinion that the target audience for Greenfoot clearly includes students at the college level.
Also having taught Java OOP to many old-school procedural programmers who are still struggling with the transition from procedural to object-oriented programming, both at the college and in onsite company-sponsored training programs, I believe that the target audience also includes old-school procedural programmers.
Greenfoot makes learning fun
My great granddaughter often repeats a saying that she learned in Montessori kindergarten, "Fun is learning and learning is fun." Even at my somewhat advanced age, I couldn't agree more.
Greenfoot makes learning to program with Java not only practical but fun as well. Let's face it, regardless of our age, most of us do a better job on those tasks that we enjoy than we do on those tasks that we don't enjoy. So the question is, which activity would most students find more enjoyable?
• Writing a Java program that causes an image of a spider to chase an image of a fly around the screen, or
• Writing a text-based Java program that computes and displays an amortization table for a 30-year mortgage at an interest rate of 6.25 percent.
The same understanding of fundamentals is required
Both Java programs would require an understanding of the same fundamental programming concepts. The difference is that writing programs that provide sensory feedback (such as spiders chasing flies) can be fun while writing programs to compute amortization tables can be extremely boring. At least that is the case for most of the students that I have met during my fifteen years of teaching.
Thanks to Greenfoot, we as Java instructors now have the opportunity to conduct programming instruction that is not only solid from an educational and technical viewpoint, but is also fun and engaging for the students. (Even most old-school procedural programmers would probably rather spend time writing interesting OO programs than writing boring OO programs.)
This kind of help is needed
Without some help of the kind provided by Greenfoot, beginning programmers are not capable of writing a program that causes an image of a spider to chase an image of a fly around the screen, or much else in the way of interesting programs for that matter. (Believe it or not, most students don't get too excited by if statements and while loops.)
Being able to start from scratch and write programs with exciting graphics requires knowledge of some fairly advanced Java programming concepts. Beginning programming students simply do not possess that knowledge and those students are usually relegated to writing boring programs of the amortization-table variety.
The Xbox generation
Computer science enrollments are down in most high schools, colleges, and universities in the U.S. There are many reasons for this. In my opinion, one of the most important reasons is that most existing computer science curricula fail to satisfy the needs of the Xbox generation for something more stimulating than amortization tables.
The challenge
Computer programs of the amortization-table variety are clearly necessary in our economy. However, they should not be necessary in an introductory programming course in a high school, college, or university. Our challenge, as computer science instructors in the U.S., is to keep students involved, interested, and engaged long enough for them to realize that computer programming and computer science are interesting professions even if it may occasionally be necessary to write a program involving amortization tables or to satisfy other similarly boring objectives.
It has been shown in various studies at Carnegie Mellon University and elsewhere that making it possible for students to produce interesting results early in an introductory programming course tends to reduce the dropout rate. This should apply regardless of whether we are talking about high school students, community college students, computer-programming students in curricula other than hard-core computer science at the university level, first-year students with computer science aspirations at the university level, and even old-school procedural programmers struggling with the transition into OOP.
Boredom is a killer of ambition
With the advent of the web, there are many opportunities both inside and outside of hard-core computer science that require participants to understand and to be proficient in modern object-oriented programming using Java, C#, C++, or other similar programming languages. Boredom is a killer of ambition and the reality is that a large percentage of computer programming instruction in the U.S. is extremely boring for the first couple of semesters. Perhaps with products like Greenfoot, we can rectify that situation and rekindle interest in computer science among students in the U.S.
Speaking of the web
Once a Greenfoot scenario is completed and tested, Greenfoot makes it veryeasy to:
1. Export the scenario as a stand-alone Java application suitable for execution on just about any computer that has Java version 1.5 or later installed (without a requirement for the Greenfoot IDE to exist on that computer).
2. Export the scenario as an applet for publishing in a web page on your favorite web server.
3. Publish the scenario on a public Greenfoot website for execution and comments by others.
Writing dual-purpose programs is not easy
Writing a Java program so that it can be used either as an application or an applet isn't rocket science. However, writing such dual-purpose programs is well beyond the capabilities of most beginning programming students. However, Greenfoot makes it easy to do just that.
Many students maintain their own web sites and might like to show off their early programming creations by posting them as applets on their web sites. The ability to do this should be a positive motivating factor for many of those students.
Those same students, as well as many other students, might like to share their early programming creations with friends and family (particularly those with slow or no Internet access) as stand-alone Java applications. Greenfoot makes that easy also. The same Greenfoot program can be exported in both forms.
Greenfoot, Scratch, Alice, and BlueJ
While some tools are more advanced than others, there are currently at least four programming paradigms that occupy roughly the same space in terms of programming education:
1. Greenfoot
2. Scratch
3. Alice
4. BlueJ
I am very familiar with the first three. I know very little about BlueJ so I won't comment on it at this time. (There are probably others that I don't know about as well.)
Nerd
A computer expert by aptitude and not mere training. Usually male, under the age of 35 and socially inept; a person whose tremendous skill with operating or designing computer hardware or software is exceeded only by his, rarely her, passionate love of the technology.
Social networking for nerds
The folks involved in the Scratch project at MIT have proven the positive effect of providing a capability for students to share their programming creations on a public website for review and comment by their peers. By providing this capability, they are attracting and keeping students engaged, involved, and learning about computer programming completely outside of formal schoolwork. (This capability of Scratch is similar to item 3 in the above list.)
The Scratch website, on which students share programs written in Scratch, has become a form of social networking for thousands of young scratchers (as they like to refer to themselves) from around the world. I like to think of the Scratch website, in a positive sense, as social networking for nerds. (By the way, I recognize that I am something of a nerd myself, so I don't consider nerd to be a derogatory term.)
Scratch is not a serious programming language
However, even though the Scratch website is incredibly popular among younger students, Scratch is not a serious programming language in the sense that Java, C++, and C# are serious programming languages. Scratch is seriously lacking insofar as support for important fundamental programming concepts is concerned. Of the ten to fifteen fundamental programming concepts that most computer science professors agree to be extremely important, Scratch only supports three or four.
The main emphasis in Scratch is on multimedia capabilities
Once you get beyond variables, if-else statements, loops, and operators (which Scratch does support in a limited sense), Scratch is primarily a toy language that makes it easy for students to do wild and wonderful things with a wide array of multimedia capabilities. (However, I believe that the multimedia capabilities are one of the factors that make Scratch so popular among younger students.)
Developed in Squeak
Scratch was developed using a programming language named Squeak, but the underlying language is completely hidden from the Scratch programmer. Although I know nothing about Squeak, I don't believe that it is widely used in either academia or industry. Apparently, however, it was well suited for the development of Scratch.
Unconventional loop structures
While Scratch does support loop structures, the loop structures in Scratch are unconventional, at least from the viewpoint of someone whose primary programming experience for the past twenty years or so derives from a tradition rooted in C including C++, Java, and C#. I don't know if the unconventional loop structures in Scratch are a latent manifestation of Squeak and/or Smalltalk, (which I also know nothing about), or if they were designed that way for some other reason. In my opinion, it would have been better from an educational viewpoint for Scratch to use a more conventional C-style loop structure based on the keywords while, for, and possibly do while.
Scratch is a dead-end IDE
The bottom line is that Scratch simply wasn't designed to teach students how to do serious programming. While it may be educational with respect to the effective use of multimedia capability, (and it is very successful in giving young students constructive outlets for their creative energies), insofar as computer science education is concerned, Scratch is a dead-end IDE. Scratch is clearly not suitable for major programming projects. Further, there is no evidence that the folks in the Scratch program at MIT are working on a smooth migration path for students from Scratch to any serious programming language.
What about Alice?
The latest released version of Alice is version 2.0. (Version 2.2 has been released in beta as of this writing.) Alice 3.0 is on the drawing board. I will divide this discussion between Alice 2.0 and Alice 3.0. (Alice 2.2 doesn't appear to be significantly different from 2.0 insofar as this discussion is concerned, so I will skip it altogether.)
Alice 2.0 is also fun and engaging
Alice 2.0 is a 3D programming language, which is also a lot of fun. However, it is more difficult to use than Scratch and may not be as much fun as Scratch. (Alice provides much less in the way of multimedia functionality than Scratch.) Alice 2.0 is much more powerful and more conventional than Scratch, but is still somewhat unconventional nonetheless.
Alice supports most fundamental programming concepts
Alice supports almost all of the fundamental programming concepts that I referred to earlier. I personally consider Alice 2.0 to be suitable for use in a first programming course for community-college students who don't have a strong programming background from high school. However, almost all of my colleagues in the computer science department in the college where I teach disagree with me on this.
A drag and drop programming interface
Both Alice 2.0 and Scratch use a drag and drop programming interface.Scratch programmers are totally insulated from anything resembling source code. Alice 2.0 students are required to create source code using the drag and drop interface, but they are not required to memorize syntax. My colleagues seem to uniformly agree that this is a major failing of Alice. Many Alice students simply don't learn syntax because they are not forced to do so. According to my colleagues, this places them at a disadvantage when they enroll in the next programming course in the computer science curriculum.
Alice 2.0 is also not a serious programming language
To compound matters, Alice 2.0 is also not a serious programming language. By this, I mean that no one is going to use Alice 2.0 for any serious programming projects. Even though Alice 2.0 was developed using Java, the underlying language is completely hidden in Alice 2.0. The bottom line is that Alice 2.0 is strictly for teaching.
A difficult transition is required
Alice 2.0 students must transition to a serious programming language such as Java, C#, or C++ if they are going to continue their computer programming education beyond the first semester. There is no smooth migration path from either Scratch or Alice 2.0 to a serious programming language. According to my colleagues, this is a major drawback of Alice 2.0. (I doubt that they would even be willing to discuss Scratch.) They believe that many students who successfully complete an introductory programming course using Alice 2.0 are still not prepared to make the transition into the next programming course in the computer science curriculum.
Alice 3.0 will be a serious programming language - Java
The folks at Carnegie Mellon University (CMU) are currently hard at work to solve most of the problems that I described above including a smooth migration path to a serious programming language. That solution will come in the form of Alice 3.0.
Alice 3.0 will make it relatively easy to develop 3D games and animations just like Alice 2.0, and will also provide a drag and drop programming interface. However, and this is extremely important, Alice 3.0 will also expose the full power of Java.
The programming interface will be optional
The programming interface that is used with Alice 3.0, whether it is drag and drop or text editor, will be optional. Students will be able to program in either or both ways. As I understand it, the Alice 3.0 interface will sit atop Eclipse, which is already a very popular professional Java IDE.
According to the folks at CMU, a capable programmer will be able to do anything with Alice 3.0 that can be done with Java. While Alice 2.0 is also a dead-end IDE (albeit much more powerful than Scratch), if the above statement holds true, there will be nothing dead end about Alice 3.0. With the full power of Java and a built-in Eclipse IDE, Alice 3.0 will be capable of carrying students all the way from introductory programming to professional employment.
Now for the bad news
That's the good news. The bad news is that the release schedule for Alice 3.0 continues to slip, and the latest estimate for release of a non-beta version is sometime around the fall of 2009.
Where does Greenfoot fit in the mix?
Greenfoot is not a dead-end IDE
Unlike Scratch and Alice 2.0, Greenfoot is not a dead-end IDE because it exposes and supports the full power of Java. In short, Greenfoot is a Java IDE that has been specialized to make programming fun and engaging for beginning programmers.
Although you would probably prefer to use NetBeans or Eclipse for large programming projects, you could develop large projects using Greenfoot if you chose to do so.
Requires students to learn and use Java syntax
Also, because Greenfoot lacks a drag and drop programming interface and requires the students to learn and use Java syntax, it should make my colleagues happy.
Greenfoot is a very good starting point
Students can go as far using Greenfoot as they choose to go. There are virtually no issues having to do with migrating from Greenfoot to a serious programming language. Greenfoot is already an IDE for a serious programming language -- Java.
Of course, when students reach an intermediate to high level of Java programming proficiency, they will probably choose to switch over to a more professional IDE such as NetBeans or Eclipse. Along the way, they may choose to take a look at BlueJ or JGrasp. In the early days of learning to program, however, both NetBeans and Eclipse are overkill. Furthermore, NetBeans, Eclipse, BlueJ, and JGrasp don't provide the features of Greenfoot that are designed to engage programming students and to keep them interested until they are ready for an IDE like NetBeans.
The export dialog
Getting off my soapbox, and returning to technical details, selecting the Export... option on the Scenario menu of Figure 1 produces the dialog shown in Figure 13.
Figure 13. Export dialog.
To export your scenario, select one of the icons at the top of the dialog, fill in the blanks and click the Export button. (Note that you must establish a free account on the Greenfoot Gallery website (see Resources) to publish your scenario on that website.)
Java version 1.5 or later is required
Also note that in order to view Greenfoot applets from the Greenfoot Gallery, to view them locally in your browser, or to view them from any other website, your browser must be compatible with Java 1.5 or later.
Firefox compatibility
When I first became involved with Greenfoot, I discovered that my Firefox browser had not updated itself beyond Java 1.4 even though it had gone through numerous update cycles and everything else on my computer was running Java 1.6. (Firefox seemed to be really fond of Java 1.4.) In the end, I had to go to the Control Panel and remove an old Java 1.4 JRE that was still on my computer to force Firefox to update itself to use Java 1.6.
Run the program
I invite you to go to Greenfoot Home (see Resources) where you can download and install Greenfoot. As of this writing, Greenfoot version 1.4.1 is the latest release.; I'm told, however, that version 1.4.5 will be released very soon, perhaps before this tutorial is actually published.
Also if you need to do so, go to Sun, download and install the latest version of Java (see Resources). Remember, Greenfoot requires Java 1.5 or later, and as of this writing Java 1.6 is available from Sun. According to recent correspondence with Michael Kölling,
"If, at installation time, Greenfoot finds only one Java version on the system (JDK install, not JRE), it will just use it. (Must be Java 5 or up.) If it finds more than one Java version, it asks the user at installation time which one to use. This can be changed later."
Once you computer is ready, use the code in Listing 1 and Listing 2, along with the written instructions in this tutorial to create and execute the simple scenario that I described earlier. Experiment with the code, making changes, and observing the results of your changes. Make certain that you can explain why your changes behave as they do.
Summary
My purpose in publishing this tutorial is to make the case that the Greenfoot IDE is quite possibly the best IDE available at this time for teaching a beginning course in computer programming. Because Greenfoot exposes the full power of Java, it may also prove useful in a second-semester programming course that concentrates on object-oriented programming. I am considering the incorporation of Greenfoot in a variety of ways into the second-semester Java/OOP course that I routinely teach each semester.
No major scenarios in this lesson
Most of the tutorial lessons that I publish contain at least one fairly substantial sample program. However, that is not the case for this tutorial. My main purpose in publishing this tutorial was simply to introduce you to Greenfoot in terms of its capabilities and its operation. I will publish other lessons in the future that will show you how to put Greenfoot to work in more significant ways.
Resources
Historical information about Greenfoot
The first prototype of Greenfoot was developed by Poul Henriksen as part of his Master Thesis at The Maersk Mc-Kinney Moller Institute for Production Technology, University of Southern Denmark, 2004. Greenfoot 1.0 was released on May 31, 2006.
The current release of Greenfoot is version 1.4.1. The About Greenfoot page within the IDE indicates that the current Greenfoot team consists of Poul Henriksen, Michael Kölling, Davin McCall, Bruce Quig, and John Rosenberg.
A page on the Greenfoot website states that Greenfoot is a project at the University of Kent at Canterbury (UK) and Deakin University, Melbourne (Australia), funded by Sun Microsystems. Poul Henriksen and Michael Kölling were at the University of Southern Denmark when Greenfoot started. Both are now at the University of Kent. Some team members are at Deakin University.
Greenfoot won a Dukes Choice Award for 2007. The announcement was made at Sun's prestigious JavaOne conference in California. James Gosling, the inventor of Java, presented the award.
Copyright
Copyright 2008, Richard G. Baldwin. Reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.
About the author
Richard Baldwin is a college professor (at Austin Community College in Austin, TX) and private consultant whose primary focus is a combination of Java, C#, and XML. In addition to the many platform and/or language independent benefits of Java and C# applications, he believes that a combination of Java, C#, and XML will become the primary driving force in the delivery of structured information on the Web.
Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's ProgrammingTutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
[email protected]
Comment and Contribute
(Maximum characters: 1200). You have characters left.
Enterprise Development Update
Don't miss an article. Subscribe to our newsletter below.
By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.
Thanks for your registration, follow us on our social networks to keep up-to-date | {
"url": "https://www.developer.com/java/other/article.php/3761811/Getting-Started-with-the-Greenfoot-Java-IDE.htm",
"source_domain": "www.developer.com",
"snapshot_id": "crawl=CC-MAIN-2018-43",
"warc_metadata": {
"Content-Length": "162598",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:F2LMTSGNX4BOURG6NTEVZYWEC5K6YOU7",
"WARC-Concurrent-To": "<urn:uuid:17e1b372-055b-43cb-8992-5c1de80b1a8b>",
"WARC-Date": "2018-10-20T03:55:36Z",
"WARC-IP-Address": "104.108.112.158",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:7G46QG5JFKWDZLJJGXM6BFXOCGBGKBLB",
"WARC-Record-ID": "<urn:uuid:edd6aa2c-4a87-4f7c-b813-2deef8e9ff13>",
"WARC-Target-URI": "https://www.developer.com/java/other/article.php/3761811/Getting-Started-with-the-Greenfoot-Java-IDE.htm",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:081f685e-9677-495a-ad5e-086648a790bf>"
},
"warc_info": "isPartOf: CC-MAIN-2018-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-102-130-252.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
7,
24,
36,
37,
81,
82,
100,
126,
143,
163,
164,
192,
193,
194,
202,
203,
222,
223,
564,
565,
604,
605,
786,
787,
813,
1301,
1302,
1319,
1320,
1465,
1466,
1475,
1476,
1691,
1692,
1783,
1870,
1939,
2024,
2025,
2059,
2060,
2310,
2311,
2323,
2324,
2520,
2521,
2529,
2530,
2587,
2635,
2701,
2751,
2789,
2837,
2897,
2928,
2973,
3027,
3095,
3138,
3168,
3169,
3178,
3179,
3245,
3311,
3312,
3335,
3336,
3505,
3506,
3534,
3535,
3695,
3696,
3749,
3750,
3775,
3776,
4095,
4096,
4116,
4375,
4376,
4396,
4397,
4669,
4670,
4713,
4714,
5044,
5045,
5062,
5063,
5315,
5316,
5852,
5853,
5891,
5892,
6021,
6022,
6318,
6319,
6353,
6354,
6674,
6675,
7107,
7108,
7167,
7168,
7653,
7654,
8154,
8155,
8474,
8475,
8497,
8498,
9018,
9019,
9136,
9137,
9418,
9419,
9445,
9446,
9517,
9518,
9580,
9581,
9601,
9602,
9606,
9658,
9698,
9701,
9736,
9738,
9772,
9778,
9808,
9835,
9858,
9879,
9880,
10039,
10040,
10042,
10048,
10166,
10167,
10205,
10206,
10441,
10442,
10454,
10492,
10493,
10509,
10510,
10757,
10758,
10768,
10769,
11094,
11095,
11124,
11243,
11244,
11668,
11669,
11692,
11693,
12194,
12195,
12245,
12246,
12315,
12316,
12378,
12379,
12399,
12403,
12455,
12495,
12498,
12533,
12535,
12558,
12564,
12604,
12628,
12649,
12650,
12662,
12663,
12916,
12917,
12938,
12939,
13200,
13201,
13625,
13626,
14022,
14023,
14044,
14045,
14525,
14526,
14547,
14548,
15132,
15133,
15164,
15165,
15252,
15253,
15297,
15298,
15340,
15341,
15357,
15369,
15389,
15409,
15689,
15690,
15714,
15715,
16031,
16032,
16067,
16424,
16425,
16597,
16598,
16600,
16601,
16603,
16604,
16606,
16607,
16609,
16610,
16672,
16673,
16710,
16711,
17043,
17044,
17235,
17236,
17365,
17366,
17397,
17398,
17958,
17959,
17978,
17979,
18321,
18322,
18345,
18346,
18683,
18684,
18719,
18720,
18809,
18810,
18856,
18857,
18880,
18881,
19304,
19305,
19339,
19340,
19374,
19375,
19767,
19768,
20107,
20108,
20141,
20142,
20500,
20501,
20633,
20634,
20650,
20668,
20669,
20897,
20898,
20924,
20925,
21115,
21116,
21164,
21225,
21271,
21272,
21389,
21390,
21415,
21416,
21753,
21754,
21778,
21779,
22054,
22055,
22091,
22092,
22221,
22222,
22357,
22358,
22391,
22392,
22468,
22469,
22513,
22514,
22540,
22541,
22853,
22854,
23293,
23294,
23333,
23334,
23545,
23546,
23974,
23975,
24049,
24191,
24380,
24381,
24438,
24439,
24738,
24739,
24795,
24796,
24820,
24821,
25385,
25386,
25451,
25452,
25825,
25826,
25853,
25854,
25886,
25887,
26409,
26410,
26451,
26452,
26489,
26490,
26876,
26877,
26909,
26988,
27054,
27130,
27131,
27165,
27166,
27782,
27783,
27821,
27822,
27906,
27907,
27957,
27958,
27983,
27984,
28162,
28163,
28227,
28228,
28556,
28557,
28597,
28598,
28915,
28916,
29509,
29510,
29539,
29540,
29690,
29691,
29730,
29731,
29787,
29788,
30312,
30313,
30810,
30811,
30827,
30828,
31372,
31373,
31404,
31405,
31684,
31685,
31706,
31707,
32069,
32070,
32090,
32091,
32148,
32149,
32509,
32510,
32746,
32747,
33065,
33066,
33095,
33096,
33283,
33284,
33583,
33584,
33693,
33840,
33841,
33892,
33893,
34285,
34286,
34649,
34650,
34678,
34679,
35026,
35027,
35343,
35344,
35364,
35365,
35701,
35702,
35716,
35717,
36285,
36286,
36893,
36894,
36926,
36927,
37513,
37514,
37534,
37535,
37618,
37619,
37846,
37942,
38036,
38037,
38079,
38080,
38352,
38353,
38594,
38595,
38903,
38904,
38941,
38942,
39116,
39117,
39132,
39145,
39156,
39167,
39168,
39340,
39341,
39343,
39348,
39617,
39618,
39646,
39647,
40103,
40104,
40519,
40520,
40566,
40567,
41043,
41044,
41103,
41104,
41501,
41502,
41522,
41523,
41847,
41848,
41879,
41880,
42548,
42549,
42575,
42576,
43191,
43192,
43210,
43211,
43560,
43561,
43596,
43597,
43952,
43953,
44006,
44007,
44409,
44410,
44448,
44449,
45041,
45042,
45095,
45096,
45430,
45431,
45466,
45467,
46110,
46111,
46167,
46168,
46413,
46414,
46663,
46664,
46707,
46708,
47004,
47005,
47465,
47466,
47487,
47488,
47680,
47681,
47718,
47719,
47751,
47752,
47994,
47995,
48161,
48162,
48209,
48210,
48370,
48371,
48411,
48412,
48653,
48654,
49216,
49217,
49235,
49236,
49400,
49401,
49427,
49428,
49688,
49689,
49727,
49728,
49940,
49941,
49963,
49964,
50402,
50403,
50419,
50420,
50705,
50706,
50969,
50970,
51242,
51243,
51588,
51589,
51597,
51598,
52104,
52105,
52139,
52140,
52539,
52540,
52550,
52551,
52590,
52591,
52835,
52836,
53060,
53061,
53433,
53434,
53618,
53619,
53620,
53630,
53631,
53794,
53795,
53812,
53813,
54221,
54222,
54574,
54575,
54998,
54999,
55162,
55163,
55187,
55188,
55189,
55190,
55191,
55192,
55193,
55216,
55217,
55219,
55220,
55221,
55275,
55276,
55278,
55279,
55281,
55282,
55283,
55313,
55314,
55372,
55373,
55698,
55699,
55700
],
"line_end_idx": [
7,
24,
36,
37,
81,
82,
100,
126,
143,
163,
164,
192,
193,
194,
202,
203,
222,
223,
564,
565,
604,
605,
786,
787,
813,
1301,
1302,
1319,
1320,
1465,
1466,
1475,
1476,
1691,
1692,
1783,
1870,
1939,
2024,
2025,
2059,
2060,
2310,
2311,
2323,
2324,
2520,
2521,
2529,
2530,
2587,
2635,
2701,
2751,
2789,
2837,
2897,
2928,
2973,
3027,
3095,
3138,
3168,
3169,
3178,
3179,
3245,
3311,
3312,
3335,
3336,
3505,
3506,
3534,
3535,
3695,
3696,
3749,
3750,
3775,
3776,
4095,
4096,
4116,
4375,
4376,
4396,
4397,
4669,
4670,
4713,
4714,
5044,
5045,
5062,
5063,
5315,
5316,
5852,
5853,
5891,
5892,
6021,
6022,
6318,
6319,
6353,
6354,
6674,
6675,
7107,
7108,
7167,
7168,
7653,
7654,
8154,
8155,
8474,
8475,
8497,
8498,
9018,
9019,
9136,
9137,
9418,
9419,
9445,
9446,
9517,
9518,
9580,
9581,
9601,
9602,
9606,
9658,
9698,
9701,
9736,
9738,
9772,
9778,
9808,
9835,
9858,
9879,
9880,
10039,
10040,
10042,
10048,
10166,
10167,
10205,
10206,
10441,
10442,
10454,
10492,
10493,
10509,
10510,
10757,
10758,
10768,
10769,
11094,
11095,
11124,
11243,
11244,
11668,
11669,
11692,
11693,
12194,
12195,
12245,
12246,
12315,
12316,
12378,
12379,
12399,
12403,
12455,
12495,
12498,
12533,
12535,
12558,
12564,
12604,
12628,
12649,
12650,
12662,
12663,
12916,
12917,
12938,
12939,
13200,
13201,
13625,
13626,
14022,
14023,
14044,
14045,
14525,
14526,
14547,
14548,
15132,
15133,
15164,
15165,
15252,
15253,
15297,
15298,
15340,
15341,
15357,
15369,
15389,
15409,
15689,
15690,
15714,
15715,
16031,
16032,
16067,
16424,
16425,
16597,
16598,
16600,
16601,
16603,
16604,
16606,
16607,
16609,
16610,
16672,
16673,
16710,
16711,
17043,
17044,
17235,
17236,
17365,
17366,
17397,
17398,
17958,
17959,
17978,
17979,
18321,
18322,
18345,
18346,
18683,
18684,
18719,
18720,
18809,
18810,
18856,
18857,
18880,
18881,
19304,
19305,
19339,
19340,
19374,
19375,
19767,
19768,
20107,
20108,
20141,
20142,
20500,
20501,
20633,
20634,
20650,
20668,
20669,
20897,
20898,
20924,
20925,
21115,
21116,
21164,
21225,
21271,
21272,
21389,
21390,
21415,
21416,
21753,
21754,
21778,
21779,
22054,
22055,
22091,
22092,
22221,
22222,
22357,
22358,
22391,
22392,
22468,
22469,
22513,
22514,
22540,
22541,
22853,
22854,
23293,
23294,
23333,
23334,
23545,
23546,
23974,
23975,
24049,
24191,
24380,
24381,
24438,
24439,
24738,
24739,
24795,
24796,
24820,
24821,
25385,
25386,
25451,
25452,
25825,
25826,
25853,
25854,
25886,
25887,
26409,
26410,
26451,
26452,
26489,
26490,
26876,
26877,
26909,
26988,
27054,
27130,
27131,
27165,
27166,
27782,
27783,
27821,
27822,
27906,
27907,
27957,
27958,
27983,
27984,
28162,
28163,
28227,
28228,
28556,
28557,
28597,
28598,
28915,
28916,
29509,
29510,
29539,
29540,
29690,
29691,
29730,
29731,
29787,
29788,
30312,
30313,
30810,
30811,
30827,
30828,
31372,
31373,
31404,
31405,
31684,
31685,
31706,
31707,
32069,
32070,
32090,
32091,
32148,
32149,
32509,
32510,
32746,
32747,
33065,
33066,
33095,
33096,
33283,
33284,
33583,
33584,
33693,
33840,
33841,
33892,
33893,
34285,
34286,
34649,
34650,
34678,
34679,
35026,
35027,
35343,
35344,
35364,
35365,
35701,
35702,
35716,
35717,
36285,
36286,
36893,
36894,
36926,
36927,
37513,
37514,
37534,
37535,
37618,
37619,
37846,
37942,
38036,
38037,
38079,
38080,
38352,
38353,
38594,
38595,
38903,
38904,
38941,
38942,
39116,
39117,
39132,
39145,
39156,
39167,
39168,
39340,
39341,
39343,
39348,
39617,
39618,
39646,
39647,
40103,
40104,
40519,
40520,
40566,
40567,
41043,
41044,
41103,
41104,
41501,
41502,
41522,
41523,
41847,
41848,
41879,
41880,
42548,
42549,
42575,
42576,
43191,
43192,
43210,
43211,
43560,
43561,
43596,
43597,
43952,
43953,
44006,
44007,
44409,
44410,
44448,
44449,
45041,
45042,
45095,
45096,
45430,
45431,
45466,
45467,
46110,
46111,
46167,
46168,
46413,
46414,
46663,
46664,
46707,
46708,
47004,
47005,
47465,
47466,
47487,
47488,
47680,
47681,
47718,
47719,
47751,
47752,
47994,
47995,
48161,
48162,
48209,
48210,
48370,
48371,
48411,
48412,
48653,
48654,
49216,
49217,
49235,
49236,
49400,
49401,
49427,
49428,
49688,
49689,
49727,
49728,
49940,
49941,
49963,
49964,
50402,
50403,
50419,
50420,
50705,
50706,
50969,
50970,
51242,
51243,
51588,
51589,
51597,
51598,
52104,
52105,
52139,
52140,
52539,
52540,
52550,
52551,
52590,
52591,
52835,
52836,
53060,
53061,
53433,
53434,
53618,
53619,
53620,
53630,
53631,
53794,
53795,
53812,
53813,
54221,
54222,
54574,
54575,
54998,
54999,
55162,
55163,
55187,
55188,
55189,
55190,
55191,
55192,
55193,
55216,
55217,
55219,
55220,
55221,
55275,
55276,
55278,
55279,
55281,
55282,
55283,
55313,
55314,
55372,
55373,
55698,
55699,
55700,
55781
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 55781,
"ccnet_original_nlines": 672,
"rps_doc_curly_bracket": 0.00014341999485623091,
"rps_doc_ldnoobw_words": 3,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4326665997505188,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.016130520030856133,
"rps_doc_frac_lines_end_with_ellipsis": 0.0029717700090259314,
"rps_doc_frac_no_alph_words": 0.1353120058774948,
"rps_doc_frac_unique_words": 0.16190576553344727,
"rps_doc_mean_word_length": 4.695161819458008,
"rps_doc_num_sentences": 565,
"rps_doc_symbol_to_word_ratio": 0.0011982700088992715,
"rps_doc_unigram_entropy": 5.844407558441162,
"rps_doc_word_count": 9487,
"rps_doc_frac_chars_dupe_10grams": 0.03075679950416088,
"rps_doc_frac_chars_dupe_5grams": 0.18020789325237274,
"rps_doc_frac_chars_dupe_6grams": 0.11626967042684555,
"rps_doc_frac_chars_dupe_7grams": 0.0877579003572464,
"rps_doc_frac_chars_dupe_8grams": 0.06701389700174332,
"rps_doc_frac_chars_dupe_9grams": 0.04433917999267578,
"rps_doc_frac_chars_top_2gram": 0.010214850306510925,
"rps_doc_frac_chars_top_3gram": 0.007880030199885368,
"rps_doc_frac_chars_top_4gram": 0.004961499944329262,
"rps_doc_books_importance": -6217.74560546875,
"rps_doc_books_importance_length_correction": -6217.74560546875,
"rps_doc_openwebtext_importance": -2702.38427734375,
"rps_doc_openwebtext_importance_length_correction": -2702.38427734375,
"rps_doc_wikipedia_importance": -2333.58154296875,
"rps_doc_wikipedia_importance_length_correction": -2333.58154296875
},
"fasttext": {
"dclm": 0.09832459688186646,
"english": 0.9348793625831604,
"fineweb_edu_approx": 2.54681134223938,
"eai_general_math": 0.9292080998420715,
"eai_open_web_math": 0.2057706117630005,
"eai_web_code": 0.7783759236335754
}
} | {
"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": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
6,968,353,001,255,961,000 | В CSS3 появилось свойство
1
box-sizing
, смысл которого в способе вычисления ширины HTML-блока браузером. Но, прежде чем переходить к его рассмотрению, сначала давайте вспомним, как обычно браузер производит расчет ширины блока элемента в HTML-разметке?
Вычисление всегда выполняется по формуле:
1
Width = Margin + Border + Padding + Content
. То есть, если ширина контента задана в 200px,
1
padding
равен 25px,
1
border
равен 10px, а
1
margin
равен 15px; то результирующая ширина блока будет равна 300px.
Такой способ вычисления ширины блока делают все современные браузеры:
200px + 25px*2 + 10px*2 + 15px*2 = 300px
Модель расчета ширины блока в браузере по умолчанию
Однако, были времена, когда не все браузеры вычисляли размеры блока элемента подобным образом. Существовал Internet Explorer версии 5/6, который ширину блока считал несколько иначе: из заданной ширины блока вычитались padding и border, получалась результирующая ширина области content. В те времена веб-разработчики “показывали пальцем” на этот браузер и говорили, что это ошибка и недочет разработчиков IE5/6.
Но теперь времена изменились благодаря появлению адаптивного (
1
responsive
) дизайна. Причины возникновения адаптивного дизайна - в огромном количестве устройств с разными размерами экранов, по большей части мобильных. Задача адаптивного дизайна в “подстраивании” одного и того же дизайна сайта под различные размеры мониторов. При таком “подстраивании” важной становиться задача вычисления ширины блоков элементов, чтобы верстка не “разваливалась”.
Чтобы такого не произошло, как раз и становиться удобным “возврат” к той модели расчета ширины блока, какая присутствовала в IE5/6. Для этого было разработано свойство
1
box-sizing
, с помощью которого можно управлять подобной моделью расчета.
Свойство
1
box-sizing
принимает три значения (три модели вычисления ширины блока): **content-box
padding-box border-box**.
Свойство box-sizing: content-box
Первая модель
1
content-box
является способом вычисления ширины блока по умолчанию, принятым в современных браузерах:
box-sizing: content-box
Ширина блока равна сумме:
1
Width = Width (Content) + Padding + Border + Margin
Свойство box-sizing со значением content-box
Свойство box-sizing: padding-box
Вторая модель
1
padding-box
заключается в том, что ширина блока включает в себя ширину контента (
1
content
) и ширину
1
padding
. Остальные -
1
border-box
и
1
margin-box
- приплюсовываются к заданной ширине, как обычно. Данная модель, хоть и заявлена в спецификации CSS3, не поддерживается на сегодняшний день почти никакими браузерами; так что о ней можно забыть (пока забыть):
box-sizing: padding-box
Ширина блока равна сумме:
1
Width = Width (Content + Padding) + Border + Margin
Свойство box-sizing со значением padding-box
Свойство box-sizing: border-box
Третья модель
1
border-box
очень похожа на предыдущую модель
1
padding-box
. Но, в данном случае, ширина блока включает в себя еще и
1
border-box
; то есть ширина блока включает в себя область
1
content-box
,
1
padding-box
и
1
border-box
. Область
1
margin-box
прибавляется к ширине блока элемента, как обычно.
box-sizing: border-box
Ширина блока равна сумме:
1
Width = Width (Content + Padding + Border) + Margin
Свойство box-sizing со значением border-box
Практический пример свойства box-sizing
Теперь не мешало бы продемонстрировать на практике, каким образом браузеры выполняют вычисления ширины блоков элементов под управлением свойства
1
box-sizing
. Допустим, у нас имеется блок-обертка
1
div class="wrap"
, внутри которого расположены два плавающих блока-потомка
1
div class="left"
и
1
div class="right"
.
HTML-разметка представлена ниже:
<div class="wrap">
<div class="left"></div>
<div class="right"></div>
</div>
… и CSS-таблица, обычная для такого случая. Единственное “новое” правило в этом коде - это свойство
1
box-sizing
, указанное с вендорными префиксами. Обычно его можно не указывать, так как у браузеров по умолчанию свойство
1
box-sizing
установлено в значении
1
content-box
(как уже упоминалось ранее). Но в нашем случае понадобится явно указать это свойство. Для блоков-потомков здесь намерено мы не указываем (пока не указываем)
1
padding
,
1
border
и
1
margin
:
*{
margin: 0;
padding: 0;
}
html{
background-color: #a7c5a8;
}
body {
width: 80%;
margin: 0 auto;
}
.wrap{
width: 800px;
height: 400px;
margin: 50px auto;
background-color: #778899;
border: 3px solid #ff0000;
}
.left, .right{
float: left;
width: 400px;
height: 400px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.left{
background-color: #000;
}
.right{
background-color: #fff;
}
Свойство box-sizing со значением content-box
Блоки-потомки четко вписываются в блок-родитель, так как у них нет
1
border
,
1
padding
и
1
margin
; ширина блоков-потомков точно равна половине ширине блока-родителя.
Теперь добавим для блоков-потомков
1
padding: 5px
:
.left, .right{
float: left;
width: 400px;
height: 400px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 5px;
}
Картина будет заранее предсказуемая - один из блоков-потомков опуститься вниз из-за добавления
1
padding: 5px
к обоим блокам:
Свойство box-sizing со значением content-box и padding: 5px
Настало время применить свойство
1
box-sizing
со значением
1
border-box
. Браузер сразу же пересчитает ширину обоих блоков и картина, как по волшебству, изменится:
.left, .right{
float: left;
width: 400px;
height: 400px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 5px;
}
Свойство box-sizing со значением border-box и padding: 5px
Даже если добавить к блокам-потомкам границу
1
border
, то картинка останется прежней:
.left{
background-color: #000;
border: 6px solid #0000ff;
}
.right{
background-color: #fff;
border: 6px solid #00ff00;
}
Свойство box-sizing со значением border-box и border: 6px
Но если прибавить к блокам
1
div class="left"
и
1
div class="right"
правило
1
margin
, то наша разметка снова “сломается”:
.left, .right{
float: left;
width: 400px;
height: 400px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 5px;
margin-left: 5px;
}
Это происходит потому, что в модель вычисления
1
border-box
поля
1
margin
не входят. Поле
1
margin-left
размером 5px прибавляется к ширине блока-потомка. Суммарная ширина обоих блоков-потомков превышает ширину блока-родителя и один из них выходит из его, опускаясь (снова) вниз:
Свойство box-sizing со значением border-box и margin-left: 5px
В этом примере мы не применили к свойству
1
box-sizing
значения
1
padding-box
, потому что [браузеры не понимают этого значения][1] и свойство
1
box-sizing
работать не будет в этом случае.
Заключение
Вот и все, что можно сказать о свойстве
1
box-sizing
. Понимание этого свойства понадобиться еще, когда придет время изучать адаптивный (responsive) дизайн.
Основой для данной статьи послужила замечательная “Большая книга CSS3 Д. Макфарланд (3-е издание).
[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing “MDN CSS - box-sizing”
Javascript - методы call, apply, bind
## Метод callМетод call и apply достаточно древние - они оба из стандарта ES3. Суть создания и работы методов - заставить некоторую произ...… Continue reading
MongoDB - документы
Published on May 23, 2017 | {
"url": "http://gearmobile.github.io/css/calculate-width-block-box-sizing/",
"source_domain": "gearmobile.github.io",
"snapshot_id": "crawl=CC-MAIN-2018-34",
"warc_metadata": {
"Content-Length": "41370",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:G66Z5533WJLH6HBMBHZ4QDMNDAEPZ3BG",
"WARC-Concurrent-To": "<urn:uuid:19b14333-6417-4cb3-ae9f-a118a0a72f7c>",
"WARC-Date": "2018-08-18T14:20:51Z",
"WARC-IP-Address": "185.199.111.153",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:JRF6YGXYY2TCRF4MJWNCDTYMPFPDUR6R",
"WARC-Record-ID": "<urn:uuid:f4b8d530-1898-4919-a4b6-fef78622ec73>",
"WARC-Target-URI": "http://gearmobile.github.io/css/calculate-width-block-box-sizing/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:49499422-aaad-4748-9963-79ab44f7f90f>"
},
"warc_info": "isPartOf: CC-MAIN-2018-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-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,
26,
27,
29,
40,
255,
256,
298,
299,
301,
345,
393,
395,
403,
415,
417,
424,
438,
440,
447,
509,
510,
580,
581,
622,
623,
675,
676,
1087,
1088,
1151,
1152,
1154,
1165,
1540,
1541,
1709,
1710,
1712,
1723,
1786,
1787,
1796,
1798,
1809,
1884,
1914,
1915,
1948,
1949,
1963,
1964,
1966,
1978,
2068,
2069,
2093,
2094,
2120,
2121,
2123,
2175,
2176,
2221,
2222,
2255,
2256,
2270,
2271,
2273,
2285,
2355,
2357,
2365,
2376,
2378,
2386,
2400,
2402,
2413,
2415,
2417,
2428,
2637,
2638,
2662,
2663,
2689,
2690,
2692,
2744,
2745,
2790,
2791,
2823,
2824,
2838,
2839,
2841,
2852,
2886,
2888,
2900,
2958,
2960,
2971,
3018,
3020,
3032,
3034,
3036,
3048,
3050,
3052,
3063,
3073,
3075,
3086,
3136,
3137,
3160,
3161,
3187,
3188,
3190,
3242,
3243,
3287,
3288,
3328,
3329,
3474,
3475,
3477,
3488,
3527,
3529,
3546,
3604,
3606,
3623,
3625,
3627,
3645,
3647,
3648,
3681,
3682,
3701,
3728,
3756,
3763,
3764,
3864,
3865,
3867,
3878,
3988,
3990,
4001,
4024,
4026,
4038,
4195,
4197,
4205,
4207,
4209,
4216,
4218,
4220,
4227,
4229,
4230,
4233,
4246,
4260,
4262,
4263,
4269,
4298,
4300,
4301,
4308,
4322,
4340,
4342,
4343,
4350,
4366,
4383,
4404,
4433,
4462,
4464,
4465,
4480,
4495,
4511,
4528,
4563,
4595,
4622,
4624,
4625,
4632,
4658,
4660,
4661,
4669,
4695,
4697,
4698,
4743,
4744,
4811,
4812,
4814,
4821,
4823,
4825,
4833,
4835,
4837,
4844,
4913,
4914,
4949,
4950,
4952,
4965,
4967,
4968,
4983,
4998,
5014,
5031,
5066,
5098,
5125,
5141,
5143,
5144,
5239,
5240,
5242,
5255,
5271,
5272,
5332,
5333,
5366,
5367,
5369,
5380,
5393,
5395,
5406,
5498,
5499,
5514,
5529,
5545,
5562,
5596,
5627,
5653,
5669,
5671,
5672,
5731,
5732,
5777,
5778,
5780,
5787,
5820,
5821,
5828,
5854,
5883,
5885,
5886,
5894,
5920,
5949,
5951,
5952,
6010,
6011,
6038,
6039,
6041,
6058,
6060,
6062,
6080,
6088,
6090,
6097,
6135,
6136,
6151,
6166,
6182,
6199,
6233,
6264,
6290,
6306,
6326,
6328,
6329,
6376,
6377,
6379,
6390,
6395,
6397,
6404,
6420,
6422,
6434,
6609,
6610,
6673,
6674,
6716,
6717,
6719,
6730,
6739,
6741,
6753,
6818,
6820,
6831,
6864,
6865,
6876,
6877,
6917,
6918,
6920,
6931,
7035,
7036,
7135,
7136,
7137,
7225,
7226,
7264,
7265,
7424,
7425,
7445,
7446
],
"line_end_idx": [
26,
27,
29,
40,
255,
256,
298,
299,
301,
345,
393,
395,
403,
415,
417,
424,
438,
440,
447,
509,
510,
580,
581,
622,
623,
675,
676,
1087,
1088,
1151,
1152,
1154,
1165,
1540,
1541,
1709,
1710,
1712,
1723,
1786,
1787,
1796,
1798,
1809,
1884,
1914,
1915,
1948,
1949,
1963,
1964,
1966,
1978,
2068,
2069,
2093,
2094,
2120,
2121,
2123,
2175,
2176,
2221,
2222,
2255,
2256,
2270,
2271,
2273,
2285,
2355,
2357,
2365,
2376,
2378,
2386,
2400,
2402,
2413,
2415,
2417,
2428,
2637,
2638,
2662,
2663,
2689,
2690,
2692,
2744,
2745,
2790,
2791,
2823,
2824,
2838,
2839,
2841,
2852,
2886,
2888,
2900,
2958,
2960,
2971,
3018,
3020,
3032,
3034,
3036,
3048,
3050,
3052,
3063,
3073,
3075,
3086,
3136,
3137,
3160,
3161,
3187,
3188,
3190,
3242,
3243,
3287,
3288,
3328,
3329,
3474,
3475,
3477,
3488,
3527,
3529,
3546,
3604,
3606,
3623,
3625,
3627,
3645,
3647,
3648,
3681,
3682,
3701,
3728,
3756,
3763,
3764,
3864,
3865,
3867,
3878,
3988,
3990,
4001,
4024,
4026,
4038,
4195,
4197,
4205,
4207,
4209,
4216,
4218,
4220,
4227,
4229,
4230,
4233,
4246,
4260,
4262,
4263,
4269,
4298,
4300,
4301,
4308,
4322,
4340,
4342,
4343,
4350,
4366,
4383,
4404,
4433,
4462,
4464,
4465,
4480,
4495,
4511,
4528,
4563,
4595,
4622,
4624,
4625,
4632,
4658,
4660,
4661,
4669,
4695,
4697,
4698,
4743,
4744,
4811,
4812,
4814,
4821,
4823,
4825,
4833,
4835,
4837,
4844,
4913,
4914,
4949,
4950,
4952,
4965,
4967,
4968,
4983,
4998,
5014,
5031,
5066,
5098,
5125,
5141,
5143,
5144,
5239,
5240,
5242,
5255,
5271,
5272,
5332,
5333,
5366,
5367,
5369,
5380,
5393,
5395,
5406,
5498,
5499,
5514,
5529,
5545,
5562,
5596,
5627,
5653,
5669,
5671,
5672,
5731,
5732,
5777,
5778,
5780,
5787,
5820,
5821,
5828,
5854,
5883,
5885,
5886,
5894,
5920,
5949,
5951,
5952,
6010,
6011,
6038,
6039,
6041,
6058,
6060,
6062,
6080,
6088,
6090,
6097,
6135,
6136,
6151,
6166,
6182,
6199,
6233,
6264,
6290,
6306,
6326,
6328,
6329,
6376,
6377,
6379,
6390,
6395,
6397,
6404,
6420,
6422,
6434,
6609,
6610,
6673,
6674,
6716,
6717,
6719,
6730,
6739,
6741,
6753,
6818,
6820,
6831,
6864,
6865,
6876,
6877,
6917,
6918,
6920,
6931,
7035,
7036,
7135,
7136,
7137,
7225,
7226,
7264,
7265,
7424,
7425,
7445,
7446,
7471
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 7471,
"ccnet_original_nlines": 357,
"rps_doc_curly_bracket": 0.0032124200370162725,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.006257819943130016,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.011264080181717873,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.7546933889389038,
"rps_doc_frac_unique_words": 0.42335766553878784,
"rps_doc_mean_word_length": 6.047966480255127,
"rps_doc_num_sentences": 52,
"rps_doc_symbol_to_word_ratio": 0.008760949596762657,
"rps_doc_unigram_entropy": 5.374195575714111,
"rps_doc_word_count": 959,
"rps_doc_frac_chars_dupe_10grams": 0.11982759088277817,
"rps_doc_frac_chars_dupe_5grams": 0.17879310250282288,
"rps_doc_frac_chars_dupe_6grams": 0.14965516328811646,
"rps_doc_frac_chars_dupe_7grams": 0.12948276102542877,
"rps_doc_frac_chars_dupe_8grams": 0.11982759088277817,
"rps_doc_frac_chars_dupe_9grams": 0.11982759088277817,
"rps_doc_frac_chars_top_2gram": 0.03413793072104454,
"rps_doc_frac_chars_top_3gram": 0.031034480780363083,
"rps_doc_frac_chars_top_4gram": 0.03999999910593033,
"rps_doc_books_importance": -793.4435424804688,
"rps_doc_books_importance_length_correction": -793.4435424804688,
"rps_doc_openwebtext_importance": -339.39935302734375,
"rps_doc_openwebtext_importance_length_correction": -339.39935302734375,
"rps_doc_wikipedia_importance": -246.52890014648438,
"rps_doc_wikipedia_importance_length_correction": -246.52890014648438
},
"fasttext": {
"dclm": 0.7331330180168152,
"english": 0.00032938001095317304,
"fineweb_edu_approx": 1.943968653678894,
"eai_general_math": 0.000010370000381954014,
"eai_open_web_math": 0.23908370733261108,
"eai_web_code": 0.49466872215270996
}
} | {
"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": "-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": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,286,177,368,091,482,000 | current code: Response.Redirect("DeviceInformation.aspx?arg=" + e.CommandArgument);
which redirects to a page with a data grid. The argument is passed into a stored proc on a database and the infor is returned in a grid.
What i want, is the same thing, but, open it in a new page.
So something like:
Response.OpenNewDamnPage("DeviceInformation.aspx?arg=" + e.CommandArgument);
but unfortunatly that does not exsist.
Thanks in advance for any help!
Hey
Try This
protected void button1_Click(object sender, EventArgs e)
{
Response.Write("<script type='text/javascript'>window.open('NewPageUrlWithArgument.aspx','_blank');</script>");
}
This sure will work
If it solves your problem mark the thread as solved.
Use this exactly for your case:
protected void button1_Click(object sender, EventArgs e)
{
Response.Write("<script type='text/javascript'>window.open('DeviceInformation.aspx?arg=" + e.CommandArgument + "','_blank');</script>");
}
Dont forget to enclose your code in code tags like this:
[code=C#] Response.OpenNewDamnPage("DeviceInformation.aspx?arg=" + e.CommandArgument);
[/code]
this will display as
Response.OpenNewDamnPage("DeviceInformation.aspx?arg=" + e.CommandArgument);
Use this exactly for your case:
protected void button1_Click(object sender, EventArgs e)
{
Response.Write("<script type='text/javascript'>window.open('DeviceInformation.aspx?arg=" + e.CommandArgument + "','_blank');</script>");
}
I used the following:
if (e.CommandName == "AssetName")
{
Response.Write("<script type='text/javascript'>window.open('UsageInformation.aspx?arg=" + e.CommandArgument + "','_blank');</script>");
}
I get a new blank page with the correct url!
but if i use:
if (e.CommandName == "AssetName")
{
Response.Redirect("UsageInformation.aspx?arg=" + e.CommandArgument);
}
I get the page reloaded with the data.
So both ways i get the correct url:
http://localhost:4513/WebSite2/UsageInformation.aspx?arg=XFM_UG:#306:100099462
but unless i call the responce.redirect it will load blank. For example even if I copy that link into my browser it loads a blank page.
Very very close... any ideas?
Thanks for your help!
I have some new information tha might help.
If i put a control such as a label as long with the gridview the label loads when I used the following:
http://localhost:4513/WebSite2/UsageInformation.aspx?arg=XFM_UG:#306:100099462
But the grid which is set up to a sql data source that uses the qurrey string to get data, does not load. So i wonder if the remaining problem is with the datagrid?
well, your problem was to load the page in new window.
Which you did successfully.
Did you use the page_load event of new page. Try to get the value from the query string in the page_load event and then load the gridview in the Page_Load event.
This should probably work . I will sure look over this problem.
Your problem of opening new page from the code behind was solved. So you should mark this thread as solved and start new thread.
well, your problem was to load the page in new window.
Which you did successfully.
Did you use the page_load event of new page. Try to get the value from the query string in the page_load event and then load the gridview in the Page_Load event.
This should probably work . I will sure look over this problem.
Your problem of opening new page from the code behind was solved. So you should mark this thread as solved and start new thread.
You quite right, you did solve the question of this thred :)
Thanks so much! I will mark that you solved it.
I did start a new thred for the remaining question of why it did not load. It is here: http://www.daniweb.com/forums/thread207422.html
Thanks so much for your help!
very useful information. Thank you so much
**how to print the diameter of an array in c#
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge. | {
"url": "https://www.daniweb.com/programming/software-development/threads/207342/open-new-web-page-with-c-code-behind-page",
"source_domain": "www.daniweb.com",
"snapshot_id": "CC-MAIN-2024-26",
"warc_metadata": {
"Content-Length": "95881",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:YEPUO44ONE2ID6245P5U3Y5TJCHBX4OM",
"WARC-Concurrent-To": "<urn:uuid:3c1b2665-1014-4301-a82a-1251625b4e5b>",
"WARC-Date": "2024-06-24T13:37:13Z",
"WARC-IP-Address": "172.66.40.216",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:YMMJGCHYQSF46GYNL4XSRJSXCAVB7JLW",
"WARC-Record-ID": "<urn:uuid:2fc39b49-e29d-485c-a79e-b01bf4159ed9>",
"WARC-Target-URI": "https://www.daniweb.com/programming/software-development/threads/207342/open-new-web-page-with-c-code-behind-page",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d0b7b5ee-c3be-40aa-a855-4c446990eae0>"
},
"warc_info": "isPartOf: CC-MAIN-2024-26\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-81\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,
84,
85,
222,
223,
283,
284,
303,
304,
381,
382,
421,
422,
454,
455,
459,
468,
469,
526,
532,
652,
658,
659,
679,
680,
733,
734,
766,
767,
824,
830,
973,
979,
980,
1037,
1038,
1125,
1126,
1134,
1135,
1156,
1157,
1234,
1235,
1267,
1268,
1325,
1331,
1474,
1480,
1481,
1503,
1504,
1538,
1548,
1696,
1707,
1708,
1753,
1754,
1768,
1769,
1803,
1813,
1894,
1904,
1905,
1944,
1945,
1981,
1982,
2061,
2062,
2198,
2199,
2229,
2230,
2252,
2253,
2297,
2298,
2402,
2403,
2482,
2483,
2648,
2649,
2704,
2705,
2733,
2734,
2896,
2897,
2961,
2962,
3091,
3092,
3147,
3148,
3176,
3177,
3339,
3340,
3404,
3405,
3534,
3535,
3596,
3597,
3645,
3646,
3781,
3782,
3812,
3813,
3856,
3857,
3903,
3904,
3939,
3940
],
"line_end_idx": [
84,
85,
222,
223,
283,
284,
303,
304,
381,
382,
421,
422,
454,
455,
459,
468,
469,
526,
532,
652,
658,
659,
679,
680,
733,
734,
766,
767,
824,
830,
973,
979,
980,
1037,
1038,
1125,
1126,
1134,
1135,
1156,
1157,
1234,
1235,
1267,
1268,
1325,
1331,
1474,
1480,
1481,
1503,
1504,
1538,
1548,
1696,
1707,
1708,
1753,
1754,
1768,
1769,
1803,
1813,
1894,
1904,
1905,
1944,
1945,
1981,
1982,
2061,
2062,
2198,
2199,
2229,
2230,
2252,
2253,
2297,
2298,
2402,
2403,
2482,
2483,
2648,
2649,
2704,
2705,
2733,
2734,
2896,
2897,
2961,
2962,
3091,
3092,
3147,
3148,
3176,
3177,
3339,
3340,
3404,
3405,
3534,
3535,
3596,
3597,
3645,
3646,
3781,
3782,
3812,
3813,
3856,
3857,
3903,
3904,
3939,
3940,
4108
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 4108,
"ccnet_original_nlines": 120,
"rps_doc_curly_bracket": 0.002434269990772009,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.33679354190826416,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.016147639602422714,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.26643598079681396,
"rps_doc_frac_unique_words": 0.34380775690078735,
"rps_doc_mean_word_length": 5.645101547241211,
"rps_doc_num_sentences": 86,
"rps_doc_symbol_to_word_ratio": 0.005767010152339935,
"rps_doc_unigram_entropy": 4.756067752838135,
"rps_doc_word_count": 541,
"rps_doc_frac_chars_dupe_10grams": 0.3366077244281769,
"rps_doc_frac_chars_dupe_5grams": 0.3582187294960022,
"rps_doc_frac_chars_dupe_6grams": 0.3582187294960022,
"rps_doc_frac_chars_dupe_7grams": 0.3582187294960022,
"rps_doc_frac_chars_dupe_8grams": 0.3366077244281769,
"rps_doc_frac_chars_dupe_9grams": 0.3366077244281769,
"rps_doc_frac_chars_top_2gram": 0.02161099947988987,
"rps_doc_frac_chars_top_3gram": 0.03143417835235596,
"rps_doc_frac_chars_top_4gram": 0.023575639352202415,
"rps_doc_books_importance": -352.8927001953125,
"rps_doc_books_importance_length_correction": -352.8927001953125,
"rps_doc_openwebtext_importance": -208.96701049804688,
"rps_doc_openwebtext_importance_length_correction": -208.96701049804688,
"rps_doc_wikipedia_importance": -202.53042602539062,
"rps_doc_wikipedia_importance_length_correction": -202.53042602539062
},
"fasttext": {
"dclm": 0.018716569989919662,
"english": 0.8183120489120483,
"fineweb_edu_approx": 1.3949108123779297,
"eai_general_math": 0.9693475365638733,
"eai_open_web_math": 0.3426487445831299,
"eai_web_code": 0.8893468379974365
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,180,093,135,201,871,000 | Skip to main content
How to configure BitLocker encryption on Windows 11
Windows 11 set up BitLocker
Windows 11 set up BitLocker (Image credit: Windows Central )
BitLocker on Windows 11 adds an extra layer of security with encryption to protect your device and files from unauthorized access. When using encryption, the feature scrambles the data on the drive to make it unreadable for anyone without the correct decryption key.
The BitLocker security feature is available on Windows 11 Pro, Enterprise, and Education editions. However, on Windows 11 Home, you can use "device encryption," a limited version of BitLocker. It works identical to the full version but without many of the advanced management settings and capabilities, such as "BitLocker To Go." Also, when using device encryption, all the drives will encrypt automatically, while the full version of BitLocker allows you to choose the storage using encryption.
In this Windows 11 guide, we will walk you through the steps to get started setting up device encryption with BitLocker on your computer.
How to set up BitLocker on Windows 11 Pro
To configure BitLocker in the Pro edition of Windows 11, use these steps:
1. Open Settings.
2. Click on Storage.
3. Under the "Storage management" section, click on Advanced storage settings.
4. Click on Disks & volumes.
Source: Windows Central (Image credit: Source: Windows Central)
1. Select the drive with the partition to encrypt.
2. Select the partition to enable encryption.
3. Click the Properties button.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Turn on BitLocker option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Turn on BitLocker option again.
Source: Windows Central (Image credit: Source: Windows Central)
1. Select the option to back up the recovery key — for example, Save to your Microsoft account.Quick note: You can always find the recovery key on your Microsoft account (opens in new tab). Also, the option to save online is only available when the account is connected with a Microsoft account.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Next button.
2. Select the Encrypt used disk space only option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Next button.
2. Select the New encryption mode option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Check the Run BitLocker system check option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Restart now button (if applicable).
Once you complete the steps, the system will begin encrypting the data on the drive.
While in the "BitLocker Drive Encryption," it is also possible to encrypt other drives, such as secondary storage, external USB hard drives, and removable data drives, using "BitLocker To Go."
Remove BitLocker encryption
If you need to remove the system encryption, use these steps:
1. Open Control Panel.
2. Click on System and Security.
3. Click on BitLocker Drive Encryption.
Source: Windows Central (Image credit: Source: Windows Central)
1. Under the "Operating system drive" section, click the Turn off BitLocker option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Turn off BitLocker button again.
After you complete the steps, the decryption process will take a while, depending on how large the drive is and your data.
How to set up BitLocker on Windows 11 Home
To configure BitLocker in the Home edition of Windows 11, use these steps:
1. Open Settings.
2. Click on Privacy & Security.
3. Click the Device encryption setting.
Source: Windows Central (Image credit: Source: Windows Central)
1. Turn on Device encryption toggle switch.
Source: Windows Central (Image credit: Source: Windows Central)
1. (Optional) Under the "Related" section, click the BitLocker drive encryption option.
2. Under the "Operating system drive" section, click the Back up your recovery key option.
Source: Windows Central (Image credit: Source: Windows Central)
1. Click the Save to a file option.
2. Save the BitLocker recovery key in a different location.
3. Click the Save button.
Once you complete the steps, BitLocker will turn on the system to encrypt the files on the drive.
This version of BitLocker is only available on some devices. If you don't find the option, the device most likely doesn't support device encryption. You would typically see this feature on devices like Microsoft Surface devices, and those from other brands like HP, Lenovo, Dell, etc.
Remove BitLocker encryption
To decrypt a device using BitLocker, use these steps:
1. Open Settings.
2. Click on Privacy & Security.
3. Click the Device encryption setting.
Source: Windows Central (Image credit: Source: Windows Central)
1. Turn off the Device encryption toggle switch.
Source: Windows Central (Image credit: Source: Windows Central)
After you complete the steps, the decryption process will begin on the device.
More Windows resources
For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:
Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.
1 Comment
• I have a Lenovo Legion Y740 laptop running Windows 11 Home 21H2; and that doesn't have the encryption option mentioned in this article. | {
"url": "https://www.windowscentral.com/how-configure-bitlocker-encryption-windows-11",
"source_domain": "www.windowscentral.com",
"snapshot_id": "crawl=CC-MAIN-2022-40",
"warc_metadata": {
"Content-Length": "1050933",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KQH464C5XIIB3CD2DSLSLVKQO7PFHTOO",
"WARC-Concurrent-To": "<urn:uuid:967593ec-8925-4835-ab47-fa393156a3ec>",
"WARC-Date": "2022-09-28T10:24:18Z",
"WARC-IP-Address": "146.75.34.114",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2FXTUTNYWQSTXXJS3LLLKXADTB6LAPNG",
"WARC-Record-ID": "<urn:uuid:24ddd38e-1c1f-447f-a0d6-baed5a63f992>",
"WARC-Target-URI": "https://www.windowscentral.com/how-configure-bitlocker-encryption-windows-11",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b9ade7ed-994a-4dca-8ee0-19a4ac2d4c50>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-70\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
21,
22,
74,
75,
103,
164,
165,
432,
433,
929,
930,
1068,
1069,
1111,
1112,
1186,
1187,
1207,
1230,
1311,
1342,
1343,
1407,
1460,
1508,
1542,
1543,
1607,
1648,
1649,
1713,
1760,
1761,
1825,
2123,
2124,
2188,
2216,
2269,
2270,
2334,
2362,
2406,
2407,
2471,
2521,
2522,
2586,
2637,
2638,
2723,
2724,
2917,
2918,
2946,
2947,
3009,
3010,
3035,
3070,
3112,
3113,
3177,
3263,
3264,
3328,
3376,
3377,
3500,
3501,
3544,
3545,
3620,
3621,
3641,
3675,
3717,
3718,
3782,
3828,
3829,
3893,
3983,
4076,
4077,
4141,
4179,
4241,
4269,
4270,
4368,
4369,
4654,
4655,
4683,
4684,
4738,
4739,
4759,
4793,
4835,
4836,
4900,
4951,
4952,
5016,
5017,
5096,
5097,
5120,
5121,
5254,
5255,
5599,
5600,
5610
],
"line_end_idx": [
21,
22,
74,
75,
103,
164,
165,
432,
433,
929,
930,
1068,
1069,
1111,
1112,
1186,
1187,
1207,
1230,
1311,
1342,
1343,
1407,
1460,
1508,
1542,
1543,
1607,
1648,
1649,
1713,
1760,
1761,
1825,
2123,
2124,
2188,
2216,
2269,
2270,
2334,
2362,
2406,
2407,
2471,
2521,
2522,
2586,
2637,
2638,
2723,
2724,
2917,
2918,
2946,
2947,
3009,
3010,
3035,
3070,
3112,
3113,
3177,
3263,
3264,
3328,
3376,
3377,
3500,
3501,
3544,
3545,
3620,
3621,
3641,
3675,
3717,
3718,
3782,
3828,
3829,
3893,
3983,
4076,
4077,
4141,
4179,
4241,
4269,
4270,
4368,
4369,
4654,
4655,
4683,
4684,
4738,
4739,
4759,
4793,
4835,
4836,
4900,
4951,
4952,
5016,
5017,
5096,
5097,
5120,
5121,
5254,
5255,
5599,
5600,
5610,
5749
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 5749,
"ccnet_original_nlines": 116,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2552816867828369,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0061619700863957405,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.25792253017425537,
"rps_doc_frac_unique_words": 0.2759009003639221,
"rps_doc_mean_word_length": 5.066441535949707,
"rps_doc_num_sentences": 90,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.705216407775879,
"rps_doc_word_count": 888,
"rps_doc_frac_chars_dupe_10grams": 0.27139362692832947,
"rps_doc_frac_chars_dupe_5grams": 0.3849744498729706,
"rps_doc_frac_chars_dupe_6grams": 0.3369637727737427,
"rps_doc_frac_chars_dupe_7grams": 0.3369637727737427,
"rps_doc_frac_chars_dupe_8grams": 0.3369637727737427,
"rps_doc_frac_chars_dupe_9grams": 0.3045121133327484,
"rps_doc_frac_chars_top_2gram": 0.09646587818861008,
"rps_doc_frac_chars_top_3gram": 0.13336296379566193,
"rps_doc_frac_chars_top_4gram": 0.08335185796022415,
"rps_doc_books_importance": -387.2495422363281,
"rps_doc_books_importance_length_correction": -387.2495422363281,
"rps_doc_openwebtext_importance": -186.85208129882812,
"rps_doc_openwebtext_importance_length_correction": -186.85208129882812,
"rps_doc_wikipedia_importance": -104.35704803466797,
"rps_doc_wikipedia_importance_length_correction": -104.35704803466797
},
"fasttext": {
"dclm": 0.32401609420776367,
"english": 0.8395291566848755,
"fineweb_edu_approx": 2.4814560413360596,
"eai_general_math": 0.38933873176574707,
"eai_open_web_math": 0.3303915858268738,
"eai_web_code": 0.002290070056915283
}
} | {
"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.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
598,007,231,187,532,200 | 1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!
Homework Help: Help with a word problem
1. Jun 28, 2011 #1
The word problem: If the product of a number and -5 is reduced by 2, the result is 26 less than twice the opposite of the number. What is the number?
I wrote it out like this:
n x (-5) - 2 = 2(-n) - 26
I'm really at a loss here. Normally when there's a variable, my teacher says to get the variable alone, but when there's two that share a number, I don't know what to do besides pick random numbers and see what happens :P
Thanks in advance,
Cyril
2. jcsd
3. Jun 28, 2011 #2
tiny-tim
User Avatar
Science Advisor
Homework Helper
Hi Cyril! :smile:
Just shove all the n's over to the LHS, and everything else to the RHS. :wink:
4. Jun 28, 2011 #3
Haha thanks :D
So add 7 to the left to get rid of the -5 and - 2 (and add it to the right of course), but how do you move the variable from the right?
5. Jun 28, 2011 #4
tiny-tim
User Avatar
Science Advisor
Homework Helper
eugh! :yuck:
perhaps i'd better start you off :wink:
n x (-5) - 2 = 2(-n) - 26
let's rewrite that as
-5n - 2 = -2n - 26 …
carry on from there :smile:
6. Jun 28, 2011 #5
HallsofIvy
User Avatar
Science Advisor
It would be better to write this as -5n- 2= -2n- 26
So combine the two: add 2n to both sides, add 2 to both sides
(If you don't like negatives, you could start by multiplying both sides by -1 to get
5n+ 2= 2n+ 26. Now subtract 2n from both sides, subtract from both sides.)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook | {
"url": "https://www.physicsforums.com/threads/help-with-a-word-problem.510317/",
"source_domain": "www.physicsforums.com",
"snapshot_id": "crawl=CC-MAIN-2018-34",
"warc_metadata": {
"Content-Length": "55588",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:I3U2VZNW7HIAIJONQFAWQZXHAICMISLZ",
"WARC-Concurrent-To": "<urn:uuid:21d8cca8-de30-45a0-b55c-7deeae67b98d>",
"WARC-Date": "2018-08-20T15:29:04Z",
"WARC-IP-Address": "23.111.143.85",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:SLZ4BMJ4XEUOT7QO4FNMQ4CYNHPL7733",
"WARC-Record-ID": "<urn:uuid:e72453ac-071e-4824-abb9-39262778cdbe>",
"WARC-Target-URI": "https://www.physicsforums.com/threads/help-with-a-word-problem.510317/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9596ff23-e4ca-422c-863f-af0a3fa2ae18>"
},
"warc_info": "isPartOf: CC-MAIN-2018-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-159-181-253.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,
88,
107,
122,
149,
257,
258,
298,
299,
320,
474,
475,
505,
535,
536,
762,
763,
786,
796,
802,
812,
833,
834,
847,
848,
864,
884,
904,
905,
927,
928,
1011,
1017,
1038,
1057,
1058,
1198,
1204,
1225,
1226,
1239,
1240,
1256,
1276,
1296,
1297,
1314,
1315,
1359,
1360,
1391,
1392,
1418,
1419,
1445,
1446,
1478,
1484,
1505,
1506,
1521,
1522,
1538,
1558,
1559,
1615,
1616,
1682,
1683,
1684,
1773,
1852,
1858
],
"line_end_idx": [
88,
107,
122,
149,
257,
258,
298,
299,
320,
474,
475,
505,
535,
536,
762,
763,
786,
796,
802,
812,
833,
834,
847,
848,
864,
884,
904,
905,
927,
928,
1011,
1017,
1038,
1057,
1058,
1198,
1204,
1225,
1226,
1239,
1240,
1256,
1276,
1296,
1297,
1314,
1315,
1359,
1360,
1391,
1392,
1418,
1419,
1445,
1446,
1478,
1484,
1505,
1506,
1521,
1522,
1538,
1558,
1559,
1615,
1616,
1682,
1683,
1684,
1773,
1852,
1858,
1939
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1939,
"ccnet_original_nlines": 72,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3355555534362793,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.015555559657514095,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3311111032962799,
"rps_doc_frac_unique_words": 0.5089820623397827,
"rps_doc_mean_word_length": 3.8622753620147705,
"rps_doc_num_sentences": 21,
"rps_doc_symbol_to_word_ratio": 0.013333329930901527,
"rps_doc_unigram_entropy": 4.82571268081665,
"rps_doc_word_count": 334,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09302326291799545,
"rps_doc_frac_chars_dupe_6grams": 0.06976743787527084,
"rps_doc_frac_chars_dupe_7grams": 0.06976743787527084,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.019379839301109314,
"rps_doc_frac_chars_top_3gram": 0.03488371893763542,
"rps_doc_frac_chars_top_4gram": 0.055813949555158615,
"rps_doc_books_importance": -176.96371459960938,
"rps_doc_books_importance_length_correction": -176.96371459960938,
"rps_doc_openwebtext_importance": -140.81097412109375,
"rps_doc_openwebtext_importance_length_correction": -140.81097412109375,
"rps_doc_wikipedia_importance": -97.6035385131836,
"rps_doc_wikipedia_importance_length_correction": -97.6035385131836
},
"fasttext": {
"dclm": 0.2910172939300537,
"english": 0.9227463603019714,
"fineweb_edu_approx": 1.804009199142456,
"eai_general_math": 0.00774062005802989,
"eai_open_web_math": 0.4035266637802124,
"eai_web_code": 0.00004685000021709129
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "512.0",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
},
"secondary": {
"code": "510.0",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
4,931,732,522,812,605,000 | Looi Looi - 2 years ago 79
Python Question
How to call a function from within another function
Im trying to make a program which can calculate density, terminal velocity and viscosity.
I've seperated them so that it's easier for a user to understand.
The flow is as follows:
It's pretty simple but when the density() function is called, its meant to calculate denCould someone help? The code is below, and so is the error.
import sys
def terminalvelandviscocalc(ms,ds,pa):
import math as m
masssteel=ms
diametersteel=ds
projectarea=pa
termvelo=m.sqrt((2*masssteel*9.81)/(density*projectarea*0.5))
visco=((masssteel*9.8)-((4.0/3.0)*((diametersteel/2)**3)*9.8*density))/(6*m.pi*(diametersteel/2)*termvelo)
print 'The terminal velocity is: %.2f' %termvelo
print 'The viscosity is: %.2f' %visco
return termvelo
return visco
And the error :
termvelo=m.sqrt((2*masssteel*9.81)/(density*projectarea*0.5))
TypeError: unsupported operand type(s) for *: 'function' and 'float'
Answer Source
density is a function, yet in the line termvelo=m.sqrt((2*masssteel*9.81)/(density*projectarea*0.5)) you use it as a variable.
You should call it with (), and provide the 3 arguments that it expects (I called them arg1, arg2, arg3. You should use the correct variable names from your code):
termvelo=m.sqrt((2*masssteel*9.81)/(density(arg1, arg2, arg3)*projectarea*0.5))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download | {
"url": "https://codedump.io/share/Gx0CYJwXINB/1/how-to-call-a-function-from-within-another-function",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2018-26",
"warc_metadata": {
"Content-Length": "44094",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:M56KU3IZDSTSRDDYHPBDK3KOPF5HMAVR",
"WARC-Concurrent-To": "<urn:uuid:7680c115-9993-447d-9bae-54a63f0b409d>",
"WARC-Date": "2018-06-18T05:41:39Z",
"WARC-IP-Address": "50.112.74.85",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GQZXA4GB4EAH5QM2DB5M43FWJC5OYEVR",
"WARC-Record-ID": "<urn:uuid:3ddc37fb-3b23-409e-9a36-0b42b9b6ae2d>",
"WARC-Target-URI": "https://codedump.io/share/Gx0CYJwXINB/1/how-to-call-a-function-from-within-another-function",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d1acd719-4ab7-484c-b355-4e551b7152a6>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-165-73-237.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-26\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for June 2018\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
} | {
"line_start_idx": [
0,
27,
43,
44,
96,
97,
187,
253,
254,
278,
426,
427,
438,
439,
440,
479,
496,
509,
526,
541,
603,
710,
759,
797,
813,
826,
842,
843,
905,
974,
975,
989,
990,
1117,
1118,
1282,
1283,
1363,
1364
],
"line_end_idx": [
27,
43,
44,
96,
97,
187,
253,
254,
278,
426,
427,
438,
439,
440,
479,
496,
509,
526,
541,
603,
710,
759,
797,
813,
826,
842,
843,
905,
974,
975,
989,
990,
1117,
1118,
1282,
1283,
1363,
1364,
1465
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1465,
"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.21095889806747437,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0054794498719275,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.41369864344596863,
"rps_doc_frac_unique_words": 0.6145251393318176,
"rps_doc_mean_word_length": 6.223463535308838,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.483246326446533,
"rps_doc_word_count": 179,
"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.01615799032151699,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -155.31411743164062,
"rps_doc_books_importance_length_correction": -149.56382751464844,
"rps_doc_openwebtext_importance": -89.81814575195312,
"rps_doc_openwebtext_importance_length_correction": -89.81814575195312,
"rps_doc_wikipedia_importance": -62.418296813964844,
"rps_doc_wikipedia_importance_length_correction": -52.7405891418457
},
"fasttext": {
"dclm": 0.9444707036018372,
"english": 0.7091326117515564,
"fineweb_edu_approx": 2.548428535461426,
"eai_general_math": 0.9893538951873779,
"eai_open_web_math": 0.3792194128036499,
"eai_web_code": 0.07063841819763184
}
} | {
"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": "532",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Physics",
"level_3": "Fluid mechanics"
}
}
},
"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": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,227,089,038,593,070,300 | What is the Least Common Multiple (LCM) of 17 and 10?
If you are searching to find out what the lowest common multiple of 17 and 10 is then you probably figured out you are in the right place! That's exactly what this quick guide is all about. We'll walk you through how to calculate the least common multiple for any numbers you need to check. Keep reading!
First off, if you're in a rush, here's the answer to the question "what is the LCM of 17 and 10?":
LCM(17, 10) = 170
What is the Least Common Multiple?
In simple terms, the LCM is the smallest possible whole number (an integer) that divides evenly into all of the numbers in the set. It's also sometimes called the least common divisor, or LCD.
There are a number of different ways to calculate the GCF of a set of numbers depending how many numbers you have and how large they are.
For smaller numbers you can simply look at the factors or multiples for each number and find the least common multiple of them.
For 17 and 10 those factors look like this:
• Factors for 17: 1, 2, 5, 10, 17, 34, 85, and 170
• Factors for 10: 1, 2, 5, 10, 17, 34, 85, and 170
As you can see when you list out the factors of each number, 170 is the greatest number that 17 and 10 divides into.
Prime Factors
As the numbers get larger, or you want to compare multiple numbers at the same time to find the GCF, you can see how listing out all of the factors would become too much. To fix this, you can use prime factors.
List out all of the prime factors for each number:
• Prime Factors for 17: 17
• Prime Factors for 10: 2 and 5
Now that we have the list of prime factors, we need to list out all of the prime factors as often as they occur for each given number and then multiply them together. In our example, this becomes:
LCM = 17 x 2 x 5 = 170
Other Ways to Calculate LCM
There are a number of other ways in which you can calculate the least common multiple of numbers, including:
• Prime factorization using exponents
• The cake/ladder method
• The division method
• Using the greatest common factor (GCF)
For the purposes of this tutorial, using factors or prime factors should help you to calculate the answer easily. If you really want to brush up on your math, you can research the other methods and become a full blown LCM expert.
Hopefully you've learned a little math today (but not too much!) and understand how to calculate the LCM of numbers. The next challenge is to pick a couple of new numbers yourself and try to work it out using the above methods.
Not feeling like doing the hard work? No worries! Head back to our LCM calculator instead and let our tool do the hard work for you :)
Cite, Link, or Reference This Page
If you found this content useful in your research, please do us a great favor and use the tool below to make sure you properly reference us wherever you use it. We really appreciate your support!
• "Least Common Multiple of 17 and 10". VisualFractions.com. Accessed on May 25, 2022. http://visualfractions.com/calculator/least-common-multiple/lcm-of-17-and-10/.
• "Least Common Multiple of 17 and 10". VisualFractions.com, http://visualfractions.com/calculator/least-common-multiple/lcm-of-17-and-10/. Accessed 25 May, 2022.
• Least Common Multiple of 17 and 10. VisualFractions.com. Retrieved from http://visualfractions.com/calculator/least-common-multiple/lcm-of-17-and-10/.
Random List of LCM Examples
Here is a list of random least common multiple problems for you to enjoy:
Popular List of LCM Examples
Here are some of the mostly commonly searched for LCM problems for you to enjoy: | {
"url": "https://visualfractions.com/calculator/least-common-multiple/lcm-of-17-and-10/",
"source_domain": "visualfractions.com",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "86179",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BCF4HNG6BQ5HMNAZE66MK3YYAPWH3ACA",
"WARC-Concurrent-To": "<urn:uuid:43f0c4f4-d086-4b95-b089-0b7eb19ced69>",
"WARC-Date": "2022-05-25T04:32:31Z",
"WARC-IP-Address": "172.67.147.3",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GDQ2YTSLOFBZD3CSLCJPWYVDIT6MI2QO",
"WARC-Record-ID": "<urn:uuid:a1ce7cb2-9513-45c2-bb52-17c97f3bd1d0>",
"WARC-Target-URI": "https://visualfractions.com/calculator/least-common-multiple/lcm-of-17-and-10/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7680c299-a245-4913-b74a-4ea204c7b79c>"
},
"warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-200\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
} | {
"line_start_idx": [
0,
54,
55,
360,
361,
460,
461,
479,
480,
515,
516,
709,
710,
848,
849,
977,
978,
1022,
1023,
1076,
1129,
1130,
1247,
1248,
1262,
1263,
1474,
1475,
1526,
1527,
1556,
1590,
1591,
1788,
1789,
1812,
1813,
1841,
1842,
1951,
1952,
1992,
2019,
2043,
2086,
2087,
2317,
2318,
2546,
2547,
2682,
2683,
2718,
2719,
2915,
2916,
3084,
3085,
3250,
3251,
3406,
3407,
3435,
3436,
3510,
3511,
3540,
3541
],
"line_end_idx": [
54,
55,
360,
361,
460,
461,
479,
480,
515,
516,
709,
710,
848,
849,
977,
978,
1022,
1023,
1076,
1129,
1130,
1247,
1248,
1262,
1263,
1474,
1475,
1526,
1527,
1556,
1590,
1591,
1788,
1789,
1812,
1813,
1841,
1842,
1951,
1952,
1992,
2019,
2043,
2086,
2087,
2317,
2318,
2546,
2547,
2682,
2683,
2718,
2719,
2915,
2916,
3084,
3085,
3250,
3251,
3406,
3407,
3435,
3436,
3510,
3511,
3540,
3541,
3621
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 3621,
"ccnet_original_nlines": 67,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4180024564266205,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.019728729501366615,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.25277435779571533,
"rps_doc_frac_unique_words": 0.3523809611797333,
"rps_doc_mean_word_length": 4.4174604415893555,
"rps_doc_num_sentences": 41,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.7823638916015625,
"rps_doc_word_count": 630,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.19331656396389008,
"rps_doc_frac_chars_dupe_6grams": 0.11067193746566772,
"rps_doc_frac_chars_dupe_7grams": 0.08228529989719391,
"rps_doc_frac_chars_dupe_8grams": 0.06288178265094757,
"rps_doc_frac_chars_dupe_9grams": 0.06288178265094757,
"rps_doc_frac_chars_top_2gram": 0.03952569141983986,
"rps_doc_frac_chars_top_3gram": 0.0614444799721241,
"rps_doc_frac_chars_top_4gram": 0.019403519108891487,
"rps_doc_books_importance": -339.5627136230469,
"rps_doc_books_importance_length_correction": -339.5627136230469,
"rps_doc_openwebtext_importance": -212.78192138671875,
"rps_doc_openwebtext_importance_length_correction": -212.78192138671875,
"rps_doc_wikipedia_importance": -122.31493377685547,
"rps_doc_wikipedia_importance_length_correction": -122.31493377685547
},
"fasttext": {
"dclm": 0.1788579225540161,
"english": 0.9211082458496094,
"fineweb_edu_approx": 2.9522533416748047,
"eai_general_math": 0.9589815139770508,
"eai_open_web_math": 0.36962807178497314,
"eai_web_code": 0.10761457681655884
}
} | {
"free_decimal_correspondence": {
"primary": {
"code": "513.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry"
}
},
"secondary": {
"code": "512.7",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
}
},
"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": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
2,431,308,879,431,910,000 | Resumen: Entrega nº26 del curso "Programación para niños de 10 a 16 años (primaria o secundaria)".
Codificación aprenderaprogramar.com: PN00526G
BUCLES O CICLOS EN PROGRAMACIÓN
¡Bienvenidos a esta nueva entrega del curso de programación para niños! Soy Paula Muñoz, desde Sevilla, España. ¿Preparados para nuevos retos con la programación? En anteriores entregas hemos creado programas y hemos aprendido cómo utilizar variables en Didac-Prog Cartesia. Las variables nos sirven para almacenar números y esas variables podemos utilizarlas en cualquier lugar de nuestro programa.
didac-prog cartesia aprender programacion niños
En esta entrega vamos a conocer un nuevo comando de programación: la instrucción Repetir.
Ya hemos descrito cómo se puede dibujar un triángulo u otras formas geométricas. Pero, ¿qué ocurre si queremos dibujar 20 triángulos? Quizás podríamos pensar en introducir todas las coordenadas necesarias para definir dónde se ubica cada triángulo, lo cual nos llevaría un buen rato. ¿Y si quisiéramos dibujar 200 triángulos? Si tuviéramos que definir las coordenadas de todos sus vértices una a una, podría llevarnos varias horas o un día. ¿Y si quisiéramos dibujar 2000 triángulos? Posiblemente se volvería tan cansado que nunca lo haríamos. Sin embargo, los ordenadores, tablets, smartphones, etc. tienen la capacidad para dibujar cientos o miles de triángulos en menos de un segundo gracias a los potentes procesadores que llevan incorporados ya que son capaces de realizar cálculos y ejecutar instrucciones a gran velocidad.
En Cartesia es posible dibujar 20, 200, 2000 ó más triángulos usando el comando de repetición, similar al de lenguajes de programación de ámbito profesional y académico.
La idea será: definimos las variables necesarias para dibujar el triángulo. Entramos en un comando de repetición y dibujamos el triángulo. Modificamos los valores de las variables que definen donde debe situarse el triángulo en la siguiente repetición, y repetimos tantas veces como queramos.
Vamos a tomar como código de partida el siguiente. Abre la aplicación Cartesia y escríbelo en tu panel de código, pulsa Ejecutar y comprueba que aparezca un triángulo dibujado en el panel de dibujo. Puedes usar el panel de comandos para ir más rápido:
-- PROGRAMA PARA DIBUJAR UN TRIANGULO PN00526G
Iniciar programa
Nuevo grosor lápiz (2)
x nuevo valor es (-10)
y nuevo valor es (4)
a nuevo valor es (-8)
b nuevo valor es (2)
c nuevo valor es (-10)
d nuevo valor es (2)
Dibujar línea desde (x,y) hasta (a,b)
Dibujar línea desde (a,b) hasta (c,d)
Dibujar línea desde (c,d) hasta (x,y)
Finalizar programa
Bien, tras pulsar ejecutar ya tenemos aquí nuestro triángulo. Perfecto. Debes ser capaz de entender este código. Si no lo entiendes repasa las anteriores entregas del curso o consulta en los foros de aprenderaprogramar.com
Bucles en programación para niños (tecnología, informática, matemáticas, etc.)
COMANDO REPETICIÓN EN DIDAC-PROG CARTESIA
El comando repetición se escribe de la siguiente manera:
Repetir (?) veces ejecutar bloque
Comienzo bloque
???
Fin bloque
Donde hemos de sustituir el ? por el número de repeticiones que deseamos realizar y el ??? por las instrucciones que queremos que se ejecuten en cada repetición (por ejemplo las instrucciones para dibujar un triángulo con cada repetición). El código que se ejecutará en cada repetición se llama bloque de ejecución y puede comprender tantos comandos como queramos. Vamos a verlo con un ejemplo.
A partir del código para dibujar un triángulo que vimos anteriormente, vamos a escribir el siguiente código en el que añadimos algunas líneas y pulsaremos ejecutar:
-- PROGRAMA PARA DIBUJAR 25 TRIÁNGULOS HORIZONTALES PN00526G
Iniciar programa
Nuevo grosor lápiz (2)
--Definimos las coordenadas iniciales para el triángulo
x nuevo valor es (-10)
y nuevo valor es (4)
a nuevo valor es (-8)
b nuevo valor es (2)
c nuevo valor es (-10)
d nuevo valor es (2)
--Vamos a dibujar 25 triángulos
Repetir (25) veces ejecutar bloque
Comienzo bloque
--Instrucciones para dibujar un triángulo
Dibujar línea desde (x,y) hasta (a,b)
Dibujar línea desde (a,b) hasta (c,d)
Dibujar línea desde (c,d) hasta (x,y)
--Preparamos la siguiente repetición
--Definimos las coordenadas para el siguiente triángulo
x nuevo valor es (x+3)
a nuevo valor es (a+3)
c nuevo valor es (c+3)
Fin bloque
Finalizar programa
Tenemos el mismo código que teníamos para dibujar un triángulo, sólo que ampliado con algunas líneas más. El resultado que obtenemos después de haber pulsado “Ejecutar” es que se han dibujado muchos triángulos en una fila.
Concepto de bucle o ciclo para repetición en programación para niños (tecnología, informática, matemáticas, etc.)
Vamos a ver paso a paso qué es lo que hace este código. En primer lugar se definen las variables donde vamos a tener las coordenadas de los vértices o esquinas del triángulo. En el primer triángulo las coordenadas de estos vértices son (-10, 4), (-8,2) y (-10,2). Luego introducimos una instrucción Repetir para que se produzca un ciclo de 25 repeticiones. En la primera repetición, se dibuja el primer triángulo con las instrucciones dibujar línea. Después de esto, hay que preparar las coordenadas para el siguiente triángulo. Si no hiciéramos esto, se volvería a dibujar el triángulo en el mismo sitio, pero nosotros no lo queremos en el mismo sitio. ¿Cómo decimos cuáles serán las coordenadas para la siguiente repetición? Cambiando el valor de las variables que sea necesario cambiar. Si miras las coordenadas de los vértices o esquinas son (x, y), (a, b) y (c, d). La posición horizontal del triángulo depende de los valores de x, a y c que son las coordenadas x u horizontales. La posición vertical del triángulo depende de los valores y, b, d que son las coordenadas y o verticales. Para que el triángulo se desplace en la siguiente repetición 3 unidades a la derecha, incrementamos los valores de x, a y c en tres unidades con las instrucciones
x nuevo valor es (x+3) que hace que la x que antes valía -10 pase a valer -7 ya que hemos sumado 3
a nuevo valor es (a+3) que hace que la a que antes valía -8 pase a valer -5 ya que hemos sumado 3
c nuevo valor es (c+3) que hace que la c que antes valía -10 pase a valer -7 ya que hemos sumado 3
Ahora el ordenador llega a la instrucción Fin bloque, y como sólo ha hecho una repetición y le hemos dado instrucciones para que haga 25, vuelve al comienzo del bloque para repetir las instrucciones dentro del bloque de ejecución. Ahora se dibuja otro triángulo con las coordenadas (x, y), (a, b) y (c, d) de nuevo, pero como hemos modificado los valores de x, a, y c, ya no se dibuja en el mismo sitio que antes, sino que ahora se dibuja con vértices en (-7, 4), (-5, 2) y (-7, 2). De este modo ya tenemos dibujados 2 triángulos.
Ahora el proceso se repite y se dibuja el tercer triángulo, luego el cuarto, luego el quinto, y así hasta llegar a los 25 triángulos. Cuando se han dibujado los 25 triángulos y se llega al final del bloque, el ordenador detecta que ya se ha alcanzado el número de repeticiones que habíamos programado, por lo que en lugar de volver a repetir, sigue ejecutando el programa.
Para entender mejor lo que pasa fíjate en la siguiente imagen donde están indicadas las coordenadas de uno de los vértices o esquinas del triángulo y podemos ver cómo van cambiando estas coordenadas:
Explicación sencilla sobre qué es un bucle o ciclo en programación para niños de primaria o secundaria
En esta imagen podemos ver cómo van cambiando las coordenadas del vértice superior del triángulo: inicialmente (x, y) vale (-10, 4). Al sumarle 3 a la x, las coordenadas de este vértice en el siguiente triángulo pasan a ser (-7, 4). Al sumarle 3 de nuevo pasan a ser (-4, 4). Al sumarle 3 de nuevo pasan a ser (-1, 4). Al sumarle 3 de nuevo (2, 4) y al sumarle 3 de nuevo (5,4). Si le sumamos 3 de nuevo las coordenadas serían (8, 4) y así sucesivamente. ¿Por qué ocurre esto? Porque en el código tenemos la instrucción x nuevo valor es (x+3) de modo que en cada repetición el valor de x se incrementa en 3 unidades. Con los otros vértices ocurre lo mismo.
Vamos a cambiar el código y en lugar de sumar 3 unidades vamos a sumar 5 unidades. ¿Qué ocurre? Que los triángulos aparecen más separados entre ellos porque en cada repetición los estamos desplazando más que antes. Prueba por tu cuenta a sumar cantidades más grandes o más pequeñas para que veas lo que ocurre.
Hay un detalle que tenemos que aclarar: ¿Por qué si hemos incluido instrucciones para dibujar 25 triángulos no vemos los 25 triángulos? Posiblemente ya sepas la respuesta, pero de cualquier manera, vamos a explicarlo, pero esto lo haremos en la próxima entrega del curso.
EJERCICIO
Usando como variables para los vértices (x, y) (a, b) y (c, d) crea un programa que dibuje un triángulo con grosor de lápiz medio cuyos vértices sean (-8, -3) , (-6, -4) y (-7, -2)
Crea a continuación otro programa a partir del anterior para dibujar 25 triángulos en vertical. Pista: introduce un comando Repetir e identifica las variables que controlan las coordenadas verticales en que se sitúa el triángulo. Modifícales antes de que se produzca la repetición. Ten en cuenta que este ejercicio se puede resolver de varias maneras diferentes. La solución será algo parecido a esto:
Ejercicios resueltos bucles o ciclos en programación para niños de primaria o secundaria
Puedes comprobar si tus respuestas son correctas consultando en los foros aprenderaprogramar.com.
Para acceder a la información general sobre este curso y al listado completo de entregas pulsa en este link: Ver curso completo.
Para hacer un comentario o consulta utiliza los foros aprenderaprogramar.com, abiertos a cualquier persona independientemente de su nivel de conocimiento.
Descargar archivo: | {
"url": "https://www.aprenderaprogramar.es/index.php?option=com_content&view=article&id=1004:que-es-un-bucle-o-ciclo-en-programacion-explicado-para-ninos-sentencia-repetir-y-bloques-de-ejecucion-pn00526g&catid=115&Itemid=311",
"source_domain": "www.aprenderaprogramar.es",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "61809",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:J53AC2U6D2ME3MLS3J7HZZXMXCFLZDH5",
"WARC-Concurrent-To": "<urn:uuid:766080c0-2833-4e31-95c5-cb47d5e77abb>",
"WARC-Date": "2024-07-20T12:17:06Z",
"WARC-IP-Address": "46.29.49.51",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IDUMWJIVTICSJEBRFGXNOC6Y5RYKSOPI",
"WARC-Record-ID": "<urn:uuid:4eba815e-1577-40f3-8861-ac43ac1b9a55>",
"WARC-Target-URI": "https://www.aprenderaprogramar.es/index.php?option=com_content&view=article&id=1004:que-es-un-bucle-o-ciclo-en-programacion-explicado-para-ninos-sentencia-repetir-y-bloques-de-ejecucion-pn00526g&catid=115&Itemid=311",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:82cca1f8-9794-4262-a036-e79ffdb52d9a>"
},
"warc_info": "isPartOf: CC-MAIN-2024-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-32\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,
99,
145,
146,
148,
149,
151,
152,
184,
185,
585,
586,
634,
635,
725,
726,
1556,
1557,
1727,
1728,
2021,
2022,
2274,
2275,
2322,
2323,
2340,
2341,
2364,
2365,
2388,
2389,
2410,
2411,
2433,
2434,
2455,
2456,
2479,
2480,
2501,
2502,
2540,
2541,
2579,
2580,
2618,
2619,
2638,
2639,
2640,
2642,
2643,
2645,
2646,
2869,
2870,
2949,
2950,
2952,
2953,
2995,
2996,
3053,
3054,
3088,
3089,
3105,
3106,
3110,
3111,
3122,
3123,
3125,
3126,
3521,
3522,
3687,
3688,
3749,
3750,
3767,
3768,
3791,
3792,
3848,
3849,
3872,
3873,
3894,
3895,
3917,
3918,
3939,
3940,
3963,
3964,
3985,
3986,
4018,
4019,
4054,
4055,
4071,
4072,
4114,
4115,
4153,
4154,
4192,
4193,
4231,
4232,
4269,
4270,
4326,
4327,
4350,
4351,
4374,
4375,
4398,
4399,
4410,
4411,
4430,
4431,
4433,
4434,
4436,
4437,
4660,
4661,
4775,
4776,
4778,
4779,
6033,
6034,
6133,
6134,
6232,
6233,
6332,
6333,
6864,
6865,
7238,
7239,
7439,
7440,
7543,
7544,
7546,
7547,
8204,
8205,
8516,
8517,
8789,
8790,
8792,
8793,
8803,
8804,
8985,
8986,
9388,
9389,
9478,
9479,
9481,
9482,
9580,
9581,
9583,
9584,
9586,
9587,
9589,
9590,
9592,
9593,
9595,
9596,
9598,
9599,
9728,
9729,
9884,
9885,
9887,
9888
],
"line_end_idx": [
99,
145,
146,
148,
149,
151,
152,
184,
185,
585,
586,
634,
635,
725,
726,
1556,
1557,
1727,
1728,
2021,
2022,
2274,
2275,
2322,
2323,
2340,
2341,
2364,
2365,
2388,
2389,
2410,
2411,
2433,
2434,
2455,
2456,
2479,
2480,
2501,
2502,
2540,
2541,
2579,
2580,
2618,
2619,
2638,
2639,
2640,
2642,
2643,
2645,
2646,
2869,
2870,
2949,
2950,
2952,
2953,
2995,
2996,
3053,
3054,
3088,
3089,
3105,
3106,
3110,
3111,
3122,
3123,
3125,
3126,
3521,
3522,
3687,
3688,
3749,
3750,
3767,
3768,
3791,
3792,
3848,
3849,
3872,
3873,
3894,
3895,
3917,
3918,
3939,
3940,
3963,
3964,
3985,
3986,
4018,
4019,
4054,
4055,
4071,
4072,
4114,
4115,
4153,
4154,
4192,
4193,
4231,
4232,
4269,
4270,
4326,
4327,
4350,
4351,
4374,
4375,
4398,
4399,
4410,
4411,
4430,
4431,
4433,
4434,
4436,
4437,
4660,
4661,
4775,
4776,
4778,
4779,
6033,
6034,
6133,
6134,
6232,
6233,
6332,
6333,
6864,
6865,
7238,
7239,
7439,
7440,
7543,
7544,
7546,
7547,
8204,
8205,
8516,
8517,
8789,
8790,
8792,
8793,
8803,
8804,
8985,
8986,
9388,
9389,
9478,
9479,
9481,
9482,
9580,
9581,
9583,
9584,
9586,
9587,
9589,
9590,
9592,
9593,
9595,
9596,
9598,
9599,
9728,
9729,
9884,
9885,
9887,
9888,
9906
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 9906,
"ccnet_original_nlines": 192,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1283341646194458,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014091599732637405,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2154000997543335,
"rps_doc_frac_unique_words": 0.28236743807792664,
"rps_doc_mean_word_length": 4.913070201873779,
"rps_doc_num_sentences": 80,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.302032470703125,
"rps_doc_word_count": 1622,
"rps_doc_frac_chars_dupe_10grams": 0.05295519903302193,
"rps_doc_frac_chars_dupe_5grams": 0.1947546750307083,
"rps_doc_frac_chars_dupe_6grams": 0.1402936428785324,
"rps_doc_frac_chars_dupe_7grams": 0.12147069722414017,
"rps_doc_frac_chars_dupe_8grams": 0.08708745986223221,
"rps_doc_frac_chars_dupe_9grams": 0.059731461107730865,
"rps_doc_frac_chars_top_2gram": 0.02384239062666893,
"rps_doc_frac_chars_top_3gram": 0.028610870242118835,
"rps_doc_frac_chars_top_4gram": 0.0081566097214818,
"rps_doc_books_importance": -865.2918090820312,
"rps_doc_books_importance_length_correction": -865.2918090820312,
"rps_doc_openwebtext_importance": -552.2927856445312,
"rps_doc_openwebtext_importance_length_correction": -552.2927856445312,
"rps_doc_wikipedia_importance": -358.57598876953125,
"rps_doc_wikipedia_importance_length_correction": -358.57598876953125
},
"fasttext": {
"dclm": 0.8939100503921509,
"english": 0.0005223099724389613,
"fineweb_edu_approx": 1.2578564882278442,
"eai_general_math": 0.0004811300022993237,
"eai_open_web_math": 0.6659319996833801,
"eai_web_code": 0.7514903545379639
}
} | {
"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": "516",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry, Algebraic"
}
}
},
"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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
-4,708,741,322,692,353,000 | New Google News
Like a lot of other nerds I go to various blog and RSS feeds and such to get the news about the stuff I care about. For “real” news I pretty much rely on google news and wikinews. Except of course for the occasional story that is so big it filters into the geek news. And of course, I don’t watch TV or listen to radio, etc. so lots of stupid useless news passes me by. And that’s the way I like it.
So today when google update google news to allow customization I thought that was pretty cool. But then I tried it. It’s freaking awesome! No longer is there a sports section with news about cricket and soccer. There are two sections, one for Formula 1 and another for Ice Hockey, the only sports I care about. The Entertainment section is going, going, gone to be replaced by the anime section. The US and World news sections are expanded to reveal those stories that make it just under the radar. And the Sci-Tech and business sections have four new friends: video games, copyright, nintendo and open-source/linux. This is the high quality shite.
What’s even better about it is that it provides me with a URL I can share with the world, so you can see the same news that I see. Think about it. Such a small change to an existing interface has the most amazing effects completely changing the way I read news. I hope that one day I will live in a world where this kind of stuff happens every single day. Oh wait, I do. Here is the URL to read news just like I do.
This entry was posted in Technology and tagged , . Bookmark the permalink. | {
"url": "https://www.apreche.net/new-google-news/",
"source_domain": "www.apreche.net",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "30016",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FHO27IMFWACF6R7RHI2M7EH5Z4JN4BI4",
"WARC-Concurrent-To": "<urn:uuid:926917c0-d98e-4378-8625-36b21b13f8d0>",
"WARC-Date": "2024-05-23T09:14:48Z",
"WARC-IP-Address": "172.67.201.139",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DJN7I66AF4UB3QFKE2BYK4UD5NQAUGUF",
"WARC-Record-ID": "<urn:uuid:ca5f3563-4911-4ba4-83a7-456a17094b63>",
"WARC-Target-URI": "https://www.apreche.net/new-google-news/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c9438aff-0a63-4eaa-9f1c-21664f322b29>"
},
"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 ([email protected])\r\nhostname: ip-10-67-67-22\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,
417,
418,
1067,
1068,
1484,
1485
],
"line_end_idx": [
16,
17,
417,
418,
1067,
1068,
1484,
1485,
1559
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 1559,
"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.42774567008018494,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05780347064137459,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13005779683589935,
"rps_doc_frac_unique_words": 0.5491525530815125,
"rps_doc_mean_word_length": 4.138983249664307,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.672793865203857,
"rps_doc_word_count": 295,
"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.02457001991569996,
"rps_doc_frac_chars_top_3gram": 0.01638001948595047,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -169.75038146972656,
"rps_doc_books_importance_length_correction": -157.26727294921875,
"rps_doc_openwebtext_importance": -92.41588592529297,
"rps_doc_openwebtext_importance_length_correction": -92.41588592529297,
"rps_doc_wikipedia_importance": -60.22020721435547,
"rps_doc_wikipedia_importance_length_correction": -46.514888763427734
},
"fasttext": {
"dclm": 0.03475124016404152,
"english": 0.9445887804031372,
"fineweb_edu_approx": 1.0847676992416382,
"eai_general_math": 0.007068689912557602,
"eai_open_web_math": 0.02020161971449852,
"eai_web_code": 0.001213849987834692
}
} | {
"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": "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": "2",
"label": "Understand"
}
},
"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": "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"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
8,827,374,143,119,652,000 | 3
I am having trouble with how I am supposed to use both ArcPy and ArcGIS API for Python. ArcPy is only in Python 2 and ArcGIS API for Python is in ArcGIS Pro and is Python 3. I don't know how to set my paths in VS Code or Atom to be able to use both.
2
• 2
No, your assertion is incorrect. ArcPy exists in both Python 2 and 3 (32-/64-bit Desktop and 64-bit Pro, respectively). API for Python is only for Python 3, and has a different purpose than ArcPy.
– Vince
Jun 20, 2018 at 20:06
• 1
Perhaps review gis.stackexchange.com/questions/248545 - maybe it is only ArcPy or the ArcGIS API for Python that you need to use. If so, it could simplify your Python setup.
– PolyGeo
Jun 21, 2018 at 0:10
1 Answer 1
3
You can only run a Python script against one version of the Python debugger at a time (2.7, 3.4, etc).
If you have ArcMap, which runs against Python 2.x and the Python API (I'd assume you've installed Python 3.x and required dependencies), then you can't write a single script that calls
import arcpy
import argis
In theory you might be able to write a script that sub-processes out to Python 3.x from the 2.7 one. As was pointed out in the comments, the ArcGIS Python API only runs against Python 3.x
Alternatively (actually, hopefully this is your case as this is easiest), if you're using ArcGIS Pro, which lays down Python 3.x and is handled via Conda, you can write one script that calls both arcpy and arcgis. Assuming you've loaded the Python API into the ArcGIS Pro (Conda managed) Python. In this case, you can call Python directly from "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" However you should read this help topic as it goes into more detail about running Python.
7
• Thanks for the response. When I set my python environment to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe in VS Code and run import arcgis and import arcpy I get the error ModuleNotFoundError: No module named 'arcpy'
– Chris
Jun 22, 2018 at 12:05
• Which version of ArcGIS Pro do you have installed?
– KHibma
Jun 22, 2018 at 12:11
• I have ArcGIS Pro 2.1.3
– Chris
Jun 22, 2018 at 12:21
• From the help link above in the From a command prompt section, can you follow the instructions for trying Python from command prompt - once in there, try to import arcpy and see if that gets your anywhere. Rule out a larger issue.
– KHibma
Jun 22, 2018 at 12:27
• No errors when I do that.
– Chris
Jun 22, 2018 at 12:44
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://gis.stackexchange.com/questions/287013/using-arcpy-and-arcgis-api-for-python-together",
"source_domain": "gis.stackexchange.com",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "156580",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:I5TJVRFPNRHMPXFRRAFOA25YWPRM2BO7",
"WARC-Concurrent-To": "<urn:uuid:4dc24762-89f5-4e5a-8b32-94fbe81a6ae5>",
"WARC-Date": "2023-03-20T15:00:26Z",
"WARC-IP-Address": "151.101.193.69",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HWODYIQD33YEVUUCA5POM3VULYX3TNKY",
"WARC-Record-ID": "<urn:uuid:0d01e93b-abbe-428f-b19f-d64231695f41>",
"WARC-Target-URI": "https://gis.stackexchange.com/questions/287013/using-arcpy-and-arcgis-api-for-python-together",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e6ea9918-af26-4476-939e-9449c47033fe>"
},
"warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-94\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,
2,
3,
253,
254,
256,
262,
463,
475,
501,
507,
685,
699,
724,
725,
736,
737,
739,
740,
843,
844,
1029,
1030,
1043,
1056,
1057,
1245,
1246,
1751,
1752,
1754,
1999,
2011,
2037,
2092,
2105,
2131,
2159,
2171,
2197,
2432,
2445,
2471,
2501,
2513,
2539,
2540,
2552,
2553,
2653,
2654
],
"line_end_idx": [
2,
3,
253,
254,
256,
262,
463,
475,
501,
507,
685,
699,
724,
725,
736,
737,
739,
740,
843,
844,
1029,
1030,
1043,
1056,
1057,
1245,
1246,
1751,
1752,
1754,
1999,
2011,
2037,
2092,
2105,
2131,
2159,
2171,
2197,
2432,
2445,
2471,
2501,
2513,
2539,
2540,
2552,
2553,
2653,
2654,
2744
]
} | {
"red_pajama_v2": {
"ccnet_original_length": 2744,
"ccnet_original_nlines": 50,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3447737991809845,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02964119054377079,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2870514690876007,
"rps_doc_frac_unique_words": 0.4246861934661865,
"rps_doc_mean_word_length": 4.303347110748291,
"rps_doc_num_sentences": 34,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.866635322570801,
"rps_doc_word_count": 478,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06271269172430038,
"rps_doc_frac_chars_dupe_6grams": 0.04229459911584854,
"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.0204180795699358,
"rps_doc_frac_chars_top_3gram": 0.021876519545912743,
"rps_doc_frac_chars_top_4gram": 0.026737969368696213,
"rps_doc_books_importance": -319.5225830078125,
"rps_doc_books_importance_length_correction": -319.5225830078125,
"rps_doc_openwebtext_importance": -168.3676300048828,
"rps_doc_openwebtext_importance_length_correction": -168.3676300048828,
"rps_doc_wikipedia_importance": -155.8787078857422,
"rps_doc_wikipedia_importance_length_correction": -155.8787078857422
},
"fasttext": {
"dclm": 0.26715517044067383,
"english": 0.8943263292312622,
"fineweb_edu_approx": 1.6242517232894897,
"eai_general_math": 0.015574510209262371,
"eai_open_web_math": 0.180650532245636,
"eai_web_code": 0.0049234600737690926
}
} | {
"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": "910.285",
"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": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
} | e3c4dd7183f5f028f56d5a7988cc68c4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.