id
int64 | text
string | metadata
dict | line_start_n_end_idx
dict | quality_signals
dict | eai_taxonomy
dict | pid
string |
---|---|---|---|---|---|---|
5,909,770,924,209,504,000 |
Class EntityType (1.12.1)
EntityType(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Entities are extracted from user input and represent parameters that are meaningful to your application. For example, a date range, a proper name such as a geographic location or landmark, and so on. Entities represent actionable data for your application.
When you define an entity, you can also include synonyms that all map to that entity. For example, "soft drink", "soda", "pop", and so on.
There are three types of entities:
• System - entities that are defined by the Dialogflow API for common data types such as date, time, currency, and so on. A system entity is represented by the EntityType type.
• Custom - entities that are defined by you that represent actionable data that is meaningful to your application. For example, you could define a pizza.sauce entity for red or white pizza sauce, a pizza.cheese entity for the different types of cheese on a pizza, a pizza.topping entity for different toppings, and so on. A custom entity is represented by the EntityType type.
• User - entities that are built for an individual user such as favorites, preferences, playlists, and so on. A user entity is represented by the SessionEntityType type.
For more information about entity types, see the Dialogflow documentation <https://cloud.google.com/dialogflow/docs/entities-overview>__.
Attributes
NameDescription
name str
The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: ``projects/
display_name str
Required. The human-readable name of the entity type, unique within the agent.
kind google.cloud.dialogflowcx_v3.types.EntityType.Kind
Required. Indicates the kind of entity type.
auto_expansion_mode google.cloud.dialogflowcx_v3.types.EntityType.AutoExpansionMode
Indicates whether the entity type can be automatically expanded.
entities Sequence[google.cloud.dialogflowcx_v3.types.EntityType.Entity]
The collection of entity entries associated with the entity type.
excluded_phrases Sequence[google.cloud.dialogflowcx_v3.types.EntityType.ExcludedPhrase]
Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry ``giant``\ (an adjective), you might consider adding ``giants``\ (a noun) as an exclusion. If the kind of entity type is ``KIND_MAP``, then the phrases specified by entities and excluded phrases should be mutually exclusive.
enable_fuzzy_extraction bool
Enables fuzzy entity extraction during classification.
redact bool
Indicates whether parameters of the entity type should be redacted in log. If redaction is enabled, page parameters and intent parameters referring to the entity type will be replaced by parameter name when logging.
Inheritance
builtins.object > proto.message.Message > EntityType
Classes
AutoExpansionMode
AutoExpansionMode(value)
Represents different entity type expansion modes. Automated expansion allows an agent to recognize values that have not been explicitly listed in the entity (for example, new kinds of shopping list items).
Entity
Entity(mapping=None, *, ignore_unknown_fields=False, **kwargs)
An entity entry for an associated entity type.
ExcludedPhrase
ExcludedPhrase(mapping=None, *, ignore_unknown_fields=False, **kwargs)
An excluded entity phrase that should not be matched.
Kind
Kind(value)
Represents kinds of entities.
|
{
"url": "https://cloud.google.com/python/docs/reference/dialogflow-cx/latest/google.cloud.dialogflowcx_v3.types.EntityType",
"source_domain": "cloud.google.com",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "966193",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VEPSM35TYSJGS33QLLMJVNJWVYBQ7JMW",
"WARC-Concurrent-To": "<urn:uuid:6aff63e4-fa24-4f42-b68d-0a832daf75db>",
"WARC-Date": "2022-07-04T21:34:13Z",
"WARC-IP-Address": "172.217.9.206",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:V7D4LDOV23ZR7KCST6FABTHPEARHAAW6",
"WARC-Record-ID": "<urn:uuid:4bdc0b0d-bc61-4fb6-8ee8-d92e07cd3e03>",
"WARC-Target-URI": "https://cloud.google.com/python/docs/reference/dialogflow-cx/latest/google.cloud.dialogflowcx_v3.types.EntityType",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3725d2df-8a01-4126-b333-18dde34cbb4c>"
},
"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-223\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,
26,
27,
94,
95,
352,
353,
492,
493,
528,
529,
708,
709,
1088,
1089,
1261,
1262,
1400,
1401,
1412,
1413,
1429,
1438,
1543,
1560,
1639,
1695,
1740,
1824,
1889,
1961,
2027,
2115,
2466,
2495,
2550,
2562,
2778,
2779,
2791,
2792,
2845,
2846,
2854,
2855,
2873,
2874,
2899,
2900,
3106,
3107,
3114,
3115,
3178,
3179,
3226,
3227,
3242,
3243,
3314,
3315,
3369,
3370,
3375,
3376,
3388,
3389
],
"line_end_idx": [
26,
27,
94,
95,
352,
353,
492,
493,
528,
529,
708,
709,
1088,
1089,
1261,
1262,
1400,
1401,
1412,
1413,
1429,
1438,
1543,
1560,
1639,
1695,
1740,
1824,
1889,
1961,
2027,
2115,
2466,
2495,
2550,
2562,
2778,
2779,
2791,
2792,
2845,
2846,
2854,
2855,
2873,
2874,
2899,
2900,
3106,
3107,
3114,
3115,
3178,
3179,
3226,
3227,
3242,
3243,
3314,
3315,
3369,
3370,
3375,
3376,
3388,
3389,
3418
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3418,
"ccnet_original_nlines": 66,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2857142984867096,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007763979956507683,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24689440429210663,
"rps_doc_frac_unique_words": 0.4363636374473572,
"rps_doc_mean_word_length": 6.240909099578857,
"rps_doc_num_sentences": 63,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.771694660186768,
"rps_doc_word_count": 440,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.0954115092754364,
"rps_doc_frac_chars_dupe_6grams": 0.05535323917865753,
"rps_doc_frac_chars_dupe_7grams": 0.028404949232935905,
"rps_doc_frac_chars_dupe_8grams": 0.028404949232935905,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.04005827009677887,
"rps_doc_frac_chars_top_3gram": 0.028404949232935905,
"rps_doc_frac_chars_top_4gram": 0.008739990182220936,
"rps_doc_books_importance": -360.9817810058594,
"rps_doc_books_importance_length_correction": -360.9817810058594,
"rps_doc_openwebtext_importance": -180.365478515625,
"rps_doc_openwebtext_importance_length_correction": -180.365478515625,
"rps_doc_wikipedia_importance": -112.97919464111328,
"rps_doc_wikipedia_importance_length_correction": -112.97919464111328
},
"fasttext": {
"dclm": 0.7550612688064575,
"english": 0.7606508135795593,
"fineweb_edu_approx": 2.692464828491211,
"eai_general_math": 0.8623667359352112,
"eai_open_web_math": 0.1686275601387024,
"eai_web_code": 0.9852469563484192
}
}
|
{
"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.01",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,951,927,763,306,304,500 |
Web Development and SEO Company India
How Does URL Structure Influence The Performance Of Your Website?
url-structure-of-website
URL structure, perhaps one of the most neglected aspects plays a vital role in the overall performance of your website. Be it the popularity of your website, the traffic it pulls in or the search engine ranking it garners.
Here are some of the elements of the URL which have a great influence on the SEO of the website:
URL Length
It is seen that URLs which contain 35 to 40 characters have better chances to dominate the search listings. Thus even though a few long URLs manage to get better search engine listing, it is recommended that you keep the length of the URL somewhere between 35 to 40 characters.
Keyword within the URL
Until recently, many websites preferred having a keyword rich URL in order to get better rankings. But now this trend is changing as Google is placing more importance on other search factors. Thus it is advised that instead of over stuffing your URL with keywords, it is alright if the URL does not have keywords or has less number of keywords.
Extraneous Characters
There are many URLs which contain extraneous characters like %, @, $, & etc. These characters make it difficult for the search engines to crawl the website and thereby hurt the search engine rankings. Thus it is important to avoid these characters in the URL structure of your website.
Thus the structure of the URL does have an effect on the ranking of your website and thereby influences the traffic on your site and the conversion rates.
Below are some very basic things which will help you build successful URLs:
Short Length
As mentioned earlier the length of the URL does influence your website rankings. Therefore it is recommended that you choose a shorter URL which is easier to copy and paste, can be easily read on a mobile phone and written on a business card. This way a short URL increases the brand value of your website.
Descriptive URLs better than Numbers
Instead of using numbers in your URLs, it is recommended that you opt for a descriptive URL. Even if the descriptive URL is not keyword reach or particularly informative, it is still advise that you opt for it rather than switching to a numeric/ alphanumeric URL.
Avoid Subdomains
It is important that you avoid using multiple subdomains for your website. Also you need to keep in mind that subdomains do have the potential to be treated separately from the primary domain, this can lead to loss of trust juice for your website.
Avoid being Case Sensitive
Avoid using uppercase letters in the URL structure. In case you have them in the URL then 301 them to all-lowercase versions to avoid confusion. And suppose you have a lot of type-in traffic you can consider a 301 rule in order to send all the incorrect capitalization permutation to its rightful home.
Most of all it will be helpful if you stick to the URL conventions and use fewer folders in the URL structure.
These are some very basic ways in which you can build successful URL for your website.
WEBSITE FACTS
• Do I need a Static or Dynamic Website?
• Should I go for an eCommerce Website?
• Which hosting plan is best for me?
• Which domain should I opt for?
• Is my website Search Engine Optimized?
• Which is the best email pack for me?
Know it all here!
REQUEST QUOTE
JAIN TECHNOSOFT
#123, 2nd Floor, 24th Main,
JP Nagar 5th Phase,
Opp. Royal High School,
Bangalore - 560078,
Karnataka, India.
|
{
"url": "https://www.jaintechnosoft.com/blog/how-does-url-structure-influence-the-performance-of-your-website",
"source_domain": "www.jaintechnosoft.com",
"snapshot_id": "crawl=CC-MAIN-2019-04",
"warc_metadata": {
"Content-Length": "112302",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:V7HKSN26MDVPJF7H2VTVRQ7RPLUPETCE",
"WARC-Concurrent-To": "<urn:uuid:e1281ce9-b1e9-43e8-9799-df59cd19c374>",
"WARC-Date": "2019-01-22T19:31:03Z",
"WARC-IP-Address": "192.169.180.32",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:BWRQA42OT22OAB23RRYCI4OQCUGQYPBS",
"WARC-Record-ID": "<urn:uuid:78f3d1d3-e53f-4f26-b6cc-2b7005ec53bd>",
"WARC-Target-URI": "https://www.jaintechnosoft.com/blog/how-does-url-structure-influence-the-performance-of-your-website",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:6438cfd1-5a02-497f-af42-1e1e42d5ced7>"
},
"warc_info": "isPartOf: CC-MAIN-2019-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-63-93-216.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
38,
39,
105,
106,
131,
132,
355,
356,
453,
454,
465,
466,
744,
745,
768,
769,
1114,
1115,
1137,
1138,
1424,
1425,
1580,
1581,
1657,
1658,
1671,
1672,
1979,
1980,
2017,
2018,
2282,
2283,
2300,
2301,
2549,
2550,
2577,
2578,
2881,
2882,
2993,
2994,
3081,
3082,
3096,
3097,
3140,
3182,
3221,
3256,
3299,
3340,
3358,
3359,
3373,
3374,
3390,
3391,
3419,
3439,
3463,
3483
],
"line_end_idx": [
38,
39,
105,
106,
131,
132,
355,
356,
453,
454,
465,
466,
744,
745,
768,
769,
1114,
1115,
1137,
1138,
1424,
1425,
1580,
1581,
1657,
1658,
1671,
1672,
1979,
1980,
2017,
2018,
2282,
2283,
2300,
2301,
2549,
2550,
2577,
2578,
2881,
2882,
2993,
2994,
3081,
3082,
3096,
3097,
3140,
3182,
3221,
3256,
3299,
3340,
3358,
3359,
3373,
3374,
3390,
3391,
3419,
3439,
3463,
3483,
3500
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3500,
"ccnet_original_nlines": 64,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4436201751232147,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05044509842991829,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11424332112073898,
"rps_doc_frac_unique_words": 0.4207920730113983,
"rps_doc_mean_word_length": 4.595709800720215,
"rps_doc_num_sentences": 33,
"rps_doc_symbol_to_word_ratio": 0.0014836799819022417,
"rps_doc_unigram_entropy": 4.9486846923828125,
"rps_doc_word_count": 606,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.03590663895010948,
"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.02369838021695614,
"rps_doc_frac_chars_top_3gram": 0.028007179498672485,
"rps_doc_frac_chars_top_4gram": 0.020466789603233337,
"rps_doc_books_importance": -270.35455322265625,
"rps_doc_books_importance_length_correction": -270.35455322265625,
"rps_doc_openwebtext_importance": -159.4954376220703,
"rps_doc_openwebtext_importance_length_correction": -159.4954376220703,
"rps_doc_wikipedia_importance": -148.18264770507812,
"rps_doc_wikipedia_importance_length_correction": -148.18264770507812
},
"fasttext": {
"dclm": 0.022735239937901497,
"english": 0.9213730692863464,
"fineweb_edu_approx": 2.0438101291656494,
"eai_general_math": 0.057474199682474136,
"eai_open_web_math": 0.22285610437393188,
"eai_web_code": 0.045929308980703354
}
}
|
{
"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": "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": "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": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,502,244,839,240,711,000 |
Use CrashPlan to automatically backup to a network drive (NAS)
For a while I have been searching for a good, reliable and easy to use backup solution.
Eventually I found CrashPlan (http://www.crashplan.com) to be my preferred solution. It has a client for WIndows, Mac and Linux. But it has one major problem. You can choose to backup to a folder, external drive, a friends computer or online, but CrashPlan can not backup to a network drive.
I have a ReadyNas Duo that I use to store all my files and backups. So of course I want a solution that can access that storage. Luckily after some searching I found a way to let CrashPlan add a network drive.
The solution is actually pretty simple:
1. Create a folder somewhere. For example c:\backup
2. Open up CrashPlan and go to the Destinations tab of the ap. Click "Folders" and find your new folder. Leave CrashPlan running and the Destinations tab open.
3. Delete the new folder you created and just pointed CrashPlan to.
4. Open a command prompt (cmd.exe) and create a hardlink to the network share. To do this type mklink /d "c:\backup" \\nas\sharename - Hit return.You can also mount the share so it has a drive letter and do it this way mklink /d "c:\backup" z:
Sources:
|
{
"url": "http://www.virtualj.net/20120126/use-crashplan-automatically-backup-network-drive-nas",
"source_domain": "www.virtualj.net",
"snapshot_id": "crawl=CC-MAIN-2017-43",
"warc_metadata": {
"Content-Length": "20016",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UC2RD45MMMNPCRLLEWFAAKSGUEYVJ3I7",
"WARC-Concurrent-To": "<urn:uuid:86d552f0-71e7-4076-b6c8-b7465c03936f>",
"WARC-Date": "2017-10-19T03:33:23Z",
"WARC-IP-Address": "104.28.12.49",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:L6KC7UGEXAYF3UGLENYDHAGKDYKR3HT7",
"WARC-Record-ID": "<urn:uuid:2bd6a98b-5540-430d-91ff-21bbda91c2c5>",
"WARC-Target-URI": "http://www.virtualj.net/20120126/use-crashplan-automatically-backup-network-drive-nas",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c1f87259-7985-4417-aa95-b54a1e323053>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-147-217-113.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-43\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for October 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
63,
64,
152,
153,
446,
447,
658,
659,
699,
700,
755,
918,
988,
1239,
1240,
1242,
1243
],
"line_end_idx": [
63,
64,
152,
153,
446,
447,
658,
659,
699,
700,
755,
918,
988,
1239,
1240,
1242,
1243,
1251
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1251,
"ccnet_original_nlines": 17,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3754512667655945,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02527076005935669,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.19855596125125885,
"rps_doc_frac_unique_words": 0.52073734998703,
"rps_doc_mean_word_length": 4.382488250732422,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.365937232971191,
"rps_doc_word_count": 217,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04416403919458389,
"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.025236589834094048,
"rps_doc_frac_chars_top_3gram": 0.028391169384121895,
"rps_doc_frac_chars_top_4gram": 0.033648788928985596,
"rps_doc_books_importance": -135.1406707763672,
"rps_doc_books_importance_length_correction": -135.1406707763672,
"rps_doc_openwebtext_importance": -64.30111694335938,
"rps_doc_openwebtext_importance_length_correction": -64.30111694335938,
"rps_doc_wikipedia_importance": -30.96736717224121,
"rps_doc_wikipedia_importance_length_correction": -30.96736717224121
},
"fasttext": {
"dclm": 0.6683228611946106,
"english": 0.8420668840408325,
"fineweb_edu_approx": 1.2738170623779297,
"eai_general_math": 0.7378004193305969,
"eai_open_web_math": 0.3353164792060852,
"eai_web_code": 0.17880046367645264
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.467",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "16",
"label": "Personal Blog"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,620,113,859,483,183,600 |
Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.
I am trying to create a database for an MVC 4 application. I used Entity Framework Code first approach. After digging into the problem I realized that it was not a connection string issue. I downloaded Sql Server Data tools and tried to create it from there but I get the same exact error which is related to Windows Authentication. I am not sure what is causing this problem, I even tried running as admin.
Any ideas??
enter image description here
I have tried mostly all forms of connections strings available online, the last two that I tried were
<add name="Request" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=Requests;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\Requests.mdf" providerName="System.Data.SqlClient" />
<!--<add name="RequestsContext" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=|DataDirectory|\Requests.mdf" /> -->
I am trying to create a local database, I have asked a question about entity frame work right here thinking that the problem was from there but now I know it has nothing to do with it. Here you can see all of the details about the models I created and I am trying to generate the database from.
Using Entity framework with SQL Server 2012 (local *.mdf database)
share|improve this question
2
Is the SQL Server service running? – Raj More Jul 30 '13 at 14:51
Are you trying to connect to a local or remote server? Could you provide the entire line from your config file that has the connection string in, including all the EF bits? Obviously take any sensitive information out =] – Sean Jul 30 '13 at 14:51
Is sql server installed? – OzrenTkalcecKrznaric Jul 30 '13 at 14:55
please see the edit for more info, I looked at teh services, there is a a service called SQL Server VSS Writer and this is running. I installed Visual Studio Ultimate and I think it comes with it?? correct me if I'm wrong – user2247823 Jul 30 '13 at 14:58
Did you solve it using any of the solutions? – OzrenTkalcecKrznaric Jul 31 '13 at 12:18
2 Answers 2
You don't have SQL Server installed on your PC. Install Express Edition and you should be fine.
EDIT: Use connection string for local server:
<add name="Request" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Database=Request;Integrated Security=True;" />
share|improve this answer
I just did, "SQL Server (SQLEXPRESS)" service is running, but "SQL Server Agent (SQLEXPRESS)" is not. I cannot enable this one as the options are greyed out. and the problem still exists. – user2247823 Jul 30 '13 at 15:34
I don't see why would you need SQL Server Agent? This is not an SQL Server Express Edition feature, it's used for e.g. running database jobs and such. – OzrenTkalcecKrznaric Jul 30 '13 at 15:44
I probably don't need it but I still have authentication problem. How do you configure SQLEXPRESS to use Windows Authentication? – user2247823 Jul 30 '13 at 15:47
It should always include windows authentication. See updated answer. – OzrenTkalcecKrznaric Jul 30 '13 at 15:54
1
If you have "SQL SERVER (SQLEXPRESS)" as a service name, then the local instance name is "SQLEXPRESS", which you can explicitly name in your connection string: `<add name="Request" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Database=Request;Integrated Security=True;" />`` – tommy_o Jul 30 '13 at 23:16
If its local, probably SQL Server service is not running. Start>cmd and services.msc will open services page. Right click on sql server and start
share|improve this answer
I think its running, is it SQL Server VSS Writer? I installed VS 2012, and SQL server came with it. I tried to install it manually but I get an error when I installed it is also related to Windows Authentication – user2247823 Jul 30 '13 at 15:00
thats one of them, there should be more – Kuzgun Jul 30 '13 at 15:02
that's the only one I have. I can't manually install SQL Server – user2247823 Jul 30 '13 at 15:03
I am installing the express edition, maybe it will help – user2247823 Jul 30 '13 at 15:06
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/17950234/cannot-create-a-local-sql-server-2012",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2015-32",
"warc_metadata": {
"Content-Length": "90550",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BTP7KBCYQYTZO7LD4N2PP5IQDX56SDZ5",
"WARC-Concurrent-To": "<urn:uuid:5b9936c4-2fab-4ffe-910f-ac182f9468eb>",
"WARC-Date": "2015-08-01T01:44:53Z",
"WARC-IP-Address": "104.16.106.85",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:U4LL6ZMU3LDJMVEVZHU7QEXU2QXXOBDU",
"WARC-Record-ID": "<urn:uuid:08c463e7-13a8-4f8a-b5ee-f60619c9dca8>",
"WARC-Target-URI": "http://stackoverflow.com/questions/17950234/cannot-create-a-local-sql-server-2012",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1999d4cb-4aa3-403f-a516-dbc4c36869f4>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-236-191-2.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-32\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
25,
131,
132,
540,
541,
553,
554,
583,
584,
686,
687,
891,
1034,
1035,
1330,
1331,
1398,
1399,
1427,
1431,
1498,
1503,
1752,
1757,
1826,
1831,
2088,
2093,
2182,
2183,
2195,
2196,
2292,
2293,
2339,
2340,
2482,
2508,
2513,
2736,
2741,
2936,
2941,
3105,
3110,
3223,
3227,
3563,
3564,
3710,
3711,
3737,
3742,
3989,
3994,
4064,
4069,
4168,
4173,
4264,
4265,
4277,
4278,
4280,
4288,
4289,
4367,
4368
],
"line_end_idx": [
25,
131,
132,
540,
541,
553,
554,
583,
584,
686,
687,
891,
1034,
1035,
1330,
1331,
1398,
1399,
1427,
1431,
1498,
1503,
1752,
1757,
1826,
1831,
2088,
2093,
2182,
2183,
2195,
2196,
2292,
2293,
2339,
2340,
2482,
2508,
2513,
2736,
2741,
2936,
2941,
3105,
3110,
3223,
3227,
3563,
3564,
3710,
3711,
3737,
3742,
3989,
3994,
4064,
4069,
4168,
4173,
4264,
4265,
4277,
4278,
4280,
4288,
4289,
4367,
4368,
4458
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4458,
"ccnet_original_nlines": 68,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.31612223386764526,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06322444975376129,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2802950441837311,
"rps_doc_frac_unique_words": 0.3913043439388275,
"rps_doc_mean_word_length": 4.976811408996582,
"rps_doc_num_sentences": 56,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.071495532989502,
"rps_doc_word_count": 690,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.15958066284656525,
"rps_doc_frac_chars_dupe_6grams": 0.08561444282531738,
"rps_doc_frac_chars_dupe_7grams": 0.02446126937866211,
"rps_doc_frac_chars_dupe_8grams": 0.02446126937866211,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.041933611035346985,
"rps_doc_frac_chars_top_3gram": 0.026499709114432335,
"rps_doc_frac_chars_top_4gram": 0.034071050584316254,
"rps_doc_books_importance": -363.8117980957031,
"rps_doc_books_importance_length_correction": -363.8117980957031,
"rps_doc_openwebtext_importance": -180.74749755859375,
"rps_doc_openwebtext_importance_length_correction": -180.74749755859375,
"rps_doc_wikipedia_importance": -114.78424835205078,
"rps_doc_wikipedia_importance_length_correction": -114.78424835205078
},
"fasttext": {
"dclm": 0.02262813039124012,
"english": 0.8730846047401428,
"fineweb_edu_approx": 1.110339641571045,
"eai_general_math": 0.010779500007629395,
"eai_open_web_math": 0.15439283847808838,
"eai_web_code": 0.00007426999945892021
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.445",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "1",
"label": "Leftover HTML"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,330,722,650,041,654,000 |
?
Log in
No account? Create an account
t3knomanser's Fustian Deposits
About Computer Programming
How Random Babbling Becomes Corporate Policy
run the fuck away
Mad science gone horribly, horribly wrong(or right).
About Computer Programming
Previous Entry Share Next Entry
run the fuck away
I'm trying to run a short, informal survey. What are some things that come to mind when you think about computer programming? What do you think it involves? What do you think it's like? If you have programming experience, feel free to reply anyway, but please note that.
• basic programing experience.
3 parts
1. Conceptualizing highly abstract functions of a piece of software, such as, how does data get from a to b
2. Staring at a computer screen, translating your concept into one of several arcane languages
3. When you inevitably screw up said arcane language, figuring out where the screw up is.
3a. Hoping you don't screw up enough that your job gets outsourced.
They should really call programmers, authors. At a basic level, that's what they do. They have to understand grammar and syntax just as much as any author. They also have to have the story/program mapped out in their head before they start.
Honestly, I didn't go into a computer related field out of high school because I thought programing was all there was. I find it boring and prone to giving me headaches.
• It's funny you break out the author analogy- I'm trying to write a thing on how "Everyone Can Program", and one of the main focuses is going to be on programming as communication- you're "telling a story", so to speak.
• language, talking to computers with language. i think about loglan from "the moon is a harsh mistress."
• Abstraction, abstraction, abstraction. While it is very useful to be able to think of a computer program that you're writing as a narrative, it is not a usual human kind of narrative, and good computer programs cover all kinds of fiddly corner cases and obscure cases and counter-intuitively desirable results and so on. You must first say "how will it work?" and make a narrative based on that - and then for it to work well, go back and consider a zillion ways it could go wrong, and make some more or less elaborate allowance for them. That is my experience of programming.
Powered by LiveJournal.com
|
{
"url": "https://t3knomanser.livejournal.com/1036459.html",
"source_domain": "t3knomanser.livejournal.com",
"snapshot_id": "crawl=CC-MAIN-2018-09",
"warc_metadata": {
"Content-Length": "165838",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BKF63QQ7MHMURMD5ENTV253L5Y5OG66Z",
"WARC-Concurrent-To": "<urn:uuid:6e828086-d43f-402f-9586-9c02135be01d>",
"WARC-Date": "2018-02-25T03:44:24Z",
"WARC-IP-Address": "13.88.179.33",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:M2IHXGXUNV5DB5KLHA7T7AQ45YYNFQEV",
"WARC-Record-ID": "<urn:uuid:64249e78-3115-466a-bb53-0e8738de0297>",
"WARC-Target-URI": "https://t3knomanser.livejournal.com/1036459.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:95173e72-5122-4ec4-932b-f749879e5af4>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-67-205-185.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,
2,
3,
10,
11,
41,
42,
73,
74,
101,
102,
147,
148,
166,
167,
220,
221,
248,
249,
281,
299,
570,
603,
604,
616,
617,
729,
730,
829,
830,
924,
925,
997,
998,
1243,
1244,
1418,
1643,
1751,
2332
],
"line_end_idx": [
2,
3,
10,
11,
41,
42,
73,
74,
101,
102,
147,
148,
166,
167,
220,
221,
248,
249,
281,
299,
570,
603,
604,
616,
617,
729,
730,
829,
830,
924,
925,
997,
998,
1243,
1244,
1418,
1643,
1751,
2332,
2358
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2358,
"ccnet_original_nlines": 39,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 2,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.442827433347702,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.010395010001957417,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1621621549129486,
"rps_doc_frac_unique_words": 0.5743073225021362,
"rps_doc_mean_word_length": 4.612090587615967,
"rps_doc_num_sentences": 30,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.0999627113342285,
"rps_doc_word_count": 397,
"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.02129984088242054,
"rps_doc_frac_chars_top_3gram": 0.03932277113199234,
"rps_doc_frac_chars_top_4gram": 0.01529219001531601,
"rps_doc_books_importance": -214.83712768554688,
"rps_doc_books_importance_length_correction": -214.83712768554688,
"rps_doc_openwebtext_importance": -115.55378723144531,
"rps_doc_openwebtext_importance_length_correction": -115.55378723144531,
"rps_doc_wikipedia_importance": -49.51217269897461,
"rps_doc_wikipedia_importance_length_correction": -49.51217269897461
},
"fasttext": {
"dclm": 0.7795364856719971,
"english": 0.9684395790100098,
"fineweb_edu_approx": 2.3847835063934326,
"eai_general_math": 0.15317696332931519,
"eai_open_web_math": 0.2524235248565674,
"eai_web_code": 0.004273239988833666
}
}
|
{
"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",
"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": "9",
"label": "Personal/Misc"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "16",
"label": "Personal Blog"
},
"secondary": {
"code": "18",
"label": "Q&A Forum"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,862,067,103,758,558,200 |
ClearPass Web Ideas Portal
Quora Hub - Answer to uxies Question Forum
Quora Hub is a Q&A stage where clients can post any inquiry and individuals can address. As the response gets upvoted it gets and positioned through a ML program, the response gets the best position for the inquiry. Quora hub is a cooperative stage where clients can alter and refine answers and add sub-strings and so forth. Quora hub flourishes with less advertisements and supported content and is additionally taking a gander at approaches to boost makers who contribute fundamentally to the stage, have high casted a ballot answers and devotees.
Clients of the Quora Hub stage:
1) Any client who posts arbitrary inquiries
2) Creator who gives replies to the inquiries
3) Collaborators who adds to an offered response and improve it
4) Viewers who simply consume the substance, read through Q&A
Significant level issue proclamation on why the substance proposal is basic for Quora Hub development:
1) Unlike other virtual entertainment or joint effort stages, Quora has fewer triggers to bring the clients (watchers) back to its site.
2) There is plenty of data accessible on Quora and frequently irregular substance is displayed to the client (watchers) that doesn't connect with them to invest more energy perusing Quora Hub.
Presently I will list down a couple of item upgrades for Quora Hub to work on satisfied proposal for the substance watchers over email (those are the presumption I made to start with):
1) Create a client profile in light of their past visits, perusing history, click throughs, and so forth, and distinguish the main 5 areas of interest for the client. send prescribed content to the client through day to day messages and enhance the client profile in view of Ctr's.
2) Bookmark Q&A that client has perused previously and make a chart on comparative inquiries that could bear some significance with them and suggest.
3) If the client has seen settled content i.e saw the top of the line reply as well as perused different responses, add more weightage to these points and prescribe content to the client.
4) If the client has unequivocally picked points that they are keen on the Quora Hub application, then, at that point, send them the top-cast a ballot replies across those subjects as a feature of the everyday recommender.
5) Crawler channel: Capture questions that clients have asked on web search tools or different destinations and suggest answers that have been presented on Quora Hub significantly on their inquiries.
6) Add a segment for proposals from companions. At the point when a client sees 5 presents that are suggested on them by somebody they know, there is a higher opportunity of a client navigating and coincidentally finding a pearl that they didn't know was out there. They are bound to prescribe content to others in their organisation consequently setting off viral reception.
Millions of people search for answers on the web and millions write answers on Quora Hub, every week. People trust us because we provide authentic answers from people who really understand the issue and have first-hand knowledge.
• Ethan White
• May 13 2022
• Attach files
|
{
"url": "https://clearpassweb.ideas.aha.io/ideas/CPW-I-8934",
"source_domain": "clearpassweb.ideas.aha.io",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "20533",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:HD3SGLAPHRRAFHWF5WVJ7OAHVE7WUOLS",
"WARC-Concurrent-To": "<urn:uuid:1c270cb1-0654-406f-b675-b89d697d1564>",
"WARC-Date": "2022-05-28T20:18:43Z",
"WARC-IP-Address": "23.22.45.22",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ULYGTJTHSWTRGD3HJDCJZUKMYH4GKQVM",
"WARC-Record-ID": "<urn:uuid:67e51bd3-0d49-410b-a652-b6f1c168716c>",
"WARC-Target-URI": "https://clearpassweb.ideas.aha.io/ideas/CPW-I-8934",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0db1cb2c-ddf8-410d-b7a3-8b89d1db13e1>"
},
"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-24\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,
27,
28,
71,
72,
623,
624,
656,
657,
658,
702,
703,
749,
750,
814,
815,
877,
878,
879,
982,
983,
984,
1121,
1122,
1123,
1316,
1317,
1318,
1503,
1504,
1505,
1787,
1788,
1789,
1939,
1940,
1941,
2129,
2130,
2131,
2354,
2355,
2356,
2556,
2557,
2558,
2934,
2935,
3165,
3166,
3182,
3198
],
"line_end_idx": [
27,
28,
71,
72,
623,
624,
656,
657,
658,
702,
703,
749,
750,
814,
815,
877,
878,
879,
982,
983,
984,
1121,
1122,
1123,
1316,
1317,
1318,
1503,
1504,
1505,
1787,
1788,
1789,
1939,
1940,
1941,
2129,
2130,
2131,
2354,
2355,
2356,
2556,
2557,
2558,
2934,
2935,
3165,
3166,
3182,
3198,
3214
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3214,
"ccnet_original_nlines": 51,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.38971808552742004,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014925369992852211,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.13598673045635223,
"rps_doc_frac_unique_words": 0.5075471997261047,
"rps_doc_mean_word_length": 4.875471591949463,
"rps_doc_num_sentences": 19,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.103039264678955,
"rps_doc_word_count": 530,
"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.03405572846531868,
"rps_doc_frac_chars_top_3gram": 0.012770899571478367,
"rps_doc_frac_chars_top_4gram": 0.00851393025368452,
"rps_doc_books_importance": -313.1946716308594,
"rps_doc_books_importance_length_correction": -313.1946716308594,
"rps_doc_openwebtext_importance": -172.47862243652344,
"rps_doc_openwebtext_importance_length_correction": -172.47862243652344,
"rps_doc_wikipedia_importance": -94.50541687011719,
"rps_doc_wikipedia_importance_length_correction": -94.50541687011719
},
"fasttext": {
"dclm": 0.07579504698514938,
"english": 0.9418953061103821,
"fineweb_edu_approx": 0.9963338375091553,
"eai_general_math": 0.04939771071076393,
"eai_open_web_math": 0.07134026288986206,
"eai_web_code": 0.0510137714445591
}
}
|
{
"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": "-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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
787,084,949,221,975,800 |
Artículos
PHP
Saltos de línea en PHP
21/Mar/2020
Un artículo sencillo que tenía por ahí guardado desde hace bastante tiempo y que seguro que sirve a aquellos que estáis empezando con PHP es saber cómo se ponen los saltos de línea en PHP. Ya que seguro que cuando estáis mostrando vuestros primero resultados por consola os salen todos juntos y son difíciles de leer o interpretar.
Si eres una persona que tiene un conocimiento medio o avanzado del lenguaje de programación PHP seguro que este ejemplo le parece una obviedad o simplemente de poca utilidad. Si bien piensa que tú tuviste un momento en el que empezaste a aprender a programar con PHP y seguro que más de una vez te asalto esta duda. Así que respeta a los que dan sus primero pasos con PHP y ayúdalos con ello.
Pues vamos a ello. Lo primero que tenemos que hacer en nuestro programa PHP será crear una salida por consola mediante la función echo.
echo "Soy una línea.";
Podríamos pensar que al poner otra vez la función echo dentro de nuestro código lo que sucedería es que nos generaría un salto de línea.
echo "Soy una línea.";
echo "Soy otra línea.";
Si bien, lo que sucede es que por consola veremos los dos textos seguidos.
Soy una línea.Soy otra línea.
Si queremos meter saltos de línea lo que deberemos de hacer es utilizar el carácter \n dentro de la cadena de texto. De esta manera cuando el compilador se encuentre el carácter \n generará automáticamente un salto de línea por consola.
Así nuestro código en PHP quedará de la siguiente forma:
echo "Soy una línea.\n";
echo "Soy otra línea.\n";
De esta forma la salida por consola será:
Soy una línea.
Soy otra línea.
El carácter \n se puede utilizar en cualquier parte de la cadena de texto. No solo tiene porqué ir al final de la cadena. Es por ello que el mismo efecto que lo que habíamos conseguido hasta ahora lo tendríamos con el siguiente código en PHP:
echo "Soy una línea de código.\nSoy otra línea de código";
Con esto ya sabes cómo puedes crear saltos de línea en PHP cuando estés dando tus primeros pasos con este lenguaje.
Código Fuente
Descárgate el código fuente de Saltos de línea en PHP
Y si te ha gustado nuestro código fuente puedes regalarnos una estrella Star
Saltos de línea en PHP
Suscribir
Notificar de
guest
11 Comentarios
Recientes
Anteriores Más votados
Opiniones integradas
Ver todos los comentarios
|
{
"url": "https://lineadecodigo.com/php/saltos-de-linea-en-php/",
"source_domain": "lineadecodigo.com",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "299062",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MQAJ5I3SXR63WAANM6A5DRGL5XTLIQ3N",
"WARC-Concurrent-To": "<urn:uuid:dc482d64-c7d0-49e3-9a51-fda76a934da0>",
"WARC-Date": "2024-07-22T07:41:02Z",
"WARC-IP-Address": "172.67.188.229",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:YBD7L7MZRYDMWD4UGICVLXKKW6BT6U6R",
"WARC-Record-ID": "<urn:uuid:f685955f-7709-4b34-b637-1daa7c25ef0a>",
"WARC-Target-URI": "https://lineadecodigo.com/php/saltos-de-linea-en-php/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:8d9c085a-c767-49c3-9ae2-88641f70afdc>"
},
"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,
10,
14,
15,
38,
39,
51,
52,
384,
385,
778,
779,
915,
916,
939,
940,
1077,
1078,
1101,
1125,
1126,
1201,
1202,
1232,
1233,
1470,
1471,
1528,
1529,
1554,
1580,
1581,
1623,
1624,
1639,
1655,
1656,
1899,
1900,
1959,
1960,
2076,
2077,
2091,
2092,
2146,
2223,
2246,
2256,
2269,
2275,
2290,
2300,
2323,
2344
],
"line_end_idx": [
10,
14,
15,
38,
39,
51,
52,
384,
385,
778,
779,
915,
916,
939,
940,
1077,
1078,
1101,
1125,
1126,
1201,
1202,
1232,
1233,
1470,
1471,
1528,
1529,
1554,
1580,
1581,
1623,
1624,
1639,
1655,
1656,
1899,
1900,
1959,
1960,
2076,
2077,
2091,
2092,
2146,
2223,
2246,
2256,
2269,
2275,
2290,
2300,
2323,
2344,
2369
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2369,
"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.09698276221752167,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.030172409489750862,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.09698276221752167,
"rps_doc_frac_unique_words": 0.4326923191547394,
"rps_doc_mean_word_length": 4.665865421295166,
"rps_doc_num_sentences": 25,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.673548698425293,
"rps_doc_word_count": 416,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06646058708429337,
"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.03297268971800804,
"rps_doc_frac_chars_top_3gram": 0.04327666014432907,
"rps_doc_frac_chars_top_4gram": 0.04121587052941322,
"rps_doc_books_importance": -238.18588256835938,
"rps_doc_books_importance_length_correction": -238.18588256835938,
"rps_doc_openwebtext_importance": -127.64482116699219,
"rps_doc_openwebtext_importance_length_correction": -127.64482116699219,
"rps_doc_wikipedia_importance": -115.61589050292969,
"rps_doc_wikipedia_importance_length_correction": -115.61589050292969
},
"fasttext": {
"dclm": 0.8185941576957703,
"english": 0.00015424999583046883,
"fineweb_edu_approx": 1.3120384216308594,
"eai_general_math": 0.0001025200035655871,
"eai_open_web_math": 0.7293089032173157,
"eai_web_code": 0.8120010495185852
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,534,531,255,651,882,500 |
Sale ends in
days : hours : min : sec
🎈Switch to a yearly subscription and save 10% for a year!
Embed COVID-19 Popup AWeber app on Your Website
Add a AWeber COVID-19 Popup app to your website without coding or headaches.
Get Started for Free
Add COVID-19 Popup to AWeber
You've made great strides in creating your business online by starting a AWeber website. Congrats!
Your work isn't done yet though! Now it's time to attract and engage visitors and convert them into customers. You're competing, up against business both large and small, vying, competing for the limited attention of website visitors and future customers. People are overwhelmed online with advertising, social media, and many other things. How will you attract customers online?
Web professionals often recommend a AWeber COVID-19 Popup app as the most practical practice to drive online engagement, get more leads, and increase sales.
Add COVID-19 Popup to AWeber
People often ask a 'techie' friend to develop COVID-19 Popup for them or hire a 'web guy' that one of their friends has referred.
Others look overseas or for cheap open source alternatives for COVID-19 Popup.
These seemingly cheap approaches result in a poor quality COVID-19 Popup for their aweber site because they often offer little, if any, support and require some coding knowledge. One thing that often gets missed is the COVID-19 Popup isn't truly made to be responsive, even if it claims to be. This means that while it might look not bad on your website on a desktop computer, it can appear distorted or may not even appear at all if someone visits your site from a tablet or a mobile phone.
Furthermore, customizing these apps generally requires coding knowledge or another designer to update it for you, actually costing you more resources overall.
In a world where sites are often exploited by scammers, many of these apps aren't built with security in mind, which could take your site down, or worse, turn your customers information over to malicious hackers.
Not to mention making sure your COVID-19 Popup can handle any increases in traffic that might occur, which could overtime cause an increase in load time and display issues with your COVID-19 Popup. Could you imagine having a surge in traffic to your aweber site but your visitors not able to see or make use of your {{{app_name))?
As you can see, as web technoligies evolve, hiring a 'web guy' and other custom homegrown solutions to COVID-19 Popup app to your aweber site would only become ineffective and expensive.
Add COVID-19 Popup to AWeber
This is why POWR's COVID-19 Popup is the reliable solution for top businesses.
Firstly, POWR's COVID-19 Popup is simple to set up without using any code. The POWR editor gives you the capability to make fast and live updates to your COVID-19 Popup app.
POWR supports high-volume sites and prioritizes security of all 60 + POWR apps to keep any malicious players at bay.
Easily Customizable
Fonts, colors, spacing, borders and so much more can be modified with a few simple clicks. Your COVID-19 Popup will then automatically work correctly from no matter what device your visitors are viewing your aweber site.
No Coding Required
Paste it directly on your AWeber website
Mobile Responsive
COVID-19 Popup easily functions on every device.
Add COVID-19 Popup to AWeber
Any urgent question you have can be answered by searching POWR's help center or reaching out to our customer support, which is available 24/7.
Our COVID-19 Popup comes with a team of expert engineers that work constantly for you, making sure your COVID-19 Popup is always working flawlessly.
How To Embed a COVID-19 Popup On Your AWeber Website:
1. Create your COVID-19 Popup
2. Copy code below
3. Embed COVID-19 Popup to your AWeber message
4. Preview & Test your COVID-19 Popup!
Get Started for Free
POWR also has great, proven results. Even more, case studies have demonstrated that POWR COVID-19 Popup boosts conversions by a mindblowing 30%!
1,200,348
COVID-19 Popup Installations
8,230,145
PLUGINS ON WEBSITES
Ready to try it? Great! You can start using POWR's COVID-19 Popup with a free plan without even creating an account. Develop with a POWR COVID-19 Popup or over 60 other state of the art apps designed for online aweber businesses.
The Best COVID-19 Popup AWeber app
Embedding a COVID-19 Popup app onto your AWeber site has never been easier. POWR, the leading website plugin library, has a free AWeber COVID-19 Popup template that is designed to work flawlessly on AWeber. Create your customized COVID-19 Popup AWeber app, match your website's style and colors, and add a COVID-19 Popup to your AWeber page, post, sidebar, footer, or wherever you like on your site. Try the free COVID-19 Popup plugin today and upgrade at any time to unlock advanced features.
POWR apps are a great way to add tons of new features to AWeber websites. The COVID-19 Popup app is just one example of a library of apps that are easy to install with step-by-step instructions, or use the AWeber COVID-19 Popup embed code. Check out all of the options in the POWR app library or consider subscribing to POWR Business which gives you the full access to the entire suite, including the COVID-19 Popup app!
About POWR
POWR is the leading website App library with 60+ award-winning Apps. The custom AWeber COVID-19 Popup App is cloud-based, so you can embed it on multiple pages and websites. POWR COVID-19 Popup AWeber App is free to use, mobile responsive, and easy to edit, with no code required. Get instant access to 60+ POWR Apps for your AWeber site, such as Social Media Feeds, Instagram Feeds, Pop Ups, Contact Form Builder, Countdown Timers, FAQ Accordion, Gallery, Slideshows, Lookbook, and more for stellar landing page conversion and customer service. POWR apps integrate with many platforms such as Mailchimp, YouTube, Vimeo, Facebook, Instagram, Twitter, Pinterest, and more!
|
{
"url": "https://www.powr.io/tutorials/how-to-add-covid-19-popup-app-to-your-aweber-site",
"source_domain": "www.powr.io",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "232891",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:XUMGABM2SEMCZSXES5OMJJPLKPDNEXC5",
"WARC-Concurrent-To": "<urn:uuid:0af4acf4-cdbd-42ac-9beb-c92408dd9cab>",
"WARC-Date": "2021-05-08T07:55:57Z",
"WARC-IP-Address": "104.22.50.245",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:X5L7RU6ROCMKQQBO75W2YRPBGB7XAJBT",
"WARC-Record-ID": "<urn:uuid:bf2be463-a9ce-49b5-a5dc-9d637ec4b78b>",
"WARC-Target-URI": "https://www.powr.io/tutorials/how-to-add-covid-19-popup-app-to-your-aweber-site",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b1e54eab-5e2f-440d-b26c-ae6362614a62>"
},
"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-81.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
13,
38,
96,
97,
145,
146,
223,
224,
245,
274,
275,
374,
375,
755,
756,
913,
914,
943,
944,
1074,
1075,
1154,
1155,
1647,
1648,
1807,
1808,
2021,
2022,
2353,
2354,
2541,
2542,
2571,
2572,
2651,
2652,
2826,
2827,
2944,
2945,
2965,
2966,
3187,
3188,
3207,
3208,
3249,
3250,
3268,
3269,
3318,
3319,
3348,
3349,
3492,
3493,
3642,
3643,
3697,
3698,
3730,
3751,
3800,
3841,
3862,
3863,
4008,
4009,
4019,
4020,
4049,
4050,
4060,
4061,
4081,
4082,
4312,
4313,
4348,
4349,
4843,
4844,
5265,
5266,
5277,
5278
],
"line_end_idx": [
13,
38,
96,
97,
145,
146,
223,
224,
245,
274,
275,
374,
375,
755,
756,
913,
914,
943,
944,
1074,
1075,
1154,
1155,
1647,
1648,
1807,
1808,
2021,
2022,
2353,
2354,
2541,
2542,
2571,
2572,
2651,
2652,
2826,
2827,
2944,
2945,
2965,
2966,
3187,
3188,
3207,
3208,
3249,
3250,
3268,
3269,
3318,
3319,
3348,
3349,
3492,
3493,
3642,
3643,
3697,
3698,
3730,
3751,
3800,
3841,
3862,
3863,
4008,
4009,
4019,
4020,
4049,
4050,
4060,
4061,
4081,
4082,
4312,
4313,
4348,
4349,
4843,
4844,
5265,
5266,
5277,
5278,
5949
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5949,
"ccnet_original_nlines": 87,
"rps_doc_curly_bracket": 0.0005042899865657091,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3360455632209778,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.051261190325021744,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2009764015674591,
"rps_doc_frac_unique_words": 0.4157303273677826,
"rps_doc_mean_word_length": 4.825332164764404,
"rps_doc_num_sentences": 52,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.3050408363342285,
"rps_doc_word_count": 979,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.055673159658908844,
"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.10160881280899048,
"rps_doc_frac_chars_top_3gram": 0.02540219947695732,
"rps_doc_frac_chars_top_4gram": 0.017781540751457214,
"rps_doc_books_importance": -434.01776123046875,
"rps_doc_books_importance_length_correction": -434.01776123046875,
"rps_doc_openwebtext_importance": -285.279541015625,
"rps_doc_openwebtext_importance_length_correction": -285.279541015625,
"rps_doc_wikipedia_importance": -181.76918029785156,
"rps_doc_wikipedia_importance_length_correction": -181.76918029785156
},
"fasttext": {
"dclm": 0.02719968929886818,
"english": 0.9177108407020569,
"fineweb_edu_approx": 1.1248877048492432,
"eai_general_math": 0.001527789980173111,
"eai_open_web_math": 0.03415989875793457,
"eai_web_code": 0.01097411010414362
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "658.85",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Business",
"level_3": "Management"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,775,415,465,267,747,300 |
Thread: What is at address 0?
1. #31
Dump Truck Internet valis's Avatar
Join Date
Jul 2005
Posts
357
and that with RISC instruction sets you are forced to implement these relatively mundane things yourself, at the bit manipulation level.
Thankfully, RISC isn't that low level (I'm not saying all chips provide that functionality, just common ones like PA, mips, etc.). Usually less complex instruction sets have more involvement in things like branching, alignment, cache, and usually memory addressing will be much simpler.
Some good examples of higher level instructions are the string instructions x86 provides--these instructions operate on blocks of data usually pointed to by esi and edi and the direction to move (back or forward) from the addresses given is selected with the direction flag.
Modern x86 chips actually break instructions up into smaller instructions called microcode which are pretty low level.
2. #32
The superhaterodyne twomers's Avatar
Join Date
Dec 2005
Location
Ireland
Posts
2,273
Kinda unrelated, but someone mentioned 'chips', so I thought I'd post this
Popular pages Recent additions subscribe to a feed
Similar Threads
1. What does this do (Windows API)?
By EVOEx in forum Windows Programming
Replies: 4
Last Post: 12-19-2008, 09:48 AM
2. Writing array, to file
By zootreeves in forum C Programming
Replies: 9
Last Post: 09-08-2007, 05:06 PM
3. I thought pointers were pointers...
By keira in forum C Programming
Replies: 19
Last Post: 08-15-2007, 11:48 PM
4. DX - CreateDevice - D3DERR_INVALIDCALL
By Tonto in forum Game Programming
Replies: 3
Last Post: 12-01-2006, 06:17 PM
5. pointers
By InvariantLoop in forum C Programming
Replies: 13
Last Post: 02-04-2005, 08:32 AM
|
{
"url": "http://cboard.cprogramming.com/a-brief-history-of-cprogramming-com/80916-what-address-0-a-3.html",
"source_domain": "cboard.cprogramming.com",
"snapshot_id": "crawl=CC-MAIN-2016-44",
"warc_metadata": {
"Content-Length": "48826",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4GDDU4X3SRQVT4GUDLVFMDHHBXUGF7KI",
"WARC-Concurrent-To": "<urn:uuid:0cddfdea-10dd-4190-a226-5bd90b1f07c9>",
"WARC-Date": "2016-10-23T20:30:39Z",
"WARC-IP-Address": "76.74.254.184",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:ATDYA6YJCXC2LW24U4JB5J42XAEIJ2VE",
"WARC-Record-ID": "<urn:uuid:bb131bd4-69ed-4e38-9b64-78884e0318b2>",
"WARC-Target-URI": "http://cboard.cprogramming.com/a-brief-history-of-cprogramming-com/80916-what-address-0-a-3.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:05c894e6-b58c-4330-8325-a93c6b9dfaff>"
},
"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,
30,
31,
40,
79,
93,
106,
116,
124,
265,
556,
835,
836,
959,
960,
969,
1010,
1024,
1037,
1050,
1062,
1072,
1082,
1161,
1162,
1213,
1214,
1230,
1231,
1269,
1311,
1326,
1362,
1390,
1431,
1446,
1482,
1523,
1559,
1575,
1611,
1655,
1694,
1709,
1745,
1759,
1803,
1819
],
"line_end_idx": [
30,
31,
40,
79,
93,
106,
116,
124,
265,
556,
835,
836,
959,
960,
969,
1010,
1024,
1037,
1050,
1062,
1072,
1082,
1161,
1162,
1213,
1214,
1230,
1231,
1269,
1311,
1326,
1362,
1390,
1431,
1446,
1482,
1523,
1559,
1575,
1611,
1655,
1694,
1709,
1745,
1759,
1803,
1819,
1854
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1854,
"ccnet_original_nlines": 47,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.21703296899795532,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.049450550228357315,
"rps_doc_frac_lines_end_with_ellipsis": 0.02083333022892475,
"rps_doc_frac_no_alph_words": 0.3241758346557617,
"rps_doc_frac_unique_words": 0.6617100238800049,
"rps_doc_mean_word_length": 5.037174701690674,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0.008241759613156319,
"rps_doc_unigram_entropy": 4.989222526550293,
"rps_doc_word_count": 269,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05756457895040512,
"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.025830259546637535,
"rps_doc_frac_chars_top_3gram": 0.017712179571390152,
"rps_doc_frac_chars_top_4gram": 0.04206642135977745,
"rps_doc_books_importance": -172.94427490234375,
"rps_doc_books_importance_length_correction": -172.78318786621094,
"rps_doc_openwebtext_importance": -72.63529205322266,
"rps_doc_openwebtext_importance_length_correction": -72.63529205322266,
"rps_doc_wikipedia_importance": -51.59447479248047,
"rps_doc_wikipedia_importance_length_correction": -51.59435272216797
},
"fasttext": {
"dclm": 0.19592124223709106,
"english": 0.889008104801178,
"fineweb_edu_approx": 2.960871458053589,
"eai_general_math": 0.0015997899463400245,
"eai_open_web_math": 0.3656635284423828,
"eai_web_code": -0.000008820000402920414
}
}
|
{
"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": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,459,631,344,174,383,000 |
Monday, June 23, 2008
Automating user input for GUI programs in Java - How?
How can you automate user input for GUI programs in Java?
How to automate GUI programs in Java? Or, How to automate User Inputs from KeyBoard/Mouse for an AWT or Swing based GUI application?
Suppose we want to create a small GUI based demo application which requires automated user input events (which we would have provided by using Keyboard/Mouse). JDK 1.3 introduced a new class named java.awt.Robot, which can be used to automate user input events. We can programmatically create equivalent of user input events by using this class.
This Robot class is primarily used for automated testing of Java platform implementations. This class ctually generates native system instructions for the user events and the execution of these instructions give the end users the same look and feel (and affect as well) what they get by using Keyboard/Mouse for the corresponding actions. For example: the method 'void mouseMove(int x, int y)' of the Robot class when called will not only generate the corresponding mouse move user input event, but it will also move the mouse cursor to the specified co-ordinates.
As we have just discussed that the method calls of this Root class actually results into the corresponding set of native system instructions and hence the platforms which don't allow such low-level input control with the current configuraions and privileges then we'll get an AWTException while trying to instantiate Robot objects.
Example: sample code snippet to use this Robot class
...
Robot robot = new Robot();
//... storing some key strokes
int keyInput[] ={KeyEvent.VK_A,KeyEvent.VK_B,...KeyEvent.VK_F};
//... a delay of 2 seconds
robot.delay(2000);
...
//... pressing SHIFT for Capital Letter entry
robot.keyPress(KeyEvent.VK_SHIFT);
...
//...pressing one of the input keys from the array
robot.keyPress(keyInput[1]);
...
//... releasing any key (say SHIFT) & pressing the ENTER key
robot.keyRelease(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_ENTER);
...
We can easily observe that for all possible user input events we can easily build the corresponding set of statements using the methods of this Robot class.
Share/Save/Bookmark
No comments:
|
{
"url": "http://geekexplains.blogspot.com/2008/06/automating-user-input-for-gui-programs.html",
"source_domain": "geekexplains.blogspot.com",
"snapshot_id": "crawl=CC-MAIN-2014-23",
"warc_metadata": {
"Content-Length": "89671",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KI4555PGCJQUKMMD5BLFJR5LP4C4WCTW",
"WARC-Concurrent-To": "<urn:uuid:1672a7b7-7e9b-4342-bf7a-e04daa50c1c8>",
"WARC-Date": "2014-07-25T06:43:37Z",
"WARC-IP-Address": "74.125.228.11",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:RAUZGSKGV5FBZCMINHBCOH2SUBY3YYNB",
"WARC-Record-ID": "<urn:uuid:6d627d90-51a1-4274-b49f-0d3bfae6fea6>",
"WARC-Target-URI": "http://geekexplains.blogspot.com/2008/06/automating-user-input-for-gui-programs.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5727cd40-e5f1-4967-85b2-bc9fc37bb615>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-33-131-23.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,
22,
23,
77,
78,
79,
137,
138,
139,
272,
273,
274,
620,
621,
622,
1187,
1188,
1189,
1521,
1522,
1523,
1576,
1577,
1581,
1582,
1609,
1610,
1641,
1642,
1706,
1707,
1708,
1735,
1736,
1755,
1756,
1760,
1761,
1762,
1808,
1809,
1844,
1845,
1849,
1850,
1851,
1902,
1903,
1932,
1933,
1937,
1938,
1939,
2000,
2001,
2038,
2039,
2074,
2075,
2079,
2080,
2081,
2238,
2239,
2240,
2241,
2261,
2262,
2263,
2276,
2277
],
"line_end_idx": [
22,
23,
77,
78,
79,
137,
138,
139,
272,
273,
274,
620,
621,
622,
1187,
1188,
1189,
1521,
1522,
1523,
1576,
1577,
1581,
1582,
1609,
1610,
1641,
1642,
1706,
1707,
1708,
1735,
1736,
1755,
1756,
1760,
1761,
1762,
1808,
1809,
1844,
1845,
1849,
1850,
1851,
1902,
1903,
1932,
1933,
1937,
1938,
1939,
2000,
2001,
2038,
2039,
2074,
2075,
2079,
2080,
2081,
2238,
2239,
2240,
2241,
2261,
2262,
2263,
2276,
2277,
2278
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2278,
"ccnet_original_nlines": 70,
"rps_doc_curly_bracket": 0.0008779600029811263,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3212669789791107,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03619910031557083,
"rps_doc_frac_lines_end_with_ellipsis": 0.07042253762483597,
"rps_doc_frac_no_alph_words": 0.20135746896266937,
"rps_doc_frac_unique_words": 0.5243902206420898,
"rps_doc_mean_word_length": 5.368902206420898,
"rps_doc_num_sentences": 35,
"rps_doc_symbol_to_word_ratio": 0.024886880069971085,
"rps_doc_unigram_entropy": 4.777243137359619,
"rps_doc_word_count": 328,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05905735120177269,
"rps_doc_frac_chars_dupe_6grams": 0.03634298965334892,
"rps_doc_frac_chars_dupe_7grams": 0.03634298965334892,
"rps_doc_frac_chars_dupe_8grams": 0.03634298965334892,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03577512875199318,
"rps_doc_frac_chars_top_3gram": 0.03407154977321625,
"rps_doc_frac_chars_top_4gram": 0.02896082028746605,
"rps_doc_books_importance": -216.02651977539062,
"rps_doc_books_importance_length_correction": -216.02651977539062,
"rps_doc_openwebtext_importance": -133.8959197998047,
"rps_doc_openwebtext_importance_length_correction": -133.8959197998047,
"rps_doc_wikipedia_importance": -106.61504364013672,
"rps_doc_wikipedia_importance_length_correction": -106.61504364013672
},
"fasttext": {
"dclm": 0.2724270820617676,
"english": 0.8541094660758972,
"fineweb_edu_approx": 2.2235727310180664,
"eai_general_math": 0.9272609353065491,
"eai_open_web_math": 0.1928125023841858,
"eai_web_code": 0.956726610660553
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,415,937,353,448,321,000 |
DMG logo PMML 4.4 - General Structure
PMML4.4 Menu
Home
Changes
XML Schema
Conformance
Interoperability
General Structure
Field Scope
Header
Data
Dictionary
Mining
Schema
Transformations
Statistics
Taxomony
Targets
Output
Functions
Built-in Functions
Model Verification
Model Explanation
Multiple Models
Anomaly Detection
Models
Association Rules
Baseline Models
Bayesian Network
Cluster
Models
Gaussian
Process
General
Regression
k-Nearest
Neighbors
Naive
Bayes
Neural
Network
Regression
Ruleset
Scorecard
Sequences
Text Models
Time Series
Trees
Vector Machine
PMML 4.4 - General Structure
For Time Series models, please see the Notice of Essential Claims.
PMML uses XML to represent mining models. The structure of the models is described by an XML Schema. One or more mining models can be contained in a PMML document. A PMML document is an XML document with a root element of type PMML. The general structure of a PMML document is:
<?xml version="1.0"?>
<PMML version="4.4"
xmlns="http://www.dmg.org/PMML-4_4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header copyright="Example.com"/>
<DataDictionary> ... </DataDictionary>
... a model ...
</PMML>
The namespaces in the PMML Schema itself are defined as:
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.dmg.org/PMML-4_4"
xmlns="http://www.dmg.org/PMML-4_4"
elementFormDefault="unqualified">
Note that because of the namespace declaration in its current form, PMML cannot be mixed with content of a different namespace.
Although a PMML document must be valid with respect to the PMML XSD, a document must not require a validating parser, which would load external entities. In addition to being a valid XML document, a valid PMML document must obey a number of further rules which are described at various places in the PMML specification. See also the conformance rules for valid PMML documents, producers, and consumers.
The root element of a PMML document must have type PMML.
<xs:element name="PMML">
<xs:complexType>
<xs:sequence>
<xs:element ref="Header"/>
<xs:element ref="MiningBuildTask" minOccurs="0"/>
<xs:element ref="DataDictionary"/>
<xs:element ref="TransformationDictionary" minOccurs="0"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="MODEL-ELEMENT"/>
</xs:sequence>
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="version" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:group name="MODEL-ELEMENT">
<xs:choice>
<xs:element ref="AnomalyDetectionModel"/>
<xs:element ref="AssociationModel"/>
<xs:element ref="BayesianNetworkModel"/>
<xs:element ref="BaselineModel"/>
<xs:element ref="ClusteringModel"/>
<xs:element ref="GaussianProcessModel"/>
<xs:element ref="GeneralRegressionModel"/>
<xs:element ref="MiningModel"/>
<xs:element ref="NaiveBayesModel"/>
<xs:element ref="NearestNeighborModel"/>
<xs:element ref="NeuralNetwork"/>
<xs:element ref="RegressionModel"/>
<xs:element ref="RuleSetModel"/>
<xs:element ref="SequenceModel"/>
<xs:element ref="Scorecard"/>
<xs:element ref="SupportVectorMachineModel"/>
<xs:element ref="TextModel"/>
<xs:element ref="TimeSeriesModel"/>
<xs:element ref="TreeModel"/>
</xs:choice>
</xs:group>
A PMML document can contain more than one model. If the application system provides a means of selecting models by name and if the PMML consumer specifies a model name, then that model is used; otherwise the first model is used.
A PMML compliant system is not required to provide model selection by name.
The list of mining models in a PMML document may even be empty. The document can be used to carry the initial metadata before an actual model is computed. A PMML document containing no model is not meant to be useful for a PMML consumer.
For PMML 4.3 the attribute version must have the value 4.3
The element MiningBuildTask can contain any XML value describing the configuration of the training run that produced the model instance. This information is not directly needed by a PMML consumer, but in many cases it is helpful for maintenance and visualization of the model. The particular content structure of MiningBuildTask is not defined by PMML. Though, this element would be the natural container for task specifications as defined by other mining standards, e.g., in SQL or Java.
<xs:element name="MiningBuildTask">
<xs:complexType>
<xs:sequence>
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
In general, field names in PMML should be unique. Avoiding name duplication is a good practice since it makes life easier for consumers and, with few exceptions, certain field names cannot be duplicated under any circumstances (e.g., DerivedFields in the TransformationDictionary). For more information on field names, see Scope of Fields.
Certain types of PMML models such as neural networks or logistic regression can be used for different purposes. That is, some instances implement prediction of numeric values, while others can be used for classification. Therefore, PMML defines several different mining functions. Each model has an attribute functionName which specifies the mining function.
<xs:simpleType name="MINING-FUNCTION">
<xs:restriction base="xs:string">
<xs:enumeration value="associationRules"/>
<xs:enumeration value="sequences"/>
<xs:enumeration value="classification"/>
<xs:enumeration value="regression"/>
<xs:enumeration value="clustering"/>
<xs:enumeration value="timeSeries"/>
<xs:enumeration value="mixed"/>
</xs:restriction>
</xs:simpleType>
For all PMML models the structure of the top-level model element is similar to the template of ExampleModel as below
<xs:element name="ExampleModel">
<xs:complexType>
<xs:sequence>
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="MiningSchema"/>
<xs:element ref="Output" minOccurs="0"/>
<xs:element ref="ModelStats" minOccurs="0"/>
<xs:element ref="Targets" minOccurs="0"/>
<xs:element ref="LocalTransformations" minOccurs="0" />
...
<xs:element ref="ModelVerification" minOccurs="0"/>
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="modelName" type="xs:string" use="optional"/>
<xs:attribute name="functionName" type="MINING-FUNCTION" use="required"/>
<xs:attribute name="algorithmName" type="xs:string" use="optional"/>
<xs:attribute name="isScorable" type="xs:boolean" default="true"/>
</xs:complexType>
</xs:element>
A non-empty list of mining fields defines a mining schema. The output element gives a list of result values and internal results such as confidences or probabilities that can be computed by the model. The univariate statistics contain global statistics on (a subset of the) mining fields. The targets section holds more information on the target values and accompanying information like prior probabilities, optypes and the like. LocalTransformations holds derived fields that are local to the model. Other model specific elements follow after that, in the content of ExampleModel. Finally, the ModelVerification part gives sample data and results of the model so consumers can instantly validate.
For a list of models that have been defined in PMML 4.3 see the element PMML above.
modelName: the value in modelName identifies the model with a unique name in the context of the PMML file. This attribute is not required. Consumers of PMML models are free to manage the names of the models at their discretion.
functionName and algorithmName describe the kind of mining model, e.g., whether it is intended to be used for clustering or for classification. The algorithm name is free-type and can be any description for the specific algorithm that produced the model. This attribute is for information only.
Ties
Although rare, it is possible for classification models to identify more than one "winning" outcomes. In these instances, PMML doesn't define a tie-breaking procedure but recommends that the category appearing first in the predictor's DataField be selected.
Naming Conventions
The naming conventions for PMML are:
• Element Names are in mixed case, first uppercase.
• AttributeNames are in mixed case, first lowercase.
• Constants in enumerations are in mixed case, first lowercase.
• SimpleTypes are all uppercase.
Usage of the character '-' is discouraged in order to avoid confusion with mathematical notation.
Extension Mechanism
The PMML schema contains a mechanism for extending the content of a model. Extension elements should be present as the first child in all elements and groups defined in PMML. This way it is possible to place information in the Extension elements which affects how the remaining entries are treated. The main element in each model should have Extension elements as the first and the last child for maximum flexibility.
<xs:element name="Extension">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="extender" type="xs:string" use="optional"/>
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="value" type="xs:string" use="optional"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
These extension elements have a content model of ANY, where vendor specific extension elements can be included. However, element types must start with X-. This convention helps to avoid conflicts with possible future extensions to standard PMML.
Extension also features the attributes name and value to specify single extension attributes, where name will specify the name of the extension attribute and value the respective value.
If a document uses local namespaces, then the name of the namespace should not start with PMML or DMG or any variant of these names with lowercase characters. They are reserved for future use in PMML.
Up to PMML 2.1, extension attributes could be added to all elements in PMML if the prefix x- was used. This mechanism is deprecated, extension elements should be used instead. PMML documents with extension attributes using the old convention are still considered to be valid PMML. However, note that PMML documents containing old-style x- extension attributes will not validate in XML schema, but one can use XSL transformation to remove all x- extension attributes and receive an XML document that will validate.
Examples
An extension attribute format can be added to a DataField like this:
<DataField name="foo" dataType="double" optype="continuous">
<Extension name="format" value="%9.2f"/>
</DataField>
An extension element DataFieldSource can be added to a DataField in the PCDATA section like this:
<DataField name="foo" dataType="double" optype="continuous">
<Extension>
<DataFieldSource sourceKnown="yes">
<Source>derivedFromInput</Source>
</DataFieldSource>
</Extension>
</DataField>
Basic data types and entities
The definition
<xs:simpleType name="NUMBER">
<xs:restriction base="xs:double">
</xs:restriction>
</xs:simpleType>
is commonly used for distinguishing numeric values from other data. Numbers may have a leading sign, fractions, and an exponent. In addition to NUMBER there are a couple of more specific types, they are like subtypes of NUMBER:
<xs:simpleType name="INT-NUMBER">
<xs:restriction base="xs:integer">
</xs:restriction>
</xs:simpleType>
An INT-NUMBER must be an integer, no fractions or exponent.
<xs:simpleType name="REAL-NUMBER">
<xs:restriction base="xs:double">
</xs:restriction>
</xs:simpleType>
A REAL-NUMBER can be any number covered by the C/C++ types float, long or double. Scientific notation, eg., 1.23e4, is allowed. Literals INF, -INF, and NaN are not supported.
PMML uses the character '.' as decimal point in the representation of REAL-NUMBER values.
<xs:simpleType name="PROB-NUMBER">
<xs:restriction base="xs:double">
</xs:restriction>
</xs:simpleType>
A PROB-NUMBER is a REAL-NUMBER between 0.0 and 1.0, usually describing a probability.
<xs:simpleType name="PERCENTAGE-NUMBER">
<xs:restriction base="xs:double">
</xs:restriction>
</xs:simpleType>
A PERCENTAGE-NUMBER is a REAL-NUMBER between 0.0 and 100.0.
Note that these entities do not enforce the XML parser to check the data types. However they still define requirements for a valid PMML document.
Many elements contain references to input fields. PMML does not use IDREF to represent field names because field names are not necessarily valid XML identifiers. However, given the definition
<xs:simpleType name="FIELD-NAME">
<xs:restriction base="xs:string">
</xs:restriction>
</xs:simpleType>
then references to input fields will be obvious from the schema syntax. Note that a model can refer to two kinds of input fields. One is the set of MiningFields in the MiningSchema. The others are the DerivedFields as defined in TransformationDictionary or LocalTransformations. Further note that field names, like all other elements of PMML and in XML in general, are case sensitive.
Plain Arrays of Values
Instances of mining models often contain sets with a large number of values. The type Array is defined as a container structure which implements arrays of numbers and strings in a fairly compact way.
<xs:complexType name="ArrayType" mixed="true">
<xs:attribute name="n" type="INT-NUMBER" use="optional"/>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="int"/>
<xs:enumeration value="real"/>
<xs:enumeration value="string"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:element name="Array" type="ArrayType"/>
The content of Array is a blank separated sequence of values, multiple blanks are as good as one blank. The attribute n determines the number of elements in the sequence. If n is given it must match the number of values in the content, otherwise the PMML document is invalid. The attribute type is required since parsing an array is simpler if the type of the values in the content is specified up-front. This is particularly true for SAX based parsing. In many cases the type of the values is known from the context where the Array appears. But there are also cases where Arrays can be mixed e.g., in the statistics elements. String values may be enclosed within double quotes ", which are not considered to be part of the value. If a string value contains the double quote character " , then it must be escaped by a backslash character \ (that is the same escaping mechanism as used in C/C++).
Example:
<Array n="3" type="int">1 22 3</Array>
<Array n="3" type="string">ab "a b" "with \"quotes\" "</Array>
The second array contains the three strings 'ab', 'a b', and 'with "quotes" '.
Similar to the entities for different types of numbers we define entities for arrays which should have a specific content type. Again, these entities just map to a single XML markup.
<xs:group name="NUM-ARRAY">
<xs:choice>
<xs:element ref="Array"/>
</xs:choice>
</xs:group>
<xs:group name="INT-ARRAY">
<xs:choice>
<xs:element ref="Array"/>
</xs:choice>
</xs:group>
<xs:group name="REAL-ARRAY">
<xs:choice>
<xs:element ref="Array"/>
</xs:choice>
</xs:group>
<xs:group name="STRING-ARRAY">
<xs:choice>
<xs:element ref="Array"/>
</xs:choice>
</xs:group>
A NUM-ARRAY is an array of numbers. The other entities define arrays which contain integers, reals or strings.
Sparse Arrays of Values
A special case of arrays are sparse arrays which only store elements with non-zero values.
<xs:element name="INT-SparseArray">
<xs:complexType>
<xs:sequence>
<xs:element ref="Indices" minOccurs="0"/>
<xs:element ref="INT-Entries" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="n" type="INT-NUMBER" use="optional"/>
<xs:attribute name="defaultValue" type="INT-NUMBER" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="REAL-SparseArray">
<xs:complexType>
<xs:sequence>
<xs:element ref="Indices" minOccurs="0"/>
<xs:element ref="REAL-Entries" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="n" type="INT-NUMBER" use="optional"/>
<xs:attribute name="defaultValue" type="REAL-NUMBER" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="Indices">
<xs:simpleType>
<xs:list itemType="xs:int"/>
</xs:simpleType>
</xs:element>
<xs:element name="INT-Entries">
<xs:simpleType>
<xs:list itemType="xs:int"/>
</xs:simpleType>
</xs:element>
<xs:element name="REAL-Entries">
<xs:simpleType>
<xs:list itemType="xs:double"/>
</xs:simpleType>
</xs:element>
The attribute n specifies the length of the sparse array, which is especially useful in case the last entries are not explicitly specified. defaultValue can be used to specify an arbitrary default value for all positions which are not specified by the two arrays.
The content of SparseArray is two arrays, Indices and INT-Entries or REAL-Entries. In both cases, the length is implicitly implied, and the content is defined by the kind of the sparse array. Indices contains the indices of entries that do not have the defaultValue; the index starts with 1. INT-Entries and REAL-Entries contain the respective values for the indices specified in Indices. Or, to put it another way: The identifiers of the first array correspond to the data values to the second array in the same order. Hence, both arrays, Indices and INT-Entries or REAL-Entries, must have the same length. If both are omitted, then the sparse array has defaultValue for all entries (see second example below). Either both arrays or none must be present - otherwise the PMML is not valid.
Examples:
The array 0 3 0 0 42 0 0 can be written like this:
<INT-SparseArray n="7">
<Indices>2 5</Indices>
<INT-Entries>3 42</INT-Entries>
</INT-SparseArray>
The array 0 0 0 0 0 0 can be written like this:
<INT-SparseArray n="7"/>
Matrix
In order to save space, a matrix can be stored as a diagonal or even sparse matrix.
<xs:element name="Matrix">
<xs:complexType>
<xs:choice minOccurs="0">
<xs:group ref="NUM-ARRAY" maxOccurs="unbounded"/>
<xs:element ref="MatCell" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute name="kind" use="optional" default="any">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="diagonal"/>
<xs:enumeration value="symmetric"/>
<xs:enumeration value="any"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="nbRows" type="INT-NUMBER" use="optional"/>
<xs:attribute name="nbCols" type="INT-NUMBER" use="optional"/>
<xs:attribute name="diagDefault" type="REAL-NUMBER" use="optional"/>
<xs:attribute name="offDiagDefault" type="REAL-NUMBER" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="MatCell">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="row" type="INT-NUMBER" use="required"/>
<xs:attribute name="col" type="INT-NUMBER" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
The matrix is internally represented as a sequence of Arrays or MatCells. If arrays are used, then each array contains elements of one row in the matrix.
On the other hand MatCells contain the numeric value of the cell specified by row and col. Indices for rows and columns start with 1. If a sparse representation is used, diagDefault and/or offDiagDefault must be set to fill in if no value is given for a certain cell.
nbRows and nbCols give the dimensions of the Matrix. If one of them is not specified, the respective dimension is implicitly given by the representation. In case of sparse representation using MatCells, the respective dimension is given by the respective maximum filled entry.
The actual representation is triggered by the kind of the Matrix:
• diagonal: The content is just one array of numbers representing the diagonal values.
• symmetric: The content must be represented by Arrays. The first array contains the matrix element M(0,0), the second array contains M(1,0), M(1,1), and so on (that is the lower left triangle). Other elements are defined by symmetry.
• any: Either specify all values via Arrays, or choose sparse structures using MatCells.
Evaluating a matrix element M(i,j) proceeds as follows:
1. The element is explicitly given, either in a MatCell with row=i and col=j, or in the j-th element of the i-th array of Matrix.
2. The attribute kind of the matrix is symmetric, and the element M(j,i) is explicitly given.
3. A default value is given, either in the attribute diagDefault, or in the attribute offDiagDefault.
4. No value can be calculated at this step. Calculation will be done only if a default behavior or additional information are given at a higher level.
Example:
The matrix
0 0 0 42 0
0 1 0 0 0
5 0 0 0 0
0 0 0 0 7
0 0 9 0 0
can be written in the following ways (non-sparse and sparse representation):
<Matrix nbRows="5" nbCols="5">
<Array type="real">0 0 0 42 0</Array>
<Array type="real">0 1 0 0 0</Array>
<Array type="real">5 0 0 0 0</Array>
<Array type="real">0 0 0 0 7</Array>
<Array type="real">0 0 9 0 0</Array>
</Matrix>
<Matrix diagDefault="0" offDiagDefault="0">
<MatCell row="1" col="4">42</MatCell>
<MatCell row="2" col="2">1</MatCell>
<MatCell row="3" col="1">5</MatCell>
<MatCell row="4" col="5">7</MatCell>
<MatCell row="5" col="3">9</MatCell>
</Matrix>
Non-Scoring Models
Finding a good data mining model is often a process of trial and error. It is not unusual for a data mining algorithm to fail in its attempt generate model that is worthy of deployment. This is especially true during the early exploratory phase of the process, when a wide variety of variables are iteratively tested in search of finding that handful features in the data that can be exploited to meet a specific goal. Or, more fundamentally, most data mining algorithms have requirements must be met in order to operate properly. If, say, there is an insufficient amount of data or if there is a problem within the data, the algorithm may not produce a model at all. Alternatively, many data mining tools include features that will automatically eliminate variables that do not meet a certain criteria or enforce a minimum model quality requirement before allowing a model to be deployed.
PMML includes many features that help users understand the quality of their models, including Statistics and Model Explanation. These descriptive elements are useful for valid models and they can be even more valuable when trying to understand a failed modeling attempt. Ironic as this may seem, there is value in PMML's ability to represent both good and bad models, especially in systems where PMML is the only interface between the module generating the model and the module consuming it. But this also requires that the consumer can tell the difference between PMML that contains a valid model and PMML that should not be used for scoring.
For example, consider the case where all the independent variables for a regression model failed to meet the minimum importance criteria. The usageType of the MiningField for each variable could be set to supplementary instead of active and the producer could include UnivariateStats about each MiningField, statistics that would provide valuable descriptive information about why that variable was eliminated. Alternatively, imagine if the model did not meet some minimum criteria, the producer could include explanatory details in Model Explanation.
In these cases, the producer generating valid PMML would generate a regression model with no independent variables and no intercept, a "y = 0" model. A consumer would have no way of knowing that it should not generate valid scores from such a model. And, if the consumer deployed this model for scoring, its users would have no way of knowing that the 0 scores should not be used.
While PMML does contain a MiningBuildTask element that can be used to describe the results of training, consumers are not required to process this element. In fact, prior to PMML 4.1, there was no way to produce syntactically valid PMML that did not contain a model, and there was no way to tell the consumer not to score that model.
Therefore, in PMML 4.1, an optional attribute isScorable was added to each PMML model element. If this attribute is true (which is the default if this attribute is absent), then the model should be processed normally. However, if the attribute is set to false, then the model producer has indicated that this model is intended for information purposes only and should not be used to generate results. Models with this attribute set to false are called "non-scoring" models.
Producers who only generate models that are valid for scoring are unaffected by this change. But producers that wish to generate PMML that contain a non-scoring model should set this attribute to false as a clear indication that model is not intended for scoring.
Model consumers can choose not to deploy non-scoring models or deploy them only for visualization and not scoring. Alternatively, consumers that deploy for scoring a non-scoring model need to ensure that scoring always generates an invalid result. This should be the same result a model would generate if the model received an unhandled invalid input (an invalid value that is not handled by invalid value treatment, see MiningField for more information about invalidValueTreatment). By definition in PMML, any operation on an invalid input results in an invalid output. Similarly, any non-scoring model must only generate invalid results.
The PMML XSD contains required elements and attributes that must be present for the PMML to be valid, even for non-scoring models. Setting isScorable to false does not eliminate to need to meet XSD requirements in order for PMML to be considered valid. For example, each model element must contain a MiningSchema and there can be additional requirements for each model type (e.g., Regression models must have at least one RegressionTable, Trees must have one Node, etc.). For more details about the XSD requirements for non-scoring models, see the description of the isScorable attribute for each model type.
e-mail info at dmg.org
|
{
"url": "http://dmg.org/pmml/v4-4/GeneralStructure.html",
"source_domain": "dmg.org",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "46230",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TEQCXBPNSNWPOGW4FOECIV7U67ZU7Y4P",
"WARC-Concurrent-To": "<urn:uuid:8e65af9b-c5af-4909-b98b-45e5e080069e>",
"WARC-Date": "2019-08-25T22:01:38Z",
"WARC-IP-Address": "52.216.185.98",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:3QK464RUZUQQUELCBHIFW6QI37SF7J5C",
"WARC-Record-ID": "<urn:uuid:a07635c6-df0e-4faa-b1dd-588b7ba19197>",
"WARC-Target-URI": "http://dmg.org/pmml/v4-4/GeneralStructure.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:628785c1-f589-4843-a00f-e0f3f20b0f6d>"
},
"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-214.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,
38,
51,
52,
57,
58,
66,
67,
78,
79,
91,
92,
109,
110,
128,
129,
141,
142,
149,
150,
155,
166,
167,
168,
175,
182,
183,
184,
200,
201,
212,
213,
222,
223,
231,
232,
239,
240,
250,
251,
270,
271,
290,
291,
309,
310,
326,
327,
345,
352,
353,
354,
372,
373,
389,
390,
407,
408,
416,
423,
424,
425,
434,
442,
443,
444,
452,
463,
464,
465,
475,
485,
486,
487,
493,
499,
500,
501,
508,
516,
517,
518,
529,
530,
538,
539,
549,
550,
560,
561,
573,
574,
586,
587,
593,
594,
609,
610,
639,
640,
707,
708,
986,
987,
1009,
1029,
1068,
1125,
1126,
1162,
1203,
1204,
1222,
1223,
1231,
1232,
1289,
1290,
1303,
1351,
1401,
1441,
1479,
1480,
1608,
1609,
2012,
2013,
2070,
2071,
2096,
2115,
2133,
2166,
2222,
2263,
2328,
2384,
2424,
2445,
2517,
2536,
2603,
2623,
2637,
2638,
2670,
2684,
2730,
2771,
2816,
2854,
2894,
2939,
2986,
3022,
3062,
3107,
3145,
3185,
3222,
3260,
3294,
3344,
3378,
3418,
3452,
3467,
3479,
3480,
3709,
3710,
3786,
3787,
4025,
4026,
4085,
4086,
4575,
4576,
4612,
4631,
4649,
4721,
4740,
4760,
4774,
4775,
5115,
5116,
5475,
5476,
5515,
5551,
5598,
5638,
5683,
5724,
5765,
5806,
5842,
5862,
5879,
5880,
5997,
5998,
6033,
6054,
6074,
6148,
6189,
6238,
6291,
6341,
6405,
6417,
6477,
6551,
6572,
6643,
6723,
6798,
6871,
6893,
6909,
6910,
7608,
7692,
7693,
7921,
7922,
8217,
8218,
8219,
8224,
8225,
8483,
8484,
8485,
8504,
8505,
8542,
8543,
8597,
8652,
8718,
8753,
8851,
8852,
8872,
8873,
9291,
9292,
9322,
9341,
9378,
9419,
9441,
9520,
9544,
9616,
9684,
9753,
9777,
9802,
9822,
9836,
9837,
10083,
10269,
10270,
10471,
10472,
10986,
10987,
10996,
10997,
11066,
11067,
11128,
11171,
11184,
11185,
11283,
11284,
11345,
11359,
11399,
11439,
11462,
11477,
11490,
11491,
11521,
11522,
11537,
11538,
11568,
11604,
11624,
11641,
11642,
11870,
11871,
11905,
11942,
11962,
11979,
11980,
12040,
12041,
12076,
12112,
12132,
12149,
12150,
12325,
12326,
12416,
12417,
12452,
12488,
12508,
12525,
12526,
12612,
12613,
12654,
12690,
12710,
12727,
12728,
12788,
12789,
12935,
12936,
13128,
13129,
13163,
13199,
13219,
13236,
13237,
13622,
13623,
13646,
13647,
13847,
13848,
13895,
13955,
13999,
14019,
14059,
14097,
14136,
14177,
14201,
14222,
14240,
14258,
14259,
14303,
14304,
15200,
15201,
15210,
15211,
15250,
15316,
15317,
15396,
15397,
15580,
15581,
15609,
15623,
15653,
15668,
15680,
15681,
15709,
15723,
15753,
15768,
15780,
15781,
15810,
15824,
15854,
15869,
15881,
15882,
15913,
15927,
15957,
15972,
15984,
15985,
16096,
16097,
16121,
16122,
16213,
16214,
16250,
16269,
16287,
16335,
16387,
16406,
16468,
16553,
16573,
16587,
16588,
16625,
16644,
16662,
16710,
16763,
16782,
16844,
16930,
16950,
16964,
16965,
16993,
17011,
17044,
17063,
17077,
17078,
17110,
17128,
17161,
17180,
17194,
17195,
17228,
17246,
17282,
17301,
17315,
17316,
17580,
18370,
18371,
18381,
18382,
18433,
18434,
18458,
18483,
18517,
18536,
18537,
18585,
18586,
18611,
18612,
18619,
18620,
18704,
18705,
18732,
18751,
18781,
18837,
18893,
18910,
18970,
18992,
19034,
19079,
19125,
19165,
19191,
19214,
19234,
19301,
19368,
19441,
19517,
19537,
19551,
19552,
19580,
19599,
19622,
19660,
19728,
19796,
19818,
19842,
19862,
19876,
19877,
20031,
20299,
20576,
20577,
20643,
20644,
20733,
20970,
21061,
21062,
21118,
21119,
21251,
21347,
21451,
21604,
21613,
21624,
21640,
21656,
21672,
21688,
21704,
21781,
21812,
21852,
21891,
21930,
21969,
22008,
22018,
22062,
22102,
22141,
22180,
22219,
22258,
22268,
22269,
22288,
22289,
23179,
23180,
23824,
23825,
24377,
24378,
24759,
24760,
25094,
25095,
25569,
25570,
25834,
25835,
26475,
26476,
27085,
27086
],
"line_end_idx": [
38,
51,
52,
57,
58,
66,
67,
78,
79,
91,
92,
109,
110,
128,
129,
141,
142,
149,
150,
155,
166,
167,
168,
175,
182,
183,
184,
200,
201,
212,
213,
222,
223,
231,
232,
239,
240,
250,
251,
270,
271,
290,
291,
309,
310,
326,
327,
345,
352,
353,
354,
372,
373,
389,
390,
407,
408,
416,
423,
424,
425,
434,
442,
443,
444,
452,
463,
464,
465,
475,
485,
486,
487,
493,
499,
500,
501,
508,
516,
517,
518,
529,
530,
538,
539,
549,
550,
560,
561,
573,
574,
586,
587,
593,
594,
609,
610,
639,
640,
707,
708,
986,
987,
1009,
1029,
1068,
1125,
1126,
1162,
1203,
1204,
1222,
1223,
1231,
1232,
1289,
1290,
1303,
1351,
1401,
1441,
1479,
1480,
1608,
1609,
2012,
2013,
2070,
2071,
2096,
2115,
2133,
2166,
2222,
2263,
2328,
2384,
2424,
2445,
2517,
2536,
2603,
2623,
2637,
2638,
2670,
2684,
2730,
2771,
2816,
2854,
2894,
2939,
2986,
3022,
3062,
3107,
3145,
3185,
3222,
3260,
3294,
3344,
3378,
3418,
3452,
3467,
3479,
3480,
3709,
3710,
3786,
3787,
4025,
4026,
4085,
4086,
4575,
4576,
4612,
4631,
4649,
4721,
4740,
4760,
4774,
4775,
5115,
5116,
5475,
5476,
5515,
5551,
5598,
5638,
5683,
5724,
5765,
5806,
5842,
5862,
5879,
5880,
5997,
5998,
6033,
6054,
6074,
6148,
6189,
6238,
6291,
6341,
6405,
6417,
6477,
6551,
6572,
6643,
6723,
6798,
6871,
6893,
6909,
6910,
7608,
7692,
7693,
7921,
7922,
8217,
8218,
8219,
8224,
8225,
8483,
8484,
8485,
8504,
8505,
8542,
8543,
8597,
8652,
8718,
8753,
8851,
8852,
8872,
8873,
9291,
9292,
9322,
9341,
9378,
9419,
9441,
9520,
9544,
9616,
9684,
9753,
9777,
9802,
9822,
9836,
9837,
10083,
10269,
10270,
10471,
10472,
10986,
10987,
10996,
10997,
11066,
11067,
11128,
11171,
11184,
11185,
11283,
11284,
11345,
11359,
11399,
11439,
11462,
11477,
11490,
11491,
11521,
11522,
11537,
11538,
11568,
11604,
11624,
11641,
11642,
11870,
11871,
11905,
11942,
11962,
11979,
11980,
12040,
12041,
12076,
12112,
12132,
12149,
12150,
12325,
12326,
12416,
12417,
12452,
12488,
12508,
12525,
12526,
12612,
12613,
12654,
12690,
12710,
12727,
12728,
12788,
12789,
12935,
12936,
13128,
13129,
13163,
13199,
13219,
13236,
13237,
13622,
13623,
13646,
13647,
13847,
13848,
13895,
13955,
13999,
14019,
14059,
14097,
14136,
14177,
14201,
14222,
14240,
14258,
14259,
14303,
14304,
15200,
15201,
15210,
15211,
15250,
15316,
15317,
15396,
15397,
15580,
15581,
15609,
15623,
15653,
15668,
15680,
15681,
15709,
15723,
15753,
15768,
15780,
15781,
15810,
15824,
15854,
15869,
15881,
15882,
15913,
15927,
15957,
15972,
15984,
15985,
16096,
16097,
16121,
16122,
16213,
16214,
16250,
16269,
16287,
16335,
16387,
16406,
16468,
16553,
16573,
16587,
16588,
16625,
16644,
16662,
16710,
16763,
16782,
16844,
16930,
16950,
16964,
16965,
16993,
17011,
17044,
17063,
17077,
17078,
17110,
17128,
17161,
17180,
17194,
17195,
17228,
17246,
17282,
17301,
17315,
17316,
17580,
18370,
18371,
18381,
18382,
18433,
18434,
18458,
18483,
18517,
18536,
18537,
18585,
18586,
18611,
18612,
18619,
18620,
18704,
18705,
18732,
18751,
18781,
18837,
18893,
18910,
18970,
18992,
19034,
19079,
19125,
19165,
19191,
19214,
19234,
19301,
19368,
19441,
19517,
19537,
19551,
19552,
19580,
19599,
19622,
19660,
19728,
19796,
19818,
19842,
19862,
19876,
19877,
20031,
20299,
20576,
20577,
20643,
20644,
20733,
20970,
21061,
21062,
21118,
21119,
21251,
21347,
21451,
21604,
21613,
21624,
21640,
21656,
21672,
21688,
21704,
21781,
21812,
21852,
21891,
21930,
21969,
22008,
22018,
22062,
22102,
22141,
22180,
22219,
22258,
22268,
22269,
22288,
22289,
23179,
23180,
23824,
23825,
24377,
24378,
24759,
24760,
25094,
25095,
25569,
25570,
25834,
25835,
26475,
26476,
27085,
27086,
27108
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 27108,
"ccnet_original_nlines": 556,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2758137881755829,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03640181943774223,
"rps_doc_frac_lines_end_with_ellipsis": 0.003590659936890006,
"rps_doc_frac_no_alph_words": 0.3052152693271637,
"rps_doc_frac_unique_words": 0.25799086689949036,
"rps_doc_mean_word_length": 5.819920063018799,
"rps_doc_num_sentences": 211,
"rps_doc_symbol_to_word_ratio": 0.0007000400219112635,
"rps_doc_unigram_entropy": 5.7382588386535645,
"rps_doc_word_count": 3504,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09258078783750534,
"rps_doc_frac_chars_dupe_6grams": 0.06673859059810638,
"rps_doc_frac_chars_dupe_7grams": 0.02432207018136978,
"rps_doc_frac_chars_dupe_8grams": 0.012259109877049923,
"rps_doc_frac_chars_dupe_9grams": 0.0037267699372023344,
"rps_doc_frac_chars_top_2gram": 0.0026479701045900583,
"rps_doc_frac_chars_top_3gram": 0.0020595300011336803,
"rps_doc_frac_chars_top_4gram": 0.0015691700391471386,
"rps_doc_books_importance": -2538.267333984375,
"rps_doc_books_importance_length_correction": -2538.267333984375,
"rps_doc_openwebtext_importance": -1239.6229248046875,
"rps_doc_openwebtext_importance_length_correction": -1239.6229248046875,
"rps_doc_wikipedia_importance": -980.1004638671875,
"rps_doc_wikipedia_importance_length_correction": -980.1004638671875
},
"fasttext": {
"dclm": 0.0802297592163086,
"english": 0.7325389385223389,
"fineweb_edu_approx": 2.6357712745666504,
"eai_general_math": 0.9597115516662598,
"eai_open_web_math": 0.4150063395500183,
"eai_web_code": 0.9772546291351318
}
}
|
{
"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": "006.31",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Cognitive science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-112,923,889,580,036,320 |
Shell实现:重定向和管道
介绍
Shell实现:基本功能一文介绍了如何实现Shell的基本功能,本文介绍如何实现I/O重定向和管道。
I/O重定向使得程序可以自由地指定数据的流向,不一定从键盘读取数据或输出结果到屏幕上;管道使得一条命令的输出可以作为另一条命令的输入,多条命令可以配合完成一项任务。例如下面的命令:
1
2
3
4
5
6
7
8
9
$ ls -l > 1.txt
$ cat 1.txt
total 24
-rw-r--r-- 1 krist users 0 Apr 15 16:37 1.txt
-rw-r--r-- 1 krist users 86 Apr 15 09:56 Makefile
-rw-r--r-- 1 krist users 13177 Apr 15 09:56 psh.c
-rw-r--r-- 1 krist users 21 Apr 15 10:05 README.md
$ cat < 1.txt | wc -l
5
第一条命令中的>符号表示将ls -l命令的输出结果重定向到文件1.txt。最后一条命令中的<符号表示将文件1.txt的内容作为cat命令的输入(cat < 1.txt等价于cat 1.txt),|符号表示将前面命令的运行结果作为命令wc -l的输入,所以命令最终的运行结果为1.txt中文本的行数。
由于在下暂时才疏学浅,只好先实现简单的功能,传达基本精神即可。因此,本文的Shell实现对输入的命令进行限制:
1. 一次只能有一种操作,即最多只能包含一个<>|符号,所以cat < 1.txt | wc -l是不合法的
2. 三种符号的前后必须有空格,类似于ls>1.txtcat 1.txt| wc -l是不合法的
主流程
Shell的主进程会fork一个子程序运行用户输入的命令。子进程首先检查命令中是否包含<>|符号,以确定命令的类型,然后用做相应的处理。主流程如下:
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
pid_t pid = fork();
switch (pid) {
case -1:
perror("fork");
exit(EXIT_FAILURE);
case 0: // 子进程来执行命令
// 识别命令的类型
int symbol_pos; // 符号的位置
int cmd_type = check_cmd(arg_vec, &symbol_pos);
//
switch (cmd_type) {
case CMD_NORMAL:
exec_normal(arg_vec); // 普通命令
case CMD_INPUT_REDIRECT:
exec_input_redirect(arg_vec, symbol_pos); // 输入重定向
case CMD_OUTPUT_REDIRECT:
exec_output_redirect(arg_vec, symbol_pos); // 输出重定向
case CMD_PIPELINE:
exec_pipeline(arg_vec, symbol_pos); // 管道
case CMD_INVALID:
fprintf(stderr, "Invalid command!\n"); // 命令不合法
exit(EXIT_FAILURE);
default:
break;
}
default:
while (wait(&status) != pid); // 父进程等待子进程运行完毕
}
arg_vec变量是字符串数组,保存处理之后的用户命令。如果输入命令为ls -al | wc -l,那么该数组的内容为:
1
char *arg_vec[] = {"ls", "-al", "|", "wc", "-l", NULL};
实现原理
所有的系统调用(system call)都通过文件描述符(file descriptor)对各种类型的文件进行I/O操作。每个进程都维护自己的一组文件描述符。
一般来说,所有的程序都会使用三个标准的文件描述符0、1和2,分别对应着标准输入标准输出标准错误。当通过Shell运行命令时,这三个描述符在程序运行之前就会打开。准确来说,是程序继承了Shell的描述符,而Shell会一直保持这三个描述符是打开的。
程序会从标准输入读入数据,输出结果到标准输出,输出错误到标准错误。当我们使用交互式的Shell时,这三个描述符都连接到Shell所运行的终端上,所以程序会从键盘读取数据,然后运行,最后把结果和错误打印到屏幕上。所以,要进行I/O重定向和管道操作,就要重定向相应的文件描述符。
I/O重定向
输入重定向
程序从标准输入读取数据,如果将文件描述符0定位到一个文件上,那么此文件就成了标准输入的源。实现上述功能要用到dup2函数:
1
int dup2(int oldfd, int newfd);
dup2函数将oldfd文件描述符复制给newfd,如果newfd之前打开了,dup2会先将它关闭。将文件描述符0重定向到文件的步骤如下:
1
2
3
int fd = open(filename, O_RDONLY); // 打开文件,描述符fd对应文件
dup2(fd, 0); // 将fd复制到0,此时0和fd都指向文件
close(fd); // 关闭fd,此时只有0指向文件
将标准输入重定向到文件后,再执行用户输入的命令,命令会从指定的文件中读取数据作为输入,完整代码如下:
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
void exec_input_redirect(char **arg_vec, int pos)
{
// arg_vec保存用户输入的命令
// pos是符号'<'的位置
char *filename = arg_vec[pos+1]; // 符号'<'后面是文件名
arg_vec[pos] = NULL; // 符号'<'前面是命令
// 打开文件,将标准输入重定向到文件
int fdin = open(filename, O_RDONLY);
if (fdin == -1) {
perror("open");
exit(EXIT_FAILURE);
}
if (dup2(fdin, STDIN_FILENO) == -1) {
perror("dup2");
exit(EXIT_FAILURE);
}
if (close(fdin) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
// 执行命令,文件内容成为命令的输入源
execvp(arg_vec[0], arg_vec);
perror("execvp");
exit(EXIT_FAILURE);
}
输出重定向
类似地,实现输出重定向需将文件描述符1定位到文件上。完整代码如下:
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
void exec_output_redirect(char **arg_vec, int pos)
{
// arg_vec保存用户输入的命令
// pos是符号'>'的位置
char *filename = arg_vec[pos + 1]; // 符号'>'后面是文件名
arg_vec[pos] = NULL; // 符号'>'前面是命令
// 打开文件,将标准输出重定向到文件
int fdout = open(filename, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fdout == -1) {
perror("open");
exit(EXIT_FAILURE);
}
if (dup2(fdout, STDOUT_FILENO) == -1) {
perror("dup2");
exit(EXIT_FAILURE);
}
if (close(fdout) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
// 执行命令,结果会输出到文件中
execvp(arg_vec[0], arg_vec);
perror("execvp");
exit(EXIT_FAILURE);
}
管道
管道(pipe)是进程间通信的重要手段之一。调用pipe函数创建一个管道,并将其两端连接到两个文件描述符,其中pipefd[0]为读数据端的文件描述符,pipefd[1]为写数据端的文件描述符:
1
int pipe(int pipefd[2])
当进程创建一个管道之后,该进程就有了连向管道两端的连接(即为两个文件描述符)。当该进程fork一个子进程时,子进程也继承了这两个连向管道的连接,如下面左图所示。父进程和子进程都可以将数据写到管道的写数据端口,并从读数据端口将数据读出。两个进程都可以读写管道,但当一个进程读,另一个进程写时,管道的使用效率是最高的,因此,每个进程最好关闭管道的一端,如下面右图所示。
shell_pipeline_1
Shell要实现管道功能,需将前一条命令的输出作为后一条命令的输入。那么以上面右图为基础,还需将前一进程的标准输出重定向到管道的写数据端,将后一进程的标准输入重定向到管道的读数据端,如下图所示:
shell_pipeline_2
我们将运行整条命令的子进程称为进程A,本文Shell的实现中,进程A并不执行命令,而是再fork两个进程,称之为进程B1和B2,分别执行两条命令。两个进程都从进程A继承了管道两端的连接,可通过该管道通信。进程A不再需要管道连接,于是关闭两个文件描述符,然后等待进程B1和B2执行完毕。完整代码如下:
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
void exec_pipeline(char **arg_vec, int pos)
{
// arg_vec保存用户输入的命令
// pos是符号'|'的位置
char **arg_vec1 = &arg_vec[0]; // 第一条命令CMD 1
arg_vec[pos] = NULL; // 两条命令的分界
char **arg_vec2 = &arg_vec[pos+1]; // 第二条命令CMD 2
// 创建管道
int pfd[2];
if (pipe(pfd) == -1) {
perror("pipe");
exit(EXIT_FAILURE);
}
// 创建进程B1,执行CMD 1
switch (fork()) {
case -1:
perror("fork");
exit(EXIT_FAILURE);
case 0:
// 关闭管道的读数据端
if (close(pfd[0]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
if (pfd[1] != STDOUT_FILENO) { // 防御性编程
// 将标准输出重定向到管道的写数据端
if (dup2(pfd[1], STDOUT_FILENO) == -1) {
perror("dup2");
exit(EXIT_FAILURE);
}
if (close(pfd[1]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
}
// 执行CMD 1,运行结果将写入管道
execvp(arg_vec1[0], arg_vec1);
perror("execvp");
exit(EXIT_FAILURE);
default:
break;
}
// 创建进程B2,执行CMD 2
switch (fork()) {
case -1:
perror("fork");
exit(EXIT_FAILURE);
case 0:
// 关闭管道的写数据端
if (close(pfd[1]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
if (pfd[0] != STDIN_FILENO) { // 防御性编程
// 将标准输入重定向到管道的读数据端
if (dup2(pfd[0], STDIN_FILENO) == -1) {
perror("dup2");
exit(EXIT_FAILURE);
}
if (close(pfd[0]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
}
// 运行CMD 2,从管道中读数据作为输入
execvp(arg_vec2[0], arg_vec2);
perror("execvp");
exit(EXIT_FAILURE);
default:
break;
}
// 进程A不需要管道通信,关闭管道的两端
if (close(pfd[0]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
if (close(pfd[1]) == -1) {
perror("close");
exit(EXIT_FAILURE);
}
// 进程A等待两个子进程执行完毕
if (wait(NULL) == -1) {
perror("wait");
exit(EXIT_FAILURE);
}
if (wait(NULL) == -1) {
perror("wait");
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
完整的代码请参考这里
参考
1. The Linux Programming Interface
2. Unix/Linux编程实践教程
|
{
"url": "https://panqiincs.me/2017/04/19/write-a-shell-redirect-and-pipeline/",
"source_domain": "panqiincs.me",
"snapshot_id": "crawl=CC-MAIN-2019-09",
"warc_metadata": {
"Content-Length": "57112",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:RD7O73I7R46PGD5UCQNVRZYM6FMWRQ2L",
"WARC-Concurrent-To": "<urn:uuid:60119380-fc19-4738-b7c6-36e7ccea5923>",
"WARC-Date": "2019-02-17T03:32:02Z",
"WARC-IP-Address": "45.77.182.191",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:VIQRUL4RFNBS2MFBA5B4M366W5DPPUQR",
"WARC-Record-ID": "<urn:uuid:63b3ec43-5cda-44a9-8c51-68ecd518a659>",
"WARC-Target-URI": "https://panqiincs.me/2017/04/19/write-a-shell-redirect-and-pipeline/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:57dbc8a5-7395-49a5-8e5d-4d8d31395389>"
},
"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-151-171-77.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
15,
16,
19,
20,
71,
72,
163,
164,
166,
168,
170,
172,
174,
176,
178,
180,
182,
198,
210,
219,
265,
315,
365,
416,
438,
440,
441,
591,
592,
648,
649,
706,
757,
758,
762,
763,
838,
839,
841,
843,
845,
847,
849,
851,
853,
855,
857,
860,
863,
866,
869,
872,
875,
878,
881,
884,
887,
890,
893,
896,
899,
902,
905,
908,
911,
914,
934,
949,
958,
974,
994,
1014,
1025,
1050,
1098,
1101,
1121,
1138,
1168,
1193,
1244,
1270,
1322,
1341,
1383,
1401,
1449,
1469,
1478,
1485,
1487,
1496,
1542,
1544,
1545,
1606,
1607,
1609,
1665,
1666,
1671,
1672,
1752,
1753,
1877,
1878,
2016,
2017,
2024,
2025,
2031,
2032,
2094,
2095,
2097,
2129,
2130,
2200,
2201,
2203,
2205,
2207,
2261,
2297,
2326,
2327,
2378,
2379,
2381,
2383,
2385,
2387,
2389,
2391,
2393,
2395,
2397,
2400,
2403,
2406,
2409,
2412,
2415,
2418,
2421,
2424,
2427,
2430,
2433,
2436,
2439,
2442,
2445,
2448,
2451,
2501,
2503,
2523,
2539,
2587,
2622,
2623,
2643,
2680,
2698,
2714,
2734,
2736,
2774,
2790,
2810,
2812,
2837,
2854,
2874,
2876,
2877,
2898,
2927,
2945,
2965,
2967,
2968,
2974,
2975,
3009,
3010,
3012,
3014,
3016,
3018,
3020,
3022,
3024,
3026,
3028,
3031,
3034,
3037,
3040,
3043,
3046,
3049,
3052,
3055,
3058,
3061,
3064,
3067,
3070,
3073,
3076,
3079,
3082,
3085,
3136,
3138,
3158,
3174,
3224,
3259,
3260,
3280,
3337,
3377,
3396,
3412,
3432,
3434,
3474,
3490,
3510,
3512,
3538,
3555,
3575,
3577,
3578,
3596,
3625,
3643,
3663,
3665,
3666,
3669,
3670,
3768,
3769,
3771,
3795,
3796,
3979,
3980,
3997,
3998,
4096,
4097,
4114,
4115,
4265,
4266,
4268,
4270,
4272,
4274,
4276,
4278,
4280,
4282,
4284,
4287,
4290,
4293,
4296,
4299,
4302,
4305,
4308,
4311,
4314,
4317,
4320,
4323,
4326,
4329,
4332,
4335,
4338,
4341,
4344,
4347,
4350,
4353,
4356,
4359,
4362,
4365,
4368,
4371,
4374,
4377,
4380,
4383,
4386,
4389,
4392,
4395,
4398,
4401,
4404,
4407,
4410,
4413,
4416,
4419,
4422,
4425,
4428,
4431,
4434,
4437,
4440,
4443,
4446,
4449,
4452,
4455,
4458,
4461,
4464,
4467,
4470,
4473,
4476,
4479,
4482,
4485,
4488,
4491,
4494,
4497,
4500,
4503,
4506,
4509,
4512,
4515,
4518,
4521,
4524,
4527,
4530,
4533,
4536,
4539,
4542,
4545,
4548,
4592,
4594,
4614,
4630,
4675,
4707,
4756,
4757,
4765,
4777,
4800,
4816,
4836,
4838,
4839,
4857,
4875,
4884,
4900,
4920,
4928,
4941,
4968,
4985,
5005,
5007,
5008,
5048,
5068,
5109,
5125,
5145,
5147,
5174,
5191,
5211,
5213,
5215,
5236,
5267,
5285,
5305,
5314,
5321,
5323,
5324,
5342,
5360,
5369,
5385,
5405,
5413,
5426,
5453,
5470,
5490,
5492,
5531,
5551,
5591,
5607,
5627,
5629,
5656,
5673,
5693,
5695,
5697,
5720,
5751,
5769,
5789,
5798,
5805,
5807,
5808,
5830,
5857,
5874,
5894,
5896,
5923,
5940,
5960,
5962,
5980,
6004,
6020,
6040,
6042,
6066,
6082,
6102,
6104,
6105,
6125,
6127,
6128,
6139,
6140,
6143,
6144,
6181
],
"line_end_idx": [
15,
16,
19,
20,
71,
72,
163,
164,
166,
168,
170,
172,
174,
176,
178,
180,
182,
198,
210,
219,
265,
315,
365,
416,
438,
440,
441,
591,
592,
648,
649,
706,
757,
758,
762,
763,
838,
839,
841,
843,
845,
847,
849,
851,
853,
855,
857,
860,
863,
866,
869,
872,
875,
878,
881,
884,
887,
890,
893,
896,
899,
902,
905,
908,
911,
914,
934,
949,
958,
974,
994,
1014,
1025,
1050,
1098,
1101,
1121,
1138,
1168,
1193,
1244,
1270,
1322,
1341,
1383,
1401,
1449,
1469,
1478,
1485,
1487,
1496,
1542,
1544,
1545,
1606,
1607,
1609,
1665,
1666,
1671,
1672,
1752,
1753,
1877,
1878,
2016,
2017,
2024,
2025,
2031,
2032,
2094,
2095,
2097,
2129,
2130,
2200,
2201,
2203,
2205,
2207,
2261,
2297,
2326,
2327,
2378,
2379,
2381,
2383,
2385,
2387,
2389,
2391,
2393,
2395,
2397,
2400,
2403,
2406,
2409,
2412,
2415,
2418,
2421,
2424,
2427,
2430,
2433,
2436,
2439,
2442,
2445,
2448,
2451,
2501,
2503,
2523,
2539,
2587,
2622,
2623,
2643,
2680,
2698,
2714,
2734,
2736,
2774,
2790,
2810,
2812,
2837,
2854,
2874,
2876,
2877,
2898,
2927,
2945,
2965,
2967,
2968,
2974,
2975,
3009,
3010,
3012,
3014,
3016,
3018,
3020,
3022,
3024,
3026,
3028,
3031,
3034,
3037,
3040,
3043,
3046,
3049,
3052,
3055,
3058,
3061,
3064,
3067,
3070,
3073,
3076,
3079,
3082,
3085,
3136,
3138,
3158,
3174,
3224,
3259,
3260,
3280,
3337,
3377,
3396,
3412,
3432,
3434,
3474,
3490,
3510,
3512,
3538,
3555,
3575,
3577,
3578,
3596,
3625,
3643,
3663,
3665,
3666,
3669,
3670,
3768,
3769,
3771,
3795,
3796,
3979,
3980,
3997,
3998,
4096,
4097,
4114,
4115,
4265,
4266,
4268,
4270,
4272,
4274,
4276,
4278,
4280,
4282,
4284,
4287,
4290,
4293,
4296,
4299,
4302,
4305,
4308,
4311,
4314,
4317,
4320,
4323,
4326,
4329,
4332,
4335,
4338,
4341,
4344,
4347,
4350,
4353,
4356,
4359,
4362,
4365,
4368,
4371,
4374,
4377,
4380,
4383,
4386,
4389,
4392,
4395,
4398,
4401,
4404,
4407,
4410,
4413,
4416,
4419,
4422,
4425,
4428,
4431,
4434,
4437,
4440,
4443,
4446,
4449,
4452,
4455,
4458,
4461,
4464,
4467,
4470,
4473,
4476,
4479,
4482,
4485,
4488,
4491,
4494,
4497,
4500,
4503,
4506,
4509,
4512,
4515,
4518,
4521,
4524,
4527,
4530,
4533,
4536,
4539,
4542,
4545,
4548,
4592,
4594,
4614,
4630,
4675,
4707,
4756,
4757,
4765,
4777,
4800,
4816,
4836,
4838,
4839,
4857,
4875,
4884,
4900,
4920,
4928,
4941,
4968,
4985,
5005,
5007,
5008,
5048,
5068,
5109,
5125,
5145,
5147,
5174,
5191,
5211,
5213,
5215,
5236,
5267,
5285,
5305,
5314,
5321,
5323,
5324,
5342,
5360,
5369,
5385,
5405,
5413,
5426,
5453,
5470,
5490,
5492,
5531,
5551,
5591,
5607,
5627,
5629,
5656,
5673,
5693,
5695,
5697,
5720,
5751,
5769,
5789,
5798,
5805,
5807,
5808,
5830,
5857,
5874,
5894,
5896,
5923,
5940,
5960,
5962,
5980,
6004,
6020,
6040,
6042,
6066,
6082,
6102,
6104,
6105,
6125,
6127,
6128,
6139,
6140,
6143,
6144,
6181,
6202
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6202,
"ccnet_original_nlines": 461,
"rps_doc_curly_bracket": 0.008706869557499886,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.022020729258656502,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05116580054163933,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.7072538733482361,
"rps_doc_frac_unique_words": 0.46979865431785583,
"rps_doc_mean_word_length": 7.543623924255371,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.1486358642578125,
"rps_doc_word_count": 596,
"rps_doc_frac_chars_dupe_10grams": 0.04137010872364044,
"rps_doc_frac_chars_dupe_5grams": 0.2028469741344452,
"rps_doc_frac_chars_dupe_6grams": 0.13901245594024658,
"rps_doc_frac_chars_dupe_7grams": 0.0847419872879982,
"rps_doc_frac_chars_dupe_8grams": 0.06338968127965927,
"rps_doc_frac_chars_dupe_9grams": 0.04337188974022865,
"rps_doc_frac_chars_top_2gram": 0.037811391055583954,
"rps_doc_frac_chars_top_3gram": 0.048042699694633484,
"rps_doc_frac_chars_top_4gram": 0.004448399879038334,
"rps_doc_books_importance": -684.5868530273438,
"rps_doc_books_importance_length_correction": -684.5868530273438,
"rps_doc_openwebtext_importance": -405.2413024902344,
"rps_doc_openwebtext_importance_length_correction": -405.2413024902344,
"rps_doc_wikipedia_importance": -310.29632568359375,
"rps_doc_wikipedia_importance_length_correction": -310.29632568359375
},
"fasttext": {
"dclm": 0.3808002471923828,
"english": 0.0244040098041296,
"fineweb_edu_approx": 1.0809967517852783,
"eai_general_math": 0.299441933631897,
"eai_open_web_math": 0.06603342294692993,
"eai_web_code": 0.31992363929748535
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "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": "4",
"label": "Missing Images or Figures"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
859,281,416,480,510,600 |
UPS(1) UPS(1) NAME ups - X11 and SunView based source level C debugger SYNOPSIS ups target [corefile|pid] [[:]srcdir[:srcdir]] [-a target- args] DESCRIPTION Ups is a X based source level debugger for the C, C++ and Fortran programming languages. It supports both run time debugging with breakpoints and post-mortem debugging from a core file. On Suns you can attach ups to a running pro- cess. Ups runs in its own window, thus not interfering with the target program's I/O. The ups window has two major areas - one showing a structured document represent- ing the target state, the other showing the source that is being executed. Ups makes heavy use of direct manipulation and feedback. When you add a breakpoint it is shown as a pseudo C state- ment (#stop) in the source display. The current point of execution is highlighted in the source display and you can watch it move as you step through loops and function calls. You can edit in fragments of interpreted C code (including assignments to variables and calls to target functions). There are powerful facilities for exploring linked data structures - you can recursively expand and collapse structures to follow links. Ups is primarily a C debugger, but it also has support for debugging Fortran 77 and Fortran 90 code. See the section DEBUGGING FORTRAN CODE (near the end of this manual page) for information on Fortran specific features. Ups has reasonable support of C++. See the section SUPPORT FOR C++ after the Fortran section for information on on this. The URL for the ups web site is: http://ups.sourceforge.net/ It is maintained by Ian Edwards (ian@con- certo.demon.co.uk). It includes a FAQ, html man pages, site listings where ups can be found, supported architec- tures, a history of changes between versions and other information. GETTING STARTED This section gives step by step instructions on how to use ups on a small example C program. The idea is to get a feel for how to use ups without getting bogged down in details. After following the instructions here you should be able to explore a little on your own and then be ready to have a look at the reference material that follows. Here is the sample source code: struct argst { char *a_name; struct argst *a_next; }; struct argst *listhead = 0; void stash(name) char *name; { struct argst *a; char *malloc(); a = (struct argst *)malloc(sizeof(struct argst)); a->a_name = name; a->a_next = listhead; listhead = a; } int main() { stash("foo"); stash("bar"); } We skip error checking code here in the interests of brevity. Put a copy of the code above into a .c file (e.g. sample.c) by cut-and-paste or by snarfing the lines from the file that contains this manual page. If you have the source directory of ups around you will find this code below there in the file ups/doc/sample.c. Assuming you have a copy of the above code in a file and you are sitting at a workstation or X terminal and have an X or Sunview session running, here is what you do: o Compile and link the code with the -g flag to cc(1) or gcc(1). The -g flag directs the compilers to include extra symbol table information in the object file that is needed by debuggers. o Give the command `ups a.out' (or whatever you called the object file). After a short pause a window will be cre- ated; the details obviously depend on your window manager. This is the simplest way of invoking ups. For a complete description of the command line flags and arguments see UPS COMMAND LINE ARGUMENTS. In the window you should see a display divided into various rectangular boxes and menus, with two large regions in the upper and lower halves of the win- dow. The top region is the display area - it con- tains captions looking roughly like: Target a.out a.out Signals Environment Untyped variables Source files Functions Breakpoints In the lower region you should see the start of main() displayed. Note: the layout of the window is explained in detail in a later section. o Move the mouse cursor over the Breakpoints caption in the upper region, and press and release the left mouse button. You should see two things happen: the caption is inverted to show that it is selected, and a menu appears near the top of the window with the cap- tions Add new, Remove all, Restore, and Load file. All the objects in the display area (except Func- tions) can be selected like this and have their own menus. Selecting an object (or many objects) and clicking on one of the commands in its associated menu is the primary way of issuing commands to ups. o Click (press and release) the left mouse button over the Add new menu caption. You should see a line below the Breakpoints caption looking like: Function:[] line:0 The hollow square represents the editing cursor, which indicates where typed characters will appear. (this is actually displayed as a solid black rect- angle on the screen). o Type `main' You can use the delete key as you would expect to fix typos. There are various other useful control characters - see the EDITABLE FIELDS section for details. o Press ESC (the escape key). This confirms the edit. You should see the text #stop; appear at the start of main in the source region. Ups represents breakpoints as this fragment of pseudo C. You can edit breakpoints to do things other than just stop (e.g. call a target function or only stop if a certain condition is true). This is covered later in this section, and described fully in the section ADDING INTERPRETED CODE. You can also add breakpoints by pointing at the appropriate line in the source region - this is described later in this section. o Click the left button over the caption Start at the left hand side of the menu just below the display area. This menu is the target control menu. Here is a brief description of what the other commands in this menu do (these are explained in more detail in the CONTROLLING TARGET EXECUTION section). As you have just seen Start starts the target running. Step and Next step execution over single lines of code (Step steps into function calls, Next doesn't). Cont makes the target process run until it hits a breakpoint or exits. Stop stops a run- ning target process, queues a request to terminate a symbol search, or breaks out of a Step that takes a long time, and Attach prompts for a PID of a tar- get process to attach to (for SunOS), and Detach detaches from an attached process. Kill kills off the target process, ready for another run using Start. You should see the first line of code in main high- lighted. This means that execution has stopped just before this line. If you look at the display area you will also see that a new line has appeared under the Functions object. This should look like: main sample.c:18 This shows that you are stopped at line 18 of sam- ple.c in function main. At this point you are in the usual state for ups: you have the target stopped, with the line that is about to be executed highlighted in the source win- dow and your current position in the source file shown under the Functions object in the display area. o Click on Step in the target control menu. The source display switches to function stash, which you have just stepped into. You will also see an extra line under Functions - the display should look like: main sample.c:18 stash sample.c:10 As you can see this is a stack trace, showing you which function called which starting from main and working inwards towards the function you are cur- rently stopped in. o In the source region move the mouse over the `a' at the start of the highlighted line and click the left mouse button. You should see a line added to the stack trace, making it look like: main sample.c:18 stash sample.c:10 struct argst * 0x4 This is one of the main strengths of ups: to see the type and value of any variable that is visible in the source window you simply click on its name. This is showing that a is a variable of type struct argst * with the value 4. Ignore the angle brack- ets round the `a' for now - they will be explained later. This is an uninitialized variable, so the value you see will probably be different from this. You will also notice that the menu near the top of the display area has changed. Every object in the display area has an associated menu, which is dis- played when that object is selected. Ignore the menu for now. o Click on Step in the target control menu. The value displayed for the variable a changes to whatever is returned by malloc. This shows another key feature of ups - displayed variables remain in the display area as you step through the program code so you can watch the values change. o Now click the left mouse button over the displayed line for the variable a. The line will be inverted to show that it is selected and a menu will appear as before near the top of the display area. o Click on Expand in the menu that was produced by the last step. You will see an entry added for each member of the structure, giving a display under the Functions object that looks something like: main sample.c:18 stash sample.c:11 struct argst 0x60c8 char *NULL struct argst * 0x0 The member types and values are shown in the same way as the structure pointer `a' itself. As before the values are uninitialized, so the values you see will depend on the exact behaviour of your malloc implementation. o Click on Next in the target menu. The highlighting in the source window will move on to the next line, and the value displayed for the a_name field will change. This sort of interaction is typical use of ups - you expand structures to see members of interest, and then step through the source code watching how they change. o Move the mouse over the highlighted source line, press and hold down the right hand mouse button then release it. When you pressed the mouse button you will have seen a popup menu with the captions Add breakpoint, Execute to here, Jump to here, and Edit source. You will also have seen an arrow to the left of the menu pointing at the source line you pressed the mouse over. When you release the mouse button a breakpoint is added just before the source line. You will see the text #stop; appear. This is the simplest and most common way of adding breakpoints in ups. The normal sequence of actions is: o Type the name of the function you are inter- ested in (or enough of it to uniquely iden- tify it) and hit ESC (the escape key). The source of the function is displayed in the source window. o Scroll the source to make visible the line where you want to add a breakpoint. o Add a breakpoint by clicking the right mouse button over the source line. o Click on Cont in the target control menu. The target continues until it hits a breakpoint. In this case the target stops in the second call of stash from main. You will notice that in the dis- play area the displayed value of a_name has changed. o Click on Cont again. The target continues to completion and exits. The stack trace and variables disappear from the dis- play area, and all the target control menu captions except Start are greyed out to indicate that they are unavailable while the target is stopped. We are almost at the end of this example. These last steps are to show how you can add printf calls (in fact any interpreted C). The actions we are about to cover are: o Editing some interpreted C into a breakpoint. o Scrolling the source window to show the other breakpoint and removing it. o Re-running the target to see the effect of the interpreted code. o Move the mouse over the `#stop;' text that indicates the breakpoint in the stash function and click the middle mouse button. You should see an editing cursor (a black rectan- gle) appear. If it is not at the end of the `#stop;' text then click the middle mouse button further to the right. o Use the delete key to delete the `#stop;' text. o Type the following text: $printf("Setting a->a_name to %s\n", a->a_name); $printf is a built in ups function with an inter- face almost identical to printf except that it sends output to an region in the ups display. o Hit ESC (the escape key) If you haven't made any errors ups will silently accept the line and the editing cursor will disap- pear. If you have made a syntax error ups will beep, give you an error message and put the editing cursor at the point of the error. You can then correct the error. o Press and hold down the left mouse button in the scroll bar to the left of the source window, and with the mouse button pressed move the mouse button a few pixels towards the top of the window. You should see the source text scrolling slowly upwards. The more you move the mouse from the place you first pressed it, the faster the source scrolls. o When you see the source of Main appear in the source win- dow release the mouse button. The scrolling will stop. o Click the middle mouse button on the #stop at the start of main. This displays the editing cursor as before, but if you look in the display are you will notice that it also selects the corresponding breakpoint object. You will see the breakpoint entry highlighted, as well as a menu with the captions Remove, Source, Save to file, Execute, Activate, and Inactivate near the top of the window. o Click on Remove in the menu You will see the breakpoint entry in the display area disappear, along with the #stop; line in the source window. o Click on Start in the target control menu. You should see a third subregion appear in the dis- play. This looks similar to the source window, with a controlling menu above it and a scroll bar on the left hand side. This is the output region. It is where output from the built in function $printf appears. This region appears the first time $printf is called by inter- preted code. You will see that the text Setting a->a_name to foo Setting a->a_name to bar has appeared. This was produced by the interpreted code that you added. Note that the target ran to completion without stopping. A breakpoint only stops the target if the pseudo C statement #stop is executed. This lets you add conditional breakpoints simply by putting an if statement around them. One final point: you can call target functions (like stash in this example) from interpreted breakpoint code. This is often used to call printf in cases where you do want the debugging output interspersed with the target program's output. Here endeth the example. It certainly hasn't covered all of the features of ups, but hopefully it has given you a feel for the way it works. Some basic points: o The two important areas in the display are the dis- play area (top) and the source region (bottom). o The display area contains captions representing objects of different types. o You can select an object by clicking on it with the left mouse button. o Each different object type has an associated menu which appears near the top of the ups window when the object is selected. o Commands selected from these menus act on the cur- rently selected objects. o The source region displays the currently executing source code, with the line that is about to be exe- cuted highlighted. o You can add any variable to the display area by clicking on an instance of it in the source window with the left mouse button. o Double clicks will alternately expand and compress the variable, if possible. You can add breakpoints by pointing at lines of source. o You can edit breakpoints to add printf statements and conditional breakpoints. o You can expand and collapse structures to explore data structures. o Variables remain in the display area as you step through the code so you can watch the values change. The rest of this manual page gives a complete description of ups . You should probably skim through it at first reading before playing with ups on some of your own code for a while. When you are more familiar with ups reread these sections in more detail. UPS COMMAND LINE ARGUMENTS This section gives a complete description of the command line arguments accepted by ups. The command line syntax is: ups target [corefile|pid] [[:]srcdir[:srcdir]] [-a target-args] [-nodemangle] [-nosavesigs] [-split[:screen]] [-fullpath] [-install] Ups accepts various other flags, but these are mostly to support maintenance and testing, and are not of interest to the general user. You can see a full list of the ups flags by giving the command `ups -fullusage'. The only mandatory argument is the name of the executable file containing the program to be debugged (the target). If a corefile argument is given it is taken to be the name of a core image dumped from target. If no corefile argu- ment is given and there is a core image file called `core' in the directory of the target then that is taken as the core file. Old core files, and core files which weren't dumped from the target, are silently ignored unless you give the name of the core file explicitly (in which case ups will use it, but give a warning message). If the corefile argument consists solely of digits, it is taken to be the process id of the target. This allows you to attach ups to an already running process on machines with the necessary support (currently only Suns). If you subsequently quit ups while still attached in this way, it detaches from the target, allowing the target to continue. By default ups looks for source files in the directory of the target. You can specify alternative source directo- ries by giving a list of directories separated by `:' characters. An empty initial path (i.e. a leading `:') means the directory of the target. On Suns running SunOS 4, the C compiler includes directory paths for source files, so ups will normally find source files in other directories even without the source path argument. You can specify the arguments that the target should be invoked with by giving the -a option, followed by a single argument. You can give multiple arguments for the target by enclosing the list of arguments in single or double quotes. Ups will itself interpret metacharacters like `*' and `>' - see TARGET COMMAND LINE ARGUMENTS. When the `-nodemangle' argument is specified, ups will do no demangling on function or variable names. This should result is slightly faster invocation time for pure C code. It is still possible to debug C++ code in this mode, although the names need some mental deciphering. A unique feature of this version of ups, is that even when C++ names are shown mangled, you can generally still click on variables in the source window, and ups will still find the name to display, albeit in a mangled state. If you are saving state between debugging sessions by cre- ating a "ups-state" directory, the command option, "-nosavesigs" stops UPS from saving signal state to the ups state file. By default, ups passes only the final component of the target filename to the process as argv[0]. Sometimes, the process needs the full path to itself, for example, to locate auxiliary files. If the `-fullpath' argument is specified, this default behaviour is suppressed and the target filename is passed directly from the ups command line to the process command line. ENVIRONMENT VARIABLES AFFECTING UPS You can see all the symbol table names that are loaded and not loaded by setting VERBOSE to 1, e.g. if you use csh(1) by doing "setenv VERBOSE 1" before calling ups. Setting VERBOSE to "NOLOAD" causes ups to list just the libraries that are not loaded. The variable EDITOR is used, if set, as the editor for source files. If not set the default is vi(1). Unless the editor is emacs(1), or the name starts with an "x", it will be started in a new xterm(1) window. You can change the source code language and compiler type that ups assumes have been used by setting UPS_LANGUAGE or UPS_COMPILER as appropriate. Note that these settings will be used for all files. These might be useful if you use non-standard file extensions, or have compiled C with a C++ compiler. UPS_LANGUAGE can be "C", "C++", "F77" or "F90". UPS_COMPILER can be "cc" (Sun C/C++ compiler), "gcc" (GNU gcc/g++/g77), "clcc" (Centerline C++), "f77" (Sun Fortran) or "f90" (EPCF90). On Sun SPARC systems UPS_SUNOS_STEP controls whether Step will take you into a routine if it is in a shared library. If not set, or set to 1, you can step into shared libraries. If set to 0 then Step will continue to the next statement in the current routine. Most software projects of any size develop formal or informal naming conventions that make it possible to spec- ify the desired format for a variable based on the name and, possibly, the type, regardless of the context in which it appears. If, like most software engineers, you spend much of your time debugging the same code, you can set up a UPS_FORMATS string in your environment to specify the desired formats for frequently examined variables. The following is an example of a UPS_FORMATS string: export UPS_FORMATS=" \ unsigned : UHEX; /* Default unsigned to hex */ \ unsigned *any_int[NTLW] : UDML; \ char abyte: OCT; \ *bits* : UBIN; \ auto " The first line of this format string causes ups to format unsigned variables in hex rather than decimal. The format string accepts C-style comments to allow for more readable .login or .cshrc files. The second line specifies that any unsigned variable whose name matches the string "*any_int[NTLW]" is an exception and should be formatted in decimal. Pattern matching is as in shells such as sh, csh, or bash. It is important that the exception come after the general rule specified in the first line. Note that in the UPS_FORMATS string, "char *foo" means any variable of type char whose name ends in "foo", not a variable named "foo" of type char*. The third line specifies that any variable of type char and name "abyte" should be formatted in octal. The forth line specifies that any variable of any basic type with the string "bits" in its name should be format- ted in binary. The last line specifies that any time the you change a format ups should automatically save the change and use it as the default format for any variable of the same name and type. The syntax of the UPS_FORMATS string is format_string ::= format_spec [ ; format_string] [;] format_spec ::= format_request | auto_save_request format_request ::= ["unsigned"] [type] [ pattern ] : [format] type ::= "char" | "short" | "int" | "long" pattern ::= < any C identifier with wild cards '*', '?' or "[]" > format ::= "UHEX" | "UOCT" | "UDML" | "UBIN | | "HEX" | "OCT" | "DML" | "ASCII" | "STRING" auto_save_request ::= "auto" In the format request, if the type is omitted then either all unsigned basic types or all basic types regardless of sign are selected. If the pattern is omitted the default pattern is "*" so that all variables of the specified type are selected. It is possible to insert pre-defined strings when editing text. This applies to all editing: in the typing line, in the display area, in breakpoint code and in the output window. The right mouse button invokes a menu of strings defined by environment variables of name `UPS_F*_STR' where `*' is a number from 1 through 12. When the cursor is over the typing line or output window, the mousehole shows "(menu)" for the right button as an indication that a custom menu may be available. The UPS_F*_STR strings accept control, meta, and escape characters as follows: \n, \r, or \e: Enter an escape character to termi- nate the edit ^A, ^B, etc.: Enter the corresponding control char- acter. @f, @b, etc.: Enter the corresponding meta charac- ter. This allows movement by words. \\ or \^ or \@: Override the special meaning of '\', '^', or '@'. As an example, it is often nice to have skeleton strings for `printf' or `cout' statements in breakpoint code, or a directive for expanding linked lists for the typing line, or a string for setting breakpoints on `cout' statements in C++ code. Yet another string can be used to call strcmp for a conditional breakpoint. The F6 string pastes in the X-windows selection and the F7 string sets a breakpoint in purified code. To do this, if you use csh(1), put the following in your environment: setenv UPS_F1_STR '$printf("\\n");' setenv UPS_F2_STR 'if (strcmp(, ""))' setenv UPS_F3_STR '@name .next' setenv UPS_F4_STR "ostream::operator<<" setenv UPS_F5_STR 'ostream::operator<<(&cout, "");' setenv UPS_F6_STR "^e^u^y\n" setenv UPS_F7_STR "%b purify_stop_here\n" If your shell is sh(1) or bash(1) then use: export UPS_F1_STR='$printf("\\n");' etc INTERACTIVELY ADDING SEARCH PATHS Search paths can be given to ups at any time during debug by selecting the `Source Files' header in the display win- dow and pressing Add source path. The typing line will prompt for input. It will display the last entry in the search path list as a default, if a list exists. Multiple paths may be entered at once by entering a colon separated list. This is the same syntax as the ups command line arguments. This enables the paths for source files to be found without the need to back out of the debugger and add the search path to the command line. Note that this will work only if the file is already an entry in the source file list, but cannot be listed. When this condition occurs, pressing the `path' caption will display the assumed path for the file, which must be in error. The program may have to be statically linked to find all source file names. LAYOUT OF THE UPS WINDOW The ups window is divided into a number of rectangular regions. This section gives a brief description of each region. It won't make much sense unless you are also looking at an ups window. o At the top of the window on the left is the typing line. On startup a black rectangle known as a editing cursor is shown. Typed characters appear in this region, and some ups commands use the text in this window as an argument (e.g., the command to search for a regular expression in a source file). o Below the typing line is the dynamic menu area. On startup this area is greyed out. See THE DISPLAY AREA below for a description of the dynamic menu. o Below the dynamic menu area is a region where mes- sages from ups appear (usually with a beep). o To the right of the above three regions is a mouse- hole. This has a representation of the three mouse buttons, and captions for each button saying what that button will do. The captions change as you move from region to region, reflecting the fact that the mouse buttons have different functions in different regions. o Below the preceding four regions is the display area - a large region used to display and investi- gate the current state of the target. There is a scroll bar to the left of the display area. See THE DISPLAY AREA. o Below the display area is the target menu. This has a set of commands for controlling target execu- tion. See CONTROLLING TARGET EXECUTION below. o Below the target menu is the source menu, with a set of commands for managing the source region, which is below this menu. There is a scroll bar to the left of the source region. See THE SOURCE REGION below. THE DISPLAY AREA The display area is the large region in the upper half of the ups window. Its main use is to show the state of the program when it stopped, though it is also used for other control functions. There are a number of captions in the display area, like Signals, Breakpoints etc. These are known as objects . To select an object, press and release the left mouse but- ton over it. Any objects that were previously selected are deselected, the object is inverted to show that it is selected, and a menu of commands applicable to that object appears in the second of the three slots at the top of the window. At any time this region of the display either contains a menu corresponding to a selected object, or is empty (painted a uniform grey) if there are no objects selected. A command selected from the menu (by pressing and releas- ing the left mouse button over the caption) is applied to the currently selected objects. It is possible to apply a command to a group of objects. To do this, select a group of objects by pressing the left mouse button over the first object and then dragging the mouse over the other objects you wish to select before releasing the button. You cannot select objects of different types simultane- ously as each different type of object has its own menu. Once the first object has been selected, only objects of the same type will be selected (and highlighted) as the cursor passes over them. The right hand mouse button is used to toggle whether an object is selected - clicking it over a selected object deselects that object, and clicking over an object that isn't selected adds that object to the selection. As with the left mouse button, you can drag the mouse with the right button down to toggle a group of objects. Several of the menu commands add new objects to the dis- play. For example, when you expand an entry in the stack trace all the local variables for the function it repre- sents are added to the display (see EXAMINING VARIABLE VALUES below). These new objects can be selected in the same way as the existing ones, and have an associated menu of commands. Once a few objects have been added to the display area, there is usually not enough room to display all of them at once. There is a scroll bar to the left of the display area which lets you scroll the display area up and down. To scroll, press and hold down the left mouse button whilst within the scroll bar, and move the mouse in the direction you wish the display to move. The further you move the mouse, the faster the scrolling. You can also use the left and right mouse buttons to page up and down through the display in the same way as with the xterm(1) scroll bar. Clicking the left mouse button in the scroll bar pages the display down. Similarly, clicking the right button pages the display up. The dis- tance paged depends on how far the cursor is from the top of the scroll bar. The black blob in the scroll bar represents the proportion of the entire display that is currently visible, and the position of this visible part within the whole display. For example, if the black blob is one third the height of the scroll bar, and in the middle, it means that the total height of the objects is about three times the height of the display area, and the middle third is currently being displayed. You can use the scroll bar to go directly to a given point in the display. Press and release the middle mouse button at a point in the scroll bar. The black blob is moved so that it centres around the point, and the display is moved correspondingly. THE SOURCE REGION The source region is used to display the source line that the target is currently stopped at, or more precisely the line that is about to be executed. Like the display area, the source region has a scroll bar to the left of it, which behaves in the same way as the display area scroll bar. Above and to the left of the source region is a box where the name of the current source file and the current line number is displayed. See the FILE NAME BOX section for details of the right button menu for this region. To the right of this is the source region menu with com- mands Back, Search, Up and Down. The Up and Down commands step up and down through the tar- get program's call stack. If you are looking at the source code of the currently executing function, Up switches the display to show the source of the function that called it. Repeatedly clicking on Up will take you all the way up the stack to main (or MAIN for Fortran pro- grams). Similarly, Down steps one level down in the call stack. When ups has been attached to a target, it is possible to detach without quitting the debugger by pressing the Detach caption at the bottom of the display window. At a later time, ups can then be attached to the same instance of the target, or to a new instance of the target by using the attach caption described below. On an attach, the debugger will reload any shared libraries that have changed, as well as any new shared libraries that the target uses. If ups has been detached from the target as described above, or if the target ter- minates for any reason, it is possible to attach to the same or a new invocation of the target without quitting the debugger. The advantage of this is that it may take several minutes for ups to initially come up, but once the symbol tables have been read, the time to reattach will be at most, of the order of tens of seconds, and often just a few seconds. All breakpoints and even breakpoint code will still work. After pressing Attach you will be prompted to enter the PID number. The PID of the last attached process is displayed as a default. If the new invocation of the target has changed, the reattached session may not work correctly if statically linked object files have changed. ups will re-read any changed shared libraries when attach- ing. A very handy use of the attach item is for debugging spawned processes that can timeout unless a communications handshake or license check is performed quickly. If the spawned process is stopped at a pause while ups is invoked from scratch, the process may well timeout and exit before ups can read all the necessary symbol information. The solution is to first invoke ups on the target without a PID in the command line. After the symbols have been read, breakpoints can be set, then the real process to be debugged is spawned. Then press Attach and quickly enter the PID of the spawned process to debug. Shared libraries are reloaded if they change between attach/detach cycles. So one can attach to a target, debug, detach and then rebuild a shared library that the target uses. Then after the target is rerun with the new library, ups can be attached again and the new library will be re-scanned and debugging can continue without quitting ups, and without the overhead of re-reading sym- bols for the other libraries. Breakpoints in the new library will need to be reset. Ups puts out a message about what libraries are being reloaded in such cases. The Search command is used to search for regular expres- sions (using the same syntax as grep(1) patterns) in the currently displayed source file. First type in the pat- tern to be searched for (typed characters appear in the typing line at the top of the window on the left) then press and hold down the left mouse button over the Search caption. A popup menu appears with the options Backwards and Forwards. Move the mouse over the one you want and release the button. If the pattern is found, the matching text is made visible in the source region and highlighted. You can click the left mouse button on any variable or function name in the source window to display it. Double clicks will alternately expand and compress the variable. Variables are added to the display area, as described in EXAMINING VARIABLE VALUES below. If you click on a func- tion name, the source for that function is displayed (this is similar to the tags facility in emacs or vi). Ups maintains a stack of where you've been. After you have clicked on a function name you can use the Back command in the source menu to return to where you were. With a left click, ups reads the function symbols before navigating to the function. You can bypass the symbol reading by using the middle mouse button. So an unmodified left click looks up local symbols, then globals, a Shift-left click does an automatic "add expr" and a middle click edits breakpoint code, but if not over breakpoint code it looks up global symbol lookup only. You can also get a function displayed by typing the name into the typing line at the top of the ups window. You do not need to type the whole name - just enough characters to uniquely identify the function. As for typing in a breakpoint, pressing ESC does partial name completion, and Shift-ESC, or Shift-RETURN will list the matching names in the output window. If a function appears by the same name in more than one source file, you can use the syntax `filename:funcname' to specify which function you want. Ups will also understand shell-style globbing with `*' (e.g. `*foo_func*') for function and global variable names, with the restriction that the pattern must match only a single name. Whenever the source region switches to a new source file, ups checks the last modified time of the source file against the last modified time of the target object file. If the source file is newer than the target you get a warning message and the source code is displayed with foreground and background colours reversed as a reminder that this source code might not correspond the object file you are debugging. See the section FILE NAME BOX below this for getting actual file dates. You can select arbitrary text in the source window by dragging the mouse over it with the left button pressed. The selected text is highlighted, and can be pasted into other windows, or other areas in the ups window (such as the typing line). Note that dragging (press mouse button, move mouse, release) has a different effect than clicking (pressing and releasing the left mouse button without mov- ing the mouse). FILE NAME BOX There is a menu associated with this file name box above the source, and the mousehole and cursor also indicate that the right mouse button invokes a menu over the region The menu has options to edit the source, show used and assumed file paths, rematch and reload the file, and to show file dates. The latter is useful for an explanation of why ups may be showing reverse video for a file. In the bottom output window, it list the source file date, the associated shared library date if applicable, and the tar- get file date. The menu is a convenient way to get infor- mation about a file without having to find the file in the source file list. For breakpoints, when the source is displayed, the menu provides a quick way to get at full file names and dates. EDITABLE FIELDS All editable fields in ups work in the same way. To start editing you click the middle mouse button over the editable text. A black marker bar appears - characters that you type appear to the left of this marker bar. You can reposition the marker bar by clicking in the new posi- tion with the middle mouse button, or by using one of the cursor movement key sequences described below. Clicking the left or right button confirms the edit. Clicking the middle mouse button outside the editable text area also confirms the edit. In both cases the mouse click is then interpreted as normal - this means that to confirm an edit you can simply move on to another activ- ity. The final way to confirm an edit is to type ESC (the escape key) or click the left mouse button on the Enter Button (the small region to the right of the typing line with the "<<" image). To paste the current window system cut buffer, use Con- trol-Y or click the middle mouse button on the Enter But- ton. When you try to confirm an edit ups checks that the new field value is reasonable. If not you get an error mes- sage and you are left in the edit. An immediate second attempt to quit abandons the edit and restores the origi- nal field value. Ups recognizes a subset of the GNU emacs key bindings when editing fields. In the current version there is no way to customize these key bindings. This will be fixed in a future release. You can use most of the common emacs key mappings when editing text (e.g. in the typing line, when adding break- points etc). Here is a list of the supported mappings (C- x means CONTROL-X, M-x means ALT-X, UP, DOWN, LEFT and RIGHT are the arrow keys, SPC is the space bar and DEL is the delete key): C-a Move to start of line C-e Move to end of line M-m Move to first non-whitespace character M-@, M-SPC Set mark C-w Delete text between mark and point C-p, UP Move up a line, if possible, otherwise retrieve the next previous item in the history buffer C-n, DOWN Move down a line, if possible, otherwise retrieve the next later item in the history buffer C-b, LEFT Move backwards one character C-f, RIGHT Move forward one character M-b Move backwards one word M-f Move forward one word C-j, C-m In an editable field, finish the edit. In the source win- dow, start a new line. ESC Finish edit, in both editable fields and the source window. C-c Cancel edit (not an emacs bind- ing). C-k Delete to end of line C-u Delete to start of line (not an emacsbinding ) C-d Delete character under cursor M-d Delete word starting at cursor DEL Delete character before cursor M-DEL Delete word before cursor C-y Paste X selection M-> Move to end of buffer M-< Move to start of buffer If you run ups from a terminal (or a terminal emulator like xterm), it tries to discover what keys you are using for delete and line erase. If this fails it takes both ^H (backspace) and DEL to mean delete, and ^U to mean line erase. EDIT HISTORY Most of the editable fields in Ups have their own history of recently typed commands. For example, there is a his- tory of typing line commands, a history of breakpoint code entered, and a history of variable values changed. Pressing the Left mouse button on the History Button, the small region to the right of the typing line with the tri- angular image, pops up a menu of recently entered data for that field. When editing most single line fields, a Control-P, or up arrow moves the history pointer back one entry and replaces the current text with the previous entry. Typing a Control-N, or down arrow, moves the history pointer for- ward one entry. Edit histories are saved between sessions of Ups in ups- state/editHistory, if you use the ups-state feature, or in the file ~/.upsEditHistory if not. CUT AND PASTE You can select text with highlighting by pressing the left mouse button and dragging. Releasing the left mouse but- ton sets the X selection. You can paste text into an edit with Control-Y or by clicking the middle mouse button on the Enter Button (the small region to the right of the typing line with the "<<" image). Another useful trick is to define paste strings by using control characters in a custom menu: e.g. define setenv UPS_F1_STR "^e^u^y" setenv UPS_F2_STR "^y" then the right mouse button will invoke a menu: the first item clears the current text no matter where the text cur- sor is, and does a paste; the second just does a paste at the current location. See the section ENVIRONMENT VARI- ABLES AFFECTING UPS for details on custom menus. In the source window there are some extra shortcuts: o Pressing and releasing the left mouse button (with- out dragging) adds a variable name to the display as in previous versions of ups. Only if you move the mouse to a different character with the left button down do you get a plain X selection. o Doing a press-left-and-drag selection with the shift key pressed automatically pastes the selected text as an expression into the appropriate place in the stack trace. It is equivalent to selecting some text, selecting `add expr' for the appropriate entry in the stack trace, pressing ^Y to paste the text and hitting RETURN. o If you hold the shift key down, the press and release the left mouse button without moving the mouse, ups adds the expression under the mouse to the display area. It makes a reasonable attempt to select what to display. Try it out to see what I mean. See PASTING EXPRESSIONS FROM THE SOURCE WINDOW in the man- ual page for more information. In the display window, left button selects objects for operations, and one can pan vertically to select groups of objects. Selecting objects for some operation is distinct from making an X text selection. However, while the but- ton is down, if the horizontal distance from the original click exceeds a certain value, the window shifts from selecting objects to making an text selection. So one can easily just pan right to select a string for instance. The pixel value is 30 by defaults, but can be overridden with an X resource. See "X RESOURCES" for details. EDITING IN THE OUTPUT WINDOW You can edit in the output window (the window where $printf output goes. Click with the middle mouse button to display a cursor. You can then append or delete text. This is useful for tidying up output to make it clearer, or for deleting uninteresting stuff. You can also dump objects (like the stack trace) to the output window (see the `Windows' menu item to the left of `Quit'), and save or restore the output window contents from/to files (`Load' and `Save' in the output window menu). LISTING MATCHING SYMBOLS FOR BREAKPOINTS Pressing Shift-ESC, or Shift-RETURN when setting a break- point lists matching functions in the output window. So `*' matches all function names, and `file.c:*' matches all function names for `file.c'. ESC states how many matching functions there are, while holding the shift key down lists them in the output window. To list all functions in a program (and there may be many thousands) enter `*' then Shift-ESC. The full path names of source files are given when listing symbols. Stripped libraries contain no symbol information or file names, so it is not possible to use the `file_name:func- tion_name' syntax to specify a unique breakpoint via the `Breakpoint' header. For such cases, ups accepts a shared library name in conjunction with the function name. The syntax is `shared_lib_name:function_name' This allows breakpoints to be set in specific shared libraries when there are name conflicts. The width of the breakpoint text has been doubled to allow for longer breakpoint specifications. EXAMINING THE TARGET'S STATE When the target is stopped at a breakpoint or when ups has been started with a core file, the target's state is show in the form of a stack trace in the display area. This consists of a line for each active function giving the name of the function, the source line number of the line that was being executed, and the name of the source file containing the function. The stack trace appears under the Functions object in the display area. As an example, consider the following stack trace: Functions main main.c:42 docmd commands.c:84 getline io.c:21 In this example, execution in function main reached line 42, at which point main called docmd. In turn, docmd at line 84 called getline. Getline is stopped at line 21 (which is yet to be executed). When the target stops, the source of the innermost func- tion is displayed, with the line that is just about to be executed highlighted (displayed in reverse video). To look at the source of other functions in the stack trace: o Click the left mouse button over a line in the stack trace. The line is highlighted, and a menu appears near the top of the window with the cap- tions Expand, Collapse, Add expr, Source, and Path. o Click on Source in the menu. The source corre- sponding to the selected line in the stack trace is shown, with the line that is currently executing highlighted. In this way you can see exactly where the target is stopped at any level in the stack. If the initialization file has been used to load only cer- tain libraries, unloaded libraries will be indicated by the sytax in the stack trace. To load it, select the line and press "Load library". As always for objects in the display window, multiple objects in the stack can be selected at once, and loaded as a group. EXAMINING VARIABLE VALUES There are several ways to find the values of variables. The simplest and most often used is simply to click with the left mouse button on the name of a variable in the source region. A line is added to the display area which looks something like: int 73 In this example, an integer variable called varname with a current value of 73 is shown. The meaning of the angle brackets around the name is explained later - ignore them for now. If the variable is local to a function, it is added just below the line in the stack trace for that function. If the variable is global, an entry for the source file of the variable is added below the Source files object in the display area and the variable is displayed below that. In rare cases ups does not know the type of the variable, in which case it is assumed to be an integer and displayed under the Untyped variables object. Once the variable is added to the display, it remains there until its function returns (for a local variable) or you explicitly delete it (see later for how to do this). This means that you can watch the value change as you con- trol the execution of the target. As well as selecting individual variables to be shown, you can add all the local variables of an active function to the display. Select the function in the stack trace whose variables you wish to see, and select Expand from the menu produced. This will produce a popup menu with the options Like before and Completely. The default option is Like before - it means to make the display look like it did last time you looked at the local variables for this func- tion. If there is no `last time', all the local variables are displayed. The second Expand option (Completely) always adds all the function's local variables to the dis- play. To remove all the local variables select Collapse. You can subsequently put them back as they were using Expand, Like before. If you have saved state enabled, you can do this even after exiting ups and starting it again. See the SAVING STATE section for details. When you use Expand to add all the local variables of a function, you may see some lines like this: _______ lines 84..93 _______ These lines are added for variables declared within inner blocks of a function. In this example, there is an inner block starting at line 84 and ending at line 93 which con- tains local variable declarations (the line numbers are sometimes inaccurate because of bad information supplied by some compilers). If you click the left mouse button over one of these entries, a menu with the options Expand, Collapse, Add Expr Source, and Path, is produced. Select- ing Expand adds to the display all variables declared in the block. Collapse removes them again, and Source makes the first line of the block visible in the source region. Selecting Path brings up a sub menu with Used, Assumed, Rematch, Reload and Dates items. The Used item shows what file is actually being displayed in the source window. The Assumed item displays the assumed path name of the selected file as suggested by the target binary. If the file could not be found under the Assumed name, the Used name will be the first good match in the source path list. For C code, there is normally no problem in finding the source and hence the Used and Assumed paths will be the same. For Centerline C++ code, the two are usually dif- ferent. Ups uses symbol table function line number infor- mation to find the most likely match. This also allows different files of the same name to be located correctly. This feature removes the need to constantly rearrange the Use paths in the ups init file to accommodate debugging different targets. Ups outputs a message for C++ files indicating what file was matched. When no symbols are available for a function, both items print the library name for that function. If for some reason the match process described above gets the wrong file, it is possible to find the next match in the search path list. To replace the file with the next match, select the Rematch item in the Path menu. The Reload item will reload the currently selected file. A situation where this may be useful is, when in the middle of a debug session, it becomes apparent that the debugger is using version of a file that differs from the build version of the file. If the current version is newer than the object code, or the target, the file will appear in reverse video as a warning. To correct such a problem, restore the file, and reload. This will reload the text and also retest the file dates and remove the reverse video if appropriate. The Dates item shows the full names and dates of the source file, shared library if used, and target binary. See the later section CONTROLLING THE DISPLAY OF VARIABLES for information on (among other things) how to change the format of a displayed variable, indirect through pointers, expand structures and unions and step through the elements of an array. EXAMINING MACRO VALUES It is also possible to examine the value of macros if that information has been included by the compiler. This can be done by clicking with the left mouse button on the name of a macro in the source region. A line is added to the dis- play region which looks something like: macroname 86 In this example, a macro called macroname with a value of 86 is shown. This line is actually an expression, as described in EXPRESSIONS IN THE DISPLAY AREA below. Because macros do not follow the normal language scoping rules, there is sometimes an ambiguity about what value to use for a macro. The rule used by ups is that the value of the macro on the first line of the function where you evaluate the macro is shown. If you are using gcc(1) you need to use the -g3 command line option when compiling to include macro information. ACCELERATORS IN THE DISPLAY AREA A Shift-left click or double left click does the most com- monly used actions for the object listed below: env header Toggle between expanding and compressing the envi- ronment display. signal header Toggle between expanding and compressing the signal display. source header Toggle between expanding and compressing all source files. Files are expanded to `like before state'. If some files have variables or expressions dis- played, such files will remain visible when the source file list is compressed. Use the menu item "completely" to remove all source files. source files Toggle between expanding and compressing all the global variables of the file file add expr See the actions under "variable". function Toggle between expanding and compressing all the outermost local variables. Variables are expanded to `like before state'. function block Toggle between expanding and compressing all the local variables of the block func add expr See the actions under "variable". variable If the variable is a struct or union, or pointer to a struct or union, toggle between expanding and compressing the current level of the variable. If the variable is a pointer to data of integer type, dereference the pointer one level. If the variable is of integer type, or fully dereferenced pointer to a such a variable, toggle between unsigned hex and signed decimal formats. bpt header By default, toggle the global breakpoint enable flag. The BreakPointHeaderAcceleratorAction X resource may be set to request that ups prompt for a new breakpoint instead. breakpoint By default, toggle the current breakpoint between the active an inactive states. The BreakPointAc- celeratorAction X resource may be set to request that the breakpoint be removed instead. Double clicking ( but not shift-clicking) on the break- point in the source window selects has the same effect of toggling or removing breakpoint according to the BreakPointAcceleratorAction X resource. SOURCE FILES MENU There is a menu for compressing the source file list. It has options of "first level" and "completely". The Shift- left accelerator on the source file header is equivalent to "first level". When globals are displayed in ups, they appear under the source file name. The "first level" item only removes files that do not have any globals or expres- sions displayed. This cleans up the display, just leaving items of interest. The "completely" item removes all file names and globals from the display. If state has been saved from a prior usage of UPS on the same target, by creating a "ups-state" directory, the next invocation of the debugger allows you to restore the glob- als shown before. After the target is running, simply expand the source file list to show all files and the cho- sen globals, then compress the list to the first level to leave just the globals. BREAKPOINT MENUS By selecting a breakpoint, the Activate and Inactivate, captions control whether the breakpoint is either active or inactive. Active code is executed normally, whereas inactive code is ignored. The activation state is set by the two captions labeled Activate and Inactivate that appear after selecting the breakpoint object. The current state appears to the right of the breakpoint line number. The Execute caption can be used to execute breakpoint code whenever the target context allows it. The most common use for this is to repeatedly call a function, such as the Purify API functions purify_describe() or purify_all_leaks() without having to enter the call at every line in the source where it may be required. By selecting the Breakpoints header object, the captions labeled Enable and Disable allow global control of pro- cessing of breakpoints. When globally enabled, all break- point code is examined, and if the breakpoint is active, the code is executed. Conversely, when breakpoint code is globally disabled, no breakpoint code is executed, regard- less of its activation state. The current enabled state is implicitly shown by the shaded caption - so after pressing Disable, that caption is shaded and the Enable caption becomes normal. When globally disabled or individually inactivated, the breakpoint code will still exist in the source, but the code will be ignored until re-enabled. The target will run at full speed for such breakpoints. When typing in a breakpoint, pressing ESC does partial name completion whenever possible. So if a program has just two routines, `process_key()' and `process_cmd()', typing `p' then ESC will expand the line to `process_' and in the third line will be a message like `process_' matches `process_key' and `process_cmd'. Then typing `k' then ESC will complete the line to `process_key' See the LISTING MATCHING SYMBOLS FOR BREAKPOINTS section for details on listing the matches. SPECIAL HANDLING FOR SIGSEGV AND SIGBUS Some programs have exception handlers that allow the pro- gram to continue to run despite receiving SIGKILL, SIGSEGV or SIGBUS signals. If SIGSEGV or SIGBUS are changed from the default of `Stop - ignore signal on continue' to `Stop - accept signal on continue', ups will stop on the excep- tion, but allow the target to continue running upon press- ing Cont, Next, or Step. SIGSEGV or SIGBUS signals that intercepted by third party software such as ObjectStore can be handled by setting the signal to accept and continue. Do not use ignore as then the target never gets the signal and it will appear to hang. However, when set to accept and continue, the target can crash on bad code, but ups will not catch it. For such cases, set a breakpoint in the a target's signal handler (if it has one), or change `accept' to `stop'. CONTROLLING TARGET EXECUTION Once you have the target stopped at a breakpoint there are several ways of controlling its execution. Most of these are invoked from the target menu - the permanent menu just below the display area. The usual way of debugging is to set a breakpoint in the function which you think is misbehaving and then step through its code one line at a time. The GETTING STARTED section above explains how to set breakpoints and start the target running. To step over a line of source, select Next from the target menu. The code on the highlighted line is executed, and the highlighting moves on to the next line to be executed. The values of variables in the display area are updated every time the target stops, so you can watch values change as you step through the code. On colour displays variables are shown in a different colour if their values have changed since the last time the target stopped. If the line to be executed calls a function, Step takes you to the first line of the called function, and stepping continues in the function. The step action may take some time occasionally; however the Stop command can be used to break out such a situation. If you don't want to step through the code of called functions in this way, use the Next command. This behaves like Step, except that it never steps into called functions. Both Next and Step work with respect to the currently dis- played source. If you click on a function in the stack trace and select Source to display its source, a subse- quent Next or Step moves to the next line of the displayed source. This makes it easy to get out of a function that you have stepped into by accident and don't wish to step all the way through. Use the Source command to display the source of the calling function, then use Next or Step. The Cont command in the target menu offers a third way to control the target - this command runs the target until it hits another breakpoint, gets a signal, or exits. See the section THE SOURCE REGION for details about the Attach and Detach buttons. Finally, you can `drag' execution in the target to a line in the source file. Move the mouse cursor over the line you wish to get to, and press and hold down the right mouse button. A popup menu appears, with the captions Add breakpoint Execute to here. Jump to here. and Edit source. Drag the mouse down so that the Execute to here caption is highlighted, and release the button. The effect of this is to set a temporary breakpoint at the line, temporarily disable all other breakpoints, and then continue the target. You can use this command to move past uninteresting bits of code without having to set up and remove breakpoints. The second command on the popup menu, Add breakpoint, adds a breakpoint at the line of source you pointed at. Unfor- tunately, to set a breakpoint at (or execute to) a single statement that extends over several text lines, you must point at the last text line. This is due to limitations in the symbol table information put out by the compilers. The Jump to here command causes the target execution to jump to the current line without executing any intervening code. Use this with caution as it is possible to jump to a bad context where the data is bad or where there is no valid call stack. The safest usage is to jump over lines within a function. It can also be used to jump back within a function. If you try a jump to an invalid context, such as to a point up in the stack, you can use the stop button to restore the program to the state it had before the jump. When the current lowest level function has no sym- bols (such as "poll"), you will need to press the stop button twice to restore the program state. The Edit source command spawns an editor (typically either emacs or vi), and set the cursor at the current location in the file. The editor used is controlled by the EDITOR environ- ment variable. You can stop the target running at any time by clicking on Stop in the target control menu. The target will then stop wherever it is currently executing as if it had hit a breakpoint. In addition, if a symbol search puts the debugger in a long traversal of stack functions or files, the stop command will break it out of the search. The com- mand is queued, and will be honored after completing the scan of the current function or file. In addition, the stop command will break out of a step command that is tak- ing a long time. The Kill command kills off the current instance target process. You can then use Start or Execute to here to start the target again. Quitting ups also kills the tar- get process (unless you attached ups to a running process, in which case ups detaches from the process and leaves it to continue unmolested). THE TYPING LINE MENUS The caption labeled Windows, just to the left of the Quit caption, provides a number of options loosely related to coordinating the various UPS windows. The Snapshot Selected Objects item dumps objects (like the stack trace) to the output window. The Snapshot All Objects item dumps the complete display to the output window. The Message Logging item toggles on or off the copying of all subse- quent messages printed to the message line to the bottom window. As well as providing a log of messages, this facility allows the text of messages to be selected for pasting. This allows a path that has been displayed with the path caption to be pasted when setting a breakpoint in a function name that is not unique. The four items No Raise On Break, Raise On Break, Raise On Break/Lower On Run and Raise On Break/Iconify On Run select how ups manages its window(s) when the target pro- cess goes in or out of run. The default action is No Raise On Break, that is, no special action is taken. If Raise On Break is selected, ups will automatically raise its main window to the foreground when the debugged appli- cation stops. If Raise On Break/Lower On Run is selected, then in addition to raising the main window on a break, ups will lower the main window to the bottom of the window stack, after a brief delay, when the process goes into run. If Raise On Break/Iconify On Run is selected, then in addition to raising the main window on a break, ups will iconify the all windows, after a brief delay, when the process goes into run. In split screen modes, these options raise or lower the window containing the source display and start/next/step buttons. The initial state of these options may be set using the WantRaiseOnBreak family of X Resources (see the section X RESOURCES below), or by the -raise_on_break, -lower_on_run, and -iconify_on_run command line options. The button labeled Search to the left of the Windows but- ton is used to search for regular expressions (using the same syntax as grep(1) patterns) in the display window. First type in the pattern to be searched for (typed char- acters appear in the typing line at the top of the window on the left) then press and hold down the left mouse but- ton over the Search caption. A popup menu appears with the options Backwards and Forwards. Move the mouse over the one you want and release the button. If the pattern is found, the matching text is made visible in the display region and highlighted. The button labeled Help to the left of the Search button provides simple textual help information on a variety of topics. Output is placed in the bottom output window. By default, the text is appended to the bottom of the window, with the scrollbar positioned so that the topic begins at the top of the window. The last item in the help menu allows the window to be cleared before a new help topic is printed out. TARGET COMMAND LINE The first line of the display area shows the command line that specifies the target to debug. It can be edited and changed to a different target at any time in order to debug a different target. It accepts csh style tilde nota- tion. When changing targets, ups will read new symbols as necessary and reinstate breakpoints and variables as pos- sible. So if you are working on a shared library, and you need to test it with different targets, simply enter the new target name and attach, and the debug state informa- tion will be preserved. TARGET COMMAND LINE ARGUMENTS The second line of the display area shows the command line arguments that will be given to the target when it is next started. The arguments shown include the zero'th argument which is initially set to the name of the target. You can specify an initial set of arguments for the target with the -a option when you start ups. If you don't give the -a option and you are debugging from a core file, ups attempts to extract the command line arguments from the core file. Otherwise the command line contains no argu- ments other than the name of the target. Ups parses the command line in a similar way to the shell. It supports Bourne shell type redirection (>, >>, <, >&dig, etc.) as well as the csh forms >& and >>&. Ups also understands most csh metacharacters - globbing with `*', `?' and `[xyz]', the `~', `~user' and `{a,b,c}' shorthands, and quoting with single or double quotes and backslash. The current version of ups does not support $var type shell variable substitution. You can edit the command line at any time to change the command line arguments (although the changes will only take effect when you next start the target). The command name shown is just the zero'th argument and can be edited just like the other arguments. This is use- ful with programs which use the zero'th argument as a sort of hidden flag. Changing the command name only affects the arguments given to the target - it does not change which program is being debugged. CONTROLLING THE DISPLAY OF VARIABLES When you add a variable to the display (see EXAMINING VARIABLE VALUES above) it is displayed in a default for- mat. If you click the left button over the line for the variable, a menu appears in the top part of the window. You can use this menu to set the display format for the variable ( Format) , to change the level of indirection for pointers (* and &), to expand all base classes and show vector tables for a class ( ::), to show all the mem- bers of structures and unions ( Expand and Collapse), to choose the format variables are displayed in Format, to duplicate or delete entries for variables ( Dup and Del) to control whether typedefs are used in displayed vari- ables ( Decl) and if watchpoints are available, add a watchpoint at the variable address ( Watch) Pointers The default for a pointer variable is simply to show the pointer value in hex. To take a common example, if you add a variable of type pointer to pointer to char called argv to the display, you will get a line like: char ** 0x7fffe184 The angle brackets separate the type from the value. In this example, what is shown is the value of argv, which is of type char **. If you now click with the left mouse button on this line, and select `*' (the leftmost caption) in the variables menu, the format of the line changes to something like: char * 0x7fffe1d0 This says that what is shown is the value of argv[0], which is of type char *. The braces (`{' and `}') are used to distinguish a dereferenced pointer from a true array. A second click on the `*' menu option changes the line to: char "foo" This is a special case in ups - variables of type char are displayed as strings if they are indirected pointers or members of arrays. The `&' menu option is the opposite of `*' - it drops one level of indirection. You can only use this on indirected pointers. Use an expression if you want to see the address of a variable (see EXPRESSIONS IN THE DISPLAY AREA below). Arrays Arrays are initially displayed with all subscripts zero. You can edit the subscript to another value by clicking on it with the middle mouse button. A marker bar appears, and you can use the delete key to delete the old subscript and type a new one. When you hit ESC, the value of the new array element is shown. Often you wish to quickly scan through all the elements of an array. You can do this using either the arrow key or the `>' and '<' keys. When editing an array subscript, the '>' key adds one to the subscript value and displays the new element. Note that the ReverseArrows X resource can be used to reverse the function of the arrow keys. Similarly, the '<' key subtracts one from the subscript value. Using these keys you can rapidly scan up or down an array. Emacs users can use ^P and ^N as synonyms for '<' and '>'. Vi users can use 'k' and 'j' similarly. The arrow (or whatever) keys actually act on the digit to the left of the cursor, so by moving the cursor left you can step by tens, hundreds etc. Structures Note: in this section `structures' also include unions: they are simply treated as structures with all members having an offset of zero. Variables that are structures or pointers to structures are initially displayed with just the address in hex. You can use the Expand command in the variables menu to add all the members of a structure to the display. The struc- ture members are indented to make it clear which structure they belong to. Clicking on Expand will produce a popup menu with the options Expand Structure and Expand Static Variables. Selecting Expand Structure will display all the non-static members members of the structure except vector tables. ( See the section EXAMINING BASE CLASSES AND VECTOR TABLES below for vector tables.) If the selected item is a member of a class with static members, the Expand Static Variables option will show all the static members of the class. See the section EXAMINING STATIC MEMBERS OF CLASSES below. If a structure element is itself a structure or a pointer to a structure, it can be expanded in turn to show all its members. In this way linked data structures can be explored. For a more selective way of exploring a linked data structure, see the EXAMINING LINKED DATA STRUCTURES section below. Show size will display size of the arrays and structures (but not memory sizes that may have been allocated to a pointer - such variables will the standard 4 bytes). Note that in the display window, a variable formatted as "type " indicates an array, whereas "type " indicates a pointer. To remove all the members of a structure from the display, use the Collapse command in the variables menu. This has a submenu with the options First level and Completely. The first of these removes all members except expanded ones; the second recursively collapses all expanded struc- tures below the selected one. Changing formats By default integer variables are displayed in decimal and pointer values are shown in hex. You can change the for- mat with the Format command in the variables menu. The possible formats are signed or unsigned decimal, hex, octal and binary, as well as `ascii' and `string'. The `ascii' format displays integers in C character notation (e.g. the value 65 is displayed as `a'). The `string' format is applicable to variables of type char that are indirected pointers or arrays - it treats the address as the first character of a NULL terminated string. Floating point values are shown in the conventional nota- tion (using the printf %g format). You can use the Format command to display a hex representation of the value (it makes no difference whether you select signed or unsigned hex from the menu). This shows in hex the bit pattern used to represent the floating point value. Duplicating and deleting entries The Delete command in the variables menu deletes all selected variables from the display area. This is useful for tidying up the display by removing variables that are no longer of interest. Sometimes it is useful to have a variable displayed more than once. One common case is where you want to see sev- eral elements of an array simultaneously. The Dup command in the variables menu duplicates the entries for all selected variables. So to see multiple elements of an array, use Dup to add an entry for each element you wish to see, then edit the subscripts separately for each entry. When duplicating a pointer variable for which the contents of the pointer is displayed, the array index is bumped by 1, or by 40 if a string is displayed. Use of typedefs If a structure, union or enum has a typedef name then ups will use it in the display area. Thus if you have the following in a function: typedef struct foo_s { int x; int y; } foo_t; foo_t *f; then clicking on variable f will add a line like: foo_t * 0x40ec to the display area. Typedefs are not used if they hide a level of indirection or an array, or if the typedefed type is not a struct, union or enum. If you want to see the non-typedef type for a variable in the display area, select the variable and press and hold down the left mouse button over the Decl command in the variables menu. This produces a popup menu with the cap- tions Use typedefs and Ignore typedefs. Release the mouse over Ignore typedefs and you will be shown the non-type- defed type for all the selected variables. CHANGING VARIABLE VALUES You can change the value of a displayed variable simply by editing the displayed value (i.e. by clicking on it with the middle mouse button and editing in the new value). This works for C pointers and integral types (including enums), floating point values and strings. You can use any of the integer display formats for the new value (decimal, hex, octal, binary or ASCII character). You can use enum constant names for new enum values, and function names for function pointers. When editing strings or characters you can use the standard C notation for special characters (`\n', `\b', `\007' etc). Normally ups will not let you edit extra characters into a string as this would overwrite whatever was stored in mem- ory just after the string. If space is known to exist (for example if the string is stored in an array of known size and there are unused bytes) then you can add as many characters as will fit. If you know you want to overwrite memory beyond the end of the string you can force ups to accept a long value by putting `>>' before the leading quote character of the string. Normally a trailing NUL ('\0') is added to the edited string in the normal C way. If you delete the trailing quote character then this is omitted. EXPRESSIONS IN THE DISPLAY AREA You can add C expressions as well as variables to the dis- play area. This is useful if you wish to see what an expression in the source code evaluates to. It also allows you to use casts when you know better than the source code what the type of a given variable is. To add an expression, select a function in the stack trace and click on Add expr in the function menu. A marker bar appears, ready for you to enter an expression. When you have finished type ESC, and if the expression is legal the value will be displayed. If there is an error in the expression you will get an error message and the marker bar will be repositioned at the point of the error. A workaround for dealing with preprocessor macros is to create a repltab file. Ups will look in ups-state/repltab below the current directory. If that file does not exist, it will look for $HOME/repltab. See the section PASTING EXPRESSIONS FROM THE SOURCE WINDOW for details on the repltab file. In an expression you can use any variable name, structure tag or typedef name that is in scope in the function. If you want to add expressions using a variable in an inner block, you will have to add the expression to the appro- priate inner block. The easiest way to get the inner block object displayed is to click on a variable in the inner block in the source region. Once it is displayed select the block header and click on Add expr in its menu. If your compiler has included macro information as part of the debugging data then you can also use macro names in an expression. When you do this the macro is assumed to have the value which it held on the first line of the function where you have entered the expression. You can `bump' numbers in expressions in a similar way to array subscripts. Hitting the down arrow (or Control-N) over a number while editing an expression increases the digit to the left of the marker bar and displays the new value of the expression. Similarly the up arrow (or Control-P) decreases the digit to the left of the marker bar and redisplays the expression value. Expressions are reevaluated like variable values every time the target stops. They also have the same menu asso- ciated with them as variables, and you can have both expressions and variables in the same selection. All the menu commands work as they do on variables. This means in particular that if you add an expression whose type is `pointer to struct' (or union) you can use Expand to show the structure elements. You can also use Format to change the format used to display the expression value. You can call target functions in expressions, but you can't modify target data in a display area expression (thus operators like `++' are illegal). EXAMINING BASE CLASSES AND VECTOR TABLES When the object selected is a class, clicking on :: recur- sively adds all base classes for the object to the dis- play, and displays the vector table(s), showing the address symbolically when possible. This is useful if you want to expand a base class to look at a member of a base class several levels deep in the class hierarchy, without expanding everything in between. In addition, it is usually possible to tell from the name of the vector table which subclass of the current class the object is "really" a member of. A special case worth knowing about occurs when the selected object has been deleted. In this case, the vec- tor table will indicate that the object is a member of the root class for the class hierarchy, rather than of any subclass. For example, consider the short C++ program: class A { public: A() { cnt++;} virtual ~A() { cnt--;} private: static int cnt; }; int A::cnt; class B : public A { public: void bad(); virtual void v() {} }; class C : public B { public: virtual void v() {} }; void B::bad() { delete this; v(); } main() { C* c = new C; c->bad(); } If you stop at the start of B::bad(), click on "this" then select "::", you will see something like: Functions main B::bad B* 0x12345678 struct A 0x12345678 void *<_vtbl.> C::__vtbl Breakpoints The _vtbl entry shows that "this" is really a C, a sub- class of B. When you single step over the delete, the display changes to Functions main B::bad B* 0x12345678 struct A 0x12345678 void *<_vtbl.> A::__vtbl Breakpoints Since class A is a base class for B, seeing that "this" is really an A in a method for class B is surely an error, and often results from object having been been deleted. The expansion of base classes only works for compilers that include base class information in their symbol tables, namely for g++ and SC4. The symbolic representa- tion of vector tables works for both of these and also for cfront. EXAMINING STATIC MEMBERS OF CLASSES Static members of classes may be examined as other global data. In addition, depending on the compiler, they may be examined as members of a structure are examined. In the example in the previous section, the static member A::cnt may be displayed by Typing "A::cnt" in the typing line. Clicking on "A::cnt" anywhere in the source window. In addition, if the compiler supplies information about static members in the symbol table (g++ and SC4 do this), A::cnt may be examined by: While in a NON-static method for class A, click on "cnt" in the source window. Select an object of type A and enter ".cnt" in the typing line. Select an object of type A, press the Expand option then select Expand Static Variables from the resulting popup menu. This latter option displays all static members for class A. PASTING EXPRESSIONS FROM THE SOURCE WINDOW It is often useful to display the value of an expression in the source. You could select Add expr as described in the previous section, and cut and paste the expression from the source window. This works, but there is a quicker way: simply select the text of the expression in the source window while holding the shift key down (i.e. press the shift key, then drag the mouse over the desired text). When you release the mouse button, the selected text is added as an expression in the display area. It is OK to drag over multiple lines. You will notice that when you first press the left mouse button (with the shift key pressed), ups highlights some text. This is its guess as the to expression you would like to paste. If you are happy with this, release the mouse button without moving the mouse, and the highlighted text will be added as an expression. If the highlighted text is not what you want, drag the mouse to make the selection as described before. Pasting expressions from the source window can often fail because of preprocessor macros which ups does not under- stand (e.g. NULL). The correct fix for this is for ups to understand #defines, but in the interim there is a workaround: if the file ups-state/repltab exists below the current directory ups will apply the substitutions speci- fied there. If that file does not exist, it will look for $HOME/repltab. Here is a repltab file that would deal with NULL and EOF: # Repltab for ups NULL 0 EOF (-1) Hash comments and blank lines are ignored in the normal way. Any substitutions will be visible in the pasted expression. Ups checks to see if the repltab file has been updated each time an expression is pasted, so you don't have to restart ups to it to notice changes. ADDING INTERPRETED CODE The ups display area gives a good picture of that state of a program at any one time. Often though, you want a record of what happened over a series of calls of a func- tion. This is one of the reasons why people still tend to put print statements in code despite the availability of debuggers and the inconvenience of recompiling the code. To make it easier to add diagnostic output statements, ups allows you to insert fragments of C code at any break- point. The default breakpoint action - stopping the tar- get - is represented as a fragment of pseudo C code. This is the #stop; line that appears in the source region when you add a breakpoint. You can change this to a fragment of C code, editing the text in the usual way by clicking the middle mouse button to position a marker bar. You can use the RETURN key to enter multi-line code fragments. As with other editable fields, you end the edit with ESC. If there is an error in the code, an error message is given and the marker is positioned at the point of the error. For example, you could change the breakpoint action to: printf("Entered function foo with x = %d\n", x); From now on, whenever the target reaches this point in the program, it will call printf rather than stopping. Note that a breakpoint will not stop the target unless the special keyword #stop is executed. You can use this to set conditional breakpoints, like: if (i == 72) #stop; or, to use a more sophisticated example: if (strcmp(p->p_name, "foo") == 0) #stop; In the above examples, the function calls (printf and str- cmp) are implemented as calls to functions in the target. You can call any target function from a breakpoint, but in the current version of ups all functions are assumed to return int. You can often get around this by casting the return value to the correct type. One problem with calling functions like printf to do diag- nostic output is that the output is mixed up with the nor- mal output of the target program. If you want the output kept separate, use the built in ups function $printf. This function creates a new region in the ups window the first time it is called, and sends output to that region. The menu at the top of the region allows you to search for regular expressions in the output, as well as page through it and clear all output. The $printf function takes the same format string as printf, with one addition. The `%v' format string can be used with any variable type, and means print in the default ups format for the type. The `%v' format charac- ter will print symbolic names for enum values and function pointers (i.e. you will get output like RED and close_callback rather than 23 and 0x5e748. In addition `%v' applied to a struct or union pointer will print the names and values of all the fields of the pointed-to struct or union. You can declare your own variables in breakpoint code. This is useful when you want only want to stop at a break- point after it has been hit a given number of times. A code fragment to do this would look something like: { static int count = 0; if (++count == 74) #stop; } This would stop the target the 74th time the breakpoint was encountered. Static variables are reinitialized every time the target is started. Automatic variables are uninitialized and do not preserve their values between separate executions of breakpoint code. You can mix C interpreter variables with real target vari- ables in expressions in breakpoint code, with some restrictions. You can assign to target variables, but making a target pointer point at an interpreter variable will not work, as interpreter variables do not exist in the target's address space. On the other hand, the inter- preter knows about the target address space, so you can point interpreter variables at target variables. Note that you can only add interpreted code - you can't directly affect the flow of control of the compiled code. For example adding a return statement will not cause the compiled function to return to the caller. It is some- times possible to indirectly affect the flow of control by judicious changes to variable values. You cannot add C interpreter variables to the display; if you click on a variable in interpreted code it is taken to be a variable from the target process. [ You probably want to skip this paragraph. ] For people who want to live at the ragged edge, the C interpreter uses copy-in copy-out semantics when passing interpreter addresses to the target. If you pass an argument of type pointer to T to a compiled target function then the inter- preter copies sizeof(T) bytes to the target address space and passes a pointer to that copy. When the target func- tion returns the same number of bytes are copied back from the target into the interpreter address space. Similarly when you pass an array, the contents of the array are copied in and out. Note that this mechanism does not work in general - it only copes with passing an array or a pointer to a single object. The main motivation for this feature was to make string literals (e.g. "hello") work as expected when passed to target functions like strcmp. EXAMINING LINKED DATA STRUCTURES Ups has several facilities that are useful for examining linked data structures. Firstly, you can expand struc- tures or structure pointers. By repeatedly expanding structures you can follow down a linked list or tree. Often this adds too much information to the display, as you are probably not interested in all the structure ele- ments. There is a more selective method of expanding lists and trees which lets you easily see just the ele- ments you want. Suppose you have a structure declaration like this: struct linkst { struct linkst *prev, *next; int key; }; Suppose also that you have a variable linkptr displayed which is a pointer to this structure. If you type in a `.' followed by the name of element, such as prev, that element of any selected structures or struc- ture pointers will be added to the display and selected when you hit ESC. Assume linkptr in the example above is displayed and selected. Typing .next followed by ESC will add the next field of linkptr to the display and select it, and dese- lect linkptr. Typing ESC again will add the next element of the list. Thus by repeatedly typing ESC you can easily walk down a linked list. You can give many structure elements separated by spaces. Thus the line .key .next would add both fields to the display. In this way you can walk down a linked list with members of interest displayed as well as the links. One problem with this way of looking at lists is that the indentation of structure elements tends to make the list wander off the right hand side of the display area. To avoid this you can say `@member' rather than `.member'. The `@' character means do not indent - this is the only difference between it and `.'. Thus to get a nicely laid out list in the example above you could enter the line: .key @next and keep typing ESC to walk down the list. One last wrinkle: if you add `#nnn' to the end of the typ- ing line, where `nnn' is a decimal number, the effect is as if you had pressed ESC that number of times. This is handy if you want to see all of a 500 element linked list without having to type ESC 500 times. In C interpreter code (described in the previous section) you can scan through a linked list as if it were an array using the (non-standard) `->[count]' operator. This is a shorthand for applying the `->' operator count times. You can use the arrow keys (or ^N and ^P) as described in EXPRESSIONS IN THE DISPLAY AREA to bump the count parame- ter up or down and step through a linked list one element at a time. Thus in the example above, adding the following expression to the display area: linkptr->[0]next would just show the value of linkptr (the -> operator is being applied zero times). You can expand the structure and add and delete elements to get the display set up as you like. Then you can edit the `0' to `1' to see the next element of the list, and so on. DUMPING MEMORY The contents of raw memory may be dumped to the output window in two ways. If the memory to be dumped is the address of a simple variable or structure, or is pointed to by a pointer variable, select the variable of interest, press the Expand option then select Dump Memory from the resulting popup menu. This option displays the contents of memory at the selected address. The length of memory displayed, and the grouping (as bytes, shorts, or longs) is based on the type of object selected. This option also prints in the output window the equivalent typing line command, which you may copy to the typing line and edit as required. The commands to display memory through the typing line begin with "%d" (for dump): %d address [size|.. end_address] dump size bytes of memory at address %db address [size|.. end_address] dump size bytes of memory as bytes at address %ds address [size|.. end_address] dump size bytes of memory as shorts at address %dl address [size|.. end_address] dump size bytes of memory as longs at address If the size is omitted, 16 bytes are displayed. If the grouping is unspecified, bytes or shorts are selected depending on target endianness. ENVIRONMENT VARIABLES By default the target inherits the same set of environment variables as ups . You can change this using the Environ- ment object in the display area. Any changes to the tar- get environment take effect the next time the target is started. Selecting the Environment object produces a menu with the commands Expand, Collapse, Add entry and Reset env. The Expand command adds an entry to the display area for each environment variable. You edit an environment variable name or value by clicking on it in the normal way with the middle mouse button. Collapse removes all the entries from the display area. To add a new entry select Add entry from the environment menu and type in the `name=value' string. Ups will accept any string as an entry, but gives a warning for odd-look- ing entries. If you wish to abandon any changes you have made to the environment select Reset env. This resets to the environ- ment to the state it was in when ups was started. If you select an individual environment entry you get a menu with the options Hide, Delete and Append entry. The Hide command removes the entry from the display but not from the environment. This is useful for clearing the display of uninteresting entries. By contrast the Delete command removes the entry from the environment. The Append entry command allows you to add a new environment variable just after the one selected; this is useful if you need the environment set in a particular order. SIGNALS When the target gets a signal control returns to ups. Depending on the signal and the way you have specified it should be handled, the target is either stopped or restarted (possibly with a display refresh), and the sig- nal can either be passed on to the target or ignored. Near the top of the main display area is a Signals object. Selecting this produces a menu with Expand and Collapse as options. Expanding the signals object produces a list of all signals, with the current way the signal is handled displayed for each signal. Selecting a signal produces a menu which lets you change the way it is handled. You can control whether a given signal causes ups to stop the target, refresh the display and continue the target or just continue the target without refreshing the display. You can also control whether the signal should be passed on to the target. You can trim the signals display by selecting the ones you aren't interested in and clicking on Hide in the signals menu. This will remove those signals from the display area. The `Next' and `Step' commands both step over functions called as a result of a signal. Breakpoints in signal handling functions work normally. TYPING LINE SHORTCUTS A few frequent requests can be invoked by typing input as an alternative to mouse operations. o Typing "%g name" will display the global variable or function `name', skipping the sometimes slow search for `name' as a local variable. o Typing "%l file" will list 'file', the same as expanding the list of source files and clicking on a file name. It is only necessary to enter the final component of the file name. o Typing "%b function" will enter a breakpoint at the entry to `function', the same as clicking on the breakpoint header, selecting "add breakpoint", and entering the function name. o Typing "%d address" will dump 16 bytes of memory at the given address to the output window. See the section DUMPING MEMORY for more on the %d command. o Typing "/pattern" or "?pattern" will do a forward or backward search for pattern. The search may be continued in the same direction by hitting RETURN, or in either direction using the Search pulldown menu. X AND SUNVIEW COMMAND LINE FLAGS Under SunView ups recognizes the standard SunView tool flags. These can occur anywhere on the command line. Under X ups recognizes most common X11 command line argu- ments. The currently recognized flags are: -iconic Start up as an icon rather than as a window. -display displayname Create a window on the named display rather than using the value of the DISPLAY environment vari- able. -geometry geometry Use the specified X geometry for the window. -name name Use name rather than the default ups as the window and icon name. This name is also used when fetch- ing X defaults. -fn fontname Use X font fontname rather than the default. -fg colorspec Use colorspec (which should be a standard X11 color specification) as the color of the foreground pixel. -bg colorspec Use colorspec as the color of the background pixel. -rv Reverse the foreground and background pixel colors. These options are available under X and SunView: -mono Force monochrome mode even if when using a color display. Use this flag to stop ups interfering with the colormap on pseudocolor displays (e.g. when you are debugging a program with a colormap related problem). The flag is also useful on some Sun displays under SunView where using monochrome significantly increases the display speed. -wn_record filename Record mouse and keyboard events in file filename. -wn_replay filename Read mouse and keyboard input from file filename rather than the mouse and keyboard. The file file- name must have been created with the -wn_record flag in a previous session. -wn_replay_warp When replaying events with -wn_replay, warp the mouse in the ups window to reflect the recorded mouse movement events. X RESOURCES Ups recognizes a number of X defaults. By default it uses the last pathname component of the name you run it with as the application name when looking up resources (i.e. if you run it as `/usr/bin/ups' it will use `ups'). You change the name with the -name flag described above. If it fails to find a resource with the application name, ups does a lookup using `Ups' (note the initial upper case letter). A resource specified as `Ups.xxx' will thus always be noticed. Finally ups looks in the resource file /usr/lib/X11/app-defaults/Ups if a resource is not found anywhere else. (In addition to the above directory, ups looks for the file Ups in the colon separated list of directories given by the environment variable XUSERFILE- SEARCHPATH, and in the single directory given by the envi- ronment variable XAPPLRESDIR.) The current list of recognized resources is: Font The name of the normal font. The default is `fixed'. MenuFont The font used for menu captions. The default is to use the normal font. SrcFont The font used for text in the source window. The default is to use the normal font. EditFont The font used for editable text in the source window. The default is a bold version of the nor- mal font (using the name formed by replacing medium with bold in the font name). If this substitution cannot be made, ups tries -*-fixed-bold-r-nor- mal--15-*-*-*-*-*-*-*. If this font is unavail- able, ups complains and uses the normal font. Foreground The color of the foreground pixel. The default is whatever the BlackPixel macro returns for the dis- play. Background The color of the background pixel. The default is whatever the WhitePixel macro returns for the dis- play. ReverseVideo If this is set (to anything) it has the same effect as the -rv flag. WantInstalledColormap If this is set to "yes", ups will install its own colormap, rather than use the default colormap. Use this if ups complains that it failed to allo- cate some colors. The same effect can be achieved by using the command line option "-install". Note that the command line option of "-noinstall" will override the resource. Geometry The size and (optionally) position of the main ups window. The default is to suggest to the window manager a window 580 pixels wide by 550 pixels deep at a user-specified position. Most window managers will of course let you sweep out a window of the size you require. In the split window modes, the source and output windows have their own Geometry resources. Set the resource Ups.Src.Geometry to specify a geometry for the ups Source window, and Ups.Output.Geometry to specify the geometry for the ups Output window. Or set the resource Ups*Geometry to specify the same geometry for all ups windows. EditlinesColor The color used for editable text in the source win- dow. The default is blue. ColorVars Can be set to "off" to disable coloring of variable names. VariableColor The color used for variable names in the display area. The default is purple. HighlightColor The color used to highlight variables in the dis- play area whose values have changed since the last time the target stopped. The default is red. WantMenuColors If set to `yes', ups will use foreground and back- ground menu colors as listed below. If not set to `yes', such settings are ignored, and the Fore- ground and Background resources are used. MenuForeground, MenuBackground The default colors for text and background in all buttons and menus. Sub menus inherit the colors of their parents unless specifically overwritten. DisabledTextColor The color for text that is disabled, such as the `start' caption after starting the target, or glob- ally disabled breakpoints. LastButtonTextColor The text color of a busy button pressed (such as `cont' while the target is executing) or the parent menu item of a sub menu. SourceMenuForeground, SourceMenuBackground The text and background colors of the pop up menu for the source window. CustomMenuForeground, CustomMenuBackground The text and background colors of the custom pop up menu for editing text strings. FileBoxMenuForeground, FileBoxMenuBackground The text and background colors of the pop up menu for the file name and line number box that is directly above the source window. UnloadedLibMenuForeground, UnloadedLibMenuBackground The text and background colors of the pop up menu for the "Load library" menu invoked from the target line. Foreground, Background The text and background colors for a menu item with a specific text caption: for example "Add break- pointForeground". Note that embedded spaces are allowed. AsteriskForeground, AsteriskBackground The text and background colors of the "*" menu cap- tion that appears when selecting a variable. This caption uses a special resource name in order to resolve a conflict with main foreground and back- ground resources. WantExtendedTextColors If set to `yes', ups will use the colors for the text items in the display window as listed below. If not set to `yes', such settings are ignored. SignalTextColor The text color of the signals listed under the `Signal' header. EnvironmentTextColor The text color of environment strings listed under the `Environment' header. SourceFileTextColor The text color of the file names listed under the `Source files' header. FunctionTextColor The text color of the function names in the stack under the `Functions' header. BreakpointTextColor The text color of active breakpoints listed under the `Breakpoints' header. Inactive breakpoints are in the main foreground color, as is the text of breakpoint code in the source window. WatchpointTextColor The text color of active Watchpoints listed under the `Watchpoints' header. Inactive watchpoint are in the main foreground color. MouseholeWidth The width of the mousehole in pixels. WantWatchpoints If this is set to `yes', watchpoints will be avail- able. On x86 machines, watchpoints are available be default but watchpoint action is unreliable on other machines at present, so on these it is not shown by default. WatchPointRefreshInterval This adjusts the interval between refreshes of the display when mprotect style emulated watchpoints are being used. WantMousehole If this is set to `yes', the mousehole is removed from the display. This is useful if you use a large font and find the typing line too small. PermanentMenuWidth The width of the permanent menu (Quit, Help etc.) in pixels. SelectionThreshold The number of pixels to move right in order to activate text selection in the display window. Default is 30. NonFrameFunctions When set to `on', ups does different processing of non frame (or frameless) pointer functions. This will normally make ups work better with software that inserts calls into the object code, such as Purify Purecov and Quantify. This should fix trun- cated stacks and anomalous `next' and `step' behaviour when debugging such code. However, it occasionally causes problems with ordinary targets, so this feature is disabled by default. Ups will automatically set the value to `on' if it detects the presence of Purify Purecov and Quantify. A value of `off' explicitly overrides such automatic setting. ScrollbarType Controls the scrollbar behavior. If set to anything other that `UPS', such as `MOTIF', then scrolling will move the viewport in the opposite direction to the mouse movement, this being the convention used by most X toolkits (for better or worse). ScrollbarWidth The width of all the scroll bars in pixels. ScrollDelay Set this if scrolling is too fast. A value of 25 or 50 is usually sufficient. The default is 25. SrcwinNameWidth The width in pixels of the box above the source window containing the current source file name and line number. SrcwinPercent The percentage of the window height used for the source window (after space used by the fixed size regions is subtracted). The default is 50 (i.e. half). SrcwinScrollUpButton, SrcwinScrollDownButton The mouse buttons which, when pressed, should cause the source window to scroll. This is normally used with wheel mice to make wheel movements cause the source window to scroll. There is no default. DisplayAreaPercent The percentage of the window height used for the display area (after space used by the fixed size regions is subtracted). The default is 50 (i.e. half). If DisplayAreaPercent and SrcwinPercent are both set they need not add up to 100 - the values actually specify a proportion of the total. Thus setting both to 20 (or any pair of identical val- ues) results in a 50-50 split. DisplayAreaScrollUpButton, DisplayAreaScrollDownButton The mouse buttons which, when pressed, should cause the display area to scroll. This is normally used with wheel mice to make wheel movements cause the display area to scroll. There is no default. OutwinPercent The percentage of the window height used for the output window if and when it is added. The default is 10 (which actually means a tenth of the total - see the note about SrcwinPercent above). ReverseArrows If this is set to `yes' then ups reverses the sense of the up and down arrows which are used in an expression or variable index. HistoryButtonWidth The width of the history button in pixels. EnterButtonWidth The width of the text entry button in pixels. WantSplitWindows If this is set to `yes' then ups will come up with 2 windows. The source window, source menu, target menu, and output window and menu (if used) will be in one frame. The display window and the permanent menu (Quit, Help, etc.) and dynamic menus (Expand, Collapse etc) will be in another frame. The same effect can be achieved by using the command line option "-split". To request a screen number for the second window, use the form `yes:number'. WantSplitOutputWindow If this is set to `yes' then ups will come up with 2 windows, or 3 windows if WantSplitWindows is also set, with separate frame for the output window. The same effect can be achieved by using the com- mand line option "-splitoutwin". To request a screen number for the second window, use the form `yes:number'. WantLogging If this is set to `yes', ups will come up with error messages logged to the output window. The same effect can be achieved by using the command line option "-logging" or during the session by turning on the Message Logging option under the Windows popup menu. WantRaiseOnBreak, WantLowerOnRun, WantIconifyOnRun These resources set the initial state of the Raise On Break family of options in the Windows popup menu. These should be set to `yes' or `no' as to whether and how ups should manipulate its windows when the target process goes in or out of run. All are set to `no' by default. These are evaluated in the order listed, the last of these options set to `yes' being the initial state of the Raise On Break option. LowerOnRunTime When the Lower or Iconify on Run options in the Windows popup menu are active, this resource sets the time in milliseconds that ups waits for the process to break before lowering or iconifying itself. The default value is 1500, that is, a 1.5 second delay. The default vertical position of the objects in the dis- play window can be specified by the following Row key- words. Legal values are 1 to 9 inclusive: 1 indicates the top row and 9 the bottom. Only rows of interest need to be specified. Other rows are positioned according to their default values. For example, if one wants to put the breakpoints above the function stack (and one is not using Fortran), use: Ups*BreakpointsRow: 6 TargetRow The vertical position of the Target header in the display window. Default is 1. Note that this is a double height row. SignalsRow The vertical position of the Signals header in the display window. Default is 2. EnvironmentRow The vertical position of the Environment header in the display window. Default is 3. UntypedVariablesRow The vertical position of the Untyped variables header in the display window. Default is 4. SourceFilesRow The vertical position of the Source files header in the display window. Default is 5. ModulesRow The vertical position of the Modules header in the display window, for targets using Fortran modules. Default is 6. CommonBlocksRow The vertical position of the Common blocks header in the display window, for targets using Fortran common blocks. Default is 6 if no modules exist, 7 otherwise. FunctionsRow The vertical position of the Functions header in the display window. Default is 6 for non Fortran targets, 7 or 8 if the target has Fortran modules or common blocks. BreakpointsRow The vertical position of the Breakpoints header in the display window. Default is 7 for non Fortran targets, 8 or 9 if the target has Fortran modules or common blocks. WatchpointsRow The vertical position of the Watchpoints header in the display window. Default is 8 for non Fortran targets, 9 or 10 if the target has Fortran modules or common blocks. WantTypedefs If this is set to `no', then ups will not attempt to use typedefs in display area variable declara- tions. See Use of typedefs in the CONTROLLING THE DISPLAY OF VARIABLES section. TabWidth The width in characters of a tab character (for use in the source window). The default is eight. UseMono If this is set to `yes' then ups will always use mono even on colour displays. This resource has the same effect as the -mono flag (see above). MultiClickTime This resource specifies the maximum time in mil- liseconds between multi-click events. The default is 250 milliseconds. BreakPointAcceleratorAction This resource selects the accelerator action when shift-clicking or double clicking on a breakpoint in the source code or display area. The resource may be set to "Toggle", to toggle the breakpoint between the active and inactive states, or "Remove" to remove the breakpoint. The default is to toggle the breakpoint. BreakPointHeaderAcceleratorAction This resource selects the accelerator action when shift-clicking or double clicking on the breakpoints header in the display area. The resource may be set to "Toggle", to toggle the global breakpoint between the active and inactive states, or "Add" to to add a new breakpoint. The default is to toggle the global breakpoint state. WatchPointHeaderAcceleratorAction This resource selects the accelerator action when shift-clicking or double clicking on the watch- points header in the display area. The resource may be set to "Toggle", to toggle the global watch- point between the active and inactive states, or "Add" to to add a new watchpoint. The default is to toggle the global watchpoint state. SourceMenuDefault, AltSourceMenuDefault These resources control the default action when clicking the right mouse button in the source win- dow to quickly select from the pop-up menu ( with- out taking the time to actually select something). The AltSourceMenuDefault resource, if used, con- trols the selection when shift-clicking, while the SourceMenuDefault controls the selection otherwise. If AltSourceMenuDefault is not used, then Source- MenuDefault controls both; if SourceMenuDefault is not used, it defaults to "LastSelection". Possible values are: LastSelection: Selects the most recently selected value. ResetDefault: For the AltSourceMenuDefault resource only, causes the a selection made with shift button depressed to reset the default option used when quickly clicking. AddBreakPoint: Selects the Add BreakPoint option. ExecuteToHere: Selects the Execute to here option. JumpToHere: Selects the Jump to here option. EditFile: Selects the Edit file option. TypingLineHistorySize Sets the number of entries in the typing line his- tory buffer. There are also resources to control the other edit histories. To determine their names, find the name of the history in the edit history file and append "HistorySize". DEBUGGING FORTRAN CODE Ups has support for debugging code written in Fortran 77 and Fortran 90. The Fortran 77 support works with most compilers. The Fortran 90 support has only been tested with the epcf90 compiler running under SunOS 4.1.3. The most visible difference with Fortran code is that variable types are displayed using Fortran rather than C syntax. Thus a typical stack display might look like: Functions MAIN double precision acctim 0.0 integer*4 count 0 double precision table(168,10) [1,1] 0.0 logical dotrace .false. Variable names will usually be shown in lower case, even if you have used upper case in the source code. This transformation is done by the compiler, and ups has no control over it. Notice that there are two sets of subscripts shown for the array table. The first set (in round brackets) show the actual size of the array. The second set shows the sub- script of the element that is being displayed. These can be edited to show different elements in the same way as with C arrays. If the program has any common blocks, these are shown under a Common blocks object in the display area. This can be expanded to show the list of common blocks, and individual common blocks can be expanded in turn to show the variables. If a given common block is declared dif- ferently in different functions, each different declara- tion gets its own entry in the list. Thus you might see: Common blocks common /supp_defs/ (as defined in MAIN) common /supp_defs/ (as defined in foo) Fortran 90 user defined types are treated in much the same way as C structures. You can recursively expand them to follow linked lists and such. If you are using Fortran 90 modules, ups adds a Modules object to the display area. You can expand this to show a list of modules. Module names can be expanded in their turn to show a list of functions and subroutines defined within the module. In the current version module vari- ables are not displayed under the appropriate module head- ing; instead they appear under a common block entry. This will be fixed in a future release. There is currently no support for interpreted code under Fortran. Nor can you add Fortran expressions to the dis- play area. This will be fixed if and when someone writes a Fortran interpreter for ups . SUPPORT FOR C++ Ups provides reasonable support for debugging C++ code compiled with cfront version 3, and the Sun SC4 and g++ compilers. For C++ code, classes are shown as structs with the meth- ods invisible. Function and variable names are demangled. The function stack and the breakpoint list use the `class::method' syntax. A restriction is that it is not possible to debug class templates. To debug executable code in header files, such as accessor functions defined in the class definition, turn off in-lining when compil- ing. Function names in wrapper modules are unmangled and pre- sent no problems. When you click on symbols in C++ source, ups searches local variables, and if that fails, it searches fields in the "this" pointer, and finally it searches for globals. In addition it searches in all unions for matching compo- nents - that is, the union tag does not have to appear in the source. When breakpoints are set on overloaded meth- ods in C++ code, ups queries whether to place breakpoints on all matching names. The `tags' operation works fairly well for C++ code. This is the facility that allows easy navigation through source code by simply clicking on a function name. You can click on methods and it will usually take you to the source. The `back' button returns to the original code. The target needs to be running to get it to work so it can look up the classes of variables. It won't always get it right for inherited or virtual methods, but it is still a quick and useful way of navigating the code. You may have to click twice sometimes to first get it read a variable. If the source is in a library with no debug information, the mes- sage line will show the method name in the library. In `add expr' and breakpoint code you can cast to un- typdef'ed structs, including classes in C++. Examples are "(Class*)name" where name is a variable, or "(Class*)0x765678" for a numeric address. If you want to cast to a class that is undefined in the current context, try an `add expr' for the source file where the construc- tor is defined. This generally works, at the file level, but not always. It should always work for `add expr' in the constructor though. If you don't know which file the constructor is defined in, enter the constructor name in the top typing line and press or . The file name will be displayed just above the source window. You can then expand the source file list to find the file, select it, and enter the `add expr' code. When a class is expanded in the display window, members of other classes are show as `struct class_name value' or perhaps as `undefined struct class_name value'. The class of the member is therefore the struct name, and the methods for that class can be listed as shown above. You can set breakpoints on "cout" statements in C++ code in ups by breaking on the overloaded "<<" operator. The general form of setting breakpoints in the display window of ups is: :function The simplest way of breaking on cout statements in C++ code is: ostream::operator<< Output can be flushed with a call to `ostream::flush(&cout)'. Similarly, in breakpoint code, character output can be sent to cout with the following syntax: ostream::operator<<(&cout, "text including tabs () and newlines (0"); For character input, the syntax is similar: istream::operator>>(&cin, &buffer); where "buffer" is some suitable character storage. Note that the code is linked with just the first overloaded methods in the iostream libraries, which is typically (const char*), so it won't work for other data types. Application defined operator methods can have breakpoints set in the same fashion. Ups asks whether to place break- points on all matching strings, so a string like "class::operator" can place breakpoints on all operator methods of the class. If you just want a particular one, such as "==", then add this at the end, i.e. "class::oper- ator==". For cfront compiled C++ code, clicking on a variable name in the source window will case ups to find all matching names, including matches in the implicit "this" pointer as well as automatics. INITIALIZATION FILE The debugger reads an initialization file of name `.upsinit' in the current directory or, if that does not exist, the users home directory, upon invocation. There are four basic commands that can be specified in the file. These are use , load , noload , and break libraries to load; or libraries not to load when reading symbols; and functions in which to set breakpoints. By only loading the minimum standard libraries, ups will start a lot faster. Other libraries can be loaded on the fly by selecting "Target", then "Load library", or by selecting an unloaded library name in the stack trace. An example is: load *libc.so* load *libC.so* load /usr/lib/lib* load /usr/openwin/* load /usr/platform/* load /usr/dt/lib/* # for target specific libraries: load ./* load ../* The initialization file is also convenient for adding new source paths or loading additional libraries on the fly. The source paths are needed for Centerline C++ because clcc creates c files in temporary directories, and the symbol tables suggest that this is where the parent C++ files are too. This is not a problem for SC4 or g++ how- ever. The `use' command is equivalent to the colon sepa- rated list of directories that can be given on the command line for invoking ups, or during debugging with the add source path caption. The load/noload allow you to just load symbols for the debugging area of interest, instead of always loading everything. By ignoring all libraries of no interest, ups can be attached to even large targets (10s of megabytes) quite quickly. When all the long C++ names are ignored, the debugger is as quick as it was before with a pure C target in respect to setting breakpoints are examining data. A caveat with using `noload' is that this causes ups to skip all information for the specified library, so func- tions and files for unloaded libraries will be invisible. Attempts to set breakpoints on such functions will results in `no such function' messages, and the files will not appear in the source file list. By using "load" rather than "noload", ups won't be affected by different sets of libraries that each target may have. Note that "./" has the meaning of the directory of the target, not of where ups was started. The "load" and "noload" keywords cannot be used together. Specifying neither means that all symbols are loaded. Wildcards can be used at the beginning or end of the string. You can see all the symbol table names that are loaded and not loaded by doing a "setenv VERBOSE 1" before calling ups. Setting VERBOSE to "NOLOAD" causes to list just the libraries that are not loaded. You can specify breakpoints with the syntax "break func- tion". Unlike the `-record' style syntax, this does not require a file or a line number, hence the same break- points will work on different versions of the target source, provided the functions exist. Ups will silently skip breakpoints that it cannot set. The limitation is that the breakpoint will always be set at the beginning of the function. You can create more complex commands for the initializa- tion file by using the undocumented `-record' command line option. An example is `ups target -record ./.upsinit' The record file must not exist before it is created. When ups is next invoked, with a command like `ups target', it will read the commands in `./.upsinit' if such a file exists, otherwise `$HOME/.upsinit'. The record mode does not sup- port interactions with the output window menus at present, nor `search' menus with the source window, Similarly mouse button modifiers are not recorded. Such actions will be ignored when the file is read. The following is an example of an initialization file that sets the SIGBUS and SIGSEGV signals to `accept': select sghead menu sghead show_all_signals select sghead|sigbus addselect sghead|sigsegv menu signal toggle_accept_ignore select sghead menu sghead hide_all_signals menu pmenu quit_ups The last line to quit the debugger should be deleted with a text editor after creation. Some of the most commonly used syntax is: breakpoint filename funcname lnum menu menu_name action MULTIPLE LINKED FILES Ups works with for multiple linked files. For such files, at least two versions of the code exist in the target. Ups makes all duplicate files visible, with automatic replication in the duplicate file of any setting or modi- fication of a multiple linked function breakpoint. In this manner, all breakpoint code is kept identical between duplicate files, and all breakpoints should be honored. What this means in practice when using ups is that multi- ple linked function files are listed twice in the source file listing. Either one can be used to set a breakpoint, and a second breakpoint will be created automatically in the duplicate file. The following actions maintain this automatic shadowing: o Selecting a file and setting a breakpoint with the right mouse button in the source window. o Setting a breakpoint by selecting the `Breakpoints' header and then pressing the Add new caption (or Shift-left accelerator on the `Breakpoints' header). o Deleting a breakpoint. o Renaming a breakpoint (works for all transitions between single instance and duplicate functions). o Changing the line number of a breakpoint. o Changing the activation state of a breakpoint. o Selecting a file and using the right mouse button menu in the source window to `execute to here'. SAVING STATE When you quit ups, it normally forgets things like break- point locations and the way your variables are displayed. This can be a nuisance, especially if you have added interpreted code, or typed long expressions into the dis- play area. To preserve these settings, ups will option- ally save state information when you quit it, and reload this information when you start it again. In addition, a state file can be explicitly created or loaded at any time by selecting the target name at the top of the display region. This will create a menu with four captions: Load library, Save state, Load state, Drop state, and Rescan init file. Clicking on Load library Invokes a dynamic submenu of unloaded libraries. Choosing one will load that library. If all libraries are loaded, no submenu is displayed, but a message indicates that all libraries are loaded. See the section INITIALIZATION FILE (near the end of this manual page) for information on specifying what libraries to load. Selecting Save state prompts you for a file name in which to save the current debugger state. Selecting Load state asks for a state file name which will be then loaded. Selecting Drop state deletes the temporary state file that UPS uses to save information about breakpoints and what data have been displayed during a previous debug session. If you have previously attached to a process, and have been looking at global variables that take some time for UPS to find, you can stop the debugger scanning again for the variables on reattaching to a rebuilt target by using the drop state button when unattached. You may also want to use it when attaching to a different process. Rescan init file will re-read your ~/.upsint file, if it exists. This section describes how this state is saved and restored. If the directory ups-state exists in the current direc- tory, ups will use it to store state information between sessions. This includes breakpoint locations (and the interpreted code, if any), and the state of the variables display. The saved state is used in several ways: o After starting ups, you can select Restore from the Breakpoints menu to put breakpoints back as they were from the previous session. Ups tries to put breakpoints back in the right places, but it can be defeated by major changes to the source code. o The default for the Expand option for stack trace and source file entries is Like before. This adds variables as they were in the last time you looked at them. If the ups-state directory exists, the state of the variables display is remembered across different ups sessions. o When you add a variable the display format (hex, octal etc) is taken from the way it was last time you displayed the variable. o The attributes for signal handling are restored (i.e., whether accepted, ignored, cause the process to stop). State is saved to the file ups-state/xxx.state, where xxx is the last component of the path of the file you are debugging. You can also create the file ups- state/xxx.config (perhaps by copying ups-state/xxx.state). The .config file is read at startup by ups, but not writ- ten. Also, breakpoints in the .config file are automati- cally restored on startup. In future releases you will be able to use the .config file to add environment variable settings, etc. Currently the only directive (other than things specifying break- points, saved variable and signal state) is auto-start which takes a single argument yes or no. The line: auto-start yes in the xxx.config file means start the target running as soon as ups has started up. Ups also looks for saved state in the file $HOME/.upsrc and .upsrc (in the current directory). Thus the full set of files is: $HOME/.upsrc .upsrc ups-state/xxx.config ups-state/xxx.state Files later in the sequence can override earlier settings. LOADING AND SAVING BREAKPOINTS You can explicitly load and save breakpoints to files. To save breakpoints, select one or more in the display area, then select `save' from the menu. You will be prompted for a file name. If the file already exists you will be asked whether you want to cancel the save, overwrite the file or append to it. The submenu controls whether break- points loaded this way get saved in a statefile. Saved breakpoints can be reloaded by selecting `Load File' and then `Load - bpts NOT saved in statefile' or `Load - bpts saved in statefile' from the Breakpoints header menu. SEE ALSO cc(1), f77(1), ld(1), dbx(1) BUGS On the SPARC you can't step or next through the return statement of a function returning a struct or union (func- tions returning pointers to structs or unions work fine). This is due to the peculiar and undocumented protocol that the SPARC uses for returning structs and unions by value. On the SPARC you get surprising behaviour if you use in interpreted code a struct or union that is a formal param- eter. Your interpreted code must be written as if the variable is a pointer to a struct rather than a struct. This is again due to the SPARC structure passing protocol. The SPARC C compiler emits an inline loop to implement structure assignmemt for large structs. Because of the way next and step are implemented in ups you have to hit Next or Step several times to step over a line containing such a struct assignment. Workaround: use Execute to here to get to the next line. If you change a binary while you are debugging it ups will get very upset (read: will probably core dump with a fatal error message). This is unsatisfactory and will be fixed in a future release. Core files dumped from dynamic executables are incomplete which means that you can only examine the non shared parts of the binary. The Stop button in the target menu doesn't work if you are hitting lots of fragments of interpreted code that don't stop the target. ACKNOWLEDGEMENTS The work to support Solaris 2 was made possible by the generous support of the following people (in alphabetical order): Ian Edwards Panorama Software Corporation Paul Friberg Incorporated Research Institutions for Seismology Robert L. Prehn AT&T Bell Labs Daniel Quinlan University of Colorado Ricardo TelicheveskyCadence Design Systems, Inc. Frank Vernon UC San Diego Special thanks to Dan Quinlan for all the work he put into organizing the project. The regular expression matching algorithm was written by Ozan S. Yigit of the Department of Computer Science, York University. AUTHORS Mark Russell, University of Kent. Original version for the ICL Perq and many of the important ideas by John Bovey, University of Kent. ENHANCEMENT AUTHORS Rod Armstrong, Schlumberger Tech, (rod@san- jose.tt.slb.com) added: symbol table fixes for SC3/4, g++ and cfront/clcc; C++ demangling for cfront, SC3/4 and g++; dynamic library support for Solaris; native port for Linux ELF (based on the a.out port done by Rick Sladkey); dupli- cation of breakpoints for overloaded C++ methods; auto- matic deference of the "this" pointer in C++ code; mes- sages when symbols are read in; Motif type scrolling direction if desired; colored variable and breakpoint text; attach and detach buttons; honoring of quit request from a window manager; autoscrolling on selecting text; activate, inactive and execute buttons for breakpoints; accelerators for the display window; custom menus; X resource for fixing stacks for Purify/Quantify; menu items to spawn an editor, show file paths and reload and rematch files; partial name completion for breakpoints; listing of matching breakpoint names; init file support; rescan of initialization file on reattach; format option for RWC- String; special signal control for SIGSEGV or SIGBUS; sup- port for multiple linked files; explicit save and load of state files; help facility; various bug fixes. Ian Edwards ([email protected]) provided a patch for FreeBSD 2.2.6-STABLE, and support for `long long' and `long double' data types. He also maintains the web site for UPS at www.concerto.demon.co.uk/UPS. Russ Browne, Applied MicroSystems ([email protected]) added handling of symbol table information concerning base classes, vector tables, and static class members in SC4 and g++ object files. He also contributed the UPS_FORMATS environment variable, control characters in UPS_F*STRs, bumping of array indicies on duplication, and elastic for- mating of file names in the stack and breakpoint list. The formating feature allows the file names to be visible for large fonts, and when the debugger window is made quite narrow. He also did the extended double click accelerators; typing line shortcuts; shading of inactive and disabled breakpoints; added X resources for multiclick time, and source window menu control; added a command line option to force ups to pass the full name of the target executable; and a fix for the size of "bool" data types; C Daniel M. Quinlan ([email protected]) supplied fixes for displaying Structures and unions, some fortran variables and a fix for " unknown type" in scanning SC4 symbol tables. Callum Gibson ([email protected]) contributed the save state code for signals. A fix for 16bpp visuals was contributed by Craig Amey . Tom Hughes ([email protected]) contributed: double clicking on a variable in the source window; calling func- tions from expressions; improvements for long long types; fix for parameter widening in the stack; saving and restoring terminal state; adding clipping routines to eliminate flicker on redraw; for x86 machines, stepping across shared libraries, and handling of frameless stacks; main() can be in a shared library; support for DT_RUNPATH; better handling for segv on Linux machines. Local 2002/11/05 UPS(1)
|
{
"url": "http://ups.sourceforge.net/upsman.txt",
"source_domain": "ups.sourceforge.net",
"snapshot_id": "crawl=CC-MAIN-2017-30",
"warc_metadata": {
"Content-Length": "170358",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:C6UKHV4O35YVKNFOYWFHOBP6TAM2JBQQ",
"WARC-Concurrent-To": "<urn:uuid:d4e2bed1-1adc-4190-a9a4-8304f54e71f4>",
"WARC-Date": "2017-07-28T10:56:54Z",
"WARC-IP-Address": "216.34.181.96",
"WARC-Identified-Payload-Type": "text/plain",
"WARC-Payload-Digest": "sha1:SVOOKCH46IP2N2TH2F52O62JTVQQSRE7",
"WARC-Record-ID": "<urn:uuid:5277f6fc-16d9-466e-a078-a12bb4605434>",
"WARC-Target-URI": "http://ups.sourceforge.net/upsman.txt",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:6189126e-f1ff-4088-a3ed-ad08d7c0ebc2>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-181-36-61.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-30\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for July 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0
],
"line_end_idx": [
136053
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 136053,
"ccnet_original_nlines": 0,
"rps_doc_curly_bracket": 0.0002499000111129135,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.40799078345298767,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024094650521874428,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1478404700756073,
"rps_doc_frac_unique_words": 0.10939697176218033,
"rps_doc_mean_word_length": 4.5867462158203125,
"rps_doc_num_sentences": 1344,
"rps_doc_symbol_to_word_ratio": 0.000647320004645735,
"rps_doc_unigram_entropy": 5.9607110023498535,
"rps_doc_word_count": 23465,
"rps_doc_frac_chars_dupe_10grams": 0.0368863083422184,
"rps_doc_frac_chars_dupe_5grams": 0.16498495638370514,
"rps_doc_frac_chars_dupe_6grams": 0.11075185239315033,
"rps_doc_frac_chars_dupe_7grams": 0.07762850075960159,
"rps_doc_frac_chars_dupe_8grams": 0.058023929595947266,
"rps_doc_frac_chars_dupe_9grams": 0.04787788167595863,
"rps_doc_frac_chars_top_2gram": 0.01370461005717516,
"rps_doc_frac_chars_top_3gram": 0.00819488987326622,
"rps_doc_frac_chars_top_4gram": 0.004515550099313259,
"rps_doc_books_importance": -10973.9638671875,
"rps_doc_books_importance_length_correction": -10973.9638671875,
"rps_doc_openwebtext_importance": -7366.45751953125,
"rps_doc_openwebtext_importance_length_correction": -7366.45751953125,
"rps_doc_wikipedia_importance": -6542.3466796875,
"rps_doc_wikipedia_importance_length_correction": -6542.3466796875
},
"fasttext": {
"dclm": 0.10165637731552124,
"english": 0.873670756816864,
"fineweb_edu_approx": 2.3485467433929443,
"eai_general_math": 0.9442443251609802,
"eai_open_web_math": 0.25629353523254395,
"eai_web_code": 0.9450521469116211
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.455",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.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": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,341,097,675,111,435,000 |
What percent of 57 is 23?
Answer: 40.351 percent. We can also say that 40.351% of 57 is 23.
Percentage Calculator: What percent of 57 is 23
Here is a calculator to solve percentage calculations such as what percent of 57 is 23. You can solve this type of calculation with your values by entering them into the calculator's fields, and click 'Calculate' to get the Result and Explanation!
What percent of
is
Calculation of What percent of 57 is 23:
(23 / 57) * 100 =
0.404 * 100 =
40.351%
Now we have the answer: 40.351 percent of 57 is 23.
Mathematical Notation: (23 / 57) * 100 = 0.404 * 100 = 40.351%
Formula we can use to solve our problem:
Formula: (Y/X) × 100
Let's use the example of "What percent of 57 is 23" to understand the calculation:
= 23/57 × 100 = 40.351%
Check our "What Percent of X is Y" Calculator for more methods and formulas
Solution for "What percent of 57 is 23" with Step-by-step guide:
Step 1: Define the unknown percentage
Let 'P' be the unknown percentage we are trying to find.
Step 2: Set up the equation
To calculate the percentage, we set up the equation:
P percent * 57 = 23
Step 3: Isolate the unknown percentage
Now, isolate P on one side of the equation. To do that, divide both sides of the equation by 57:
P = 23 / 57
Step 4: Perform the division
Calculate the result of the division:
P = 0.404
Step 5: Convert the decimal to a percentage
To express the result as a percentage, multiply the decimal by 100:
P = 0.404 * 100
Step 6: Calculate the final result by performing the multiplication
⇒ P = 40.351%
Therefore, 23 is 40.351 percent of 57.
I hope explanation above helps you understand how to calculate what percent of 57 is 23
Quick Tip - How Calculate what percent of 57 is 23 on calculator
If you want to use a calculator to find what percent of 57 is 23, just enter 23 ÷ 57 × 100 and you will get your answer which is 40.351
Frequently Asked Questions on What is 57 percent of 23
What percent of 57 is 23?
40.351 percent is 57 of 23.
How to calculate what percent of 57 is 23?
(23 / 57) * 100 = 0.404 * 100 = 40.351%
23 is what percent of 57?
40.351%
Sample questions and answers
Question: At a high school 57 percent of seniors went on a mission trip. There were 23 seniors. How many seniors went on the trip?
Answer: 40.351 seniors went on the trip.
Question: 57 percent of the children in kindergarten like Thomas the Train. If there are 23 kids in kindergarten, how many of them like Thomas?
Answer: 40.351 kids like Thomas the Train.
Question: Your uncle had 57 shares of his own company a few years earlier, and now he has 23 of them. What percent of the shares of his company he has now?
Answer: He has 40.351 percent of shares of his company now.
How To: The key words in this problem are "What Percent" because they let us know that it's the Percent that is missing. So the two numbers that it gives us must be the "Total" and the "Part" we have.
Part/Total = Percent
In this case, it's the Total that our uncle owned. So we put 57 on the bottom of the fraction and 23 on top. Now we're ready to figure out the part we don't know; the Percent.
23/57 = Percent
To find the percent, all we need to do is convert the fraction into its percent form by multiplying both top and bottom part by 100 and here is the way to figure out what the Percent is:
23/57 × 100/100 = 40.351/100
40.351 = Percent
And that means he has 40.351 percent of the shares of his company now.
Similar Percentage Problems
|
{
"url": "https://percentage-calculator.net/what-percent-of-x-is-y/what-percent-of-57-is-23.php",
"source_domain": "percentage-calculator.net",
"snapshot_id": "CC-MAIN-2023-50",
"warc_metadata": {
"Content-Length": "75396",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SPTNFVBCG2W6ABTR3PCQSSCVGEFJMCIS",
"WARC-Concurrent-To": "<urn:uuid:76f87040-ba2a-4921-94f7-cce863502ac8>",
"WARC-Date": "2023-12-07T04:27:16Z",
"WARC-IP-Address": "3.210.81.252",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IQO7BACY4K3I55XHSNPZ7YBQXIZQBDG5",
"WARC-Record-ID": "<urn:uuid:f424df56-912c-4ca7-9e84-db1b5f24e293>",
"WARC-Target-URI": "https://percentage-calculator.net/what-percent-of-x-is-y/what-percent-of-57-is-23.php",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2f9cb6f5-575e-45fe-aeb6-a6170a609aed>"
},
"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-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,
26,
27,
93,
94,
142,
143,
391,
392,
408,
411,
412,
453,
454,
472,
473,
487,
488,
496,
497,
549,
550,
613,
614,
655,
656,
677,
678,
761,
762,
786,
787,
863,
864,
929,
930,
968,
1025,
1026,
1054,
1107,
1127,
1128,
1167,
1264,
1276,
1277,
1306,
1344,
1354,
1355,
1399,
1467,
1483,
1484,
1552,
1566,
1567,
1606,
1607,
1695,
1696,
1761,
1762,
1898,
1899,
1954,
1955,
1981,
1982,
2010,
2011,
2054,
2055,
2095,
2096,
2122,
2123,
2131,
2132,
2161,
2162,
2293,
2294,
2335,
2336,
2337,
2481,
2482,
2525,
2526,
2682,
2683,
2743,
2744,
2945,
2946,
2967,
2968,
3144,
3145,
3161,
3162,
3349,
3350,
3379,
3380,
3397,
3398,
3469,
3470
],
"line_end_idx": [
26,
27,
93,
94,
142,
143,
391,
392,
408,
411,
412,
453,
454,
472,
473,
487,
488,
496,
497,
549,
550,
613,
614,
655,
656,
677,
678,
761,
762,
786,
787,
863,
864,
929,
930,
968,
1025,
1026,
1054,
1107,
1127,
1128,
1167,
1264,
1276,
1277,
1306,
1344,
1354,
1355,
1399,
1467,
1483,
1484,
1552,
1566,
1567,
1606,
1607,
1695,
1696,
1761,
1762,
1898,
1899,
1954,
1955,
1981,
1982,
2010,
2011,
2054,
2055,
2095,
2096,
2122,
2123,
2131,
2132,
2161,
2162,
2293,
2294,
2335,
2336,
2337,
2481,
2482,
2525,
2526,
2682,
2683,
2743,
2744,
2945,
2946,
2967,
2968,
3144,
3145,
3161,
3162,
3349,
3350,
3379,
3380,
3397,
3398,
3469,
3470,
3497
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3497,
"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.3376777172088623,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014218010008335114,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.35663506388664246,
"rps_doc_frac_unique_words": 0.2973395884037018,
"rps_doc_mean_word_length": 4.087636947631836,
"rps_doc_num_sentences": 53,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.515100479125977,
"rps_doc_word_count": 639,
"rps_doc_frac_chars_dupe_10grams": 0.029096480458974838,
"rps_doc_frac_chars_dupe_5grams": 0.18185299634933472,
"rps_doc_frac_chars_dupe_6grams": 0.1405053585767746,
"rps_doc_frac_chars_dupe_7grams": 0.0895865187048912,
"rps_doc_frac_chars_dupe_8grams": 0.047090351581573486,
"rps_doc_frac_chars_dupe_9grams": 0.047090351581573486,
"rps_doc_frac_chars_top_2gram": 0.0758039802312851,
"rps_doc_frac_chars_top_3gram": 0.0746554434299469,
"rps_doc_frac_chars_top_4gram": 0.0398162305355072,
"rps_doc_books_importance": -342.749755859375,
"rps_doc_books_importance_length_correction": -342.749755859375,
"rps_doc_openwebtext_importance": -182.73204040527344,
"rps_doc_openwebtext_importance_length_correction": -182.73204040527344,
"rps_doc_wikipedia_importance": -128.79298400878906,
"rps_doc_wikipedia_importance_length_correction": -128.79298400878906
},
"fasttext": {
"dclm": 0.9536934494972229,
"english": 0.9569735527038574,
"fineweb_edu_approx": 3.1186206340789795,
"eai_general_math": 0.9712826609611511,
"eai_open_web_math": 0.5571093559265137,
"eai_web_code": 0.10882425308227539
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "513.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry"
}
},
"secondary": {
"code": "372.7",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Education, Elementary and Kindergarten"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,355,361,373,134,808,000 |
Fri. Jun 9th, 2023
File systems are an important section of any systems with the ability for longterm storage. There are two distinct areas of a report system, the mechanism for storing files and the directory structure into which they are organised. In modern systems where it is feasible for several user to gain access to exactly the same files simultaneously it in addition has become essential for such features as access control and different types of file protection to be implemented.
A document is an accumulation binary data. A document could represent a course, a file or in some cases part of the file system itself. In modern computing it is quite common for his or her to be a number of different storage devices attached with exactly the same computer. A standard data structure like a file system allows the computer to gain access to a variety of storage devices in exactly the same way, for example, once you look at the contents of a hard disk drive or even a cd you notice it through exactly the same interface although they are different mediums with data mapped in it in different ways. Files might have very different data structures within them but can all be accessed by exactly the same methods built into the file system. The arrangement of data within the file is then decided by this system creating it. The file systems also stores several attributes for the files within it.
All files have a title through which they could be accessed by the user. In most contemporary file systems the name contains of three parts, its unique name, a period and an extension. For example the file ‘bob.jpg’ is uniquely identified by the first word ‘bob’, the extension jpg indicates that it is a jpeg image file. The file extension allows the os to decide how to proceed with the file if someone tries to open it. The os maintains a list of file extension associations. Should a consumer try to gain access to ‘bob.jpg’ then it’d most likely be opened in regardless of the systems default image viewer is.
The device also stores the positioning of a file. In some file systems files can only just be stored as you contiguous block. It’s simplifies storage and access to the file as the system then only needs to understand where in fact the file begins on the disk and how big it is. It will however cause complications if the file is usually to be extended or removed as there might not be enough space available to fit the bigger version of the file. Most contemporary file systems overcome this issue by utilizing linked file allocation. This permits the file to be stored in any number of segments. The file system then has to store where every block of the file is and how big they are. This greatly simplifies file space allocation but is slower than contiguous allocation because it is feasible for the file to be spread out throughout the disk. Modern systems overome this flaw by giving a computer defragmenter. This can be a utility that rearranges most of the files on the disk so that they are in contiguous blocks.
Information about the files protection can be incorporated into the file system. Protection can range from the simple systems implemented in the FAT system of early windows where files could be marked as read-only or hidden to the more secure systems implemented in NTFS where in fact the file system administrator can create separate read and write access rights for different users or user groups. Although file protection adds a great deal of complexity and potential difficulties it is essential in an environment where a variety of computers or user might have access to exactly the same drives via a network or time shared system such as for example raptor.
Some file systems also store data about which user created a report and at what time they created it. Although this is simply not necessary to the running of the file system it is beneficial to the users of the system.
For a report system to operate properly they require several defined operations for creating, opening and editing a file. Virtually all file systems provide exactly the same basic set of methods for manipulating files.
A document system must have the ability to develop a file. To achieve this there has to be enough space left on the drive to fit the file. There must be no other file in the directory it is usually to be placed with exactly the same name. Once the file is done the system will make an archive of all the attributes noted above.
Once a report has been created we could need to edit it. This can be simply appending some data to the end of it or removing or replacing data already stored within it. When carrying this out the system keeps a write pointer marking where the following write operation to the file should take place.
For a report to be useful it must needless to say be readable. To achieve this whatever you have to know the name and path of the file. Using this the file system pdf metadata remover can ascertain where on the drive the file is stored. While reading a report the system keeps a read pointer. This stores which part of the drive is usually to be read next.
In some instances it is extremely hard to simply read all of the file into memory. File systems also enable you to reposition the read pointer in just a file. To perform this operation the system needs to understand how far into the file you would like the read pointer to jump. An example of where this may be useful is just a database system. When a query is manufactured on the database it is obviously inefficient to read the complete file up to the point where the mandatory data is, instead the application form managing the database would determine where in the file the mandatory little bit of data is and jump to it. This operation is frequently called a report seek.
File systems also enable you to delete files. To achieve this it takes to understand the name and path of the file. To delete a report the systems simply removes its entry from the directory structure and adds all the room it previously occupied to the free space list (or whatever other free space management system it uses).
These are probably the most basic operations required by a report system to operate properly. They are present in all modern computer file systems but the way they function may vary. For instance, to perform the delete file operation in a modern file system like NTFS that has file protection built engrossed would be more complicated compared to same operation in an older file system like FAT. Both systems would first check to see perhaps the file was used before continuing, NTFS would then have to test whether the user currently deleting the file has permission to do so. Some file systems also allow multiple visitors to open exactly the same file simultaneously and have to decide whether users have permission to create a report back to the disk if other users currently contain it open. If two users have read and write permission to file should one be allowed to overwrite it while one other still has it open? Or if one user has read-write permission and another only has read permission on a report should the user with write permission be allowed to overwrite it if theres no potential for one other user also trying to do so?
Leave a Reply
Your email address will not be published. Required fields are marked *
|
{
"url": "http://residenzeteatrali.org/precisely-how-the-functioning-bodies-file-technique-performs/",
"source_domain": "residenzeteatrali.org",
"snapshot_id": "CC-MAIN-2023-23",
"warc_metadata": {
"Content-Length": "59320",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:H4YQ64YP4HAHOFNUKBRAMIOR3SAOTX76",
"WARC-Concurrent-To": "<urn:uuid:d4d7911d-f02d-4123-8353-d263fa896de7>",
"WARC-Date": "2023-06-09T21:45:39Z",
"WARC-IP-Address": "78.110.161.205",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:W4TSAZP2PESQYHC5E5G2JFI6SGMOYCSZ",
"WARC-Record-ID": "<urn:uuid:8bf27ec7-b81a-42d6-a5fe-96f3079259bb>",
"WARC-Target-URI": "http://residenzeteatrali.org/precisely-how-the-functioning-bodies-file-technique-performs/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e0f14892-259d-47f3-92e3-febef8958903>"
},
"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-239\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,
19,
20,
494,
495,
1408,
1409,
2024,
2025,
3047,
3048,
3712,
3713,
3932,
3933,
4152,
4153,
4481,
4482,
4782,
4783,
5140,
5141,
5818,
5819,
6146,
6147,
7288,
7289,
7303,
7304
],
"line_end_idx": [
19,
20,
494,
495,
1408,
1409,
2024,
2025,
3047,
3048,
3712,
3713,
3932,
3933,
4152,
4153,
4481,
4482,
4782,
4783,
5140,
5141,
5818,
5819,
6146,
6147,
7288,
7289,
7303,
7304,
7374
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7374,
"ccnet_original_nlines": 30,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.5117605328559875,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.006414830219000578,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.06343550235033035,
"rps_doc_frac_unique_words": 0.31016042828559875,
"rps_doc_mean_word_length": 4.559205532073975,
"rps_doc_num_sentences": 66,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.106409072875977,
"rps_doc_word_count": 1309,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04859248921275139,
"rps_doc_frac_chars_dupe_6grams": 0.027815010398626328,
"rps_doc_frac_chars_dupe_7grams": 0.019101880490779877,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03518766909837723,
"rps_doc_frac_chars_top_3gram": 0.021112600341439247,
"rps_doc_frac_chars_top_4gram": 0.0070375301875174046,
"rps_doc_books_importance": -596.59521484375,
"rps_doc_books_importance_length_correction": -596.59521484375,
"rps_doc_openwebtext_importance": -412.01898193359375,
"rps_doc_openwebtext_importance_length_correction": -412.01898193359375,
"rps_doc_wikipedia_importance": -402.9077453613281,
"rps_doc_wikipedia_importance_length_correction": -402.9077453613281
},
"fasttext": {
"dclm": 0.35278427600860596,
"english": 0.9585320353507996,
"fineweb_edu_approx": 2.873898983001709,
"eai_general_math": 0.8801037073135376,
"eai_open_web_math": 0.380104660987854,
"eai_web_code": 0.5936505794525146
}
}
|
{
"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.73",
"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": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,143,275,472,628,988,400 |
Unlock pattern question
Discussion in 'Android General Discussions' started by stevo95, Jan 1, 2010.
1. stevo95
Offline
stevo95 New Member
Joined:
Dec 9, 2009
Messages:
181
Likes Received:
0
Trophy Points:
0
Couldnt find this question asked, hopefully this is a first time and not a multiple :)
I like to turn my screen off sometimes to preserver the battery life. But it is annoying that it asks me for the unlock pattern every time I do this. Is there any way, such as an app, to achieve this?
I want to have a timeout of ten minutes so that I can turn off the screen and as long as I turn it back on within the time period, it doesnt require an unlock?
Actually, this leads to a 2nd question - is it possible to make the timing of the screen timeout more customizable? 15 secs/30secs/1min/2min/10min/30min is not a lot of options.
2. pandroid
Offline
pandroid Theme Developer Theme Developer
Joined:
Dec 16, 2009
Messages:
855
Likes Received:
0
Trophy Points:
0
autolock in the market.
used to be free, but not anymore. well worth the dollar or whatever its running for though
edit: as for your second question, yes
menu/settings/sound & display/screen timeout
edit2: oh sorry, didnt finish reading your question... youll have to go to someone else for that answer
Last edited: Jan 1, 2010
3. stevo95
Offline
stevo95 New Member
Joined:
Dec 9, 2009
Messages:
181
Likes Received:
0
Trophy Points:
0
Thanks for the response. It has majorly sucky reviews for the Droid though, seems like the reviews after a Dec update are mainly very poor. If anyone is aware of other options, that would be great.
4. pandroid
Offline
pandroid Theme Developer Theme Developer
Joined:
Dec 16, 2009
Messages:
855
Likes Received:
0
Trophy Points:
0
yes, i have seen all those reviews and was weary to purchase it. i copied over the free version i downloaded a long time ago for my g1 to my droid, but it force closed. i decided to take the plunge and bought the new one. happy to say it works flawlessly on my droid.
i also saw another app that i believe came out just last night. though im unable to find it anymore...
edit: i ran across it. g-lock
for your second question, i did find an app called stayawake. i think that might be what youre looking for
Last edited: Jan 1, 2010
5. stevo95
Offline
stevo95 New Member
Joined:
Dec 9, 2009
Messages:
181
Likes Received:
0
Trophy Points:
0
Thanks, will check them both out. :)
Search tags for this page
hiw to unlock pattern of someones phine
,
how do i unlock someones phone pattern
,
how to figure out a pattern on your android
,
how to figure out someones android pattern
,
how to figure out someones pattern lock
,
how to figure out someones phone pattern
,
how to figure out someones unlock pattern
,
how to figure out the pattern on a smart phone
,
how to find out someones android pattern
,
how to find out someones phone pattern
,
how to find out someones unlock pattern
,
how to unlock someones android phone
,
how to unlock someones droid
,
how to unlock someones phone pattern
,
unlock someones android
|
{
"url": "http://www.droidforums.net/threads/unlock-pattern-question.12635/",
"source_domain": "www.droidforums.net",
"snapshot_id": "crawl=CC-MAIN-2014-35",
"warc_metadata": {
"Content-Length": "85012",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Z7HQV364FNH6RRKQIAYEMRISD63TNQKN",
"WARC-Concurrent-To": "<urn:uuid:f40b8372-02cc-4b2f-a622-c368d417329e>",
"WARC-Date": "2014-08-29T21:35:46Z",
"WARC-IP-Address": "206.127.24.60",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:P43BCYLYFE7STSLSAHZSNTFFNT3J6OIG",
"WARC-Record-ID": "<urn:uuid:a589af6b-859a-47b0-8ed2-a88a00ffd375>",
"WARC-Target-URI": "http://www.droidforums.net/threads/unlock-pattern-question.12635/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2d3034a4-93a9-4f88-b5b8-b359ef650529>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-180-136-8.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for August 2014\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
24,
25,
102,
103,
116,
128,
129,
152,
153,
165,
181,
195,
203,
223,
229,
248,
254,
345,
346,
551,
552,
716,
717,
899,
913,
925,
926,
971,
972,
984,
1001,
1015,
1023,
1043,
1049,
1068,
1074,
1102,
1103,
1198,
1199,
1242,
1243,
1292,
1293,
1401,
1430,
1443,
1455,
1456,
1479,
1480,
1492,
1508,
1522,
1530,
1550,
1556,
1575,
1581,
1783,
1797,
1809,
1810,
1855,
1856,
1868,
1885,
1899,
1907,
1927,
1933,
1952,
1958,
2230,
2231,
2338,
2339,
2373,
2374,
2485,
2514,
2527,
2539,
2540,
2563,
2564,
2576,
2592,
2606,
2614,
2634,
2640,
2659,
2665,
2706,
2732,
2772,
2774,
2813,
2815,
2859,
2861,
2862,
2905,
2906,
2908,
2948,
2950,
2991,
2993,
2994,
3036,
3037,
3039,
3086,
3088,
3089,
3130,
3131,
3133,
3172,
3174,
3214,
3216,
3217,
3254,
3255,
3257,
3286,
3288,
3325,
3327
],
"line_end_idx": [
24,
25,
102,
103,
116,
128,
129,
152,
153,
165,
181,
195,
203,
223,
229,
248,
254,
345,
346,
551,
552,
716,
717,
899,
913,
925,
926,
971,
972,
984,
1001,
1015,
1023,
1043,
1049,
1068,
1074,
1102,
1103,
1198,
1199,
1242,
1243,
1292,
1293,
1401,
1430,
1443,
1455,
1456,
1479,
1480,
1492,
1508,
1522,
1530,
1550,
1556,
1575,
1581,
1783,
1797,
1809,
1810,
1855,
1856,
1868,
1885,
1899,
1907,
1927,
1933,
1952,
1958,
2230,
2231,
2338,
2339,
2373,
2374,
2485,
2514,
2527,
2539,
2540,
2563,
2564,
2576,
2592,
2606,
2614,
2634,
2640,
2659,
2665,
2706,
2732,
2772,
2774,
2813,
2815,
2859,
2861,
2862,
2905,
2906,
2908,
2948,
2950,
2991,
2993,
2994,
3036,
3037,
3039,
3086,
3088,
3089,
3130,
3131,
3133,
3172,
3174,
3214,
3216,
3217,
3254,
3255,
3257,
3286,
3288,
3325,
3327,
3350
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3350,
"ccnet_original_nlines": 133,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3651772141456604,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007704160176217556,
"rps_doc_frac_lines_end_with_ellipsis": 0.007462690118700266,
"rps_doc_frac_no_alph_words": 0.2172573208808899,
"rps_doc_frac_unique_words": 0.4048507511615753,
"rps_doc_mean_word_length": 4.438432693481445,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0.003081660019233823,
"rps_doc_unigram_entropy": 4.894229888916016,
"rps_doc_word_count": 536,
"rps_doc_frac_chars_dupe_10grams": 0.19588062167167664,
"rps_doc_frac_chars_dupe_5grams": 0.3282892107963562,
"rps_doc_frac_chars_dupe_6grams": 0.29634299874305725,
"rps_doc_frac_chars_dupe_7grams": 0.2244640588760376,
"rps_doc_frac_chars_dupe_8grams": 0.19588062167167664,
"rps_doc_frac_chars_dupe_9grams": 0.19588062167167664,
"rps_doc_frac_chars_top_2gram": 0.025220679119229317,
"rps_doc_frac_chars_top_3gram": 0.035308949649333954,
"rps_doc_frac_chars_top_4gram": 0.035308949649333954,
"rps_doc_books_importance": -287.80029296875,
"rps_doc_books_importance_length_correction": -287.80029296875,
"rps_doc_openwebtext_importance": -164.5465087890625,
"rps_doc_openwebtext_importance_length_correction": -164.5465087890625,
"rps_doc_wikipedia_importance": -96.76358795166016,
"rps_doc_wikipedia_importance_length_correction": -96.76358795166016
},
"fasttext": {
"dclm": 0.01907205954194069,
"english": 0.9435563683509827,
"fineweb_edu_approx": 0.9593389630317688,
"eai_general_math": 0.007537779863923788,
"eai_open_web_math": 0.10966510325670242,
"eai_web_code": 0.0012561699841171503
}
}
|
{
"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.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": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,717,664,386,434,018,000 |
Chat now with support
Chat with Support
NetVault Plug-in for Oracle 12.3 - User Guide
Introducing Quest® NetVault® Backup Plug-in for Oracle Defining a backup strategy Installing and removing the plug-in Configuring the plug-in Backing up data Using the Oracle Flashback Database Restoring data
Restoring and recovering data: an overview Performing User Managed restores Using advanced User Managed restore procedures Performing RMAN restores Using RMAN types of recovery in a non-RAC environment Using advanced procedures with RMAN restores
Maintaining the Recovery Catalog Using the RMAN CLI Using the plug-in with Oracle RAC Using the plug-in in a failover cluster environment Using the plug-in with Oracle Data Guard Using the plug-in with Oracle Container Databases (CDBs) and Pluggable Databases (PDBs) Troubleshooting
Flashback Logs
Flashback Database has its own logging mechanism. Flashback Logs are generated and stored in the FRA. After Flashback Database is enabled, altered datafile data blocks are copied into the Flashback Logs. These data blocks can be used later to reconstruct the datafile contents. Because Flashback Logs are captured at regular time intervals, the data blocks restored from the Flashback Logs are those blocks stored most immediately before the desired target time. After Flashback Logs are applied, the Redo Log is reapplied to Complete Recovery to the target time.
Viewing Flashback Database status
To view database details about a previously configured database , including whether FRA and Flashback Database are enabled , perform the following steps.
1
In the Navigation Pane, click Create Backup Job, and click Create New next to the Selections list.
3
Double-click Plug‑in for Oracle, click the applicable database, and select View Details from the context menu.
Flash Recovery Area Destination: When FRA is enabled, this option displays the destination of the FRA.
Flashback Database Enabled: Indicates YES if the Flashback Database feature is enabled or NO if not.
Additionally, backups done with plug-in show a Flashback Database node for the plug-in on the Create Selection Set page when you create a restore job. The Flashback Database node lets you perform a Flashback Database instead of a restore or recovery.
Flashback Database options
Selecting Flashback Database in the plug-in is equivalent to the RMAN or SQL FLASHBACK DATABASE command.
Flashback Database has the following options:
To Restore Point: Flashes the database to a specific restore point. A restore point is a named point that can be used as a flashback target. When you create a restore point, you are naming the current System Change Number (SCN). You can create up to 2048 named restore points and these points can either be normal or guaranteed. A guaranteed restore point is used in a Flashback Database.
Restore points can be created using the CREATE RESTORE POINT command. For more information, see Creating Normal and Guaranteed Restore Points in the Oracle Database Backup and Recovery User’s Guide.
To Time: Reverts the database back to its state at the time specified.
To SCN: Reverts the database back to its state at the specified SCN.
Before Time: Reverts the database back to its state one second before the specified timestamp.
Before SCN: Reverts the database back to its state at the system change number just preceding the specified SCN.
Before Reset Logs (available for Oracle 10.2.x and later versions only): Rewinds the database back to the SCN just before the RESETLOGS happened.
Flashback Database restrictions
There are two restrictions on selecting Flashback Database:
On the Create Selection Set page, Flashback Database cannot be selected at the same time as other nodes such as Parameter File, Control Files, Tablespaces, and Datafiles. If selected, the restore job fails and the NetVault Backup binary logs show an error message:
Related Documents
|
{
"url": "https://support.quest.com/technical-documents/netvault-backup-plug-in-for-oracle/12.3/user-guide/19",
"source_domain": "support.quest.com",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "246464",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PE72ORHRPMVAKCP2XN5SBUP55AZRSVML",
"WARC-Concurrent-To": "<urn:uuid:5e380ec1-213d-4f37-ba59-78ffe6eab856>",
"WARC-Date": "2020-08-13T12:00:11Z",
"WARC-IP-Address": "13.32.202.36",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:2W5QXQRU7UVMGPSG3MGKCQIWT6AWADFG",
"WARC-Record-ID": "<urn:uuid:84acb925-2439-4664-af0a-b011094ca18b>",
"WARC-Target-URI": "https://support.quest.com/technical-documents/netvault-backup-plug-in-for-oracle/12.3/user-guide/19",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ad88b9fc-c09f-41ed-b5f1-4f42f34e5781>"
},
"warc_info": "isPartOf: CC-MAIN-2020-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-181.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
22,
40,
41,
87,
88,
298,
545,
828,
829,
844,
845,
1409,
1410,
1444,
1445,
1600,
1601,
1603,
1702,
1704,
1815,
1918,
2019,
2270,
2271,
2298,
2299,
2404,
2405,
2451,
2452,
2841,
3040,
3111,
3180,
3275,
3388,
3534,
3535,
3567,
3568,
3628,
3629,
3894
],
"line_end_idx": [
22,
40,
41,
87,
88,
298,
545,
828,
829,
844,
845,
1409,
1410,
1444,
1445,
1600,
1601,
1603,
1702,
1704,
1815,
1918,
2019,
2270,
2271,
2298,
2299,
2404,
2405,
2451,
2452,
2841,
3040,
3111,
3180,
3275,
3388,
3534,
3535,
3567,
3568,
3628,
3629,
3894,
3911
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3911,
"ccnet_original_nlines": 44,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3196605443954468,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04101838916540146,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.12871286273002625,
"rps_doc_frac_unique_words": 0.3719008266925812,
"rps_doc_mean_word_length": 5.299173355102539,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.789672374725342,
"rps_doc_word_count": 605,
"rps_doc_frac_chars_dupe_10grams": 0.024953210726380348,
"rps_doc_frac_chars_dupe_5grams": 0.10137242823839188,
"rps_doc_frac_chars_dupe_6grams": 0.06581410020589828,
"rps_doc_frac_chars_dupe_7grams": 0.04897068068385124,
"rps_doc_frac_chars_dupe_8grams": 0.04897068068385124,
"rps_doc_frac_chars_dupe_9grams": 0.036494068801403046,
"rps_doc_frac_chars_top_2gram": 0.09544604271650314,
"rps_doc_frac_chars_top_3gram": 0.02339364029467106,
"rps_doc_frac_chars_top_4gram": 0.026512790471315384,
"rps_doc_books_importance": -335.4765319824219,
"rps_doc_books_importance_length_correction": -335.4765319824219,
"rps_doc_openwebtext_importance": -165.59796142578125,
"rps_doc_openwebtext_importance_length_correction": -165.59796142578125,
"rps_doc_wikipedia_importance": -119.74427795410156,
"rps_doc_wikipedia_importance_length_correction": -119.74427795410156
},
"fasttext": {
"dclm": 0.15730422735214233,
"english": 0.7846493124961853,
"fineweb_edu_approx": 2.3991384506225586,
"eai_general_math": 0.3918101191520691,
"eai_open_web_math": 0.4564538598060608,
"eai_web_code": 0.5276645421981812
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.758",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,196,210,150,754,812,000 |
JSON é um formato leve de troca de informações que em muitos casos está sendo utilizado para substituir o XML ou mesmo utilizado em conjunto.
É um formato de dados fácil de escrever e ler por seres humanos e é bastante fácil de ser interpretado por computadores, sendo possível converte-lo facilmente para a notação de objetos JavaScript, o que o torna um boa opção para AJAX, principalmente quando necessitamos processar de alguma forma os dados buscados via AJAX.
Vejamos um exemplo do formato JSON:
{
"nome": "Rodrigo",
"sobrenome": "Aramburu",
"idade":"25",
"site":"http://www.botecodigital.info"
}
O formato é bem simples, um objeto é formado de vários membros dentro de chaves. Um membro é formado de uma string que será o nome da variável e um valor que pode ser: string, numérico, lógico, um array ou um outro objeto.
Vejamos um exemplo um pouco mais complexo:
{
"nome":"Loja Exemplo",
"produtos":[
{"nome":"Monitor LCD","preco":350},
{"nome":"Gravador de DVD","preco":120},
{"nome":"Pendrive","preco":60},
]
}
Neste objeto temos 2 membros: nome que é tem um valor string e produtos que é um array de outros objetos que possuem dois membros: nome e preco. Podemos interpretar o formato JSON utilizando uma função da biblioteca JQueryjQuery.parseJSON – ela recebe o documento JSON como parâmetro e devolve um objeto JavaScript com os valores.
Exemplo:
var dados = '{"nome": "Rodrigo","sobrenome": "Aramburu","idade":"25","site":"http://www.botecodigital.info"}';
var obj = jQuery.parseJSON(dados);
alert(obj.nome);
alert(obj.sobrenome);
alert(obj.idade);
alert(obj.site);
Bastante simples! Deve ser mostrado em janela de alert as palavras “Rodrigo”, “Aramburu”, “25” e ” http://www.botecodigital.info “. Como podemos notar isto torna muito fácil manipular uma série de valores contidos dentro de uma string ou arquivo arquivo.
Mais um exemplo para reforçar:
var dados = '{ ';
dados += '"nome":"Loja Exemplo",';
dados += ' "produtos":[';
dados += ' {"nome":"Monitor LCD","preco":350},';
dados += ' {"nome":"Gravador de DVD","preco":120},';
dados += ' {"nome":"Pendrive","preco":60}';
dados += ' ]';
dados += '}';
var obj = jQuery.parseJSON(dados);
alert( obj.nome);
alert( obj.produtos[0].nome );
alert( obj.produtos[0].preco );
alert( obj.produtos[1].nome );
alert( obj.produtos[1].preco );
Agora vamos ver a real vantagem de utilizar JSON que é utilizá-lo para fazer AJAX e para isso a biblioteca JQuery nos fornece uma função chamada $.getJSON.
Exemplo:
$(document).ready(function(){
$.getJSON('dados.json', function(data) {
$('#nome').html( data.nome);
$('#sobrenome').html( data.sobrenome );
$('#idade').html( data.idade );
$('#site').html( data.site );
});
});
A função $.getJSON recebe como parâmetros um nome de arquivo com dados no formato JSON, após o arquivo ser carregado ele é convertido em um objeto e passado por parâmetro(data) para a função que é responsável por manipular os valores.
Veja o exemplo de uso de JSON
|
{
"url": "https://www.botecodigital.dev.br/javascript/trocando-dados-utilizando-json/",
"source_domain": "www.botecodigital.dev.br",
"snapshot_id": "crawl=CC-MAIN-2022-40",
"warc_metadata": {
"Content-Length": "45198",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LQFLMUY4OLXRFHYYXAWDXSCLN7UUSA26",
"WARC-Concurrent-To": "<urn:uuid:76036374-0112-4cea-a053-1de5acb639fd>",
"WARC-Date": "2022-10-03T13:43:55Z",
"WARC-IP-Address": "192.99.120.180",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:V72WCFSVGXLJEDOWTYWLZAAJF4YRIGJI",
"WARC-Record-ID": "<urn:uuid:a822a12a-28ac-4645-b812-e134e2acd25e>",
"WARC-Target-URI": "https://www.botecodigital.dev.br/javascript/trocando-dados-utilizando-json/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3fd9c209-2d09-4d24-a549-adbc6e1669b1>"
},
"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-14\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,
142,
143,
467,
468,
504,
505,
507,
526,
551,
565,
604,
606,
607,
830,
831,
874,
875,
877,
904,
921,
973,
1029,
1077,
1094,
1096,
1097,
1428,
1429,
1438,
1439,
1550,
1585,
1587,
1604,
1626,
1644,
1661,
1662,
1917,
1918,
1949,
1950,
1969,
2008,
2038,
2097,
2160,
2214,
2236,
2254,
2289,
2291,
2309,
2340,
2372,
2403,
2435,
2436,
2592,
2593,
2602,
2603,
2633,
2684,
2728,
2783,
2830,
2875,
2888,
2892,
2893,
3128,
3129
],
"line_end_idx": [
142,
143,
467,
468,
504,
505,
507,
526,
551,
565,
604,
606,
607,
830,
831,
874,
875,
877,
904,
921,
973,
1029,
1077,
1094,
1096,
1097,
1428,
1429,
1438,
1439,
1550,
1585,
1587,
1604,
1626,
1644,
1661,
1662,
1917,
1918,
1949,
1950,
1969,
2008,
2038,
2097,
2160,
2214,
2236,
2254,
2289,
2291,
2309,
2340,
2372,
2403,
2435,
2436,
2592,
2593,
2602,
2603,
2633,
2684,
2728,
2783,
2830,
2875,
2888,
2892,
2893,
3128,
3129,
3158
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3158,
"ccnet_original_nlines": 73,
"rps_doc_curly_bracket": 0.007599750068038702,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.053973011672496796,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.026986509561538696,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.35982009768486023,
"rps_doc_frac_unique_words": 0.4933686852455139,
"rps_doc_mean_word_length": 5.835543632507324,
"rps_doc_num_sentences": 47,
"rps_doc_symbol_to_word_ratio": 0.00599699979647994,
"rps_doc_unigram_entropy": 4.797309398651123,
"rps_doc_word_count": 377,
"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.009090909734368324,
"rps_doc_frac_chars_top_3gram": 0.009999999776482582,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -344.50213623046875,
"rps_doc_books_importance_length_correction": -344.50213623046875,
"rps_doc_openwebtext_importance": -214.33242797851562,
"rps_doc_openwebtext_importance_length_correction": -214.33242797851562,
"rps_doc_wikipedia_importance": -129.66929626464844,
"rps_doc_wikipedia_importance_length_correction": -129.66929626464844
},
"fasttext": {
"dclm": 0.8253360986709595,
"english": 0.0015653000446036458,
"fineweb_edu_approx": 1.8034782409667969,
"eai_general_math": 0.0007186500006355345,
"eai_open_web_math": 0.4548078179359436,
"eai_web_code": 0.9899843335151672
}
}
|
{
"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.74",
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-557,186,698,941,194,750 |
Issue #12004 has been updated by Chris Travers.
Just some clarification of context on this for the record. Again, my goal is not to debate whether we need a CoC but to make sure that perspectives are on the table.
Coraline Ada Ehmke wrote:
> It should be noted that the leaders of the Postgres project rejected the language in the proposed CoC and have decided to consult with professionals on developing an appropriate code of conduct for their community. In light of that I don't think that we should be considering their draft as a possibility. Details are here: http://www.postgresql.org/message-id/56A8516B.8000105 / agliodbs.com
>
This is somewhat true and somewhat false. They didn't entirely reject it. They considered the text among others, as presumably Matz is doing here. I am actually impressed by how the process appears to be occurring in a very parallel way.
Also one point about the PostgreSQL community is that we didn't see the major division that is happening here, and the individual who most favored the Contributor's Covenant showed himself to be very willing to consider the problems this would pose for a global project. Based on the conversations across the spectrum, there is no chance that PostgreSQL will choose a code of conduct which compromises a general political neutrality in the community (there is total consensus that political agendas do not belong in the code of conduct).
I am sure when this is done, we in the Ruby community, will all come together again as a community and any rifts will be quickly healed.
----------------------------------------
Misc #12004: Code of Conduct
https://bugs.ruby-lang.org/issues/12004#change-56813
* Author: Coraline Ada Ehmke
* Status: Assigned
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
I am the creator of the Contributor Covenant, a code of conduct for Open Source projects. At last count there are over 13,000 projects on Github that have adopted it. This past year saw adoption of Contributor Covenant by a lot of very large, very visible projects, including Rails, Github's Atom text editor, Angular JS, bundler, curl, diaspora, discourse, Eclipse, rspec, shoes, and rvm. The bundler team made code of conduct integration an option in the gem creation workflow, putting it on par with license selection. Many open source language communities have already adopted the code of conduct, including Elixir, Mono, the .NET foundation, F#, and Apple's Swift. RubyTogether also adopted a policy to only fund Ruby projects that had a solid code of conduct in place.
Right now in the PHP community there is a healthy debate about adopting the Contributor Covenant. Since it came from and has been so widely adopted by the Ruby community at large, I think it's time that we consider adopting it for the core Ruby language as well.
Our community prides itself on niceness. What a code of conduct does is define what we mean by nice. It states clearly that we value openness, courtesy, and compassion. That we care about and want contributions from people who may be different from us. That we pledge to respect all contributors regardless of their race, gender, sexual orientation, or other factors. And it makes it clear that we are prepared to follow through on these values with action when and if an incident arises.
I'm asking that we join with the larger Ruby community in supporting the adoption of the Contributor Covenant for the Ruby language. I think that this will be an important step forward and will ensure the continued welcoming and supportive environment around Ruby. You can read the full text of the Contributor Covenant at http://contributor-covenant.org/version/1/3/0/ and learn more at http://contributor-covenant.org/.
Thanks for your consideration and I look forward to hearing your thoughts.
---Files--------------------------------
Screen Shot 2016-01-22 at 6.45.23 PM.png (595 KB)
Ruby_Code_of_Conduct_Numbers.png (119 KB)
Ruby_Code_of_Conduct_Discussion.png (143 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
|
{
"url": "http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/73617",
"source_domain": "blade.nagaokaut.ac.jp",
"snapshot_id": "crawl=CC-MAIN-2019-30",
"warc_metadata": {
"Content-Length": "8627",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:2EXI4LOQIOGYXBKIUCBAOAYNDAF4ZDMP",
"WARC-Concurrent-To": "<urn:uuid:6bcba689-d709-4541-9a79-29957c025ccd>",
"WARC-Date": "2019-07-22T14:24:53Z",
"WARC-IP-Address": "133.44.98.95",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:E5XX54NPREE5PHV26TWKKFN3W2QMSTH5",
"WARC-Record-ID": "<urn:uuid:1f04536d-9748-4b5a-931e-09f9c33d09ec>",
"WARC-Target-URI": "http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/73617",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fc8b5f31-4637-4fb7-bd6e-4947d765fbe2>"
},
"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,
48,
49,
50,
217,
218,
244,
639,
642,
883,
884,
1423,
1424,
1561,
1562,
1603,
1632,
1685,
1686,
1715,
1734,
1753,
1784,
1825,
2600,
2601,
2864,
2865,
3354,
3355,
3778,
3779,
3854,
3855,
3856,
3897,
3947,
3989,
4034,
4035,
4036,
4040,
4068,
4069,
4145
],
"line_end_idx": [
48,
49,
50,
217,
218,
244,
639,
642,
883,
884,
1423,
1424,
1561,
1562,
1603,
1632,
1685,
1686,
1715,
1734,
1753,
1784,
1825,
2600,
2601,
2864,
2865,
3354,
3355,
3778,
3779,
3854,
3855,
3856,
3897,
3947,
3989,
4034,
4035,
4036,
4040,
4068,
4069,
4145,
4207
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4207,
"ccnet_original_nlines": 44,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 1,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.37691402435302734,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.020023560151457787,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2120141237974167,
"rps_doc_frac_unique_words": 0.5231999754905701,
"rps_doc_mean_word_length": 5.203199863433838,
"rps_doc_num_sentences": 51,
"rps_doc_symbol_to_word_ratio": 0.004711430054157972,
"rps_doc_unigram_entropy": 5.278292179107666,
"rps_doc_word_count": 625,
"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.01660517044365406,
"rps_doc_frac_chars_top_3gram": 0.03597785905003548,
"rps_doc_frac_chars_top_4gram": 0.012915129773318768,
"rps_doc_books_importance": -423.1437072753906,
"rps_doc_books_importance_length_correction": -423.1437072753906,
"rps_doc_openwebtext_importance": -256.9562683105469,
"rps_doc_openwebtext_importance_length_correction": -256.9562683105469,
"rps_doc_wikipedia_importance": -179.40109252929688,
"rps_doc_wikipedia_importance_length_correction": -179.40109252929688
},
"fasttext": {
"dclm": 0.0229494608938694,
"english": 0.9345454573631287,
"fineweb_edu_approx": 1.479029893875122,
"eai_general_math": 0.1595771312713623,
"eai_open_web_math": 0.21201401948928833,
"eai_web_code": 0.27468639612197876
}
}
|
{
"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": "303.48",
"labels": {
"level_1": "Social sciences",
"level_2": "",
"level_3": "Social sciences — Dictionaries"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,174,924,835,556,071,400 |
ちゃんと文字コードはあわせましょうbyRails+MySQL
mysqlでもtest/fixtures/categories.ymlでテストデータ入れられるのかとりあえずやってみました。
そしたらなんかエラー。。。
C:\rails\rjs_tutorial>rake db:fixtures:load
(in C:/rails/rjs_tutorial)
rake aborted!
Mysql::Error: Data too long for column 'name' at row 1: INSERT INTO `categories`
(`name`, `updated_at`, `id`, `description`, `created_at`) VALUES ('猫T', '2009-
01-20 07:17:46', 831344649, '猫の写真をあしらった', '2009-01-20 07:17:46')
Mysqlの方でエラーが出てる。。何で。。
で、ためしに↑で出ていたInsert文を直接Mysql起動させて打ってみることに。
すると同じエラーが。。
ERROR 1406 (22001): Data too long for column 'name' at row 1
なんだ。。データが長すぎるって言ってるけど、なんで。。。
色々とデータ少なくしてみましたが、事態変わらず。
で、ちょっと色々引っ掛けて調べてみたら、どうやらMysqlと、クエリとで文字コードが違うと起こるらしい。
なのでMysql文字コードsjisにして再度実行。
set names sjis;
通った!やっぱりそうらしい。。
じゃ今度はrakeタスクからやる場合に文字コード指定してあげればよいので、多分そこら辺はdatabase.ymlを見に行ってるはず。
ここのencodingを
encoding: sjis
にして、再度実行!
C:\rails\rjs_tutorial>rake db:fixtures:load
(in C:/rails/rjs_tutorial)
いけた!
テーブル確認してみても、ちゃんとデータ入ってる。
やっぱり文字コードあってなかったのが原因なのね。。
でもこれじゃ表示する時UTF8だからどっちにしろ化ける。。
ので、テーブル作り直し。。。
http://wota.jp/ac/?date=20061011
ここを参考に、mysqlのmy.iniファイルに追記。
[mysqld]
default-character-set=utf8
skip-character-set-client-handshake
で、再度テーブルを作り直し。
こうすればTable自体がUTF8になるハズ。
で、これにあわせてdatabase.ymlをutf8に修正。
さて、これでいくだろー
…えらった。。。しかも同じエラー・・・
なんで。。utf8なんで駄目なの。。
と、ふとtest/fixtures/categories.ymlのファイル自体がSJISになっている事に気が付いて、はた、と。。。
もしかして…こいつがutf8になってないからか。。。
ってことで、test/fixtures/categories.ymlをutf8に修正。
再度とらい。
通った!
で、実際にサーバー起動して表示させてみると、ちゃんと表示されてた!
よかったー。。。ちゃんと作る時にみとかないと駄目ね。。。
|
{
"url": "https://aqua1127.hatenadiary.org/entry/20100819/1282197247",
"source_domain": "aqua1127.hatenadiary.org",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "36162",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PI2HANZO56FFKIJVX5KKYIQBHXOI5SPM",
"WARC-Concurrent-To": "<urn:uuid:929f5825-f18d-490a-be18-fc3d54023a2f>",
"WARC-Date": "2019-08-22T19:09:45Z",
"WARC-IP-Address": "13.115.18.61",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:OWZ6CFLSL5R5ZQCCF526ECQAMKWBFCTL",
"WARC-Record-ID": "<urn:uuid:df4e178d-0d7b-4e9c-8060-a39cfc069498>",
"WARC-Target-URI": "https://aqua1127.hatenadiary.org/entry/20100819/1282197247",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:74dcb46d-c431-44bf-8242-a5b3d0245c08>"
},
"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-52.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,
31,
32,
95,
109,
110,
154,
181,
195,
276,
277,
356,
357,
422,
423,
424,
446,
447,
489,
501,
502,
563,
564,
565,
594,
619,
620,
673,
699,
700,
716,
717,
718,
734,
801,
814,
815,
830,
831,
841,
842,
886,
913,
914,
915,
920,
945,
971,
1001,
1002,
1017,
1018,
1051,
1052,
1080,
1081,
1090,
1117,
1153,
1154,
1155,
1170,
1194,
1225,
1237,
1238,
1258,
1277,
1343,
1370,
1414,
1421,
1422,
1427,
1461
],
"line_end_idx": [
31,
32,
95,
109,
110,
154,
181,
195,
276,
277,
356,
357,
422,
423,
424,
446,
447,
489,
501,
502,
563,
564,
565,
594,
619,
620,
673,
699,
700,
716,
717,
718,
734,
801,
814,
815,
830,
831,
841,
842,
886,
913,
914,
915,
920,
945,
971,
1001,
1002,
1017,
1018,
1051,
1052,
1080,
1081,
1090,
1117,
1153,
1154,
1155,
1170,
1194,
1225,
1237,
1238,
1258,
1277,
1343,
1370,
1414,
1421,
1422,
1427,
1461,
1489
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1489,
"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.03536976873874664,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03215434029698372,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.6688103079795837,
"rps_doc_frac_unique_words": 0.8241758346557617,
"rps_doc_mean_word_length": 14.549450874328613,
"rps_doc_num_sentences": 10,
"rps_doc_symbol_to_word_ratio": 0.006430869922041893,
"rps_doc_unigram_entropy": 4.2613654136657715,
"rps_doc_word_count": 91,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04531722143292427,
"rps_doc_frac_chars_dupe_6grams": 0.04531722143292427,
"rps_doc_frac_chars_dupe_7grams": 0.04531722143292427,
"rps_doc_frac_chars_dupe_8grams": 0.04531722143292427,
"rps_doc_frac_chars_dupe_9grams": 0.04531722143292427,
"rps_doc_frac_chars_top_2gram": 0.052870091050863266,
"rps_doc_frac_chars_top_3gram": 0.055891238152980804,
"rps_doc_frac_chars_top_4gram": 0.08157099783420563,
"rps_doc_books_importance": -142.9237518310547,
"rps_doc_books_importance_length_correction": -134.898193359375,
"rps_doc_openwebtext_importance": -72.18839263916016,
"rps_doc_openwebtext_importance_length_correction": -72.18839263916016,
"rps_doc_wikipedia_importance": -50.4406623840332,
"rps_doc_wikipedia_importance_length_correction": -39.17636489868164
},
"fasttext": {
"dclm": 0.20176368951797485,
"english": 0.001484530046582222,
"fineweb_edu_approx": 2.1896681785583496,
"eai_general_math": 0.21099621057510376,
"eai_open_web_math": 0.8460521101951599,
"eai_web_code": 0.6949511766433716
}
}
|
{
"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.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "16",
"label": "Personal Blog"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,380,376,831,160,976,400 |
top of page
Using Variables in elearning for Gamification
Adding game mechanics to elearning is great way to keep your learners engaged and motivated. However, you don’t necessarily have to learn any new software to create a game-like experience in your elearning! Many game features such as achievements, points and badges can be done right in Storyline with variables.
Variables
We have discussed using variables in previous articles on programming elearning before, but what exactly is a variable?
Variables are like a placeholder for a piece of information that the user will eventually populate with a value. The value is a form of information, and that can be used for other functions elsewhere in the elearning. There are three types of variables that determine what kind of information the variable will hold.
1. True/False: there are only two possible values. This can be used to track Yes/No types of information, i.e.: if the slide has been completed, if an object is selected, etc. This is also useful if the user can toggle between the two states, i.e.: whether the closed captions has been turned on or off.
2. Text: this variable contains text values. This can be used for things such as name input or other text that can be changed.
3. Number: this variable contains numerical values. This is a great way to track points, progress, calculations, and other functions.
With these variables, you can program Storyline to customize the username on badges and achievements, tally points, count the number of clicks on a slide, and other functions. These are also very useful in triggers as you can use variables in trigger conditions, such as showing feedback or moving onto the next screen when a variable reaches a certain value.
When you want to display any of these values in the elearning, then create a text box that contains the name of the variable with % signs at either end. For instance, if you have a variable to keep track of the learner’s points called GameScore, you would display this on screen as %GameScore%. This text box will populate with whatever the value of GameScore is and updates as it changes!
Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
• Facebook Basic Square
• Twitter Basic Square
• Google+ Basic Square
bottom of page
|
{
"url": "https://www.pathwaystrainingandelearning.ca/single-post/2017/04/07/using-variables-in-elearning-for-gamification",
"source_domain": "www.pathwaystrainingandelearning.ca",
"snapshot_id": "CC-MAIN-2024-18",
"warc_metadata": {
"Content-Length": "1050561",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:WKULKW22H3OB635PCHGCSRFX47QNN4U4",
"WARC-Concurrent-To": "<urn:uuid:ddc17f95-82ae-4245-b2a8-3d509648db9e>",
"WARC-Date": "2024-04-12T13:33:07Z",
"WARC-IP-Address": "34.149.87.45",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:QCWLZDB6QJSH3E4BVAAJUDHAK5R3WOJS",
"WARC-Record-ID": "<urn:uuid:a3c52c3d-24c7-4054-b16b-2111edd2afb5>",
"WARC-Target-URI": "https://www.pathwaystrainingandelearning.ca/single-post/2017/04/07/using-variables-in-elearning-for-gamification",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e4a8ac5d-a589-42af-8aba-b92d2f3fb7b3>"
},
"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-230\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,
12,
13,
59,
60,
61,
374,
375,
385,
386,
506,
507,
824,
825,
1131,
1132,
1261,
1262,
1398,
1399,
1759,
1760,
2150,
2151,
2166,
2179,
2187,
2202,
2212,
2238,
2263,
2288
],
"line_end_idx": [
12,
13,
59,
60,
61,
374,
375,
385,
386,
506,
507,
824,
825,
1131,
1132,
1261,
1262,
1398,
1399,
1759,
1760,
2150,
2151,
2166,
2179,
2187,
2202,
2212,
2238,
2263,
2288,
2302
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2302,
"ccnet_original_nlines": 31,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.474387526512146,
"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.13808463513851166,
"rps_doc_frac_unique_words": 0.46113988757133484,
"rps_doc_mean_word_length": 4.7538862228393555,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.825390338897705,
"rps_doc_word_count": 386,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.020708449184894562,
"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.01362397987395525,
"rps_doc_frac_chars_top_3gram": 0.014713900163769722,
"rps_doc_frac_chars_top_4gram": 0.013079020194709301,
"rps_doc_books_importance": -193.91329956054688,
"rps_doc_books_importance_length_correction": -193.91329956054688,
"rps_doc_openwebtext_importance": -121.22761535644531,
"rps_doc_openwebtext_importance_length_correction": -121.22761535644531,
"rps_doc_wikipedia_importance": -106.57601165771484,
"rps_doc_wikipedia_importance_length_correction": -106.57601165771484
},
"fasttext": {
"dclm": 0.11137688159942627,
"english": 0.9170397520065308,
"fineweb_edu_approx": 2.700509548187256,
"eai_general_math": 0.653062105178833,
"eai_open_web_math": 0.22794806957244873,
"eai_web_code": 0.31830090284347534
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.072",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "371.3922",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Teachers, Teaching, and School management and organization"
}
}
},
"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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,191,655,324,226,292,200 |
Why?
Search This Blog
Friday, April 2, 2021
HPE DL20 Gen10 #P17079-B21 with two EVO 2.5" SSD's running pfSense in zfs zpool
I have a HPE ProLiant DL20 Gen10 E-2224 1P 16GB-U S100i 2LFF 290W PS Server server setup with two 2.5" EVO SSD's, running pfSense in a mirrored zfs zpool. Hardware used for this build includes:
1. #P17079-B21 HPE ProLiant DL20 Gen10 E-2224 1P 16GB-U S100i 2LFF 290W PS Server
2. (2x) Samsung 860 EVO 250GB 2.5-Inch SATA III Internal SSD (MZ-76E250E)
3. (2x) #774026-001 G10 3.5 SAS/SATA HDD TRAY
4. (2x) DSLRKIT 2.5" SSD to 3.5" SATA HDD Adapter Caddy Tray CAGE Hot Swap Plug
The EVO drives and the 2.5" to 3.5" Adapter's are non HPE and purchased off Amazon. With this setup I am even able to hot swap drives in the array and repair without reboot or interruption of service. Drive lights work. Cooling profile is still valid.
The people at ZaynTek are the best. If you need any HPE Servers or server bolt ons they should be your first stop.
ACCOUNT MANAGER
Saturday, June 16, 2018
Galera Cluster on CentOS 7
Galera Cluster on CentOS 7
Resource links
https://linuxadmin.io/galeria-cluster-configuration-centos-7/
https://mariadb.com/kb/en/library/getting-started-with-mariadb-galera-cluster/
https://mariadb.com/kb/en/library/galera-cluster-system-variables/
I will be using three servers
mysql1 = 192.168.10.160
mysql2 = 192.168.10.161
mysql3 = 192.168.10.162
With mysql1 being the master node.
Turn off firewalld
Disable selinux
reboot
Add the MariaDB repository to each of the 3 or more nodes
vi /etc/yum.repos.d/MariaDB.repo
Insert the following repository information and save the file
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Install the packages from yum, Galera is included when these are installed when using 10.1 or greater
yum -y install MariaDB-server MariaDB-client MariaDB-common
rsync is the default to perform the replication so install that. Also lsof (list open files)
yum install -y rsync lsof
Make sure each of the MariaDB instances starts on reboot
systemctl enable mariadb
Galera Master Node Configuration
After installing MariaDB on the master node edit the server.cnf file
vi /etc/my.cnf.d/server.cnf
add the following under the [galera]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.10.160,192.168.10.161,192.168.10.162"
#
## Galera Cluster Configuration
wsrep_cluster_name="cluster1"
## Galera Synchronization Configuration
wsrep_sst_method=rsync
## Galera Node Configuration
####unigue per node
wsrep_node_address="192.168.10.160"
####unigue per node
wsrep_node_name="mysql1"
wsrep_on=ON – Setting this to ON enables replication. In MariaDB 10.1, replication is turned off as a default, so this needs to be explicitly stated.
wsrep_cluster_address – This is where we specify each of the IP addresses for the nodes delineated by a comma. The primary node is always the first IP address, this this case its 192.168.10.160
wsrep_cluster_name – Is the name of the cluster, you can name this anything you want
wsrep_node_address – Is the IP address of the node you are configuring
wsrep_node_name – This is the name of the node you are currently configuring, it can be named anything you want, it just needs to be unique.
Under the [mysqld] section add a log location (if you don’t, it will log to the main syslog)
log_error=/var/log/mariadb.log
Once you have finished editing and saved server.cnf, go ahead and create the error log
touch /var/log/mariadb.log
Give the error log the appropriate permissions:
chown mysql:mysql /var/log/mariadb.log
You can now start the new master node by typing the following
galera_new_cluster
After you have started it, make sure it has bound to the correct ports using lsof
Port 4567 is for replication traffic:
# lsof -i:4567
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 4121 mysql 11u IPv4 34770 0t0 TCP *:tram (LISTEN)
Port 3306 is for MySQL client connections:
# lsof -i:3306
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 4121 mysql 26u IPv4 34787 0t0 TCP *:mysql (LISTEN)
mysql
Then check the cluster size
MariaDB [(none)]> SHOW STATUS LIKE 'wsrep_cluster_size';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 1 |
+--------------------+-------+
It should say 1 at this point because only the primary node is connected.
Adding Additional Nodes To Galera
After installing MariaDB on the addtional nodes, you will want to copy the [galera] section of /etc/my.cnf.d/server.cnf that We created earlier and insert it into the server.cnf on each of the additional nodes. The only lines that will each on each of the additional nodes will be the the following:
wsrep_node_address="192.168.10.161"
wsrep_node_name="mysql2"
The wsrep_node_address will be the IP address of the node you are configuring and the wsrep_node_name will be the name of that node.
After you have finished each of the servers configuration files, you can start them normally
systemctl start mariadb
As each node connects to the cluster you should see the wsrep_cluster_size increase:
MariaDB [(none)]> SHOW STATUS LIKE 'wsrep_cluster_size';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 3 |
+--------------------+-------+
You will also see nodes join in the log:
WSREP: Member 1.0 (centos7-vm2) synced with group.
The logs will also indicate when a node as left the group:
WSREP: forgetting 96a5eca6 (tcp://192.168.1.101:4567)
WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2
You can view the full configuration of Galera by typing the following:
MariaDB [(none)]> show status like 'wsrep%';
Testing Replication On The Galera Cluster. On any node create a new db with
MariaDB [(none)]> create database testdb1;
You should see the testdb1 database appear on the other nodes as well.
Sunday, June 10, 2018
MySQL allow remote access
MySQL allow remote access
Say you want to allow the user root with the password of password remote access to the database of test.
GRANT ALL PRIVILEGES ON test.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit;
CentOS 7 install mysql connector for python3.6
CentOS 7 install mysql connector for python3.6
Go to website
https://pypi.org/project/mysqlclient/#files
and download the file
mysqlclient-1.3.12.tar.gz
place in /root dir
Now from server console as root user (or su)
cd /root
gzip -d mysqlclient-1.3.12.tar.gz
tar -xvf mysqlclient-1.3.12.tar
cd /root/mysqlclient-1.3.12
yum install -y mariadb-devel
python3.6 setup.py build
python3.6 setup.py install
Now in py script
#!/usr/bin/python3.6
import MySQLdb
# Open database connection
db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )
# prepare a cursor object using cursor() method
cursor = db.cursor()
# execute SQL query using execute() method.
cursor.execute("SELECT VERSION()")
# Fetch a single row using fetchone() method.
data = cursor.fetchone()
print ("Database version : %s " % data)
# disconnect from server
db.close()
If you use this in a web browser
#!/usr/bin/python3.6
import os
import cgi
import MySQLdb
# Set content typr for web browser use
print ("Content-type: text/html\n")
# Open database connection
db = MySQLdb.connect("localhost","root","password","information_schema" )
# prepare a cursor object using cursor() method
cursor = db.cursor()
# execute SQL query using execute() method.
cursor.execute("SELECT VERSION()")
# Fetch a single row using fetchone() method.
data = cursor.fetchone()
print ("Database version : %s " % data)
# disconnect from server
db.close()
Sunday, June 3, 2018
Python3.6 My personal 101 notes
Python3.6 My personal 101 notes
Miscellaneous operating system interfaces
import os
Common Gateway Interface support
import cgi
CGI Env Variables
http://www.cgi101.com/book/ch3/text.html
# Set content type for web browser use
print ("Content-type: text/html\n")
# Begin the web page html tags
print ("<html>")
print ("<body>")
# End the web page html tags
print ("</body>")
print ("</html>" )
# Get Values from a form
# So say form.html submites to /cgi-bin/form.py
form = cgi.FieldStorage()
if "name" not in form or "addr" not in form:
print "<H1>Error</H1>"
print "Please fill in the name and addr fields."
return
print "<p>fname:", form["fname"].value
print "<p>lname:", form["lname"].value
...further form processing here...
# Get data from fields assign to vars and print them
# using form = cgi.FieldStorage()
first_name = form.getvalue('fname')
last_name = form.getvalue('lname')
my_age = form.getvalue('age')
print (first_name)
print ("<br>")
print (last_name)
print ("<br>")
print (my_age)
print ("<br>")
# Print form values using form = cgi.FieldStorage()
print ("first name: " + form["fname"].value)
print ("<br>")
print ("last name: " + form["lname"].value)
print ("<br>")
print ("age: " + form["age"].value)
print ("<br>")
# Print some os enviroment vars
# using import os
ra = os.environ['REMOTE_ADDR']
print (ra)
print ("<br>")
ss = os.environ['SERVER_SOFTWARE']
print (ss)
print ("<br>")
# This is a formatted web ui output of some stuff
print ("Content-type: text/html\n")
print ("<html>")
print ("<body>")
print ("<h1>Hello " + first_name + " " + last_name + ". Your age is " + age + "</h1>")
print ("The IP address of your client is: " + ra)
print ("<br>")
print ("The software on this Python Server is: " + ss)
print ("</body>")
print ("</html>" )
# Read Write files with Python
http://www.pythonforbeginners.com/files/reading-and-writing-files-in-python
print ("<h1>Writing text file now to testfile.txt</h1>")
# Set file path and name as var of path
path = '/var/www/cgi-bin/testfile.txt'
file = open(path,'w')
file.write("Hello World\n")
file.write("This is our new text file\n")
file.write("and this is another line.\n")
file.write("Why? Because we can.\n")
file.close()
print ("<h1>Reading text file testfile.txt</h1>")
file = open(path,'r')
print (file.read())
file.close()
print ("<h1>Reading first 10 characters</h1>")
file = open(path,'r')
print (file.read(10))
file.close()
print ("<h1>Reading file by line</h1>")
file = open(path,'r')
print (file.readline())
file.close()
print ("<h1>Reading file all lines</h1>")
file = open(path,'r')
print (file.readlines())
file.close()
print ("<h1>Reading file looping over file object</h1>")
file = open(path,'r')
for line in file:
print (line)
...
file.close()
Saturday, June 2, 2018
Python3.6 Processing user Input
Jacked from http://interactivepython.org/runestone/static/webfundamentals/CGI/forms.html
Processing user Input
Lets start with a basic page with a form.
<html>
<body>
<form action='cgi-bin/hello2.py' method='get'>
<label for="myname">Enter Your Name</label>
<input id="myname" type="text" name="firstname" value="Nada" />
<input type="submit">
</form>
</body>
</html>
There are two important attributes on the form tag:
• method: this tells the browser which http method to use when submitting the form back to the server. The options are get or post.
• action: This tells the browser the URL to use when submitting the form.
The input type submit renders as a button in the form. The purpose of this input type is to cause the form to be submitted back to the web server.
#!/usr/bin/env python
import os
print "Content-type: text/html\n"
qs = os.environ['QUERY_STRING']
if 'firstname' in qs:
name = qs.split('=')[1]
else:
name = 'No Name Provided'
print "<html>"
print "<body>"
print "<h1>Hello %s</h1>" % name
print "</pre>"
print "</body>"
print "</html>"
The new cgi script must now check to see if the QUERY_STRING environment variable contains the string firstname. Note that that firstname in the query string corresponds to the name attribute of the input element.
When you press the submit button for a form, the web browser iterates over all of the input elements in the form, and collects the name value attributes of each. These are put together into a string that becomes part of the URL. The name value pairs are added after the usual URL information using the form: ?firstname=Sheldon&lastname=Cooper The ? separates the query string information from the URL itself. The & separates each name value pair.
The following figure gives you a good sense for the flow of how our little application works.
../_images/cgi-round-trip.svg
Combining into One File
Lets now combine our application into a single file. Using the following flow:
1. If there is no QUERY_STRING simply return the HTML for the form.
2. If there is a QUERY_STRING then do not display the form, simply display the Hello greeting to the name stored in the QUERY STRING.
Along the way we will clean up our code and refactor it into a couple of functions.
#!/usr/bin/env python
import os
headers = ["Content-type: text/html"]
qs = os.environ['QUERY_STRING']
def sendHeaders():
for h in headers:
print h
print "\n"
def sendForm():
print '''
<html>
<body>
<form action='cgi-bin/hellobetter.py' method='get'>
<label for="myname">Enter Your Name</label>
<input id="myname" type="text" name="firstname" value="Nada" />
<input type="submit">
</form>
</body>
</html>
'''
def sendPage(name):
print '''
<html>
<body>
<h1>Hello {0}</h1>
</body>
</html>
'''.format(name)
if not qs:
sendHeaders()
sendForm()
else:
if 'firstname' in qs:
name = qs.split('=')[1]
else:
name = 'No Name Provided'
sendHeaders()
sendPage(name)
The headers list is to set us up with a pattern that will be useful later. Sometimes we don’t know right away what headers we may want to send. We’ll see that in the next section. So we can defer sending the headers until we have done all of our processing and are ready to send back the results. To add a header to our response we can simply append the string to the list of headers.
The other functions, sendPage and sendForm reduce the number of print statements we need by making use of Python’s triple quoted strings, and string formatting.
Next Section - Cookies
CentOS 7 install and load mod_wsgi in Apache for Python
CentOS 7 install and load mod_wsgi in Apache for Python
Must have httpd-develinstalled
yum install httpd-devel
Source code tar balls can be obtained from:
https://github.com/GrahamDumpleton/mod_wsgi/releases
wget the file you want
uncompress and untar
tar xvfz mod_wsgi-X.Y.tar.gz
cd into the mod_wsgi dir
Now configure, make, and make install
./configure
make
make install
Make sure the module gets loaded in Apache at restart by adding into the main Apache “httpd.conf” configuration file by adding the following
LoadModule wsgi_module modules/mod_wsgi.so
Now restart Apache
systemctl restart httpd
Now check to make sure mod is loaded
apachectl -M
Now to setup for WSGIScriptAlias. This was taken from
https://modwsgi.readthedocs.io/en/master/configuration-directives/WSGIScriptAlias.html
add the following to the httpd.conf file
WSGIScriptAlias /wsgi-scripts/ /var/www/wsgi-scripts/
<Directory /var/www/wsgi-scripts>
Order allow,deny
Allow from all
</Directory>
mkdir /var/www/wsgi-scripts/
vi /var/www/wsgi-scripts/myapp.wsgi
def application(environ, start_response):
status = '200 OK'
output = b'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
Now chmod the file to 705
chmod 705 /var/www/wsgi-scripts/myapp.wsgi
Restart httpd with
systemctl restart httpd
Now see your app in the web browser at
http://your-ip-here/wsgi-scripts/myapp.wsgi
CentOS 7 Enable CGI executing for use of Python script
CentOS 7 Enable CGI executing for use of Python script
See the post "CentOS 7 install and setup for python3.6" at
http://glenewhittenberg.blogspot.com/2018/06/centos7-install-and-setup-for-python36_1.html
before continuing
By default, CGI is allowed under the "/var/www/cgi-bin" directory.
[root@python /]# grep "^ *ScriptAlias" /etc/httpd/conf/httpd.conf
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
Create test page in /var/www/cgi-bin/ directory
[root@python /]# vi /var/www/cgi-bin/test.py
#!/usr/bin/python3.6
print ("Content-type: text/html\n\n")
print ("<html>\n<body>")
print ("<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">")
print ("Python Script Test Page")
print ("</div>\n</body>\n</html>")
Now chmod so the file is executable to all (-rwx---r-x)
[root@python /]# chmod 705 /var/www/cgi-bin/test.py
Now run in web browser
http://your-ip-here/cgi-bin/test.py
Friday, June 1, 2018
CentOS 7 install and setup for python3.6
CentOS 7 install and setup for python3.6
cp /etc/sysconfig/selinux /etc/sysconfig/selinux.bak
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux
cp /etc/selinux/config /etc/selinux/config.bak
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
systemctl stop firewalld
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
yum -y install bind-utils traceroute net-tools ntp* gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel xinetd unzip libtool* make patch perl bison flex-devel gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf libxml2-devel cmake sqlite* wget ntp* lm_sensors ncurses-devel qt-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel wget bc gzip uuid* libuuid-devel jansson* libxml2* sqlite* openssl* lsof NetworkManager-tui mlocate yum-utils kernel-devel nfs-utils tcpdump git vim gdisk parted
yum -y groupinstall "Development Tools"
yum -y update
yum -y upgrade
cd /root
echo ':color desert' > .vimrc
systemctl disable kdump.service
reboot
yum -y install epel-release
yum -y install stress htop iftop iotop hddtemp smartmontools iperf3 sysstat mlocate
updatedb
---install LAMP
yum -y install httpd mariadb-server mariadb php php-mysql
systemctl enable httpd.service
systemctl start httpd.service
systemctl status httpd.service
Make sure it works with:
http://your_server_IP_address/
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
mysql_secure_installation
vi /var/www/html/info.php
<?php phpinfo(); ?>
http://your_server_IP_address/info.php
---End install LAMP
Below was jacked from https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7
Let’s first make sure that yum is up to date by running this command:
sudo yum -y update
The -y flag is used to alert the system that we are aware that we are making changes, preventing the terminal from prompting us to confirm.
Next, we will install yum-utils, a collection of utilities and plugins that extend and supplement yum:
sudo yum -y install yum-utils
Finally, we’ll install the CentOS Development Tools, which are used to allow you to build and compile software from source code:
sudo yum -y groupinstall development
Once everything is installed, our setup is in place and we can go on to install Python 3.
Step 2 — Installing and Setting Up Python 3
CentOS is derived from RHEL (Red Hat Enterprise Linux), which has stability as its primary focus. Because of this, tested and stable versions of applications are what is most commonly found on the system and in downloadable packages, so on CentOS you will only find Python 2.
Since instead we would like to install the most current upstream stable release of Python 3, we will need to install IUS, which stands for Inline with Upstream Stable. A community project, IUS provides Red Hat Package Manager (RPM) packages for some newer versions of select software.
To install IUS, let’s install it through yum:
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
Once IUS is finished installing, we can install the most recent version of Python:
sudo yum -y install python36u
When the installation process of Python is complete, we can check to make sure that the installation was successful by checking for its version number with the python3.6 command:
python3.6 -V
With a version of Python 3.6 successfully installed, we will receive the following output:
Output
Python 3.6.1
We will next install pip, which will manage software packages for Python:
sudo yum -y install python36u-pip
A tool for use with Python, we will use pip to install and manage programming packages we may want to use in our development projects. You can install Python packages by typing:
sudo pip3.6 install package_name
Here, package_name can refer to any Python package or library, such as Django for web development or NumPy for scientific computing. So if you would like to install NumPy, you can do so with the command pip3.6 install numpy.
Finally, we will need to install the IUS package python36u-devel, which provides us with libraries and header files we will need for Python 3 development:
sudo yum -y install python36u-devel
The venv module will be used to set up a virtual environment for our development projects in the next step.
Step 3 — Setting Up a Virtual Environment
Now that we have Python installed and our system set up, we can go on to create our programming environment with venv.
Virtual environments enable you to have an isolated space on your computer for Python projects, ensuring that each of your projects can have its own set of dependencies that won’t disrupt any of your other projects.
Setting up a programming environment provides us with greater control over our Python projects and over how different versions of packages are handled. This is especially important when working with third-party packages.
You can set up as many Python programming environments as you want. Each environment is basically a directory or folder in your computer that has a few scripts in it to make it act as an environment.
Choose which directory you would like to put your Python programming environments in, or create a new directory with mkdir, as in:
mkdir environments
cd environments
Once you are in the directory where you would like the environments to live, you can create an environment by running the following command:
python3.6 -m venv my_env
Essentially, this command creates a new directory (in this case called my_env) that contains a few items that we can see with the ls command:
bin include lib lib64 pyvenv.cfg
Together, these files work to make sure that your projects are isolated from the broader context of your local machine, so that system files and project files don’t mix. This is good practice for version control and to ensure that each of your projects has access to the particular packages that it needs.
To use this environment, you need to activate it, which you can do by typing the following command that calls the activate script in the bin directory:
source my_env/bin/activate
Your prompt will now be prefixed with the name of your environment, in this case it is called my_env:
This prefix lets us know that the environment my_env is currently active, meaning that when we create programs here they will use only this particular environment’s settings and packages.
Note: Within the virtual environment, you can use the command python instead of python3.6, and pip instead of pip3.6 if you would prefer. If you use Python 3 on your machine outside of an environment, you will need to use the python3.6 and pip3.6 commands exclusively.
After following these steps, your virtual environment is ready to use.
Step 4 — Creating a Simple Program
Now that we have our virtual environment set up, let’s create a simple “Hello, World!” program. This will make sure that our environment is working and gives us the opportunity to become more familiar with Python if we aren’t already.
To do this, we’ll open up a command-line text editor such as vim and create a new file:
vi hello.py
Once the text file opens up in our terminal window, we will have to type i to enter insert mode, and then we can write our first program:
print("Hello, World!")
Now press ESC to leave insert mode. Next, type :x then ENTER to save and exit the file.
We are now ready to run our program:
python hello.py
The hello.py program that you just created should cause the terminal to produce the following output:
Output
Hello, World!
To leave the environment, simply type the command deactivate and you’ll return to your original directory.
Saturday, October 28, 2017
Docker on CentOS 7
This is copy of:
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7
Great to the point article that got the job done for me. Thanks!
How To Install and Use Docker on CentOS 7
UpdatedNovember 2, 2016 163.1k views Docker CentOS
Introduction
Docker is an application that makes it simple and easy to run application processes in a container, which are like virtual machines, only more portable, more resource-friendly, and more dependent on the host operating system. For a detailed introduction to the different components of a Docker container, check out The Docker Ecosystem: An Introduction to Common Components.
There are two methods for installing Docker on CentOS 7. One method involves installing it on an existing installation of the operating system. The other involves spinning up a server with a tool called Docker Machine that auto-installs Docker on it.
In this tutorial, you'll learn how to install and use it on an existing installation of CentOS 7.
Prerequisites
Note: Docker requires a 64-bit version of CentOS 7 as well as a kernel version equal to or greater than 3.10. The default 64-bit CentOS 7 Droplet meets these requirements.
All the commands in this tutorial should be run as a non-root user. If root access is required for the command, it will be preceded by sudo. Initial Setup Guide for CentOS 7 explains how to add users and give them sudo access.
Step 1 — Installing Docker
The Docker installation package available in the official CentOS 7 repository may not be the latest version. To get the latest and greatest version, install Docker from the official Docker repository. This section shows you how to do just that.
But first, let's update the package database:
• sudo yum check-update
Now run this command. It will add the official Docker repository, download the latest version of Docker, and install it:
• curl -fsSL https://get.docker.com/ | sh
After installation has completed, start the Docker daemon:
• sudo systemctl start docker
Verify that it's running:
• sudo systemctl status docker
The output should be similar to the following, showing that the service is active and running:
Output
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago Docs: https://docs.docker.com Main PID: 749 (docker)
Lastly, make sure it starts at every server reboot:
• sudo systemctl enable docker
Installing Docker now gives you not just the Docker service (daemon) but also the docker command line utility, or the Docker client. We'll explore how to use the docker command later in this tutorial.
Step 2 — Executing Docker Command Without Sudo (Optional)
By default, running the docker command requires root privileges — that is, you have to prefix the command with sudo. It can also be run by a user in the docker group, which is automatically created during the installation of Docker. If you attempt to run the docker command without prefixing it with sudo or without being in the docker group, you'll get an output like this:
Output
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?. See 'docker run --help'.
If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group:
• sudo usermod -aG docker $(whoami)
You will need to log out of the Droplet and back in as the same user to enable this change.
If you need to add a user to the docker group that you're not logged in as, declare that username explicitly using:
• sudo usermod -aG docker username
The rest of this article assumes you are running the docker command as a user in the docker user group. If you choose not to, please prepend the commands with sudo.
Step 3 — Using the Docker Command
With Docker installed and working, now's the time to become familiar with the command line utility. Using docker consists of passing it a chain of options and subcommands followed by arguments. The syntax takes this form:
• docker [option] [command] [arguments]
To view all available subcommands, type:
• docker
As of Docker 1.11.1, the complete list of available subcommands includes:
Output
attach Attach to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container diff Inspect changes on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on a container or image kill Kill a running container load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container network Manage Docker networks pause Pause all processes within a container port List port mappings or a specific mapping for the CONTAINER ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart a container rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop a running container tag Tag an image into a repository top Display the running processes of a container unpause Unpause all processes within a container update Update configuration of one or more containers version Show the Docker version information volume Manage Docker volumes wait Block until a container stops, then print its exit code
To view the switches available to a specific command, type:
• docker docker-subcommand --help
To view system-wide information, use:
• docker info
Step 4 — Working with Docker Images
Docker containers are run from Docker images. By default, it pulls these images from Docker Hub, a Docker registry managed by Docker, the company behind the Docker project. Anybody can build and host their Docker images on Docker Hub, so most applications and Linux distributions you'll need to run Docker containers have images that are hosted on Docker Hub.
To check whether you can access and download images from Docker Hub, type:
• docker run hello-world
The output, which should include the following, should indicate that Docker in working correctly:
Output
Hello from Docker. This message shows that your installation appears to be working correctly. ...
You can search for images available on Docker Hub by using the docker command with the search subcommand. For example, to search for the CentOS image, type:
• docker search centos
The script will crawl Docker Hub and return a listing of all images whose name match the search string. In this case, the output will be similar to this:
Output
NAME DESCRIPTION STARS OFFICIAL AUTOMATED centos The official build of CentOS. 2224 [OK] jdeathe/centos-ssh CentOS-6 6.7 x86_64 / CentOS-7 7.2.1511 x8... 22 [OK] jdeathe/centos-ssh-apache-php CentOS-6 6.7 x86_64 / Apache / PHP / PHP M... 17 [OK] million12/centos-supervisor Base CentOS-7 with supervisord launcher, h... 11 [OK] nimmis/java-centos This is docker images of CentOS 7 with dif... 10 [OK] torusware/speedus-centos Always updated official CentOS docker imag... 8 [OK] nickistre/centos-lamp LAMP on centos setup 3 [OK] ...
In the OFFICIAL column, OK indicates an image built and supported by the company behind the project. Once you've identifed the image that you would like to use, you can download it to your computer using the pull subcommand, like so:
• docker pull centos
After an image has been downloaded, you may then run a container using the downloaded image with the run subcommand. If an image has not been downloaded when docker is executed with the run subcommand, the Docker client will first download the image, then run a container using it:
• docker run centos
To see the images that have been downloaded to your computer, type:
• docker images
The output should look similar to the following:
[secondary_lable Output]
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 778a53015523 5 weeks ago 196.7 MB
hello-world latest 94df4f0ce8a4 2 weeks ago 967 B
As you'll see later in this tutorial, images that you use to run containers can be modified and used to generate new images, which may then be uploaded (pushed is the technical term) to Docker Hub or other Docker registries.
Step 5 — Running a Docker Container
The hello-world container you ran in the previous step is an example of a container that runs and exits, after emitting a test message. Containers, however, can be much more useful than that, and they can be interactive. After all, they are similar to virtual machines, only more resource-friendly.
As an example, let's run a container using the latest image of CentOS. The combination of the -i and -t switches gives you interactive shell access into the container:
• docker run -it centos
Your command prompt should change to reflect the fact that you're now working inside the container and should take this form:
Output
[root@59839a1b7de2 /]#
Important: Note the container id in the command prompt. In the above example, it is 59839a1b7de2.
Now you may run any command inside the container. For example, let's install MariaDB server in the running container. No need to prefix any command with sudo, because you're operating inside the container with root privileges:
• yum install mariadb-server
Step 6 — Committing Changes in a Container to a Docker Image
When you start up a Docker image, you can create, modify, and delete files just like you can with a virtual machine. The changes that you make will only apply to that container. You can start and stop it, but once you destroy it with the docker rm command, the changes will be lost for good.
This section shows you how to save the state of a container as a new Docker image.
After installing MariaDB server inside the CentOS container, you now have a container running off an image, but the container is different from the image you used to create it.
To save the state of the container as a new image, first exit from it:
• exit
Then commit the changes to a new Docker image instance using the following command. The -m switch is for the commit message that helps you and others know what changes you made, while -a is used to specify the author. The container ID is the one you noted earlier in the tutorial when you started the interactive docker session. Unless you created additional repositories on Docker Hub, the repository is usually your Docker Hub username:
• docker commit -m "What did you do to the image" -a "Author Name" container-id repository/new_image_name
For example:
• docker commit -m "added mariadb-server" -a "Sunday Ogwu-Chinuwa" 59839a1b7de2 finid/centos-mariadb
Note: When you commit an image, the new image is saved locally, that is, on your computer. Later in this tutorial, you'll learn how to push an image to a Docker registry like Docker Hub so that it may be assessed and used by you and others.
After that operation has completed, listing the Docker images now on your computer should show the new image, as well as the old one that it was derived from:
• docker images
The output should be of this sort:
Output
REPOSITORY TAG IMAGE ID CREATED SIZE finid/centos-mariadb latest 23390430ec73 6 seconds ago 424.6 MB centos latest 778a53015523 5 weeks ago 196.7 MB hello-world latest 94df4f0ce8a4 2 weeks ago 967 B
In the above example, centos-mariadb is the new image, which was derived from the existing CentOS image from Docker Hub. The size difference reflects the changes that were made. And in this example, the change was that MariaDB server was installed. So next time you need to run a container using CentOS with MariaDB server pre-installed, you can just use the new image. Images may also be built from what's called a Dockerfile. But that's a very involved process that's well outside the scope of this article. We'll explore that in a future article.
Step 7 — Listing Docker Containers
After using Docker for a while, you'll have many active (running) and inactive containers on your computer. To view the active ones, use:
• docker ps
You will see output similar to the following:
Output
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f7c79cc556dd centos "/bin/bash" 3 hours ago Up 3 hours silly_spence
To view all containers — active and inactive, pass it the -a switch:
• docker ps -a
To view the latest container you created, pass it the -l switch:
• docker ps -l
Stopping a running or active container is as simple as typing:
• docker stop container-id
The container-id can be found in the output from the docker ps command.
Step 8 — Pushing Docker Images to a Docker Repository
The next logical step after creating a new image from an existing image is to share it with a select few of your friends, the whole world on Docker Hub, or other Docker registry that you have access to. To push an image to Docker Hub or any other Docker registry, you must have an account there.
This section shows you how to push a Docker image to Docker Hub.
To create an account on Docker Hub, register at Docker Hub. Afterwards, to push your image, first log into Docker Hub. You'll be prompted to authenticate:
• docker login -u docker-registry-username
If you specified the correct password, authentication should succeed. Then you may push your own image using:
• docker push docker-registry-username/docker-image-name
It will take sometime to complete, and when completed, the output will be of this sort:
Output
The push refers to a repository [docker.io/finid/centos-mariadb] 670194edfaf5: Pushed 5f70bf18a086: Mounted from library/centos 6a6c96337be1: Mounted from library/centos ...
After pushing an image to a registry, it should be listed on your account's dashboard, like that show in the image below.
Docker image listing on Docker Hub
If a push attempt results in an error of this sort, then you likely did not log in:
Output
The push refers to a repository [docker.io/finid/centos-mariadb] e3fbbfb44187: Preparing 5f70bf18a086: Preparing a3b5c80a4eba: Preparing 7f18b442972b: Preparing 3ce512daaf78: Preparing 7aae4540b42d: Waiting unauthorized: authentication required
Log in, then repeat the push attempt.
Conclusion
There's a whole lot more to Docker than has been given in this article, but this should be enough to getting you started working with it on CentOS 7. Like most open source projects, Docker is built from a fast-developing codebase, so make a habit of visiting the project's blog page for the latest information.
Also check out the other Docker tutorials in the DO Community.
Sunday, March 12, 2017
Bad luck with WD Red NAS 3TB drives
3/12/2017
I have had 4 of 8 drives go bad in the last year and half. Oldest drive is 2 years old. Model numbers for all the drives are WD30EFRX-68EUZN0. I am waiting on an RMA to come back, and another went bad tonight. Lucky I have extra drives and am replacing tonight with another new WD Red NAS 3TB drive i had for just this purpose.
I have decided to not get anymore of these drives, other than the RMA I am waiting on now, and the RMA I will do after I replace the current bad drive. I have ordered a single HGST Desktsar NAS 3TB drive to look at. If this will fit my needs I will replace all drives in my NAS with these.
I want to look at the heat, noise, and see if i can get head parking off on the HGST drives. I will also measure performance, but I am sure the 7200 HGST will be faster then the 5400 WD Red.
Just an FYI to everyone. Be careful with these WD Red NAS 3TB drives.
UPDATE 3/13/2017
So i got the drive out of the NAS. Home built on Centos 7.3, kernel 4.10, btrfs-progs 4.9. Took a bit to get the drive removed from the array (wait for data to be moved across the other 7 drives) and then add the replacement back in (wait for data to be balanced back across all 8 drives again).
I then took the "bad drive" and put it in my Windows workstation. I ran the WD Data Lifeguard extended test and then ran the extended test from Aomei Partition Assistant Pro. Both of these test show I have no bad sectors. The drive seems to be good as new. To make long story short I think i have a bad fan cable from my SAS/SATA controller to the drives. I have two ports on controller that controls 4 SATA drives each. I reseated HBA card and cables, and power connectors on the drives, and ran some test and scrubs. all seems good with new drive. I then put the side panels back on the case and place it back in its home. And within an hour i start getting more errors on the same device id, only with the brand new drive on that id. So i pull the server back out, remove side panels, and reboot. Over 24 hours later I don't have another error. It maybe that the side panels on the case are moving the cables enough for the bad cable to cause the errors. So i have two new fan cables coming and should have them installed tomorrow night. I still have the new HGST drive coming because I really want to check this out. If they are not to noisy and run to hot, I may just replace them all anyway. I better see some latency and IO improvements before that happens. At $150.00 per drive x8..... Well its not cheap to me.
Friday, March 3, 2017
BTRFS Drive errors from 2017-02-26
BTRFS Drive errors from 2017-02-26
Was not getting failed scrubs but seeing some errors.
This is 8x 3TB WD Red drives in raid10 on a Supermicro AOC-SAS2LP-MV8 Add-on Card, 8-Channel SAS/SATA Adapter with 600MB/s per Channel in a PCIE x16 slot running at x8 on a Supermicro ATX DDR4 LGA 1151 C7Z170-OCE-O Motherboard with 64GB DDR4 RAM (4x 16GB sticks).
FYI Everything was done online unless otherwise stated.
What file system looks like in btrfs.
[root@nas ~]# btrfs fi show
Label: 'myraid' uuid: 1ec4f641-74a8-466e-89cc-e687672aaaea
Total devices 8 FS bytes used 1.16TiB
devid 1 size 2.73TiB used 301.53GiB path /dev/sdb
devid 2 size 2.73TiB used 301.53GiB path /dev/sdc
devid 3 size 2.73TiB used 301.53GiB path /dev/sdd
devid 4 size 2.73TiB used 301.53GiB path /dev/sde
devid 6 size 2.73TiB used 301.53GiB path /dev/sdg
devid 7 size 2.73TiB used 301.53GiB path /dev/sdh
devid 8 size 2.73TiB used 301.53GiB path /dev/sdi
devid 9 size 2.73TiB used 301.53GiB path /dev/sdf
Take a look at device stats.
[root@nas ~]# /usr/local/bin/btrfs device stats /myraid/
[/dev/sdb].write_io_errs 0
[/dev/sdb].read_io_errs 0
[/dev/sdb].flush_io_errs 0
[/dev/sdb].corruption_errs 0
[/dev/sdb].generation_errs 0
[/dev/sdc].write_io_errs 0
[/dev/sdc].read_io_errs 0
[/dev/sdc].flush_io_errs 0
[/dev/sdc].corruption_errs 0
[/dev/sdc].generation_errs 0
[/dev/sdd].write_io_errs 0
[/dev/sdd].read_io_errs 0
[/dev/sdd].flush_io_errs 0
[/dev/sdd].corruption_errs 0
[/dev/sdd].generation_errs 0
[/dev/sde].write_io_errs 0
[/dev/sde].read_io_errs 44
[/dev/sde].flush_io_errs 0
[/dev/sde].corruption_errs 0
[/dev/sde].generation_errs 0
[/dev/sdg].write_io_errs 0
[/dev/sdg].read_io_errs 0
[/dev/sdg].flush_io_errs 0
[/dev/sdg].corruption_errs 0
[/dev/sdg].generation_errs 0
[/dev/sdh].write_io_errs 0
[/dev/sdh].read_io_errs 0
[/dev/sdh].flush_io_errs 0
[/dev/sdh].corruption_errs 0
[/dev/sdh].generation_errs 0
[/dev/sdi].write_io_errs 0
[/dev/sdi].read_io_errs 0
[/dev/sdi].flush_io_errs 0
[/dev/sdi].corruption_errs 0
[/dev/sdi].generation_errs 0
[/dev/sdf].write_io_errs 0
[/dev/sdf].read_io_errs 0
[/dev/sdf].flush_io_errs 0
[/dev/sdf].corruption_errs 0
[/dev/sdf].generation_errs 0
Run extended smartcl test.
[root@nas ~]# smartctl -t long /dev/sdb
[root@nas ~]# smartctl -t long /dev/sdc
[root@nas ~]# smartctl -t long /dev/sdd
[root@nas ~]# smartctl -t long /dev/sde
[root@nas ~]# smartctl -t long /dev/sdf
[root@nas ~]# smartctl -t long /dev/sdg
[root@nas ~]# smartctl -t long /dev/sdh
[root@nas ~]# smartctl -t long /dev/sdi
I waited an hour then reviewed the results.
[root@nas ~]# smartctl -l selftest /dev/sdb
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 12660 -
# 2 Extended offline Completed without error 00% 8916 -
# 3 Short offline Completed without error 00% 6097 -
# 4 Extended offline Completed without error 00% 4288 -
# 5 Short offline Completed without error 00% 4245 -
# 6 Short offline Completed without error 00% 4242 -
# 7 Short offline Interrupted (host reset) 50% 4241 -
# 8 Short offline Completed without error 00% 4172 -
# 9 Short offline Completed without error 00% 4109 -
[root@nas ~]# smartctl -l selftest /dev/sdc
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 12660 -
# 2 Extended offline Completed without error 00% 8916 -
# 3 Short offline Completed without error 00% 6096 -
# 4 Extended offline Completed without error 00% 4288 -
# 5 Short offline Completed without error 00% 4109 -
[root@nas ~]# smartctl -l selftest /dev/sdd
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 13003 -
# 2 Extended offline Completed without error 00% 9260 -
# 3 Short offline Completed without error 00% 6440 -
# 4 Extended offline Completed without error 00% 4632 -
# 5 Short offline Completed without error 00% 4452 -
# 6 Short offline Completed without error 00% 0 -
[root@nas ~]# smartctl -l selftest /dev/sde
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 90% 8452 339784376
# 2 Extended offline Completed without error 00% 4716 -
# 3 Short offline Completed without error 00% 1896 -
# 4 Extended offline Completed without error 00% 88 -
# 5 Short offline Completed without error 00% 15 -
# 6 Short offline Aborted by host 90% 12 -
# 7 Short offline Aborted by host 90% 12 -
# 8 Short offline Aborted by host 90% 12 -
# 9 Short offline Aborted by host 90% 5 -
#10 Short offline Aborted by host 90% 5 -
#11 Short offline Aborted by host 90% 5 -
#12 Short offline Aborted by host 90% 4 -
#13 Short offline Aborted by host 90% 4 -
#14 Short offline Aborted by host 90% 4 -
#15 Short offline Aborted by host 90% 0 -
#16 Short offline Aborted by host 90% 0 -
[root@nas ~]# smartctl -l selftest /dev/sdf
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 3118 -
# 2 Short offline Completed without error 00% 12 -
[root@nas ~]# smartctl -l selftest /dev/sdg
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 6298 -
# 2 Extended offline Completed without error 00% 2555 -
[root@nas ~]# smartctl -l selftest /dev/sdh
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 6147 -
# 2 Extended offline Completed without error 00% 2404 -
# 3 Short offline Completed without error 00% 0 -
[root@nas ~]# smartctl -l selftest /dev/sdi
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.7.0-1.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 6147 -
# 2 Extended offline Completed without error 00% 2404 -
# 3 Short offline Completed without error 00% 0 -
[root@nas ~]# smartctl -a /dev/sdb | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sdc | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sdd | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sde | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 1258
[root@nas ~]# smartctl -a /dev/sdf | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sdg | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sdh | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
[root@nas ~]# smartctl -a /dev/sdi | grep "Raw_Read_Error_Rate"
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
Yup. /dev/sde seems to have an issue.
Get serial number of all drives for a possible RMA on /dev/sde.
[root@nas ~]# smartctl -a /dev/sdb | grep "Serial Number:"
Serial Number: WD-WMC4N0J0YT1V
[root@nas ~]# smartctl -a /dev/sdc | grep "Serial Number:"
Serial Number: WD-WMC4N0J2L138
[root@nas ~]# smartctl -a /dev/sdd | grep "Serial Number:"
Serial Number: WD-WCC4N2FJRTU9
[root@nas ~]# smartctl -a /dev/sde | grep "Serial Number:"
Serial Number: WD-WCC4N4SSDRFN
[root@nas ~]# smartctl -a /dev/sdf | grep "Serial Number:"
Serial Number: WD-WCC4N1VYZH52
[root@nas ~]# smartctl -a /dev/sdg | grep "Serial Number:"
Serial Number: WD-WMC4N0M57KEY
[root@nas ~]# smartctl -a /dev/sdh | grep "Serial Number:"
Serial Number: WD-WCC4N5YF2Z2Y
[root@nas ~]# smartctl -a /dev/sdi | grep "Serial Number:"
Serial Number: WD-WCC4N5CJ6H8U
Get List of BadBlocks on all drives. Run in background and save to file.
badblocks -v /dev/sdb > /tmp/bad-blocks-b.txt &
badblocks -v /dev/sdc > /tmp/bad-blocks-c.txt &
badblocks -v /dev/sdd > /tmp/bad-blocks-d.txt &
badblocks -v /dev/sde > /tmp/bad-blocks-e.txt &
badblocks -v /dev/sdf > /tmp/bad-blocks-f.txt &
badblocks -v /dev/sdg > /tmp/bad-blocks-g.txt &
badblocks -v /dev/sdh > /tmp/bad-blocks-h.txt &
badblocks -v /dev/sdi > /tmp/bad-blocks-i.txt &
Monitor file size with:
[root@nas ~]# watch ls -lsa /tmp/bad-blocks-*.txt
If you have a really bad drive it could create a file the size of the drive itself so be sure to monitor and make sure you do not fill up your /tmp directory.
If you need to kill it then ket the pid with:
[root@nas tmp]# ps -ef | grep "badblocks"
UID PID PPID C STIME TTY TIME CMD
root 27013 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdb
root 27014 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdc
root 27015 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdd
root 27016 25404 2 10:43 pts/0 00:01:11 badblocks -v /dev/sde
root 27017 25404 3 10:43 pts/0 00:01:13 badblocks -v /dev/sdf
root 27018 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdg
root 27019 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdh
root 27020 25404 3 10:43 pts/0 00:01:12 badblocks -v /dev/sdi
root 31044 26976 0 11:22 pts/1 00:00:00 grep --color=auto badblocks
While badblock test is running I have already got a RMA number from WD and a shipping label on my printer. I ordered a new drive from Amazon that will be here on the 28th. I will swap out then and ship bad drive back on the 29th.
Running smartctl test long on all drives
smartctl -t long /dev/sdb
smartctl -t long /dev/sdc
smartctl -t long /dev/sdd
smartctl -t long /dev/sde
smartctl -t long /dev/sdf
smartctl -t long /dev/sdg
smartctl -t long /dev/sdh
smartctl -t long /dev/sdi
Check progress of test
smartctl -a /dev/sdb | grep "Self-test execution status"
smartctl -a /dev/sdb | grep "of test remaining."
smartctl -a /dev/sdc | grep "Self-test execution status"
smartctl -a /dev/sdc | grep "of test remaining."
smartctl -a /dev/sdd | grep "Self-test execution status"
smartctl -a /dev/sdd | grep "of test remaining."
smartctl -a /dev/sde | grep "Self-test execution status"
smartctl -a /dev/sde | grep "of test remaining."
smartctl -a /dev/sdf | grep "Self-test execution status"
smartctl -a /dev/sdf | grep "of test remaining."
smartctl -a /dev/sdg | grep "Self-test execution status"
smartctl -a /dev/sdg | grep "of test remaining."
smartctl -a /dev/sdh | grep "Self-test execution status"
smartctl -a /dev/sdh | grep "of test remaining."
smartct
l -a /dev/sdi | grep "Self-test execution status"
smartctl -a /dev/sdi | grep "of test remaining."
New drive is in and I am backing up NAS. My btrfs pool of /myraid is gettin backuped up to a PC with raid1.
I am also duplicating the more inportant files to a SSD. Better safe than sorry.
New drive has had a full surface test (9 hours) and passed with flying colors.
I am not turning this into a drive remove/replace since i want to change the partions of my boot SSD so I am just
goging to nuke the entire system and rebuild from scratch.
my /(root) partion is getting a backup vi tar so i can have access to my old crontab files and maintemce scripts.
I can just yse the old samba.conf as well, etc....
tar -zcvpf /myraid/nas.backup.tar.gz --exclude=/myraid --exclude=/usr --exclude=/proc --exclude=/lib --exclude=/lib64 --exclude=/dev /
Now copy the tar.gz file to a few drives off the server as well.
Make USB install Centos 7.3 min and do the install :)
Install done. I see all 9 drives and 4 network connections. I setup all the NICs during the install and they all seem to be ok
Possibily some tweeking on these later.
I installed the OS on my SSD with 1GB /boot and /boot/efi (I am using EFI). The rest to /
My other 8 drives are on my Supermicro AOC-SAS2LP-MV8 JBOD HBA. I will not touch those untill I get ready to setup btrfs on them.
So now some base stuff
cp /etc/sysconfig/selinux /etc/sysconfig/selinux.bak
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux
cp /etc/selinux/config /etc/selinux/config.bak
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
systemctl stop firewalld
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
yum -y install bind-utils traceroute net-tools ntp* gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel xinetd unzip libtool* make patch perl bison flex-devel gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf libxml2-devel cmake sqlite* wget ntp* lm_sensors ncurses-devel qt-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel wget bc gzip uuid* libuuid-devel jansson* libxml2* sqlite* openssl* lsof NetworkManager-tui mlocate yum-utils kernel-devel nfs-utils tcpdump git vim gdisk parted
yum -y groupinstall "Development Tools"
yum -y update
yum -y upgrade
cd /root
echo ':color desert' > .vimrc
systemctl disable kdump.service
reboot
# cat /etc/default/grub
GRUB_TIMEOUT=60
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl_bcache/root ipv6.disable=1 zswap.enable=1 consoleblank=0"
GRUB_DISABLE_RECOVERY="true"
Make changes as refelected about to
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl_bcache/root ipv6.disable=1 zswap.enable=1 consoleblank=0"
# grub2-mkconfig -o /boot/grub2/grub.cfg
or if using UEFI
# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
reboot
Now update kerenel
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum install yum-plugin-fastestmirror
yum --enablerepo=elrepo-kernel install kernel-ml
reboot
Manualy select new kernel from grub boot screen.
uname -r
4.10.1-1.el7.elrepo.x86_64
Do any testing you need and when happy set this to default entry when happy.
grub2-set-default 0
reboot
uname -r
4.10.1-1.el7.elrepo.x86_64
Now time to physicaly replace drive then setup btrfs.
poweroff
New drive in and server rebooted
parted -l
shows all drives. 7x WD RED NAS drives show still brtfs partitions. New drive has nothing.
idle3ctl show new drive has head parking on. lets turn that off.
# ./idle3ctl /dev/sde
Idle3 timer set to 138 (0x8a)
# ./idle3ctl -d /dev/sde
Idle3 timer disabled
Please power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!
So lets powerr off, let set for a min, and power back on and rechedck.
poweroff
looks good on all drives 8 WD RED drives
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdb
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdc
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdd
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sde
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdf
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdg
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdh
Idle3 timer is disabled
[root@nas idle3-tools-0.9.1]# ./idle3ctl /dev/sdi
Idle3 timer is disabled
No lets clean the disk for a new array
I used parted to rm the partiions then a w and q.
Then
wipefs -a /dev/sdb
wipefs -a /dev/sdc
wipefs -a /dev/sdd
wipefs -a /dev/sde
wipefs -a /dev/sdf
wipefs -a /dev/sdg
wipefs -a /dev/sdh
wipefs -a /dev/sdi
Then
dd if=/dev/zero of=/dev/sdb bs=1024 count=1024
dd if=/dev/zero of=/dev/sdc bs=1024 count=1024
dd if=/dev/zero of=/dev/sdd bs=1024 count=1024
dd if=/dev/zero of=/dev/sde bs=1024 count=1024
dd if=/dev/zero of=/dev/sdf bs=1024 count=1024
dd if=/dev/zero of=/dev/sdg bs=1024 count=1024
dd if=/dev/zero of=/dev/sdh bs=1024 count=1024
dd if=/dev/zero of=/dev/sdi bs=1024 count=1024
Then to just look at the devs
ls -lsa /dev/sd*
0 brw-rw---- 1 root disk 8, 0 Mar 1 15:02 /dev/sda
0 brw-rw---- 1 root disk 8, 1 Mar 1 15:02 /dev/sda1
0 brw-rw---- 1 root disk 8, 2 Mar 1 15:02 /dev/sda2
0 brw-rw---- 1 root disk 8, 3 Mar 1 15:02 /dev/sda3
0 brw-rw---- 1 root disk 8, 16 Mar 1 15:11 /dev/sdb
0 brw-rw---- 1 root disk 8, 32 Mar 1 15:11 /dev/sdc
0 brw-rw---- 1 root disk 8, 48 Mar 1 15:11 /dev/sdd
0 brw-rw---- 1 root disk 8, 64 Mar 1 15:11 /dev/sde
0 brw-rw---- 1 root disk 8, 80 Mar 1 15:11 /dev/sdf
0 brw-rw---- 1 root disk 8, 96 Mar 1 15:11 /dev/sdg
0 brw-rw---- 1 root disk 8, 112 Mar 1 15:11 /dev/sdh
0 brw-rw---- 1 root disk 8, 128 Mar 1 15:11 /dev/sdi
fdisk -l also shows they look ready
[root@nas idle3-tools-0.9.1]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
# Start End Size Type Name
1 2048 2099199 1G EFI System EFI System Partition
2 2099200 4196351 1G Microsoft basic
3 4196352 250068991 117.2G Linux LVM
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sde: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdf: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdg: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdh: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdi: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/cl_nas-root: 125.9 GB, 125883645952 bytes, 245866496 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Check out btrfs version first
# btrfs --version
btrfs-progs v4.4.1
I think there is a newer on out. Lets go see.
git clone git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
cd btrfs-progs
yum -y install libuuid-devel libattr-devel zlib-devel libacl-devel e2fsprogs-devel libblkid-devel lzo* asciidoc xmlto
./autogen.sh
./configure
make
Lets check version from within the folder
[root@nas btrfs-progs]# ./btrfs --version
btrfs-progs v4.9.1
Yup its newer
Now check from /
[root@nas btrfs-progs]# cd /
[root@nas /]# btrfs --version
btrfs-progs v4.4.1
[root@nas /]#
So we got two versions
I copied all +x files from /root/btrfs-progs to /usr/sbin overright files if they exist.
Now from / of drive I get
[root@nas /]# btrfs --version
btrfs-progs v4.9.1
I hope thats good :)
So lets build an array!!!
First I will use raid0 for some quick testing.
mkfs.btrfs -f -m raid0 -d raid0 -L myraid /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi
also here is for raid10
mkfs.btrfs -f -m raid10 -d raid10 -L myraid /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi
[root@nas ~]# mkfs.btrfs -f -m raid0 -d raid0 -L myraid /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi
btrfs-progs v4.9.1
See http://btrfs.wiki.kernel.org for more information.
Label: myraid
UUID: 5a5610aa-2615-4ee2-bd4a-076ab2931b70
Node size: 16384
Sector size: 4096
Filesystem size: 21.83TiB
Block group profiles:
Data: RAID0 8.00GiB
Metadata: RAID0 4.00GiB
System: RAID0 16.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 8
Devices:
ID SIZE PATH
1 2.73TiB /dev/sdb
2 2.73TiB /dev/sdc
3 2.73TiB /dev/sdd
4 2.73TiB /dev/sde
5 2.73TiB /dev/sdf
6 2.73TiB /dev/sdg
7 2.73TiB /dev/sdh
8 2.73TiB /dev/sdi
[root@nas ~]# btrfs fi show
Label: 'myraid' uuid: 5a5610aa-2615-4ee2-bd4a-076ab2931b70
Total devices 8 FS bytes used 112.00KiB
devid 1 size 2.73TiB used 1.50GiB path /dev/sdb
devid 2 size 2.73TiB used 1.50GiB path /dev/sdc
devid 3 size 2.73TiB used 1.50GiB path /dev/sdd
devid 4 size 2.73TiB used 1.50GiB path /dev/sde
devid 5 size 2.73TiB used 1.50GiB path /dev/sdf
devid 6 size 2.73TiB used 1.50GiB path /dev/sdg
devid 7 size 2.73TiB used 1.50GiB path /dev/sdh
devid 8 size 2.73TiB used 1.50GiB path /dev/sdi
Lets mount this thing
mkdir /myraid
mount with UUID from above. uuid: 5a5610aa-2615-4ee2-bd4a-076ab2931b70
mount -t btrfs -o defaults,nodatacow,noatime,x-systemd.device-timeout=30 -U 5a5610aa-2615-4ee2-bd4a-076ab2931b70 /myraid
[root@nas ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 32G 8.9M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/mapper/cl_nas-root 118G 2.2G 116G 2% /
/dev/sda2 1014M 191M 824M 19% /boot
/dev/sda1 1022M 9.5M 1013M 1% /boot/efi
tmpfs 6.3G 0 6.3G 0% /run/user/0
/dev/sdb 22T 20M 22T 1% /myraid
Oh ya!!! 22TB of btrfs array
My line for fstab i will put in later is:
UUID=5a5610aa-2615-4ee2-bd4a-076ab2931b70 /myraid btrfs defaults,nodatacow,noatime,x-systemd.device-timeout=30 0 0
this is how to clear cache when testing transfer speeds to make sure you are not using cache.
Do this between each transfer
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches
---tune 10Gb CNA if needed
service irqbalance stop
service cpuspeed stop
chkconfig irqbalance off
chkconfig cpuspeed off
systemctl disable irqbalance
systemctl disable cpuspeed
systemctl stop irqbalance
systemctl stop cpuspeed
vi /etc/sysconfig/network-scripts/ifcfg-eth???
MTU="9000"
vi /etc/sysctl.conf
# -- tuning -- #
# Increase system file descriptor limit
fs.file-max = 65535
# Increase system IP port range to allow for more concurrent connections
net.ipv4.ip_local_port_range = 1024 65000
# -- 10gbe tuning from Intel ixgb driver README -- #
# turn off selective ACK and timestamps
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
# memory allocation min/pressure/max.
# read buffer, write buffer, and buffer space
net.ipv4.tcp_rmem = 10000000 10000000 10000000
net.ipv4.tcp_wmem = 10000000 10000000 10000000
net.ipv4.tcp_mem = 10000000 10000000 10000000
net.core.rmem_max = 524287
net.core.wmem_max = 524287
net.core.rmem_default = 524287
net.core.wmem_default = 524287
net.core.optmem_max = 524287
net.core.netdev_max_backlog = 300000
reboot and test speed.
on linux client pointing to server with ip 192.168.90.100
# iperf3 -c 192.168.90.100 -p 5201
on linux server with IP 192.168.90.100
iperf3 -s -p 5201 -B 192.168.90.100
---end tune 10Gb CNA if needed
---setup NFS for ESXi server
vi /etc/exports
/myraid/ 192.168.10.0/24(rw,async,no_root_squash,no_subtree_check)
/myraid/ 192.168.90.0/24(rw,async,no_root_squash,no_subtree_check)
systemctl start rpcbind nfs-server
systemctl enable rpcbind nfs-server
---end setup NFS for ESXi server
--install samaba if needed
yum -y install samba
useradd samba -s /sbin/nologin
smbpasswd -a samba
Supply a password
Retype the password
mkdir /myraid
chown -R samba:root /myraid/
vi /etc/samba/smb.conf
[global]
workgroup = WORKGROUP ;use name of your workgroup here
server string = Samba Server Version %v
netbios name = NAS
Add this to botton of /etc/samba/smb.conf file
[NAS]
comment = NAS
path = /myraid
writable = yes
valid users = samba
systemctl start smb
systemctl enable smb
systemctl start nmb
systemctl enable nmb
testparm
--end install samaba if needed
---install plex if needed
visit plex site and get rpm for your version of OS
copy this to /root
yum -y localinstall name.rpm
systemctl enable plexmediaserver
systemctl start plexmediaserver
---end install plex if needed
---install LAMP
yum -y install httpd mariadb-server mariadb php php-mysql
systemctl enable httpd.service
systemctl start httpd.service
systemctl status httpd.service
Make sure it works with:
http://your_server_IP_address/
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
mysql_secure_installation
vi /var/www/html/info.php
<?php phpinfo(); ?>
http://your_server_IP_address/info.php
---End install LAMP
---Extra goodies
yum -y install epel-release
yum -y install stress htop iftop iotop hddtemp smartmontools iperf3 sysstat mlocate
yum -y update
updatedb **this is to update mlocate db
---End Extra goodies
---Use gmail as relay for sending mail
Replace [email protected] with a real email address in items below
Replace mycentserver.mydomain.domain with real hostname in items below
Replace gmail_password with real password in items below
# yum remove postfix
Now install ssmtp.
# yum -y install ssmtp mailx
Now edit your /etc/ssmtp/ssmtp.conf. I removed everything and just added the below in the file.
# vi /etc/ssmtp/ssmtp.conf
[email protected]
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
hostname=mycentserver.mydomain.domain
UseTLS=Yes
UseSTARTTLS=Yes
[email protected]
AuthPass=gmail_password
FromLineOverride=YES
# This solved if you get a ssmtp: Cannot open smtp.gmail.com:587 when try to send an email
# if you enabled uncommenting DEBUG=Yes line and your /var/log/maillog show
# SSL not working: certificate verify failed (20) Uncomment the following line but first
# VERIFY FILE EXISTS
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
# DEBUG=Yes
Now edit your /etc/ssmtp/revaliases file and add the following.
# vi /etc/ssmtp/revaliases
root:[email protected]:smtp.gmail.com:587
Now run
# alternatives --config mta
And choose the number for sendmail.ssmtp, like below
There is 1 program that provides 'mta'.
Selection Command
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.ssmtp
Enter to keep the current selection[+], or type selection number: 1
#
Now send email to your gmail account from Centos cli
# mail -s "Test Subject" [email protected]
Type your message text and on new line press ctrl d to send
---End Use gmail as relay for sending mail
|
{
"url": "https://glenewhittenberg.blogspot.com/",
"source_domain": "glenewhittenberg.blogspot.com",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "203209",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:A6WMTZADH5NT7YCPU3KSO4IOZKCKE4V2",
"WARC-Concurrent-To": "<urn:uuid:dbafc912-1d01-47da-9611-bcad4080b1f2>",
"WARC-Date": "2022-07-03T14:59:57Z",
"WARC-IP-Address": "172.253.115.132",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:XQN55AQQ56I5B3JRWEAQM6YUEQPFGLZ6",
"WARC-Record-ID": "<urn:uuid:eba2f81d-aacc-4c04-9484-41677e4d0f4a>",
"WARC-Target-URI": "https://glenewhittenberg.blogspot.com/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4135e1ac-94a0-4854-b924-d6b76a2dcc8e>"
},
"warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-140\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
5,
6,
7,
24,
25,
47,
48,
128,
129,
324,
325,
407,
408,
482,
483,
529,
530,
610,
611,
863,
864,
980,
981,
997,
998,
1022,
1023,
1050,
1051,
1078,
1079,
1094,
1095,
1157,
1236,
1303,
1304,
1334,
1335,
1359,
1383,
1407,
1408,
1443,
1444,
1445,
1464,
1465,
1481,
1482,
1489,
1490,
1548,
1549,
1582,
1583,
1645,
1646,
1656,
1671,
1723,
1774,
1785,
1786,
1888,
1889,
1949,
1950,
2043,
2044,
2070,
2071,
2128,
2129,
2154,
2155,
2188,
2189,
2258,
2259,
2287,
2288,
2325,
2326,
2344,
2374,
2401,
2422,
2434,
2484,
2561,
2563,
2595,
2625,
2665,
2688,
2717,
2737,
2773,
2793,
2818,
2819,
2969,
3164,
3249,
3320,
3461,
3462,
3463,
3556,
3557,
3588,
3589,
3676,
3677,
3704,
3705,
3753,
3754,
3793,
3794,
3856,
3857,
3876,
3877,
3959,
3960,
3998,
3999,
4014,
4066,
4124,
4167,
4168,
4183,
4235,
4294,
4295,
4301,
4302,
4330,
4331,
4388,
4420,
4452,
4484,
4516,
4548,
4622,
4623,
4657,
4658,
4958,
4959,
4995,
5020,
5021,
5154,
5155,
5248,
5249,
5273,
5274,
5359,
5360,
5417,
5449,
5481,
5513,
5545,
5577,
5578,
5619,
5620,
5671,
5730,
5731,
5785,
5863,
5864,
5935,
5936,
5981,
5982,
6058,
6059,
6102,
6103,
6174,
6175,
6197,
6198,
6224,
6225,
6251,
6252,
6357,
6358,
6359,
6430,
6431,
6449,
6455,
6456,
6503,
6504,
6551,
6552,
6566,
6567,
6611,
6612,
6634,
6635,
6661,
6662,
6681,
6682,
6727,
6728,
6737,
6738,
6772,
6773,
6805,
6806,
6834,
6835,
6864,
6865,
6890,
6891,
6918,
6919,
6936,
6937,
6958,
6959,
6974,
6975,
7002,
7067,
7068,
7116,
7137,
7138,
7182,
7217,
7218,
7264,
7289,
7329,
7330,
7355,
7366,
7367,
7400,
7401,
7422,
7432,
7443,
7458,
7459,
7498,
7534,
7535,
7562,
7636,
7637,
7685,
7706,
7707,
7751,
7786,
7787,
7833,
7858,
7898,
7899,
7924,
7935,
7936,
7957,
7958,
7990,
7991,
8023,
8024,
8066,
8076,
8109,
8120,
8121,
8139,
8180,
8181,
8182,
8221,
8257,
8258,
8289,
8306,
8323,
8324,
8353,
8371,
8390,
8391,
8392,
8417,
8465,
8491,
8536,
8563,
8616,
8627,
8666,
8705,
8740,
8741,
8794,
8828,
8864,
8900,
8930,
8949,
8964,
8982,
8997,
9012,
9027,
9028,
9080,
9125,
9140,
9184,
9199,
9235,
9250,
9251,
9283,
9301,
9332,
9343,
9358,
9393,
9404,
9419,
9420,
9421,
9471,
9507,
9524,
9541,
9628,
9678,
9693,
9748,
9766,
9785,
9786,
9787,
9818,
9894,
9895,
9952,
9953,
9993,
10032,
10033,
10055,
10083,
10125,
10167,
10204,
10217,
10218,
10268,
10290,
10310,
10323,
10324,
10371,
10393,
10415,
10428,
10429,
10469,
10491,
10515,
10528,
10529,
10571,
10593,
10618,
10631,
10632,
10689,
10711,
10729,
10746,
10750,
10763,
10764,
10765,
10766,
10789,
10790,
10822,
10823,
10912,
10913,
10935,
10936,
10937,
10979,
10980,
10987,
10996,
11049,
11103,
11177,
11209,
11223,
11233,
11242,
11244,
11296,
11430,
11506,
11653,
11654,
11676,
11686,
11687,
11721,
11722,
11754,
11776,
11804,
11810,
11840,
11841,
11856,
11871,
11904,
11919,
11935,
11952,
11954,
12168,
12169,
12616,
12617,
12711,
12741,
12742,
12766,
12767,
12846,
12916,
13052,
13136,
13137,
13159,
13169,
13170,
13208,
13240,
13241,
13260,
13282,
13298,
13313,
13314,
13330,
13344,
13355,
13368,
13430,
13488,
13566,
13602,
13620,
13634,
13646,
13654,
13655,
13675,
13689,
13700,
13713,
13740,
13754,
13766,
13787,
13788,
13799,
13817,
13832,
13838,
13864,
13896,
13906,
13940,
13958,
13978,
13980,
14365,
14366,
14527,
14550,
14551,
14552,
14553,
14554,
14556,
14557,
14558,
14559,
14560,
14616,
14617,
14673,
14674,
14705,
14706,
14730,
14731,
14775,
14776,
14829,
14830,
14853,
14854,
14875,
14876,
14905,
14906,
14931,
14932,
14970,
14971,
14983,
14984,
14989,
14990,
15003,
15004,
15145,
15146,
15189,
15190,
15209,
15210,
15234,
15235,
15272,
15273,
15286,
15287,
15288,
15342,
15343,
15430,
15431,
15472,
15473,
15527,
15561,
15578,
15593,
15606,
15607,
15608,
15637,
15638,
15674,
15675,
15717,
15739,
15768,
15824,
15886,
15931,
15951,
15952,
15978,
15979,
16022,
16023,
16042,
16043,
16067,
16068,
16107,
16108,
16152,
16153,
16208,
16209,
16264,
16265,
16324,
16325,
16416,
16417,
16435,
16436,
16503,
16504,
16570,
16616,
16620,
16668,
16669,
16714,
16715,
16736,
16774,
16799,
16894,
16928,
16963,
17019,
17020,
17072,
17073,
17096,
17097,
17133,
17134,
17155,
17156,
17197,
17198,
17239,
17240,
17293,
17358,
17359,
17406,
17468,
17469,
17497,
17522,
17523,
17545,
17568,
17591,
17615,
17616,
18150,
18151,
18191,
18205,
18220,
18221,
18230,
18260,
18261,
18293,
18294,
18301,
18302,
18303,
18331,
18415,
18424,
18425,
18441,
18442,
18500,
18531,
18561,
18592,
18593,
18618,
18649,
18650,
18675,
18699,
18724,
18750,
18751,
18777,
18797,
18798,
18837,
18838,
18839,
18859,
18860,
18861,
18862,
19012,
19013,
19083,
19084,
19107,
19108,
19248,
19249,
19352,
19353,
19387,
19388,
19517,
19518,
19559,
19560,
19650,
19694,
19695,
19971,
19972,
20257,
20258,
20304,
20305,
20378,
20379,
20462,
20463,
20497,
20498,
20677,
20678,
20695,
20696,
20787,
20788,
20795,
20808,
20809,
20883,
20884,
20922,
20923,
21101,
21102,
21139,
21140,
21365,
21366,
21521,
21522,
21562,
21563,
21671,
21713,
21714,
21833,
21834,
22050,
22051,
22272,
22273,
22473,
22474,
22605,
22606,
22629,
22649,
22650,
22791,
22792,
22821,
22822,
22964,
22965,
22998,
22999,
23305,
23306,
23458,
23459,
23490,
23491,
23593,
23594,
23595,
23783,
23784,
24053,
24054,
24125,
24160,
24161,
24396,
24397,
24485,
24486,
24502,
24503,
24641,
24642,
24665,
24666,
24754,
24755,
24792,
24793,
24813,
24814,
24916,
24917,
24924,
24938,
24939,
25046,
25047,
25074,
25075,
25094,
25095,
25112,
25203,
25204,
25269,
25270,
25312,
25313,
25364,
25365,
25378,
25379,
25754,
26005,
26103,
26104,
26118,
26119,
26291,
26518,
26519,
26546,
26547,
26792,
26838,
26864,
26985,
27029,
27088,
27120,
27146,
27179,
27274,
27281,
27553,
27605,
27638,
27839,
27840,
27898,
27899,
28274,
28281,
28395,
28504,
28542,
28634,
28750,
28787,
28952,
28953,
28987,
28988,
29210,
29252,
29293,
29304,
29378,
29385,
31174,
31234,
31270,
31308,
31324,
31325,
31361,
31362,
31722,
31797,
31824,
31922,
31929,
32027,
32184,
32209,
32363,
32370,
32903,
33137,
33160,
33442,
33464,
33532,
33550,
33599,
33624,
33709,
33798,
33884,
34109,
34110,
34146,
34147,
34446,
34614,
34640,
34766,
34773,
34796,
34894,
35121,
35152,
35153,
35214,
35215,
35507,
35590,
35767,
35838,
35847,
36286,
36394,
36407,
36510,
36751,
36910,
36928,
36963,
36970,
37169,
37719,
37720,
37755,
37756,
37894,
37908,
37954,
37961,
38083,
38152,
38169,
38234,
38251,
38314,
38343,
38415,
38416,
38470,
38471,
38767,
38832,
38987,
39032,
39142,
39201,
39289,
39296,
39470,
39592,
39627,
39711,
39718,
39963,
40001,
40002,
40013,
40014,
40325,
40388,
40389,
40412,
40413,
40449,
40450,
40460,
40461,
40789,
40790,
41080,
41081,
41272,
41273,
41343,
41344,
41361,
41362,
41659,
41660,
42980,
42981,
43003,
43004,
43039,
43040,
43075,
43076,
43130,
43131,
43395,
43396,
43452,
43453,
43491,
43492,
43520,
43580,
43626,
43687,
43748,
43809,
43870,
43931,
43992,
44053,
44114,
44115,
44116,
44145,
44146,
44203,
44232,
44261,
44290,
44319,
44348,
44377,
44406,
44435,
44464,
44493,
44522,
44551,
44580,
44609,
44638,
44667,
44697,
44726,
44755,
44784,
44813,
44842,
44871,
44900,
44929,
44958,
44987,
45016,
45045,
45074,
45103,
45132,
45161,
45190,
45219,
45248,
45277,
45306,
45335,
45364,
45365,
45366,
45393,
45394,
45434,
45474,
45514,
45554,
45594,
45634,
45674,
45714,
45715,
45716,
45760,
45761,
45805,
45890,
45966,
45967,
46008,
46056,
46152,
46231,
46310,
46389,
46468,
46547,
46626,
46705,
46784,
46863,
46864,
46908,
46993,
47069,
47070,
47111,
47159,
47255,
47334,
47413,
47492,
47571,
47650,
47651,
47695,
47780,
47856,
47857,
47898,
47946,
48042,
48121,
48200,
48279,
48358,
48437,
48516,
48517,
48561,
48646,
48722,
48723,
48764,
48812,
48908,
48995,
49074,
49153,
49232,
49311,
49390,
49469,
49548,
49627,
49706,
49785,
49864,
49943,
50022,
50101,
50180,
50181,
50225,
50310,
50386,
50387,
50428,
50476,
50572,
50651,
50730,
50731,
50775,
50860,
50936,
50937,
50978,
51026,
51122,
51201,
51280,
51281,
51325,
51410,
51486,
51487,
51528,
51576,
51672,
51751,
51830,
51909,
51910,
51954,
52039,
52115,
52116,
52157,
52205,
52301,
52380,
52459,
52538,
52539,
52540,
52541,
52605,
52694,
52758,
52847,
52911,
53000,
53064,
53156,
53220,
53309,
53373,
53462,
53526,
53615,
53679,
53768,
53769,
53771,
53772,
53810,
53811,
53812,
53813,
53877,
53878,
53937,
53971,
54030,
54064,
54123,
54157,
54216,
54250,
54309,
54343,
54402,
54436,
54495,
54529,
54588,
54622,
54623,
54624,
54625,
54626,
54699,
54700,
54748,
54796,
54844,
54892,
54940,
54988,
55036,
55084,
55085,
55109,
55110,
55160,
55161,
55320,
55321,
55367,
55368,
55410,
55462,
55532,
55602,
55672,
55742,
55812,
55882,
55952,
56022,
56098,
56099,
56100,
56101,
56331,
56332,
56373,
56374,
56400,
56426,
56452,
56478,
56504,
56530,
56556,
56582,
56583,
56606,
56607,
56664,
56713,
56714,
56771,
56820,
56821,
56878,
56927,
56928,
56985,
57034,
57035,
57092,
57141,
57142,
57199,
57248,
57249,
57306,
57355,
57356,
57364,
57414,
57463,
57464,
57465,
57466,
57574,
57655,
57656,
57735,
57736,
57850,
57909,
57910,
58024,
58075,
58076,
58077,
58078,
58213,
58214,
58279,
58280,
58334,
58335,
58462,
58502,
58503,
58593,
58594,
58724,
58725,
58748,
58749,
58750,
58803,
58868,
58869,
58916,
58978,
58979,
59007,
59032,
59033,
59055,
59078,
59101,
59125,
59126,
59660,
59661,
59701,
59715,
59730,
59731,
59740,
59770,
59771,
59803,
59804,
59811,
59812,
59836,
59852,
59918,
59937,
59963,
59994,
60102,
60131,
60132,
60168,
60276,
60277,
60318,
60335,
60385,
60386,
60393,
60394,
60395,
60414,
60415,
60474,
60548,
60585,
60586,
60635,
60636,
60643,
60644,
60693,
60694,
60703,
60730,
60731,
60808,
60809,
60829,
60830,
60837,
60838,
60847,
60874,
60875,
60876,
60930,
60931,
60940,
60941,
60974,
60975,
60985,
60986,
61077,
61078,
61143,
61144,
61166,
61196,
61197,
61222,
61243,
61359,
61360,
61431,
61432,
61441,
61442,
61483,
61484,
61534,
61558,
61608,
61632,
61682,
61706,
61756,
61780,
61830,
61854,
61904,
61928,
61978,
62002,
62052,
62076,
62077,
62078,
62117,
62118,
62168,
62169,
62174,
62175,
62194,
62213,
62232,
62251,
62270,
62289,
62308,
62327,
62328,
62333,
62334,
62381,
62428,
62475,
62522,
62569,
62616,
62663,
62710,
62711,
62741,
62742,
62759,
62813,
62868,
62923,
62978,
63032,
63086,
63140,
63194,
63248,
63302,
63356,
63410,
63411,
63412,
63413,
63449,
63450,
63451,
63490,
63603,
63604,
63667,
63706,
63760,
63810,
63831,
63832,
63833,
63892,
63967,
64021,
64075,
64076,
64142,
64181,
64236,
64288,
64289,
64290,
64356,
64395,
64450,
64502,
64503,
64504,
64570,
64609,
64664,
64716,
64717,
64718,
64784,
64823,
64878,
64930,
64931,
64932,
64998,
65037,
65092,
65144,
65145,
65146,
65212,
65251,
65306,
65358,
65359,
65360,
65426,
65465,
65520,
65572,
65573,
65574,
65640,
65679,
65734,
65786,
65787,
65788,
65866,
65905,
65959,
66009,
66010,
66011,
66012,
66042,
66043,
66061,
66080,
66081,
66127,
66128,
66206,
66207,
66222,
66223,
66341,
66342,
66355,
66367,
66372,
66373,
66415,
66416,
66458,
66477,
66478,
66492,
66493,
66510,
66511,
66540,
66570,
66589,
66603,
66604,
66627,
66628,
66717,
66718,
66744,
66745,
66775,
66794,
66795,
66816,
66817,
66843,
66844,
66891,
66892,
67006,
67007,
67031,
67032,
67148,
67149,
67277,
67296,
67351,
67352,
67379,
67436,
67462,
67487,
67516,
67538,
67584,
67630,
67676,
67699,
67743,
67765,
67774,
67798,
67826,
67854,
67882,
67910,
67938,
67966,
67994,
68022,
68026,
68054,
68114,
68162,
68221,
68280,
68339,
68398,
68457,
68516,
68575,
68634,
68635,
68657,
68658,
68672,
68673,
68744,
68745,
68866,
68867,
68887,
68945,
68997,
69053,
69105,
69167,
69216,
69269,
69326,
69385,
69440,
69441,
69470,
69471,
69513,
69514,
69635,
69636,
69637,
69731,
69761,
69762,
69763,
69803,
69843,
69844,
69871,
69872,
69896,
69918,
69943,
69966,
69995,
70022,
70048,
70072,
70073,
70120,
70131,
70132,
70152,
70169,
70209,
70229,
70230,
70303,
70345,
70346,
70399,
70400,
70440,
70462,
70490,
70491,
70529,
70575,
70622,
70669,
70715,
70716,
70743,
70770,
70801,
70832,
70861,
70898,
70899,
70922,
70923,
70981,
70982,
71017,
71018,
71057,
71058,
71094,
71095,
71126,
71127,
71128,
71157,
71158,
71174,
71245,
71316,
71317,
71352,
71388,
71389,
71422,
71423,
71424,
71425,
71426,
71453,
71454,
71475,
71476,
71507,
71508,
71527,
71557,
71589,
71593,
71607,
71608,
71637,
71638,
71661,
71662,
71671,
71726,
71766,
71785,
71786,
71833,
71834,
71840,
71854,
71869,
71884,
71904,
71905,
71906,
71926,
71947,
71967,
71988,
71989,
71998,
72002,
72033,
72034,
72035,
72036,
72062,
72063,
72064,
72115,
72134,
72135,
72164,
72165,
72198,
72230,
72231,
72261,
72262,
72263,
72264,
72280,
72281,
72339,
72370,
72400,
72431,
72432,
72457,
72488,
72489,
72514,
72538,
72563,
72589,
72590,
72616,
72636,
72637,
72676,
72677,
72678,
72698,
72699,
72700,
72717,
72718,
72746,
72830,
72844,
72845,
72846,
72886,
72887,
72888,
72909,
72910,
72911,
72912,
72913,
72952,
72953,
73017,
73088,
73145,
73146,
73167,
73168,
73187,
73188,
73217,
73218,
73315,
73316,
73344,
73345,
73365,
73392,
73416,
73454,
73465,
73481,
73505,
73529,
73550,
73551,
73642,
73718,
73807,
73828,
73873,
73874,
73886,
73887,
73951,
73952,
73979,
73980,
74019,
74020,
74028,
74029,
74057,
74058,
74111,
74112,
74152,
74153,
74176,
74224,
74264,
74265,
74333,
74335,
74336,
74389,
74390,
74430,
74431,
74491,
74492
],
"line_end_idx": [
5,
6,
7,
24,
25,
47,
48,
128,
129,
324,
325,
407,
408,
482,
483,
529,
530,
610,
611,
863,
864,
980,
981,
997,
998,
1022,
1023,
1050,
1051,
1078,
1079,
1094,
1095,
1157,
1236,
1303,
1304,
1334,
1335,
1359,
1383,
1407,
1408,
1443,
1444,
1445,
1464,
1465,
1481,
1482,
1489,
1490,
1548,
1549,
1582,
1583,
1645,
1646,
1656,
1671,
1723,
1774,
1785,
1786,
1888,
1889,
1949,
1950,
2043,
2044,
2070,
2071,
2128,
2129,
2154,
2155,
2188,
2189,
2258,
2259,
2287,
2288,
2325,
2326,
2344,
2374,
2401,
2422,
2434,
2484,
2561,
2563,
2595,
2625,
2665,
2688,
2717,
2737,
2773,
2793,
2818,
2819,
2969,
3164,
3249,
3320,
3461,
3462,
3463,
3556,
3557,
3588,
3589,
3676,
3677,
3704,
3705,
3753,
3754,
3793,
3794,
3856,
3857,
3876,
3877,
3959,
3960,
3998,
3999,
4014,
4066,
4124,
4167,
4168,
4183,
4235,
4294,
4295,
4301,
4302,
4330,
4331,
4388,
4420,
4452,
4484,
4516,
4548,
4622,
4623,
4657,
4658,
4958,
4959,
4995,
5020,
5021,
5154,
5155,
5248,
5249,
5273,
5274,
5359,
5360,
5417,
5449,
5481,
5513,
5545,
5577,
5578,
5619,
5620,
5671,
5730,
5731,
5785,
5863,
5864,
5935,
5936,
5981,
5982,
6058,
6059,
6102,
6103,
6174,
6175,
6197,
6198,
6224,
6225,
6251,
6252,
6357,
6358,
6359,
6430,
6431,
6449,
6455,
6456,
6503,
6504,
6551,
6552,
6566,
6567,
6611,
6612,
6634,
6635,
6661,
6662,
6681,
6682,
6727,
6728,
6737,
6738,
6772,
6773,
6805,
6806,
6834,
6835,
6864,
6865,
6890,
6891,
6918,
6919,
6936,
6937,
6958,
6959,
6974,
6975,
7002,
7067,
7068,
7116,
7137,
7138,
7182,
7217,
7218,
7264,
7289,
7329,
7330,
7355,
7366,
7367,
7400,
7401,
7422,
7432,
7443,
7458,
7459,
7498,
7534,
7535,
7562,
7636,
7637,
7685,
7706,
7707,
7751,
7786,
7787,
7833,
7858,
7898,
7899,
7924,
7935,
7936,
7957,
7958,
7990,
7991,
8023,
8024,
8066,
8076,
8109,
8120,
8121,
8139,
8180,
8181,
8182,
8221,
8257,
8258,
8289,
8306,
8323,
8324,
8353,
8371,
8390,
8391,
8392,
8417,
8465,
8491,
8536,
8563,
8616,
8627,
8666,
8705,
8740,
8741,
8794,
8828,
8864,
8900,
8930,
8949,
8964,
8982,
8997,
9012,
9027,
9028,
9080,
9125,
9140,
9184,
9199,
9235,
9250,
9251,
9283,
9301,
9332,
9343,
9358,
9393,
9404,
9419,
9420,
9421,
9471,
9507,
9524,
9541,
9628,
9678,
9693,
9748,
9766,
9785,
9786,
9787,
9818,
9894,
9895,
9952,
9953,
9993,
10032,
10033,
10055,
10083,
10125,
10167,
10204,
10217,
10218,
10268,
10290,
10310,
10323,
10324,
10371,
10393,
10415,
10428,
10429,
10469,
10491,
10515,
10528,
10529,
10571,
10593,
10618,
10631,
10632,
10689,
10711,
10729,
10746,
10750,
10763,
10764,
10765,
10766,
10789,
10790,
10822,
10823,
10912,
10913,
10935,
10936,
10937,
10979,
10980,
10987,
10996,
11049,
11103,
11177,
11209,
11223,
11233,
11242,
11244,
11296,
11430,
11506,
11653,
11654,
11676,
11686,
11687,
11721,
11722,
11754,
11776,
11804,
11810,
11840,
11841,
11856,
11871,
11904,
11919,
11935,
11952,
11954,
12168,
12169,
12616,
12617,
12711,
12741,
12742,
12766,
12767,
12846,
12916,
13052,
13136,
13137,
13159,
13169,
13170,
13208,
13240,
13241,
13260,
13282,
13298,
13313,
13314,
13330,
13344,
13355,
13368,
13430,
13488,
13566,
13602,
13620,
13634,
13646,
13654,
13655,
13675,
13689,
13700,
13713,
13740,
13754,
13766,
13787,
13788,
13799,
13817,
13832,
13838,
13864,
13896,
13906,
13940,
13958,
13978,
13980,
14365,
14366,
14527,
14550,
14551,
14552,
14553,
14554,
14556,
14557,
14558,
14559,
14560,
14616,
14617,
14673,
14674,
14705,
14706,
14730,
14731,
14775,
14776,
14829,
14830,
14853,
14854,
14875,
14876,
14905,
14906,
14931,
14932,
14970,
14971,
14983,
14984,
14989,
14990,
15003,
15004,
15145,
15146,
15189,
15190,
15209,
15210,
15234,
15235,
15272,
15273,
15286,
15287,
15288,
15342,
15343,
15430,
15431,
15472,
15473,
15527,
15561,
15578,
15593,
15606,
15607,
15608,
15637,
15638,
15674,
15675,
15717,
15739,
15768,
15824,
15886,
15931,
15951,
15952,
15978,
15979,
16022,
16023,
16042,
16043,
16067,
16068,
16107,
16108,
16152,
16153,
16208,
16209,
16264,
16265,
16324,
16325,
16416,
16417,
16435,
16436,
16503,
16504,
16570,
16616,
16620,
16668,
16669,
16714,
16715,
16736,
16774,
16799,
16894,
16928,
16963,
17019,
17020,
17072,
17073,
17096,
17097,
17133,
17134,
17155,
17156,
17197,
17198,
17239,
17240,
17293,
17358,
17359,
17406,
17468,
17469,
17497,
17522,
17523,
17545,
17568,
17591,
17615,
17616,
18150,
18151,
18191,
18205,
18220,
18221,
18230,
18260,
18261,
18293,
18294,
18301,
18302,
18303,
18331,
18415,
18424,
18425,
18441,
18442,
18500,
18531,
18561,
18592,
18593,
18618,
18649,
18650,
18675,
18699,
18724,
18750,
18751,
18777,
18797,
18798,
18837,
18838,
18839,
18859,
18860,
18861,
18862,
19012,
19013,
19083,
19084,
19107,
19108,
19248,
19249,
19352,
19353,
19387,
19388,
19517,
19518,
19559,
19560,
19650,
19694,
19695,
19971,
19972,
20257,
20258,
20304,
20305,
20378,
20379,
20462,
20463,
20497,
20498,
20677,
20678,
20695,
20696,
20787,
20788,
20795,
20808,
20809,
20883,
20884,
20922,
20923,
21101,
21102,
21139,
21140,
21365,
21366,
21521,
21522,
21562,
21563,
21671,
21713,
21714,
21833,
21834,
22050,
22051,
22272,
22273,
22473,
22474,
22605,
22606,
22629,
22649,
22650,
22791,
22792,
22821,
22822,
22964,
22965,
22998,
22999,
23305,
23306,
23458,
23459,
23490,
23491,
23593,
23594,
23595,
23783,
23784,
24053,
24054,
24125,
24160,
24161,
24396,
24397,
24485,
24486,
24502,
24503,
24641,
24642,
24665,
24666,
24754,
24755,
24792,
24793,
24813,
24814,
24916,
24917,
24924,
24938,
24939,
25046,
25047,
25074,
25075,
25094,
25095,
25112,
25203,
25204,
25269,
25270,
25312,
25313,
25364,
25365,
25378,
25379,
25754,
26005,
26103,
26104,
26118,
26119,
26291,
26518,
26519,
26546,
26547,
26792,
26838,
26864,
26985,
27029,
27088,
27120,
27146,
27179,
27274,
27281,
27553,
27605,
27638,
27839,
27840,
27898,
27899,
28274,
28281,
28395,
28504,
28542,
28634,
28750,
28787,
28952,
28953,
28987,
28988,
29210,
29252,
29293,
29304,
29378,
29385,
31174,
31234,
31270,
31308,
31324,
31325,
31361,
31362,
31722,
31797,
31824,
31922,
31929,
32027,
32184,
32209,
32363,
32370,
32903,
33137,
33160,
33442,
33464,
33532,
33550,
33599,
33624,
33709,
33798,
33884,
34109,
34110,
34146,
34147,
34446,
34614,
34640,
34766,
34773,
34796,
34894,
35121,
35152,
35153,
35214,
35215,
35507,
35590,
35767,
35838,
35847,
36286,
36394,
36407,
36510,
36751,
36910,
36928,
36963,
36970,
37169,
37719,
37720,
37755,
37756,
37894,
37908,
37954,
37961,
38083,
38152,
38169,
38234,
38251,
38314,
38343,
38415,
38416,
38470,
38471,
38767,
38832,
38987,
39032,
39142,
39201,
39289,
39296,
39470,
39592,
39627,
39711,
39718,
39963,
40001,
40002,
40013,
40014,
40325,
40388,
40389,
40412,
40413,
40449,
40450,
40460,
40461,
40789,
40790,
41080,
41081,
41272,
41273,
41343,
41344,
41361,
41362,
41659,
41660,
42980,
42981,
43003,
43004,
43039,
43040,
43075,
43076,
43130,
43131,
43395,
43396,
43452,
43453,
43491,
43492,
43520,
43580,
43626,
43687,
43748,
43809,
43870,
43931,
43992,
44053,
44114,
44115,
44116,
44145,
44146,
44203,
44232,
44261,
44290,
44319,
44348,
44377,
44406,
44435,
44464,
44493,
44522,
44551,
44580,
44609,
44638,
44667,
44697,
44726,
44755,
44784,
44813,
44842,
44871,
44900,
44929,
44958,
44987,
45016,
45045,
45074,
45103,
45132,
45161,
45190,
45219,
45248,
45277,
45306,
45335,
45364,
45365,
45366,
45393,
45394,
45434,
45474,
45514,
45554,
45594,
45634,
45674,
45714,
45715,
45716,
45760,
45761,
45805,
45890,
45966,
45967,
46008,
46056,
46152,
46231,
46310,
46389,
46468,
46547,
46626,
46705,
46784,
46863,
46864,
46908,
46993,
47069,
47070,
47111,
47159,
47255,
47334,
47413,
47492,
47571,
47650,
47651,
47695,
47780,
47856,
47857,
47898,
47946,
48042,
48121,
48200,
48279,
48358,
48437,
48516,
48517,
48561,
48646,
48722,
48723,
48764,
48812,
48908,
48995,
49074,
49153,
49232,
49311,
49390,
49469,
49548,
49627,
49706,
49785,
49864,
49943,
50022,
50101,
50180,
50181,
50225,
50310,
50386,
50387,
50428,
50476,
50572,
50651,
50730,
50731,
50775,
50860,
50936,
50937,
50978,
51026,
51122,
51201,
51280,
51281,
51325,
51410,
51486,
51487,
51528,
51576,
51672,
51751,
51830,
51909,
51910,
51954,
52039,
52115,
52116,
52157,
52205,
52301,
52380,
52459,
52538,
52539,
52540,
52541,
52605,
52694,
52758,
52847,
52911,
53000,
53064,
53156,
53220,
53309,
53373,
53462,
53526,
53615,
53679,
53768,
53769,
53771,
53772,
53810,
53811,
53812,
53813,
53877,
53878,
53937,
53971,
54030,
54064,
54123,
54157,
54216,
54250,
54309,
54343,
54402,
54436,
54495,
54529,
54588,
54622,
54623,
54624,
54625,
54626,
54699,
54700,
54748,
54796,
54844,
54892,
54940,
54988,
55036,
55084,
55085,
55109,
55110,
55160,
55161,
55320,
55321,
55367,
55368,
55410,
55462,
55532,
55602,
55672,
55742,
55812,
55882,
55952,
56022,
56098,
56099,
56100,
56101,
56331,
56332,
56373,
56374,
56400,
56426,
56452,
56478,
56504,
56530,
56556,
56582,
56583,
56606,
56607,
56664,
56713,
56714,
56771,
56820,
56821,
56878,
56927,
56928,
56985,
57034,
57035,
57092,
57141,
57142,
57199,
57248,
57249,
57306,
57355,
57356,
57364,
57414,
57463,
57464,
57465,
57466,
57574,
57655,
57656,
57735,
57736,
57850,
57909,
57910,
58024,
58075,
58076,
58077,
58078,
58213,
58214,
58279,
58280,
58334,
58335,
58462,
58502,
58503,
58593,
58594,
58724,
58725,
58748,
58749,
58750,
58803,
58868,
58869,
58916,
58978,
58979,
59007,
59032,
59033,
59055,
59078,
59101,
59125,
59126,
59660,
59661,
59701,
59715,
59730,
59731,
59740,
59770,
59771,
59803,
59804,
59811,
59812,
59836,
59852,
59918,
59937,
59963,
59994,
60102,
60131,
60132,
60168,
60276,
60277,
60318,
60335,
60385,
60386,
60393,
60394,
60395,
60414,
60415,
60474,
60548,
60585,
60586,
60635,
60636,
60643,
60644,
60693,
60694,
60703,
60730,
60731,
60808,
60809,
60829,
60830,
60837,
60838,
60847,
60874,
60875,
60876,
60930,
60931,
60940,
60941,
60974,
60975,
60985,
60986,
61077,
61078,
61143,
61144,
61166,
61196,
61197,
61222,
61243,
61359,
61360,
61431,
61432,
61441,
61442,
61483,
61484,
61534,
61558,
61608,
61632,
61682,
61706,
61756,
61780,
61830,
61854,
61904,
61928,
61978,
62002,
62052,
62076,
62077,
62078,
62117,
62118,
62168,
62169,
62174,
62175,
62194,
62213,
62232,
62251,
62270,
62289,
62308,
62327,
62328,
62333,
62334,
62381,
62428,
62475,
62522,
62569,
62616,
62663,
62710,
62711,
62741,
62742,
62759,
62813,
62868,
62923,
62978,
63032,
63086,
63140,
63194,
63248,
63302,
63356,
63410,
63411,
63412,
63413,
63449,
63450,
63451,
63490,
63603,
63604,
63667,
63706,
63760,
63810,
63831,
63832,
63833,
63892,
63967,
64021,
64075,
64076,
64142,
64181,
64236,
64288,
64289,
64290,
64356,
64395,
64450,
64502,
64503,
64504,
64570,
64609,
64664,
64716,
64717,
64718,
64784,
64823,
64878,
64930,
64931,
64932,
64998,
65037,
65092,
65144,
65145,
65146,
65212,
65251,
65306,
65358,
65359,
65360,
65426,
65465,
65520,
65572,
65573,
65574,
65640,
65679,
65734,
65786,
65787,
65788,
65866,
65905,
65959,
66009,
66010,
66011,
66012,
66042,
66043,
66061,
66080,
66081,
66127,
66128,
66206,
66207,
66222,
66223,
66341,
66342,
66355,
66367,
66372,
66373,
66415,
66416,
66458,
66477,
66478,
66492,
66493,
66510,
66511,
66540,
66570,
66589,
66603,
66604,
66627,
66628,
66717,
66718,
66744,
66745,
66775,
66794,
66795,
66816,
66817,
66843,
66844,
66891,
66892,
67006,
67007,
67031,
67032,
67148,
67149,
67277,
67296,
67351,
67352,
67379,
67436,
67462,
67487,
67516,
67538,
67584,
67630,
67676,
67699,
67743,
67765,
67774,
67798,
67826,
67854,
67882,
67910,
67938,
67966,
67994,
68022,
68026,
68054,
68114,
68162,
68221,
68280,
68339,
68398,
68457,
68516,
68575,
68634,
68635,
68657,
68658,
68672,
68673,
68744,
68745,
68866,
68867,
68887,
68945,
68997,
69053,
69105,
69167,
69216,
69269,
69326,
69385,
69440,
69441,
69470,
69471,
69513,
69514,
69635,
69636,
69637,
69731,
69761,
69762,
69763,
69803,
69843,
69844,
69871,
69872,
69896,
69918,
69943,
69966,
69995,
70022,
70048,
70072,
70073,
70120,
70131,
70132,
70152,
70169,
70209,
70229,
70230,
70303,
70345,
70346,
70399,
70400,
70440,
70462,
70490,
70491,
70529,
70575,
70622,
70669,
70715,
70716,
70743,
70770,
70801,
70832,
70861,
70898,
70899,
70922,
70923,
70981,
70982,
71017,
71018,
71057,
71058,
71094,
71095,
71126,
71127,
71128,
71157,
71158,
71174,
71245,
71316,
71317,
71352,
71388,
71389,
71422,
71423,
71424,
71425,
71426,
71453,
71454,
71475,
71476,
71507,
71508,
71527,
71557,
71589,
71593,
71607,
71608,
71637,
71638,
71661,
71662,
71671,
71726,
71766,
71785,
71786,
71833,
71834,
71840,
71854,
71869,
71884,
71904,
71905,
71906,
71926,
71947,
71967,
71988,
71989,
71998,
72002,
72033,
72034,
72035,
72036,
72062,
72063,
72064,
72115,
72134,
72135,
72164,
72165,
72198,
72230,
72231,
72261,
72262,
72263,
72264,
72280,
72281,
72339,
72370,
72400,
72431,
72432,
72457,
72488,
72489,
72514,
72538,
72563,
72589,
72590,
72616,
72636,
72637,
72676,
72677,
72678,
72698,
72699,
72700,
72717,
72718,
72746,
72830,
72844,
72845,
72846,
72886,
72887,
72888,
72909,
72910,
72911,
72912,
72913,
72952,
72953,
73017,
73088,
73145,
73146,
73167,
73168,
73187,
73188,
73217,
73218,
73315,
73316,
73344,
73345,
73365,
73392,
73416,
73454,
73465,
73481,
73505,
73529,
73550,
73551,
73642,
73718,
73807,
73828,
73873,
73874,
73886,
73887,
73951,
73952,
73979,
73980,
74019,
74020,
74028,
74029,
74057,
74058,
74111,
74112,
74152,
74153,
74176,
74224,
74264,
74265,
74333,
74335,
74336,
74389,
74390,
74430,
74431,
74491,
74492,
74534
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 74534,
"ccnet_original_nlines": 1922,
"rps_doc_curly_bracket": 0.0000268299991148524,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20742791891098022,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03232407942414284,
"rps_doc_frac_lines_end_with_ellipsis": 0.0031201199162751436,
"rps_doc_frac_no_alph_words": 0.33973392844200134,
"rps_doc_frac_unique_words": 0.20495252311229706,
"rps_doc_mean_word_length": 5.292747497558594,
"rps_doc_num_sentences": 870,
"rps_doc_symbol_to_word_ratio": 0.01173780020326376,
"rps_doc_unigram_entropy": 6.530549049377441,
"rps_doc_word_count": 10217,
"rps_doc_frac_chars_dupe_10grams": 0.16842961311340332,
"rps_doc_frac_chars_dupe_5grams": 0.2715252637863159,
"rps_doc_frac_chars_dupe_6grams": 0.23348620533943176,
"rps_doc_frac_chars_dupe_7grams": 0.2120349109172821,
"rps_doc_frac_chars_dupe_8grams": 0.17471705377101898,
"rps_doc_frac_chars_dupe_9grams": 0.17257194221019745,
"rps_doc_frac_chars_top_2gram": 0.010059920139610767,
"rps_doc_frac_chars_top_3gram": 0.014035799540579319,
"rps_doc_frac_chars_top_4gram": 0.0170870590955019,
"rps_doc_books_importance": -7450.1826171875,
"rps_doc_books_importance_length_correction": -7450.1826171875,
"rps_doc_openwebtext_importance": -4327.1474609375,
"rps_doc_openwebtext_importance_length_correction": -4327.1474609375,
"rps_doc_wikipedia_importance": -3511.56787109375,
"rps_doc_wikipedia_importance_length_correction": -3511.56787109375
},
"fasttext": {
"dclm": 0.024964090436697006,
"english": 0.6483747363090515,
"fineweb_edu_approx": 1.995686650276184,
"eai_general_math": 0.13293832540512085,
"eai_open_web_math": 0.035584088414907455,
"eai_web_code": 0.6783611178398132
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.0285",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.462",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "16",
"label": "Personal Blog"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,206,696,516,514,245,600 |
Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
PerlMonks
Re: mod_perl memory question
by Rhandom (Curate)
on Mar 05, 2008 at 15:46 UTC ( #672199=note: print w/ replies, xml ) Need Help??
in reply to mod_perl memory question
If the cache needs to be shared among children - I second the vote for memcache.
If each child needs its own, I'd do something like the following using the End module:
# add clear_cache method to your sharedcache package sharedcache; sub clear_cache { $cache = undef } # inside your apache handler use the following: use End; sub handler { my $clear_cache = end { sharedcache::clear_cache() }; # normal handler operations go here }
When your handler goes out of scope - the object stored in $clear_cache will go out of scope and the stored coderef will fire - clearing your cache.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
Log In?
Username:
Password:
What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672199]
help
Chatterbox?
and the web crawler heard nothing...
How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2016-07-25 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What is your favorite alternate name for a (specific) keyboard key?
Results (222 votes). Check out past polls.
|
{
"url": "http://www.perlmonks.org/index.pl?node_id=672199",
"source_domain": "www.perlmonks.org",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "20622",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FWSDO77X4JEH2CQNJ5VYT3ZXQG5PHIIQ",
"WARC-Concurrent-To": "<urn:uuid:09fb1e23-8c1c-4daf-ae9c-ceac34903c9d>",
"WARC-Date": "2016-07-25T07:46:28Z",
"WARC-IP-Address": "66.39.54.27",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:BBGJUCTUBGTRNTKOH4OS5FNTRPISRVYQ",
"WARC-Record-ID": "<urn:uuid:5a2a4d10-46dc-4571-8460-958d96214c87>",
"WARC-Target-URI": "http://www.perlmonks.org/index.pl?node_id=672199",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a030a7ea-8e44-44c0-845c-dfed42b6c824>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-185-27-174.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-30\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for July 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
63,
94,
121,
123,
135,
136,
165,
166,
186,
267,
268,
269,
306,
307,
388,
389,
476,
477,
741,
742,
743,
892,
893,
951,
952,
960,
970,
980,
981,
1001,
1019,
1032,
1045,
1075,
1080,
1092,
1129,
1130,
1168,
1181,
1216,
1243,
1253,
1266,
1278,
1289,
1307,
1379,
1380,
1381,
1382,
1383,
1384,
1385,
1386,
1387,
1388,
1389,
1390,
1391,
1392,
1393,
1394,
1395,
1396,
1397
],
"line_end_idx": [
63,
94,
121,
123,
135,
136,
165,
166,
186,
267,
268,
269,
306,
307,
388,
389,
476,
477,
741,
742,
743,
892,
893,
951,
952,
960,
970,
980,
981,
1001,
1019,
1032,
1045,
1075,
1080,
1092,
1129,
1130,
1168,
1181,
1216,
1243,
1253,
1266,
1278,
1289,
1307,
1379,
1380,
1381,
1382,
1383,
1384,
1385,
1386,
1387,
1388,
1389,
1390,
1391,
1392,
1393,
1394,
1395,
1396,
1397,
1443
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1443,
"ccnet_original_nlines": 66,
"rps_doc_curly_bracket": 0.004157999996095896,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2556634247303009,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025889970362186432,
"rps_doc_frac_lines_end_with_ellipsis": 0.014925369992852211,
"rps_doc_frac_no_alph_words": 0.30744338035583496,
"rps_doc_frac_unique_words": 0.7102803587913513,
"rps_doc_mean_word_length": 4.9719624519348145,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0.016181230545043945,
"rps_doc_unigram_entropy": 4.868180274963379,
"rps_doc_word_count": 214,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.024436090141534805,
"rps_doc_frac_chars_top_3gram": 0.039473678916692734,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -132.98062133789062,
"rps_doc_books_importance_length_correction": -129.63119506835938,
"rps_doc_openwebtext_importance": -73.49886322021484,
"rps_doc_openwebtext_importance_length_correction": -73.49886322021484,
"rps_doc_wikipedia_importance": -61.51456832885742,
"rps_doc_wikipedia_importance_length_correction": -53.63610076904297
},
"fasttext": {
"dclm": 0.19606024026870728,
"english": 0.7666369080543518,
"fineweb_edu_approx": 1.8610039949417114,
"eai_general_math": 0.00385797000490129,
"eai_open_web_math": 0.07485997676849365,
"eai_web_code": 0.00003958000161219388
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.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": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,732,471,438,302,486,000 |
markvdlaan93 markvdlaan93 - 11 months ago 190
PHP Question
Concat fields in search plugin Cakephp 3
Currently, I'm implementing the friendsofcake search plugin (version 1.2.3). Everything works as it should be with the exception that I want to concat two fields like this:
$this->searchManager()
->add('id', 'Search.Value')
->add('q', 'Search.Like', [
'before' => true,
'after' => true,
'field' => [$this->aliasField('username'), $this->aliasField('name')]
])
->add('q', 'Search.Callback', [
'callback' => function ($query, $args, $manager) {
return $query->select(['name' => $query->func()->concat(
['first_name' => 'identifier', ' ' , 'last_name' => 'identifier']
)]);
}
]);
Since my database table stores first_name and last_name separate I want that the search plugin searches for these two fields combined (the name). The code above ignores the like clausule and when I print the query inside the callback it seems it ignores the like operation. Does anyone know how I can concat two fields within this search plugin?
ndm ndm
Answer
You cannot add multiple filters with the same name (q), the latter will overwrite the former, they won't get merged.
You'll have to build the conditions yourself in the callback too, ie add conditions for username and name. Also you have to use HAVING if you want to match using aggregated columns from the SELECT clause, or you have to build the aggregated column in the WHERE conditions too - depending on the DBMS that you are using, WHERE might be faster (though probably not when using LIKE, which makes using indices impossible, ie every single row will be touched anyways).
Here's a basic example using HAVING:
'callback' => function ($query, $args, $manager) {
return $query
->select([
$this->aliasField('username'),
'name' => $query->func()->concat([
'first_name' => 'identifier',
' ' ,
'last_name' => 'identifier'
])
])
->having([
'OR' => [
$this->aliasField('username') . ' LIKE' => '%' . $args['q'] . '%',
'name LIKE' => '%' . $args['q'] . '%'
]
]);
}
* untested example
|
{
"url": "https://codedump.io/share/QsCKcDisHMFC/1/concat-fields-in-search-plugin-cakephp-3",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2017-17",
"warc_metadata": {
"Content-Length": "27414",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:N7MUSY6Q7DBSZ7PSMIS3S2X4NVJMBLPA",
"WARC-Concurrent-To": "<urn:uuid:0617e432-7590-49ed-8696-bad4e41d967e>",
"WARC-Date": "2017-04-30T11:11:26Z",
"WARC-IP-Address": "84.22.103.185",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:2HALJTWFWQCN2N7GTYECO76MFNB2MUWY",
"WARC-Record-ID": "<urn:uuid:7c7cf781-d384-46d9-8768-f290a9ef1631>",
"WARC-Target-URI": "https://codedump.io/share/QsCKcDisHMFC/1/concat-fields-in-search-plugin-cakephp-3",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:26e15f0a-dc6d-49d9-bc27-ef3633828a6b>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-145-167-34.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-17\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
46,
59,
60,
101,
102,
275,
276,
299,
327,
355,
373,
390,
460,
463,
495,
546,
603,
669,
674,
676,
680,
681,
682,
1028,
1029,
1037,
1044,
1045,
1162,
1163,
1627,
1628,
1665,
1666,
1717,
1735,
1754,
1797,
1844,
1890,
1912,
1956,
1971,
1982,
2001,
2023,
2106,
2160,
2174,
2186,
2188,
2189
],
"line_end_idx": [
46,
59,
60,
101,
102,
275,
276,
299,
327,
355,
373,
390,
460,
463,
495,
546,
603,
669,
674,
676,
680,
681,
682,
1028,
1029,
1037,
1044,
1045,
1162,
1163,
1627,
1628,
1665,
1666,
1717,
1735,
1754,
1797,
1844,
1890,
1912,
1956,
1971,
1982,
2001,
2023,
2106,
2160,
2174,
2186,
2188,
2189,
2207
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2207,
"ccnet_original_nlines": 52,
"rps_doc_curly_bracket": 0.0018124199705198407,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2738853394985199,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03397028148174286,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3970276117324829,
"rps_doc_frac_unique_words": 0.5708812475204468,
"rps_doc_mean_word_length": 5.490421295166016,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.742369651794434,
"rps_doc_word_count": 261,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.1256106048822403,
"rps_doc_frac_chars_dupe_6grams": 0.053035590797662735,
"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.03349616006016731,
"rps_doc_frac_chars_top_3gram": 0.020935099571943283,
"rps_doc_frac_chars_top_4gram": 0.03489184007048607,
"rps_doc_books_importance": -169.15330505371094,
"rps_doc_books_importance_length_correction": -169.15330505371094,
"rps_doc_openwebtext_importance": -92.83828735351562,
"rps_doc_openwebtext_importance_length_correction": -92.83828735351562,
"rps_doc_wikipedia_importance": -41.78397750854492,
"rps_doc_wikipedia_importance_length_correction": -41.78397750854492
},
"fasttext": {
"dclm": 0.7792640328407288,
"english": 0.7080743312835693,
"fineweb_edu_approx": 1.6420979499816895,
"eai_general_math": 0.8333362936973572,
"eai_open_web_math": 0.276594340801239,
"eai_web_code": 0.9616677761077881
}
}
|
{
"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.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,865,774,646,404,878,000 |
openssl_decrypt
(PHP 5 >= 5.3.0, PHP 7)
openssl_decryptDecrypts data
说明
string openssl_decrypt ( string $data , string $method , string $key [, int $options = 0 [, string $iv = "" [, string $tag = "" [, string $aad = "" ]]]] )
Takes a raw or base64 encoded string and decrypts it using a given method and key.
参数
data
The encrypted message to be decrypted.
method
The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods().
key
The key.
options
options can be one of OPENSSL_RAW_DATA, OPENSSL_ZERO_PADDING.
iv
A non-NULL Initialization Vector.
tag
The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE.
aad
Additional authentication data.
返回值
The decrypted string on success 或者在失败时返回 FALSE.
错误/异常
Emits an E_WARNING level error if an unknown cipher algorithm is passed via the method parameter.
Emits an E_WARNING level error if an empty value is passed in via the iv parameter.
更新日志
版本 说明
5.3.3 The iv parameter was added.
5.4.0 The raw_output was changed to options.
7.1.0 The tag and aad parameters were added.
参见
add a note add a note
User Contributed Notes 6 notes
up
14
Hernanibus
1 year ago
Parameters may seem obvius to some but not for everyone so:
- $data can be as the description says raw or base64. If no $option is set (this is, if value of 0 is passed in this parameter), data will be assumed to be base64 encoded. If parameter OPENSSL_RAW_DATA is set, it will be understood as row data.
- $password (key) is a String of [pseudo] bytes as those generated by the function openssl_random_pseudo_bytes().
- $options as (as for 2016) two possible values OPENSSL_RAW_DATA and OPENSSL_ZERO_PADDING. Setting both can be done by OPENSSL_RAW_DATA||OPENSSL_ZERO_PADDING. If no OPENSSL_ZERO_PADDING is specify, default pading of PKCS#7 will be done as it's been observe by [openssl at mailismagic dot com]'s coment in openssl_encrypt()
- $iv is as in the case of $password, a String of bytes. Its length depends on the algorithm used. May be the best way to generate an $iv is by:
<?php
$iv
= openssl_random_pseudo_bytes(openssl_cipher_iv_length('your algorithm'));// for example you algorithm = 'AES-256-CTR'
?>
up
1
lucianonapoli at yahoo dot it
6 months ago
The parameter string $password must be in binary form and is derived from the exadecimal key value.
Example:
encrypting in command line console with openssl
openssl AES-256-CBC -K 5ae1b8a17bad4da4fdac796f64c16ecd -iv 34857d973953e44afb49ea9d61104d8c -in doc.txt -out doc.enc.txt
decripting in php
$key = hex2bin('5ae1b8a17bad4da4fdac796f64c16ecd');
$iv = hex2bin('34857d973953e44afb49ea9d61104d8c');
$output = openssl_decrypt($encstr, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
up
2
ittasks at gmail dot com
4 years ago
in case that hosting do not provide openssl_encrypt decrypt functions - it could be mimiced via commad prompt executions
this functions will check is if openssl is installed and try to use it by default
function sslPrm()
{
return array("your_password","IV (optional)","aes-128-cbc");
}
function sslEnc($msg)
{
list ($pass, $iv, $method)=sslPrm();
if(function_exists('openssl_encrypt'))
return urlencode(openssl_encrypt(urlencode($msg), $method, $pass, false, $iv));
else
return urlencode(exec("echo \"".urlencode($msg)."\" | openssl enc -".urlencode($method)." -base64 -nosalt -K ".bin2hex($pass)." -iv ".bin2hex($iv)));
}
function sslDec($msg)
{
list ($pass, $iv, $method)=sslPrm();
if(function_exists('openssl_decrypt'))
return trim(urldecode(openssl_decrypt(urldecode($msg), $method, $pass, false, $iv)));
else
return trim(urldecode(exec("echo \"".urldecode($msg)."\" | openssl enc -".$method." -d -base64 -nosalt -K ".bin2hex($pass)." -iv ".bin2hex($iv))));
}
//example of usage:
$r= sslEnc("This is encryption/decryption test!");
echo "<br>\n".$r.":".sslDec($r);
up
1
markagius dot co dot uk
5 months ago
openssl_decrypt(..) works with most but not all method types.
This list can vary, depending on the data (Message) and key (Password) used.
See the following code and edit the $text and $password values.
Code checks if text is the same after encrypting then decrypting it.
Note:
You can still use openssl_encrypt(..) with;
User enters 'Log-in password'
(Encrypted and stored using openssl_encrypt)
Next time.
User logs-in with 'Log-in password'
(Check that encrypted 'Log-in password' = stored data)
<CODE>
// Please edit $password=... and $text=...
$password = "This is a journey into sound";
$text = "";
for($charNo=0; $charNo<=255; $charNo=$charNo+1){
// if($charNo==127) {$charNo=$charNo+1;}
if(!$charNo<127){
// $text = $text."&#x".strtoupper(dechex($charNo)).";";
$text = $text.chr($charNo);
} else {
$text = $text.chr($charNo);
}
}
$text = "This is a test message.";
print "<TABLE BORDER=\"1\">\n";
print "<TR><TD><B>Encryption type:</B></TD><TD><B>String after converting back:</B></TD></TR>\n";
$ciphers = openssl_get_cipher_methods();
for($pointer=0; $pointer<count($ciphers); $pointer=$pointer+1){
$edit = EncryptDecrypt($text, true, $password, $ciphers[$pointer]);
$check = EncryptDecrypt($edit, false, $password, $ciphers[$pointer]);
if($text!=$check){
$info = $check;
print "<TR><TD>".$ciphers[$pointer]."</TD><TD>".$info."</TD></TR>\n";
}
}
print "</TABLE>\n";
function EncryptDecrypt($oldText, $encryptIt=true, $password="PASSWORD", $encryptType=""){
$ciphers = openssl_get_cipher_methods();
$foundEncType = false;
for($pointer=0; $pointer<count($ciphers); $pointer=$pointer+1){
if($ciphers[$pointer]==$encryptType){$foundEncType=true;}
}
if(!$foundEncType){
$encryptType = "RC2-64-CBC"; // Default value used if not set or listed.
}
if($encryptIt){
$newText = openssl_encrypt($oldText,$encryptType,$password);
} else {
$newText = openssl_decrypt($oldText,$encryptType,$password);
}
return $newText;
}
</CODE>
The following (sometimes) don't work:
DES-EDE3-CFB1 (sometimes)
aes-128-gcm
aes-192-gcm
aes-256-gcm
des-ede3-cfb1 (sometimes)
id-aes128-GCM
id-aes192-GCM
id-aes256-GCM
up
-4
Bitbang3r
5 months ago
openssl_decrypt assumes that $data is base64-encoded by default, but $key and $iv (when using AES) must be "raw" byte values.
In other words, assume that $data, $key, and $iv are all base64-encoded strings. Both $key and $iv must be base64-decoded before openssl_decrypt can use them.
Example code:
$ciphertext64 = "gfcC6t1BarndpzMuvYj2JFpWHqlWSJMhTtxPN7QjyEg=";
$key64 = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=";
$iv64="AAECAwQFBgcICQoLDA0ODw==";
$key = base64_decode($key64, true);
$iv = base64_decode($iv64, true);
$decrypted = openssl_decrypt($ciphertext64, 'aes-256-cbc', $key, 0, $iv);
Other 'gotchas' to keep in mind when cipher is 'aes-256-cbc':
* strlen($key) SHOULD be 32. PHP will apparently pad the key if necessary, with potentially unpredictable interoperability with other libraries and platforms, and almost certain reduction in cipher strength. Save yourself the headache, and make sure it's EXACTLY 32.
* strlen($iv) MUST be 16. By definition, AES uses 128-bit blocks, regardless of whether the key length is 128, 192, or 256... and iv's length must be precisely equal to that block length.
* Remember... $iv doesn't necessarily have to be SECRET (it's just a salt), but it MUST be cryptographically random AND different EACH TIME you begin a new round of AES encryption ("round" == "one call to openssl_encrypt or equivalent").
* Don't assume that your random numbers are cryptographically secure unless the function guarantees it. In general, PHP's random numbers AREN'T cryptographically secure (at least, not by default, and not unless the server's admin has gone out of his way to try). There's a HUGE difference between numbers that "look random", and numbers that genuinely ARE random, and it can make the difference between robust long-term encryption and mere obfuscation. See openssl_random_pseudo_bytes.
Finally, if you're attempting to use 'aes-256-gcm' (AEAD), search Google for "67304 gcm" to confirm that it's both supported AND known to work in whatever version of PHP you have available.
up
-46
Anonymous
3 years ago
If your using windows os, do not use the text inside the "file previewer" pane, as this is a truncated version of the actual encrypted string.
Instead, you need to open the file directly and use the contents there.
The error message I had been getting was:
"error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length"
To Top
|
{
"url": "http://php.net/manual/zh/function.openssl-decrypt.php",
"source_domain": "php.net",
"snapshot_id": "crawl=CC-MAIN-2017-39",
"warc_metadata": {
"Content-Length": "49602",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:R5D2JAT7KJBDOSOM3O3SIWC27R6KWJS6",
"WARC-Concurrent-To": "<urn:uuid:f115d910-c64d-4fea-aa61-b0498971159e>",
"WARC-Date": "2017-09-25T14:59:40Z",
"WARC-IP-Address": "72.52.91.14",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:OYU2ONRGTJNUSQNXHDZJJQGML3SN6AFG",
"WARC-Record-ID": "<urn:uuid:97d33c0f-b2d2-4a53-b792-20eb96fa3677>",
"WARC-Target-URI": "http://php.net/manual/zh/function.openssl-decrypt.php",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:6155a89c-f8d8-4197-a041-8a534e8449da>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-168-180-146.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-39\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for September 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
16,
17,
41,
42,
71,
72,
75,
76,
231,
232,
315,
316,
319,
320,
325,
326,
365,
366,
373,
374,
467,
468,
472,
473,
482,
483,
491,
492,
554,
555,
558,
559,
593,
594,
598,
599,
720,
721,
725,
726,
758,
759,
763,
764,
812,
813,
819,
820,
918,
919,
1003,
1004,
1009,
1010,
1016,
1050,
1095,
1140,
1141,
1144,
1145,
1167,
1168,
1199,
1200,
1203,
1206,
1217,
1228,
1288,
1289,
1534,
1535,
1649,
1650,
1973,
1974,
2119,
2120,
2126,
2134,
2253,
2256,
2259,
2261,
2291,
2304,
2404,
2405,
2414,
2415,
2463,
2585,
2586,
2604,
2656,
2707,
2708,
2788,
2791,
2793,
2818,
2830,
2952,
3034,
3035,
3053,
3055,
3116,
3118,
3140,
3142,
3181,
3222,
3307,
3314,
3469,
3471,
3493,
3495,
3534,
3575,
3666,
3673,
3826,
3828,
3829,
3849,
3900,
3933,
3936,
3938,
3962,
3975,
4037,
4114,
4115,
4179,
4248,
4249,
4255,
4301,
4333,
4380,
4393,
4431,
4488,
4489,
4496,
4541,
4542,
4588,
4589,
4603,
4654,
4699,
4721,
4783,
4817,
4830,
4864,
4870,
4874,
4875,
4910,
4911,
4945,
5045,
5088,
5154,
5228,
5302,
5325,
5348,
5424,
5430,
5434,
5456,
5457,
5548,
5591,
5616,
5682,
5744,
5748,
5770,
5847,
5851,
5869,
5934,
5945,
6010,
6014,
6033,
6035,
6043,
6081,
6114,
6130,
6146,
6162,
6199,
6217,
6235,
6253,
6256,
6259,
6269,
6282,
6408,
6409,
6568,
6569,
6583,
6584,
6648,
6705,
6739,
6740,
6776,
6810,
6811,
6885,
6886,
6948,
6949,
7217,
7218,
7406,
7407,
7645,
7646,
8132,
8133,
8323,
8326,
8330,
8340,
8352,
8495,
8496,
8568,
8569,
8611,
8699
],
"line_end_idx": [
16,
17,
41,
42,
71,
72,
75,
76,
231,
232,
315,
316,
319,
320,
325,
326,
365,
366,
373,
374,
467,
468,
472,
473,
482,
483,
491,
492,
554,
555,
558,
559,
593,
594,
598,
599,
720,
721,
725,
726,
758,
759,
763,
764,
812,
813,
819,
820,
918,
919,
1003,
1004,
1009,
1010,
1016,
1050,
1095,
1140,
1141,
1144,
1145,
1167,
1168,
1199,
1200,
1203,
1206,
1217,
1228,
1288,
1289,
1534,
1535,
1649,
1650,
1973,
1974,
2119,
2120,
2126,
2134,
2253,
2256,
2259,
2261,
2291,
2304,
2404,
2405,
2414,
2415,
2463,
2585,
2586,
2604,
2656,
2707,
2708,
2788,
2791,
2793,
2818,
2830,
2952,
3034,
3035,
3053,
3055,
3116,
3118,
3140,
3142,
3181,
3222,
3307,
3314,
3469,
3471,
3493,
3495,
3534,
3575,
3666,
3673,
3826,
3828,
3829,
3849,
3900,
3933,
3936,
3938,
3962,
3975,
4037,
4114,
4115,
4179,
4248,
4249,
4255,
4301,
4333,
4380,
4393,
4431,
4488,
4489,
4496,
4541,
4542,
4588,
4589,
4603,
4654,
4699,
4721,
4783,
4817,
4830,
4864,
4870,
4874,
4875,
4910,
4911,
4945,
5045,
5088,
5154,
5228,
5302,
5325,
5348,
5424,
5430,
5434,
5456,
5457,
5548,
5591,
5616,
5682,
5744,
5748,
5770,
5847,
5851,
5869,
5934,
5945,
6010,
6014,
6033,
6035,
6043,
6081,
6114,
6130,
6146,
6162,
6199,
6217,
6235,
6253,
6256,
6259,
6269,
6282,
6408,
6409,
6568,
6569,
6583,
6584,
6648,
6705,
6739,
6740,
6776,
6810,
6811,
6885,
6886,
6948,
6949,
7217,
7218,
7406,
7407,
7645,
7646,
8132,
8133,
8323,
8326,
8330,
8340,
8352,
8495,
8496,
8568,
8569,
8611,
8699,
8705
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 8705,
"ccnet_original_nlines": 245,
"rps_doc_curly_bracket": 0.00344630004838109,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.21902771294116974,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.042341869324445724,
"rps_doc_frac_lines_end_with_ellipsis": 0.004065040033310652,
"rps_doc_frac_no_alph_words": 0.3815995752811432,
"rps_doc_frac_unique_words": 0.430463582277298,
"rps_doc_mean_word_length": 5.915799617767334,
"rps_doc_num_sentences": 97,
"rps_doc_symbol_to_word_ratio": 0.003136429935693741,
"rps_doc_unigram_entropy": 5.611908435821533,
"rps_doc_word_count": 1057,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.029106030240654945,
"rps_doc_frac_chars_dupe_6grams": 0.029106030240654945,
"rps_doc_frac_chars_dupe_7grams": 0.00927555002272129,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.005757240112870932,
"rps_doc_frac_chars_top_3gram": 0.003358389949426055,
"rps_doc_frac_chars_top_4gram": 0.006396930199116468,
"rps_doc_books_importance": -843.4638671875,
"rps_doc_books_importance_length_correction": -843.4638671875,
"rps_doc_openwebtext_importance": -522.2512817382812,
"rps_doc_openwebtext_importance_length_correction": -522.2512817382812,
"rps_doc_wikipedia_importance": -419.11981201171875,
"rps_doc_wikipedia_importance_length_correction": -419.11981201171875
},
"fasttext": {
"dclm": 0.4051735997200012,
"english": 0.6389996409416199,
"fineweb_edu_approx": 2.8571131229400635,
"eai_general_math": 0.018758829683065414,
"eai_open_web_math": 0.2599095106124878,
"eai_web_code": 0.014277639798820019
}
}
|
{
"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.82",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,843,366,498,177,349,600 |
What is 30 Square Inches in Square Miles?
Unit Converter
Convert 30 Square Inches to Square Miles
To calculate 30 Square Inches to the corresponding value in Square Miles, multiply the quantity in Square Inches by 2.4909766860486E-10 (conversion factor). In this case we should multiply 30 Square Inches by 2.4909766860486E-10 to get the equivalent result in Square Miles:
30 Square Inches x 2.4909766860486E-10 = 7.4729300581458E-9 Square Miles
30 Square Inches is equivalent to 7.4729300581458E-9 Square Miles.
How to convert from Square Inches to Square Miles
The conversion factor from Square Inches to Square Miles is 2.4909766860486E-10. To find out how many Square Inches in Square Miles, multiply by the conversion factor or use the Area converter above. Thirty Square Inches is equivalent to zero point zero zero zero zero zero zero zero zero seven four seven three Square Miles.
Definition of Square Inch
A square inch (plural: square inches) is a unit of area, equal to the area of a square with sides of one inch. The following symbols are used to denote square inches: square in, sq inches, sq inch, sq in inches/-2, inch/-2, in/-2, inches^2, inch^2, in^2, inches2, inch2, in2. The square inch is a common unit of measurement in the United States and the United Kingdom.
Definition of Square Mile
The square mile (abbreviated as sq mi and sometimes as mi²) is an imperial and US unit of measure for an area equal to the area of a square with a side length of one statute mile. It should not be confused with miles square, which refers to a square region with each side having the specified length. For instance, 20 miles square (20 × 20 miles) has an area equal to 400 square miles; a rectangle of 10 × 40 miles likewise has an area of 400 square miles, but it is not 20 miles square. One square mile is equal to 4,014,489,600 square inches, 27,878,400 square feet or 3,097,600 square yards.
Using the Square Inches to Square Miles converter you can get answers to questions like the following:
• How many Square Miles are in 30 Square Inches?
• 30 Square Inches is equal to how many Square Miles?
• How to convert 30 Square Inches to Square Miles?
• How many is 30 Square Inches in Square Miles?
• What is 30 Square Inches in Square Miles?
• How much is 30 Square Inches in Square Miles?
• How many mi2 are in 30 in2?
• 30 in2 is equal to how many mi2?
• How to convert 30 in2 to mi2?
• How many is 30 in2 in mi2?
• What is 30 in2 in mi2?
• How much is 30 in2 in mi2?
|
{
"url": "https://whatisconvert.com/30-square-inches-in-square-miles",
"source_domain": "whatisconvert.com",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "30995",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:23BURE4Q72JZ5S2OG6YDQ25WFH3T4CBR",
"WARC-Concurrent-To": "<urn:uuid:f35dc1fd-7e70-4eea-947b-998e938cfdaa>",
"WARC-Date": "2022-05-20T07:58:24Z",
"WARC-IP-Address": "104.21.13.210",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:OUBZXYTDOU4M2PFK4JANCUHQQATVLPBO",
"WARC-Record-ID": "<urn:uuid:4b5afb1c-8faa-4ed5-832e-0b1817853380>",
"WARC-Target-URI": "https://whatisconvert.com/30-square-inches-in-square-miles",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2ca10f9d-de87-463c-a26d-ccdf91c67101>"
},
"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-190\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,
42,
43,
58,
59,
100,
101,
376,
377,
450,
451,
518,
519,
569,
570,
896,
897,
923,
924,
1293,
1294,
1320,
1321,
1916,
1917,
2020,
2021,
2072,
2128,
2181,
2231,
2277,
2327,
2359,
2396,
2430,
2461,
2488
],
"line_end_idx": [
42,
43,
58,
59,
100,
101,
376,
377,
450,
451,
518,
519,
569,
570,
896,
897,
923,
924,
1293,
1294,
1320,
1321,
1916,
1917,
2020,
2021,
2072,
2128,
2181,
2231,
2277,
2327,
2359,
2396,
2430,
2461,
2488,
2518
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2518,
"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.30215826630592346,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014388489536941051,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.26798561215400696,
"rps_doc_frac_unique_words": 0.25999999046325684,
"rps_doc_mean_word_length": 4.32444429397583,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.013886451721191,
"rps_doc_word_count": 450,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.33915725350379944,
"rps_doc_frac_chars_dupe_6grams": 0.21788284182548523,
"rps_doc_frac_chars_dupe_7grams": 0.15159301459789276,
"rps_doc_frac_chars_dupe_8grams": 0.10020554810762405,
"rps_doc_frac_chars_dupe_9grams": 0.06577595323324203,
"rps_doc_frac_chars_top_2gram": 0.12949639558792114,
"rps_doc_frac_chars_top_3gram": 0.08633094280958176,
"rps_doc_frac_chars_top_4gram": 0.05138745903968811,
"rps_doc_books_importance": -287.40130615234375,
"rps_doc_books_importance_length_correction": -287.40130615234375,
"rps_doc_openwebtext_importance": -149.14181518554688,
"rps_doc_openwebtext_importance_length_correction": -149.14181518554688,
"rps_doc_wikipedia_importance": -71.22911834716797,
"rps_doc_wikipedia_importance_length_correction": -71.22911834716797
},
"fasttext": {
"dclm": 0.15237748622894287,
"english": 0.8774802088737488,
"fineweb_edu_approx": 2.567016124725342,
"eai_general_math": 0.9910978674888611,
"eai_open_web_math": 0.8448987603187561,
"eai_web_code": 0.0007390400278382003
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "516.1",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Geometry, Algebraic"
}
},
"secondary": {
"code": "001.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Intellectual life"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "1",
"label": "Factual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,708,806,082,781,490,000 |
So my PC is dead....
Discussion in 'General Off-Topic Chat' started by Harsky, Oct 6, 2006.
Oct 6, 2006
So my PC is dead.... by Harsky at 2:15 PM (2,295 Views / 0 Likes) 22 replies
1. Harsky
OP
Member Harsky Madmin
Joined:
Aug 2, 2004
Messages:
5,291
Country:
United Kingdom
I turned on my PC and the fan was running..... but the PC is not working. Nothing. I'm trying to look on the bright side and hope that the hard drive is still okay. Now I took the HD out and am thinking of getting something like this:
http://cgi.ebay.co.uk/BRAND-NEW-USB-IDE-Ex...1QQcmdZViewItem
But if I put my HD into that, will it really show up what was on my HD (provided that it's still okay) as if it was on my old PC?
2. lookout
Member lookout GBAtemp Board Room
Joined:
Aug 16, 2006
Messages:
1,619
Location:
United Kingdom
Country:
United Kingdom
I wonder how you reply back here?.... [IMG]
if you took your hd out and the computer up to bios - your computer fine and your hd could be dead?
if you took your hd out and the computer didn't boot - your computer in poor power and your hd still alive.
3. legendofphil
Member legendofphil Phil no Densetsu
Joined:
Nov 19, 2002
Messages:
2,214
Country:
United Kingdom
It will show up as a normal drive in windows (or whatever your OS is).
All your data should be on it, unless it needs to format the drive to work, which is unlikely.
I just bought a NAS enclosure and it only works on the USB side [IMG] , so its going back.
4. shaunj66
Administrator shaunj66 Administrator
Joined:
Oct 24, 2002
Messages:
9,902
Location:
South England
Country:
United Kingdom
Make sure your hard drive is IDE before buying a IDE USB enclosure. You might need a SATA one depending on your HDD.
If you HDD failing is the reason for your PC "not working" then putting it into the enclosure won't magically resurrect it.
What is the actual problem when booting your PC? Does the computer even POST? Do you hear any beeping? (Assuming your internal speaker is connected).
5. Critical_Impact
Member Critical_Impact GBAtemp Regular
Joined:
Nov 27, 2005
Messages:
171
Location:
QLD, AUS
Country:
Australia
That should allow you to retrieve your files but it wont fix the problem if theres something wrong with the hard disk or the motherboard/cpu/ram. I dont know how experienced you are but i'd suggest taking out a stick of ram, seeing if it boots, then take out all the hard disks, then cd roms, etc untill it boots, basically try to eliminate everything.
I'd say it'd be the power supply or graphics card that has died or you could even try reseting the cmos by pulling out the cmos battery and see if that helps.
6. Harsky
OP
Member Harsky Madmin
Joined:
Aug 2, 2004
Messages:
5,291
Country:
United Kingdom
I AM POSTING THIS MESSAGE THROUGH THE POWER OF MY BRAIN! Just kidding. My wireless router is still working and I'm posting this through my laptop. Anyways, I took my HD out of the PC and turned it on..... absolutely nothing. Not even the fan is working. Although BEFORE I took the HD and I turned it on, it sounded REALLY abnormal almost the equivalent of a car engine doing trying to start up but can't. It wouldn't even boot to the bios. All I'm just trying to do at the moment is try to back up as much files onto my laptop before finally submitting it for repairs.
7. Athlon-pv
Member Athlon-pv GBAtemp Advanced Fan
Joined:
Feb 25, 2005
Messages:
621
Country:
United States
power supply fan spinning ?
If so it might be your mainboard/cpu.
If you have a manual for the atx powersupply u can (i can be mistaken so you have to double check) connect the green wire to the black (on the PSU). and turn the power on.
Have to verify (google) that the green wire is the fan (ofcourse have to disconnect it from the mainboard).
If you have a spare HD to install windows on (if you need to replace mainboard and dont have the same brand) or another computer to connect it to (on other ide connector) you can see the data.
Once you try and use windows from your old HD windows will do weird stuff [IMG] maybe someone here tried that before [IMG]
8. thieves like us
Member thieves like us chaos personified
Joined:
Jul 17, 2003
Messages:
1,057
Location:
left of the pond
Country:
United States
do you get any lights or any other indicators when attempting to power up the pc? if not, and as you stated, your psu fan is not spinning, you've probably blown the psu.
even without a harddrive, you should still be able to get the pc to power up and get into the bios screen. if you've had a recent power surge, there's a good possibility that you've damaged one or more components other than the psu, so I would be careful and as one of the other members suggested, remove unnecessary components to try and determine what is still good and what's not.
in a semi-related note:
I tossed in a new hdd last night and installed RC1 of vista. pretty nice looking with its glass-like semi-transparent window frames and the aero interface.
9. Athlon-pv
Member Athlon-pv GBAtemp Advanced Fan
Joined:
Feb 25, 2005
Messages:
621
Country:
United States
if its only the PSU thats rather cheap to replace [IMG] Make sure u get a good brand [IMG] .
Btw If mainboard or cpu is dead PSU fan wont work either [IMG] .
[IMG]
10. sandreezy
Newcomer sandreezy Advanced Member
Joined:
Jul 7, 2006
Messages:
89
Country:
United States
yeah your motherboard is fried, your PSU is brokin, or your HDD is dunzo. 1 of 3 is your problem. if your bios never came up good chance is that your mainboard is fried. your battery on your mother board does nothing but keep track of time for the system clock, and hold your bios settings, so if the battery died, your bios will still come up
and yes you will be able to back your files up with the device you linked. all that thing does is take your IDE or whatever SATA drive and turn it into a USB or firewire connection, so you can connect it to another PC as a mass stoarage device. FO SHEEZY!
11. Harsky
OP
Member Harsky Madmin
Joined:
Aug 2, 2004
Messages:
5,291
Country:
United Kingdom
On closer inspection, I realised that the reason the fan wasn't turning was because the power plug was plugged into a mains that wasn't turned on. Anyways, the problem is still the same. Fan keeps whirring in a broken engine kinda way. NO indicator lights turn on. BTW, I never thought a situation like this would get me into so much trouble with my family. Mainly my sis for the loss of MSN and mainly from my dad who assumes that because I use the PC most of the time, I have the brainpower to fix it. I can't rule out one of my dad's theory that the Netgear DG834G wireless modem router could be to blame.
12. fischju_original
Banned fischju_original I used to be a jerk before i got banned
Joined:
Jul 22, 2006
Messages:
1,014
Country:
United States
shouldnt you be posting this on like....the maximumpc.com forums? i doubt its your HDD at all, the bios would still work....if you have more than 1 stick of ram take the second out and replace it with the first, try all combinations. does it beep when starting? every pc has 1 beep if its works at startup
test your pcu outside of your pc (google it or ask at maximum pc forums while your there)
13. Psyfira
Member Psyfira Credit: 0ml. Insert tea to continue
Joined:
Dec 31, 2003
Messages:
3,887
Location:
England
Country:
United Kingdom
I know virtually nothing about hardware, but the dodgy-sounding fan makes that PSU sound a little suspect...
Much love for the wild guess debugging. [IMG] They try so hard, bless 'em. Just tell him that the router works for your laptop so it isn't broken.
14. Athlon-pv
Member Athlon-pv GBAtemp Advanced Fan
Joined:
Feb 25, 2005
Messages:
621
Country:
United States
You should do things methodicly, check which fan , your computer could have up to 4 fans or more.
Open the case see which is stumbling, CPU, PSU, VIDEOCARD, check your computer before you start it. You can see the CPU and PSU fan unless you have some stupid case ....
Some videocard fans are crap. When you pull out the videocard you should hear beeping from the mainboard if you turn it on again (does not start without it).
Dont forget solving computer hardware problems is on 1 item per try fix only , if you try todo things all at the same time you never back track the problem.
[IMG]
15. Harsky
OP
Member Harsky Madmin
Joined:
Aug 2, 2004
Messages:
5,291
Country:
United Kingdom
Well I went out and bought the IDE kit to connect my HD to the laptop and it works so it's safe to say that the problem is NOT the HD and something else. Me and my sis has pretty much teamed up and we're gonna split half the cost to buy a new PC. I think £500 would be good enough but can a decent PC be bought with that?
16. djgarf
Former Staff djgarf I Am A Raver
Joined:
Oct 24, 2002
Messages:
2,955
Location:
England U.K.
Country:
United Kingdom
if building your own pc then u will be able to have a really nice pc for £500
17. Athlon-pv
Member Athlon-pv GBAtemp Advanced Fan
Joined:
Feb 25, 2005
Messages:
621
Country:
United States
new mainboard is like really cheap to buy [IMG] , maybe ask a mate who done this before if he wouldnt mind taking a look at it , since it is obvious your to scared to look at the pc [IMG] .
18. Kyoji
Member Kyoji ウッーウッーウマ
Joined:
Apr 15, 2003
Messages:
5,474
Location:
:'(
Country:
United States
Dont buy anything right now, its a weird time. The industry is transitioning from socket 478 to LGA 775, DDR2 is becomign standard, along with PCI-e x4 and x16 slots. AGP is out, so if you have an AGP card, stay where you are. Wait until the end of the year, or early next year when Intel comes out with its Quad Core chips, then snag a Core Duo for cheap.
19. Harsky
OP
Member Harsky Madmin
Joined:
Aug 2, 2004
Messages:
5,291
Country:
United Kingdom
Well, I think it wouldn't hurt to try and gain experience in trying to fix it myself. Anyways, can someone summarise? How do I know if it's the fan or the mobo that's the culprit? The fan whirrs but the lights which normally tell when the PC is turned on or not doesn't work.
20. Kyoji
Member Kyoji ウッーウッーウマ
Joined:
Apr 15, 2003
Messages:
5,474
Location:
:'(
Country:
United States
Remove the HD, any PCI/AGP cards, disk drives etc from the mobo. Boot it up, and if it beeps, take note of how many beeps it gives you. If it doesnt beep, take the RAM out, and see if it beeps. If it still doesn't beep, your mobo is brok'd.
Share This Page
|
{
"url": "https://gbatemp.net/threads/so-my-pc-is-dead.37822/",
"source_domain": "gbatemp.net",
"snapshot_id": "crawl=CC-MAIN-2017-17",
"warc_metadata": {
"Content-Length": "108190",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:WZ65BB7BOWQTT7FIIQRLY2JYCS7D2HGI",
"WARC-Concurrent-To": "<urn:uuid:43326a19-e419-4132-885f-1975d8806673>",
"WARC-Date": "2017-04-27T20:55:06Z",
"WARC-IP-Address": "62.210.251.227",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:IKLSPJJUOAVLMHJOU7NGBS66I2QZ5YQF",
"WARC-Record-ID": "<urn:uuid:54fa3987-99d7-415a-9ce7-bfc23007258d>",
"WARC-Target-URI": "https://gbatemp.net/threads/so-my-pc-is-dead.37822/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7d984fc7-972b-44a1-9c55-cb308862eb3b>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-145-167-34.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-17\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
21,
22,
93,
94,
106,
107,
184,
185,
197,
204,
205,
230,
231,
243,
259,
273,
283,
296,
315,
554,
555,
620,
621,
755,
761,
762,
763,
776,
777,
815,
816,
828,
845,
859,
869,
883,
902,
915,
934,
983,
984,
1088,
1200,
1206,
1224,
1225,
1266,
1267,
1279,
1296,
1310,
1320,
1333,
1352,
1427,
1526,
1622,
1628,
1642,
1643,
1684,
1685,
1697,
1714,
1728,
1738,
1752,
1770,
1783,
1802,
1923,
1924,
2052,
2053,
2207,
2213,
2234,
2235,
2278,
2279,
2291,
2308,
2322,
2330,
2344,
2357,
2370,
2384,
2741,
2742,
2905,
2911,
2923,
2930,
2931,
2956,
2957,
2969,
2985,
2999,
3009,
3022,
3041,
3614,
3620,
3635,
3636,
3678,
3679,
3691,
3708,
3722,
3730,
3743,
3761,
3793,
3794,
3836,
4012,
4013,
4125,
4126,
4323,
4324,
4453,
4459,
4480,
4481,
4526,
4527,
4539,
4556,
4570,
4580,
4594,
4615,
4628,
4646,
4820,
4821,
5209,
5210,
5238,
5398,
5404,
5419,
5420,
5462,
5463,
5475,
5492,
5506,
5514,
5527,
5545,
5644,
5645,
5715,
5716,
5727,
5733,
5749,
5750,
5789,
5790,
5802,
5818,
5832,
5839,
5852,
5870,
6218,
6219,
6479,
6485,
6498,
6505,
6506,
6531,
6532,
6544,
6560,
6574,
6584,
6597,
6616,
7229,
7235,
7258,
7259,
7327,
7328,
7340,
7357,
7371,
7381,
7394,
7412,
7722,
7723,
7817,
7823,
7837,
7838,
7893,
7894,
7906,
7923,
7937,
7947,
7961,
7973,
7986,
8005,
8118,
8270,
8276,
8292,
8293,
8335,
8336,
8348,
8365,
8379,
8387,
8400,
8418,
8520,
8521,
8695,
8696,
8858,
8859,
9020,
9021,
9032,
9038,
9051,
9058,
9059,
9084,
9085,
9097,
9113,
9127,
9137,
9150,
9169,
9495,
9501,
9514,
9515,
9552,
9553,
9565,
9582,
9596,
9606,
9620,
9637,
9650,
9669,
9751,
9757,
9773,
9774,
9816,
9817,
9829,
9846,
9860,
9868,
9881,
9899,
10095,
10101,
10113,
10114,
10140,
10141,
10153,
10170,
10184,
10194,
10208,
10216,
10229,
10247,
10608,
10614,
10627,
10634,
10635,
10660,
10661,
10673,
10689,
10703,
10713,
10726,
10745,
11025,
11031,
11043,
11044,
11070,
11071,
11083,
11100,
11114,
11124,
11138,
11146,
11159,
11177,
11422,
11428,
11429
],
"line_end_idx": [
21,
22,
93,
94,
106,
107,
184,
185,
197,
204,
205,
230,
231,
243,
259,
273,
283,
296,
315,
554,
555,
620,
621,
755,
761,
762,
763,
776,
777,
815,
816,
828,
845,
859,
869,
883,
902,
915,
934,
983,
984,
1088,
1200,
1206,
1224,
1225,
1266,
1267,
1279,
1296,
1310,
1320,
1333,
1352,
1427,
1526,
1622,
1628,
1642,
1643,
1684,
1685,
1697,
1714,
1728,
1738,
1752,
1770,
1783,
1802,
1923,
1924,
2052,
2053,
2207,
2213,
2234,
2235,
2278,
2279,
2291,
2308,
2322,
2330,
2344,
2357,
2370,
2384,
2741,
2742,
2905,
2911,
2923,
2930,
2931,
2956,
2957,
2969,
2985,
2999,
3009,
3022,
3041,
3614,
3620,
3635,
3636,
3678,
3679,
3691,
3708,
3722,
3730,
3743,
3761,
3793,
3794,
3836,
4012,
4013,
4125,
4126,
4323,
4324,
4453,
4459,
4480,
4481,
4526,
4527,
4539,
4556,
4570,
4580,
4594,
4615,
4628,
4646,
4820,
4821,
5209,
5210,
5238,
5398,
5404,
5419,
5420,
5462,
5463,
5475,
5492,
5506,
5514,
5527,
5545,
5644,
5645,
5715,
5716,
5727,
5733,
5749,
5750,
5789,
5790,
5802,
5818,
5832,
5839,
5852,
5870,
6218,
6219,
6479,
6485,
6498,
6505,
6506,
6531,
6532,
6544,
6560,
6574,
6584,
6597,
6616,
7229,
7235,
7258,
7259,
7327,
7328,
7340,
7357,
7371,
7381,
7394,
7412,
7722,
7723,
7817,
7823,
7837,
7838,
7893,
7894,
7906,
7923,
7937,
7947,
7961,
7973,
7986,
8005,
8118,
8270,
8276,
8292,
8293,
8335,
8336,
8348,
8365,
8379,
8387,
8400,
8418,
8520,
8521,
8695,
8696,
8858,
8859,
9020,
9021,
9032,
9038,
9051,
9058,
9059,
9084,
9085,
9097,
9113,
9127,
9137,
9150,
9169,
9495,
9501,
9514,
9515,
9552,
9553,
9565,
9582,
9596,
9606,
9620,
9637,
9650,
9669,
9751,
9757,
9773,
9774,
9816,
9817,
9829,
9846,
9860,
9868,
9881,
9899,
10095,
10101,
10113,
10114,
10140,
10141,
10153,
10170,
10184,
10194,
10208,
10216,
10229,
10247,
10608,
10614,
10627,
10634,
10635,
10660,
10661,
10673,
10689,
10703,
10713,
10726,
10745,
11025,
11031,
11043,
11044,
11070,
11071,
11083,
11100,
11114,
11124,
11138,
11146,
11159,
11177,
11422,
11428,
11429,
11444
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11444,
"ccnet_original_nlines": 318,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3916526138782501,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05564923956990242,
"rps_doc_frac_lines_end_with_ellipsis": 0.00940439011901617,
"rps_doc_frac_no_alph_words": 0.21543002128601074,
"rps_doc_frac_unique_words": 0.31894737482070923,
"rps_doc_mean_word_length": 4.22947359085083,
"rps_doc_num_sentences": 120,
"rps_doc_symbol_to_word_ratio": 0.004215850029140711,
"rps_doc_unigram_entropy": 5.657459735870361,
"rps_doc_word_count": 1900,
"rps_doc_frac_chars_dupe_10grams": 0.10801394283771515,
"rps_doc_frac_chars_dupe_5grams": 0.12991538643836975,
"rps_doc_frac_chars_dupe_6grams": 0.11597809940576553,
"rps_doc_frac_chars_dupe_7grams": 0.11597809940576553,
"rps_doc_frac_chars_dupe_8grams": 0.11597809940576553,
"rps_doc_frac_chars_dupe_9grams": 0.11597809940576553,
"rps_doc_frac_chars_top_2gram": 0.030736679211258888,
"rps_doc_frac_chars_top_3gram": 0.024887999519705772,
"rps_doc_frac_chars_top_4gram": 0.012443999759852886,
"rps_doc_books_importance": -1096.564453125,
"rps_doc_books_importance_length_correction": -1096.564453125,
"rps_doc_openwebtext_importance": -606.0424194335938,
"rps_doc_openwebtext_importance_length_correction": -606.0424194335938,
"rps_doc_wikipedia_importance": -491.8752136230469,
"rps_doc_wikipedia_importance_length_correction": -491.8752136230469
},
"fasttext": {
"dclm": 0.03440672159194946,
"english": 0.9414536952972412,
"fineweb_edu_approx": 1.1952310800552368,
"eai_general_math": 0.012653769925236702,
"eai_open_web_math": 0.3437243103981018,
"eai_web_code": 0.0007994800107553601
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.16",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "004.019",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "5",
"label": "Comment Section"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,575,567,057,659,035,000 |
1PROPERTY(7ossl) OpenSSL PROPERTY(7ossl)
2
3
4
NAME
6 property - Properties, a selection mechanism for algorithm
7 implementations
8
DESCRIPTION
10 As of OpenSSL 3.0, a new method has been introduced to decide which of
11 multiple implementations of an algorithm will be used. The method is
12 centered around the concept of properties. Each implementation defines
13 a number of properties and when an algorithm is being selected, filters
14 based on these properties can be used to choose the most appropriate
15 implementation of the algorithm.
16
17 Properties are like variables, they are referenced by name and have a
18 value assigned.
19
20 Property Names
21 Property names fall into two categories: those reserved by the OpenSSL
22 project and user defined names. A reserved property name consists of a
23 single C-style identifier (except for leading underscores not being
24 permitted), which begins with a letter and can be followed by any
25 number of letters, numbers and underscores. Property names are case-
26 insensitive, but OpenSSL will only use lowercase letters.
27
28 A user defined property name is similar, but it must consist of two or
29 more C-style identifiers, separated by periods. The last identifier in
30 the name can be considered the 'true' property name, which is prefixed
31 by some sort of 'namespace'. Providers for example could include their
32 name in the prefix and use property names like
33
34 <provider_name>.<property_name>
35 <provider_name>.<algorithm_name>.<property_name>
36
37 Properties
38 A property is a name=value pair. A property definition is a sequence
39 of comma separated properties. There can be any number of properties
40 in a definition, however each name must be unique. For example: ""
41 defines an empty property definition (i.e., no restriction);
42 "my.foo=bar" defines a property named my.foo which has a string value
43 bar and "iteration.count=3" defines a property named iteration.count
44 which has a numeric value of 3. The full syntax for property
45 definitions appears below.
46
47 Implementations
48 Each implementation of an algorithm can define any number of
49 properties. For example, the default provider defines the property
50 provider=default for all of its algorithms. Likewise, OpenSSL's FIPS
51 provider defines provider=fips and the legacy provider defines
52 provider=legacy for all of their algorithms.
53
54 Queries
55 A property query clause is a single conditional test. For example,
56 "fips=yes", "provider!=default" or "?iteration.count=3". The first two
57 represent mandatory clauses, such clauses must match for any algorithm
58 to even be under consideration. The third clause represents an
59 optional clause. Matching such clauses is not a requirement, but any
60 additional optional match counts in favor of the algorithm. More
61 details about that in the Lookups section. A property query is a
62 sequence of comma separated property query clauses. It is an error if
63 a property name appears in more than one query clause. The full syntax
64 for property queries appears below, but the available syntactic
65 features are:
66
67= is an infix operator providing an equality test.
68
69!= is an infix operator providing an inequality test.
70
71? is a prefix operator that means that the following clause is
72 optional but preferred.
73
74- is a prefix operator that means any global query clause involving
75 the following property name should be ignored.
76
77"..." is a quoted string. The quotes are not included in the body
78 of the string.
79
80'...' is a quoted string. The quotes are not included in the body
81 of the string.
82
83 Lookups
84 When an algorithm is looked up, a property query is used to determine
85 the best matching algorithm. All mandatory query clauses must be
86 present and the implementation that additionally has the largest number
87 of matching optional query clauses will be used. If there is more than
88 one such optimal candidate, the result will be chosen from amongst
89 those in an indeterminate way. Ordering of optional clauses is not
90 significant.
91
92 Shortcut
93 In order to permit a more concise expression of boolean properties,
94 there is one short cut: a property name alone (e.g. "my.property") is
95 exactly equivalent to "my.property=yes" in both definitions and
96 queries.
97
98 Global and Local
99 Two levels of property query are supported. A context based property
100 query that applies to all fetch operations and a local property query.
101 Where both the context and local queries include a clause with the same
102 name, the local clause overrides the context clause.
103
104 It is possible for a local property query to remove a clause in the
105 context property query by preceding the property name with a '-'. For
106 example, a context property query that contains "fips=yes" would
107 normally result in implementations that have "fips=yes".
108
109 However, if the setting of the "fips" property is irrelevant to the
110 operations being performed, the local property query can include the
111 clause "-fips". Note that the local property query could not use
112 "fips=no" because that would disallow any implementations with
113 "fips=yes" rather than not caring about the setting.
114
SYNTAX
116 The lexical syntax in EBNF is given by:
117
118 Definition ::= PropertyName ( '=' Value )?
119 ( ',' PropertyName ( '=' Value )? )*
120 Query ::= PropertyQuery ( ',' PropertyQuery )*
121 PropertyQuery ::= '-' PropertyName
122 | '?'? ( PropertyName (( '=' | '!=' ) Value)?)
123 Value ::= NumberLiteral | StringLiteral
124 StringLiteral ::= QuotedString | UnquotedString
125 QuotedString ::= '"' [^"]* '"' | "'" [^']* "'"
126 UnquotedString ::= [^{space},]+
127 NumberLiteral ::= '0' ( [0-7]* | 'x' [0-9A-Fa-f]+ ) | '-'? [1-9] [0-9]+
128 PropertyName ::= [A-Z] [A-Z0-9_]* ( '.' [A-Z] [A-Z0-9_]* )*
129
HISTORY
131 Properties were added in OpenSSL 3.0
132
134 Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
135
136 Licensed under the Apache License 2.0 (the "License"). You may not use
137 this file except in compliance with the License. You can obtain a copy
138 in the file LICENSE in the source distribution or at
139 <https://www.openssl.org/source/license.html>.
140
141
142
1433.0.5 2022-07-05 PROPERTY(7ossl)
Impressum
|
{
"url": "https://manpath.be/f36/7ossl/property",
"source_domain": "manpath.be",
"snapshot_id": "crawl=CC-MAIN-2022-40",
"warc_metadata": {
"Content-Length": "20823",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:WWZAY4WUQJSEIGG344G3J5CZEQ4ER6WV",
"WARC-Concurrent-To": "<urn:uuid:c1ec795e-4870-4847-a03b-a8874925e7b9>",
"WARC-Date": "2022-10-07T06:35:36Z",
"WARC-IP-Address": "172.104.147.125",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:25FHCZ4D3TWT7YCNQYI23V6LO7IBVK46",
"WARC-Record-ID": "<urn:uuid:1fea28e2-3852-4563-915b-a3e2fbc9f211>",
"WARC-Target-URI": "https://manpath.be/f36/7ossl/property",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1c1717dd-cab1-4f78-b3f3-f14354fe83e8>"
},
"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-12\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,
80,
82,
84,
86,
87,
92,
93,
160,
184,
186,
187,
199,
200,
280,
359,
440,
521,
599,
641,
644,
723,
748,
751,
771,
851,
932,
1009,
1084,
1163,
1230,
1233,
1313,
1394,
1474,
1555,
1611,
1614,
1657,
1717,
1720,
1736,
1815,
1894,
1971,
2041,
2120,
2198,
2269,
2305,
2308,
2329,
2399,
2476,
2555,
2627,
2681,
2684,
2697,
2774,
2855,
2935,
3008,
3087,
3162,
3237,
3317,
3398,
3471,
3494,
3497,
3550,
3553,
3609,
3612,
3677,
3714,
3717,
3787,
3847,
3850,
3919,
3947,
3950,
4019,
4047,
4050,
4063,
4142,
4217,
4298,
4379,
4455,
4532,
4554,
4557,
4571,
4648,
4727,
4800,
4818,
4821,
4843,
4922,
5003,
5085,
5148,
5152,
5230,
5311,
5386,
5453,
5457,
5535,
5614,
5690,
5763,
5826,
5830,
5831,
5838,
5839,
5889,
5893,
5951,
6022,
6089,
6136,
6211,
6271,
6331,
6391,
6434,
6518,
6591,
6595,
6596,
6604,
6605,
6652,
6656,
6736,
6740,
6822,
6904,
6967,
7024,
7028,
7032,
7036,
7118
],
"line_end_idx": [
80,
82,
84,
86,
87,
92,
93,
160,
184,
186,
187,
199,
200,
280,
359,
440,
521,
599,
641,
644,
723,
748,
751,
771,
851,
932,
1009,
1084,
1163,
1230,
1233,
1313,
1394,
1474,
1555,
1611,
1614,
1657,
1717,
1720,
1736,
1815,
1894,
1971,
2041,
2120,
2198,
2269,
2305,
2308,
2329,
2399,
2476,
2555,
2627,
2681,
2684,
2697,
2774,
2855,
2935,
3008,
3087,
3162,
3237,
3317,
3398,
3471,
3494,
3497,
3550,
3553,
3609,
3612,
3677,
3714,
3717,
3787,
3847,
3850,
3919,
3947,
3950,
4019,
4047,
4050,
4063,
4142,
4217,
4298,
4379,
4455,
4532,
4554,
4557,
4571,
4648,
4727,
4800,
4818,
4821,
4843,
4922,
5003,
5085,
5148,
5152,
5230,
5311,
5386,
5453,
5457,
5535,
5614,
5690,
5763,
5826,
5830,
5831,
5838,
5839,
5889,
5893,
5951,
6022,
6089,
6136,
6211,
6271,
6331,
6391,
6434,
6518,
6591,
6595,
6596,
6604,
6605,
6652,
6656,
6736,
6740,
6822,
6904,
6967,
7024,
7028,
7032,
7036,
7118,
7127
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7127,
"ccnet_original_nlines": 150,
"rps_doc_curly_bracket": 0.00028062000637874007,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3144606053829193,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.021423110738396645,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.32211169600486755,
"rps_doc_frac_unique_words": 0.4419777989387512,
"rps_doc_mean_word_length": 4.96064567565918,
"rps_doc_num_sentences": 86,
"rps_doc_symbol_to_word_ratio": 0.0015302200336009264,
"rps_doc_unigram_entropy": 5.430817127227783,
"rps_doc_word_count": 991,
"rps_doc_frac_chars_dupe_10grams": 0.019121240824460983,
"rps_doc_frac_chars_dupe_5grams": 0.04109032079577446,
"rps_doc_frac_chars_dupe_6grams": 0.04109032079577446,
"rps_doc_frac_chars_dupe_7grams": 0.019121240824460983,
"rps_doc_frac_chars_dupe_8grams": 0.019121240824460983,
"rps_doc_frac_chars_dupe_9grams": 0.019121240824460983,
"rps_doc_frac_chars_top_2gram": 0.029088690876960754,
"rps_doc_frac_chars_top_3gram": 0.014646049588918686,
"rps_doc_frac_chars_top_4gram": 0.006916190031915903,
"rps_doc_books_importance": -617.3729858398438,
"rps_doc_books_importance_length_correction": -617.3729858398438,
"rps_doc_openwebtext_importance": -342.0311584472656,
"rps_doc_openwebtext_importance_length_correction": -342.0311584472656,
"rps_doc_wikipedia_importance": -341.0647888183594,
"rps_doc_wikipedia_importance_length_correction": -341.0647888183594
},
"fasttext": {
"dclm": 0.06962776184082031,
"english": 0.8331988453865051,
"fineweb_edu_approx": 1.7592201232910156,
"eai_general_math": 0.8020928502082825,
"eai_open_web_math": 0.16440099477767944,
"eai_web_code": 0.8917953372001648
}
}
|
{
"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.82",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,865,516,078,729,753,000 |
user3576036 user3576036 - 3 months ago 18
Ruby Question
How do I save the scraped data from Nokogiri to a rails model database?
I want to save the scraped data to the database so that I can implement search and sorting functionality on it. I tried creating a new rake task and updating attributes but for that I need to run rake fetch-data every time the data is scraped. Anyway it didnt work. Is there any other way to achieve this? I m new to rails. Any help would be much appreciated. Thank You.
app/controller
def show
url = @scrapper.url
data = Nokogiri::HTML(open(url))
@doc= data.css(".s-item-container")
end
app/views/show
<% @doc.each do |item| %>
<tr>
<td><%= item.css(".s-access-title").text %></td>
<td><%= item.css(".s-price").text %></td>
<td><%= item.css("span+ .a-text-normal").text %></td>
</tr>
<% end %>
The data I m getting
Answer
1. Create a database rake db:create
2. Crete 'Product' model rails g model Product title:string price:decimal rating:float
3. Create a rake task. Parse data and save it in the database.
doc = Nokogiri::HTML(open(@scrapper.url ))
items = doc.css(".s-item-container")
items.each do |item|
Product.create!(
title: item.css(".s-access-title").text.strip,
price: item.css(".s-price").text.to_d,
rating: item.css("span+ .a-text-normal").text.to_f)
end
to prevent duplicates
items.each do |item|
title = item.css(".s-access-title").text.strip
product = Product.find_or_initialize(title: title)
product.price = item.css(".s-price").text.to_d
product.rating = item.css("span+ .a-text-normal").text.to_f
product.save!
end
1. Get data from Product model in your controller and show it in the view
|
{
"url": "https://codedump.io/share/FIKuawRN5EkZ/1/how-do-i-save-the-scraped-data-from-nokogiri-to-a-rails-model-database",
"source_domain": "codedump.io",
"snapshot_id": "crawl=CC-MAIN-2017-09",
"warc_metadata": {
"Content-Length": "27137",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CJYOB2XUXJKDTQJQHAWQT4M7ATEVMO77",
"WARC-Concurrent-To": "<urn:uuid:fd4ab65a-b417-4d44-a133-57a32bd69152>",
"WARC-Date": "2017-02-27T04:28:19Z",
"WARC-IP-Address": "84.22.103.185",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:YH7DOS5LFWBRDBY3BYKAOCHOVDBWVIKI",
"WARC-Record-ID": "<urn:uuid:a4683de6-29f1-44d8-8cf9-f71664362d37>",
"WARC-Target-URI": "https://codedump.io/share/FIKuawRN5EkZ/1/how-do-i-save-the-scraped-data-from-nokogiri-to-a-rails-model-database",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e7261016-413d-46f2-9aa7-22cc3d150cd0>"
},
"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,
42,
56,
57,
129,
130,
501,
502,
517,
518,
527,
547,
580,
616,
620,
621,
622,
637,
638,
664,
669,
718,
760,
814,
820,
830,
831,
832,
853,
854,
861,
899,
988,
1053,
1096,
1133,
1154,
1173,
1226,
1271,
1329,
1333,
1334,
1356,
1357,
1378,
1429,
1484,
1535,
1599,
1617,
1623
],
"line_end_idx": [
42,
56,
57,
129,
130,
501,
502,
517,
518,
527,
547,
580,
616,
620,
621,
622,
637,
638,
664,
669,
718,
760,
814,
820,
830,
831,
832,
853,
854,
861,
899,
988,
1053,
1096,
1133,
1154,
1173,
1226,
1271,
1329,
1333,
1334,
1356,
1357,
1378,
1429,
1484,
1535,
1599,
1617,
1623,
1698
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1698,
"ccnet_original_nlines": 51,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1719457060098648,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.020361989736557007,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3665158450603485,
"rps_doc_frac_unique_words": 0.5707316994667053,
"rps_doc_mean_word_length": 5.795122146606445,
"rps_doc_num_sentences": 64,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.527074337005615,
"rps_doc_word_count": 205,
"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.015151520259678364,
"rps_doc_frac_chars_top_3gram": 0.02356901951134205,
"rps_doc_frac_chars_top_4gram": 0.030303029343485832,
"rps_doc_books_importance": -143.2781982421875,
"rps_doc_books_importance_length_correction": -131.1287384033203,
"rps_doc_openwebtext_importance": -100.7677001953125,
"rps_doc_openwebtext_importance_length_correction": -100.7677001953125,
"rps_doc_wikipedia_importance": -54.041236877441406,
"rps_doc_wikipedia_importance_length_correction": -44.6743278503418
},
"fasttext": {
"dclm": 0.997627317905426,
"english": 0.5180466771125793,
"fineweb_edu_approx": 1.954797387123108,
"eai_general_math": 0.6443036198616028,
"eai_open_web_math": 0.01718180999159813,
"eai_web_code": 0.7517937421798706
}
}
|
{
"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.74",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "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": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,091,826,941,726,402,000 |
What Is BTStackServer.exe? Is It A Virus Or Malware? Remove or Delete?
What is BTStackServer.exe?
BTStackServer.exe is an executable exe file which belongs to the Bluetooth Stack COM Server process which comes along with the WIDCOMM Bluetooth Software Software developed by Broadcom software developer.
If the BTStackServer.exe process in Windows 10 is important then you should be careful while deleting it. Sometimes BTStackServer.exe process might be using CPU or GPU too much. If it is malware or virus it might be running in the background.
The .exe extension of the BTStackServer.exe file specifies that it is an executable file for the Windows Operating System like Windows XP, Windows 7, Windows 8, and Windows 10.
Malware and viruses are also transmitted through exe files. So we must be sure before running any unknown executable file on our computers or laptops.
TIP: If you are facing System related issues on Windows like registry errors or files being deleted by virus or System crashes we recommend downloading PC software which scans your Windows PC for any issues and fixes them with a few steps.
Now we will check if the BTStackServer.exe file is a virus or malware? Whether it should be deleted to keep your computer safe? Read more below.
Is BTStackServer.exe safe to run? Is it a virus or malware?
Let’s check the location of this exe file to determine whether this is a legit software or a virus. The location of this file and dangerous rating is
File Location / Rating : C:Program FilesWIDCOMMBluetooth Software
To check whether the exe file is legit you can start the Task Manager. Then click on the columns field and add Verified Signer as one of the columns.
Now look at the Verified Signer value for BTStackServer.exe process if it says “Unable to verify” then the file may be a virus.
File Name BTStackServer.exe
Software Developer Broadcom
File Type
File Location C:Program FilesWIDCOMMBluetooth Software
Software WIDCOMM Bluetooth Software
Over All Ratings for BTStackServer.exe
If the developer of the software is legitimate, then it is not a virus or malware. If the developer is not listed or seems suspicious, you can remove it using the uninstall program.
Based on our analysis of whether this file is a virus or malware we have displayed our result below.
Is BTStackServer.exe A Virus or Malware: BTStackServer.exe .
How To Remove or Uninstall BTStackServer.exe
To remove BTStackServer.exe from your computer do the following steps one by one. This will uninstall BTStackServer.exe if it was part of the software installed on your computer.
1. If the file is a part of a software program, then it will also have an uninstall program. Then you can run the Uninstaller located at directory like C:Program Files>Broadcom>WIDCOMM Bluetooth Software >Bluetooth Stack COM Server> BTStackServer.exe_uninstall.exe.
2. Or the BTStackServer.exe was installed using the Windows Installer then to uninstall it Go to System Settings and open Add Or Remove Programs Option.
3. Then Search for BTStackServer.exe or the software name WIDCOMM Bluetooth Software in the search bar or try out the developer name Broadcom.
4. Then click on it and select the Uninstall Program option to remove BTStackServer.exe file from your computer. Now the software WIDCOMM Bluetooth Software program along with the file BTStackServer.exe will be removed from your computer.
Frequently Asked Questions
How do i stop BTStackServer.exe process?
In order to stop the btstackserver.exe process from running you either have to uninstall the program associated with the file or if it’s a virus or malware, remove it using a Malware and Virus removal tool.
Is BTStackServer.exe a Virus or Malware?
As per the information we have the BTStackServer.exe might be a virus or malware because even a good file might be infected with malware or virus to disguise itself. So follow our tutorial above to check it.
Is BTStackServer.exe causing High Disk Usage?
You can find this by opening the Task Manager application ( Right-click on Windows Taskbar and choose Task Manager) and click on the Disk option at the top to sort and find out the disk usage of BTStackServer.exe.
Is BTStackServer.exe causing High CPU Usage?
You can find whether BTStackServer.exe is using Full CPU by opening the Task Manager application. Now find the process and check the CPU usage percentage.
Is BTStackServer.exe causing High Network Usage?
If the BTStackServer.exe has High data Usage, you can find this by opening the Task Manager windows app and find the process and check the Network Usage column percentage.
How to check GPU Usage of BTStackServer.exe?
To check whether the BTStackServer.exe is causing high GPU usage, open the Task Manager window and look for the BTStackServer.exe process in the name column and check the GPU usage column.
I hope you were able to learn more about the BTStackServer.exe file and how to remove it. Also, share this article on social media if you found it helpful.
Let us know in the comments below if you face any other BTStackServer.exe related issues.
About The Author: Gowtham V is a tech blogger and founder of HowToDoNinja.com who is an expert in Technology & Software and writes awesome How-To Tutorials to help people online. He has 5 years of experience in creating websites and writing content. He uses a Windows PC, a Macbook Pro, and an Android phone. Check out more about our website and our writers on our About US page. Also follow me on Twitter page and Linkedin
0 comments… add one
Leave a Reply
Your email address will not be published.
|
{
"url": "https://howtodoninja.com/files/exe/btstackserver-exe/safe-virus-malware-uninstall-fix-btstackserver-exe/",
"source_domain": "howtodoninja.com",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "141179",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FRFVDH55X2H5FEMAIOO2GFTXYPUD455U",
"WARC-Concurrent-To": "<urn:uuid:f3c61dc7-6a15-4bef-8796-53a950e0b1d6>",
"WARC-Date": "2022-01-27T16:38:11Z",
"WARC-IP-Address": "104.21.25.147",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:LHCJWQE54Q5UAM4J5TGG4E2GC7XKO2RO",
"WARC-Record-ID": "<urn:uuid:1c8e907b-8c20-41ac-9c94-eef41554d5cb>",
"WARC-Target-URI": "https://howtodoninja.com/files/exe/btstackserver-exe/safe-virus-malware-uninstall-fix-btstackserver-exe/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b1e20d54-eaf3-4ca3-ac98-a40c6b3a2708>"
},
"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-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,
71,
72,
99,
100,
305,
306,
549,
550,
727,
728,
879,
880,
1120,
1121,
1266,
1267,
1327,
1328,
1478,
1479,
1545,
1546,
1696,
1697,
1825,
1826,
1854,
1882,
1892,
1947,
1983,
1984,
1986,
1987,
2026,
2027,
2209,
2210,
2311,
2312,
2373,
2374,
2419,
2420,
2599,
2600,
2868,
3023,
3168,
3409,
3410,
3437,
3438,
3479,
3480,
3687,
3688,
3729,
3730,
3938,
3939,
3985,
3986,
4200,
4201,
4246,
4247,
4402,
4403,
4452,
4453,
4625,
4626,
4671,
4672,
4861,
4862,
5018,
5019,
5109,
5110,
5534,
5535,
5555,
5556,
5570,
5571
],
"line_end_idx": [
71,
72,
99,
100,
305,
306,
549,
550,
727,
728,
879,
880,
1120,
1121,
1266,
1267,
1327,
1328,
1478,
1479,
1545,
1546,
1696,
1697,
1825,
1826,
1854,
1882,
1892,
1947,
1983,
1984,
1986,
1987,
2026,
2027,
2209,
2210,
2311,
2312,
2373,
2374,
2419,
2420,
2599,
2600,
2868,
3023,
3168,
3409,
3410,
3437,
3438,
3479,
3480,
3687,
3688,
3729,
3730,
3938,
3939,
3985,
3986,
4200,
4201,
4246,
4247,
4402,
4403,
4452,
4453,
4625,
4626,
4671,
4672,
4861,
4862,
5018,
5019,
5109,
5110,
5534,
5535,
5555,
5556,
5570,
5571,
5612
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5612,
"ccnet_original_nlines": 87,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36764705181121826,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025735290721058846,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1305147111415863,
"rps_doc_frac_unique_words": 0.31463146209716797,
"rps_doc_mean_word_length": 4.973597526550293,
"rps_doc_num_sentences": 98,
"rps_doc_symbol_to_word_ratio": 0.0009191199787892401,
"rps_doc_unigram_entropy": 4.963344573974609,
"rps_doc_word_count": 909,
"rps_doc_frac_chars_dupe_10grams": 0.018579959869384766,
"rps_doc_frac_chars_dupe_5grams": 0.07785888016223907,
"rps_doc_frac_chars_dupe_6grams": 0.07188674807548523,
"rps_doc_frac_chars_dupe_7grams": 0.018579959869384766,
"rps_doc_frac_chars_dupe_8grams": 0.018579959869384766,
"rps_doc_frac_chars_dupe_9grams": 0.018579959869384766,
"rps_doc_frac_chars_top_2gram": 0.014598540030419827,
"rps_doc_frac_chars_top_3gram": 0.015925679355859756,
"rps_doc_frac_chars_top_4gram": 0.02986064925789833,
"rps_doc_books_importance": -388.1497802734375,
"rps_doc_books_importance_length_correction": -388.1497802734375,
"rps_doc_openwebtext_importance": -331.94403076171875,
"rps_doc_openwebtext_importance_length_correction": -331.94403076171875,
"rps_doc_wikipedia_importance": -235.1058349609375,
"rps_doc_wikipedia_importance_length_correction": -235.1058349609375
},
"fasttext": {
"dclm": 0.02327132038772106,
"english": 0.818047821521759,
"fineweb_edu_approx": 2.069528579711914,
"eai_general_math": 0.020723039284348488,
"eai_open_web_math": 0.17880737781524658,
"eai_web_code": 0.010979950428009033
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.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": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,304,916,450,798,143,000 |
Cómo utilizar el tipo de datos BLOB de MySQL para almacenar imágenes con PHP en Ubuntu
Cómo utilizar el tipo de datos BLOB de MySQL para almacenar imágenes con PHP en Ubuntu
El autor seleccionó Girls Who Code para recibir una donación como parte del programa Write for DOnations. El tipo de datos de [gran objeto binario
El tipo de datos de gran objeto binario (BLOB) es un tipo de datos de MySQL que puede almacenar datos binarios como los de archivos de imagen, multimedia y PDF.
Al crear aplicaciones que requieren una base de datos estrechamente acoplada donde las imágenes deben estar sincronizadas con los datos relacionados (por ejemplo, un portal de empleados, una base de datos de estudiantes o una aplicación financiera), puede resultarle conveniente almacenar imágenes como las de fotos y firmas de pasaportes de estudiantes en una base de datos de MySQL junto con otra información relacionada.
Aquí es donde entra el tipo de datos BLOB de MySQL. Este enfoque de programación elimina la necesidad de crear un sistema de archivos independiente para almacenar imágenes. El esquema también centraliza la base de datos, haciéndola más portátil y segura porque los datos están aislados del sistema de archivos. Crear copias de seguridad también es más sencillo, ya que que puede crear un solo archivo MySQL dump que contenga todos sus datos.
La recuperación de datos es más rápida y, al crear registros, podrá estar seguro de que las reglas de validación de datos y la integridad referencial se preserven, en especial al utilizar transacciones en MySQL.
mysql php
Bootstrap 5 Complete Course with Examples
Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners
Nest.JS Tutorial for Beginners
Hello Vue 3: A First Look at Vue 3 and the Composition API
Building a simple Applications with Vue 3
Deno Crash Course: Explore Deno and Create a full REST API with Deno
How to Build a Real-time Chat App with Deno and WebSockets
Convert HTML to Markdown Online
HTML entity encoder decoder Online
Country State City Dropdown list in PHP MySQL PHP
Country state city dropdown using ajax in php. You'll learn how to populate country city state dropdown based on previous selection in php using ajax
Best MySQL DigitalOcean Performance – ScaleGrid vs. DigitalOcean Managed Databases
Compare ScaleGrid MySQL vs. DigitalOcean Managed Databases - See which offers the best MySQL throughput, latency, and pricing on DigitalOcean across workloads.
Ajax Live Data Search using jQuery PHP MySQL
ajax php live search with mysql database example. Here you will learn how to implement ajax live data search using php mysql database with example
Category Subcategory Dropdown in PHP MySQL Ajax
PHP mysql dynamic dropdown list onchange. Here, we'll show how to populate category and subcategory in dropdown list using ajax in PHP mysql
PHP Code for Update Data in MySQL Database - Tuts Make
PHP code for updating data in mysql database. Here we'll show you how to fetch and update form data into mysql database using PHP code. &demo
|
{
"url": "https://morioh.com/p/40e6a5698239",
"source_domain": "morioh.com",
"snapshot_id": "crawl=CC-MAIN-2021-10",
"warc_metadata": {
"Content-Length": "10739",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:OF4TQUPGGATYQGZUJKKIZBXMNKBUQWKM",
"WARC-Concurrent-To": "<urn:uuid:534709a6-bdb8-4aa6-84ae-bde75dc71909>",
"WARC-Date": "2021-02-28T09:45:48Z",
"WARC-IP-Address": "104.21.17.182",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:MU3E7MFAXNPNXU3OH5STNF73PWSACNAG",
"WARC-Record-ID": "<urn:uuid:67d159fc-8f9c-45b1-a9a0-fc1d3dc9dcb4>",
"WARC-Target-URI": "https://morioh.com/p/40e6a5698239",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:10c46617-6204-4126-9045-75d17f8b270b>"
},
"warc_info": "isPartOf: CC-MAIN-2021-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-227.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
87,
88,
175,
176,
323,
324,
485,
486,
910,
911,
1353,
1354,
1566,
1567,
1577,
1578,
1620,
1621,
1683,
1684,
1715,
1716,
1775,
1776,
1818,
1819,
1888,
1889,
1948,
1949,
1981,
1982,
2017,
2018,
2068,
2069,
2219,
2220,
2303,
2304,
2464,
2465,
2510,
2511,
2658,
2659,
2707,
2708,
2849,
2850,
2905,
2906
],
"line_end_idx": [
87,
88,
175,
176,
323,
324,
485,
486,
910,
911,
1353,
1354,
1566,
1567,
1577,
1578,
1620,
1621,
1683,
1684,
1715,
1716,
1775,
1776,
1818,
1819,
1888,
1889,
1948,
1949,
1981,
1982,
2017,
2018,
2068,
2069,
2219,
2220,
2303,
2304,
2464,
2465,
2510,
2511,
2658,
2659,
2707,
2708,
2849,
2850,
2905,
2906,
3047
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3047,
"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.1428571343421936,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.042124539613723755,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.09157509356737137,
"rps_doc_frac_unique_words": 0.4337349534034729,
"rps_doc_mean_word_length": 5.024096488952637,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.924840927124023,
"rps_doc_word_count": 498,
"rps_doc_frac_chars_dupe_10grams": 0.05835331976413727,
"rps_doc_frac_chars_dupe_5grams": 0.12470024079084396,
"rps_doc_frac_chars_dupe_6grams": 0.09352517873048782,
"rps_doc_frac_chars_dupe_7grams": 0.09352517873048782,
"rps_doc_frac_chars_dupe_8grams": 0.08393284678459167,
"rps_doc_frac_chars_dupe_9grams": 0.05835331976413727,
"rps_doc_frac_chars_top_2gram": 0.03357313945889473,
"rps_doc_frac_chars_top_3gram": 0.026378899812698364,
"rps_doc_frac_chars_top_4gram": 0.025979220867156982,
"rps_doc_books_importance": -232.8233184814453,
"rps_doc_books_importance_length_correction": -232.8233184814453,
"rps_doc_openwebtext_importance": -155.7015380859375,
"rps_doc_openwebtext_importance_length_correction": -155.7015380859375,
"rps_doc_wikipedia_importance": -108.32878112792969,
"rps_doc_wikipedia_importance_length_correction": -108.32878112792969
},
"fasttext": {
"dclm": 0.052302658557891846,
"english": 0.02752424031496048,
"fineweb_edu_approx": 1.5973632335662842,
"eai_general_math": 0.00016212000628001988,
"eai_open_web_math": 0.03335433825850487,
"eai_web_code": 0.8063633441925049
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.74",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "1",
"label": "Truncated Snippets"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"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": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,673,847,857,202,950,700 |
What is an Object in Java Programming?
Posted on
In the realm of Java programming, objects hold a fundamental place as building blocks that encapsulate data and behavior, allowing us to organize and manipulate information in a structured and meaningful way. Objects in Java are instances of classes, which serve as blueprints or templates for creating objects with specific attributes and methods. Think of classes as cookie cutters that shape objects just like cookies are shaped by their cutters. But unlike real-life cookie cutters, classes in Java are highly versatile, enabling the creation of objects with varying characteristics, much like different cookies can be made using the same cutter.
Objects in Java possess three distinct characteristics that define their identity and functionality:
With these fundamental characteristics, objects in Java serve as powerful tools for organizing and manipulating data, making them essential building blocks for constructing sophisticated and efficient software applications.
what is object in java programming
Objects are instances of classes.
• Encapsulate data and behavior.
• Have state and behavior.
• Created using the new keyword.
• Can interact with each other.
• Form the foundation of Java programs.
• Used to model real-world entities.
• Key concept in object-oriented programming.
In essence, objects in Java provide a structured and efficient way to organize and manipulate data, making them fundamental building blocks for constructing sophisticated software applications.
Encapsulate data and behavior.
Objects in Java are designed to encapsulate, or bundle together, both data and behavior. This concept of data and behavior being encapsulated within a single entity is a fundamental principle of object-oriented programming (OOP). Encapsulation offers numerous advantages in software development:
• Information Hiding:
Encapsulation allows you to restrict access to an object’s internal details, thereby protecting the integrity of the object’s data. By controlling access to the object’s internal state, you can prevent unintended modification or misuse of the object’s data. This concept is known as information hiding, a cornerstone of OOP that enhances security and reliability.
• Modularity and Code Reuse:
Encapsulation promotes modularity and code reuse by allowing you to create self-contained and independent units of code. Each object can be treated as a separate entity, making it easier to manage and reuse code in different parts of your program. This modular approach simplifies the development process and reduces the potential for errors.
• Improved Design and Flexibility:
Encapsulation encourages you to think in terms of well-defined and cohesive objects, leading to improved software design. By organizing your code around objects, you can create more structured and maintainable programs. Additionally, encapsulating data and behavior makes it easier to modify and extend your code in the future, enhancing the flexibility and adaptability of your software.
• Enhanced Security:
Encapsulation contributes to enhanced security by protecting sensitive data from unauthorized access. By controlling access to an object’s internal state, you can restrict the ability of other parts of the program to modify or manipulate critical data, thereby safeguarding the integrity and confidentiality of your application.
Overall, the concept of encapsulating data and behavior within objects is a fundamental pillar of object-oriented programming in Java. It promotes information hiding, enhances modularity and code reuse, improves design and flexibility, and contributes to enhanced security, ultimately leading to the development of robust, reliable, and maintainable software applications.
Have state and behavior.
Objects in Java possess two fundamental characteristics: state and behavior. State refers to the data or information that an object holds, while behavior defines the actions or operations that an object can perform.
• State:
An object’s state comprises the data or information it holds. This data can be of various types, such as integers, strings, or references to other objects. The state of an object can change over time as the object interacts with other objects and responds to events.
Behavior:
An object’s behavior refers to the actions or operations that it can perform. These actions are defined by the methods associated with the object’s class. Methods are essentially functions that are specific to an object and can be invoked to manipulate the object’s state or interact with other objects. By invoking methods, you can control the behavior of an object and influence the outcome of your program.
Data Hiding:
The state and behavior of an object are often encapsulated, meaning they are hidden from other parts of the program. This concept, known as data hiding, enhances security and modularity by restricting access to an object’s internal details. Only the methods associated with the object are allowed to modify its state, ensuring controlled and consistent manipulation of the object’s data.
Object Interaction:
Objects can interact with each other by invoking each other’s methods. This interaction allows objects to exchange information, perform calculations, and coordinate their behavior to achieve a common goal. The ability of objects to communicate and collaborate with each other is a fundamental aspect of object-oriented programming and enables the construction of complex and sophisticated software systems.
In summary, objects in Java have both state and behavior, where state refers to the data they hold and behavior encompasses the actions they can perform. Encapsulation of state and behavior enhances security and modularity, while object interaction enables the development of complex and cohesive software applications.
Leave a Reply
Your email address will not be published. Required fields are marked *
|
{
"url": "https://samanthawilson.dev/what-is-object-in-java-programming/",
"source_domain": "samanthawilson.dev",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "56901",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:OPXJBERORNEPYL3735UWC75JKAYN5ETN",
"WARC-Concurrent-To": "<urn:uuid:4fc2bf7e-f8dc-4682-8aa3-badee9febb53>",
"WARC-Date": "2024-05-29T06:18:07Z",
"WARC-IP-Address": "159.223.81.62",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:LZZ5AN65N2KW6O6VHHM5MSQQN3MYDJY2",
"WARC-Record-ID": "<urn:uuid:e2d58aec-1075-41f2-a7b3-a143a0f15489>",
"WARC-Target-URI": "https://samanthawilson.dev/what-is-object-in-java-programming/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:dc5875c7-adfe-4861-a8dc-a5f7c37061f1>"
},
"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-159\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,
39,
40,
50,
51,
702,
703,
804,
805,
1029,
1030,
1065,
1066,
1100,
1101,
1136,
1165,
1200,
1234,
1276,
1315,
1363,
1364,
1558,
1559,
1590,
1591,
1887,
1888,
1912,
1913,
2277,
2278,
2309,
2310,
2653,
2654,
2691,
2692,
3081,
3082,
3105,
3106,
3435,
3436,
3809,
3810,
3835,
3836,
4052,
4053,
4064,
4065,
4332,
4333,
4343,
4344,
4754,
4755,
4768,
4769,
5157,
5158,
5178,
5179,
5586,
5587,
5907,
5908,
5922,
5923
],
"line_end_idx": [
39,
40,
50,
51,
702,
703,
804,
805,
1029,
1030,
1065,
1066,
1100,
1101,
1136,
1165,
1200,
1234,
1276,
1315,
1363,
1364,
1558,
1559,
1590,
1591,
1887,
1888,
1912,
1913,
2277,
2278,
2309,
2310,
2653,
2654,
2691,
2692,
3081,
3082,
3105,
3106,
3435,
3436,
3809,
3810,
3835,
3836,
4052,
4053,
4064,
4065,
4332,
4333,
4343,
4344,
4754,
4755,
4768,
4769,
5157,
5158,
5178,
5179,
5586,
5587,
5907,
5908,
5922,
5923,
5993
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5993,
"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.3589494228363037,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.001945529947988689,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1342412531375885,
"rps_doc_frac_unique_words": 0.31972789764404297,
"rps_doc_mean_word_length": 5.600906848907471,
"rps_doc_num_sentences": 51,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.954968452453613,
"rps_doc_word_count": 882,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.10121457278728485,
"rps_doc_frac_chars_dupe_6grams": 0.013360319659113884,
"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.03117408975958824,
"rps_doc_frac_chars_top_3gram": 0.02125505916774273,
"rps_doc_frac_chars_top_4gram": 0.015789469704031944,
"rps_doc_books_importance": -375.07647705078125,
"rps_doc_books_importance_length_correction": -375.07647705078125,
"rps_doc_openwebtext_importance": -232.43167114257812,
"rps_doc_openwebtext_importance_length_correction": -232.43167114257812,
"rps_doc_wikipedia_importance": -211.3202667236328,
"rps_doc_wikipedia_importance_length_correction": -211.3202667236328
},
"fasttext": {
"dclm": 0.9347857236862183,
"english": 0.9100779891014099,
"fineweb_edu_approx": 3.370175361633301,
"eai_general_math": 0.40966325998306274,
"eai_open_web_math": 0.22488123178482056,
"eai_web_code": 0.5000891089439392
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,291,704,472,155,463,700 |
Simple global illumination lightmap baker with WebGL (@react-three/lightmap)
Achieving realism in a computer-rendered scene means approximating the physics of how light propagates. Accurate implementation makes a big difference: correct appearance of soft indirect light and darkened scene corners strongly makes up for lack of realism in other areas. This can enhance even many non-photorealistic graphics styles.
In an ideal world, one would directly simulate photons travelling from the light source, bouncing off object surfaces in the scene and ultimately ending up in the virtual “eye” – per each displayed frame. For today’s real-time graphics, especially in the browser, this kind of lighting computation is still too slow to do dynamically. Instead, static objects in the scene are accompanied by a precomputed lightmap that stores the amount of light received by every part of the object surface – using some variation of the “radiosity” algorithm. This brings with it many limitations and there are newer pipelines that emulate real-time global illumination very closely, but lightmaps (and their related cousin, ambient occlusion maps aka “AO maps”) will be a standard part of the graphics toolbox for a while.
This kind of computation (“lightmap baking”) is a built-in feature of many popular free 3D engines like Unity and Unreal Engine 4. However, for WebGL graphics workflows such as using ThreeJS and react-three-fiber, there is no “native” way of doing it – lightmaps are produced by one of those external engines or tools like Blender. I wanted to attempt a minimal implementation of such a lightmap baker, one that could run right in the browser, to bridge that gap for WebGL development workflow.
My baker library is built on top of ThreeJS and react-three-fiber, and uses a very simple light probe “hack” while still able to use GPU acceleration. The algorithm computes every lightmap texel by rendering the scene in five cardinal directions (away from surface, up, down, left, right) – a very simple half-cubemap light probe. The probe pixels are then averaged into a single diffuse irradiance component.
The key step is to repeat this process over several passes – this is what creates the soft indirect bounced light effect. Before each pass we set the previous pass’s output as the lightmap for our scene meshes. That allows illumination on those meshes to influence more texels in the next pass. It’s very simple but it works surprisingly well! For the purposes of computing a quick “draft” lightmap in near-real-time, it produces great results. Emissive textures on surfaces are also trivially included in the “baking” process.
3D scene shown with its auto-generated lightmap
In order to enable the “everything in the browser” philosophy I also had to add a quick-and-cheap UV unwrap implementation. Lightmaps usually can’t use meshes’ own UV coordinates because different meshes share the same lightmap UV atlas space: this is why in ThreeJS there is a separate “uv2” attribute for storing lightmap and AO coordinates. My proof-of-concept simply finds coplanar islands of triangles (i.e. surface n-gons), computes the bounding boxes in tangent space (with some heuristics for how the contents are rotated) and then lays out all those bounding boxes using the existing Potpack library. There are far more space-efficient and flexible layout approaches, of course, but this works well enough for typical small in-browser WebGL scenes.
One interesting caveat: the lightmap currently stores only the indirect radiance contributions from the scene. If e.g. a texel is lit by a single direct light and receives no indirect bounces, the lightmap value is zero: in other words, this baker expects all the lights to “stay on” after baking. This is not how typical lightmaps work – part of the point is to be able to turn off static point lights after baking is done, since that allows a huge performance speed-up on e.g. large game levels. The reason for my trade-off has been to simplify implementation (I don’t need to compute direct light contribution) and also to focus on dynamic shadowing effects on small scenes, since that is the “bread and butter” of typical WebGL work.
Finally, the baker implementation theoretically supports separate lightmap layers per light source – so different lights can be turned on and off independently, or have dynamic intensity. Then, for each frame, the layers are modulated and composited at runtime into a single visible lightmap. Even basic scene animation can be supported the same way, too – for example, when window blinds open in a room, the scene can transition from being dimly lit to being flooded with sunlight.
I also want to add an ambient occlusion render mode. Arguably, AO maps are even more useful than lightmaps for typical WebGL usage (small scenes with dynamic lights), and this baker can produce them with a few simple tweaks.
This proof-of-concept was eventually packaged as the official @react-three/lightmap module and expanded to support Suspense and other workflow niceties. The original project code is open source and available on GitHub.
|
{
"url": "https://unframework.com/portfolio/simple-global-illumination-lightmap-baker-for-threejs/",
"source_domain": "unframework.com",
"snapshot_id": "crawl=CC-MAIN-2022-21",
"warc_metadata": {
"Content-Length": "77268",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AV3CYV6IGXBRFPJUSXS2SS2BT356RMDW",
"WARC-Concurrent-To": "<urn:uuid:3cb180d4-3058-493b-b08f-741785335d84>",
"WARC-Date": "2022-05-18T23:04:23Z",
"WARC-IP-Address": "192.0.78.25",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5SNBYTNJI6I3MKYCDR4AVO5X4EZ5TQGV",
"WARC-Record-ID": "<urn:uuid:360e8075-6268-4ac9-9183-49f933102ae7>",
"WARC-Target-URI": "https://unframework.com/portfolio/simple-global-illumination-lightmap-baker-for-threejs/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:f38ed5ed-508f-453e-b862-b4b7294b8bb5>"
},
"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-169\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
77,
78,
416,
417,
1225,
1226,
1721,
1722,
2132,
2133,
2661,
2662,
2710,
2711,
3469,
3470,
4208,
4209,
4692,
4693,
4918,
4919
],
"line_end_idx": [
77,
78,
416,
417,
1225,
1226,
1721,
1722,
2132,
2133,
2661,
2662,
2710,
2711,
3469,
3470,
4208,
4209,
4692,
4693,
4918,
4919,
5137
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5137,
"ccnet_original_nlines": 22,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.38844621181488037,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01294821035116911,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15537849068641663,
"rps_doc_frac_unique_words": 0.4920828342437744,
"rps_doc_mean_word_length": 5.095005989074707,
"rps_doc_num_sentences": 40,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.488194465637207,
"rps_doc_word_count": 821,
"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.009562510065734386,
"rps_doc_frac_chars_top_3gram": 0.0064547001384198666,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -309.8584899902344,
"rps_doc_books_importance_length_correction": -309.8584899902344,
"rps_doc_openwebtext_importance": -221.02688598632812,
"rps_doc_openwebtext_importance_length_correction": -221.02688598632812,
"rps_doc_wikipedia_importance": -196.4204559326172,
"rps_doc_wikipedia_importance_length_correction": -196.4204559326172
},
"fasttext": {
"dclm": 0.06933659315109253,
"english": 0.9238916635513306,
"fineweb_edu_approx": 2.2095048427581787,
"eai_general_math": 0.8473910689353943,
"eai_open_web_math": 0.16301387548446655,
"eai_web_code": 0.6902711391448975
}
}
|
{
"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": "004.035",
"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": "4",
"label": "Missing Images or Figures"
}
},
"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": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,679,262,525,679,136,000 |
How do I completely remove a package?
Discussion in 'Installation/Configuration' started by sspitfire, Feb 27, 2012.
1. sspitfire
sspitfire New Member
Hi. I need to completely remove postfix. I tried:
apt-get remove
apt-get purge
apt-get --purge remove
but I can still see it in dpkg --get-selections and I can start postfix from /etc/init.d/
So how do I remove it completely ?
tnx
Last edited: Feb 27, 2012
2. Kozley
Kozley Member
Did you removed postfix using sudo apt-get autoremove postfix --purge?
3. sspitfire
sspitfire New Member
re
I did but it tried to replace postfix with exim and gives me this error:
So in the end postfix is still not removed.
4. cbj4074
cbj4074 Member
Not really a response, but a question: why do you want to remove Postfix in the first place?
Share This Page
|
{
"url": "https://www.howtoforge.com/community/threads/how-do-i-completely-remove-a-package.56352/",
"source_domain": "www.howtoforge.com",
"snapshot_id": "crawl=CC-MAIN-2019-22",
"warc_metadata": {
"Content-Length": "34104",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7L3LY67ART7YKZ7LL74IU4ISHZLROZQO",
"WARC-Concurrent-To": "<urn:uuid:a86e7565-e297-4549-9cf1-228f34e87d58>",
"WARC-Date": "2019-05-26T02:43:46Z",
"WARC-IP-Address": "104.24.1.68",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WQZKRWZSD2TZTGBWGXMCZFVN4KAHPX5G",
"WARC-Record-ID": "<urn:uuid:96f3d887-5ecc-42fc-9edf-a883d4b3923a>",
"WARC-Target-URI": "https://www.howtoforge.com/community/threads/how-do-i-completely-remove-a-package.56352/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a576031b-79a9-48c6-82a3-6c8814922f6b>"
},
"warc_info": "isPartOf: CC-MAIN-2019-22\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-113-197-177.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,
38,
39,
118,
119,
134,
135,
160,
161,
215,
216,
235,
253,
280,
281,
375,
376,
415,
423,
429,
459,
471,
472,
490,
491,
566,
572,
587,
588,
613,
614,
621,
622,
699,
747,
753,
766,
767,
786,
787,
884,
890,
891
],
"line_end_idx": [
38,
39,
118,
119,
134,
135,
160,
161,
215,
216,
235,
253,
280,
281,
375,
376,
415,
423,
429,
459,
471,
472,
490,
491,
566,
572,
587,
588,
613,
614,
621,
622,
699,
747,
753,
766,
767,
786,
787,
884,
890,
891,
906
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 906,
"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.3146067261695862,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03932584077119827,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2415730357170105,
"rps_doc_frac_unique_words": 0.5407407283782959,
"rps_doc_mean_word_length": 4.577777862548828,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.085273265838623,
"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.016181230545043945,
"rps_doc_frac_chars_top_3gram": 0.019417479634284973,
"rps_doc_frac_chars_top_4gram": 0.08737864345312119,
"rps_doc_books_importance": -82.17442321777344,
"rps_doc_books_importance_length_correction": -82.17442321777344,
"rps_doc_openwebtext_importance": -47.77558517456055,
"rps_doc_openwebtext_importance_length_correction": -37.93968200683594,
"rps_doc_wikipedia_importance": -40.08393096923828,
"rps_doc_wikipedia_importance_length_correction": -40.08393096923828
},
"fasttext": {
"dclm": 0.8404144048690796,
"english": 0.8504106998443604,
"fineweb_edu_approx": 1.1038953065872192,
"eai_general_math": 0.02597486972808838,
"eai_open_web_math": 0.22576361894607544,
"eai_web_code": -0.000003929999820684316
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.445",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "1",
"label": "Technically Flawed"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,294,063,099,055,198,200 |
We're updating the issue view to help you get more done.
:or defaults should refer to enclosing scope in map destructuring
Description
Michael Blume noticed that :or defaults can depend on the values of other keys, see https://groups.google.com/d/msg/clojure/6kOhpPOpHWM/ITjWwQFS_VQJ
Michael's Gist https://gist.github.com/MichaelBlume/4891dafdd31f0dcbc727 displays a case where an associative form involving :keys and :or compiles or not depending on the order of symbols in :keys. By tweaking that case one can arrive at expressions which always compile, but produce different values depending on :keys:
1 2 3 4 5 6 7 8 9 10 11 12 13 (let [foo 1 bar 2 {:keys [bar foo] :or {foo 3 bar (inc foo)}} {}] {:foo foo :bar bar}) ;= {:foo 3, :bar 4} (let [foo 1 bar 2 {:keys [foo bar] :or {foo 3 bar (inc foo)}} {}] {:foo foo :bar bar}) ;= {:foo 3, :bar 2}
I believe that the most natural solution is to demand that :or defaults be evaluated in an enclosing scope where none of the destructuring-introduced locals are present. This approach is taken by the 0001 patch.
Environment
None
Status
Assignee
Michał Marczyk
Reporter
Michał Marczyk
Labels
Approval
Triaged
Patch
Code and Test
Priority
Minor
|
{
"url": "https://clojure.atlassian.net/browse/CLJ-1613",
"source_domain": "clojure.atlassian.net",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "270394",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:X3JAVZWLYE7TINT5DTZZX5BVYL5UHNZJ",
"WARC-Concurrent-To": "<urn:uuid:9d5d85d1-d251-4ff7-953e-2dac32257058>",
"WARC-Date": "2019-08-20T18:13:06Z",
"WARC-IP-Address": "18.234.32.184",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:SJG6JPDKXZ2FONRQVEZ2ZEYBGMDHXKAD",
"WARC-Record-ID": "<urn:uuid:37e28ae6-5a2d-49d3-b186-a99257078230>",
"WARC-Target-URI": "https://clojure.atlassian.net/browse/CLJ-1613",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a72afba7-f032-4902-b36d-d3abe3b6e286>"
},
"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-36.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,
58,
59,
125,
126,
138,
139,
288,
289,
611,
612,
856,
857,
1069,
1070,
1082,
1083,
1088,
1089,
1096,
1097,
1106,
1107,
1122,
1123,
1132,
1133,
1148,
1149,
1156,
1157,
1166,
1167,
1175,
1176,
1182,
1183,
1197,
1198,
1207,
1208
],
"line_end_idx": [
58,
59,
125,
126,
138,
139,
288,
289,
611,
612,
856,
857,
1069,
1070,
1082,
1083,
1088,
1089,
1096,
1097,
1106,
1107,
1122,
1123,
1132,
1133,
1148,
1149,
1156,
1157,
1166,
1167,
1175,
1176,
1182,
1183,
1197,
1198,
1207,
1208,
1213
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1213,
"ccnet_original_nlines": 40,
"rps_doc_curly_bracket": 0.016488049179315567,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.25912410020828247,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0036496398970484734,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.32846716046333313,
"rps_doc_frac_unique_words": 0.5833333134651184,
"rps_doc_mean_word_length": 4.729166507720947,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.394193172454834,
"rps_doc_word_count": 192,
"rps_doc_frac_chars_dupe_10grams": 0.07488986849784851,
"rps_doc_frac_chars_dupe_5grams": 0.1079295203089714,
"rps_doc_frac_chars_dupe_6grams": 0.1079295203089714,
"rps_doc_frac_chars_dupe_7grams": 0.07488986849784851,
"rps_doc_frac_chars_dupe_8grams": 0.07488986849784851,
"rps_doc_frac_chars_dupe_9grams": 0.07488986849784851,
"rps_doc_frac_chars_top_2gram": 0.017621150240302086,
"rps_doc_frac_chars_top_3gram": 0.03083699941635132,
"rps_doc_frac_chars_top_4gram": 0.022026430815458298,
"rps_doc_books_importance": -113.78854370117188,
"rps_doc_books_importance_length_correction": -113.78854370117188,
"rps_doc_openwebtext_importance": -74.48407745361328,
"rps_doc_openwebtext_importance_length_correction": -74.48373413085938,
"rps_doc_wikipedia_importance": -41.97964859008789,
"rps_doc_wikipedia_importance_length_correction": -41.97964859008789
},
"fasttext": {
"dclm": 0.14226925373077393,
"english": 0.7772486209869385,
"fineweb_edu_approx": 1.031348705291748,
"eai_general_math": 0.3910994529724121,
"eai_open_web_math": 0.5123596787452698,
"eai_web_code": 0.46999138593673706
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-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": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,916,093,534,594,627,000 |
Trending Games | World of Warcraft | Final Fantasy XIV: A Realm Reborn | EverQuest | Guild Wars 2
Network: FPSguru RTSguru
Login: Password: Remember?
Show Quick Gamelist Jump to Random Game
Members:2,905,837 Users Online:0
Games:757 Posts:6,296,744
Aventurine SA | Official Site
MMORPG | Genre:Fantasy | Status:Final (rel 04/16/13) | Pub:Aventurine SA
PVP:Yes | Distribution:Download | Retail Price:$14.95 | Pay Type:Subscription
System Req: PC | Out of date info? Let us know!
9 posts found
User Deleted
OP 9/29/12 9:35:45 PM#1
Some interesting discussions have come up in threads about local/regional/global banking. Related to keeping your stuff and moving, is the issues of travel -- for example, the desireability of insta-travel, modifiying travel options along with banking changes to create the need for caravans, etc.
Since I didn't see it in the "What we know about DFUW" thread OP, what do we know about AV's thinking on travel for DFUW?
What are your thoughts on the best travel options (with regard to the banking issue, as well as the rest of the game)? What are the pros and cons of insta-travel?
reacaer
Novice Member
Joined: 9/22/12
Posts: 19
9/30/12 6:53:50 PM#2
It all depends on how high the population of the server will be.
If its going to be as high as DF1 launch or better istant travel could be happyfully removed from the game: you would be busy fighting your neighbours and wouldnt mind about a war roaring on the other side of the map.
No instant-travel and regional banking would be great. Carovans and trades would gain more depth and risk.
This would require a really high populated server tho! The action should be available for anyone looking for it in a reasonable ammount of time - not talking about an istant respawn deathmatch, but not even a game where you have to travel half an hour to find a fight.
With DF:UW "private" instant travel will be removed big allies wont be able to build networks on their own and everyone will have access to the same teleportation services. Its a good thing, it wont matter if you're in a big or a small guild you still can move. The teleportation areas will be PvP hotspots and strategic points and opefully there wont be many of them (one for each island, maybe 3 for the main land..?).
Maybe they could open these portals only at certain hours for a brief ammount of time or something to make things more interesting..
xpiher
Advanced Member
Joined: 8/22/08
Posts: 3304
9/30/12 10:27:55 PM#3
AV should have kept their dungeon portal system. The original concept was to have dungons be an "express travel network" while also allowing dungone crawling. The risk for travel is kept because you could potentially die while in the dungeon, but the benifit of saving time and not being in the open world would make it worth it to many. However, since the dungeons aren't instanced and various routes would be popular, people would end up camping them. Thus, the Risk/Reward for this is maintain.
Games:
Currently playing:Nothing
Will play: Darkfall: Unholy Wars
Past games:
Guild Wars 2 - Xpiher Duminous
Xpiher's GW2
GW 1 - Xpiher Duminous
Darkfall - Xpiher Duminous (NA) retired
AoC - Xpiher (Tyranny) retired
Warhammer - Xpiher
Murdus
Apprentice Member
Joined: 3/05/07
Posts: 704
we own the sky
10/01/12 8:56:48 PM#4
I think as was stated that it really depends on the population of the game. In a highly populated server it would be awesome to have local banking and very few teleportation options. Realistically however it won't probably be like that, and I would prefer it to be global banking.
In terms of teleportation I think no matter the instance it should very limited. Porting all over the map has its obvious advantages in terms of seeing a lot of action in one sitting, which is probably the goal for a lot of people that will be playing this game, Darkfall veterans and newcomers.
Personally I would like to see it be non-existent and make the world feel very large and open.
It doesn't matter what I really have to say however, since Aventurine is going to make this game as they please. I just hope that it's populated enough for a local banking/no tele system to work, if that's their gameplan at all.
gravesworn
Novice Member
Joined: 6/15/12
Posts: 325
10/03/12 3:37:19 PM#5
Teleporting in df 1 requires portal shards and certain amount of control or alliance over the destination portal. The portal system as is in DF is still not an end all be all of travel. If there was a cap on how many clans or guilds you could ally with at once, it might make it more difficult for zerg hopping....i dunno. Just pondering.
sunny_lifton
Novice Member
Joined: 8/12/06
Posts: 23
10/03/12 3:46:16 PM#6
I think the portals between holdings was junk...it allowed big clans to have access to the whole world without traveling. It also meant that 6 of their 7 holdings were completely empty and smaller clans that could actually populate the holding (and defend against pvp) could not gain control of it.
Topherpunch
Novice Member
Joined: 9/08/12
Posts: 87
10/03/12 4:02:59 PM#7
Like I have heard so many times, the makers are huge UO fans. I am sure they could implement a travel system with runes and just give the spell a cooldown. That way you could get anywhere as long as you had been there before and you had a rune to bring you back there.
Not only that, after some time the travel system would grow because the floating number of runes around the server from other players. Just a thought. I always thought UO had a really good travel system.
Come check out what I have to say on my blog http://civilgamer.com
Also check out http;//agonasylum.com for Darkfall player trading and stories forums
gravesworn
Novice Member
Joined: 6/15/12
Posts: 325
10/03/12 5:41:52 PM#8
Not having quick travel would work if the population was large enough for regioan wars, or for caravans and supply routes were viable forms of play styles. However as the population drastically decreased in the first game, it became more of a hassle to hoove it.
ChaosChest
Novice Member
Joined: 11/06/09
Posts: 91
10/04/12 4:31:35 PM#9
Originally posted by Topherpunch
Like I have heard so many times, the makers are huge UO fans. I am sure they could implement a travel system with runes and just give the spell a cooldown. That way you could get anywhere as long as you had been there before and you had a rune to bring you back there.
Not only that, after some time the travel system would grow because the floating number of runes around the server from other players. Just a thought. I always thought UO had a really good travel system.
They already have a rune system in the game. And it works exactly how it workd in UO.. except.. you cannot craft runes, you cannot buy runes from npcs.. You can only loot them from mobs.. AND they are only 1 use per rune then they disappear from the game.
It also takes about 4 minutes to mark a rune in a location.. While this is ok if your marking inside of an enemys holding.. because it gives the enemy time to counter and attack you .. it is VERY annoying and waste of time if you want to mark some runes anywhere else. 4minutes of doing nothing x how many runes you want to mark. isnt "fun" to anyone.
Also they would need to increase the amount of times each rune can be recalled to. right now it is 1 time. A simple change to 4times would do wonders to the annoying travel that is involved in darkfall.
Most people horde all blank runes and use them for siegeing.. because traveling is so time consuming and isnt fun. especially when you travel on the land and see miles of NOTHIGNNESS, no mobs, no players, nothing. just empty worthless space.
Insta travel is fine. it just needs to be tweaked.
|
{
"url": "http://www.mmorpg.com/gamelist.cfm/game/875/view/forums/post/5337816",
"source_domain": "www.mmorpg.com",
"snapshot_id": "crawl=CC-MAIN-2014-49",
"warc_metadata": {
"Content-Length": "110077",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:5NUXPWCJGSYABNBZPM23I64H226JXPK4",
"WARC-Concurrent-To": "<urn:uuid:9f1b6fa4-bf01-4373-8f84-884cfb36a12e>",
"WARC-Date": "2014-11-29T01:35:18Z",
"WARC-IP-Address": "216.168.135.100",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:EOVOAZIWZLNPGABQP4NMCVI7W53KKIBG",
"WARC-Record-ID": "<urn:uuid:176eb6e1-5743-4bab-999c-0c90fffc805a>",
"WARC-Target-URI": "http://www.mmorpg.com/gamelist.cfm/game/875/view/forums/post/5337816",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2b35f317-9eb2-43c6-9f88-6aa84a280126>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-235-23-156.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-49\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for November 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,
98,
99,
127,
159,
199,
232,
259,
289,
364,
442,
490,
491,
505,
520,
522,
547,
548,
846,
847,
849,
850,
972,
973,
975,
976,
1139,
1140,
1142,
1143,
1145,
1146,
1148,
1149,
1151,
1152,
1162,
1163,
1177,
1178,
1194,
1204,
1205,
1226,
1227,
1292,
1293,
1511,
1512,
1619,
1620,
1889,
1890,
2311,
2312,
2445,
2446,
2455,
2456,
2472,
2473,
2489,
2501,
2502,
2524,
3023,
3024,
3025,
3032,
3058,
3091,
3103,
3134,
3147,
3170,
3210,
3241,
3260,
3261,
3270,
3271,
3289,
3290,
3306,
3317,
3318,
3333,
3334,
3356,
3357,
3638,
3639,
3935,
3936,
4031,
4032,
4261,
4262,
4275,
4276,
4290,
4291,
4307,
4318,
4319,
4341,
4680,
4695,
4696,
4710,
4711,
4727,
4737,
4738,
4760,
5060,
5074,
5075,
5089,
5090,
5106,
5116,
5117,
5139,
5140,
5409,
5410,
5614,
5615,
5616,
5683,
5684,
5768,
5769,
5782,
5783,
5797,
5798,
5814,
5825,
5826,
5848,
6111,
6124,
6125,
6139,
6140,
6157,
6167,
6168,
6190,
6223,
6224,
6493,
6494,
6698,
6699,
6701,
6702,
6959,
6960,
7313,
7314,
7518,
7519,
7761,
7762,
7764,
7765,
7816,
7817
],
"line_end_idx": [
98,
99,
127,
159,
199,
232,
259,
289,
364,
442,
490,
491,
505,
520,
522,
547,
548,
846,
847,
849,
850,
972,
973,
975,
976,
1139,
1140,
1142,
1143,
1145,
1146,
1148,
1149,
1151,
1152,
1162,
1163,
1177,
1178,
1194,
1204,
1205,
1226,
1227,
1292,
1293,
1511,
1512,
1619,
1620,
1889,
1890,
2311,
2312,
2445,
2446,
2455,
2456,
2472,
2473,
2489,
2501,
2502,
2524,
3023,
3024,
3025,
3032,
3058,
3091,
3103,
3134,
3147,
3170,
3210,
3241,
3260,
3261,
3270,
3271,
3289,
3290,
3306,
3317,
3318,
3333,
3334,
3356,
3357,
3638,
3639,
3935,
3936,
4031,
4032,
4261,
4262,
4275,
4276,
4290,
4291,
4307,
4318,
4319,
4341,
4680,
4695,
4696,
4710,
4711,
4727,
4737,
4738,
4760,
5060,
5074,
5075,
5089,
5090,
5106,
5116,
5117,
5139,
5140,
5409,
5410,
5614,
5615,
5616,
5683,
5684,
5768,
5769,
5782,
5783,
5797,
5798,
5814,
5825,
5826,
5848,
6111,
6124,
6125,
6139,
6140,
6157,
6167,
6168,
6190,
6223,
6224,
6493,
6494,
6698,
6699,
6701,
6702,
6959,
6960,
7313,
7314,
7518,
7519,
7761,
7762,
7764,
7765,
7816,
7817,
7818
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7818,
"ccnet_original_nlines": 170,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.38885629177093506,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.031085040420293808,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.22697946429252625,
"rps_doc_frac_unique_words": 0.4043510854244232,
"rps_doc_mean_word_length": 4.53788423538208,
"rps_doc_num_sentences": 77,
"rps_doc_symbol_to_word_ratio": 0.006451610010117292,
"rps_doc_unigram_entropy": 5.654398441314697,
"rps_doc_word_count": 1333,
"rps_doc_frac_chars_dupe_10grams": 0.12365680187940598,
"rps_doc_frac_chars_dupe_5grams": 0.13919655978679657,
"rps_doc_frac_chars_dupe_6grams": 0.13919655978679657,
"rps_doc_frac_chars_dupe_7grams": 0.13919655978679657,
"rps_doc_frac_chars_dupe_8grams": 0.13919655978679657,
"rps_doc_frac_chars_dupe_9grams": 0.12365680187940598,
"rps_doc_frac_chars_top_2gram": 0.015870390459895134,
"rps_doc_frac_chars_top_3gram": 0.01785418950021267,
"rps_doc_frac_chars_top_4gram": 0.00595139991492033,
"rps_doc_books_importance": -516.4397583007812,
"rps_doc_books_importance_length_correction": -516.4397583007812,
"rps_doc_openwebtext_importance": -340.3172302246094,
"rps_doc_openwebtext_importance_length_correction": -340.3172302246094,
"rps_doc_wikipedia_importance": -277.86614990234375,
"rps_doc_wikipedia_importance_length_correction": -277.86614990234375
},
"fasttext": {
"dclm": 0.3561856746673584,
"english": 0.9597291946411133,
"fineweb_edu_approx": 1.4294850826263428,
"eai_general_math": 0.10360758751630783,
"eai_open_web_math": 0.23767602443695068,
"eai_web_code": 0.003849690081551671
}
}
|
{
"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": "794.8",
"labels": {
"level_1": "Arts",
"level_2": "Amusements and Recreation",
"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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,056,546,718,538,903,000 |
scala.xml.dtd
ContentModelParser
object ContentModelParser extends Scanner
Parser for regexps (content models in DTD element declarations)
Source
ContentModelParser.scala
Linear Supertypes
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. ContentModelParser
2. Scanner
3. TokenTests
4. Tokens
5. AnyRef
6. Any
1. Hide All
2. Show all
Learn more about member selection
Visibility
1. Public
2. All
Value Members
1. final def !=(arg0: AnyRef): Boolean
Definition Classes
AnyRef
2. final def !=(arg0: Any): Boolean
Test two objects for inequality.
Test two objects for inequality.
returns
true if !(this == that), false otherwise.
Definition Classes
Any
3. final def ##(): Int
Equivalent to x.hashCode except for boxed numeric types and null.
Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.
returns
a hash value consistent with ==
Definition Classes
AnyRef → Any
4. final def ==(arg0: AnyRef): Boolean
Definition Classes
AnyRef
5. final def ==(arg0: Any): Boolean
Test two objects for equality.
Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).
returns
true if the receiver object is equivalent to the argument; false otherwise.
Definition Classes
Any
6. final val CHOICE: Int(9)
Definition Classes
Tokens
7. final val COMMA: Int(5)
Definition Classes
Tokens
8. final val END: Int(10)
Definition Classes
Tokens
9. final val ENDCH: Char('\00')
Definition Classes
Scanner
10. final val LPAREN: Int(3)
Definition Classes
Tokens
11. final val NAME: Int(1)
Definition Classes
Tokens
12. final val OPT: Int(8)
Definition Classes
Tokens
13. final val PLUS: Int(7)
Definition Classes
Tokens
14. final val RPAREN: Int(4)
Definition Classes
Tokens
15. final val S: Int(13)
Definition Classes
Tokens
16. final val STAR: Int(6)
Definition Classes
Tokens
17. final val TOKEN_PCDATA: Int(0)
Definition Classes
Tokens
18. final def acc(d: Char): Unit
Definition Classes
Scanner
19. final def accS(ds: Seq[Char]): Unit
Definition Classes
Scanner
20. def accept(tok: Int): Unit
21. final def asInstanceOf[T0]: T0
Cast the receiver object to be of type T0.
Cast the receiver object to be of type T0.
Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.
returns
the receiver object.
Definition Classes
Any
Exceptions thrown
ClassCastException
if the receiver object is not an instance of the erasure of type T0.
22. def atom: ContentModel.Letter
23. def checkPubID(s: String): Boolean
Definition Classes
TokenTests
24. def checkSysID(s: String): Boolean
Definition Classes
TokenTests
25. def choiceRest(p: ContentModel.RegExp): ContentModel.Alt
26. def clone(): AnyRef
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone method is platform dependent.
returns
a copy of the receiver object.
Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
Note
not specified by SLS as a member of AnyRef
27. def contentspec: ContentModel
28. final def eq(arg0: AnyRef): Boolean
Tests whether the argument (arg0) is a reference to the receiver object (this).
Tests whether the argument (arg0) is a reference to the receiver object (this).
The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:
• It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
• For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
• null.eq(null) returns true.
When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).
returns
true if the argument is a reference to the receiver object; false otherwise.
Definition Classes
AnyRef
29. def equals(arg0: Any): Boolean
The equality method for reference types.
The equality method for reference types. Default implementation delegates to eq.
See also equals in scala.Any.
returns
true if the receiver object is equivalent to the argument; false otherwise.
Definition Classes
AnyRef → Any
30. def finalize(): Unit
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.
Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
Note
not specified by SLS as a member of AnyRef
31. final def getClass(): Class[_]
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
returns
a representation that corresponds to the dynamic class of the receiver object.
Definition Classes
AnyRef → Any
Note
not specified by SLS as a member of AnyRef
32. def hashCode(): Int
The hashCode method for reference types.
The hashCode method for reference types. See hashCode in scala.Any.
returns
the hash code value for this object.
Definition Classes
AnyRef → Any
33. final def initScanner(s: String): Unit
initializes the scanner on input s
initializes the scanner on input s
Definition Classes
Scanner
34. def isAlpha(c: Char): Boolean
These are 99% sure to be redundant but refactoring on the safe side.
These are 99% sure to be redundant but refactoring on the safe side.
Definition Classes
TokenTests
35. def isAlphaDigit(c: Char): Boolean
Definition Classes
TokenTests
36. final def isIdentChar: Boolean
Definition Classes
Scanner
37. final def isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is T0.
Test whether the dynamic type of the receiver object is T0.
Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.
returns
true if the receiver object is an instance of erasure of type T0; false otherwise.
Definition Classes
Any
38. def isName(s: String): Boolean
Name ::= ( Letter | '_' ) (NameChar)*
See [5] of XML 1.0 specification.
Definition Classes
TokenTests
39. def isNameChar(c: Char): Boolean
Definition Classes
TokenTests
40. def isNameStart(c: Char): Boolean
Definition Classes
TokenTests
41. def isPubIDChar(ch: Char): Boolean
Definition Classes
TokenTests
42. final def isSpace(cs: Seq[Char]): Boolean
(#x20 | #x9 | #xD | #xA)+
Definition Classes
TokenTests
43. final def isSpace(ch: Char): Boolean
(#x20 | #x9 | #xD | #xA)
Definition Classes
TokenTests
44. def isValidIANAEncoding(ianaEncoding: Seq[Char]): Boolean
Returns true if the encoding name is a valid IANA encoding.
Returns true if the encoding name is a valid IANA encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an IANA encoding name.
ianaEncoding
The IANA encoding name.
Definition Classes
TokenTests
45. def maybeSuffix(s: ContentModel.RegExp): ContentModel.RegExp
46. final def name: Int
Definition Classes
Scanner
47. final def ne(arg0: AnyRef): Boolean
Equivalent to !(this eq that).
Equivalent to !(this eq that).
returns
true if the argument is not a reference to the receiver object; false otherwise.
Definition Classes
AnyRef
48. final def next(): Unit
Definition Classes
Scanner
49. final def nextToken(): Unit
scans the next token
scans the next token
Definition Classes
Scanner
50. final def notify(): Unit
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
Definition Classes
AnyRef
Note
not specified by SLS as a member of AnyRef
51. final def notifyAll(): Unit
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
Definition Classes
AnyRef
Note
not specified by SLS as a member of AnyRef
52. def parse(s: String): ContentModel
parses the argument to a regexp
53. def particle: ContentModel.RegExp
54. final def readToken: Int
Definition Classes
Scanner
55. def regexp: ContentModel.RegExp
56. def sOpt(): Unit
57. def seqRest(p: ContentModel.RegExp): ContentModel.RegExp
58. final def synchronized[T0](arg0: ⇒ T0): T0
Definition Classes
AnyRef
59. def toString(): String
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
returns
a String representation of the object.
Definition Classes
AnyRef → Any
60. var token: Int
Definition Classes
Scanner
61. final def token2string(i: Int): String
Definition Classes
Tokens
62. var value: String
Definition Classes
Scanner
63. final def wait(): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
64. final def wait(arg0: Long, arg1: Int): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
65. final def wait(arg0: Long): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
Inherited from Scanner
Inherited from TokenTests
Inherited from Tokens
Inherited from AnyRef
Inherited from Any
Ungrouped
|
{
"url": "https://scala-lang.org/files/archive/api/2.10.5/scala/xml/dtd/ContentModelParser$.html",
"source_domain": "scala-lang.org",
"snapshot_id": "crawl=CC-MAIN-2019-51",
"warc_metadata": {
"Content-Length": "69609",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:JPCQYVCNR4LBYUT2I5ST4TK7GRVIX3NV",
"WARC-Concurrent-To": "<urn:uuid:9624a75a-78e6-4ab9-9ff6-14358ad330f5>",
"WARC-Date": "2019-12-05T14:24:36Z",
"WARC-IP-Address": "128.178.154.159",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IGZYLUJASEWJEEM6ZPKGF6OKR3Z57DQA",
"WARC-Record-ID": "<urn:uuid:3c7f8dd3-55bb-477f-9c42-252ec0ec9d25>",
"WARC-Target-URI": "https://scala-lang.org/files/archive/api/2.10.5/scala/xml/dtd/ContentModelParser$.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4736ac8f-af40-4f66-bf12-90282cc8ca04>"
},
"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-133.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,
14,
15,
34,
35,
77,
78,
142,
143,
150,
175,
193,
202,
218,
238,
248,
272,
285,
301,
313,
325,
334,
348,
362,
396,
407,
419,
428,
429,
443,
444,
485,
486,
509,
520,
558,
559,
596,
597,
634,
635,
647,
648,
694,
695,
718,
726,
751,
752,
822,
823,
1155,
1156,
1168,
1169,
1205,
1206,
1229,
1246,
1287,
1288,
1311,
1322,
1360,
1361,
1396,
1397,
1523,
1524,
1536,
1537,
1617,
1618,
1641,
1649,
1679,
1680,
1703,
1714,
1743,
1744,
1767,
1778,
1806,
1807,
1830,
1841,
1875,
1876,
1899,
1911,
1942,
1943,
1966,
1977,
2006,
2007,
2030,
2041,
2069,
2070,
2093,
2104,
2133,
2134,
2157,
2168,
2199,
2200,
2223,
2234,
2261,
2262,
2285,
2296,
2325,
2326,
2349,
2360,
2397,
2398,
2421,
2432,
2467,
2468,
2491,
2503,
2545,
2546,
2569,
2581,
2614,
2615,
2652,
2653,
2700,
2701,
2748,
2749,
3161,
3162,
3174,
3175,
3200,
3201,
3224,
3232,
3254,
3277,
3278,
3351,
3352,
3388,
3389,
3430,
3431,
3454,
3469,
3510,
3511,
3534,
3549,
3612,
3613,
3639,
3640,
3682,
3683,
3725,
3726,
3800,
3801,
3813,
3814,
3849,
3850,
3865,
3890,
3913,
3924,
3940,
3959,
3968,
3969,
4016,
4017,
4053,
4054,
4096,
4097,
4181,
4182,
4266,
4267,
4390,
4391,
4555,
4646,
4680,
4681,
5000,
5001,
5013,
5014,
5095,
5096,
5119,
5130,
5167,
5168,
5213,
5214,
5299,
5300,
5334,
5335,
5347,
5348,
5428,
5429,
5452,
5469,
5496,
5497,
5605,
5606,
5714,
5715,
5888,
5889,
5904,
5929,
5952,
5963,
5979,
6023,
6032,
6033,
6080,
6081,
6118,
6119,
6202,
6203,
6286,
6287,
6347,
6348,
6360,
6361,
6444,
6445,
6468,
6485,
6494,
6495,
6542,
6543,
6569,
6570,
6615,
6616,
6688,
6689,
6701,
6702,
6743,
6744,
6767,
6784,
6829,
6830,
6869,
6870,
6909,
6910,
6933,
6945,
6981,
6982,
7055,
7056,
7129,
7130,
7153,
7168,
7209,
7210,
7233,
7248,
7285,
7286,
7309,
7321,
7363,
7364,
7428,
7429,
7493,
7494,
7879,
7880,
7892,
7893,
7980,
7981,
8004,
8012,
8049,
8050,
8092,
8093,
8131,
8132,
8155,
8170,
8209,
8210,
8233,
8248,
8288,
8289,
8312,
8327,
8368,
8369,
8392,
8407,
8455,
8456,
8486,
8509,
8524,
8567,
8568,
8597,
8620,
8635,
8699,
8700,
8764,
8765,
8972,
8973,
8990,
8991,
9019,
9020,
9043,
9058,
9125,
9126,
9152,
9153,
9176,
9188,
9230,
9231,
9266,
9267,
9302,
9303,
9315,
9316,
9401,
9402,
9425,
9436,
9465,
9466,
9489,
9501,
9535,
9536,
9561,
9562,
9587,
9588,
9611,
9623,
9654,
9655,
9734,
9735,
9814,
9815,
9838,
9849,
9858,
9859,
9906,
9907,
9941,
9942,
10018,
10019,
10095,
10096,
10119,
10130,
10139,
10140,
10187,
10188,
10229,
10230,
10266,
10267,
10307,
10308,
10339,
10340,
10363,
10375,
10413,
10414,
10437,
10438,
10501,
10502,
10551,
10552,
10575,
10586,
10615,
10616,
10668,
10669,
10882,
10883,
10895,
10896,
10939,
10940,
10963,
10980,
11001,
11002,
11025,
11037,
11082,
11083,
11106,
11117,
11141,
11142,
11165,
11177,
11206,
11207,
11230,
11241,
11257,
11276,
11326,
11327,
11350,
11361,
11377,
11396,
11435,
11436,
11459,
11470,
11486,
11505,
11506,
11529,
11530,
11556,
11557,
11579,
11580,
11602,
11603,
11622,
11623
],
"line_end_idx": [
14,
15,
34,
35,
77,
78,
142,
143,
150,
175,
193,
202,
218,
238,
248,
272,
285,
301,
313,
325,
334,
348,
362,
396,
407,
419,
428,
429,
443,
444,
485,
486,
509,
520,
558,
559,
596,
597,
634,
635,
647,
648,
694,
695,
718,
726,
751,
752,
822,
823,
1155,
1156,
1168,
1169,
1205,
1206,
1229,
1246,
1287,
1288,
1311,
1322,
1360,
1361,
1396,
1397,
1523,
1524,
1536,
1537,
1617,
1618,
1641,
1649,
1679,
1680,
1703,
1714,
1743,
1744,
1767,
1778,
1806,
1807,
1830,
1841,
1875,
1876,
1899,
1911,
1942,
1943,
1966,
1977,
2006,
2007,
2030,
2041,
2069,
2070,
2093,
2104,
2133,
2134,
2157,
2168,
2199,
2200,
2223,
2234,
2261,
2262,
2285,
2296,
2325,
2326,
2349,
2360,
2397,
2398,
2421,
2432,
2467,
2468,
2491,
2503,
2545,
2546,
2569,
2581,
2614,
2615,
2652,
2653,
2700,
2701,
2748,
2749,
3161,
3162,
3174,
3175,
3200,
3201,
3224,
3232,
3254,
3277,
3278,
3351,
3352,
3388,
3389,
3430,
3431,
3454,
3469,
3510,
3511,
3534,
3549,
3612,
3613,
3639,
3640,
3682,
3683,
3725,
3726,
3800,
3801,
3813,
3814,
3849,
3850,
3865,
3890,
3913,
3924,
3940,
3959,
3968,
3969,
4016,
4017,
4053,
4054,
4096,
4097,
4181,
4182,
4266,
4267,
4390,
4391,
4555,
4646,
4680,
4681,
5000,
5001,
5013,
5014,
5095,
5096,
5119,
5130,
5167,
5168,
5213,
5214,
5299,
5300,
5334,
5335,
5347,
5348,
5428,
5429,
5452,
5469,
5496,
5497,
5605,
5606,
5714,
5715,
5888,
5889,
5904,
5929,
5952,
5963,
5979,
6023,
6032,
6033,
6080,
6081,
6118,
6119,
6202,
6203,
6286,
6287,
6347,
6348,
6360,
6361,
6444,
6445,
6468,
6485,
6494,
6495,
6542,
6543,
6569,
6570,
6615,
6616,
6688,
6689,
6701,
6702,
6743,
6744,
6767,
6784,
6829,
6830,
6869,
6870,
6909,
6910,
6933,
6945,
6981,
6982,
7055,
7056,
7129,
7130,
7153,
7168,
7209,
7210,
7233,
7248,
7285,
7286,
7309,
7321,
7363,
7364,
7428,
7429,
7493,
7494,
7879,
7880,
7892,
7893,
7980,
7981,
8004,
8012,
8049,
8050,
8092,
8093,
8131,
8132,
8155,
8170,
8209,
8210,
8233,
8248,
8288,
8289,
8312,
8327,
8368,
8369,
8392,
8407,
8455,
8456,
8486,
8509,
8524,
8567,
8568,
8597,
8620,
8635,
8699,
8700,
8764,
8765,
8972,
8973,
8990,
8991,
9019,
9020,
9043,
9058,
9125,
9126,
9152,
9153,
9176,
9188,
9230,
9231,
9266,
9267,
9302,
9303,
9315,
9316,
9401,
9402,
9425,
9436,
9465,
9466,
9489,
9501,
9535,
9536,
9561,
9562,
9587,
9588,
9611,
9623,
9654,
9655,
9734,
9735,
9814,
9815,
9838,
9849,
9858,
9859,
9906,
9907,
9941,
9942,
10018,
10019,
10095,
10096,
10119,
10130,
10139,
10140,
10187,
10188,
10229,
10230,
10266,
10267,
10307,
10308,
10339,
10340,
10363,
10375,
10413,
10414,
10437,
10438,
10501,
10502,
10551,
10552,
10575,
10586,
10615,
10616,
10668,
10669,
10882,
10883,
10895,
10896,
10939,
10940,
10963,
10980,
11001,
11002,
11025,
11037,
11082,
11083,
11106,
11117,
11141,
11142,
11165,
11177,
11206,
11207,
11230,
11241,
11257,
11276,
11326,
11327,
11350,
11361,
11377,
11396,
11435,
11436,
11459,
11470,
11486,
11505,
11506,
11529,
11530,
11556,
11557,
11579,
11580,
11602,
11603,
11622,
11623,
11632
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11632,
"ccnet_original_nlines": 476,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.23545965552330017,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017354600131511688,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.27345216274261475,
"rps_doc_frac_unique_words": 0.2570876181125641,
"rps_doc_mean_word_length": 5.333763122558594,
"rps_doc_num_sentences": 191,
"rps_doc_symbol_to_word_ratio": 0.0075046899728477,
"rps_doc_unigram_entropy": 5.115743637084961,
"rps_doc_word_count": 1552,
"rps_doc_frac_chars_dupe_10grams": 0.24063783884048462,
"rps_doc_frac_chars_dupe_5grams": 0.4498671293258667,
"rps_doc_frac_chars_dupe_6grams": 0.3813723027706146,
"rps_doc_frac_chars_dupe_7grams": 0.3218168616294861,
"rps_doc_frac_chars_dupe_8grams": 0.2846098244190216,
"rps_doc_frac_chars_dupe_9grams": 0.25006040930747986,
"rps_doc_frac_chars_top_2gram": 0.11294998973608017,
"rps_doc_frac_chars_top_3gram": 0.04312635958194733,
"rps_doc_frac_chars_top_4gram": 0.01836192049086094,
"rps_doc_books_importance": -844.7915649414062,
"rps_doc_books_importance_length_correction": -844.7915649414062,
"rps_doc_openwebtext_importance": -435.10235595703125,
"rps_doc_openwebtext_importance_length_correction": -435.10235595703125,
"rps_doc_wikipedia_importance": -530.8314819335938,
"rps_doc_wikipedia_importance_length_correction": -530.8314819335938
},
"fasttext": {
"dclm": 0.04896610975265503,
"english": 0.6697719693183899,
"fineweb_edu_approx": 2.0437660217285156,
"eai_general_math": 0.2869377136230469,
"eai_open_web_math": 0.08550810813903809,
"eai_web_code": 0.11056839674711227
}
}
|
{
"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.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": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,561,131,553,282,164,000 |
Preparar un entorno de trabajo con wmctrl
wmctrl es un programa que nos va a ayudar a generar un entorno de trabajo en el que usamos una serie de aplicaciones de forma habitual con un layout concreto.
El ejemplo siguiente funciona sobre Gnome 3 que genera de forma dinámica los escritorios virtuales (workspaces) por lo que habrá que jugar también con el comando sleep para darle tiempo a crear nuevos workspaces.
En el ejemplo se creará un entorno con una terminal, el IDE de programación Pida, un navegador, dos ventanas y Rhythmbox para escuchar música.
#!/bin/bash
# primer escritorio
wmctrl -s 0
pida &
iceweasel &
terminator --working-directory=/home/javi/Escritorio/PFC -l pfc &
sleep 5s
wmctrl -x -F -r "terminator.Terminator" -e 0,842,0,1078,1080
wmctrl -x -F -r "pida.Pida" -e 0,0,0,840,1047
wmctrl -x -F -r "Navigator.Iceweasel" -e 0,1920,369,1280,742
wmctrl -r "Iceweasel" -t 0
#segundo escritorio
nautilus /home/javi/Escritorio/PFC &
sleep 2s;
wmctrl -F -r "PFC" -e 0,2150,330,871,638
wmctrl -F -r "PFC" -t 1
#tercer escritorio
nautilus /home/javi/Escritorio/PFC/Documentación &
sleep 2s;
wmctrl -r "Documentación" -e 0,2150,330,871,638
wmctrl -r "Documentación" -t 2
#cuarto escritorio
rhythmbox &
sleep 3s;
wmctrl -xF -r "rhythmbox.Rhythmbox" -e 0,1920,369,1280,742
wmctrl -xF -r "rhythmbox.Rhythmbox" -t 3
exit 0
Como se puede ver hay que dejar tiempos de espera con sleep para que haya tiempo para lanzarse la aplicación o crearse el workspace virtual por parte de Gnome 3.
En algunos casos se ha usado el parámetro -x la ventana usando la clase del programa cuando el programa sustituye su nombre en el título de la ventana por otro texto (caso Pida). En otros se ha usado -r que busca dicha cadena en el título de la ventana.
El parametro -F obliga a buscar estrictamente la cadena (case sensitive)
Por último, este script se puede guardar en un directorio del path como ~/bin para poder ejecutarlo fácilmente usando Alt+F2 en Gnome.
Anuncios
Abrir y cerrar el acceso desde el exterior por SSH usando gtalk
En la Raspberry Pi recibo diariamente desde China varios cientos de intento de acceso al servicio SSH. Aprovechando el post anterior vamos a modificar algo el script external para hacer que el acceso a SSH desde el exterior esté abierto o cerrado a voluntad. Indicaremos con una orden vía gtalk a Raspberry Pi que abra o cierre el puerto, algo similar a lo que se haría con port-knocking.
En external añadimos las siguientes líneas:
ssh.abre)
/usr/local/bin/ssh.abre;
;;
ssh.cierra)
/usr/local/bin/ssh.cierra;
;;
Enviando los comandos ssh.cierra y ssh.abre se añadirá o eliminará una regla en Iptables. Para esto hace falta crear un par de scripts que irán en /usr/local/bin
ssh.abre:
#!/bin/sh
# ssh.abre por ratoncio
sudo iptables -I INPUT -p tcp --dport 22 -j ACCEPT
echo "Abierto el acceso por SSH";
ssh.cierra:
#!/bin/sh
# ssh.cierra por ratoncio
num=$(sudo iptables -L -n --line-numbers|grep "tcp dpt:22"|awk '{print $1}')
/usr/local/bin/iptables.remove "$num";
echo "Cerrando el acceso exterior por SSH";
Ahora se puede indicar a Raspberry cuando queremos acceder desde el exterior de nuestra red local por SSH.
Control de raspberry usando gtalk
El objetivo es enviar comandos y recibir información de la raspberry pi usando gtalk.
Para esto usaremos centerim; un programa que permite mediante consola conectarse a varios servicios de IM como gtalk. Para dejar este programa en segundo plano emplearemos screen.
Por defecto RaspBMC tiene las preferencias de apt-get configuradas para que instale los paquete extras. Debido a esto se produce una instalación de 250MB y que para colmo rompe el servicio XBMC. Para evitar esto se edita el fichero /etc/apt/apt.conf y se añaden las líneas:
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Tras esto instalamos:
apt-get install centerim screen
Una vez instalado se ejecuta centerim con el usuario que se usará para arrancarse normalmente. En mi caso, pi.
En la opción jab se rellenan las opciones de la cuenta gmail que usaremos para la Raspberry. Una vez hecho esto se creará una estructura de directorios que se podrá editar:
home/pi/.centerim/
En el fichero config tendremos que tener algo similar a esto:
jab_nick [email protected]
jab_pass contraseña
jab_server talk.google.com:5223
jab_osinfo 1
jab_prio 4
jab_ssl 1
Para arrancar el sistema automaticamente se añade la siguiente línea a /etc/rc.local
su pi -c 'screen -dmS centerim /usr/bin/centerim'
Ahora configuraremos el fichero external que está en el directorio .centerim
El siguiente ejemplo es el mío que realiza varias acciones:
%action Remote control
event msg
proto all
status all
options stdin stdout
%exec
#!/bin/sh
# script de mayordomo gtalk-raspberry pi por ratoncio
ENTRADA=`cat`;
# el comando se fuerza a minusculas para evitar problemas con las mayusculas automaticas de los moviles
COMANDO=`echo $ENTRADA|awk '{print $1}'|tr '[:upper:]' '[:lower:]'`;
RESTO=`echo $ENTRADA|awk -F "$COMANDO " '{print $2}'`;
if [ $CONTACT_NICK = [email protected] ]; then
case $COMANDO in
df) df -h;;
uptime) uptime;;
vmstat) vmstat;;
who) w;;
mem) free -m;;
dmesg)
dmesg |tail -n 20
echo "----";
echo "Fin dmesg";
;;
apunta|nota)
echo "Apunto esto: $RESTO";
echo "$RESTO" >> /home/pi/notasRTN;
;;
notas)
#cat /home/pi/notasRTN;
echo;
i=1;while read linea;do echo "$i: $linea";i=`echo $i +1|bc`;done</home/pi/notasRTN;
echo "----";
echo "No hay mas notas";
;;
borranota)
sed "$RESTO"d /home/pi/notasRTN > /tmp/notasRTN.tmp;
mv /tmp/notasRTN.tmp /home/pi/notasRTN;
rm /tmp/notasRTN.tmp;
echo "Borrada nota $RESTO";
;;
diag)
/opt/vc/bin/vcgencmd measure_temp;
/opt/vc/bin/vcgencmd measure_volts;
;;
torrent)
echo "torrent (start|stop|status)";
/etc/init.d/transmission-daemon $RESTO;
;;
hora)
echo "Son las `date +%H:%M:%S`";
;;
biblioteca)
echo "biblioteca (start|stop)";
/home/pi/calibre-server $RESTO;
;;
ayuda|help)
echo "Soy Ratoncio, tu asistente electronico. Los comandos validos son:";
echo ;
echo "df";
echo "uptime";
echo "vmstat";
echo "who";
echo "dmesg";
echo "agenda";
echo "apunta";
echo "notas";
echo "borranota";
echo "servicios";
echo "diag";
echo "torrent";
echo "hora";
echo "biblioteca (start|stop)";
echo "ayuda";
;;
*)
echo "Has dicho: $ENTRADA";
echo "----";
echo "Lo siento, no entiendo tu pregunta. Prueba con 'ayuda'.";
;;
esac
fi;
Convertir comics en formato pdf a formato cbz
Para una visión más cómoda. Con este sencillo script que requiere poppler-utils
# pdf2cbz: Conversor de formato para comics por ratoncio
#!/bin/bash
for i in *.pdf;do
echo "************";
echo "$i";
echo "************";
mkdir "${i%.pdf}";
pdfimages -j "$i" "${i%.pdf}"/0;
zip -r "${i%.pdf}".cbz "${i%.pdf}";
rm -rf "${i%.pdf}";
done
El siguiente para convertir de cbr a cbz
# cbr2cbz: Conversor de formato para comics por ratoncio
#!/bin/bash
for i in *.cbr;do
echo "************";
echo "$i";
echo "************";
mkdir "${i%.cbr}";
unrar e "$i" "${i%.cbr}";
zip -r "${i%.cbr}".cbz "${i%.cbr}";
rm -rf "${i%.cbr}";
done
Enviar Pop-ups informativos a XBMC
Esto nos permitirá sacar Pop-ups en la interfaz de XBMC. Realmente sencillo usando la interfaz que nos proporciona XBMC (JSON-RPC API). Lo colocaremos en /usr/local/bin para acceso general.
Vamos con el script en cuestión: msgtoxbmc
# msgtoxbmc: script para enviar pop ups a XBMC por ratoncio
#!/bin/bash
# procesado del pipe
case "$#" in
0)
mensaje=`cat`
;;
*)
mensaje="$@"
;;
esac;
# codigo envio
mensajeenviar=`echo $mensaje|sed 's/\ /\%20/g'`
titulo="Informacion%20de%20Ratoncio"
wget -qO- "http://192.168.1.124:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22$titulo%22,%22message%22:%22$mensajeenviar%22},%22id%22:1}" &> /dev/null
#habla "`echo $mensaje|sed 's/\%20/\\ /g'`"
exit 0;
La invocación, sencilla, por parámetros o usando pipe:
• msgtoxbmc mensaje de prueba
• echo mensaje de prueba|msgtoxbmc
Si en el script se descomenta la línea penúltima (habla) se oiría el mensaje por la TV (usando el script habla del post anterior)
Síntesis de voz en Raspberry Pi con RaspBMC
Algo muy sencillo de lograr y que nos permitirá jugar un poco.
Los pasos son los siguientes:
Instalar espeak y alsa utils
aptitude update
aptitude install espeak alsa-utils
La salida de audio por defecto con RaspBMC es por HDMI pero es necesario cargar el módulo snd_bcm2835. Lo añadimos al fichero /etc/modules
Ahora, en las opciones de salida de audio de XBMC hay que poner que el dispositivo de audio este activo siempre. Por defecto sólo está activo un minuto con lo que no nos funcionaría más que la primera vez.
Para facilitar las cosas hacemos un pequeño script en bash (habla)que pondremos en /usr/local/bin para acceso general con los permisos necesarios.
#!/bin/bash
# Script para sintesis voz por consola por ratoncio
case "$#" in
0)
cat|espeak -ves > /dev/null 2>&1
;;
*)
echo "$@"|espeak -ves > /dev/null 2>&1
;;
esac
exit 0;
El script se puede invocar con parámetros o pipe:
• habla hola que tal
• echo hola que tal | habla
• Actualización: debido a un error en el paquete espeak se puede usar este script alternativo:
#!/bin/bash
# Script para sintesis voz por consola por ratoncio
FILE="/tmp/habla-$RANDOM.wav"
case "$#" in
0)
cat|espeak -ves -w $FILE
;;
*)
echo "$@"|espeak -ves -w $FILE
;;
esac
play -q "$FILE" >/dev/null 2>&1
rm "$FILE";
exit 0;
Para que funcione es necesario instalar sox
apt-get install sox
Servidor completo usando Raspberry Pi
Introducción y objetivos
El objetivo de este post es crear un completo servidor casero que permita gestionar varios servicios usando una Raspberry Pi. Este servidor se conectará a la televisión de casa mediante el puerto HDMI y a internet mediante el router y nos permitirá entre otras cosas:
• Gestionar desde el móvil la descarga de contenidos vía torrent.
• La reproducción vídeo y audio en la TV de casa usando el móvil como control.
• Streaming de vídeo y audio a cualquier dispositivo que se conecte a la red de casa; DLNA
• La gestión de una biblioteca electrónica de libros y comics permitiendo su acceso fácil a ella a dispositivos móviles tipo tablets o libros electrónicos.
• Descarga automática de capítulos de series
Raspberry Pi es un pequeño ordenador basado en arquitectura ARM con grandes posibilidades que corre un sistema basado en GNU/Linux.
Los servicios básicos que queremos tener son los siguientes:
• Apache: servidor web para servir de interfaz de varios de los servicios.
• Calibre: para la gestión de una biblioteca electrónica.
• Transmission: para la descarga de torrents.
• XBMC: para disponer de un completo entorno multimedia.
• sickbeard: para la descarga automática de capítulos de una serie.
En mis pruebas he utilizado dos distribuciones diferentes de Linux adaptadas a Raspberry Pi ambas basadas en Debian: Raspbian y Raspmc. Debido a los problemas que supone la instalación de XBMC en Raspbian es recomendable usar Raspbmc.
Hardware para el sistema
Tras haber realizado varias pruebas voy a usar el siguiente hardware:
• Una Raspberry Pi
• Un adaptador de red inalámbrica USB para la conexión al router
• Un cable HDMI para la conexión a la TV
• Una tarjeta SD para instalar el arranque del sistema operativo de la Raspberry Pi
• Una memoria USB para la instalación del sistema operativo
• Un disco duro externo para el almacenamiento de los datos (vídeo, audio, etc)
Uno de los pasos claves del proceso es el separar el arranque del sistema operativo del resto del SO en lugar de instalar ambos en una tarjeta SD como es el procedimiento estándar. En mi experiencia, el uso de torrents hace que el número de escrituras sobre la tarjeta SD la corrompa rápidamente. El uso de una memoria USB mejora el rendimiento y evita este problema. Una opción es particionar el disco duro externo para instalar en él el sistema operativo de la Raspberry Pi y también los datos.
Sobre Raspbmc y su instalación
Raspbmc es una distribución de Linux basada en debian. Su gran ventaja es que viene ya preparada con una instalación funcional de XBMC lo que simplifica en gran medida los quebraderos de cabeza que suponen instalar este programa.Hay varias formas de instalar Raspbmc en una tarjeta SD. El método que recomiendo es descargar el script python install.py de http://www.raspbmc.com/wiki/user/os-x-linux-installation/ y seguir las instrucciones.
Este método facilita mucho la instalación de raspbmc y nos llevaría a tener instalado Raspbmc en la tarjeta SD, sin embargo, se va a mover el SO a un USB para usar sólo la SD como arranque (/boot). La instalación del sistema en el USB es tan simple como introducir una memoria USB en el momento de arrancar por primera vez la Raspberry Pi.
Instalación y configuración de software adicional
Vía apt se instalará transmission, apache y calibre
apt-get update
apt-get install transmission-daemon apache2 calibre
Se cambia el nombre de host
vi /etc/hostname
mihost
vi /etc/hosts
se sustituye raspbmc por mihost mihost.noip.me en el loopback 127.0.1.1
Configuración de apache2
En la ruta /etc/apache2/sites-available se editará el fichero default
vi /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory /var/www/ficheros/>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
<Directory /var/www/biblioteca/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
#para calibre y transmission
RewriteEngine on
ProxyPass /descargas/ http://localhost:9999/descargas/
ProxyPass /descargas http://localhost:9999/descargas
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</VirtualHost>
Se habilitan los mods de apache necesarios para hacer rewrite, necesario para poder redirigir a distintos puertos calibre y transmission desde apache.
a2enmod proxy rewrite proxy_http
Se crea la estructura web en /var/www
Se crea un directorio en /var/www/biblioteca con usuario y grupo www-data
Configuración de calibre
En la ruta /home/pi se crea un script calibre-server que permitirá lanzar y parar calibre en modo server. Calibre correrá en un puerto al que se redirigirá desde la página web que servimos con apache.
#!/bin/bash
export LANG=es_ES.UTF-8
if [ $# -eq 1 ];then
case $1 in
start)
calibre-server --with-library=/media/Almacen/biblioteca/ --daemonize --port 10001 --url-prefix /biblioteca ;
echo "La biblioteca esta abierta";
;;
stop)
#killall calibre-server;
kill -9 `ps -fea|grep calibre-server|grep -v grep|awk '{print $2}'`;
echo "La biblioteca esta cerrada";
;;
status)
RESUL=`ps aux|grep -v grep|grep "calibre-server"|wc -l`;
if [ $RESUL -eq 0 ];then
echo "La biblioteca esta cerrada";
else
echo "La biblioteca esta abierta";
fi;
;;
*)
echo "Opciones: start|stop"
;;
esac;
fi;
El control de acceso se hace mediante un fichero .htaccess que se encuentra en /var/www/biblioteca con este contenido:
AuthUserFile /home/pi/pass-htaccess-apache
AuthType Basic
AuthName "Haz login"
Require user javi mariola
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://localhost:10001/biblioteca/$1 [proxy]
Se puede ver que el script lanza en modo daemon calibre en el puerto 10001 con la ruta que hayamos configurado con la biblioteca. Al acceder vía web a la ruta mihost.noip.me/biblioteca se nos redirigirá al server corriendo en el puerto 10001 con calibre.
Configuración de transmission-daemon
Para emplear torrents se configurará transmission-daemon.
Se edita el fichero /var/lib/transmission-daemon/info/settings.json (es un enlace a /etc/transmission-daemon/settings.json). Para que este fichero se edite correctamente el servidor transmission debe estar parado así:
service transmission-daemon stop
{
"alt-speed-down": 50,
"alt-speed-enabled": true,
"alt-speed-time-begin": 420,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": true,
"alt-speed-time-end": 0,
"alt-speed-up": 10,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/media/Almacen/transmission-daemon/downloads",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 12,
"encryption": 0,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/media/Almacen/transmission-daemon/incomplete",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 300,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "contraseniaservicio",
"rpc-port": 9999,
"rpc-url": "/descargas/",
"rpc-username": "descargas",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/var/lib/transmission-daemon/script/avisaTorrent",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 350,
"speed-limit-down-enabled": false,
"speed-limit-up": 20,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/media/Almacen/transmission-daemon/blackhole",
"watch-dir-enabled": true
}
A continuación se edita el fichero /etc/init.d/transmission-daemon y se indica en USER que el usuario será pi
Y se hace chown -R pi:pi /var/lib/transmission-daemon/* y chown pi:pi /etc/transmission-daemon/settings.json
Configuración de NFS
Hacer que cargue nfs en el arranque.
apt-get install nfs-kernel-server
update-rc.d rpcbind defaults
update-rc.d nfs-common defaults
update-rc.d nfs-kernel-server defaults
Se definen los exports
/media/Almacen *(ro,sync,no_subtree_check,insecure,all_squash,anonuid=0,anongid=0)
Se refrescan los exports
exportfs -ra
Configuración Sickbeard
sudo apt-get install git-core
git clone git://github.com/echel0n/SickBeard-TVRage.git /var/local/sickbeard
cd /var/local/sickbeard
python SickBeard.py -d
Sickbeard arranca en el puerto 8081. En un navegador entramos en dicha dirección y seleccionamos config y general.
Desactivar Launch Browser pues el acceso será web.
En web interface se puede configurar un user, passwd y nuevo puerto. Solo cambiaré el puerto por otro (20001) pues la autenticación la hago con htacess
En search providers se chequean los gratuitos sin cuenta ( NZBs, Sick Beard y Womble)
En post processing se quita la opción de keep original files y se marcan las move associated files y rename episodes. En name pattern seleccionamos “s02e03 – Ep Name”
En metadata seleccionamos XBMC (12+ pues la versión de Raspbmc equivale a la 12 o superior) y chequeamos los metadatos (todos menos los season all)
En config notifications seleccionamos XBMC y chequeamos notify on download, update library, introducimos la ip y el puerto (192.168.1.124:1234)
En search options, torrent search activamos la búsqueda de torrents, el método blackhole y definimos una ruta para el directorio blackhole (/media/Almacen/transmission-daemon/blackhole)
Ya se puede trabajar seleccionando add existing shows si ya tenemos parte de la serie descargada o add shows si aún no.
|
{
"url": "https://ratoncio.wordpress.com/",
"source_domain": "ratoncio.wordpress.com",
"snapshot_id": "crawl=CC-MAIN-2018-05",
"warc_metadata": {
"Content-Length": "72746",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZUF6JHNBLOCMDWLLBMGZ7YIW5WI34SCG",
"WARC-Concurrent-To": "<urn:uuid:3a22f4be-c3d3-4746-b649-59a439475973>",
"WARC-Date": "2018-01-18T01:29:10Z",
"WARC-IP-Address": "192.0.78.13",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:NBFQ5S5FJUS6ZCX2YO6U7XWHJDW45OR5",
"WARC-Record-ID": "<urn:uuid:113b33f2-1d2b-480c-bd3f-b3814a7b7300>",
"WARC-Target-URI": "https://ratoncio.wordpress.com/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fd84b97d-f286-48dc-9405-d156801737ec>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-181-179-14.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,
42,
43,
202,
203,
416,
417,
560,
561,
573,
593,
605,
612,
624,
690,
699,
760,
806,
867,
894,
895,
915,
952,
963,
1005,
1029,
1030,
1049,
1100,
1111,
1160,
1191,
1192,
1211,
1223,
1234,
1293,
1334,
1341,
1342,
1504,
1758,
1831,
1832,
1967,
1968,
1977,
1978,
2042,
2043,
2432,
2433,
2477,
2478,
2488,
2518,
2525,
2537,
2568,
2574,
2575,
2737,
2747,
2748,
2758,
2782,
2833,
2867,
2868,
2880,
2881,
2891,
2917,
2994,
3033,
3077,
3078,
3185,
3186,
3220,
3221,
3307,
3487,
3488,
3762,
3763,
3792,
3819,
3820,
3842,
3843,
3875,
3876,
3987,
4160,
4179,
4241,
4242,
4286,
4309,
4342,
4356,
4370,
4384,
4385,
4470,
4471,
4521,
4522,
4599,
4659,
4660,
4691,
4711,
4731,
4751,
4780,
4781,
4787,
4797,
4851,
4866,
4970,
5039,
5094,
5163,
5180,
5200,
5225,
5250,
5267,
5290,
5305,
5335,
5368,
5398,
5409,
5430,
5470,
5518,
5529,
5544,
5580,
5598,
5694,
5719,
5756,
5771,
5790,
5855,
5907,
5941,
5981,
5992,
6006,
6053,
6101,
6112,
6129,
6177,
6229,
6240,
6251,
6296,
6307,
6327,
6371,
6415,
6426,
6446,
6532,
6551,
6574,
6601,
6628,
6652,
6678,
6705,
6732,
6758,
6788,
6812,
6831,
6853,
6872,
6910,
6936,
6947,
6958,
6992,
7011,
7081,
7092,
7101,
7105,
7106,
7152,
7153,
7233,
7234,
7291,
7303,
7321,
7342,
7353,
7374,
7393,
7426,
7462,
7482,
7487,
7488,
7529,
7530,
7587,
7599,
7617,
7638,
7649,
7670,
7689,
7715,
7751,
7771,
7776,
7777,
7812,
7813,
8003,
8004,
8047,
8048,
8108,
8120,
8141,
8154,
8157,
8179,
8182,
8185,
8206,
8209,
8215,
8230,
8278,
8315,
8535,
8579,
8587,
8588,
8643,
8644,
8676,
8713,
8714,
8844,
8845,
8889,
8890,
8953,
8983,
9012,
9013,
9029,
9064,
9065,
9204,
9205,
9411,
9412,
9559,
9560,
9572,
9624,
9625,
9638,
9641,
9682,
9685,
9688,
9735,
9738,
9743,
9751,
9752,
9802,
9803,
9826,
9856,
9953,
9954,
9970,
10026,
10060,
10077,
10088,
10126,
10141,
10152,
10196,
10211,
10220,
10256,
10272,
10284,
10289,
10290,
10338,
10339,
10363,
10368,
10369,
10411,
10412,
10441,
10442,
10714,
10715,
10785,
10868,
10963,
11123,
11172,
11173,
11309,
11310,
11375,
11376,
11455,
11517,
11567,
11628,
11700,
11701,
11940,
11941,
11970,
11971,
12045,
12046,
12069,
12138,
12183,
12271,
12335,
12419,
12420,
12921,
12922,
12957,
12958,
13403,
13747,
13748,
13802,
13803,
13859,
13860,
13879,
13935,
13940,
13941,
13973,
13974,
13995,
14006,
14024,
14100,
14105,
14106,
14135,
14136,
14210,
14254,
14255,
14278,
14324,
14329,
14363,
14389,
14432,
14471,
14496,
14530,
14592,
14631,
14668,
14703,
14728,
14771,
14833,
14878,
14915,
14950,
14975,
15020,
15082,
15120,
15157,
15192,
15217,
15222,
15274,
15317,
15356,
15427,
15464,
15499,
15524,
15529,
15578,
15583,
15662,
15690,
15716,
15721,
15781,
15786,
15827,
15856,
15861,
15928,
15993,
16038,
16077,
16096,
16101,
16102,
16257,
16258,
16295,
16300,
16301,
16343,
16421,
16422,
16451,
16452,
16657,
16658,
16674,
16702,
16727,
16742,
16753,
16866,
16905,
16912,
16922,
16951,
17024,
17063,
17070,
17082,
17143,
17172,
17211,
17220,
17259,
17267,
17274,
17281,
17313,
17320,
17330,
17338,
17343,
17344,
17467,
17468,
17515,
17534,
17559,
17589,
17617,
17638,
17704,
17709,
17710,
17969,
17970,
18011,
18012,
18074,
18075,
18297,
18298,
18335,
18336,
18342,
18372,
18407,
18444,
18479,
18519,
18552,
18580,
18620,
18655,
18691,
18752,
18780,
18809,
18881,
18912,
18949,
18989,
19024,
19049,
19083,
19128,
19203,
19244,
19274,
19307,
19335,
19376,
19410,
19448,
19476,
19516,
19555,
19599,
19637,
19666,
19707,
19735,
19766,
19805,
19842,
19868,
19906,
19944,
19989,
20028,
20057,
20104,
20130,
20164,
20201,
20239,
20279,
20324,
20416,
20453,
20484,
20517,
20560,
20590,
20630,
20668,
20715,
20736,
20765,
20800,
20840,
20869,
20938,
20972,
20977,
20983,
20988,
20993,
20994,
21108,
21109,
21222,
21223,
21248,
21249,
21290,
21291,
21329,
21362,
21398,
21441,
21446,
21447,
21474,
21475,
21562,
21567,
21568,
21597,
21614,
21615,
21643,
21644,
21678,
21759,
21787,
21814,
21819,
21820,
21939,
21994,
22150,
22240,
22411,
22563,
22711,
22901
],
"line_end_idx": [
42,
43,
202,
203,
416,
417,
560,
561,
573,
593,
605,
612,
624,
690,
699,
760,
806,
867,
894,
895,
915,
952,
963,
1005,
1029,
1030,
1049,
1100,
1111,
1160,
1191,
1192,
1211,
1223,
1234,
1293,
1334,
1341,
1342,
1504,
1758,
1831,
1832,
1967,
1968,
1977,
1978,
2042,
2043,
2432,
2433,
2477,
2478,
2488,
2518,
2525,
2537,
2568,
2574,
2575,
2737,
2747,
2748,
2758,
2782,
2833,
2867,
2868,
2880,
2881,
2891,
2917,
2994,
3033,
3077,
3078,
3185,
3186,
3220,
3221,
3307,
3487,
3488,
3762,
3763,
3792,
3819,
3820,
3842,
3843,
3875,
3876,
3987,
4160,
4179,
4241,
4242,
4286,
4309,
4342,
4356,
4370,
4384,
4385,
4470,
4471,
4521,
4522,
4599,
4659,
4660,
4691,
4711,
4731,
4751,
4780,
4781,
4787,
4797,
4851,
4866,
4970,
5039,
5094,
5163,
5180,
5200,
5225,
5250,
5267,
5290,
5305,
5335,
5368,
5398,
5409,
5430,
5470,
5518,
5529,
5544,
5580,
5598,
5694,
5719,
5756,
5771,
5790,
5855,
5907,
5941,
5981,
5992,
6006,
6053,
6101,
6112,
6129,
6177,
6229,
6240,
6251,
6296,
6307,
6327,
6371,
6415,
6426,
6446,
6532,
6551,
6574,
6601,
6628,
6652,
6678,
6705,
6732,
6758,
6788,
6812,
6831,
6853,
6872,
6910,
6936,
6947,
6958,
6992,
7011,
7081,
7092,
7101,
7105,
7106,
7152,
7153,
7233,
7234,
7291,
7303,
7321,
7342,
7353,
7374,
7393,
7426,
7462,
7482,
7487,
7488,
7529,
7530,
7587,
7599,
7617,
7638,
7649,
7670,
7689,
7715,
7751,
7771,
7776,
7777,
7812,
7813,
8003,
8004,
8047,
8048,
8108,
8120,
8141,
8154,
8157,
8179,
8182,
8185,
8206,
8209,
8215,
8230,
8278,
8315,
8535,
8579,
8587,
8588,
8643,
8644,
8676,
8713,
8714,
8844,
8845,
8889,
8890,
8953,
8983,
9012,
9013,
9029,
9064,
9065,
9204,
9205,
9411,
9412,
9559,
9560,
9572,
9624,
9625,
9638,
9641,
9682,
9685,
9688,
9735,
9738,
9743,
9751,
9752,
9802,
9803,
9826,
9856,
9953,
9954,
9970,
10026,
10060,
10077,
10088,
10126,
10141,
10152,
10196,
10211,
10220,
10256,
10272,
10284,
10289,
10290,
10338,
10339,
10363,
10368,
10369,
10411,
10412,
10441,
10442,
10714,
10715,
10785,
10868,
10963,
11123,
11172,
11173,
11309,
11310,
11375,
11376,
11455,
11517,
11567,
11628,
11700,
11701,
11940,
11941,
11970,
11971,
12045,
12046,
12069,
12138,
12183,
12271,
12335,
12419,
12420,
12921,
12922,
12957,
12958,
13403,
13747,
13748,
13802,
13803,
13859,
13860,
13879,
13935,
13940,
13941,
13973,
13974,
13995,
14006,
14024,
14100,
14105,
14106,
14135,
14136,
14210,
14254,
14255,
14278,
14324,
14329,
14363,
14389,
14432,
14471,
14496,
14530,
14592,
14631,
14668,
14703,
14728,
14771,
14833,
14878,
14915,
14950,
14975,
15020,
15082,
15120,
15157,
15192,
15217,
15222,
15274,
15317,
15356,
15427,
15464,
15499,
15524,
15529,
15578,
15583,
15662,
15690,
15716,
15721,
15781,
15786,
15827,
15856,
15861,
15928,
15993,
16038,
16077,
16096,
16101,
16102,
16257,
16258,
16295,
16300,
16301,
16343,
16421,
16422,
16451,
16452,
16657,
16658,
16674,
16702,
16727,
16742,
16753,
16866,
16905,
16912,
16922,
16951,
17024,
17063,
17070,
17082,
17143,
17172,
17211,
17220,
17259,
17267,
17274,
17281,
17313,
17320,
17330,
17338,
17343,
17344,
17467,
17468,
17515,
17534,
17559,
17589,
17617,
17638,
17704,
17709,
17710,
17969,
17970,
18011,
18012,
18074,
18075,
18297,
18298,
18335,
18336,
18342,
18372,
18407,
18444,
18479,
18519,
18552,
18580,
18620,
18655,
18691,
18752,
18780,
18809,
18881,
18912,
18949,
18989,
19024,
19049,
19083,
19128,
19203,
19244,
19274,
19307,
19335,
19376,
19410,
19448,
19476,
19516,
19555,
19599,
19637,
19666,
19707,
19735,
19766,
19805,
19842,
19868,
19906,
19944,
19989,
20028,
20057,
20104,
20130,
20164,
20201,
20239,
20279,
20324,
20416,
20453,
20484,
20517,
20560,
20590,
20630,
20668,
20715,
20736,
20765,
20800,
20840,
20869,
20938,
20972,
20977,
20983,
20988,
20993,
20994,
21108,
21109,
21222,
21223,
21248,
21249,
21290,
21291,
21329,
21362,
21398,
21441,
21446,
21447,
21474,
21475,
21562,
21567,
21568,
21597,
21614,
21615,
21643,
21644,
21678,
21759,
21787,
21814,
21819,
21820,
21939,
21994,
22150,
22240,
22411,
22563,
22711,
22901,
23024
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 23024,
"ccnet_original_nlines": 601,
"rps_doc_curly_bracket": 0.0016504500526934862,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.07058326154947281,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02134403958916664,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.34847843647003174,
"rps_doc_frac_unique_words": 0.3872639834880829,
"rps_doc_mean_word_length": 5.795631408691406,
"rps_doc_num_sentences": 167,
"rps_doc_symbol_to_word_ratio": 0.00739644980058074,
"rps_doc_unigram_entropy": 6.139810562133789,
"rps_doc_word_count": 2701,
"rps_doc_frac_chars_dupe_10grams": 0.00664367014542222,
"rps_doc_frac_chars_dupe_5grams": 0.0689280703663826,
"rps_doc_frac_chars_dupe_6grams": 0.03449597954750061,
"rps_doc_frac_chars_dupe_7grams": 0.01852562092244625,
"rps_doc_frac_chars_dupe_8grams": 0.012904049828648567,
"rps_doc_frac_chars_dupe_9grams": 0.012904049828648567,
"rps_doc_frac_chars_top_2gram": 0.0038328899536281824,
"rps_doc_frac_chars_top_3gram": 0.004152290057390928,
"rps_doc_frac_chars_top_4gram": 0.005877090152353048,
"rps_doc_books_importance": -1606.9281005859375,
"rps_doc_books_importance_length_correction": -1606.9281005859375,
"rps_doc_openwebtext_importance": -1118.5665283203125,
"rps_doc_openwebtext_importance_length_correction": -1118.5665283203125,
"rps_doc_wikipedia_importance": -712.2130737304688,
"rps_doc_wikipedia_importance_length_correction": -712.2130737304688
},
"fasttext": {
"dclm": 0.7666261196136475,
"english": 0.028978539630770683,
"fineweb_edu_approx": 1.5560812950134277,
"eai_general_math": 0.00037180999061092734,
"eai_open_web_math": 0.15554535388946533,
"eai_web_code": 0.6080335974693298
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.0285",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.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": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,034,246,005,137,668,000 |
LanguagesUnderstanding Structs in Go
Understanding Structs in Go
The struct is an aggregate type that is used to group one or more named values and treat it as a single entity. This is particularly useful for creating custom types using one or more built-in types. The values that we typically store in a slice are of the same types, but if we create a struct we can store more than one value of different types and treat it as a single entity. We can also create an array of structs to create a list of custom type entities. The article explains the use of structs in Go with coding examples.
Structs in Go
A struct is an aggregate type where we can group multiple arbitrary types of elements as a single entity. The idea is not very different (unless we use an interface{}) from the struct that we use in C/C++. Each element declared within the struct is called a field. Imagine a database record where we may want to work with an entity such as Book. The Book entity typically consists of fields such as ISBN number, title, edition, publisher, price, category, and so on. Using structs, what we can do is create a single unit such as an entity consisting of multiple fields whose types are different from one another. We can then use this single unit in a variety of ways. For example, we can create an array of this entity and store multiple Book data points or create a single instance of it, among other possibilities.
Here is how we declare a struct Book and create one or more instances of this unit.
type Book struct {
ISBN string
Title string
Edition string
Publisher string
Price float
Author string
}
Note that fields are typically written one per line. However we can also combine fields of the same type as follows:
type Book struct {
ISBN, Title, Edition, Publisher, Author string
Price float
}
To create an instance of the struct type Book we may write as follows:
var b1, b2, b3 Book
var b5 Book
We also can create a pointer and assign a struct reference or use a new() function to create a struct reference dynamically and assign the value to a pointer variable, as in this example:
var bkPtrRef *Book
bkPtrRef = &b1
//using new() function
var bkPtr *Book
bkPtr = new(Book)
The individual field in the struct can be accessed using the dot(.) operator:
b1. id = 101
Unlike C/C++ where we may use the (arrow)-> operator or dereference operator(*.) with the pointer, in Go we can simply use the dot(.) operator with a pointer to struct in much the same way we access through a struct instance.
// struct instance
var b1 Book
b1.ISBN = "8170283701"
b1.Title = "Mission to Moon"
b1.Edition = "2015"
b1.Publisher = "ABC Publisher"
b1.Price = 140.00
b1.Author = "donald"
//struct pointer
var ptr *Book = new(Book)
ptr.ISBN = "8170287723"
ptr.Title = "Mission to Mars"
ptr.Edition = "2013"
ptr.Publisher = "ABC Publisher"
ptr.Price = 160.00
ptr.Author = "mickey"
A struct example in Go
Here is a very simple example to show how we can create a singly linked list using structs. It is actually a copy of one of my C code creations and I made a few changes to make it work in Go just to see how simple it is to switch from C to Go.
package main
import (
"fmt"
)
type Node struct {
info int
next *Node
}
func makeNode(val int) *Node {
var p *Node
p = new(Node)
p.info = val
p.next = nil
return p
}
func makeList(root *Node) *Node {
var num int
var ptr *Node
ptr = nil
for {
fmt.Print("Enter a value (-999) to stop: ")
fmt.Scanf("%d", &num)
if num == -999 {
break
}
if root == nil {
root = makeNode(num)
ptr = root
} else {
ptr.next = makeNode(num)
ptr = ptr.next
}
}
return root
}
func printList(p *Node) {
for ; p != nil; p = p.next {
fmt.Printf("->%d", p.info)
}
}
func main() {
var root *Node = nul
root = makeList(root)
printList(root)
}
Output
Enter a value (-999) to stop: 11
Enter a value (-999) to stop: 22
Enter a value (-999) to stop: 33
Enter a value (-999) to stop: 44
Enter a value (-999) to stop: 55
Enter a value (-999) to stop: 66
Enter a value (-999) to stop: -999
->11->22->33->44->55->66
Slice of structs
We can create a slice of structs. The following example illustrates how the items variable is declared as a slice of struct type. Notice that the struct declared here is unnamed but we can access it via the field name and not use index values as we typically do with a slice. The advantage of using a struct is that we can use different data types for the fields, which simply is not possible with a plain slice.
items := []struct {
name string
quantity int
price float64
}{{"PRT34", 5, 5.67}, {"XZE77", 6, 9.67}, {}, {"URT63", 6, 3.35}, {"LKJ98", 4, 4.36}, {"NHT45", 2, 8.25}}
for _, item := range items {
fmt.Printf("%s\t%d\t%v\n", item.name, item.quantity, item.price)
}
Note that the number fields as an empty item in the slice of struct is automatically initialized with 0 values.
Embedding a slice within a struct
We have seen how to access named variables within a struct. But what if we want to put a slice inside a struct construct? Let us try an example by creating two structs as follows.
type author struct {
Firstname string
Lastname string
bio string
}
type Book struct {
ISBN string
Title string
Edition string
Publisher string
Authors []author
Price float64
}
authors := []author{{"AA", "BB", "a sample bio of AA"},
{"CC", "DD", "a sample bio of CC"},
{"EE", "FF", "a sample bio of EE"}}
b1 := Book{"12345678", "Title1", "2015", "xyz publisher", authors, 140.60}
fmt.Println(b1)
Observe that the Authors in the Book struct is a slice of the author struct. We first create a slice of author, populate all the fields in the order and then set the Authors field with the created author slice and finally print it (as illustrated in the above code sample).
Comparing structs
One of the common needs for any type is comparability. In Go, struct is also comparable provided the fields declared inside the struct are comparable using the common comparison operator == and !=. Here is an example.
type item struct {
qty int
price float64
name string
}
it1 := item{5, 6.56, "aa"}
it2 := item{6, 5.56, "aa"}
it3 := item{5, 6.56, "aa"}
fmt.Println(it1 == it2) //false
fmt.Println(it1 == it3) //true
What if another struct type is embedded in a struct; does the comparison work? It still works, as in this example.
type qty struct {
val int
}
type price struct {
val float64
}
type item struct {
quantity qty
amount price
name string
}
var it1 item
it1.quantity.val = 10
it1.amount.val = 4.56
it1.name = "AA"
var it2 item
it2.quantity.val = 10
it2.amount.val = 5.56
it2.name = "AA"
fmt.Println(it1 == it2) //false
Anonymous fields
In Go we can declare anonymous fields inside a struct. These are no-name fields, but the type of the field must be of a named type or a pointer to a named type. Here is an example.
type item struct {
qty
price
name string
}
it1 := item{qty{10}, price{5.56}, "AA"}
Note that anonymous fields have implicit names. We cannot declare more than one anonymous field, otherwise the implicit name would conflict.
Conclusion
The struct is an important type and has many interesting uses. Here we have skimmed over some of the common ways the struct can be used in Go programming. In general, it enables us to group many arbitrary types into a single entity. This single entity can then be passed to a function, stored in an array and used as a list of entities, copy them as a unit, and so on. It comes in quite handy while creating data structures like linked lists, trees, graphs, and more.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.
Latest Posts
Related Stories
|
{
"url": "https://www.developer.com/languages/understanding-structs-in-go/",
"source_domain": "www.developer.com",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "456006",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4A5DM7JNTQHAAOVZ3MEZECCP63KZRC6W",
"WARC-Concurrent-To": "<urn:uuid:456f7dc5-b4a8-4c08-8567-e0454f5943a7>",
"WARC-Date": "2023-03-21T16:37:01Z",
"WARC-IP-Address": "146.75.37.91",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:7KQAUVJUB4RI2LEYZYDPVI2ELKT3TYLB",
"WARC-Record-ID": "<urn:uuid:d0be4836-c5df-495d-b6a9-96bac174cad2>",
"WARC-Target-URI": "https://www.developer.com/languages/understanding-structs-in-go/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2178c578-c754-41c4-a565-d489b7bafc20>"
},
"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-179\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,
37,
38,
66,
67,
596,
597,
611,
612,
1429,
1430,
1514,
1515,
1516,
1535,
1550,
1565,
1582,
1600,
1614,
1630,
1632,
1633,
1750,
1751,
1752,
1771,
1819,
1832,
1834,
1835,
1906,
1907,
1908,
1928,
1940,
1941,
2129,
2130,
2131,
2150,
2165,
2166,
2189,
2205,
2223,
2224,
2302,
2303,
2304,
2317,
2318,
2544,
2545,
2546,
2565,
2577,
2600,
2629,
2649,
2680,
2698,
2719,
2720,
2737,
2763,
2787,
2817,
2838,
2870,
2889,
2911,
2912,
2935,
2936,
3180,
3181,
3182,
3195,
3196,
3205,
3212,
3214,
3215,
3234,
3244,
3256,
3258,
3259,
3290,
3303,
3318,
3332,
3346,
3356,
3358,
3359,
3393,
3406,
3421,
3432,
3439,
3485,
3509,
3528,
3537,
3541,
3560,
3584,
3598,
3609,
3637,
3655,
3659,
3662,
3675,
3677,
3678,
3704,
3734,
3763,
3766,
3768,
3769,
3783,
3805,
3828,
3845,
3847,
3848,
3855,
3856,
3857,
3890,
3923,
3956,
3989,
4022,
4055,
4090,
4115,
4116,
4133,
4134,
4547,
4548,
4549,
4569,
4586,
4600,
4618,
4724,
4725,
4754,
4820,
4822,
4823,
4935,
4936,
4970,
4971,
5151,
5152,
5153,
5174,
5192,
5210,
5228,
5230,
5249,
5267,
5285,
5303,
5321,
5341,
5360,
5362,
5363,
5419,
5457,
5495,
5496,
5571,
5572,
5588,
5589,
5863,
5864,
5882,
5883,
6101,
6102,
6103,
6122,
6133,
6148,
6162,
6164,
6165,
6192,
6219,
6246,
6279,
6311,
6312,
6427,
6428,
6429,
6447,
6456,
6458,
6459,
6479,
6492,
6494,
6495,
6514,
6528,
6544,
6561,
6563,
6564,
6577,
6599,
6621,
6637,
6638,
6651,
6673,
6695,
6711,
6712,
6744,
6745,
6762,
6763,
6944,
6945,
6946,
6965,
6970,
6977,
6990,
6992,
6993,
7033,
7034,
7175,
7176,
7187,
7188,
7656,
7657,
7682,
7745,
7776,
7801,
7864,
7895,
7896,
7909,
7910
],
"line_end_idx": [
37,
38,
66,
67,
596,
597,
611,
612,
1429,
1430,
1514,
1515,
1516,
1535,
1550,
1565,
1582,
1600,
1614,
1630,
1632,
1633,
1750,
1751,
1752,
1771,
1819,
1832,
1834,
1835,
1906,
1907,
1908,
1928,
1940,
1941,
2129,
2130,
2131,
2150,
2165,
2166,
2189,
2205,
2223,
2224,
2302,
2303,
2304,
2317,
2318,
2544,
2545,
2546,
2565,
2577,
2600,
2629,
2649,
2680,
2698,
2719,
2720,
2737,
2763,
2787,
2817,
2838,
2870,
2889,
2911,
2912,
2935,
2936,
3180,
3181,
3182,
3195,
3196,
3205,
3212,
3214,
3215,
3234,
3244,
3256,
3258,
3259,
3290,
3303,
3318,
3332,
3346,
3356,
3358,
3359,
3393,
3406,
3421,
3432,
3439,
3485,
3509,
3528,
3537,
3541,
3560,
3584,
3598,
3609,
3637,
3655,
3659,
3662,
3675,
3677,
3678,
3704,
3734,
3763,
3766,
3768,
3769,
3783,
3805,
3828,
3845,
3847,
3848,
3855,
3856,
3857,
3890,
3923,
3956,
3989,
4022,
4055,
4090,
4115,
4116,
4133,
4134,
4547,
4548,
4549,
4569,
4586,
4600,
4618,
4724,
4725,
4754,
4820,
4822,
4823,
4935,
4936,
4970,
4971,
5151,
5152,
5153,
5174,
5192,
5210,
5228,
5230,
5249,
5267,
5285,
5303,
5321,
5341,
5360,
5362,
5363,
5419,
5457,
5495,
5496,
5571,
5572,
5588,
5589,
5863,
5864,
5882,
5883,
6101,
6102,
6103,
6122,
6133,
6148,
6162,
6164,
6165,
6192,
6219,
6246,
6279,
6311,
6312,
6427,
6428,
6429,
6447,
6456,
6458,
6459,
6479,
6492,
6494,
6495,
6514,
6528,
6544,
6561,
6563,
6564,
6577,
6599,
6621,
6637,
6638,
6651,
6673,
6695,
6711,
6712,
6744,
6745,
6762,
6763,
6944,
6945,
6946,
6965,
6970,
6977,
6990,
6992,
6993,
7033,
7034,
7175,
7176,
7187,
7188,
7656,
7657,
7682,
7745,
7776,
7801,
7864,
7895,
7896,
7909,
7910,
7925
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7925,
"ccnet_original_nlines": 261,
"rps_doc_curly_bracket": 0.010094639845192432,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2998361587524414,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.018569089472293854,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2829055190086365,
"rps_doc_frac_unique_words": 0.31342124938964844,
"rps_doc_mean_word_length": 4.470907688140869,
"rps_doc_num_sentences": 106,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.2892231941223145,
"rps_doc_word_count": 1289,
"rps_doc_frac_chars_dupe_10grams": 0.05517958849668503,
"rps_doc_frac_chars_dupe_5grams": 0.10983862727880478,
"rps_doc_frac_chars_dupe_6grams": 0.09925386309623718,
"rps_doc_frac_chars_dupe_7grams": 0.07496096193790436,
"rps_doc_frac_chars_dupe_8grams": 0.0662849172949791,
"rps_doc_frac_chars_dupe_9grams": 0.05517958849668503,
"rps_doc_frac_chars_top_2gram": 0.015790389850735664,
"rps_doc_frac_chars_top_3gram": 0.012493490241467953,
"rps_doc_frac_chars_top_4gram": 0.015269819647073746,
"rps_doc_books_importance": -870.6807861328125,
"rps_doc_books_importance_length_correction": -870.6807861328125,
"rps_doc_openwebtext_importance": -443.0197448730469,
"rps_doc_openwebtext_importance_length_correction": -443.0197448730469,
"rps_doc_wikipedia_importance": -416.60498046875,
"rps_doc_wikipedia_importance_length_correction": -416.60498046875
},
"fasttext": {
"dclm": 0.4431762099266052,
"english": 0.8009768724441528,
"fineweb_edu_approx": 3.2326323986053467,
"eai_general_math": 0.8502405285835266,
"eai_open_web_math": 0.034629520028829575,
"eai_web_code": 0.8744293451309204
}
}
|
{
"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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,060,626,610,302,838,000 |
Friday, July 08, 2011
My Phone Is More Important Than Your Face
I went to the coffee shop tonight. The entire time I was there (about an hour), this couple who appeared to be in their late 40s/early 50s was seated near me. Despite the fact they were at the same table, right across from each other, they barely acknowledged each other's existence. Instead, they spent the whole time staring at their phones.
They just sat there in silence, engrossed by their phones.
Not talking to each other.
Just...looking at their phones and ignoring the other person.
It made my heart hurt a little.
I blacked out their faces to protect their privacy and also reflect their empty, empty hearts.
If I had a copy of it with me, I would have given them this.
1 comment:
Landis said...
hahahaha!
|
{
"url": "http://theblogofed.blogspot.com/2011/07/my-phone-is-more-important-than-your.html",
"source_domain": "theblogofed.blogspot.com",
"snapshot_id": "crawl=CC-MAIN-2017-39",
"warc_metadata": {
"Content-Length": "75899",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PO2TZPALZA7ZKPO34ZCAS5HUTKFXOEDU",
"WARC-Concurrent-To": "<urn:uuid:fd68ad7a-840f-4866-8a9f-b95da47e4edc>",
"WARC-Date": "2017-09-21T01:36:21Z",
"WARC-IP-Address": "172.217.13.225",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:TZAVBWLMKOQOYLEKEOZGSK4LCH7HSXU4",
"WARC-Record-ID": "<urn:uuid:52b915b4-4b1b-4520-bf00-2baf2e372575>",
"WARC-Target-URI": "http://theblogofed.blogspot.com/2011/07/my-phone-is-more-important-than-your.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ff993715-d7e1-44c4-8914-66e7ce51f8c3>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-141-186-238.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-39\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for September 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
22,
23,
65,
66,
410,
411,
470,
471,
498,
499,
561,
562,
594,
595,
690,
691,
752,
753,
764,
765,
780,
781
],
"line_end_idx": [
22,
23,
65,
66,
410,
411,
470,
471,
498,
499,
561,
562,
594,
595,
690,
691,
752,
753,
764,
765,
780,
781,
790
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 790,
"ccnet_original_nlines": 22,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.42603549361228943,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02958579920232296,
"rps_doc_frac_lines_end_with_ellipsis": 0.043478261679410934,
"rps_doc_frac_no_alph_words": 0.17159762978553772,
"rps_doc_frac_unique_words": 0.7142857313156128,
"rps_doc_mean_word_length": 4.349999904632568,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0.011834319680929184,
"rps_doc_unigram_entropy": 4.427770614624023,
"rps_doc_word_count": 140,
"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.054187189787626266,
"rps_doc_frac_chars_top_3gram": 0.042692940682172775,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -71.96786499023438,
"rps_doc_books_importance_length_correction": -71.96786499023438,
"rps_doc_openwebtext_importance": -44.16581344604492,
"rps_doc_openwebtext_importance_length_correction": -44.16568374633789,
"rps_doc_wikipedia_importance": -41.30827331542969,
"rps_doc_wikipedia_importance_length_correction": -41.30827331542969
},
"fasttext": {
"dclm": 0.7291513681411743,
"english": 0.9897920489311218,
"fineweb_edu_approx": 0.9928485751152039,
"eai_general_math": 0.017001209780573845,
"eai_open_web_math": 0.31618112325668335,
"eai_web_code": 0.0004217000096105039
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.689",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "153.8",
"labels": {
"level_1": "Philosophy and psychology",
"level_2": "Psychology",
"level_3": "Thought and thinking"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "5",
"label": "Evaluate"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "4",
"label": "Metacognitive"
}
},
"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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,105,425,600,095,241,000 |
Properties
Label 1.8.2t1.b.a
Dimension $1$
Group $C_2$
Conductor $8$
Root number $1$
Indicator $1$
Related objects
Downloads
Learn more
Basic invariants
Dimension: $1$
Group: $C_2$
Conductor: \(8\)\(\medspace = 2^{3}\)
Frobenius-Schur indicator: $1$
Root number: $1$
Artin field: Galois closure of \(\Q(\sqrt{-2}) \)
Galois orbit size: $1$
Smallest permutation container: $C_2$
Parity: odd
Dirichlet character: \(\displaystyle\left(\frac{-8}{\bullet}\right)\)
Projective image: $C_1$
Projective field: Galois closure of \(\Q\)
Defining polynomial
$f(x)$$=$ \( x^{2} + 2 \) Copy content Toggle raw display .
The roots of $f$ are computed in $\Q_{ 3 }$ to precision 5.
Roots:
$r_{ 1 }$ $=$ \( 1 + 3 + 2\cdot 3^{2} +O(3^{5})\) Copy content Toggle raw display
$r_{ 2 }$ $=$ \( 2 + 3 + 2\cdot 3^{3} + 2\cdot 3^{4} +O(3^{5})\) Copy content Toggle raw display
Generators of the action on the roots $ r_{ 1 }, r_{ 2 } $
Cycle notation
$(1,2)$
Character values on conjugacy classes
SizeOrderAction on $ r_{ 1 }, r_{ 2 } $ Character value
$1$$1$$()$$1$
$1$$2$$(1,2)$$-1$
The blue line marks the conjugacy class containing complex conjugation.
|
{
"url": "https://www.lmfdb.org/ArtinRepresentation/1.8.2t1.b.a",
"source_domain": "www.lmfdb.org",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "18766",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KAJB7YKDH7KW3XZH76GROGDADEDHVLGZ",
"WARC-Concurrent-To": "<urn:uuid:f291154f-f11d-4f99-960c-1f2330d5e0df>",
"WARC-Date": "2022-08-17T06:59:51Z",
"WARC-IP-Address": "35.241.19.59",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ZLIU5GRMN6MQGVHRDOSYJWYBL7QVBWCU",
"WARC-Record-ID": "<urn:uuid:605eb66f-4cc4-4394-8ea4-48c739a63dd8>",
"WARC-Target-URI": "https://www.lmfdb.org/ArtinRepresentation/1.8.2t1.b.a",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:44220ed4-a314-4af3-999a-6f1868dc3b54>"
},
"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,
11,
12,
30,
44,
56,
70,
86,
100,
101,
117,
118,
128,
129,
140,
141,
158,
159,
174,
187,
225,
256,
273,
323,
346,
384,
396,
466,
490,
533,
534,
554,
555,
615,
616,
676,
677,
684,
766,
863,
864,
923,
924,
939,
947,
948,
986,
987,
1043,
1057,
1075,
1076
],
"line_end_idx": [
11,
12,
30,
44,
56,
70,
86,
100,
101,
117,
118,
128,
129,
140,
141,
158,
159,
174,
187,
225,
256,
273,
323,
346,
384,
396,
466,
490,
533,
534,
554,
555,
615,
616,
676,
677,
684,
766,
863,
864,
923,
924,
939,
947,
948,
986,
987,
1043,
1057,
1075,
1076,
1147
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1147,
"ccnet_original_nlines": 51,
"rps_doc_curly_bracket": 0.02964255027472973,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.07255520671606064,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.028391169384121895,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5867508053779602,
"rps_doc_frac_unique_words": 0.5866666436195374,
"rps_doc_mean_word_length": 4.946666717529297,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.2442851066589355,
"rps_doc_word_count": 150,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.18733154237270355,
"rps_doc_frac_chars_dupe_6grams": 0.08086252957582474,
"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.044474389404058456,
"rps_doc_frac_chars_top_3gram": 0.06873314827680588,
"rps_doc_frac_chars_top_4gram": 0.08086252957582474,
"rps_doc_books_importance": -125.9715576171875,
"rps_doc_books_importance_length_correction": -125.9715576171875,
"rps_doc_openwebtext_importance": -62.38295364379883,
"rps_doc_openwebtext_importance_length_correction": -59.15999221801758,
"rps_doc_wikipedia_importance": -25.15973472595215,
"rps_doc_wikipedia_importance_length_correction": -25.15973472595215
},
"fasttext": {
"dclm": 0.10411965847015381,
"english": 0.47926202416419983,
"fineweb_edu_approx": 1.3684653043746948,
"eai_general_math": 0.9585506319999695,
"eai_open_web_math": 0.559224545955658,
"eai_web_code": 0.11096221208572388
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "512.7",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
},
"secondary": {
"code": "512.482",
"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": "2",
"label": "Academic/Research"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,854,672,149,608,636,000 |
Microsoft Excel INDEX Function Tutorial
Since 1998
Microsoft Excel INDEX Function Tutorial
Excel Function Tutorial
The INDEX Function returns a value from the row and column you designate within a worksheet area. It performs a table lookup just like VLOOKUP or HLOOKUP but is more powerful.
What is the Microsoft Excel INDEX Function (Array Format)?
The INDEX function is a computer program that you run from a worksheet cell formula. It returns a value from the row and column you designate within a worksheet range or array. In other words, it is table lookup just like VLOOKUP except you tell it what row and column to return information from within the table (i.e. range or array). In VLOOKUP you only told it the column to return the info from. You run the INDEX worksheet function by typing its name in a formula then followed by the information it is suppose to use. The INDEX worksheet function is used in applications when you have to look up prices, name information, scientific data anything that is contained in a table. Its advantage over VLOOKUP is that it can be used in conjunction with the MATCH function thus allowing what is looked up to be elsewhere then the first column of the range or array (i.e. table). It can also be used to merge two tables together transferring information from one to the other just like VLOOKUP.
How Do You Type the INDEX Worksheet Function in a Formula?
Whenever you type a formula in a worksheet cell, this is called syntax or grammar. The general INDEX function syntax has a format like this when you type it in a worksheet cell:
=INDEX(reference,[row_num],[column_num])
Where reference,[row_num],[column_num] are called the function argument list. Remember, you are running a computer program at this point so the program needs information to operate and that is why there is an argument list. When you see an argument list and you see square brackets [ ] around the argument name, this means the argument is optional and you do not have to include it when typing unless you need it. So for the syntax above, you need to include 2 arguments for the INDEX worksheet function when typing it in a worksheet cell formula in order for it to calculate correctly. If row_num is omitted you need to put the col_num. If the col_num argument is omitted you need to put the row_num argument. What argument values can be used are discussed below. Remember functions expect certain things in their argument lists, if you do not put the correct information in the list they will generate an error when run.
INDEX Function Argument Definitions
How Do You Run the INDEX Function?
Since the INDEX function is a computer program, it runs when you press Enter to enter the formula that contains it. If any of the arguments are wrong, the function will return an error.
What Do I Type for an INDEX Function Argument?
When typing the INDEX function in a worksheet cell formula, you need to replace the argument list with arguments separating each with a comma (,). Some typical arguments you can use are:
Cell Formula Explanation
= INDEX(G1:J5, 2, 2) Returns the value from row 2 column 2 in the designated range. Remember the row and column numbers are relative to the range not the worksheet column headers.
= SUM( INDEX( G1:J5, 0, 4 ) ) Return the entire column 4 from the designated range. Most of the time the reason why you return a whole column is to use it as input to another function like SUM. In this example INDEX is nested inside of SUM to provide it the values to sum.
= SUM( INDEX( G1:J5, 2, 0) ) Return the entire row 2 from the designated range. Most of the time the reason why you return a whole row is to use it as input to another function like SUM. In this example INDEX is nested inside of SUM to provide it the values to sum.
= INDEX( Sales, 2, 2 ) Returns the value from row 2 column 2 in the designated range named Sales.*
= Index( A1:F5, Match( "Widget1", B1:B5, 0 ), MATCH("Q4", A1:D1, 0 ) ) Nest the Match worksheet function inside the INDEX function to find the row and column number that Index will need to return a value. Notice Match is looking in the second column of the range, not the first, for the position of Widget1. It is also scanning the headers of the table for the position of Q4.
* It is possible to name a cell or group of cells on a worksheet and use that name in place of a range reference or cell reference. Consult Excel help on how to name a cell.
Additional INDEX Function Examples
The worksheet seen below contains some typical worksheet formulas that run the INDEX worksheet function. Pay close attention to the argument list and the syntax used to write the formula.
A B C D
1
2
3 Item RegionA RegionB RegionC
4 Widget1 100 200 150
5 Widget2 200 300 250
6 Widget3 300 400 350
7
8 Find Widget2,RegionA in the table which is row 3, column 2 relative to the table not columns on worksheet
9 Widget2, RegionA 200 = Index( A3:A6, 3, 2)
10
11 Use MATCH worksheet function to locate RegionB header position and Widget2 row position. Notice how MATCH function is being used to get the row and column positions for the INDEX function. Using MATCH, their positions could shift and the formula would adapt automatically.
12 Widget2, RegionB 300 = Index(A3:A6, Match( "Widget2", A3:A6, 0), Match( "RegionB", A3:D3, 0) )
13
14 Use the MATCH worksheet function to locate RegionA header position in row 3 for INDEX function and leave row index for INDEX function 0. This will return that entire column of the table that includes RegionA header. SUM function will then add the range values being returned by INDEX which is B3:B6. Do not be afraid to include headers in values being summed, SUM function ignores text. Easier to create more advanced formulas if you leverage this concept.
15 Sum of RegionA 600 = Sum( Index( A3:A6, 0, Match( "RegionA" , A3:D3 ,0) ) )
16
17
18
Things to Know About the INDEX Function
Facebook Contact Us Newsletter
Need Help? Please call us at 1.805.498.7162
Microsoft Excel Products
- Excel Self-Study Manuals
Copyright © 2002-2020
EMAGENIT All Rights Reserved
|
{
"url": "https://www.emagenit.com/Functions/index-function.htm",
"source_domain": "www.emagenit.com",
"snapshot_id": "crawl=CC-MAIN-2020-05",
"warc_metadata": {
"Content-Length": "25994",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:M6VZVOQBY5CY6COAJPPNT7YJPS23EKDG",
"WARC-Concurrent-To": "<urn:uuid:a9d018e0-0b9f-417b-9ec6-03c6254756e9>",
"WARC-Date": "2020-01-24T10:37:35Z",
"WARC-IP-Address": "192.124.249.5",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:I7VD4IJQWPABZBMRZIS7445R7APV4MV4",
"WARC-Record-ID": "<urn:uuid:10266012-a7d6-434a-affa-c4c12d88f494>",
"WARC-Target-URI": "https://www.emagenit.com/Functions/index-function.htm",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:f83b386c-a2ca-4772-80fe-b397c76fe1cb>"
},
"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-158.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,
40,
41,
52,
53,
93,
94,
118,
119,
295,
296,
355,
356,
1349,
1350,
1409,
1410,
1588,
1589,
1630,
1631,
2554,
2555,
2591,
2592,
2627,
2628,
2814,
2815,
2862,
2863,
3050,
3051,
3076,
3256,
3529,
3795,
3894,
4271,
4272,
4446,
4447,
4482,
4483,
4671,
4672,
4680,
4682,
4684,
4715,
4737,
4759,
4781,
4783,
4891,
4936,
4939,
5215,
5313,
5316,
5776,
5856,
5859,
5862,
5865,
5866,
5906,
5907,
5938,
5982,
5983,
6008,
6009,
6036,
6037,
6059,
6060
],
"line_end_idx": [
40,
41,
52,
53,
93,
94,
118,
119,
295,
296,
355,
356,
1349,
1350,
1409,
1410,
1588,
1589,
1630,
1631,
2554,
2555,
2591,
2592,
2627,
2628,
2814,
2815,
2862,
2863,
3050,
3051,
3076,
3256,
3529,
3795,
3894,
4271,
4272,
4446,
4447,
4482,
4483,
4671,
4672,
4680,
4682,
4684,
4715,
4737,
4759,
4781,
4783,
4891,
4936,
4939,
5215,
5313,
5316,
5776,
5856,
5859,
5862,
5865,
5866,
5906,
5907,
5938,
5982,
5983,
6008,
6009,
6036,
6037,
6059,
6060,
6088
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6088,
"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.36629748344421387,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06645569950342178,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.19224683940410614,
"rps_doc_frac_unique_words": 0.29044464230537415,
"rps_doc_mean_word_length": 4.516556262969971,
"rps_doc_num_sentences": 59,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.961908340454102,
"rps_doc_word_count": 1057,
"rps_doc_frac_chars_dupe_10grams": 0.11562631279230118,
"rps_doc_frac_chars_dupe_5grams": 0.2036028504371643,
"rps_doc_frac_chars_dupe_6grams": 0.13992458581924438,
"rps_doc_frac_chars_dupe_7grams": 0.13992458581924438,
"rps_doc_frac_chars_dupe_8grams": 0.11562631279230118,
"rps_doc_frac_chars_dupe_9grams": 0.11562631279230118,
"rps_doc_frac_chars_top_2gram": 0.046292420476675034,
"rps_doc_frac_chars_top_3gram": 0.02681189961731434,
"rps_doc_frac_chars_top_4gram": 0.015710100531578064,
"rps_doc_books_importance": -686.53076171875,
"rps_doc_books_importance_length_correction": -686.53076171875,
"rps_doc_openwebtext_importance": -363.49273681640625,
"rps_doc_openwebtext_importance_length_correction": -363.49273681640625,
"rps_doc_wikipedia_importance": -272.11431884765625,
"rps_doc_wikipedia_importance_length_correction": -272.11431884765625
},
"fasttext": {
"dclm": 0.8242635726928711,
"english": 0.8069460391998291,
"fineweb_edu_approx": 3.2156527042388916,
"eai_general_math": 0.9425008893013,
"eai_open_web_math": 0.3917224407196045,
"eai_web_code": 0.8349584341049194
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "658.87",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Business",
"level_3": "Management"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,224,402,707,045,901,000 |
pointers
http://stackoverflow.com/questions/5727/what-are-the-barriers-to-understanding-pointers-and-what-can-be-done-to-overcome http://stackoverflow.com/questions/96285/in-c-i-cannot-grasp-pointers-and-classes#98525
Taming the Flash
HELP! Youtube people are smurfs! sudo mkdir /etc/adobe echo -e “EnableLinuxHWVideoDecode=1nOverrideGPUValidation=true” | sudo tee /etc/adobe/mms.cfg > /dev/null HELP! Video is bleeding through black surfaces! sudo mkdir /etc/adobe echo -e “EnableLinuxHWVideoDecode=0| sudo tee /etc/adobe/mms.cfg > /dev/null
Hard
[06:46] c ι є и ɔ н ч: Crashed hard :c [06:47] c ι є и ɔ н ч: Logged back in still hard… [06:47] c ι є и ɔ н ч: :|
Aria2, a better wget
from http://linux.die.net/man/1/aria2c : aria2 is a utility for downloading files. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is […]
|
{
"url": "http://tarnish.me/category/uncategorized/",
"source_domain": "tarnish.me",
"snapshot_id": "crawl=CC-MAIN-2013-48",
"warc_metadata": {
"Content-Length": "21033",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TXGEOJ5X5U5ZPZSCJOH4TNAWN3ZKBIVG",
"WARC-Concurrent-To": "<urn:uuid:466b259e-bf62-471e-a091-f9397c905192>",
"WARC-Date": "2013-12-20T01:52:05Z",
"WARC-IP-Address": "91.121.155.10",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:OLY2LEQSVACM366JANEDOWWCUDQJWCVK",
"WARC-Record-ID": "<urn:uuid:f4e8e5c2-4c2d-4a26-abf5-524dca42a6ad>",
"WARC-Target-URI": "http://tarnish.me/category/uncategorized/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:75176485-f7b6-4f07-965c-9addcb41dcc5>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-33-133-15.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2013-48\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for Winter 2013\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
9,
10,
219,
220,
237,
238,
546,
547,
552,
553,
668,
669,
690,
691
],
"line_end_idx": [
9,
10,
219,
220,
237,
238,
546,
547,
552,
553,
668,
669,
690,
691,
1084
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1084,
"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.2013888955116272,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.038194440305233,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4479166567325592,
"rps_doc_frac_unique_words": 0.6230769157409668,
"rps_doc_mean_word_length": 6.430769443511963,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0.010416669771075249,
"rps_doc_unigram_entropy": 4.25546407699585,
"rps_doc_word_count": 130,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.08732057362794876,
"rps_doc_frac_chars_dupe_6grams": 0.034689001739025116,
"rps_doc_frac_chars_dupe_7grams": 0.034689001739025116,
"rps_doc_frac_chars_dupe_8grams": 0.02631578966975212,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.007177030202001333,
"rps_doc_frac_chars_top_3gram": 0.01076554972678423,
"rps_doc_frac_chars_top_4gram": 0.014354069717228413,
"rps_doc_books_importance": -80.36518859863281,
"rps_doc_books_importance_length_correction": -80.36518859863281,
"rps_doc_openwebtext_importance": -52.039039611816406,
"rps_doc_openwebtext_importance_length_correction": -41.7447395324707,
"rps_doc_wikipedia_importance": -31.125850677490234,
"rps_doc_wikipedia_importance_length_correction": -31.125850677490234
},
"fasttext": {
"dclm": 0.02669202908873558,
"english": 0.6353442072868347,
"fineweb_edu_approx": 1.3016493320465088,
"eai_general_math": 0.0023342398926615715,
"eai_open_web_math": 0.017488420009613037,
"eai_web_code": 0.03843187913298607
}
}
|
{
"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": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "1",
"label": "Truncated Snippets"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,241,347,948,392,536,000 |
the5fire
关注Python、Django、Vim、Linux、Web开发、团队管理和互联网--Life is short, we need Python.
读《增长黑客》
分类:读书 | 标签: | 发布:2016-01-10 7:02 p.m. | 阅读量: 9344
接上一篇来说,上一篇说到阅读《增长黑客》前的一些场景,一些体验。之所以这么写是因为我自己想做些写作上的尝试,看看能不能通过自己的文字描绘出真实的场景,技术类的文章或者总结类的文章有时候会觉得“干燥”一些,加上一些场景的描述可能会让整个文章读起来更加“丰满”。当然只是一些尝试。
Bye 2015,Hi 2016
分类:阶段总结 | 标签: | 发布:2016-01-01 4:25 p.m. | 阅读量: 8738
nothing but running
读《增长黑客》之前
分类:用户体验 | 标签: | 发布:2015-12-30 7:11 a.m. | 阅读量: 8249
某天早晨,在公交车上坐好之后,把双肩电脑包摘下来,放到腿上调整到一个舒服的位置。往旁边微微侧了侧身,掏出手机来,牛仔裤有时候不太好掏手机,但这并不是坏事,我自己掏出来都不方便,别人想掏就更不方便了。熟练的解锁屏幕,实话实话对于一个练习解锁多年的手机用户来说,有时候依然会出错,可能还是不专业...
在公司做了次讲师
分类:Python | 标签: | 发布:2015-12-01 7:35 a.m. | 阅读量: 9637
好久没正经更新博客了,随便写点什么。 上周四,在公司范围内做了次《Python在手搜的应用》的分享,话说这个分享是组织者很早就找我确认过的。结果还是等到前一个星期才开始准备,不得不说DeadLine还真是第一生产力!从十一国庆就订好了提醒提前一个月开始准备,结果还是被无限拖延,这可真是现在亟需解决的一个问题。
8号不迁,博客要挂
分类:生活 | 标签: | 发布:2015-11-07 6:33 a.m. | 阅读量: 9197
博客要挂了,在webfaction上无法完成支付。虽说早就买了do的主机,但是一直懒的没有迁过去。这下好了。 美国时间8号之前还没有迁走的话,博客应该会被停机吧。
Nginx主动监测模块upstream check误用导致的502--no live upsteams
分类:Nginx | 标签: | 发布:2015-07-09 5:32 a.m. | 阅读量: 24769
nginx出现502 Bad GateWay的原因大部分情况下应该都不是Nginx的问题,而是后端Server的问题,比如程序挂了,比如响应太慢了。不过有时问题也出在Nginx上,就是我们遇到的这种情况,nginx reload之后一段时间内的访问都是502,error log中大量的no live upstream日志。
nginx+lua+redis vs golang + redis构建高并发应用
分类:Nginx | 标签: | 发布:2015-04-21 5:25 a.m. | 阅读量: 29196
最近在使用nginx+lua+redis做一个系统,来支撑高并发高访问量的应用。开发时突然想到golang是不是也可以达到同样的效果。于是写了个简单的代码对比一下。 具体就不多做介绍了,网上很多关于nginx+lua+redis构建高并发应用的介绍。我使用的是openresty+lua+redis。
【招聘】手机搜狐Python工程师
分类:招聘 | 标签: | 发布:2015-04-10 5:30 a.m. | 阅读量: 22823
2016-11-14更新: 招正式员工,PythonWeb开发工作经验1年以上。&& 【实习生】岗位-要求2017年毕业(211/985大学) 工作内容: 负责搜狐移动门户——手机搜狐(http://m.sohu.com)的开发。
ssh连接远程服务器超时配置
分类:Linux | 标签: | 发布:2015-02-16 5:26 a.m. | 阅读量: 18767
终端上ssh到服务器一段时间不操作就会卡住,得关闭窗口。打开新Tab重连,找了下配置, 以下内容写到 ``~/.ssh/config`` 中:: Host * ServerAliveInterval 120 ConnectTimeout 240
从解决Redis访问超时的问题谈起——故事比结果要精彩
分类:Redis | 标签: | 发布:2015-01-17 11:47 p.m. | 阅读量: 29419
代码应该是历史的结果,不应该把历史平铺到代码中,git log才是历史应该存在的地方。 说人话就是:业务的增加不仅仅是增加代码,有时也是要对现有结构进行抽象和重构。
其他分类:
|
{
"url": "https://www.the5fire.com/?page=12",
"source_domain": "www.the5fire.com",
"snapshot_id": "CC-MAIN-2023-50",
"warc_metadata": {
"Content-Length": "31419",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CXCNRGMJQ7VC6A5LI6WVYFXKXDINNP4L",
"WARC-Concurrent-To": "<urn:uuid:7e3d95f9-4e1c-4231-ba9c-7295964a6517>",
"WARC-Date": "2023-11-29T14:19:35Z",
"WARC-IP-Address": "132.232.159.245",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HJZGAKI3BQRWX5TUJZHIEUSQAKP6DM5A",
"WARC-Record-ID": "<urn:uuid:bff0ea31-1619-4337-859c-b9f832e5f1dc>",
"WARC-Target-URI": "https://www.the5fire.com/?page=12",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:0cf6ff49-35d3-40d2-afd1-65d1f73e803b>"
},
"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-66\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,
9,
10,
83,
84,
92,
93,
145,
146,
285,
286,
303,
304,
358,
359,
379,
380,
390,
391,
447,
448,
597,
598,
607,
608,
666,
667,
823,
824,
834,
835,
887,
888,
970,
971,
1023,
1024,
1088,
1089,
1252,
1253,
1294,
1295,
1357,
1358,
1509,
1510,
1528,
1529,
1586,
1587,
1703,
1704,
1719,
1720,
1778,
1779,
1902,
1903,
1931,
1932,
1997,
1998,
2081,
2082
],
"line_end_idx": [
9,
10,
83,
84,
92,
93,
145,
146,
285,
286,
303,
304,
358,
359,
379,
380,
390,
391,
447,
448,
597,
598,
607,
608,
666,
667,
823,
824,
834,
835,
887,
888,
970,
971,
1023,
1024,
1088,
1089,
1252,
1253,
1294,
1295,
1357,
1358,
1509,
1510,
1528,
1529,
1586,
1587,
1703,
1704,
1719,
1720,
1778,
1779,
1902,
1903,
1931,
1932,
1997,
1998,
2081,
2082,
2087
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2087,
"ccnet_original_nlines": 64,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.05482041835784912,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0,
"rps_doc_frac_lines_end_with_ellipsis": 0.015384620055556297,
"rps_doc_frac_no_alph_words": 0.8204158544540405,
"rps_doc_frac_unique_words": 0.7862595319747925,
"rps_doc_mean_word_length": 13.007633209228516,
"rps_doc_num_sentences": 26,
"rps_doc_symbol_to_word_ratio": 0.0018903600284829736,
"rps_doc_unigram_entropy": 4.373353958129883,
"rps_doc_word_count": 131,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.020539909601211548,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -149.8450927734375,
"rps_doc_books_importance_length_correction": -149.8450927734375,
"rps_doc_openwebtext_importance": -118.51557159423828,
"rps_doc_openwebtext_importance_length_correction": -118.51557159423828,
"rps_doc_wikipedia_importance": -65.57669830322266,
"rps_doc_wikipedia_importance_length_correction": -65.57669830322266
},
"fasttext": {
"dclm": 0.12919574975967407,
"english": 0.00632194010540843,
"fineweb_edu_approx": 1.2510734796524048,
"eai_general_math": -8.299999763039523e-7,
"eai_open_web_math": 0.5313019156455994,
"eai_web_code": 0.9991796016693115
}
}
|
{
"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.072",
"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": "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": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,232,178,628,275,809,000 |
Setting caller ID before invoking Originate
I have the following in a context in my dialplan:
...
exten => s, n, Set(CALLERID(num)=2125551234)
exten => s, n, Set(CALLERID(name)=MyCompany)
exten => s, n, Originate(${target_resolved},app,Playback,${SOUNDS}/alerts/${filename})
...
However, when this is applied internally the caller ID name and number read “Anonymous” and to outside land/cell lines is simply says “Unknown.” Is there some way to set CALLERID to work with Originate, or is there some possible parameter to pass to Originate to correctly render the desired caller ID?
send callerid in originate packet itself.
example…
fputs($oSocket, “Action: login\r\n”);
fputs($oSocket, “Events: off\r\n”);
fputs($oSocket, “Username: admin\r\n”);
fputs($oSocket, “Secret: admin\r\n\r\n”);
fputs($oSocket, “Action: originate\r\n”);
fputs($oSocket, “Channel: Local/7000@DTMF\r\n”);
fputs($oSocket, “Context: DTMF\r\n”);
fputs($oSocket, “CallerId: 9810265812\r\n”);//setting callerId …
fputs($oSocket, “Exten: 7000\r\n”);
fputs($oSocket, “Priority: 1\r\n\r\n”);
fputs($oSocket, “Action: Logoff\r\n\r\n”);
Callerid is available on AMI Originates, but not dialplan originates.
I think you need to originate to a local channel, and have that set the caller ID and do the real Dial.
|
{
"url": "https://community.asterisk.org/t/setting-caller-id-before-invoking-originate/40527",
"source_domain": "community.asterisk.org",
"snapshot_id": "crawl=CC-MAIN-2020-40",
"warc_metadata": {
"Content-Length": "18725",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MVCA3Q7AVTLXBVCLCPR3FLBZ3P7YDGN4",
"WARC-Concurrent-To": "<urn:uuid:4dc8d5f0-c054-4450-bbfb-6aa7a2012cf1>",
"WARC-Date": "2020-10-01T17:08:37Z",
"WARC-IP-Address": "216.218.159.25",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:GHJRPQWV6MNKZP7HNST2JD2UIOLN7LJO",
"WARC-Record-ID": "<urn:uuid:d5358521-5432-41a9-b3a0-2ee12ae6a544>",
"WARC-Target-URI": "https://community.asterisk.org/t/setting-caller-id-before-invoking-originate/40527",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fad484d5-9628-4b43-89c4-5c62bf419464>"
},
"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-204.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,
44,
45,
95,
96,
102,
149,
196,
285,
291,
292,
595,
596,
638,
639,
648,
649,
687,
723,
763,
805,
847,
896,
934,
999,
1035,
1075,
1118,
1119,
1189,
1190
],
"line_end_idx": [
44,
45,
95,
96,
102,
149,
196,
285,
291,
292,
595,
596,
638,
639,
648,
649,
687,
723,
763,
805,
847,
896,
934,
999,
1035,
1075,
1118,
1119,
1189,
1190,
1293
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1293,
"ccnet_original_nlines": 30,
"rps_doc_curly_bracket": 0.004640370141714811,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.272455096244812,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03892216086387634,
"rps_doc_frac_lines_end_with_ellipsis": 0.12903225421905518,
"rps_doc_frac_no_alph_words": 0.39520958065986633,
"rps_doc_frac_unique_words": 0.6143791079521179,
"rps_doc_mean_word_length": 6.300653457641602,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0.011976050212979317,
"rps_doc_unigram_entropy": 4.266358375549316,
"rps_doc_word_count": 153,
"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.03319501876831055,
"rps_doc_frac_chars_top_3gram": 0.021784229204058647,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -103.46367645263672,
"rps_doc_books_importance_length_correction": -103.46367645263672,
"rps_doc_openwebtext_importance": -91.38811492919922,
"rps_doc_openwebtext_importance_length_correction": -91.38811492919922,
"rps_doc_wikipedia_importance": -39.858463287353516,
"rps_doc_wikipedia_importance_length_correction": -39.85845947265625
},
"fasttext": {
"dclm": 0.45753753185272217,
"english": 0.7184635400772095,
"fineweb_edu_approx": 1.1295922994613647,
"eai_general_math": 0.8270693421363831,
"eai_open_web_math": 0.4358019232749939,
"eai_web_code": 0.9382659792900085
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "621.392",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Engineering",
"level_3": "Mechanical engineering and Machinery"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,927,100,362,819,347,000 |
momepy.Corners
class momepy.Corners(gdf)[source]
Calculates number of corners of each object in given geoDataFrame.
Uses only external shape (shapely.geometry.exterior), courtyards are not included.
\[\sum corner\]
Parameters
gdfGeoDataFrame
GeoDataFrame containing objects
Examples
>>> buildings_df['corners'] = momepy.Corners(buildings_df).series
100%|██████████| 144/144 [00:00<00:00, 1042.15it/s]
>>> buildings_df.corners[0]
24
Attributes
seriesSeries
Series containing resulting values
gdfGeoDataFrame
original GeoDataFrame
__init__(self, gdf)[source]
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(self, gdf)
Initialize self.
|
{
"url": "http://docs.momepy.org/en/latest/generated/momepy.Corners.html",
"source_domain": "docs.momepy.org",
"snapshot_id": "crawl=CC-MAIN-2019-47",
"warc_metadata": {
"Content-Length": "11956",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FHRHRSPQWHVPMEDQCPMP4SPQOPKXV675",
"WARC-Concurrent-To": "<urn:uuid:759ba329-8e47-4f39-b584-3c33d02ccbf3>",
"WARC-Date": "2019-11-18T20:22:29Z",
"WARC-IP-Address": "104.17.33.82",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:RVTIH2YQVFMUDSTEZGAOWZA7Y3KSRPLF",
"WARC-Record-ID": "<urn:uuid:afad646f-7307-42ae-91e5-f4e787f7d258>",
"WARC-Target-URI": "http://docs.momepy.org/en/latest/generated/momepy.Corners.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:dd522ac8-858d-4549-9765-09e186a227b8>"
},
"warc_info": "isPartOf: CC-MAIN-2019-47\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-161.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,
15,
16,
50,
51,
118,
119,
202,
203,
219,
230,
246,
247,
279,
280,
289,
290,
356,
408,
436,
439,
450,
463,
464,
499,
500,
516,
517,
539,
540,
568,
569,
631,
632,
640,
641,
661,
662
],
"line_end_idx": [
15,
16,
50,
51,
118,
119,
202,
203,
219,
230,
246,
247,
279,
280,
289,
290,
356,
408,
436,
439,
450,
463,
464,
499,
500,
516,
517,
539,
540,
568,
569,
631,
632,
640,
641,
661,
662,
678
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 678,
"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.13740457594394684,
"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.4351145029067993,
"rps_doc_frac_unique_words": 0.868852436542511,
"rps_doc_mean_word_length": 8.622950553894043,
"rps_doc_num_sentences": 13,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.9204869270324707,
"rps_doc_word_count": 61,
"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.05323193967342377,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -50.4520149230957,
"rps_doc_books_importance_length_correction": -55.95901107788086,
"rps_doc_openwebtext_importance": -23.190536499023438,
"rps_doc_openwebtext_importance_length_correction": -28.69753074645996,
"rps_doc_wikipedia_importance": -9.154594421386719,
"rps_doc_wikipedia_importance_length_correction": -14.661588668823242
},
"fasttext": {
"dclm": 0.034147799015045166,
"english": 0.6006790399551392,
"fineweb_edu_approx": 3.211937665939331,
"eai_general_math": 0.9908968210220337,
"eai_open_web_math": 0.05858052149415016,
"eai_web_code": 0.9962471723556519
}
}
|
{
"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": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,843,148,489,566,481,000 |
Skip to main content
Accessibility Resource Center Skip to main content
Have a phone you love? Get up to $500 when you bring your phone. OR get iPhone 13, on us for a limited time. With Select 5G Unlimited plans. Buy now
end of navigation menu
DSL Highspeed?
annabanna1
Newbie
Download - 2.90 Mbps
Uplaod - 0.75 Mbps
This is supposed to be high speed!?
0 Likes
Re: DSL Highspeed?
smith6612
Super User
Super User
It's "high speed" depending on what you're doing. Beats dial-up and I'm sure the DSL is beating out satellite and LTE for latency.
Do you want to see if it's possible to get your speed turned up (at no cost, since you already have 3Mbps) to something that matches the FCC's definition of broadband? If so, I just need to start off with the make and model of your modem.
0 Likes
Re: DSL Highspeed?
annabanna1
Newbie
I have a Llinksys Wireless G, 2.4 GHz Router. Model WRT54G. Thank you very much for your help!!
0 Likes
Re: DSL Highspeed?
smith6612
Super User
Super User
Good to know about the router. Is there another device plugged into the router, such as a Westell DSL modem at all? Basically, what is plugged into the "Internet" port?
0 Likes
Re: DSL Highspeed?
annabanna1
Newbie
Mac Only.
0 Likes
Re: DSL Highspeed?
Julien1
Newbie
I supposedly have 50/25 and I do get the same speeds you are getting (during prime time - 7 to 9).
0 Likes
Re: DSL Highspeed?
dslr595148
Super User
Super User
@annabanna wrote:
Mac Only.
That is what is connected by wire to one of the RJ-45 LAN ports of the (OR is connected by wireless to the) router.
We want to know what is connected to the WAN/Internet/To Modem port of the router.
0 Likes
|
{
"url": "https://community.verizon.com:443/t5/Home-Internet-Fios-and-High/DSL-Highspeed/td-p/1626752",
"source_domain": "community.verizon.com:443",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "339827",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:H3DPN763IQJROPWEILX37MOZSXUMX6JU",
"WARC-Concurrent-To": "<urn:uuid:7cb88758-14bb-4370-81bf-0dda2d3084e1>",
"WARC-Date": "2023-03-28T07:36:33Z",
"WARC-IP-Address": "18.67.76.107",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:S3YI3ON62XNRQCWSTRZTDTEONAD3H5Y6",
"WARC-Record-ID": "<urn:uuid:22edac8b-c15e-4cf4-ae20-d9a3cef0babf>",
"WARC-Target-URI": "https://community.verizon.com:443/t5/Home-Internet-Fios-and-High/DSL-Highspeed/td-p/1626752",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9828ac98-4358-4872-a4b9-3cb58a739d81>"
},
"warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-142\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
21,
72,
221,
244,
259,
270,
277,
278,
299,
300,
319,
320,
356,
357,
365,
384,
394,
405,
416,
417,
548,
549,
788,
789,
797,
816,
827,
834,
835,
934,
935,
943,
962,
972,
983,
994,
995,
1164,
1165,
1173,
1192,
1203,
1210,
1211,
1221,
1222,
1230,
1249,
1257,
1264,
1265,
1365,
1366,
1374,
1393,
1404,
1415,
1426,
1427,
1445,
1446,
1456,
1457,
1458,
1574,
1575,
1658,
1659
],
"line_end_idx": [
21,
72,
221,
244,
259,
270,
277,
278,
299,
300,
319,
320,
356,
357,
365,
384,
394,
405,
416,
417,
548,
549,
788,
789,
797,
816,
827,
834,
835,
934,
935,
943,
962,
972,
983,
994,
995,
1164,
1165,
1173,
1192,
1203,
1210,
1211,
1221,
1222,
1230,
1249,
1257,
1264,
1265,
1365,
1366,
1374,
1393,
1404,
1415,
1426,
1427,
1445,
1446,
1456,
1457,
1458,
1574,
1575,
1658,
1659,
1666
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1666,
"ccnet_original_nlines": 68,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.33509233593940735,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06332454085350037,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.22955144941806793,
"rps_doc_frac_unique_words": 0.5083612203598022,
"rps_doc_mean_word_length": 4.247491836547852,
"rps_doc_num_sentences": 31,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.683350563049316,
"rps_doc_word_count": 299,
"rps_doc_frac_chars_dupe_10grams": 0.07401575148105621,
"rps_doc_frac_chars_dupe_5grams": 0.16220471262931824,
"rps_doc_frac_chars_dupe_6grams": 0.13070866465568542,
"rps_doc_frac_chars_dupe_7grams": 0.13070866465568542,
"rps_doc_frac_chars_dupe_8grams": 0.07401575148105621,
"rps_doc_frac_chars_dupe_9grams": 0.07401575148105621,
"rps_doc_frac_chars_top_2gram": 0.06614173203706741,
"rps_doc_frac_chars_top_3gram": 0.037795279175043106,
"rps_doc_frac_chars_top_4gram": 0.05196850001811981,
"rps_doc_books_importance": -173.49595642089844,
"rps_doc_books_importance_length_correction": -160.22640991210938,
"rps_doc_openwebtext_importance": -88.2444076538086,
"rps_doc_openwebtext_importance_length_correction": -88.2444076538086,
"rps_doc_wikipedia_importance": -59.1531867980957,
"rps_doc_wikipedia_importance_length_correction": -47.74427032470703
},
"fasttext": {
"dclm": 0.04203050956130028,
"english": 0.9216805696487427,
"fineweb_edu_approx": 0.9828133583068848,
"eai_general_math": 0.0005213600234128535,
"eai_open_web_math": 0.281303346157074,
"eai_web_code": -0.000008230000275943894
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.665",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "621.3846",
"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": "1",
"label": "Factual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,419,543,622,303,168,000 |
Dismiss
Announcing Stack Overflow Documentation
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
Sign up and start helping → Learn more about Documentation →
I'm wondering about this sample piece of code:
int main()
{
char *p ;
char arr[100] = "Hello";
if ((p=arr)[0] == 'H') // do stuffs
}
Is this code actually well formed in C++03?
My argument is that the side effect of = is completed only after the next sequence point and since we are accessing the result of p=arr the code might not be well formed, there is no ordering between = and [] operations.
Am I correct?
The behavior is well defined in C and in C++11. This code is actually derived from MySQL.
share|improve this question
19
The code in the title doesn't appear in the code sample you've given. – Porges Jan 13 '12 at 3:38
3
Is ( (a=b) + x) well-defined? If it is well-defined, then (p=arr)[0] would be well-defined as well, for it is equivalent to *((p=arr) + 0) – Nawaz Jan 13 '12 at 3:38
1
@Prasoon: According to your argument, int x = ++i + n invokes UB? Because according to you, the reason should be : the side effect of ++ is completed only after the next sequence point and since we are accessing the result of ++i the code might not be well formed. Is it? – Nawaz Jan 13 '12 at 3:42
@Nawaz : you seemed to have agreed with me last night, didn't you? – Prasoon Saurav Jan 13 '12 at 4:27
2
¤ The easy way to decide is to consider idioms such as while( (c = getchar()) != EOF ). That just has to be well-defined, since it's used so much. Case closed. Of course the C++03 standard's "after the assignment has taken place" is open for interpretation: it can mean that no matter the evaluation order, the stored value will be the result, or it can mean that the stored value is only available after the assignment. But the idiom argument clinches what the intended meaning must have been. Cheers & hth., – Cheers and hth. - Alf Jan 13 '12 at 4:38
up vote 24 down vote accepted
Of course it's well-defined.
It doesn't matter when the assignment p=arr takes place. You aren't evaluating p[0], you're subscripting the result of (p=arr), which is the pointer value which is being stored into p. Whether or not it's been stored yet doesn't change the value, and the value is known irrespective of whether p has been modified yet.
Similarly, in *--p, there's no undefined behavior. There'd only be undefined behavior if the same variable was accessed twice, including at least one write, between sequence points. But p is only accessed once, as part of --p. It isn't read again (*p), the dereferencing operator is applied to the result of --p which is a well-defined pointer value.
Now, this would be undefined behavior:
void* a;
void* p = &a;
reinterpret_cast<void**>(p = &p)[0] = 0;
as would
int *pi = new int[5];
int i = **&++pi;
It should be clear that the result of a preincrement is not a read unordered with the write, because to assert that there is a race is to assert that ++p can never be used as an rvalue, in which case it must stand alone between sequence points, and post-increment could be used instead. There would be no advantage to having both pre-increment and post-increment in the language.
share|improve this answer
2
To any future readers, please see this meta post: meta.stackexchange.com/questions/118996/… – Mysticial Jan 13 '12 at 22:15
1
Also, a transcript of the deleted comments can be found here: i.stack.imgur.com/f4rIE.png – Robert Harvey Jan 13 '12 at 22:21
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/8845569/is-p-actually-legalwell-formed-in-c03/8845623",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "83655",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GRQBBNVX2CSIARZ2LLRAND4XMHEL72KG",
"WARC-Concurrent-To": "<urn:uuid:6a772549-7573-4ce7-887b-48306d7c047d>",
"WARC-Date": "2016-07-25T16:19:48Z",
"WARC-IP-Address": "151.101.129.69",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:2QB2O2C6VCFS3NDC54FXEZEAK6VQAOTW",
"WARC-Record-ID": "<urn:uuid:8af475f5-5dbf-4375-9bbe-29b6ed033072>",
"WARC-Target-URI": "http://stackoverflow.com/questions/8845569/is-p-actually-legalwell-formed-in-c03/8845623",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1231f957-ac39-4323-a530-bb3973f90126>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-185-27-174.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-30\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for July 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
8,
48,
49,
126,
127,
202,
203,
264,
265,
312,
313,
324,
326,
339,
367,
406,
408,
409,
453,
454,
675,
676,
690,
691,
781,
782,
810,
815,
913,
917,
1083,
1087,
1386,
1391,
1494,
1498,
2051,
2081,
2082,
2111,
2112,
2431,
2432,
2783,
2784,
2823,
2824,
2833,
2847,
2888,
2889,
2898,
2899,
2921,
2938,
2939,
3319,
3320,
3346,
3350,
3474,
3478,
3604,
3605,
3617,
3618,
3620,
3628,
3629,
3707,
3708
],
"line_end_idx": [
8,
48,
49,
126,
127,
202,
203,
264,
265,
312,
313,
324,
326,
339,
367,
406,
408,
409,
453,
454,
675,
676,
690,
691,
781,
782,
810,
815,
913,
917,
1083,
1087,
1386,
1391,
1494,
1498,
2051,
2081,
2082,
2111,
2112,
2431,
2432,
2783,
2784,
2823,
2824,
2833,
2847,
2888,
2889,
2898,
2899,
2921,
2938,
2939,
3319,
3320,
3346,
3350,
3474,
3478,
3604,
3605,
3617,
3618,
3620,
3628,
3629,
3707,
3708,
3798
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3798,
"ccnet_original_nlines": 71,
"rps_doc_curly_bracket": 0.0005265899817459285,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4065573811531067,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.012021860107779503,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.28961747884750366,
"rps_doc_frac_unique_words": 0.4409937858581543,
"rps_doc_mean_word_length": 4.3913044929504395,
"rps_doc_num_sentences": 41,
"rps_doc_symbol_to_word_ratio": 0.0010929000563919544,
"rps_doc_unigram_entropy": 5.182082176208496,
"rps_doc_word_count": 644,
"rps_doc_frac_chars_dupe_10grams": 0.0622347891330719,
"rps_doc_frac_chars_dupe_5grams": 0.09724187105894089,
"rps_doc_frac_chars_dupe_6grams": 0.09193777292966843,
"rps_doc_frac_chars_dupe_7grams": 0.08132956176996231,
"rps_doc_frac_chars_dupe_8grams": 0.0622347891330719,
"rps_doc_frac_chars_dupe_9grams": 0.0622347891330719,
"rps_doc_frac_chars_top_2gram": 0.012376240454614162,
"rps_doc_frac_chars_top_3gram": 0.017326729372143745,
"rps_doc_frac_chars_top_4gram": 0.0222772303968668,
"rps_doc_books_importance": -438.0074768066406,
"rps_doc_books_importance_length_correction": -438.0074768066406,
"rps_doc_openwebtext_importance": -270.9617614746094,
"rps_doc_openwebtext_importance_length_correction": -270.9617614746094,
"rps_doc_wikipedia_importance": -195.75059509277344,
"rps_doc_wikipedia_importance_length_correction": -195.75059509277344
},
"fasttext": {
"dclm": 0.0755152702331543,
"english": 0.9339266419410706,
"fineweb_edu_approx": 1.84860360622406,
"eai_general_math": 0.10319160670042038,
"eai_open_web_math": 0.20083552598953247,
"eai_web_code": 0.028640270233154297
}
}
|
{
"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": "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": "-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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,303,757,998,749,796,000 |
Java Tic-Tac-Toe
Basic Java program to play tic-tac-toe. Originally developed around 2001.
No AI or anyhthing here. Just a set of pre-programmed decisions based on a specific play strategy.
Easy mode is basically random choose.
Medium mode uses a center-move based strategy and will block the user.
Hard mode uses a center-move based strategy, will avoid traps, and try to pin the user in a trap.
Download
|
{
"url": "https://www.werbweb.com/java-tic-tac-toe/",
"source_domain": "www.werbweb.com",
"snapshot_id": "crawl=CC-MAIN-2021-21",
"warc_metadata": {
"Content-Length": "17952",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UY2MD6P5HYSFFQ6EKXW3UVM5VETTMYIH",
"WARC-Concurrent-To": "<urn:uuid:fd69ec84-26a9-433d-a1bf-73e129f062c9>",
"WARC-Date": "2021-05-11T03:12:49Z",
"WARC-IP-Address": "208.113.215.193",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IJB5JRIPJWY6QKMQHO2MWF4GXVJHNHOE",
"WARC-Record-ID": "<urn:uuid:8c485017-3d6d-4080-8d70-9cad81a20587>",
"WARC-Target-URI": "https://www.werbweb.com/java-tic-tac-toe/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bc22af08-0248-44cb-b08c-23c17d206329>"
},
"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-167.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,
17,
18,
92,
93,
192,
193,
231,
232,
303,
304,
402,
403
],
"line_end_idx": [
17,
18,
92,
93,
192,
193,
231,
232,
303,
304,
402,
403,
411
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 411,
"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.25555557012557983,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01111111044883728,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.18888889253139496,
"rps_doc_frac_unique_words": 0.7014925479888916,
"rps_doc_mean_word_length": 4.820895671844482,
"rps_doc_num_sentences": 8,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.7301008701324463,
"rps_doc_word_count": 67,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.198142409324646,
"rps_doc_frac_chars_dupe_6grams": 0.198142409324646,
"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.0495355986058712,
"rps_doc_frac_chars_top_3gram": 0.05572754889726639,
"rps_doc_frac_chars_top_4gram": 0.11764705926179886,
"rps_doc_books_importance": -43.43110656738281,
"rps_doc_books_importance_length_correction": -43.43111801147461,
"rps_doc_openwebtext_importance": -31.311861038208008,
"rps_doc_openwebtext_importance_length_correction": -31.311872482299805,
"rps_doc_wikipedia_importance": -26.790599822998047,
"rps_doc_wikipedia_importance_length_correction": -26.79060935974121
},
"fasttext": {
"dclm": 0.155706524848938,
"english": 0.9001360535621643,
"fineweb_edu_approx": 2.2141919136047363,
"eai_general_math": 0.25436103343963623,
"eai_open_web_math": 0.0936179831624031,
"eai_web_code": 0.005704579874873161
}
}
|
{
"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.1",
"labels": {
"level_1": "Arts",
"level_2": "Amusements and Recreation",
"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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "17",
"label": "Product Page"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,487,373,731,683,476,000 |
\documentclass[nocolor,memo]{j3} \renewcommand{\hdate}{31 January 2004} \renewcommand{\vers}{J3/04-122r1} \usepackage{alltt} \usepackage{lineno} \usepackage{longtable} \usepackage{xr} \externaldocument{007} \input pdftest \begin{document} \vspace{-10pt} \begin{tabbing} Subject: \hspace*{0.25in}\=Physical or engineering units\\ From: \>Van Snyder\\ Reference: \>03-258r1, section 1.2\\ \end{tabbing} \pagewiselinenumbers \leftlinenumbers \linenumbers* \section{Number} TBD \section{Title} Physical or engineering units \section{Submitted By} J3 \section{Status} For consideration. \section{Basic Functionality} Provide for numeric variables and named constants to have physical or engineering units such as length, mass, area, temperature\dots. ``Compute'' and check units for expressions and assignment at compile time. Verify that units for corresponding actual and dummy arguments are identical at compile time if an explicit interface is available. (A processor could provide for checking units for corresponding actual and dummy arguments at run time, which would be useful when procedures without explicit interface are used, but this should not be required by the standard.) Input and output units. Convert numeric values during formatted, namelist or list-directed input and output if the item has units, a conversion expression is defined, and unit input/output is requested. It may be possible to apply units to derived types, which would be useful for such user-defined types as intervals or extended-precision numbers. This proposal does not include a provision for doing so. It does not appear to be sensible to apply units to objects of character or logical type. \section{Rationale} Incorrect use of physical units is the second-most-common error in scientific or engineering software, coming immediately after mismatching the types of actual and dummy arguments. Explicit interfaces largely solve the second problem, but do nothing directly for the first. (One can use derived types to provide a physical units system, at the expense of redefining assignment and all of the necessary operations and intrinsic functions.) A particularly expensive ($\approx$ \$$3\times10^8$) and embarrassing example of an units mistake was the the cause of the loss of the Mars Climate Orbiter. The loss resulted because the NASA contract required small forces, e.g. from attitude-control maneuvers, to be reported in Newton-Seconds, but Lockheed nonetheless reported them in Pound-Seconds. (This was quite inscrutable, as Lockheed had had contracts with JPL for over thirty years, and they've \emph{always} specified SI units.) \section{Estimated Impact} In terms of changes to the standard, this is a substantial project, requiring changes in Sections 4, 5, 6, 8, 10, and 13. Determining the units of an expression, checking units of subexpressions, and doing conversions automatically, is not tremendously difficult --- I've already done it in an expression evaluator for an input routine. \section{Detailed Specification} Define a new UNIT attribute or type parameter (call it what you will) that can be specified for any numeric variable or named constant. Literal constants are unitless except in one case explained below. Four varieties of units are defined: \emph{Atomic} units are not defined in terms of any other units. \emph{Composite} units are defined in terms of atomic units or other composite units. \emph{Value-converting} units convert values according to specified linear conversions. \emph{Abstract units} are provided to specify the relation between units for dummy arguments and function results. They can be either atomic or composite, but not value-converting. Non-abstract units participate in generic resolution; abstract units do not. Multiplication and division operations on units are defined. Exponentiation by an unitless integer constant is defined to be equivalent to repeated multiplication or division. Each unit declaration creates a \emph{unit coercion function} having the same name as the unit, that takes an argument with any unit, and coerces it to have the unit specified by the name of the function. If the unit of the argument and the result are related by a linear conversion expression, value conversion is also implied. There is an intrinsic UNITLESS coercion function. Quantities can be added, subtracted, assigned, or compared by relational operations only if they have equivalent units. Atomic and value-converting units are equivalent by name. Composite units are equivalent by structure. If a dummy argument has a unit that is not abstract, the associated actual argument shall have an equivalent unit. Abstract units allow enforcing a particular relation between the units, without requiring particular units. For example, the SQRT intrinsic function result has abstract units A, and its argument has abstract units A*A. If a dummy argument has an abstract unit, the associated actual argument can have any unit, but if several dummy arguments have abstract units, the units of their corresponding actual arguments shall be related in the same way as the units of the dummy arguments. If a function result has an abstract unit, and that unit is related to units of dummy arguments, the unit of the result of invoking the function is related to the actual arguments in the same way. There is an intrinsic RADIAN unit, and a parallel set of generic intrinsic trigonometric functions that take RADIAN arguments and produce unitless results. All of the remaining intrinsic procedures have arguments with abstract units and results that are unitless (e.g. SELECTED\_INT\_KIND) or have the same units as their argument (e.g. TINY). Because function results do not participate in generic resolution, it is not possible to have a parallel set of generic intrinsic inverse trigonometric functions that return RADIAN results. It may be useful to provide an intrinsic module that has some public units and procedures, e.g. units TICK and SECOND and a SYSTEM\_CLOCK module procedure that has arguments with units TICK, TICK/SECOND and SECOND. When quantities are added or subtracted, the units of the result are the same as the units of the operands. When quantities are multiplied or divided, the units of the result are the units that result from applying the operation to the operands' units. Multiplication or division by an unitless operand produces a result having the same units as the other operand. Exponentiation by an unitless integer constant is defined to be equivalent to multiplication or division. In an exponentiation operation, the exponent shall be unitless. For intrinsic assignment, the units shall be the same. There are two forms of the UNIT statement. One without (~\si{unit-name}~) declares and defines units. Units are declared to be atomic by appearing without a definition. Units are declared to be composite or value-converting by having a defining expression that uses literal constants, unitless named constants, multiplication, division, exponentiation by an unitless integer, previously-declared unit names, and, in the case of value-converting units, addition or subtraction. Units are declared to be abstract by having the ABSTRACT attribute in their declarations. A nonatomic abstract unit shall be defined in terms of abstract units. Value-converting units are defined using linear expressions equivalent in form to $U = [\,a\,]\, U^\prime\, [\, \pm \, b\, ]$, where $U$ is thereby declared to be an unit name, $U^\prime$ is required to be a previously declared nonabstract unit name, and $a \neq 0$ and $b$ are unitless numeric initialization expressions. A value-converting unit is defined even if $a$ is absent or one and $b$ is absent or zero. In these expressions, $a$ is considered to have units $U/U^\prime$ and $b$ is considered to have units $U$, but we can't say that since $U$ isn't defined yet. This is the only case where literal constants are not unitless. This explicitly defines a conversion function from $U$ to $U^\prime$ and implicitly defines its inverse (always possible because $a$ is required to be nonzero). Although $U^\prime$ need not be atomic, if it is atomic it remains atomic even though an inverse conversion is defined. Value-converting functions are generic, since there may be several implicitly-defined inverse conversions. Neither $U$ nor $U^\prime$ shall be abstract. Value conversions are transitive. Since each unit can only be declared once, and cannot be referenced before being declared, an explicitly circular dependence of conversions is impossible. There will usually be an atomic unit involved in one of the value conversions, but a composite unit is possible. There are examples of transitive conversions, multiple implicit conversions, and conversions that depend on nonatomic units below. Value conversion is implied during input or explicit units conversion using the units conversion function implied by the unit declaration or its inverse, provided the argument or input value is related to the result or input list item by a sequence of explicit or implicit conversions. Value conversion does not occur during intrinsic assignment (this could be an extension), argument association or output. When conversion is applied, all constants within $a$ and $b$ are converted to the kind of the argument expression or input list item. This specification could interact with the proposal to include function result types in the criteria for generic resolution. \begin{boxit} The Mars Climate Orbiter crashed because quantities with the wrong units were written by one program, and assumed to have the correct units by another program. Automatic units checking and value conversion would have let Lockheed use whatever units they wanted to use, so long as the JPL software had the unit name, and the appropriate conversion, available. If JPL software insisted on units, and the Lockheed data were unitless, or used units that JPL software did not specify, the error would have been detected. \end{boxit} In all other unit-defining expressions, the only constants allowed are 1 and 1.0, or named constants having those values. Variables or named constants are declared to have units by specifying UNIT(\emph{unit-name}) in their declarations, *\emph{unit-name} after their names in declaration statements, or by an UNIT(~\si{unit-name}~) statement. UNIT(~\si{unit-name}~) is allowed in the \si{prefix} of a \si{function-stmt}. There is an optional U[w] suffix to numeric format descriptors, that causes units to be output by write statements, or input and checked by read statements. The text of the unit that is output, or checked during input, is the same as the unit name, except that case of letters is not significant. There is a specification in OPEN, READ and WRITE statements that controls whether units for numeric quantities that have units are to be output (checked) by namelist or list-directed output (input). There is a specification for the INQUIRE statement to inquire whether this mode is set by an OPEN statement for a connection. A single specification, rather than separate ones for namelist and list-directed transfers, is adequate. Some thought and debate will be necessary to decide what to do about input and output of arrays that have units. Should the value in the input for every element be required to specify its units, or is it enough that at least one does? If one is enough should it be specified to be first (or last)? Should units be provided for every element of output, or is one enough? There is not a problem for array constructors, since they can be wrapped with an units coercion or conversion function. \subsection{Examples} \subsubsection{Atomic and composite units} \begin{alltt} UNIT :: INCH, SECOND UNIT :: CM, INCH_TO_CM = CM / INCH REAL, PARAMETER, UNIT(INCH_TO_CM) :: CONVERT = INCH_TO_CM(2.54) UNIT :: SQINCH = INCH * INCH ! or INCH ** 2 UNIT :: IPS = INCH / SECOND, Hz = 1 / SECOND ! or SECOND ** (-1) REAL, UNIT(SQINCH) :: A REAL, UNIT(Hz) :: F REAL, UNIT(INCH) :: L, L2, C*CM REAL, UNIT(SECOND) :: T REAL :: V UNIT(IPS) :: V V = A + L ! INVALID -- SQINCH cannot be added to INCH, ! and neither one can be assigned to IPS V = IPS(A + SQINCH(L)) ! VALID -- I'm screwing this up intentionally V = (A / L + L2) / T ! VALID -- IPS is compatible with INCH / SECOND A = L * L2 ! VALID -- SQINCH is compatible with INCH * INCH F = V / L ! VALID -- units of LHS and RHS are both 1/SECOND C = CONVERT * L ! VALID -- CM / INCH * INCH = CM L = SQRT(A) * 5.0e-3 ! VALID -- exercise for reader \end{alltt} \subsubsection{Abstract units} \begin{alltt} INTERFACE REAL UNIT(UR) FUNCTION CBRT ( A ) UNIT, ABSTRACT :: UR, UA = UR**3 REAL, UNIT(UA) :: A END FUNCTION CBRT END INTERFACE \end{alltt} \subsubsection{Value-converting units} \begin{alltt} UNIT :: MHz = 1.0e6 * Hz, GHz = 1000 * MHz, KHz = 0.001 * MHz UNIT :: F, C = ( F - 32 ) * 5.0 / 9.0 ! Also defines (atomic) F = 1.8 * C + 32.0 UNIT :: DEGREES = 45.0 * RADIAN / ATAN(1.0) REAL, UNIT(Radian) :: Angle = Degrees(45) ! = Radian(0.785398163) REAL, UNIT(MHz) :: Frq = MHz(3310.0) REAL, UNIT(C) :: Temp = F(212.0) ! = C(100.0) ... CHARACTER(32) :: LINE WRITE(LINE,*,UNITS="yes") GHz(Frq), F(Temp), Degrees(Angle) READ(LINE,*,UNITS="yes") Frq, Temp, Angle \end{alltt} Execution of the {\tt WRITE} statement causes LINE to have the value {\tt "3.31 GHz 212.0 F 45.0 Degrees"} (approximately). Execution of the {\tt READ} statement causes the variables {\tt Frq}, {\tt Temp} and {\tt Angle} to get their original values (approximately). Notice that {\tt MHz(3.31)}, {\tt C(212)} and {\tt Radian(45)} have values 3.31, 212 and 45 respectively, with units {\tt MHz}, {\tt C} and {\tt Radian} respectively, not 3310.0, 100.0 and 0.785398163 respectively, since generic resolution selects the simple unit-coercion functions, not the conversion ones, for unitless arguments. Input of the form {\tt "3.3021148036e-10 Second 212 F 45 Degrees"} is not permitted, since the declaration of {\tt Hz} does not define a value-converting unit. If we have \begin{alltt} REAL(kind(0.0d0)), UNIT(Radian) :: AngleD \end{alltt} then in {\tt Degrees(AngleD)} the {\tt 1.0} that is the argument of {\tt ATAN} in the definition of the {\tt Degrees} conversion function is converted to {\tt 1.0d0}. \section{History} \label{lastpage} \end{document}
|
{
"url": "http://j3-fortran.org/doc/meeting/167/04-122r1.tex",
"source_domain": "j3-fortran.org",
"snapshot_id": "crawl=CC-MAIN-2016-36",
"warc_metadata": {
"Content-Length": "14926",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MHXVDCGLB5G2C6WON7ZPKYRDKKFZCPMD",
"WARC-Concurrent-To": "<urn:uuid:c74f105e-d099-405b-a679-b06b27a5a481>",
"WARC-Date": "2016-08-26T19:58:14Z",
"WARC-IP-Address": "192.43.244.245",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:3546YV4NGTLYF6GFXQVLFZ3FWFSJICSZ",
"WARC-Record-ID": "<urn:uuid:150215ff-261d-4a8a-8f14-7ffab04c15a4>",
"WARC-Target-URI": "http://j3-fortran.org/doc/meeting/167/04-122r1.tex",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bb7b96fd-45a3-4c9b-a582-f1e5381e5552>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-153-172-175.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-36\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0
],
"line_end_idx": [
14335
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 14335,
"ccnet_original_nlines": 0,
"rps_doc_curly_bracket": 0.010045340284705162,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3133506178855896,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.07031755894422531,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2773817181587219,
"rps_doc_frac_unique_words": 0.2868582308292389,
"rps_doc_mean_word_length": 5.267075061798096,
"rps_doc_num_sentences": 144,
"rps_doc_symbol_to_word_ratio": 0.0003240400110371411,
"rps_doc_unigram_entropy": 5.513745307922363,
"rps_doc_word_count": 2123,
"rps_doc_frac_chars_dupe_10grams": 0.011804689653217793,
"rps_doc_frac_chars_dupe_5grams": 0.048023611307144165,
"rps_doc_frac_chars_dupe_6grams": 0.029511719942092896,
"rps_doc_frac_chars_dupe_7grams": 0.024145949631929398,
"rps_doc_frac_chars_dupe_8grams": 0.011804689653217793,
"rps_doc_frac_chars_dupe_9grams": 0.011804689653217793,
"rps_doc_frac_chars_top_2gram": 0.008495800197124481,
"rps_doc_frac_chars_top_3gram": 0.005365769844502211,
"rps_doc_frac_chars_top_4gram": 0.0046503301709890366,
"rps_doc_books_importance": -1299.719482421875,
"rps_doc_books_importance_length_correction": -1299.719482421875,
"rps_doc_openwebtext_importance": -787.6544799804688,
"rps_doc_openwebtext_importance_length_correction": -787.6544799804688,
"rps_doc_wikipedia_importance": -500.22308349609375,
"rps_doc_wikipedia_importance_length_correction": -500.22308349609375
},
"fasttext": {
"dclm": 0.4970565438270569,
"english": 0.8373490571975708,
"fineweb_edu_approx": 2.578217029571533,
"eai_general_math": 0.9914423227310181,
"eai_open_web_math": 0.6550448536872864,
"eai_web_code": 0.9736472368240356
}
}
|
{
"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": "530",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Physics",
"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": "2",
"label": "Academic/Research"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "1",
"label": "Leftover HTML"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "4",
"label": "Advanced Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,463,526,575,644,495,000 |
How to Add an Extra Vertical Axis to R Plots
Posted on December 28th, 2012
Especially when analyzing time series, we often need plots with two vertical axes. Researchers often expect the two series to "move together," but with different locations and scales. To show that the series move together, you should give each series its own scale. One vertical scale should appear on the left side of the plot and the other on the right. In this post, I'll show you how to add the extra vertical axis on the right side of the plot.
Generating Sample Data
Let's start by quickly generating two fake time series. This can be done with the code below.
The Problem
Now let's plot the data in the "standard way": plot one series using the high-level plot() function and then add the other series using the low-level lines() function.
This code gives the plot below.
one_vertical_axis_r_plot
You can see one big problem--the second series goes off the scale! (We could fix this particular problem by plotting the series in the opposite order, but that does not work in general.)
A second problem is that the scales of the series are different. Both series are heading to infinity, but the x series is going there more slowly. The x series also has less variability than the y series. Both of these differences suggest we plot the series on different vertical scales. Indeed, our hypothesis usually suggests that the series should "move together," not that particular values of x should correspond to the same values of y.
The Solution
You can easily add a separate vertical scale using the par(new=TRUE) command between two calls to the high-level plot() function. The code below does just this.
This code produces the figure below.
two_vertical_axes_r_plot_partial
We can see from this plot that the two series indeed move together. Also notice two details of this plot. First, the vertical axes (one is plotted over the other on the left side) have different scales. Second, the horizontal axes are on the same scale (you can tell because R is plotting the exact same axis twice, making the axis fuzzy).
Now we just need to clean up the plot a little, moving one axis to the right side of the figure, plotting the horizontal axis only once, and cleaning up the labeling a little. Note that R defaults for axes and axis notation are not the best, but I deal with that in a separate post. For this exercise, I use the R defaults when they make sense, even if they are not the most aesthetically pleasing.
I make the following changes.
1. Adjust the mar option in the graphical parameters to give me a little more room for constructing the vertical axis on the right side.
2. Add the xlab="x" argument to the first plot() function call. This improves the label of the vertical axis on the left.
3. Add the axes = F, xlab = NA, and ylab = NA arguments to the second plot() function call. This removes all the axes and axis notation from this call.
4. Add the vertical axis on the right with a simple call to the axis() function and setting side = 4.
5. Add a label to the vertical axis on the right with the mtext() command. Use the options side = 4 and line = 3 to position the text "y" correctly.
The new code is given below.
This code produces the following plot, which could be cleaned up a lot, but has the basic feature we're looking for: a separate vertical axis for each series.
two_vertical_axes_r_plot
Summary
In this post, I've shown how to add a separate vertical axis for each series in a plot. This can be accomplished by setting the parameter new="TRUE" after plotting the first series. I've focused on solving the main problem at the expense of nicer axes and axis notation. I've written more about how to improve on R's axis defaults here and here.
|
{
"url": "http://www.carlislerainey.com/2012/12/28/how-to-add-an-extra-vertical-axis-to-r-plots/",
"source_domain": "www.carlislerainey.com",
"snapshot_id": "crawl=CC-MAIN-2015-14",
"warc_metadata": {
"Content-Length": "50230",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7N6AJBF4HD3JFN6X7TDUQ4CEZE34C3BF",
"WARC-Concurrent-To": "<urn:uuid:c3399d76-1254-4d67-a93d-357d9e6fe7f2>",
"WARC-Date": "2015-03-31T08:23:43Z",
"WARC-IP-Address": "66.147.244.85",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:KC7CY4MAGCOOUW3SR4YLCKHCNERQXO7U",
"WARC-Record-ID": "<urn:uuid:0f720ee4-b96b-4382-8115-827e3524a468>",
"WARC-Target-URI": "http://www.carlislerainey.com/2012/12/28/how-to-add-an-extra-vertical-axis-to-r-plots/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1899f975-6741-4eaf-8ec0-bdf006362d54>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-168-14-71.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-14\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for March 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,
45,
46,
76,
77,
527,
528,
551,
552,
646,
647,
659,
660,
828,
829,
861,
862,
887,
888,
1075,
1076,
1519,
1520,
1533,
1534,
1695,
1696,
1733,
1734,
1767,
1768,
2108,
2109,
2508,
2509,
2539,
2540,
2679,
2803,
2957,
3061,
3212,
3213,
3242,
3243,
3402,
3403,
3428,
3429,
3437,
3438
],
"line_end_idx": [
45,
46,
76,
77,
527,
528,
551,
552,
646,
647,
659,
660,
828,
829,
861,
862,
887,
888,
1075,
1076,
1519,
1520,
1533,
1534,
1695,
1696,
1733,
1734,
1767,
1768,
2108,
2109,
2508,
2509,
2539,
2540,
2679,
2803,
2957,
3061,
3212,
3213,
3242,
3243,
3402,
3403,
3428,
3429,
3437,
3438,
3783
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3783,
"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.44247788190841675,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02275601029396057,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15297092497348785,
"rps_doc_frac_unique_words": 0.3589743673801422,
"rps_doc_mean_word_length": 4.437405586242676,
"rps_doc_num_sentences": 46,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.795942306518555,
"rps_doc_word_count": 663,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.07579877972602844,
"rps_doc_frac_chars_dupe_6grams": 0.061522770673036575,
"rps_doc_frac_chars_dupe_7grams": 0.04282800853252411,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.015295719727873802,
"rps_doc_frac_chars_top_3gram": 0.01699524000287056,
"rps_doc_frac_chars_top_4gram": 0.0288919098675251,
"rps_doc_books_importance": -277.5106506347656,
"rps_doc_books_importance_length_correction": -277.5106506347656,
"rps_doc_openwebtext_importance": -209.7759246826172,
"rps_doc_openwebtext_importance_length_correction": -209.7759246826172,
"rps_doc_wikipedia_importance": -140.5835723876953,
"rps_doc_wikipedia_importance_length_correction": -140.5835723876953
},
"fasttext": {
"dclm": 0.14988690614700317,
"english": 0.9120005965232849,
"fineweb_edu_approx": 1.6593979597091675,
"eai_general_math": 0.996160626411438,
"eai_open_web_math": 0.5018059015274048,
"eai_web_code": 0.9723271727561951
}
}
|
{
"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": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-763,883,062,763,623,600 |
Wednesday, March 19, 2008
New Puter
Well, I took the plunge. My old desktop at home was nearing the end of it's lifespan - nearly 6 years old (that's like 70 in computer years). I built my old desktop back in 2002 at college and I decided that I'd once again build a Frankenstein creation.
So my new computer is here, and I'm getting used to *shivers* Window's Vista. So far, it hasn't been nearly as bad as I've heard about it. Aside from a few minor hiccups, it runs way better than my old XP system.
We'll see how it goes... it's not a Mac, but it's still pretty and nice. We'll see if it wow's me.
3 comments:
1. Vista? *shudder* best of luck with that... =P I want details about this new system of yours! I know you got something good considering that you built your old one...you must know your stuff. =)
ReplyDelete
2. Ok, details:
- Shuttle XPC Bare bones kit includes integrated Intel GMA 3100 Video Chipset, capable enough for Vista, can expand to a PCI Express Graphics card eventually
- Intel Core Due 2.66GHZ (conroe) 64bit processor
- 4GB of 800mhz DDR2 Ram
- 250GB SATA 300 Hard Drive
- 22inch Widescreen LCD Monitor
- Windows Vista 64bit Home Premium
- Salvaged my DVD-RW drive, Keyboard, Mouse, and Webcam
Total Cost: about $920 (includes the $230 monitor)
Not bad huh?
ReplyDelete
3. Wow! That's one awesome rig! It meets my approval ;)
ReplyDelete
|
{
"url": "http://erikpasco.blogspot.com/2008/03/new-puter.html",
"source_domain": "erikpasco.blogspot.com",
"snapshot_id": "crawl=CC-MAIN-2017-34",
"warc_metadata": {
"Content-Length": "88272",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:P5WH27P2Q3NFX2OL3CGO2LB2AGZ3L6SR",
"WARC-Concurrent-To": "<urn:uuid:4a1fc38e-411f-4804-9df8-9d29110f0776>",
"WARC-Date": "2017-08-18T03:05:15Z",
"WARC-IP-Address": "216.58.218.225",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HXSLZ6FFCBRCVT2UGORADH72MK6PWUOO",
"WARC-Record-ID": "<urn:uuid:9624ee9c-db3c-4cd7-9794-a83d7c09e597>",
"WARC-Target-URI": "http://erikpasco.blogspot.com/2008/03/new-puter.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ac559873-a928-421f-8934-ba9894293685>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-166-28-189.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,
26,
27,
37,
38,
292,
293,
506,
507,
606,
607,
619,
620,
819,
820,
836,
854,
855,
1017,
1071,
1100,
1132,
1168,
1207,
1208,
1268,
1269,
1324,
1325,
1342,
1343,
1359,
1417,
1418
],
"line_end_idx": [
26,
27,
37,
38,
292,
293,
506,
507,
606,
607,
619,
620,
819,
820,
836,
854,
855,
1017,
1071,
1100,
1132,
1168,
1207,
1208,
1268,
1269,
1324,
1325,
1342,
1343,
1359,
1417,
1418,
1433
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1433,
"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.32826748490333557,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06382978707551956,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2644376754760742,
"rps_doc_frac_unique_words": 0.7041666507720947,
"rps_doc_mean_word_length": 4.3125,
"rps_doc_num_sentences": 22,
"rps_doc_symbol_to_word_ratio": 0.009118540212512016,
"rps_doc_unigram_entropy": 4.979484558105469,
"rps_doc_word_count": 240,
"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.01449275016784668,
"rps_doc_frac_chars_top_3gram": 0.023188410326838493,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -142.61273193359375,
"rps_doc_books_importance_length_correction": -140.3998260498047,
"rps_doc_openwebtext_importance": -84.29109954833984,
"rps_doc_openwebtext_importance_length_correction": -84.29109954833984,
"rps_doc_wikipedia_importance": -59.99532699584961,
"rps_doc_wikipedia_importance_length_correction": -53.044795989990234
},
"fasttext": {
"dclm": 0.05608261004090309,
"english": 0.9514181017875671,
"fineweb_edu_approx": 1.2372052669525146,
"eai_general_math": 0.008520780131220818,
"eai_open_web_math": 0.054480019956827164,
"eai_web_code": 0.000593659991864115
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.16",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.452",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "1",
"label": "Factual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "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": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
6,515,531,562,335,256,000 |
37,432 reputation
13104156
bio website
location California
age
visits member for 4 years, 11 months
seen Jul 18 at 0:40
I am not actually called Peter. Sorry about that.
Oct
5
comment Replace \n with \r\n in Unix file
-1. doesn't work for me.
Oct
5
comment Image Classification - Detecting an image is cartoon-like
+1, great answer. simple and logical.
Oct
5
answered suppress start message of Matlab
Oct
5
answered designing web interfaces for mobile devices
Oct
4
comment Factory methods in Ruby
hmmm, it's clean, and slick - my concern is that it seems more like a hack than a 'pure' solution. a Bike /is a Vehicle/, not a Bike /acts like a Vehicle/. This suggests to me that the right concept is a subclass rather than a mixin.
Oct
4
comment Factory methods in Ruby
yep, a lookup table.
Oct
4
comment Solving a matrix in MATLAB?
You should look into low rank approximations. You can use the SVD for this.
Oct
4
comment Solving a matrix in MATLAB?
My apologies. I assumed it used the QR algorithm.
Oct
4
comment Solving a matrix in MATLAB?
They use different numerical methods.
Oct
4
comment AirPort Express Router Remote URL and default username/password
Belongs on serverfault.
Oct
4
comment Factory methods in Ruby
Hmm, I guess so in principle - though that's more of a hack - the correct OO concept is that the resulting object 'is a' bike or car, not 'behaves like' a bike or car.
Oct
4
comment Factory methods in Ruby
This is different to what I'm after - I want the factory method to be in the superclass of the derived objects.
Oct
4
comment Factory methods in Ruby
This doesn't work. You'll get a SystemStackError: stack level too deep. This illustrates one of the main problems: you can't both override new and call it without some extra work
Oct
4
comment determining the distance between points in n-dimensions
Nope. Summing the absolute values is not a measure of 'distance' in the common, Euclidean sense. (You are talking of the '1-norm' measure of distance, instead.) You're right about storing / comparing the square though, that's fine.
Oct
4
answered How do you convert a string to a function in python?
Oct
4
answered Factory methods in Ruby
Oct
4
asked Factory methods in Ruby
Oct
4
answered Segmentation fault question
Oct
4
answered History of Django's popularity
Oct
4
answered how to get text between : and string?
|
{
"url": "http://stackoverflow.com/users/157237/peter?tab=activity&sort=all&page=66",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-23",
"warc_metadata": {
"Content-Length": "45384",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AY7S4AXH7MM6GFDOVLYSXRIQMTRV3OZX",
"WARC-Concurrent-To": "<urn:uuid:19809c62-5c78-4815-aa15-7a7a382af1eb>",
"WARC-Date": "2014-07-25T18:42:00Z",
"WARC-IP-Address": "198.252.206.16",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:HCZMLMWRHOSLATXNQDEX54FRCZAPNEMB",
"WARC-Record-ID": "<urn:uuid:b438e25f-2940-4dc1-b2a6-ce8352ec4891>",
"WARC-Target-URI": "http://stackoverflow.com/users/157237/peter?tab=activity&sort=all&page=66",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2e4681f2-382a-4596-8fb5-ffd0827e5dcb>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-33-131-23.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,
18,
27,
39,
59,
63,
100,
120,
121,
171,
172,
173,
177,
179,
221,
246,
250,
252,
318,
356,
360,
362,
404,
408,
410,
463,
467,
469,
501,
735,
739,
741,
773,
794,
798,
800,
836,
912,
916,
918,
954,
1004,
1008,
1010,
1046,
1084,
1088,
1090,
1162,
1186,
1190,
1192,
1224,
1392,
1396,
1398,
1430,
1542,
1546,
1548,
1580,
1759,
1763,
1765,
1829,
2061,
2065,
2067,
2129,
2133,
2135,
2168,
2172,
2174,
2204,
2208,
2210,
2247,
2251,
2253,
2293,
2297,
2299
],
"line_end_idx": [
18,
27,
39,
59,
63,
100,
120,
121,
171,
172,
173,
177,
179,
221,
246,
250,
252,
318,
356,
360,
362,
404,
408,
410,
463,
467,
469,
501,
735,
739,
741,
773,
794,
798,
800,
836,
912,
916,
918,
954,
1004,
1008,
1010,
1046,
1084,
1088,
1090,
1162,
1186,
1190,
1192,
1224,
1392,
1396,
1398,
1430,
1542,
1546,
1548,
1580,
1759,
1763,
1765,
1829,
2061,
2065,
2067,
2129,
2133,
2135,
2168,
2172,
2174,
2204,
2208,
2210,
2247,
2251,
2253,
2293,
2297,
2299,
2345
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2345,
"ccnet_original_nlines": 82,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.326129674911499,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023575639352202415,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.22396856546401978,
"rps_doc_frac_unique_words": 0.5012224912643433,
"rps_doc_mean_word_length": 4.501222610473633,
"rps_doc_num_sentences": 29,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.811758041381836,
"rps_doc_word_count": 409,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.16838675737380981,
"rps_doc_frac_chars_dupe_6grams": 0.16838675737380981,
"rps_doc_frac_chars_dupe_7grams": 0.14231395721435547,
"rps_doc_frac_chars_dupe_8grams": 0.09179794043302536,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03476371988654137,
"rps_doc_frac_chars_top_3gram": 0.059750139713287354,
"rps_doc_frac_chars_top_4gram": 0.07604563236236572,
"rps_doc_books_importance": -302.1258544921875,
"rps_doc_books_importance_length_correction": -302.1258544921875,
"rps_doc_openwebtext_importance": -110.92810821533203,
"rps_doc_openwebtext_importance_length_correction": -110.92810821533203,
"rps_doc_wikipedia_importance": -123.2418441772461,
"rps_doc_wikipedia_importance_length_correction": -123.2418441772461
},
"fasttext": {
"dclm": 0.16258645057678223,
"english": 0.9238526821136475,
"fineweb_edu_approx": 1.4273027181625366,
"eai_general_math": 0.4300272464752197,
"eai_open_web_math": 0.2967894673347473,
"eai_web_code": 0.20841306447982788
}
}
|
{
"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.01",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "5",
"label": "Social/Forum"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
462,563,362,359,493,570 |
滚动条的演变历史
Dec 6, 2019 #发展历程 #用户界面
滚动条的演变代表了科技的进步,计算机设备及系统的变革;也代表了界面中设计风格的转变。
1981
* Xerox Star
Xerox Star 施乐之星 也叫施乐8010信息系统 Star的开发始于1977年;
1981年首次上市的原始Xerox 8010(代号为Dandelion)
下面这台就是Xerox 8010
* Xerox 8010
简单了解一下这台机器当时的参数:
- 基于AMD 2900位切片微码可编程微处理器的定制处理器
- 384 KB(可扩展到1.5MB)的实际内存
- 10、29或40 MB硬盘
- 8英寸软盘驱动器
- 17英寸显示屏
- 显示分辨率1024 * 808单色
- 2键鼠标
- 以太网络
- “Pilot”操作系统
- “Star”桌面软件
* The Xerox 8010 Information System
这是当时的操作系统用户界面;更像原型草图纸张的形式。
1983
* Lisa OS
Apple Lisa 是苹果公司发布的世界首台图形界面计算机,以乔布斯长女名字命名。 是全球首款同时采用图形用户界面(GUI)和鼠标的个人电脑。
丽莎(Lisa)的开发始于1978年,发布于1983年,值得一提的是当时的处理器采用的是摩托罗拉Motorola 68000,对比竞争的是IBM-PC采用的Intel新型处理器:Intel 8088,8080的到来也是个人计算机的一个伟大的转折点。
* Lisa Office System 3.1
当时Lisa OS 的用户界面,从当时Apple的产品设计来看确实是比大头机好看很多。
1984
* System 1
System 1 ,Mac OS第一个系统版本;相对于Lisa OS没有太大变化。
* System 1 OS用户界面
1985
* AmigaOS 1.0
AmigaOS 是 Amiga 个人计算机默认的本地操作系统。于1985年面世,是第一个提供真彩色的操作系统,相同时期特别适合玩游戏。
* AmigaOS1.3的用户界面
1985
* Windows 1.0
同年微软的Windows1.0也相继发布。 Windows 1.0基于MS-DOS操作系统,实际上其本身并非操作系统,至多只是基于在当时的纯DOS下运行的应用软件。但从用户界面来看本质上是宣告了DOS操作系统的终结。因此Windows是基于DOS的衍生。
* Windows 1.0用户界面
1989
* NeXTSTEP
NeXTSTEP是一个基于Mach内核的Unix操作系统;完整版本于1989年发布,后期被苹果收购,便成为流行的操作系统macOS,iOS,watchOS和tvOS的来源,很多苹果捆绑应用都是是NeXTSTEP应用程序的后代,因此MacOS也是基于Unix系统的衍生。
* NeXTSTEP用户界面,同时期来看算是比较精致的了
1990
* Windows 3.0
Windows 3.0是微软1990年发布的操作系统。由于在界面、人性化、内存管理多方面的巨大改进,终于获得用户的认同。
* Windows 3.0用户界面
1991
* System 7
Apple Macintosh操作系统又称为Mac OS 7,是上边同时期Windows 3.0最大的竞争对手。
* System 7用户界面
1995
* Windows 95
Windows 95是一种面向消费者的操作系统。Windows 95是一个混合的16位/32位Windows操作系统,其版本号为4.0,开发代号为Chicago。
Windows 95咱们95后可能没怎么见过🙄️,但应该对98的界面有点印象两者在用户界面上相差不大,但Windows 98全面集成了Internet标准,是一个更强大版本的到来,桌面端十年前估计有,现在我们在一些旧的刷机包里应该还能见到。
* Windows 95用户界面
* Windows 98用户界面
1997
* Mac OS 8
Mac OS 8是苹果计算机公司于1997年发布的操作系统,代号“ Tempo”。它代表了七年来的最大革新。
* Mac OS 8用户界面
2001
* Mac OS X 10.0
Mac OS X版本10.0,代号“Cheetah”。从滚动条的风格来看代表着像素风格的时代已经过去了。机器的图形处理更厉害性能也更强了。
* Mac OS X 10.0用户界面
2001
* Windows XP
同年Windows XP也腾空问世,提及XP系统应该没有不知道的。微软花费至少10亿美元用于市场营销和推广Windows XP,当然营销只是一个策略,产品的好坏才决定用户是否去买单消费,XP也是win系列受欢迎和提供服务最长的一块产品,2014年4月8日,服役13年的微软Windows XP系统才正式“退休”。
* Windows XP 用户界面
2007
* Windows Vista
Windows Vista是 Microsoft公司所研发的具有创新历史意义的一个版本,其内核版本号为Windows NT 6.0
* Windows Vista 用户界面
2011
* Mac OS X Lion
Mac OS X Lion 在2011年7月20日正式上线发售。滚动条默认为隐藏状态当触发滚动事件时才显示,这也是当前我们最常见的滚动交互形式,注重用户体验。
* Mac OS X Lion 用户界面
* 2019 Mac OS Catalina 用户界面
2015
* Windows 10
Windows 10大家都不陌生,于2015年7月29日发布正式版。
* Windows 10 用户界面
最后
整体回顾滚动条的演变历史,每一个经典都代表了一个时代。
参考资料
- Evolution of the Scrollbar
- Nathan's Toasty Technology page
- 百度百科、维基百科
|
{
"url": "https://www.owlling.com/blogs/scrollbar",
"source_domain": "www.owlling.com",
"snapshot_id": "crawl=CC-MAIN-2022-27",
"warc_metadata": {
"Content-Length": "25794",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FABINYTZ4HT46QXPN2LWOLPQNY4KSC72",
"WARC-Concurrent-To": "<urn:uuid:59e863d7-29d8-4522-875f-f337e61a66ec>",
"WARC-Date": "2022-06-25T16:37:08Z",
"WARC-IP-Address": "34.196.254.27",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:6ZA3A76Q5QAFAUNVXIILS464CL22S5LO",
"WARC-Record-ID": "<urn:uuid:4ba8f288-b14a-4bf0-8422-867bacc55278>",
"WARC-Target-URI": "https://www.owlling.com/blogs/scrollbar",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:42cb6599-e18c-4bb0-8865-364edf2f12c2>"
},
"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-153\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,
9,
10,
36,
37,
80,
81,
86,
99,
100,
145,
182,
183,
200,
201,
214,
215,
232,
233,
264,
265,
290,
291,
307,
308,
319,
320,
330,
331,
351,
352,
359,
360,
367,
368,
382,
383,
396,
397,
433,
434,
461,
462,
467,
477,
478,
551,
676,
677,
702,
703,
747,
748,
753,
764,
765,
807,
808,
826,
831,
845,
846,
914,
915,
933,
938,
952,
953,
1081,
1082,
1100,
1105,
1116,
1117,
1252,
1253,
1282,
1287,
1301,
1302,
1363,
1364,
1382,
1387,
1398,
1399,
1456,
1457,
1472,
1477,
1490,
1491,
1573,
1574,
1695,
1696,
1713,
1730,
1735,
1746,
1747,
1802,
1803,
1818,
1823,
1839,
1840,
1910,
1911,
1931,
1936,
1949,
1950,
2107,
2108,
2126,
2131,
2147,
2148,
2214,
2215,
2236,
2241,
2257,
2258,
2338,
2339,
2360,
2388,
2393,
2406,
2407,
2442,
2443,
2461,
2464,
2465,
2493,
2494,
2499,
2500,
2529,
2530,
2564,
2565
],
"line_end_idx": [
9,
10,
36,
37,
80,
81,
86,
99,
100,
145,
182,
183,
200,
201,
214,
215,
232,
233,
264,
265,
290,
291,
307,
308,
319,
320,
330,
331,
351,
352,
359,
360,
367,
368,
382,
383,
396,
397,
433,
434,
461,
462,
467,
477,
478,
551,
676,
677,
702,
703,
747,
748,
753,
764,
765,
807,
808,
826,
831,
845,
846,
914,
915,
933,
938,
952,
953,
1081,
1082,
1100,
1105,
1116,
1117,
1252,
1253,
1282,
1287,
1301,
1302,
1363,
1364,
1382,
1387,
1398,
1399,
1456,
1457,
1472,
1477,
1490,
1491,
1573,
1574,
1695,
1696,
1713,
1730,
1735,
1746,
1747,
1802,
1803,
1818,
1823,
1839,
1840,
1910,
1911,
1931,
1936,
1949,
1950,
2107,
2108,
2126,
2131,
2147,
2148,
2214,
2215,
2236,
2241,
2257,
2258,
2338,
2339,
2360,
2388,
2393,
2406,
2407,
2442,
2443,
2461,
2464,
2465,
2493,
2494,
2499,
2500,
2529,
2530,
2564,
2565,
2576
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2576,
"ccnet_original_nlines": 144,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.006465519778430462,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0840517207980156,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.6788793206214905,
"rps_doc_frac_unique_words": 0.6225489974021912,
"rps_doc_mean_word_length": 10.759803771972656,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0.004310340154916048,
"rps_doc_unigram_entropy": 4.428492546081543,
"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.022779040038585663,
"rps_doc_frac_chars_top_3gram": 0.01366742979735136,
"rps_doc_frac_chars_top_4gram": 0.01366742979735136,
"rps_doc_books_importance": -202.30059814453125,
"rps_doc_books_importance_length_correction": -202.30059814453125,
"rps_doc_openwebtext_importance": -130.42771911621094,
"rps_doc_openwebtext_importance_length_correction": -130.42771911621094,
"rps_doc_wikipedia_importance": -109.71412658691406,
"rps_doc_wikipedia_importance_length_correction": -109.71412658691406
},
"fasttext": {
"dclm": 0.42098796367645264,
"english": 0.004240009933710098,
"fineweb_edu_approx": 2.576824426651001,
"eai_general_math": 0.015090820379555225,
"eai_open_web_math": 0.35828524827957153,
"eai_web_code": 0.6946545243263245
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.09",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "004.16",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "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": "6",
"label": "Content Listing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,462,253,987,476,026,000 |
lkml.org
[lkml] [2018] [Jul] [2] [last100] RSS Feed
Views: [wrap][no wrap] [headers] [forward]
Messages in this thread
/
SubjectRe: [PATCH v5 06/10] Uprobes: Support SDT markers having reference count (semaphore)
From
Date
Hi Oleg,
On 07/02/2018 02:39 AM, Oleg Nesterov wrote:
> On 06/28, Ravi Bangoria wrote:
>>
>> @@ -294,6 +462,15 @@ int uprobe_write_opcode(struct uprobe *uprobe, struct mm_struct *mm,
>> if (ret <= 0)
>> goto put_old;
>>
>> + /* Update the ref_ctr if we are going to replace instruction. */
>> + if (!ref_ctr_updated) {
>> + ret = update_ref_ctr(uprobe, mm, is_register);
>> + if (ret)
>> + goto put_old;
>> +
>> + ref_ctr_updated = 1;
>> + }
>
> Why can't this code live in install_breakpoint() and remove_breakpoint() ?
> this way we do not need to export "struct uprobe" and change set_swbp/set_orig_insn,
> and the logic will be more simple.
IMO, it's more easier with current approach. Updating reference counter
inside uprobe_write_opcode() makes it tightly coupled with instruction
patching. Basically, reference counter gets incremented only when first
consumer gets activated and will get decremented only when last consumer
is going away.
Advantage is, we can get rid of sdt_mm_list patch*, because increment and
decrement are anyway happening in sync. This makes the implementation lot
more simpler. If I do it inside install_breakpoit()/ remove_breakpoint(),
I've to reintroduce sdt_mm_list which makes code more complicated and ugly.
* https://lkml.org/lkml/2018/4/17/28
BTW, is there any harm in exporting struct uprobe outside of uprobe.c?
>
> And let me ask again... May be you have already explained this, but I can't
> find the previous discussion.
>
> So why do we need a counter but not a boolean? IIRC, because the counter can
> be shared, in particular 2 different uprobes can have the same >ref_ctr_offset,
> right?
Actually, it's by design. This counter keeps track of current tracers
tracing on a particular SDT marker. So only boolean can't work here.
Also, yes, multiple markers can share the same reference counter.
>
> But who else can use this counter and how? Say, can userspace update it too?
There are many different ways user can change the reference counter.
Ex, systemtap and bcc both uses uprobe to probe on a marker but reference
counter update logic is different in both of them. Systemtap records all
exec/mmap events and updates the counter when it finds interested process/
vma. bcc directly hooks into process's memory (/proc/pid/mem).
> If yes, why this can't race with __update_ref_ctr() ?
Right. But there is no synchronization mechanism provided by the SDT
infrastructure and this is all userspace so there are chances of race.
At least, this patch still tries to make sure that reference counter
does not go negative. If so, throw a warning and don't update it.
>
> And btw, why does __update_ref_ctr() use FOLL_FORCE? This vma should be writeable
> or valid_ref_ctr_vma() should nack it?
I don't remember the exact reason but seem its unnecessary. Let me try to
recall the reason, otherwise will remove it in the next version.
>
> And shouldn't valid_ref_ctr_vma() check VM_SHARED? IIUC we do not want to write
> to this file?
Hmm, I haven't seen reference counter shared across processes. But as this
is a generic infrastructure, I'll add a check there.
Thanks for the review,
Ravi
\
\ /
Last update: 2018-07-02 07:17 [W:0.143 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site
|
{
"url": "https://do-db2.lkml.org/lkml/2018/7/2/15",
"source_domain": "do-db2.lkml.org",
"snapshot_id": "crawl=CC-MAIN-2021-43",
"warc_metadata": {
"Content-Length": "11076",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7CMPN2KKMXFWH5UPBUFY3ECESRIVKA4O",
"WARC-Concurrent-To": "<urn:uuid:36cc4b66-0282-46b6-a368-21dfafface87>",
"WARC-Date": "2021-10-23T21:33:08Z",
"WARC-IP-Address": "188.166.10.231",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:EUTFHTAXW7N42DKO4LDTWKBCKHXPTI4S",
"WARC-Record-ID": "<urn:uuid:fdcd983a-7c54-4a1e-bb83-15ebe16a65d6>",
"WARC-Target-URI": "https://do-db2.lkml.org/lkml/2018/7/2/15",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e9ccb9cd-3d91-455a-aaca-fa25d00342b8>"
},
"warc_info": "isPartOf: CC-MAIN-2021-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-137\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,
10,
63,
110,
112,
136,
138,
230,
235,
240,
249,
250,
295,
328,
331,
424,
441,
458,
461,
531,
560,
612,
626,
645,
650,
676,
683,
685,
762,
849,
886,
887,
959,
1030,
1102,
1175,
1190,
1191,
1265,
1339,
1413,
1489,
1490,
1527,
1528,
1599,
1600,
1602,
1680,
1712,
1714,
1793,
1875,
1884,
1885,
1955,
2024,
2090,
2091,
2093,
2172,
2173,
2242,
2316,
2389,
2464,
2527,
2528,
2584,
2585,
2654,
2725,
2794,
2860,
2861,
2863,
2947,
2988,
2989,
3063,
3128,
3129,
3131,
3213,
3229,
3230,
3305,
3358,
3359,
3382,
3387,
3388,
3390,
3392,
3397,
3460,
3558
],
"line_end_idx": [
10,
63,
110,
112,
136,
138,
230,
235,
240,
249,
250,
295,
328,
331,
424,
441,
458,
461,
531,
560,
612,
626,
645,
650,
676,
683,
685,
762,
849,
886,
887,
959,
1030,
1102,
1175,
1190,
1191,
1265,
1339,
1413,
1489,
1490,
1527,
1528,
1599,
1600,
1602,
1680,
1712,
1714,
1793,
1875,
1884,
1885,
1955,
2024,
2090,
2091,
2093,
2172,
2173,
2242,
2316,
2389,
2464,
2527,
2528,
2584,
2585,
2654,
2725,
2794,
2860,
2861,
2863,
2947,
2988,
2989,
3063,
3128,
3129,
3131,
3213,
3229,
3230,
3305,
3358,
3359,
3382,
3387,
3388,
3390,
3392,
3397,
3460,
3558,
3559
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3559,
"ccnet_original_nlines": 96,
"rps_doc_curly_bracket": 0.0005619599833153188,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.30390921235084534,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025220679119229317,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3291299045085907,
"rps_doc_frac_unique_words": 0.546332061290741,
"rps_doc_mean_word_length": 5.075289726257324,
"rps_doc_num_sentences": 44,
"rps_doc_symbol_to_word_ratio": 0.0012610299745574594,
"rps_doc_unigram_entropy": 5.311882972717285,
"rps_doc_word_count": 518,
"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.042601749300956726,
"rps_doc_frac_chars_top_3gram": 0.005325220059603453,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -398.6532287597656,
"rps_doc_books_importance_length_correction": -398.6532287597656,
"rps_doc_openwebtext_importance": -238.3419952392578,
"rps_doc_openwebtext_importance_length_correction": -238.3419952392578,
"rps_doc_wikipedia_importance": -178.95509338378906,
"rps_doc_wikipedia_importance_length_correction": -178.95509338378906
},
"fasttext": {
"dclm": 0.03290646895766258,
"english": 0.8624961972236633,
"fineweb_edu_approx": 1.4906786680221558,
"eai_general_math": 0.23416179418563843,
"eai_open_web_math": 0.46945619583129883,
"eai_web_code": 0.034428831189870834
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.27",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "004.02",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "4",
"label": "Analyze"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "18",
"label": "Q&A Forum"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,922,577,780,729,094,000 |
Most of the software produced by KDE uses CMake to control how it is built and installed. If you're not used to building software that uses CMake, don't worry! This guide will teach you how.
This guide will assume you are reasonably familiar with the command line (changing directory, creating and deleting directories and files, etc).
Overview
The build process follows four basic steps:
Configuring
Determines what is available on the system, where to find it and how to use it. For example, do you have a C++ compiler? What arguments will need to be passed to it? Do you have the required libraries? Where can they be found?
Generating
Using the information gathered in the previous step, creates files that describe how to build the project.
Building
Calls the compiler, linker and other tools to create the libraries, executables and other files that are part of the "finished product". The descriptions generated in the previous step control how this is done.
Installing
Copies the files that were built (and possibly some other resources) to the right locations on the system.
There is also an optional extra step, running automated tests, which can happen either before or after installing.
CMake is used to perform the configuring and generating steps. The build description it generates is then used by another tool - typically Make on UNIX systems - to do the building and installing steps. Running the automated tests is done by CTest, which ships as part of CMake.
Prerequisites
Before you can start, you will need to install a few pieces of software.
Build environment
There is usually a fairly easy way to get the basic software you will need to build C++ programs. For example, most Linux distributions offer a "virtual package" that includes a C++ compiler, Make and other useful tools (eg: Debian calls this "build-essential"). On Windows, you might use Visual Studio, while OS X has XCode. You will need to find out how to get this for your particular system.
Git
KDE produces releases of most software, and provides archives that snapshot the product at a particular point in time. You can download these (eg: Frameworks releases are available here), extract them and build them. However, if you want to contribute back to the project, you will need to get the latest development version, and for that you will need Git. If you are not familiar with version control systems like Git, check out About Version Control from the Pro Git book. On Windows, you might want to try TortoiseGit, although we'll be concentrating on how to do it on the command line.
CMake
On Linux systems, you can usually get this through your package manager. Otherwise, you will need to download and install it. You will need at least version 2.8.12.
Qt
Almost all software produced by KDE is built on top of Qt, so it would be sensible to get hold of it now. Again, you can get it via your package manager on Linux, or download it yourself. Watch out, though! While a lot of KDE software is using Qt 5 (you'll probably want at least 5.4 if possible), some is still using Qt 4 (specifically 4.8). These are not compatible. The general rule is: software using KDE Frameworks needs Qt 5, software using kdelibs needs Qt 4.
Note
On most Linux distributions, packages come in several parts; specifically, the core package can be installed without the "development files" or the debugging information. When you are building software, you need to make sure the development packages of any libraries are installed (and you may want the debugging ones as well). For example, in addition to the "qtbase5" package, you will also want a package called something like "qtbase5-dev" or "qtbase5-devel"
Getting the source
First, find the project you want to build on KDE QuickGit. We're going to start with Extra CMake Modules, mostly because it has no dependencies (other than CMake), and so you can get going right away.
Near the top of the page for your project, you'll find a line that starts "clone url". This is what you need to pass to Git to get a copy of the source. For Extra CMake Modules, this is git://anongit.kde.org/extra-cmake-modules.git.
You now need to tell Git to clone this repository, so that you have a copy of it on your computer. From a terminal, go to a directory where you want to do your development, and run
git clone git://anongit.kde.org/extra-cmake-modules.git
This will produce a directory called extra-cmake-modules, which contains the latest (unreleased) source code for the Extra CMake Modules project. You can use Git to get different versions of the source code, such as previous releases, as well as to make changes you can submit back to the project. If you want to get into this, you can read the Pro Git book.
Running CMake
TODO: examples, etc.
Building
make (and other systems?)
Installing
make install (and other systems?)
A Simpler Way
TODO: link to kdesrc-build instructions
This page was last edited on 22 May 2019, at 09:35. Content is available under Creative Commons License SA 4.0 unless otherwise noted.
|
{
"url": "https://techbase.kde.org/KF5/Getting_Started/Build/For_Beginners",
"source_domain": "techbase.kde.org",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "31287",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:VQ4OAPZLIZZSFWQZES6ZJA4PKZ7D3ZIO",
"WARC-Concurrent-To": "<urn:uuid:dfa9d396-92c3-49b9-9c41-efdd8dc4a3f1>",
"WARC-Date": "2020-08-05T23:37:36Z",
"WARC-IP-Address": "172.67.73.202",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HV77BLYH3GTOOLXD56LT57L3QFLPU2MG",
"WARC-Record-ID": "<urn:uuid:9dd06677-b9fa-4375-b631-2ccb6b5f1711>",
"WARC-Target-URI": "https://techbase.kde.org/KF5/Getting_Started/Build/For_Beginners",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:569e4195-4d5a-4f0e-b9f5-48af7529196e>"
},
"warc_info": "isPartOf: CC-MAIN-2020-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-28.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,
191,
192,
337,
338,
347,
348,
392,
393,
405,
632,
643,
750,
759,
970,
981,
1088,
1089,
1204,
1205,
1484,
1485,
1499,
1500,
1573,
1574,
1592,
1988,
1992,
2584,
2590,
2755,
2758,
3225,
3230,
3693,
3694,
3695,
3714,
3715,
3916,
3917,
4150,
4151,
4332,
4333,
4389,
4390,
4749,
4750,
4764,
4765,
4786,
4787,
4796,
4797,
4823,
4824,
4835,
4836,
4870,
4871,
4885,
4886,
4926,
4927,
4928
],
"line_end_idx": [
191,
192,
337,
338,
347,
348,
392,
393,
405,
632,
643,
750,
759,
970,
981,
1088,
1089,
1204,
1205,
1484,
1485,
1499,
1500,
1573,
1574,
1592,
1988,
1992,
2584,
2590,
2755,
2758,
3225,
3230,
3693,
3694,
3695,
3714,
3715,
3916,
3917,
4150,
4151,
4332,
4333,
4389,
4390,
4749,
4750,
4764,
4765,
4786,
4787,
4796,
4797,
4823,
4824,
4835,
4836,
4870,
4871,
4885,
4886,
4926,
4927,
4928,
5062
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5062,
"ccnet_original_nlines": 66,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4362606108188629,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.015108590014278889,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1794145405292511,
"rps_doc_frac_unique_words": 0.36533957719802856,
"rps_doc_mean_word_length": 4.670960426330566,
"rps_doc_num_sentences": 63,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.15989875793457,
"rps_doc_word_count": 854,
"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.013537229970097542,
"rps_doc_frac_chars_top_3gram": 0.019303079694509506,
"rps_doc_frac_chars_top_4gram": 0.01629481092095375,
"rps_doc_books_importance": -428.9309997558594,
"rps_doc_books_importance_length_correction": -428.9309997558594,
"rps_doc_openwebtext_importance": -271.44403076171875,
"rps_doc_openwebtext_importance_length_correction": -271.44403076171875,
"rps_doc_wikipedia_importance": -241.2486572265625,
"rps_doc_wikipedia_importance_length_correction": -241.2486572265625
},
"fasttext": {
"dclm": 0.06031345948576927,
"english": 0.9206593036651611,
"fineweb_edu_approx": 2.4384071826934814,
"eai_general_math": 0.893014669418335,
"eai_open_web_math": 0.4035044312477112,
"eai_web_code": 0.8926220536231995
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.02",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "1",
"label": "Truncated Snippets"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,711,420,096,035,367,000 |
...
View Full Version : email form not sending - no errors
jarv
10-18-2012, 08:47 PM
<?php
if(isset($_POST['query'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "[email protected]";
$email_subject = "Query Form from me";
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.<br /><br />";
echo $error."<br /><br />";
echo "Please go back and fix these errors.<br /><br />";
die();
}
// validation expected data exists
if(!isset($_POST['Link']) ||
!isset($_POST['FirstName']) ||
!isset($_POST['MyEmail']) ||
!isset($_POST['MyQuery'])) {
died('We are sorry, but there appears to be a problem with the form you submitted.');
}
$Link = $_POST['Link'];
$FirstMame = $_POST['FirstName']; // required
$MyEmail = $_POST['MyEmail']; // required
$MyQuery = $_POST['MyQuery']; // required
echo $Link.'<br />';
echo $FirstMame.'<br />';
echo $MyEmail.'<br />';
echo $MyQuery.'<br />';
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
$error_message .= 'The Email Address you entered does not appear to be valid.<br />';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
}
if(!preg_match($string_exp,$last_name)) {
$error_message .= 'The Last Name you entered does not appear to be valid.<br />';
}
if(strlen($comments) < 2) {
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
}
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Link: ".clean_string($Link)."\n";
$email_message .= "First Name: ".clean_string($FirstName)."\n";
$email_message .= "Email: ".clean_string($MyEmail)."\n";
$email_message .= "Query: ".clean_string($MyQuery)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<? }?>
my form submits to this page but it's blank?!
please help
Fou-Lu
10-18-2012, 10:56 PM
That would be a good thing. This script generates output only on failure, so no output means either everything was successful, or you have a parse error.
Make sure you check the results of a mail call. If it checks out successful, PHP did its job; the problem will now be the sendmail on the host machine. Make sure you take off the @ as well, or to a trace back of the error message from error_get_last().
jarv
10-18-2012, 11:35 PM
hmm, its not showing errors?!
tangoforce
10-18-2012, 11:45 PM
mail() won't show any errors because you've supressed them using the @ in front.
If your page is showing up as blank then it may well be a parser error - check your error logs.
As usual jarv, my previous advice still stands. You need to seriously improve your debugging skills especially if you intend to take on paid projects.
Your call to mail() will return a boolean result (thats true or false). You can easily get it by doing this:
$Result = mail($email_to, $email_subject, $email_message, $headers);
var_dump($Result);
Thats called debugging jarv. You print things out to the screen and see what they contain. In this case, you're looking for the var_dump() to report a boolean with a true or 1 contained in it.
Try that, if it gives you a false / 0 result then mail() is failing for some reason.
Fou-Lu
10-19-2012, 12:04 AM
yep, in which case you can use the error_get_last() function or the $php_errormsg to retrieve the last error triggered. If there is none, and the mail pulls up as successful, the issue is beyond PHP's level and you'll need to look into the sendmail logs.
tangoforce
10-19-2012, 12:50 AM
you can use the error_get_last() function
I've just learned something new today :thumbsup: :)
Fou-Lu
10-19-2012, 01:16 AM
ikr! I just learned the other day that SQL actually has a standard that says you're supposed to use ' and not " in queries O.o
Never knew that before!
jarv
10-24-2012, 09:52 PM
still stuck on this, can't get it to display any errors?!
Fou-Lu
10-24-2012, 10:02 PM
still stuck on this, can't get it to display any errors?!
Which sounds to me that you have none.
You can even put a simple echo 'done.'; at the bottom of the script. If that shows, and assuming you've followed the advice here by checking the results of the mail() call check out as successful, you're diving into the sendmail logs to find out why your OS didn't send the mail.
jarv
11-06-2012, 12:56 AM
my emailer still doesn't work?!
<?php
error_reporting(E_ALL);
ini_set( 'display_errors','1');
echo 'hello';
if(isset($_POST['query'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = '[email protected]';
$email_subject = 'Query Form ';
function died($error) {
// your error code can go here
echo 'We are very sorry, but there were error(s) found with the form you submitted.';
echo 'These errors appear below.<br /><br />';
echo $error.'<br /><br />';
echo 'Please go back and fix these errors.<br /><br />';
die();
}
if(!isset($_POST['Link']) ||
!isset($_POST['FirstName']) ||
!isset($_POST['MyEmail']) ||
!isset($_POST['MyQuery'])) {
died('We are sorry, but there appears to be a problem with the form you submitted.');
}
$Link = $_POST['Link'];
$FirstName = $_POST['FirstName']; // required
$MyEmail = $_POST['MyEmail']; // required
$MyQuery = $_POST['MyQuery']; // required
echo $Link;
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$MyEmail)) {
$error_message .= 'The Email Address you entered does not appear to be valid.<br />';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$FirstName)) {
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
}
if(strlen($MyQuery) < 2) {
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
}
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= 'Link: '.clean_string($Link).'\n';
$email_message .= 'First Name: '.clean_string($FirstName).'\n';
$email_message .= 'Email: '.clean_string($MyEmail).'\n';
$email_message .= 'Query: '.clean_string($MyQuery).'\n';
echo $email_message;
end;
// create email headers
$headers = 'From: '.$MyEmail.'\r\n'.
'Reply-To: '.$MyEmail.'\r\n' .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
echo 'done.';
?>
tangoforce
11-06-2012, 01:34 AM
jarv did you read my previous advice?
Your call to mail() will return a boolean result (thats true or false). You can easily get it by doing this:
$Result = mail($email_to, $email_subject, $email_message, $headers);
var_dump($Result);
Well? Did you try it?
Here is another way:
if (mail($email_to, $email_subject, $email_message, $headers))
{
echo 'done.';
}
else
{
echo 'error';
}
If it now prints 'done' and you still do not get the email then it is an smtp / sendmail issue or a spam filter somewhere.
Please jarv, read and try things that people say to you.
jarv
11-06-2012, 10:21 AM
Notice: Undefined variable: email_to in D:\aandheurope.com\wwwroot\send_form_email.php on line 556
Notice: Undefined variable: email_subject in D:\aandheurope.com\wwwroot\send_form_email.php on line 556
Notice: Undefined variable: email_message in D:\aandheurope.com\wwwroot\send_form_email.php on line 556
Notice: Undefined variable: headers in D:\aandheurope.com\wwwroot\send_form_email.php on line 556
Warning: mail() [function.mail.php]: SMTP server response: 503 5.5.2 Need Rcpt command. in D:\aandheurope.com\wwwroot\send_form_email.php on line 556
error
tangoforce
11-06-2012, 01:49 PM
Jarv,
Those messages say it all!
You're using variables called:
$email_to, $email_subject, $email_message and they're not containing any values. Your call to mail()then fails and has been outputting error messages that you were hiding using @ symbol. That is why you should not use @ - it hides problems!
This line of code:
if(isset($_POST['query'])) {
Does not contain your call to mail() yet this is where you are setting those variables - inside this block of code. Your call to mail() is outside it at the end so even if your variables are not set, you are still trying to send an email.
Therefore, move your call to mail() inside the { braces } at the end for your if(isset($_POST['query'])) { line of code.
jarv
11-06-2012, 09:49 PM
Thanks!!!! it works... next problem, just not getting the email?! oh well
Fou-Lu
11-06-2012, 10:35 PM
Thanks!!!! it works... next problem, just not getting the email?! oh well
Like I said, if the result of the mail() is successful, PHP has done its job. You'll be hitting the sendmail logs to find out if it sent them or not.
If its not successful, then use the error_get_last() to determine if its a variable issue, or if it has any more information to share. If the variables all check out, then you need to verify sendmail is available, or that smtp is configured if its a windows machine.
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum
|
{
"url": "http://www.codingforums.com/archive/index.php/t-277661.html",
"source_domain": "www.codingforums.com",
"snapshot_id": "crawl=CC-MAIN-2015-11",
"warc_metadata": {
"Content-Length": "20604",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ET5DVTQ46KVWLTHMVROBPPLFSMZFOHPM",
"WARC-Concurrent-To": "<urn:uuid:2ac64105-7c57-444c-9adb-cfee44f08f55>",
"WARC-Date": "2015-03-01T13:02:56Z",
"WARC-IP-Address": "199.245.54.187",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:W4XOV6X4DB5PDZCULCRJZ4G3DWSCUBWZ",
"WARC-Record-ID": "<urn:uuid:11828fd0-94b9-4dfb-8835-eeefe05b9b93>",
"WARC-Target-URI": "http://www.codingforums.com/archive/index.php/t-277661.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e8bcc21a-b2dc-437d-8979-4d6f492e445e>"
},
"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,
4,
5,
60,
61,
62,
63,
68,
89,
95,
124,
125,
163,
198,
237,
238,
239,
263,
294,
381,
428,
456,
513,
520,
522,
523,
558,
587,
618,
647,
676,
762,
764,
765,
789,
835,
877,
919,
920,
941,
967,
991,
1015,
1016,
1017,
1038,
1105,
1147,
1233,
1235,
1270,
1313,
1396,
1398,
1440,
1522,
1524,
1552,
1631,
1633,
1666,
1688,
1690,
1734,
1735,
1768,
1824,
1861,
1863,
1864,
1917,
1981,
2038,
2095,
2096,
2097,
2121,
2161,
2195,
2228,
2288,
2291,
2298,
2299,
2345,
2346,
2358,
2359,
2366,
2387,
2541,
2542,
2795,
2796,
2801,
2822,
2852,
2853,
2864,
2885,
2966,
2967,
3063,
3064,
3215,
3216,
3325,
3326,
3395,
3396,
3415,
3416,
3609,
3610,
3695,
3696,
3703,
3724,
3979,
3980,
3991,
4012,
4054,
4055,
4107,
4108,
4115,
4136,
4263,
4287,
4288,
4293,
4314,
4372,
4373,
4380,
4401,
4459,
4460,
4499,
4779,
4780,
4785,
4806,
4838,
4839,
4840,
4841,
4847,
4871,
4903,
4904,
4918,
4947,
4948,
4986,
5014,
5046,
5047,
5071,
5102,
5188,
5235,
5263,
5320,
5327,
5329,
5330,
5359,
5390,
5419,
5448,
5534,
5536,
5537,
5561,
5607,
5649,
5691,
5692,
5704,
5725,
5792,
5831,
5917,
5919,
5954,
5996,
6079,
6081,
6108,
6187,
6189,
6222,
6244,
6246,
6290,
6291,
6324,
6380,
6417,
6419,
6420,
6473,
6537,
6594,
6651,
6672,
6677,
6678,
6702,
6739,
6770,
6803,
6863,
6877,
6880,
6881,
6892,
6913,
6951,
6952,
6953,
6954,
7063,
7064,
7133,
7134,
7153,
7154,
7155,
7177,
7178,
7199,
7200,
7201,
7264,
7266,
7280,
7282,
7287,
7289,
7303,
7305,
7306,
7307,
7430,
7431,
7488,
7489,
7494,
7515,
7614,
7615,
7719,
7720,
7824,
7825,
7923,
7924,
8074,
8080,
8081,
8092,
8113,
8119,
8120,
8147,
8148,
8179,
8420,
8421,
8440,
8441,
8442,
8471,
8472,
8473,
8712,
8713,
8834,
8835,
8840,
8861,
8935,
8936,
8943,
8964,
9038,
9039,
9189,
9456,
9457,
9458,
9459
],
"line_end_idx": [
4,
5,
60,
61,
62,
63,
68,
89,
95,
124,
125,
163,
198,
237,
238,
239,
263,
294,
381,
428,
456,
513,
520,
522,
523,
558,
587,
618,
647,
676,
762,
764,
765,
789,
835,
877,
919,
920,
941,
967,
991,
1015,
1016,
1017,
1038,
1105,
1147,
1233,
1235,
1270,
1313,
1396,
1398,
1440,
1522,
1524,
1552,
1631,
1633,
1666,
1688,
1690,
1734,
1735,
1768,
1824,
1861,
1863,
1864,
1917,
1981,
2038,
2095,
2096,
2097,
2121,
2161,
2195,
2228,
2288,
2291,
2298,
2299,
2345,
2346,
2358,
2359,
2366,
2387,
2541,
2542,
2795,
2796,
2801,
2822,
2852,
2853,
2864,
2885,
2966,
2967,
3063,
3064,
3215,
3216,
3325,
3326,
3395,
3396,
3415,
3416,
3609,
3610,
3695,
3696,
3703,
3724,
3979,
3980,
3991,
4012,
4054,
4055,
4107,
4108,
4115,
4136,
4263,
4287,
4288,
4293,
4314,
4372,
4373,
4380,
4401,
4459,
4460,
4499,
4779,
4780,
4785,
4806,
4838,
4839,
4840,
4841,
4847,
4871,
4903,
4904,
4918,
4947,
4948,
4986,
5014,
5046,
5047,
5071,
5102,
5188,
5235,
5263,
5320,
5327,
5329,
5330,
5359,
5390,
5419,
5448,
5534,
5536,
5537,
5561,
5607,
5649,
5691,
5692,
5704,
5725,
5792,
5831,
5917,
5919,
5954,
5996,
6079,
6081,
6108,
6187,
6189,
6222,
6244,
6246,
6290,
6291,
6324,
6380,
6417,
6419,
6420,
6473,
6537,
6594,
6651,
6672,
6677,
6678,
6702,
6739,
6770,
6803,
6863,
6877,
6880,
6881,
6892,
6913,
6951,
6952,
6953,
6954,
7063,
7064,
7133,
7134,
7153,
7154,
7155,
7177,
7178,
7199,
7200,
7201,
7264,
7266,
7280,
7282,
7287,
7289,
7303,
7305,
7306,
7307,
7430,
7431,
7488,
7489,
7494,
7515,
7614,
7615,
7719,
7720,
7824,
7825,
7923,
7924,
8074,
8080,
8081,
8092,
8113,
8119,
8120,
8147,
8148,
8179,
8420,
8421,
8440,
8441,
8442,
8471,
8472,
8473,
8712,
8713,
8834,
8835,
8840,
8861,
8935,
8936,
8943,
8964,
9038,
9039,
9189,
9456,
9457,
9458,
9459,
9529
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9529,
"ccnet_original_nlines": 294,
"rps_doc_curly_bracket": 0.004722429905086756,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.25064265727996826,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03256212919950485,
"rps_doc_frac_lines_end_with_ellipsis": 0.0033898300025612116,
"rps_doc_frac_no_alph_words": 0.40102827548980713,
"rps_doc_frac_unique_words": 0.3322449028491974,
"rps_doc_mean_word_length": 5.389387607574463,
"rps_doc_num_sentences": 160,
"rps_doc_symbol_to_word_ratio": 0.0012853499501943588,
"rps_doc_unigram_entropy": 5.482248783111572,
"rps_doc_word_count": 1225,
"rps_doc_frac_chars_dupe_10grams": 0.3268706500530243,
"rps_doc_frac_chars_dupe_5grams": 0.4722811281681061,
"rps_doc_frac_chars_dupe_6grams": 0.44865190982818604,
"rps_doc_frac_chars_dupe_7grams": 0.4229021370410919,
"rps_doc_frac_chars_dupe_8grams": 0.40411996841430664,
"rps_doc_frac_chars_dupe_9grams": 0.3714026212692261,
"rps_doc_frac_chars_top_2gram": 0.005452889949083328,
"rps_doc_frac_chars_top_3gram": 0.011663129553198814,
"rps_doc_frac_chars_top_4gram": 0.013783699832856655,
"rps_doc_books_importance": -830.9005126953125,
"rps_doc_books_importance_length_correction": -830.9005126953125,
"rps_doc_openwebtext_importance": -469.0650329589844,
"rps_doc_openwebtext_importance_length_correction": -469.0650329589844,
"rps_doc_wikipedia_importance": -356.0892639160156,
"rps_doc_wikipedia_importance_length_correction": -356.0892639160156
},
"fasttext": {
"dclm": 0.192790687084198,
"english": 0.7300116419792175,
"fineweb_edu_approx": 1.5469204187393188,
"eai_general_math": 0.23371320962905884,
"eai_open_web_math": 0.10209125280380249,
"eai_web_code": 0.5388259291648865
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.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": "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": "2",
"label": "Partially Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,601,202,767,349,451,000 |
N3478=12-0168
Jens Maurer
2012-10-29
Core Issue 1512: Pointer comparison vs qualification conversions
Introduction
This paper presents the modifications to the Working Draft necessary to resolve core issues 583 and 1512. In particular, it makes
void f(char * p)
{
if (p > 0) { ... }
if (p > nullptr) { ... }
}
ill-formed (both cases) and
void g(int **p1, const int**p2)
{
if (p1 == p2) { ... }
}
well-formed.
Explanation of the changes
The changes below essentially replace all of 5.9 expr.rel and 5.10 expr.eq. The current description in the Working Paper mixes semantic constraints and results of relational operators with those of equality operators. Furthermore, the attempt at type unification for similar types fails spectacularly.
The changes below define a generic composite pointer type that is applicable to relational, equality, and conditional operators. The corresponding description is moved from section 5.9 expr.rel to clause 5 expr.
Furthermore, the semantic specifications of the relational and equality operators are now phrased in terms of "compares greater" and "compares equal"; the result of the operators is derived from these specifications. This avoids repetition and makes it possible to refer to 5.10 expr.eq in order to determine the results of the <= and >= operators for some cases.
For the equality operators, 5.10 expr.eq no longer refers to 5.9 expr.rel. Instead, the relevant semantic constraints are specified again (grouping, permissible types, result type). Each paragraph then enumerates one of the cases of types of operands (pointer, pointer to member, std::nullptr_t, arithmetic or enumeration type).
The special wording about union members was phrased in terms of "same address" and moved to 9.5 class.union, where layout of union members is discussed.
Finally, the overload descriptions for built-in operators were adjusted, because objects of type std::nullptr_t cannot be used with relational operators any more.
Changes to the Working Paper
Add a new paragraph at the end of 5 expr:
The cv-compatible type of two types T1 and T2 is a type T3 similar to T1 whose cv-qualification signature (4.4 conv.qual) is: [ Note: This construction ensures that both T1 and T2 can be converted to T3. ] The composite pointer type of two operands p1 and p2 having types T1 and T2, respectively, is: [ Example:
typedef void *p;
typedef const int *q;
typedef int **pi;
typedef const int **pci;
The composite pointer type of p and q is "pointer to const void"; the composite pointer type of pi and pci is "pointer to const pointer to const int". ]
The following also resolves core issue 583.
Change in 5.9 expr.rel paragraphs 1 to 5:
... The operands shall have arithmetic, enumeration, or pointer type, or type std::nullptr_t.
The usual arithmetic conversions are performed on operands of arithmetic or enumeration type. If both operands are pointers, pointer Pointer conversions (4.10 conv.ptr) and qualification conversions (4.4 conv.qual) are performed on pointer operands (or on a pointer operand and a null pointer constant, or on two null pointer constants, at least one of which is non-integral) to bring them to their composite pointer type composite pointer type (clause 5 expr). If one operand is a null pointer constant, the composite pointer type is std::nullptr_t if the other operand is also a null pointer constant or, if the other operand is a pointer, the type of the other operand. Otherwise, if one of the operands has type "pointer to cv1 void," then the other has type "pointer to cv2 T " and the composite pointer type is "pointer to cv12 void," where cv12 is the union of cv1 and cv2. Otherwise, the composite pointer type is a pointer type similar (4.4 conv.qual) to the type of one of the operands, with a cv-qualification signature (4.4 conv.qual) that is the union of the cv-qualification signatures of the operand types. [ Note: this implies that any pointer can be compared to a null pointer constant and that any object pointer can be compared to a pointer to (possibly cv-qualified) void. -- end note ] [ Example:
void *p;
const int *q;
int **pi;
const int *const *pci;
void ct() {
p <= q; // Both converted to const void* before comparison
pi <= pci; // Both converted to const int *const * before comparison
}
-- end example ] After conversions, the operands shall have the same type.
Pointers to objects or functions of the same type (after pointer conversions) can be compared, with a result Comparing pointers to objects is defined as follows:
If two operands p and q compare equal (5.10 expr.eq), p<=q and p>=q both yield true and p<q and p>q both yield false. Otherwise, if a pointer p compares greater than a pointer q, p>=q and p>q both yield true and p<=q and p<q both yield false. Otherwise, the result of each of the operators is unspecified.
Pointers to void (after pointer conversions) can be compared, with a result defined as follows: If both pointers represent the same address or are both the null pointer value, the result is true if the operator is <= or >= and false otherwise; otherwise the result is unspecified.
If two operands of type std::nullptr_t are compared, the result is true if the operator is <= or >=, and false otherwise.
If both operands (after conversions) are of arithmetic or enumeration type, each of the operators shall yield true if the specified relationship is true and false if it is false.
Change in 5.10 expr.eq paragraphs 1 to 4:
The == (equal to) and the != (not equal to) operators group left-to-right. The operands shall have arithmetic, enumeration, pointer, or pointer to member type, or type std::nullptr_t. The operators == and != both yield true or false, i.e. a result of type bool. have the same semantic restrictions, conversions, and result type as the relational operators except for their lower precedence and truth-value result. [ Note: a<b == c<d is true whenever a<b and c<d have the same truth-value. -- end note ] In each case below, the operands shall have the same type after the specified conversions have been applied.
If one of the operands is a pointer, pointer conversions (4.10 conv.ptr) and qualification conversions (4.4 conv.qual) are performed on both operands to bring them to their composite pointer type (clause 5 expr). Comparing pointers is defined as follows: Pointers of the same type (after pointer conversions) can be compared for equality. Two pointers of the same type compare equal if and only if they are both null, both point to the same function, or both represent the same address (3.9.2 basic.compound), otherwise they compare unequal.
If one of the operands is a pointer to member, pointer In addition, pointers to members can be compared, or a pointer to member and a null pointer constant. Pointer to member conversions (4.11 conv.mem) and qualification conversions (4.4 conv.qual) are performed on both operands to bring them to a common type their composite pointer type (clause 5 expr). If one operand is a null pointer constant, the common type is the type of the other operand. Otherwise, the common type is a pointer to member type similar (4.4 conv.qual) to the type of one of the operands, with a cv-qualification signature (4.4 conv.qual) that is the union of the cv-qualification signatures of the operand types. [ Note: this implies that any pointer to member can be compared to a null pointer constant. -- end note ] Comparing pointers to member is defined as follows:
If two Two operands of type std::nullptr_t or one operand of type std::nullptr_t and the other a null pointer constant compare equal are compared, the result is true if the operator is ==, and false otherwise.
If two operands compare equal, the result is true for operator== and false for operator!=. If two operands compare unequal, the result is false for operator== and true for operator!=. Otherwise, the result of each of the operators is unspecified.
If both operands are of arithmetic or enumeration type, the usual arithmetic conversions are performed on both operands; each Each of the operators shall yield true if the specified relationship is true and false if it is false. [ Note: a<b == c<d is true whenever a<b and c<d have the same truth-value. -- end note ]
Change in 5.16 expr.cond paragraph 6:
Change in 9.5 class.union paragraph 1:
... Each non-static data member is allocated as if it were the sole member of a struct. All non-static data members of a union object have the same address. ...
Change in 13.6 over.built paragraphs 15 and 16:
For every T , where T is an enumeration type, or a pointer type, or std::nullptr_t, there exist candidate operator functions of the form
bool operator<(T , T );
bool operator>(T , T );
bool operator<=(T , T );
bool operator>=(T , T );
bool operator==(T , T );
bool operator!=(T , T );
For every pointer to member type T or type std::nullptr_t there exist candidate operator functions of the form
bool operator==(T , T );
bool operator!=(T , T );
Change in 20.7.2.2.7 util.smartptr.shared.cmp paragraph 2:
Returns: less<V>()(a.get(), b.get()), where V is the composite pointer type (5.9 expr.rel) (5 expr) of T* and U*.
|
{
"url": "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3478.html",
"source_domain": "www.open-std.org",
"snapshot_id": "crawl=CC-MAIN-2019-43",
"warc_metadata": {
"Content-Length": "16785",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:WXFWSHXTRQ42T2ZMCSRD4VTIG3SSC7MV",
"WARC-Concurrent-To": "<urn:uuid:bd0b9b8a-410c-43e5-8b68-cb400c7e6cd3>",
"WARC-Date": "2019-10-22T19:12:08Z",
"WARC-IP-Address": "93.90.116.65",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:3GXEWLR6BCDHVOXLAVR5OOQSWPUWCUGX",
"WARC-Record-ID": "<urn:uuid:b50d6c99-cda0-4465-81f9-19d9c8100ee3>",
"WARC-Target-URI": "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3478.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:275a700b-f367-4d3b-9612-ef5613e8db58>"
},
"warc_info": "isPartOf: CC-MAIN-2019-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-29.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,
14,
26,
37,
38,
103,
104,
117,
118,
248,
265,
267,
288,
315,
317,
345,
377,
379,
404,
406,
419,
420,
447,
448,
750,
751,
963,
964,
1328,
1329,
1658,
1659,
1812,
1813,
1976,
1977,
2006,
2007,
2049,
2361,
2378,
2400,
2418,
2443,
2596,
2640,
2641,
2683,
2684,
2778,
2779,
4097,
4098,
4107,
4121,
4131,
4154,
4166,
4237,
4315,
4317,
4392,
4393,
4555,
4556,
4862,
4863,
5144,
5145,
5267,
5268,
5447,
5448,
5490,
5491,
6103,
6104,
6646,
6647,
7495,
7496,
7706,
7707,
7954,
7955,
8273,
8274,
8312,
8351,
8512,
8560,
8697,
8727,
8757,
8788,
8819,
8850,
8881,
8992,
9023,
9054,
9113
],
"line_end_idx": [
14,
26,
37,
38,
103,
104,
117,
118,
248,
265,
267,
288,
315,
317,
345,
377,
379,
404,
406,
419,
420,
447,
448,
750,
751,
963,
964,
1328,
1329,
1658,
1659,
1812,
1813,
1976,
1977,
2006,
2007,
2049,
2361,
2378,
2400,
2418,
2443,
2596,
2640,
2641,
2683,
2684,
2778,
2779,
4097,
4098,
4107,
4121,
4131,
4154,
4166,
4237,
4315,
4317,
4392,
4393,
4555,
4556,
4862,
4863,
5144,
5145,
5267,
5268,
5447,
5448,
5490,
5491,
6103,
6104,
6646,
6647,
7495,
7496,
7706,
7707,
7954,
7955,
8273,
8274,
8312,
8351,
8512,
8560,
8697,
8727,
8757,
8788,
8819,
8850,
8881,
8992,
9023,
9054,
9113,
9226
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9226,
"ccnet_original_nlines": 101,
"rps_doc_curly_bracket": 0.0013006699737161398,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.33234715461730957,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01676529087126255,
"rps_doc_frac_lines_end_with_ellipsis": 0.009803920052945614,
"rps_doc_frac_no_alph_words": 0.2613412141799927,
"rps_doc_frac_unique_words": 0.20109814405441284,
"rps_doc_mean_word_length": 4.821551322937012,
"rps_doc_num_sentences": 127,
"rps_doc_symbol_to_word_ratio": 0.002958579920232296,
"rps_doc_unigram_entropy": 4.844832420349121,
"rps_doc_word_count": 1457,
"rps_doc_frac_chars_dupe_10grams": 0.24398577213287354,
"rps_doc_frac_chars_dupe_5grams": 0.41266903281211853,
"rps_doc_frac_chars_dupe_6grams": 0.3414946496486664,
"rps_doc_frac_chars_dupe_7grams": 0.31088969111442566,
"rps_doc_frac_chars_dupe_8grams": 0.27814945578575134,
"rps_doc_frac_chars_dupe_9grams": 0.25224199891090393,
"rps_doc_frac_chars_top_2gram": 0.01779359020292759,
"rps_doc_frac_chars_top_3gram": 0.034163698554039,
"rps_doc_frac_chars_top_4gram": 0.02277580089867115,
"rps_doc_books_importance": -880.0387573242188,
"rps_doc_books_importance_length_correction": -880.0387573242188,
"rps_doc_openwebtext_importance": -328.55609130859375,
"rps_doc_openwebtext_importance_length_correction": -328.55609130859375,
"rps_doc_wikipedia_importance": -246.2476348876953,
"rps_doc_wikipedia_importance_length_correction": -246.2476348876953
},
"fasttext": {
"dclm": 0.39041364192962646,
"english": 0.8627004027366638,
"fineweb_edu_approx": 2.5146331787109375,
"eai_general_math": 0.9813703298568726,
"eai_open_web_math": 0.07437705993652344,
"eai_web_code": 0.9830111265182495
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "2",
"label": "Academic/Research"
},
"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": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,547,674,867,280,601,000 |
0
Prblem: Implement a base class Account and derived classes Savings and Checking. In the base class,supply member functions deposit(), withdraw(), and print() which prints out the ownerand balance. Create constructors that take a string (for the owner's name) and a double for the initialbalance. All methods should return void.
I also need to implement a daily_interest()but i didnt do it
My code did compile right, but it did not give the right output
#include <iostream>
#include <string>
using namespace std;
const int DAYS_PER_MONTH = 30;
///////////// Account CLASS //////////////////////////
class Account
{
public:
Account(double amount);
void deposit(double amount);
void withdraw(double amount);
void print();
void daily_interest();
//private:
double balance;
};
Account::Account(double amount)
{
balance = amount;
}
void Account::deposit(double amount)
{
balance += amount;
}
void Account::withdraw(double amount)
{
balance -= amount;
}
void Account::print()
{
cout << balance;
}
void Account::daily_interest()
{}
///////////// Savings CLASS //////////////////////////
class Savings : public Account
{
public:
Savings(double balance);
double get_balance() const;
private:
double s_balance;
};
Savings::Savings(double balance)
: Account(balance)
{
s_balance = balance;
}
double Savings::get_balance() const
{
return s_balance;
}
///////////// Checking CLASS //////////////////////////
class Checking : public Account
{
public:
Checking(double balance);
double get_balance() const;
private:
double c_balance;
};
Checking::Checking(double balance)
: Account(balance)
{
c_balance = balance;
}
double Checking::get_balance() const
{
return c_balance;
}
///////////////////////////////////////////////////////
int main()
{
Checking c = Checking(1000.0);
Savings s = Savings(1000.0);
for (int i = 1; i <= DAYS_PER_MONTH; i++)
{
c.deposit(i * 5);
c.withdraw(i * 2);
s.deposit(i * 5);
s.withdraw(i * 2);
//c.daily_interest();
//s.daily_interest();
if (i % 10 == 0)
{
cout << "day " << i << "\n";
cout << "Checking balance: " << c.get_balance() << "\n";
cout << "Savings balance: " << s.get_balance() << "\n";
}
}
return 0;
}
Edited by Nick Evan: Fixed CODE-tag
3
Contributors
4
Replies
7
Views
7 Years
Discussion Span
Last Post by chiwawa10
0
the outputs are suppose to be different but what i got out were all the same
i think my deposit and withdraw are not working
0
I made the class definition for the checking and saving, but i don't know how to do the inheritance... =.=
class Savings
{
public:
Savings(double balance);
double get_balance() const;
void deposit(double amount);
void withdraw(double amount);
void print() const;
void daily_interest();
private:
double s_balance;
};
Savings::Savings(double balance)
{
s_balance = balance;
}
double Savings::get_balance() const
{
return s_balance;
}
void Savings::deposit(double amount)
{
s_balance += amount;
}
void Savings::withdraw(double amount)
{
s_balance -= amount;
}
void Savings::print() const
{
cout << s_balance;
}
void Savings::daily_interest()
{
s_balance += s_balance*(0.06/DAYS_PER_MONTH);
}
///////////// Checking CLASS //////////////////////////
class Checking
{
public:
Checking(double balance);
double get_balance() const;
void deposit(double amount);
void withdraw(double amount);
void print() const;
void daily_interest();
private:
double c_balance;
};
Checking::Checking(double balance)
{
c_balance = balance;
}
double Checking::get_balance() const
{
return c_balance;
}
void Checking::deposit(double amount)
{
c_balance += amount;
}
void Checking::withdraw(double amount)
{
c_balance -= amount;
}
void Checking::print() const
{
cout << c_balance;
}
void Checking::daily_interest()
{
double over = c_balance - 1000;
c_balance += over*(0.03/30);
}
0
First off, what class do you want to inherit? Since there is no mention of a third class, it's hard to guess what class you want to introduce. Inheritance is easy. Let's say I am introducing a ChildSavings class which will inherit from the Saving class, the code would just be as follows.
class ChildSavings : public Savings // this is how you introduce inheritance
{
// add class methods and properties here
}
The ChildSavings class will have all the properties and methods of its parent class. Hope this is what you're looking for.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.
|
{
"url": "https://www.daniweb.com/programming/software-development/threads/325554/inheritance-and-class-help",
"source_domain": "www.daniweb.com",
"snapshot_id": "crawl=CC-MAIN-2018-39",
"warc_metadata": {
"Content-Length": "55476",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ICGLACUPECVFREFTQNEHMSWKAOITCJL7",
"WARC-Concurrent-To": "<urn:uuid:413e2e98-3afb-436f-8f1a-fc1b7d266dcf>",
"WARC-Date": "2018-09-23T06:06:00Z",
"WARC-IP-Address": "198.23.117.137",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ME3T6HUHOEDGCM6ZYVP3ZMSIDHOKCBGA",
"WARC-Record-ID": "<urn:uuid:4aee2ee2-bd12-4a32-9fbb-7eccc0b9268b>",
"WARC-Target-URI": "https://www.daniweb.com/programming/software-development/threads/325554/inheritance-and-class-help",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2afc139a-5ea0-4c59-a97b-779ba270e26a>"
},
"warc_info": "isPartOf: CC-MAIN-2018-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-51-154-251.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
2,
3,
331,
392,
456,
457,
477,
495,
516,
517,
548,
549,
604,
618,
620,
628,
656,
689,
723,
741,
768,
779,
799,
802,
834,
836,
858,
860,
897,
899,
922,
924,
962,
964,
987,
989,
1011,
1013,
1034,
1036,
1067,
1070,
1125,
1156,
1158,
1166,
1195,
1227,
1236,
1258,
1261,
1294,
1317,
1319,
1344,
1346,
1382,
1384,
1406,
1408,
1464,
1496,
1498,
1506,
1536,
1568,
1577,
1599,
1602,
1637,
1660,
1662,
1688,
1690,
1728,
1729,
1731,
1753,
1755,
1811,
1822,
1824,
1859,
1892,
1938,
1944,
1970,
1997,
2023,
2050,
2080,
2110,
2135,
2145,
2186,
2255,
2323,
2333,
2339,
2353,
2355,
2356,
2392,
2393,
2395,
2408,
2410,
2418,
2420,
2426,
2434,
2450,
2473,
2475,
2476,
2553,
2601,
2602,
2604,
2605,
2712,
2713,
2727,
2729,
2737,
2766,
2798,
2831,
2865,
2889,
2916,
2925,
2947,
2950,
2983,
2985,
3010,
3012,
3048,
3050,
3072,
3074,
3111,
3113,
3138,
3140,
3178,
3180,
3205,
3207,
3235,
3237,
3260,
3262,
3293,
3295,
3345,
3347,
3403,
3418,
3420,
3428,
3458,
3490,
3523,
3557,
3581,
3608,
3617,
3639,
3642,
3677,
3679,
3704,
3706,
3743,
3745,
3767,
3769,
3807,
3809,
3834,
3836,
3875,
3877,
3902,
3904,
3933,
3935,
3958,
3960,
3992,
3994,
4030,
4063,
4065,
4067,
4068,
4357,
4358,
4437,
4439,
4483,
4485,
4486,
4609,
4610,
4688
],
"line_end_idx": [
2,
3,
331,
392,
456,
457,
477,
495,
516,
517,
548,
549,
604,
618,
620,
628,
656,
689,
723,
741,
768,
779,
799,
802,
834,
836,
858,
860,
897,
899,
922,
924,
962,
964,
987,
989,
1011,
1013,
1034,
1036,
1067,
1070,
1125,
1156,
1158,
1166,
1195,
1227,
1236,
1258,
1261,
1294,
1317,
1319,
1344,
1346,
1382,
1384,
1406,
1408,
1464,
1496,
1498,
1506,
1536,
1568,
1577,
1599,
1602,
1637,
1660,
1662,
1688,
1690,
1728,
1729,
1731,
1753,
1755,
1811,
1822,
1824,
1859,
1892,
1938,
1944,
1970,
1997,
2023,
2050,
2080,
2110,
2135,
2145,
2186,
2255,
2323,
2333,
2339,
2353,
2355,
2356,
2392,
2393,
2395,
2408,
2410,
2418,
2420,
2426,
2434,
2450,
2473,
2475,
2476,
2553,
2601,
2602,
2604,
2605,
2712,
2713,
2727,
2729,
2737,
2766,
2798,
2831,
2865,
2889,
2916,
2925,
2947,
2950,
2983,
2985,
3010,
3012,
3048,
3050,
3072,
3074,
3111,
3113,
3138,
3140,
3178,
3180,
3205,
3207,
3235,
3237,
3260,
3262,
3293,
3295,
3345,
3347,
3403,
3418,
3420,
3428,
3458,
3490,
3523,
3557,
3581,
3608,
3617,
3639,
3642,
3677,
3679,
3704,
3706,
3743,
3745,
3767,
3769,
3807,
3809,
3834,
3836,
3875,
3877,
3902,
3904,
3933,
3935,
3958,
3960,
3992,
3994,
4030,
4063,
4065,
4067,
4068,
4357,
4358,
4437,
4439,
4483,
4485,
4486,
4609,
4610,
4688,
4826
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 4826,
"ccnet_original_nlines": 208,
"rps_doc_curly_bracket": 0.012432659976184368,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.18172156810760498,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.011689689941704273,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3974495232105255,
"rps_doc_frac_unique_words": 0.41233140230178833,
"rps_doc_mean_word_length": 6.013487339019775,
"rps_doc_num_sentences": 27,
"rps_doc_symbol_to_word_ratio": 0.0031880999449640512,
"rps_doc_unigram_entropy": 4.809075832366943,
"rps_doc_word_count": 519,
"rps_doc_frac_chars_dupe_10grams": 0.0762576088309288,
"rps_doc_frac_chars_dupe_5grams": 0.28388336300849915,
"rps_doc_frac_chars_dupe_6grams": 0.2191605269908905,
"rps_doc_frac_chars_dupe_7grams": 0.16789491474628448,
"rps_doc_frac_chars_dupe_8grams": 0.09420058131217957,
"rps_doc_frac_chars_dupe_9grams": 0.0762576088309288,
"rps_doc_frac_chars_top_2gram": 0.04485742002725601,
"rps_doc_frac_chars_top_3gram": 0.02947773039340973,
"rps_doc_frac_chars_top_4gram": 0.03588593006134033,
"rps_doc_books_importance": -373.996337890625,
"rps_doc_books_importance_length_correction": -373.996337890625,
"rps_doc_openwebtext_importance": -236.72190856933594,
"rps_doc_openwebtext_importance_length_correction": -236.72190856933594,
"rps_doc_wikipedia_importance": -184.0499267578125,
"rps_doc_wikipedia_importance_length_correction": -184.0499267578125
},
"fasttext": {
"dclm": 0.8206832408905029,
"english": 0.6732708811759949,
"fineweb_edu_approx": 1.2305256128311157,
"eai_general_math": 0.9815452098846436,
"eai_open_web_math": 0.19242733716964722,
"eai_web_code": 0.7374255657196045
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "2",
"label": "Partially Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,347,720,660,364,710,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.
I'm new to jira-plugin development and I'm finding it a bit difficult to start with due to the lack of documentation and examples (at least it lacks in my opinion).
Right now I'm trying to show content on a dialog. What I've done so far is the following:
• Create a link with href="/secure/myAction!myMethod.jspa" with class="trigger-dialog".
• In the action method I prepare the data which I will show in the dialog. Which will finally call a view.
• Prepare a .vm file which will show the content of the dialog.
I think at this point everything is ok, in fact I see the content of the dialog. But the problem is that I can't find how to set the title of the dialog, add buttons to the footer which can call other actions. Also I can't find how to specify the dialog size.
Googling and checking the documentation seems everybody creates the dialogs using Javascript. Is this the only way? In my opinion is easier to use the velocity template.
Is there any way to get specify all the options that are available using Javascript but using a velocity template?
Anyone knows about good site for examples and documentation for this?
Thank you!
share|improve this question
add comment
Your Answer
discard
By posting your answer, you agree to the privacy policy and terms of service.
Browse other questions tagged or ask your own question.
|
{
"url": "http://stackoverflow.com/questions/16423039/show-dialog-on-new-plugin",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2014-15",
"warc_metadata": {
"Content-Length": "59101",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:P7BMEGAWRAJQVW4SCGXUBG5HEW3YJMLF",
"WARC-Concurrent-To": "<urn:uuid:dd1d5b33-171a-4707-846e-fd7156e4f0db>",
"WARC-Date": "2014-04-19T08:31:33Z",
"WARC-IP-Address": "198.252.206.140",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:SK7KG4YJCD3LC6WJVEM33N2FB2ENHNA5",
"WARC-Record-ID": "<urn:uuid:524252f8-aced-43ab-ac1d-14d1f8f93a05>",
"WARC-Target-URI": "http://stackoverflow.com/questions/16423039/show-dialog-on-new-plugin",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4222c904-8cae-42cd-81d0-e7c0b2f79e09>"
},
"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,
157,
158,
323,
324,
414,
415,
505,
614,
680,
681,
941,
942,
1112,
1113,
1228,
1229,
1299,
1300,
1311,
1312,
1340,
1352,
1353,
1365,
1366,
1368,
1376,
1377,
1455,
1456
],
"line_end_idx": [
25,
157,
158,
323,
324,
414,
415,
505,
614,
680,
681,
941,
942,
1112,
1113,
1228,
1229,
1299,
1300,
1311,
1312,
1340,
1352,
1353,
1365,
1366,
1368,
1376,
1377,
1455,
1456,
1511
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1511,
"ccnet_original_nlines": 31,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4263322949409485,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.031347960233688354,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15673981606960297,
"rps_doc_frac_unique_words": 0.5521235466003418,
"rps_doc_mean_word_length": 4.567567348480225,
"rps_doc_num_sentences": 22,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.6102142333984375,
"rps_doc_word_count": 259,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05917159840464592,
"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.03803887963294983,
"rps_doc_frac_chars_top_3gram": 0.027895180508494377,
"rps_doc_frac_chars_top_4gram": 0.0253592599183321,
"rps_doc_books_importance": -135.3894500732422,
"rps_doc_books_importance_length_correction": -125.61575317382812,
"rps_doc_openwebtext_importance": -88.6358413696289,
"rps_doc_openwebtext_importance_length_correction": -88.6358413696289,
"rps_doc_wikipedia_importance": -66.55719757080078,
"rps_doc_wikipedia_importance_length_correction": -54.178367614746094
},
"fasttext": {
"dclm": 0.02043295092880726,
"english": 0.8878299593925476,
"fineweb_edu_approx": 0.9445841312408447,
"eai_general_math": 0.01974022015929222,
"eai_open_web_math": 0.17837506532669067,
"eai_web_code": 0.0016748900525271893
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.455",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "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": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-615,429,054,486,319,700 |
• Paul Welch's avatar
Gh98 fix failing ci (#102) · 5466001e
Paul Welch authored
* Fix FC116
Cookbook depends on the deprecated compat_resource cookbook
Chef 12 is end of life and this cookbook wasn’t necessary after Chef 12.19.
* Remove Debian 7 From Tests Because it's EOL
Debian 7 (Wheezy) is End of Life so this drops support
from CI.
https://wiki.debian.org/LTS
* Fix basic InSpec test for agent recipe
* Skip CentOS 6 to fix CI
* Use Chef version 13.8 or higher
- Use Chef version 13.8 or higher since 12 is EOL
- Use major versions for testing distro names
* Update required chef version
5466001e
default_spec.rb 307 Bytes
|
{
"url": "https://gitlab.openminds.be/mirror/ossec-cookbook/-/blob/5466001e2ab6732aa6808a71abea190b2aad86e2/test/integration/client/default_spec.rb",
"source_domain": "gitlab.openminds.be",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "84250",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UDNFE22KGOASDZMIDGKEB6WE23OPJ3JK",
"WARC-Concurrent-To": "<urn:uuid:30eadb58-c86b-4b21-9014-f51a45b2885b>",
"WARC-Date": "2022-01-19T19:16:15Z",
"WARC-IP-Address": "37.72.163.112",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:K4GGAXKEUBKLWMGADCN3TT2ZPUCCEY65",
"WARC-Record-ID": "<urn:uuid:61ce1e90-7067-469b-a2b0-fe7c2e4d456f>",
"WARC-Target-URI": "https://gitlab.openminds.be/mirror/ossec-cookbook/-/blob/5466001e2ab6732aa6808a71abea190b2aad86e2/test/integration/client/default_spec.rb",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bef38f0d-33c6-4aa6-ac67-a59bbe8213f0>"
},
"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-243\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,
24,
66,
90,
106,
111,
175,
180,
260,
265,
315,
320,
379,
392,
397,
429,
434,
479,
484,
514,
519,
557,
562,
616,
666,
671,
706,
719
],
"line_end_idx": [
24,
66,
90,
106,
111,
175,
180,
260,
265,
315,
320,
379,
392,
397,
429,
434,
479,
484,
514,
519,
557,
562,
616,
666,
671,
706,
719,
744
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 744,
"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.17266187071800232,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.04316547140479088,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.28776979446411133,
"rps_doc_frac_unique_words": 0.6893203854560852,
"rps_doc_mean_word_length": 4.747572898864746,
"rps_doc_num_sentences": 9,
"rps_doc_symbol_to_word_ratio": 0.007194240111857653,
"rps_doc_unigram_entropy": 4.140884876251221,
"rps_doc_word_count": 103,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.10224948823451996,
"rps_doc_frac_chars_dupe_6grams": 0.10224948823451996,
"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.06748466193675995,
"rps_doc_frac_chars_top_3gram": 0.028629859909415245,
"rps_doc_frac_chars_top_4gram": 0.044989779591560364,
"rps_doc_books_importance": -50.10331344604492,
"rps_doc_books_importance_length_correction": -50.10350799560547,
"rps_doc_openwebtext_importance": -28.77115249633789,
"rps_doc_openwebtext_importance_length_correction": -28.771347045898438,
"rps_doc_wikipedia_importance": -21.349929809570312,
"rps_doc_wikipedia_importance_length_correction": -21.35012435913086
},
"fasttext": {
"dclm": 0.019976679235696793,
"english": 0.6880677342414856,
"fineweb_edu_approx": 1.2354265451431274,
"eai_general_math": 0.007891420274972916,
"eai_open_web_math": 0.238783597946167,
"eai_web_code": 0.13053327798843384
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.455",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.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": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,381,692,854,070,550,000 |
"Visual" Programming?
Talk about anything else you want
Moderator: BigEvilCorporation
Post Reply
CrazyMonkey
Newbie
Posts: 8
Joined: Mon Feb 15, 2016 12:43 pm
"Visual" Programming?
Post by CrazyMonkey » Sat Apr 01, 2017 4:01 pm
So, I was playing some genny games from 1993 or 1994 and up, and some 16bit arcade machines from the 90s. I noticed a pattern, which is hardly applied these days (exceptions still exist), now by indie developers more. And frankly, to this day I have found almost no recognition nor mention to any of that, not in my college's videogame design course before quitting, not in Programming sites, not in Game Programming sites, nor in Graphic Design sites either!
The game has to be appealing, and needs a style. But the visual artist's power is limited to drawing sprites/planes, while it's programmer's task to make stuff actually move, on the screen.
However, in the 90s, devs seem to have turned more ambitious than that, until it almost became a requisite for the newer games.
From the games I played (In the Hunt, Sonic 3 Complete, Alien Soldier, Contra HardCorps or Ristar to name a few), I noticed there's a deliberate intent on applying what I call "complicated movement patterns", in the name of "pushing hardware limits". "Worms" and/or other misc "chains", "particles", X/Y speed add/sub (though a basic one, this time now apply for almost everything), circles, arithmetical progressions ideology (to position the particles between two points, or move an object to a given place in a given frame amount), HBlank (scanline repositioning (race fields, "vertical resizing", etc), changing colors), and many more.
In some cases, I THINK it could be a game style done "by force" though, as some effects in Ristar do look quite "messy" in lazy ways sometimes (even though they have seemingly contracted someone to exclusively work in the game's effects).
HardCorps' programmer said in an interview that, after the game had been planned to look this way beforehand, "As a result, the entire game is something of a programming exhibition of skill."
But what happens with the last statement? Well, as a hobbyist programmer, I don't think good visual programming equals to good technical and/or logical programming. My boyfriend does very good on writing game cores, hardware drivers/libraries, and the like. While writing objects, their final code also gets very light & clean, and works very well. But at runtime, they look some rigid or "simple" moving.
I'm exactly the other way: for game cores/drivers/libraries, my code isn't exactly the most optimized as friends say, sometimes "thoughtless". This supossedly gets worse when writing in-game objects and similar stuffs (gimmicks, enemies, bosses, screens (score tally(ies), title screen), etc). It unconsciously happens the most when the spritesheets to use have been drawn by myself, because, as I'm writing the object, straight from vfx mindset: I have this tendency to focus on how it "looks" more than how it "works".
This tendency, however, isn't really "new" to me: I seen the disassembly of a well sold, "professional" genny game, and the objects written have lots of weird stuffs. Self-patching, duplicate codes, dead codes from previous "attempts", memory re-hacking, and generally weirdly arbitrary operations from time to time. I could be wrong, but sometimes it really looks like they were given the spritesheets to work with, then manually experimented around until coming up with a good movement pattern that plays good. Especially with the particle-based explosions!
The final ROM plays very good, it COULD be tagged as a "programming exhibition of skill" too, but would it deserve such a title?
So, what's your take on this? Should Visual Programming be more taken into account? Is exclusvely visual-oriented program an acceptable skill?
I think what does best is, why of course, the proper balance. It's just that it requires much more human skill and/or patience to apply.
User avatar
Miquel
Very interested
Posts: 432
Joined: Sat Jul 30, 2016 12:33 am
Re: "Visual" Programming?
Post by Miquel » Fri Jul 14, 2017 9:26 pm
In the 90's developing teams were in the very few tens at most, with light teams you can go nuts in programming excellence since organization is easy. But now, with thousands you need more strict rules to make it go forward.
CrazyMonkey wrote:
Sat Apr 01, 2017 4:01 pm
HardCorps' programmer said in an interview that, after the game had been planned to look this way beforehand, "As a result, the entire game is something of a programming exhibition of skill."
Back then to sell you needed to make exuberant assertions, true was not of capital importance. An that was a triple concatenation: the 3rd party company, the mother company and the media.
CrazyMonkey wrote:
Sat Apr 01, 2017 4:01 pm
sometimes it really looks like they were given the spritesheets to work with, then manually experimented around until coming up with a good movement pattern that plays good.
When the sprite sheets are who rules the animation the results are usually catastrophic. For example Earthworm Jim, try to play it nowadays. So probably was a continuous development from both sides in most cases.
It seems to me you are asking yourself how should rule over a game, the coder or the graphical artist. The answer is neither. There is a 3rt figure, the game designer who does that.
Talking about animation, all the programmer really does is looping over tables with different options in a complete abstract way. Also provides a way to fill those tables, usually with a text file. The designer then continuously modifies that text file until the game is playable.
Post Reply
Who is online
Users browsing this forum: No registered users and 2 guests
|
{
"url": "http://gendev.spritesmind.net/forum/viewtopic.php?f=14&t=2587&p=31880&sid=b7b0d65ef40ab924573cb8ce77a8f5c7",
"source_domain": "gendev.spritesmind.net",
"snapshot_id": "crawl=CC-MAIN-2019-22",
"warc_metadata": {
"Content-Length": "32304",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:7QXX4LAJ7NKBM7XVD3WETJDI2NCCYAM7",
"WARC-Concurrent-To": "<urn:uuid:733787b2-240f-482e-a5c7-f28c8cf7f822>",
"WARC-Date": "2019-05-26T17:14:56Z",
"WARC-IP-Address": "213.186.33.40",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:HZDUQRIJ5HOVRWZXTYA6X53BJC7CGN3H",
"WARC-Record-ID": "<urn:uuid:76d4437c-453f-41c1-88b8-7a168e318c27>",
"WARC-Target-URI": "http://gendev.spritesmind.net/forum/viewtopic.php?f=14&t=2587&p=31880&sid=b7b0d65ef40ab924573cb8ce77a8f5c7",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:a2708554-7b7b-4b03-9ff0-ba0d07fc950e>"
},
"warc_info": "isPartOf: CC-MAIN-2019-22\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-168-187-224.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,
22,
23,
57,
58,
88,
89,
100,
112,
119,
128,
162,
163,
185,
186,
233,
234,
694,
884,
1012,
1652,
1891,
2083,
2084,
2490,
3011,
3012,
3572,
3701,
3702,
3703,
3846,
3847,
3984,
3985,
3997,
4004,
4020,
4031,
4065,
4066,
4092,
4093,
4135,
4136,
4361,
4380,
4405,
4597,
4785,
4804,
4829,
5003,
5216,
5217,
5399,
5680,
5681,
5692,
5693,
5707,
5708
],
"line_end_idx": [
22,
23,
57,
58,
88,
89,
100,
112,
119,
128,
162,
163,
185,
186,
233,
234,
694,
884,
1012,
1652,
1891,
2083,
2084,
2490,
3011,
3012,
3572,
3701,
3702,
3703,
3846,
3847,
3984,
3985,
3997,
4004,
4020,
4031,
4065,
4066,
4092,
4093,
4135,
4136,
4361,
4380,
4405,
4597,
4785,
4804,
4829,
5003,
5216,
5217,
5399,
5680,
5681,
5692,
5693,
5707,
5708,
5767
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 5767,
"ccnet_original_nlines": 61,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3937138020992279,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.015715470537543297,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2133994996547699,
"rps_doc_frac_unique_words": 0.472075879573822,
"rps_doc_mean_word_length": 4.798735618591309,
"rps_doc_num_sentences": 47,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.618542194366455,
"rps_doc_word_count": 949,
"rps_doc_frac_chars_dupe_10grams": 0.1304347813129425,
"rps_doc_frac_chars_dupe_5grams": 0.1550285518169403,
"rps_doc_frac_chars_dupe_6grams": 0.14866052567958832,
"rps_doc_frac_chars_dupe_7grams": 0.14492754638195038,
"rps_doc_frac_chars_dupe_8grams": 0.14492754638195038,
"rps_doc_frac_chars_dupe_9grams": 0.1304347813129425,
"rps_doc_frac_chars_top_2gram": 0.00658761989325285,
"rps_doc_frac_chars_top_3gram": 0.005270089954137802,
"rps_doc_frac_chars_top_4gram": 0.007905139587819576,
"rps_doc_books_importance": -497.9037170410156,
"rps_doc_books_importance_length_correction": -497.9037170410156,
"rps_doc_openwebtext_importance": -284.58294677734375,
"rps_doc_openwebtext_importance_length_correction": -284.58294677734375,
"rps_doc_wikipedia_importance": -237.1737518310547,
"rps_doc_wikipedia_importance_length_correction": -237.1737518310547
},
"fasttext": {
"dclm": 0.03293323889374733,
"english": 0.9627828598022461,
"fineweb_edu_approx": 1.558039903640747,
"eai_general_math": 0.14962512254714966,
"eai_open_web_math": 0.1673336625099182,
"eai_web_code": 0.013180970214307308
}
}
|
{
"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": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "5",
"label": "Comment Section"
}
},
"reasoning_depth": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,754,859,292,247,880,700 |
A Python Tutorial on Partition and QuickSort Algorithm
• Tanesh Balodi
• Sep 22, 2021
• Python Programming
A Python Tutorial on Partition and QuickSort Algorithm title banner
The sorting algorithms are the fundamentals of data structure, one needs to have an in-depth knowledge of common searching and sorting algorithms like, merge sort, bubble sort, quicksort, selection sort, and more. In-depth knowledge includes the algorithms’ time and space complexity as well.
From competitive exams to software developer interviews, data structure is an integral part of computer science, the knowledge of basic searching and sorting techniques ( such as bubble sort and merge sort) acts as a building block for data structure and algorithms. In this blog, we are going to deal with a quicksort algorithm.
Quicksort Algorithm
Quicksort is one of the most common sorting techniques that uses partition algorithm and divides and conquer method, in order to apply the divide and conquer technique, some of the points are to be remembered;
1. It divides the original problem into sub-problems, but all sub-problems have to be the same, for example-: if the problem is to sort, then the sub-problem should also be of sorting.
2. Before applying DAC to a problem, analyze if we can combine all the solutions of all the sub-problems at the end or not.
3. The approach of divide and conquer leads to better time complexity, but there may be approaches that can provide similar time complexity with better space complexity, so choose wisely.
Quicksort In Python
Quick-sort algorithms place each and every element at its sorted position one by one, what is a sorted place for any number? Let us say we name the element we want to sort like a ‘pivot’, then all the numbers less than the pivot should be at its left, and all the numbers greater than the pivot should be at its right. This approach is partition algorithm.
image represents the working of partition algorithm.
Partition Algorithm
Let’s try to understand how we can implement partition algorithm in quicksort with an example-:
image 1
As we said that the quicksort algorithm sorts each and every element one by one, which means we can start from either last or from the first to crawl, so let’s start with sorting the first element, i.e ‘9’, let us name this element as pivot. Infinity is added to the last in order to cover every element in the process or to save a few lines of code.
Pivot = 9
We have taken two variables i and j, ‘i’ will search for elements greater than the pivot element whereas ‘j’ will search for the elements smaller than the pivot element. The intuition is to increment ‘i’ until we find an element greater than the pivot, and to decrement ‘j’ until we find an element smaller or equal to the pivot.
Therefore right after we will start, we will check if j>i, because there has to be more than 1 element to perform sorting. Initially, we will increment ‘i’ to the adjacent element, i.e 15, we will compare pivot with 15 and as 15 is greater than the pivot, we will stop there, on the other hand, we will be decrementing ‘j’, and the next element is 8 which is less than the pivot element, therefore we will stop decrementing. Wherever we stop both i and j, we shall swap them.
image 2
(Also read: Scrapy Tutorial for Web Scraping With Python)
We have swapped the ith and the jth element and incremented ‘i’ to the next value and decremented ‘j’ to the next value. Now the pivot is greater than 7, therefore it will continue to move forward, but the next element is 1, pivot is less than 11, therefore ‘i’ will stop here. The other variable ‘j’ will stop at 2 as it is smaller than the pivot and we will swap ‘i’ and ‘j’.
image 3
Similarly the following steps will include-:
image 4
Now i will increment to 14, which is greater than pivot, therefore we will stop at 15, j will be decremented and will move to 5, here, i>j, therefore we will simply swap the pivot element with the ‘jth’ element, this way the pivot element gets to its sorted place.
image 5
In this way, we have to recursively apply partitions in order to perform quicksort for each and every element, that’s how all the elements will be sorted. So we need to make a function or a method that could implement the partition algorithm and then we have to apply recursion to apply quicksort.
Key points for partition algorithm-:
1. If i<j, increment i and stop when the pivot element is less than ith element.
2. For i<j, decrement j and stop when the pivot element is greater than the jth element.
3. After every stop of i and j, while i<j, swap the elements of i and j.
4. When i>j, swap jth element with the pivot.
Partition Algorithm Using Python
In this function, we are going to apply all that we have learned so far about the working of partition algorithm-:
def partition(A,l,h):
pivot = A[l]
i=l
j=h-1
while i<j:
while A[i]<pivot:
i+=1
while A[j]>pivot:
j-=1
if A[i]>pivot and A[j]<pivot:
A[i],A[j]=A[j],A[i]
A[l],A[j]=A[j],A[l]
return j
Code is nothing but everything that we have discussed above in the partition algorithm. We have taken a function that accepts an array(A), starting index(l), and the highest index(h), so there are three parameters to the function.
(Recommended: Data Types in Python)
We have taken a pivot element, and i and j variable to increment and decrement in an array. While i<j, we are doing all the swapping, incrementing, decrementing as stated above in the partition algorithm. We can see that at last we are returning j as discussed above.
Quicksort python code
Now in order to apply quicksort, we need a function that accepts an array, starting index and the ending index. After that we will check if l<h, then we will simply store the result of partition on the variable ‘j’, then we have to apply quicksort from ‘l’ to ‘j’, and ‘j+1’ to h. This will recursively sort each and every element in the list, and the sorted list will appear.
image 6
def qsort(A,l,h):
if l<h:
j = partition(A,l,h)
qsort(A,l,j)
qsort(A,j+1,h)
As what we apply to the quicksort is nothing but a method called divide and conquer, i.e, we break the problem into several sub-problem, in this case we want to sort the whole list, we are minimizing the problem into sorting each and every element in the list. The most important step in the divide and conquer method is that we should be able to combine the result as we are doing in the case of quicksort, we are able to merge all the solutions.
(Also read: First step towards python)
As we break the problem into half, let's consider we have a problem ‘n’, then we are breaking it into the sequence-:
n,n/2,n/4,n/8,.......1, therefore the time complexity of quicksort is o(nlogn), whereas the space remains unchanged in the case of quicksort, therefore the space complexity is o(n).
Conclusion
With the brief knowledge about partition algorithm and quicksort algorithm, we can conclude that partition algorithm is the soul of quicksort algorithm, the python code for quicksort includes recursion and the strategy is divide and conquer.
(Suggest blog: Feature Scaling In Machine Learning Using Python)
At the end we calculated the time complexity and the space complexity for the quicksort algo.
0%
Comments
|
{
"url": "https://www.analyticssteps.com/blogs/python-tutorial-partition-and-quicksort-algorithm",
"source_domain": "www.analyticssteps.com",
"snapshot_id": "crawl=CC-MAIN-2021-43",
"warc_metadata": {
"Content-Length": "46010",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TAMOMIYFSEZIICACUK5MQOZSXWQILK7U",
"WARC-Concurrent-To": "<urn:uuid:680bb9e4-e1bc-4a30-b63c-4b8bc358ba27>",
"WARC-Date": "2021-10-22T23:23:35Z",
"WARC-IP-Address": "13.235.204.31",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:XGXIURA5QQK74DPJRIWY2BNE775PP3NF",
"WARC-Record-ID": "<urn:uuid:d0eb30af-0331-4fa2-b57f-b6c24e4af963>",
"WARC-Target-URI": "https://www.analyticssteps.com/blogs/python-tutorial-partition-and-quicksort-algorithm",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c1bc88d3-2666-4cf9-b385-36d4925eddda>"
},
"warc_info": "isPartOf: CC-MAIN-2021-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-88\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,
55,
56,
74,
91,
114,
182,
183,
477,
478,
480,
481,
811,
812,
814,
815,
817,
818,
838,
839,
841,
842,
1052,
1053,
1055,
1056,
1243,
1244,
1370,
1371,
1561,
1562,
1564,
1565,
1585,
1586,
1588,
1589,
1946,
1947,
1949,
1950,
2003,
2004,
2024,
2025,
2027,
2028,
2124,
2125,
2133,
2134,
2485,
2486,
2488,
2489,
2499,
2500,
2502,
2503,
2833,
2834,
2836,
2837,
3313,
3314,
3316,
3317,
3325,
3326,
3384,
3385,
3387,
3388,
3766,
3767,
3769,
3770,
3778,
3779,
3781,
3782,
3827,
3828,
3830,
3831,
3839,
3840,
3842,
3843,
4108,
4109,
4111,
4112,
4120,
4121,
4123,
4124,
4423,
4424,
4426,
4427,
4464,
4465,
4548,
4549,
4640,
4641,
4716,
4717,
4765,
4766,
4768,
4769,
4771,
4772,
4805,
4806,
4808,
4809,
4924,
4925,
4927,
4928,
4950,
4951,
4968,
4969,
4977,
4978,
4988,
4989,
4994,
4995,
5010,
5011,
5037,
5038,
5055,
5056,
5082,
5083,
5100,
5101,
5139,
5140,
5172,
5173,
5186,
5187,
5211,
5212,
5217,
5218,
5231,
5232,
5234,
5235,
5466,
5467,
5469,
5470,
5506,
5507,
5509,
5510,
5778,
5779,
5781,
5782,
5804,
5805,
5807,
5808,
6185,
6186,
6188,
6189,
6197,
6198,
6200,
6201,
6219,
6220,
6225,
6226,
6238,
6239,
6268,
6269,
6290,
6291,
6314,
6315,
6317,
6318,
6766,
6767,
6769,
6770,
6809,
6810,
6812,
6813,
6930,
6931,
6933,
6934,
7116,
7117,
7119,
7120,
7122,
7123,
7134,
7135,
7137,
7138,
7381,
7382,
7384,
7385,
7450,
7451,
7453,
7454,
7548,
7549,
7552,
7553
],
"line_end_idx": [
55,
56,
74,
91,
114,
182,
183,
477,
478,
480,
481,
811,
812,
814,
815,
817,
818,
838,
839,
841,
842,
1052,
1053,
1055,
1056,
1243,
1244,
1370,
1371,
1561,
1562,
1564,
1565,
1585,
1586,
1588,
1589,
1946,
1947,
1949,
1950,
2003,
2004,
2024,
2025,
2027,
2028,
2124,
2125,
2133,
2134,
2485,
2486,
2488,
2489,
2499,
2500,
2502,
2503,
2833,
2834,
2836,
2837,
3313,
3314,
3316,
3317,
3325,
3326,
3384,
3385,
3387,
3388,
3766,
3767,
3769,
3770,
3778,
3779,
3781,
3782,
3827,
3828,
3830,
3831,
3839,
3840,
3842,
3843,
4108,
4109,
4111,
4112,
4120,
4121,
4123,
4124,
4423,
4424,
4426,
4427,
4464,
4465,
4548,
4549,
4640,
4641,
4716,
4717,
4765,
4766,
4768,
4769,
4771,
4772,
4805,
4806,
4808,
4809,
4924,
4925,
4927,
4928,
4950,
4951,
4968,
4969,
4977,
4978,
4988,
4989,
4994,
4995,
5010,
5011,
5037,
5038,
5055,
5056,
5082,
5083,
5100,
5101,
5139,
5140,
5172,
5173,
5186,
5187,
5211,
5212,
5217,
5218,
5231,
5232,
5234,
5235,
5466,
5467,
5469,
5470,
5506,
5507,
5509,
5510,
5778,
5779,
5781,
5782,
5804,
5805,
5807,
5808,
6185,
6186,
6188,
6189,
6197,
6198,
6200,
6201,
6219,
6220,
6225,
6226,
6238,
6239,
6268,
6269,
6290,
6291,
6314,
6315,
6317,
6318,
6766,
6767,
6769,
6770,
6809,
6810,
6812,
6813,
6930,
6931,
6933,
6934,
7116,
7117,
7119,
7120,
7122,
7123,
7134,
7135,
7137,
7138,
7381,
7382,
7384,
7385,
7450,
7451,
7453,
7454,
7548,
7549,
7552,
7553,
7561
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 7561,
"ccnet_original_nlines": 229,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4585908353328705,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013597030192613602,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.20148330926895142,
"rps_doc_frac_unique_words": 0.2739616632461548,
"rps_doc_mean_word_length": 4.527955055236816,
"rps_doc_num_sentences": 53,
"rps_doc_symbol_to_word_ratio": 0.0012360899709165096,
"rps_doc_unigram_entropy": 5.046457290649414,
"rps_doc_word_count": 1252,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.10160522162914276,
"rps_doc_frac_chars_dupe_6grams": 0.055741749703884125,
"rps_doc_frac_chars_dupe_7grams": 0.04515787959098816,
"rps_doc_frac_chars_dupe_8grams": 0.01658141054213047,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.021167749539017677,
"rps_doc_frac_chars_top_3gram": 0.016934199258685112,
"rps_doc_frac_chars_top_4gram": 0.01675781048834324,
"rps_doc_books_importance": -655.3392333984375,
"rps_doc_books_importance_length_correction": -655.3392333984375,
"rps_doc_openwebtext_importance": -498.55474853515625,
"rps_doc_openwebtext_importance_length_correction": -498.55474853515625,
"rps_doc_wikipedia_importance": -326.5680236816406,
"rps_doc_wikipedia_importance_length_correction": -326.5680236816406
},
"fasttext": {
"dclm": 0.16357946395874023,
"english": 0.8747394680976868,
"fineweb_edu_approx": 2.509901523590088,
"eai_general_math": 0.7773913145065308,
"eai_open_web_math": 0.4678916931152344,
"eai_web_code": 0.07639914751052856
}
}
|
{
"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.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": "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": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,453,187,699,397,404,000 |
Pull to refresh
Все о неймспейсах в yii1
Reading time 7 min
Views 14K
Введение
Всем привет, эта статья лежит у меня в черновиках уже год. Я все откладывал её на потом, когда будет побольше времени, но, в связи с скорым выходом yii2, я решил доработать её и выложить на обозрение читателя.
Вот уже как 3 года я работаю над одним очень крупным проектом в megaflowers. И, в какой-то момент разработки, когда классов стало слишком много, а их названия стали вида ContentDiscount, ItemDiscount, я понял, что надо с этим что-то делать, и решил ввести неймспейсы в наш проект. Ну, как говорится, гулять так гулять если вводить, то везде сразу, а не там чуть-чуть и там, а в остальных местах нет.
Итак, давайте рассмотрим как «готовить» основные типы классов в приложении.
Основы
Так как я решил использовать везде неймспейсы, то я выбрал корневым неймспейсом app (ну уж слишком длинный application). Однако yii его не понимает, поэтому пришлось определить его в конфиге(можно и в index.php), но, так как конфиг подключался по пути к нему, и, в момент инициализации не смог использовать Yii::setPathOfAlias (может сейчас ситуация изменилась?), то пришлось видоизменить index.php.
Вот так стал выглядеть мой index.php
$yii=dirname(__FILE__).'/yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
// Вначале подключаем Yii, чтоб можно было воспользоваться автолоадером
require_once($yii);
// Затем, подключаем конфиг, иначе мы не сможем установить альяс
$config=require($config);
Yii::createWebApplication($config)->run();
И соответственно конфиг
// Из-за глюка в yii, мы не можем использовать Yii::getPathOfAlias
Yii::setPathOfAlias('app', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
// а так же констануту для удобства
define(NS_SEPARATOR,NAMESPACE_SEPARATOR);
// сам конфиг
return array(
// ....
);
Контроллеры
Казалось бы тут все должно быть просто — указал controllerNamespace в конфиге, например наш альяс app, и все работает хорошо. А вот и нет! До поры, до времени и валится все это в случае когда контроллер лежит в какой-то папке, например, test и в неймспейсе app\test. Yii ищет его в папке test, но в неймспейсе app. Так как работать надо, а времени писать баг-репорт и делать пул-реквест не было (но вы можете это сделать), то я решил написать своё решение. Для этого я унаследовался от CWepApplication и переопределил метод createController. Вышло не совсем красиво, так как пришлось дублировать уйму кода, но, мне все равно надо было этот метод перекрыть для решения внутренних задач проекта.
WepApplication
class WebApplication extends CWebApplication {
// неймспейс для контроллеров чтоб не писать в конфиге
public $controllerNamespace='app';
public function createController($route,$owner=null)
{
if($owner===null)
$owner=$this;
if(($route=trim($route,'/'))==='')
$route=$owner->defaultController;
$caseSensitive=$this->getUrlManager()->caseSensitive;
$route.='/';
while(($pos=strpos($route,'/'))!==false)
{
$id=substr($route,0,$pos);
if(!preg_match('/^\w+$/',$id))
return null;
if(!$caseSensitive)
$id=strtolower($id);
$route=(string)substr($route,$pos+1);
if(!isset($basePath)) // first segment
{
if(isset($owner->controllerMap[$id]))
{
return array(
\Yii::createComponent($owner->controllerMap[$id],$id,$owner===$this?null:$owner),
$this->parseActionParams($route),
);
}
/** @var $module \base\BaseModule */
if(($module=$owner->getModule($id))!==null){
return $this->createController($route,$module);
}
$basePath=$owner->getControllerPath();
$controllerID='';
}
else
$controllerID.='/';
$className=ucfirst($id).'Controller';
$classFile=$basePath.DIRECTORY_SEPARATOR.$className.'.php';
// только здесь логика меняется
if($owner->controllerNamespace!==null)
$className=$owner->controllerNamespace.NS_SEPARATOR.str_replace('/',NS_SEPARATOR,$controllerID).$className;
if(is_file($classFile))
{
if(!class_exists($className,false))
require($classFile);
if(class_exists($className,false) && is_subclass_of($className,'CController'))
{
$id[0]=strtolower($id[0]);
return array(
new $className($controllerID.$id,$owner===$this?null:$owner),
$this->parseActionParams($route),
);
}
return null;
}
$controllerID.=$id;
$basePath.=DIRECTORY_SEPARATOR.$id;
}
}
}
А вот так стал выглядеть наш index.php:
// change the following paths if necessary
$yii=dirname(__FILE__).'/yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
// Вначале подключаем Yii, чтоб можно было воспользоваться автолоадером
require_once($yii);
// Затем, подключаем конфиг
$config=require($config);
// И, запускаем приложение
$app=new app\components\WebApplication($config);
$app->run();
Модули
Контролеры у нас уже есть, можно писать дальше, но что делать если мы хотим положить их в модули? Модуль определяется конфигом для Yii::createComponent, то есть его можно использовать, указав вручную имя класса.
конфиг
array(
'modules'=>array(
'front'=>array(
'class'=>'front\FrontModule'
)
)
)
Такой способ не сработает, так как yii ничего не знает про альяс front. Можно по тому же принципу, что и для альяса app, прописать его в конфиге, но мне такой способ не очень понравился в виду избыточности писанины кода (хотелось писать только имена модулей), поэтому я поступил проще и изменил своего потомка CWebApplication.
WebApplication
class WebApplication extends CWebApplication {
// ....
/**
* Принудительно ставит неймспейс для модулей с дефолтным описанием(кратким, без массива)
* @param array $modules
*/
public function setModules($modules)
{
$modulesConfig=array();
foreach($modules as $id=>$module){
if(is_int($id))
{
$id=$module;
$module=array();
}
if(!isset($module['class']))
{
// ставим альяс
\Yii::setPathOfAlias($id,$this->getModulePath().DIRECTORY_SEPARATOR.$id);
$module['class']=NS_SEPARATOR.$id.NS_SEPARATOR.ucfirst($id).'Module';
}
$modulesConfig[$id]=$module;
}
parent::setModules($modulesConfig);
}
}
Решение не идеально, да и баг-репорт бы составить (почему, указывая имя класса модуля, yii не может его найти? приходится писать его вида app.modules.ModuleClass). Сейчас же я думаю, все это делать поменять и поменьше трогать CWebApplication, например, вынести в конфиг в папке с модулем установку альяса и подключать его к основному конфигу.
С модулями мы разобрались, но, как только дело дойдет до подмодулей, то мы столкнемся с той же проблемой. Да и, для корректной работы контроллеров в модуле, нужно вручную для каждого модуля указать controllerNamespace. Исправим это, определив базовый класс для всех модулей.
BaseModule
class BaseModule extends \CWebModule
{
/**
* Фикс для неймспейсов + импорт
*/
protected function init()
{
parent::init();
// устанавливаем неймспейсы контроллерам, чтоб не прописывать в конфиге
$namespace=implode(NS_SEPARATOR, array_slice(explode(NS_SEPARATOR,get_class($this)),0,-1));
$this->controllerNamespace=$namespace.NS_SEPARATOR.'controllers';
}
/**
* Принудительно ставит неймспейс для модулей с дефолтным описанием(кратки, без массива)
* @param array $modules
*/
public function setModules($modules)
{
$modulesConfig=array();
foreach($modules as $id=>$module){
if(is_int($id))
{
$id=$module;
$module=array();
}
if(!isset($module['class']))
{
\Yii::setPathOfAlias($id,$this->getModulePath().DIRECTORY_SEPARATOR.$id);
$module['class']=NS_SEPARATOR.$id.NS_SEPARATOR.ucfirst($id).'Module';
}
$modulesConfig[$id]=$module;
}
parent::setModules($modulesConfig);
}
}
Часть кода можно вынести в трейты, но, я оставлю это вам.
Консольные команды
С первого раза у меня не вышло запустить «неймспейсную» команду, ничего похожего на commandNampespace я не обнаружил ни в `CConsoleApplication`, ни в `CConsoleCommandRunner` (может стоит запрос о фиче написать?). Стал копать в сторону commandMap, но и тут меня ждало разочарование.
конфиг console.php
// нужен абсолютный путь, иначе альяс будет ссылаться не туда
Yii::setPathOfAlias('app',dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);
//...
'commandMap'=>array(
'import'=>'\app\commands\ImportCommand',
),
Код валился ругаясь на на то что не может найти класс ImportCom.
Методом проб и ошибок все же было найдено рабочее решение.
console.php
:
// нужен абсолютный путь, иначе альяс будет ссылаться не туда
Yii::setPathOfAlias('app',dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);
//...
'commandMap'=>array(
// наша команда
'import'=>array(
'class'=>'\app\commands\ImportCommand',
)
),
Из минусов этого способа можно отметить необходимость указания в конфиге абсолютного имени для всех команд.
На сегодняшний день это единственное решение проблемы, других мне обнаружить не удалось.
Модели
Вот мы и добрались до моделей. Казалось бы тут все просто должно быть, ведь модели и так можно использовать в неймспейсах, но, когда я увидел как стал выглядеть метод relations, я решил это исправить. Сперва я определял в каждой модели константу с именем класса: const CLASS_NAME=__CLASS_NAME__;.
Потом решил поступить проще, определив базовую модель(решение подсмотрено в yii2).
Базовая модель NamespaceRecord
class NamespaceRecord extends CActiveRecord
{
public static function className()
{
return get_called_class();
}
}
После этих действиях наши модели стали проще и «красивее».
Было:
public function relations(){
return array(
'country'=>'app\location\Country',
)
}
Стало:
public function relations(){
return array(
'country'=>Country::className(),
)
}
Были еще проблемы с формами, но, в yii уже исправили это.
Виджеты
Долгое время я писал в своих вьюхах $this->widget('Мой длиный неймспейс виджета\имя класса'), однако, с выходом yii2, я сделал свои виджеты более похожими на yii2. Для этого я определил базовый класс для всех виджетов.
Базовый виджет NSWidget
class NSWidget extends \CWidget{
/**
* @param array $options
* @return \CWidget
*/
public static function begin($options=array())
{
return \Yii::app()->controller->beginWidget(get_called_class(),$options);
}
/**
* @return \CWidget
*/
public static function end()
{
return \Yii::app()->controller->endWidget();
}
/**
* @param array $options
* @return string widget content
*/
public static function runWidget($options=array())
{
return \Yii::app()->controller->widget(get_called_class(),$options,true);
}
}
Все, теперь мы можем писать во вьюхах
echo MyWidgetNS\MyWidget::begin($options);
echo MyWidgetNS\MyWidget::end();
//...
echo MyWidget2NS\MyWidget2::runWidget($options);
На этом все, если у вас будут какие-то замечания иди предложения по статье — пишите, поправлю.
UPD. Сегодня пофиксили баг с контроллерами в подпапке. Больше не надо переопределять CWebApplication. Для альясов так же можно (уже нужно, так как с приложением пофиксили) использовать опцию в конфиге:
конфиг
'aliases'=>array(
'app'=>'application'
),
Через эту же опцию можно выкинуть «костыли» для модулей
Tags:
Hubs:
+14
Comments 17
Comments Comments 17
Articles
|
{
"url": "https://habr.com/en/articles/209526/",
"source_domain": "habr.com",
"snapshot_id": "CC-MAIN-2024-10",
"warc_metadata": {
"Content-Length": "129797",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:FBBKAS6E2FC3VCFW7LU2QWD4L3TW2OQX",
"WARC-Concurrent-To": "<urn:uuid:c90a431d-9c6d-4927-a8eb-a66d23bbeed3>",
"WARC-Date": "2024-02-27T07:18:56Z",
"WARC-IP-Address": "178.248.237.68",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WB3H2ATYKQ5CWPOHQZ6VYTGWR5E2HCY5",
"WARC-Record-ID": "<urn:uuid:fbfd89e5-417d-45d0-8834-4f8a25a24c45>",
"WARC-Target-URI": "https://habr.com/en/articles/209526/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:4d0a7158-b1ef-456f-8ccb-9cf3159dc2e4>"
},
"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-79\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,
42,
43,
62,
72,
73,
82,
83,
84,
294,
295,
695,
696,
772,
773,
780,
781,
782,
1182,
1183,
1220,
1269,
1325,
1379,
1429,
1506,
1565,
1637,
1657,
1722,
1748,
1791,
1792,
1793,
1817,
1884,
1982,
2018,
2060,
2074,
2088,
2096,
2099,
2100,
2101,
2102,
2114,
2115,
2116,
2810,
2811,
2826,
2874,
2931,
2968,
3023,
3027,
3048,
3066,
3067,
3105,
3143,
3200,
3201,
3217,
3261,
3266,
3297,
3332,
3350,
3374,
3400,
3442,
3486,
3492,
3535,
3542,
3562,
3651,
3692,
3701,
3708,
3750,
3800,
3854,
3861,
3862,
3906,
3929,
3935,
3944,
3969,
3970,
4012,
4076,
4077,
4113,
4156,
4269,
4270,
4298,
4304,
4345,
4372,
4456,
4463,
4496,
4516,
4585,
4626,
4635,
4642,
4660,
4666,
4667,
4691,
4731,
4736,
4740,
4743,
4744,
4745,
4746,
4786,
4829,
4878,
4934,
4988,
5038,
5115,
5174,
5246,
5266,
5294,
5320,
5347,
5396,
5409,
5410,
5411,
5412,
5419,
5420,
5421,
5633,
5634,
5641,
5648,
5667,
5685,
5717,
5721,
5724,
5726,
5727,
5728,
5729,
6056,
6057,
6072,
6119,
6127,
6128,
6133,
6224,
6250,
6255,
6293,
6296,
6322,
6359,
6378,
6383,
6400,
6421,
6426,
6458,
6463,
6483,
6561,
6635,
6640,
6672,
6676,
6714,
6717,
6719,
6720,
6721,
6722,
7065,
7066,
7341,
7342,
7353,
7390,
7392,
7397,
7431,
7436,
7463,
7469,
7487,
7561,
7655,
7723,
7729,
7731,
7736,
7826,
7852,
7857,
7895,
7898,
7924,
7961,
7980,
7985,
8002,
8023,
8028,
8060,
8065,
8143,
8217,
8222,
8254,
8258,
8296,
8299,
8301,
8302,
8303,
8304,
8362,
8363,
8382,
8383,
8384,
8666,
8667,
8686,
8748,
8839,
8845,
8867,
8910,
8914,
8915,
8916,
8917,
8982,
8983,
9042,
9043,
9055,
9057,
9119,
9210,
9216,
9238,
9256,
9275,
9318,
9322,
9326,
9327,
9328,
9329,
9437,
9438,
9527,
9528,
9535,
9536,
9537,
9834,
9835,
9918,
9919,
9950,
9994,
9996,
10032,
10035,
10064,
10067,
10069,
10070,
10071,
10072,
10131,
10132,
10138,
10168,
10184,
10222,
10226,
10229,
10230,
10231,
10232,
10239,
10269,
10285,
10321,
10325,
10328,
10329,
10330,
10331,
10389,
10390,
10398,
10399,
10400,
10619,
10620,
10644,
10677,
10682,
10708,
10729,
10734,
10782,
10785,
10861,
10864,
10865,
10870,
10891,
10896,
10926,
10929,
10976,
10979,
10980,
10985,
11011,
11045,
11050,
11102,
11105,
11181,
11184,
11186,
11187,
11188,
11189,
11190,
11228,
11271,
11304,
11310,
11359,
11360,
11361,
11362,
11457,
11659,
11666,
11684,
11705,
11708,
11709,
11710,
11766,
11772,
11778,
11782,
11794,
11815,
11816
],
"line_end_idx": [
16,
17,
42,
43,
62,
72,
73,
82,
83,
84,
294,
295,
695,
696,
772,
773,
780,
781,
782,
1182,
1183,
1220,
1269,
1325,
1379,
1429,
1506,
1565,
1637,
1657,
1722,
1748,
1791,
1792,
1793,
1817,
1884,
1982,
2018,
2060,
2074,
2088,
2096,
2099,
2100,
2101,
2102,
2114,
2115,
2116,
2810,
2811,
2826,
2874,
2931,
2968,
3023,
3027,
3048,
3066,
3067,
3105,
3143,
3200,
3201,
3217,
3261,
3266,
3297,
3332,
3350,
3374,
3400,
3442,
3486,
3492,
3535,
3542,
3562,
3651,
3692,
3701,
3708,
3750,
3800,
3854,
3861,
3862,
3906,
3929,
3935,
3944,
3969,
3970,
4012,
4076,
4077,
4113,
4156,
4269,
4270,
4298,
4304,
4345,
4372,
4456,
4463,
4496,
4516,
4585,
4626,
4635,
4642,
4660,
4666,
4667,
4691,
4731,
4736,
4740,
4743,
4744,
4745,
4746,
4786,
4829,
4878,
4934,
4988,
5038,
5115,
5174,
5246,
5266,
5294,
5320,
5347,
5396,
5409,
5410,
5411,
5412,
5419,
5420,
5421,
5633,
5634,
5641,
5648,
5667,
5685,
5717,
5721,
5724,
5726,
5727,
5728,
5729,
6056,
6057,
6072,
6119,
6127,
6128,
6133,
6224,
6250,
6255,
6293,
6296,
6322,
6359,
6378,
6383,
6400,
6421,
6426,
6458,
6463,
6483,
6561,
6635,
6640,
6672,
6676,
6714,
6717,
6719,
6720,
6721,
6722,
7065,
7066,
7341,
7342,
7353,
7390,
7392,
7397,
7431,
7436,
7463,
7469,
7487,
7561,
7655,
7723,
7729,
7731,
7736,
7826,
7852,
7857,
7895,
7898,
7924,
7961,
7980,
7985,
8002,
8023,
8028,
8060,
8065,
8143,
8217,
8222,
8254,
8258,
8296,
8299,
8301,
8302,
8303,
8304,
8362,
8363,
8382,
8383,
8384,
8666,
8667,
8686,
8748,
8839,
8845,
8867,
8910,
8914,
8915,
8916,
8917,
8982,
8983,
9042,
9043,
9055,
9057,
9119,
9210,
9216,
9238,
9256,
9275,
9318,
9322,
9326,
9327,
9328,
9329,
9437,
9438,
9527,
9528,
9535,
9536,
9537,
9834,
9835,
9918,
9919,
9950,
9994,
9996,
10032,
10035,
10064,
10067,
10069,
10070,
10071,
10072,
10131,
10132,
10138,
10168,
10184,
10222,
10226,
10229,
10230,
10231,
10232,
10239,
10269,
10285,
10321,
10325,
10328,
10329,
10330,
10331,
10389,
10390,
10398,
10399,
10400,
10619,
10620,
10644,
10677,
10682,
10708,
10729,
10734,
10782,
10785,
10861,
10864,
10865,
10870,
10891,
10896,
10926,
10929,
10976,
10979,
10980,
10985,
11011,
11045,
11050,
11102,
11105,
11181,
11184,
11186,
11187,
11188,
11189,
11190,
11228,
11271,
11304,
11310,
11359,
11360,
11361,
11362,
11457,
11659,
11666,
11684,
11705,
11708,
11709,
11710,
11766,
11772,
11778,
11782,
11794,
11815,
11816,
11824
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11824,
"ccnet_original_nlines": 374,
"rps_doc_curly_bracket": 0.004566980060189962,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.02964255027472973,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.020924149081110954,
"rps_doc_frac_lines_end_with_ellipsis": 0.013333329930901527,
"rps_doc_frac_no_alph_words": 0.7240627408027649,
"rps_doc_frac_unique_words": 0.5080576539039612,
"rps_doc_mean_word_length": 7.311280727386475,
"rps_doc_num_sentences": 111,
"rps_doc_symbol_to_word_ratio": 0.00217960006557405,
"rps_doc_unigram_entropy": 5.965660095214844,
"rps_doc_word_count": 1179,
"rps_doc_frac_chars_dupe_10grams": 0.14709976315498352,
"rps_doc_frac_chars_dupe_5grams": 0.1744779646396637,
"rps_doc_frac_chars_dupe_6grams": 0.15893271565437317,
"rps_doc_frac_chars_dupe_7grams": 0.15893271565437317,
"rps_doc_frac_chars_dupe_8grams": 0.14709976315498352,
"rps_doc_frac_chars_dupe_9grams": 0.14709976315498352,
"rps_doc_frac_chars_top_2gram": 0.00417632982134819,
"rps_doc_frac_chars_top_3gram": 0.009280740283429623,
"rps_doc_frac_chars_top_4gram": 0.0044083502143621445,
"rps_doc_books_importance": -1033.0966796875,
"rps_doc_books_importance_length_correction": -1033.0966796875,
"rps_doc_openwebtext_importance": -572.9520874023438,
"rps_doc_openwebtext_importance_length_correction": -572.9520874023438,
"rps_doc_wikipedia_importance": -384.4425964355469,
"rps_doc_wikipedia_importance_length_correction": -384.4425964355469
},
"fasttext": {
"dclm": 0.9082054495811462,
"english": 0.0008577000116929412,
"fineweb_edu_approx": 2.4720866680145264,
"eai_general_math": 0.00003170999843860045,
"eai_open_web_math": 0.3319985866546631,
"eai_web_code": 0.6588322520256042
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.452",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.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": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,243,657,333,721,696,000 |
------------------------------------------------------------------------
-- IO
------------------------------------------------------------------------
{-# OPTIONS --no-termination-check #-}
module IO where
open import Coinduction
open import Data.Unit
open import Data.String
open import Data.Colist
import Foreign.Haskell as Haskell
import IO.Primitive as Prim
------------------------------------------------------------------------
-- The IO monad
-- One cannot write "infinitely large" computations with the
-- postulated IO monad in IO.Primitive without turning off the
-- termination checker (or going via the FFI, or perhaps abusing
-- something else). The following coinductive deep embedding is
-- introduced to avoid this problem. Possible non-termination is
-- isolated to the run function below.
infixl 1 _>>=_ _>>_
data IO : Set Set1 where
lift : {A} (m : Prim.IO A) IO A
return : {A} (x : A) IO A
_>>=_ : {A B} (m : ∞₁ (IO A)) (f : (x : A) ∞₁ (IO B)) IO B
_>>_ : {A B} (m₁ : ∞₁ (IO A)) (m₂ : ∞₁ (IO B)) IO B
-- The use of abstract ensures that the run function will not be
-- unfolded infinitely by the type checker.
abstract
run : {A} IO A Prim.IO A
run (lift m) = m
run (return x) = Prim.return x
run (m >>= f) = Prim._>>=_ (run (♭₁ m )) λ x run (♭₁ (f x))
run (m₁ >> m₂) = Prim._>>=_ (run (♭₁ m₁)) λ _ run (♭₁ m₂)
------------------------------------------------------------------------
-- Utilities
-- Because IO A lives in Set1 I hesitate to define sequence, which
-- would require defining a Set1 variant of Colist.
mapM : {A B} (A IO B) Colist A IO (Colist B)
mapM f [] = return []
mapM f (x xs) = ♯₁ f x >>= λ y
♯₁ (♯₁ mapM f ( xs) >>= λ ys
♯₁ return (y ys))
-- The reason for not defining mapM′ in terms of mapM is efficiency
-- (the unused results could cause unnecessary memory use).
mapM′ : {A B} (A IO B) Colist A IO
mapM′ f [] = return _
mapM′ f (x xs) = ♯₁ f x >> ♯₁ mapM′ f ( xs)
------------------------------------------------------------------------
-- Simple lazy IO (UTF8-based)
getContents : IO Costring
getContents =
♯₁ lift Prim.getContents >>= λ s
♯₁ return (Haskell.toColist s)
readFile : String IO Costring
readFile f =
♯₁ lift (Prim.readFile f) >>= λ s
♯₁ return (Haskell.toColist s)
writeFile∞ : String Costring IO
writeFile∞ f s =
♯₁ lift (Prim.writeFile f (Haskell.fromColist s)) >>
♯₁ return _
writeFile : String String IO
writeFile f s = writeFile∞ f (toCostring s)
putStr∞ : Costring IO
putStr∞ s =
♯₁ lift (Prim.putStr (Haskell.fromColist s)) >>
♯₁ return _
putStr : String IO
putStr s = putStr∞ (toCostring s)
putStrLn∞ : Costring IO
putStrLn∞ s =
♯₁ lift (Prim.putStrLn (Haskell.fromColist s)) >>
♯₁ return _
putStrLn : String IO
putStrLn s = putStrLn∞ (toCostring s)
|
{
"url": "http://www.cse.chalmers.se/~nad/listings/lib-0.1/IO.html",
"source_domain": "www.cse.chalmers.se",
"snapshot_id": "crawl=CC-MAIN-2017-43",
"warc_metadata": {
"Content-Length": "49579",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZXYL54JMTYDOL6O6GHOSWVVINMK3SQUK",
"WARC-Concurrent-To": "<urn:uuid:ad57462b-2486-4361-bc74-9b29c3783c95>",
"WARC-Date": "2017-10-22T04:40:45Z",
"WARC-IP-Address": "129.16.221.33",
"WARC-Identified-Payload-Type": "application/xhtml+xml",
"WARC-Payload-Digest": "sha1:NQF7PD52X6DSALSXJQZNEHBZEOUZQ2J2",
"WARC-Record-ID": "<urn:uuid:402cf3f7-9f12-4985-817f-0be7ff19969c>",
"WARC-Target-URI": "http://www.cse.chalmers.se/~nad/listings/lib-0.1/IO.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b08ba7ce-8d99-4770-a2e1-7c1eb315e109>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-218-138-106.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-43\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for October 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
73,
79,
152,
153,
192,
193,
209,
210,
234,
256,
280,
304,
338,
366,
367,
440,
456,
457,
518,
581,
646,
710,
775,
814,
815,
835,
836,
862,
900,
930,
995,
1053,
1054,
1119,
1163,
1164,
1173,
1174,
1204,
1225,
1258,
1322,
1383,
1384,
1457,
1470,
1471,
1538,
1590,
1591,
1641,
1669,
1717,
1765,
1803,
1804,
1872,
1932,
1933,
1974,
2002,
2047,
2048,
2121,
2152,
2153,
2179,
2193,
2229,
2262,
2263,
2294,
2307,
2344,
2377,
2378,
2413,
2430,
2485,
2499,
2500,
2532,
2576,
2577,
2601,
2613,
2663,
2677,
2678,
2699,
2733,
2734,
2760,
2774,
2826,
2840,
2841,
2864
],
"line_end_idx": [
73,
79,
152,
153,
192,
193,
209,
210,
234,
256,
280,
304,
338,
366,
367,
440,
456,
457,
518,
581,
646,
710,
775,
814,
815,
835,
836,
862,
900,
930,
995,
1053,
1054,
1119,
1163,
1164,
1173,
1174,
1204,
1225,
1258,
1322,
1383,
1384,
1457,
1470,
1471,
1538,
1590,
1591,
1641,
1669,
1717,
1765,
1803,
1804,
1872,
1932,
1933,
1974,
2002,
2047,
2048,
2121,
2152,
2153,
2179,
2193,
2229,
2262,
2263,
2294,
2307,
2344,
2377,
2378,
2413,
2430,
2485,
2499,
2500,
2532,
2576,
2577,
2601,
2613,
2663,
2677,
2678,
2699,
2733,
2734,
2760,
2774,
2826,
2840,
2841,
2864,
2901
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2901,
"ccnet_original_nlines": 98,
"rps_doc_curly_bracket": 0.005515339784324169,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.15709969401359558,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.1027190312743187,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.43957704305648804,
"rps_doc_frac_unique_words": 0.3614775836467743,
"rps_doc_mean_word_length": 4.248021125793457,
"rps_doc_num_sentences": 28,
"rps_doc_symbol_to_word_ratio": 0.0030211498960852623,
"rps_doc_unigram_entropy": 4.344334602355957,
"rps_doc_word_count": 379,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.07080744951963425,
"rps_doc_frac_chars_dupe_6grams": 0.060869570821523666,
"rps_doc_frac_chars_dupe_7grams": 0.018633540719747543,
"rps_doc_frac_chars_dupe_8grams": 0.018633540719747543,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01490683015435934,
"rps_doc_frac_chars_top_3gram": 0.027950309216976166,
"rps_doc_frac_chars_top_4gram": 0.048447199165821075,
"rps_doc_books_importance": -256.8274841308594,
"rps_doc_books_importance_length_correction": -256.8274841308594,
"rps_doc_openwebtext_importance": -117.70433044433594,
"rps_doc_openwebtext_importance_length_correction": -117.70433044433594,
"rps_doc_wikipedia_importance": -94.62960052490234,
"rps_doc_wikipedia_importance_length_correction": -94.62960052490234
},
"fasttext": {
"dclm": 0.04411280155181885,
"english": 0.4828423261642456,
"fineweb_edu_approx": 1.9163928031921387,
"eai_general_math": 0.9887761473655701,
"eai_open_web_math": 0.40784531831741333,
"eai_web_code": 0.6810249090194702
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-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": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,913,463,525,733,287,000 |
Sign up ×
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. It's 100% free, no registration required.
I'm confusing myself a lot here. I did this before however have never got the hang of it. So I really need help, main issue is 2nf I just get the dependencies completely wrong. So I am practising ready for next year really. So yes this would be classed as homework.
Here is the original document I have to preform normalization on.
enter image description here
The form is link no1
My attempts are no2 and no3
So, basically. Where am I going wrong? Why am I going wrong? Can you explain how to get back on track without doing it obviously. I know it's shocking, but I never understood all this :/ fine with sql but this side of things, not a chance.
enter image description here
Here is another attempt, what one is close and why?
enter image description here
share|improve this question
1
You should consider the relationships between individual columns. For example, what is the relationship between film titles and film references? Similarly, what is the relationship between a category and a category type? Also, think about what would happen to these various fields if a film appeared on two separate orders. – Joel Brown Aug 9 '12 at 16:11
@JoelBrown thats one of the things I'm unsure on. Am I doing this in the consideration of many order forms or just this one? So would I have to consider the scenario of the same films on other orders? So for tiles and references would it be the film cant exist without the reference? – Kyle93 Aug 9 '12 at 16:21
1
Kyle, you should always think in terms of your tables having many records. When you model data you often think about single instances of things, but if you only had one of something in real life, you probably wouldn't need a database table to keep track of it. One good "trick" to use is to start by assuming that every tangible thing you are keeping data on will need its own table. If you presume a table and then find it doesn't have any/many attributes then you can scrap the idea or think about rolling the attribute or two into another table. – Joel Brown Aug 9 '12 at 20:57
Your second model is much better. Supplier, Film and Category belong as full fledged entities because they are real things with their own attributes and they will be referenced by many orders. Your diagram has the crow's feet backwards on Item/Film and Item/Category. Your FK columns are in the Item table, which is right. The side with the FK column is the side that gets the crow's foot. – Joel Brown Aug 9 '12 at 21:01
@JoelBrown Yeah that makes sense. Also, thanks thats a really nice idea, should really help a lot! As for 2nd comment. Thats good news. I will sort them out in the morning and update this and I was not sure what way they went so thanks for clarifying. Lastly, how far is my 2nd attempt from being correct? What part of it is wrong and any handy hints? :) Thanks a lot tho! Really helpful – Kyle93 Aug 9 '12 at 21:06
Your Answer
discard
By posting your answer, you agree to the privacy policy and terms of service.
Browse other questions tagged or ask your own question.
|
{
"url": "http://dba.stackexchange.com/questions/22232/help-with-normalization-homework?answertab=votes",
"source_domain": "dba.stackexchange.com",
"snapshot_id": "crawl=CC-MAIN-2015-40",
"warc_metadata": {
"Content-Length": "70329",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Y6TV2EMDYMZ3C7DUCBTVP2RFVA6SLYIG",
"WARC-Concurrent-To": "<urn:uuid:c8fa9ad4-b5ba-4c00-bc01-7c7b45c09c06>",
"WARC-Date": "2015-10-05T04:14:19Z",
"WARC-IP-Address": "104.16.16.128",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:7NEDVZ6N3VSMLXJFQOSB3P7ECISF7UTH",
"WARC-Record-ID": "<urn:uuid:3413f382-4a70-481e-9a7f-8191a55027ae>",
"WARC-Target-URI": "http://dba.stackexchange.com/questions/22232/help-with-normalization-homework?answertab=votes",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:233ce22d-bcb3-4a79-a423-7da164add4da>"
},
"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,
10,
230,
231,
497,
498,
564,
565,
594,
595,
616,
617,
645,
646,
886,
887,
916,
917,
969,
970,
999,
1000,
1028,
1032,
1389,
1394,
1707,
1711,
2293,
2298,
2721,
2726,
3143,
3144,
3156,
3157,
3159,
3167,
3168,
3246,
3247
],
"line_end_idx": [
10,
230,
231,
497,
498,
564,
565,
594,
595,
616,
617,
645,
646,
886,
887,
916,
917,
969,
970,
999,
1000,
1028,
1032,
1389,
1394,
1707,
1711,
2293,
2298,
2721,
2726,
3143,
3144,
3156,
3157,
3159,
3167,
3168,
3246,
3247,
3302
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3302,
"ccnet_original_nlines": 40,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.45064377784729004,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024320460855960846,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.16738197207450867,
"rps_doc_frac_unique_words": 0.4781144857406616,
"rps_doc_mean_word_length": 4.338383674621582,
"rps_doc_num_sentences": 41,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.260079383850098,
"rps_doc_word_count": 594,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05432673916220665,
"rps_doc_frac_chars_dupe_6grams": 0.03259604051709175,
"rps_doc_frac_chars_dupe_7grams": 0.020954599604010582,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.007760960143059492,
"rps_doc_frac_chars_top_3gram": 0.011641439981758595,
"rps_doc_frac_chars_top_4gram": 0.015521920286118984,
"rps_doc_books_importance": -311.7691650390625,
"rps_doc_books_importance_length_correction": -311.7691650390625,
"rps_doc_openwebtext_importance": -181.94033813476562,
"rps_doc_openwebtext_importance_length_correction": -181.94033813476562,
"rps_doc_wikipedia_importance": -110.27208709716797,
"rps_doc_wikipedia_importance_length_correction": -110.27208709716797
},
"fasttext": {
"dclm": 0.21590518951416016,
"english": 0.9666719436645508,
"fineweb_edu_approx": 1.4157196283340454,
"eai_general_math": 0.019097860902547836,
"eai_open_web_math": 0.22811740636825562,
"eai_web_code": 0.0011401199735701084
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.74",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "4",
"label": "Indeterminate"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "6",
"label": "Indeterminate"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,772,904,621,300,614,000 |
This website uses cookies to ensure you have the best experience. Learn more
Communicating Through Your Computer Essay
2633 words - 11 pages
Communicating Through Your Computer
I have heard the dangers of meeting people through the new technology of cyberspace. Through the media I have heard events in which females are missing, stalked, or raped for giving away their personal information to strangers through computers. I can recall a situation when I heard about a young teen girl agreeing to meet a male whom she thought was about her age. She agreed to meet him secretly, thinking that she was going to meet her love of her life. She took the bus and headed out east to meet this "prince". To the girl her life did not end like most fairy tales. The "prince" turned out to be the "big bad wolf"- a 42-year old just released from ...view middle of the document...
Communicating in chat rooms can lead into friendships or romance, helpful for the individuals who are shy, troubled or disabled.
I was lonely and did not have any friends when I moved from home to attend the university. I would go to the library and see students communicate with other individuals through the computer. I was curious to see how one could interact a conversation with others through the chat rooms. I entered through one of the popular web providers- www.aol@com. and opened an account. I browsed through the chat room channels. To my amazement there were different chat rooms for everybody. There were rooms that fitted with each individual's concerns or topics and a way to discuss with others who were concerned in the same subject. The rooms went from places to ethnicity to ages and sports and leisure's. I entered a room called Los Angeles.
I began to converse with a young fellow from San Francisco, we will call him Ronny. We were able to talk or better yet exchange our thoughts through our keyboards and screen. Ronny told me his goals and problems and I in exchange did as well. We began a friendship and began to e-mail each other as well. Ronny encouraged me and made me feel comfortable in my new environment (away from home). Slowly we began to converse less with each other. I was busy with school and he as well and we lost touch. Although I had never met him or alone spoke to him on the phone I was able to express myself without feeling embarrassed or shy. I felt his friendliness helped me out in tough situations and even though we lost communication he had helped me get back on my feet.
Having a friendship or just a conversation with un-known individuals is a fun way to express your-self. There are people, like myself who are shy and have difficulty in interacting with people. Although, the communication with Ronny did not last long I was able to feel comfortable in my new environment.
I again began to participate in a chat room. I opened an account at www.yahoo.com and participated in their chat rooms in my interest of the Spanish language. I wanted to go to a place where I could relate with other individuals. The language, culture, and people fitted in this chat room where I again met several friends. One of these friends stood out the most. His name was Jorge, a twenty-five year old who lived close by where I lived. We began to exchange information about ourselves. We realized we had many interests and dislikes in common. We chatted privately and emailed each other for a while. After three months he asked for my phone number. I was hesitant for a moment thinking about what if this guy turned out to be a criminal, stalker or a feeling that would make me regret in giving my phone number. I realized that I wanted to hear what his voice was like and gave him my number. We spoke on the phone for about two months. Our conversations dealt with us telling each other experiences in our lives (funny, sad, relationships, etc.)...
Other Essays Like Communicating Through Your Computer
Using Social Networking Sites - Twitter
652 words - 3 pages straightforward and simple to setup. Typically, if you create a strong password, use extreme prejudice on who you follow and who you allow to follow you, watch out for suspicious links, and ensure that you’re using the most up-to-date operating system patches and anti-virus definitions you will minimize the threats that could be introduced to your computer or Smartphone through Twitter. Like Facebook, I have found the site to be a great way to
Computer Network Essay
642 words - 3 pages instructions for a problem set from his Model at Dartmouth College to his Complex Number Calculator in New York and received results back by the same means. Early networks of communicating computers included the military radar system Semi-Automatic Ground Environment (SAGE), started in the late 1950s. In 1964, researchers at Dartmouth developed the Dartmouth Time Sharing System for distributed users of large computer systems. The same year, at
Computer Programmers
1687 words - 7 pages through telecommuting with the customers from which a programmer can display his or skills to create a rapport with each problem fixed, at home or away from the place of business. Also, there are times the job may require long hours to meet deadlines or find solutions to fix the critical problems. Computer programmers are able to correct these problems through modems, email, and the Internet by connecting to the customer’s computer. This is a great
Essential Introduction Computer
2877 words - 12 pages used to organize the order effectively in which slides are presented. 7. Computer Communications Channels and Equipment and the Internet and World Wide Web Communicating with a computer is becoming the standard today for both business and personal use. The communications channels are constantly being upgraded in order to send information faster. Communications technologies have changed the way people interact through the use of e-mail
Business Management Application
2380 words - 10 pages automatic save every minute or two, because of the fact that you can type a lot of information in a short period of time (Fleming, 2013). 2. Next, define a communication plan to advise Walden University if such a scenario occurs including a plan to contact the instructor and academic advising. The meaning of communication is to reach out or act upon communicating with someone. In the event that you have an issue with your computer due
Are We Too Dependent on Computers?
647 words - 3 pages said computer. First of all, the computers are used in businesses, hospitals, crime detection and even to fly planes. This is perfectly work done through computer so computer is essential for everybody. I can say a businessman is able to make profit through his computer by generating a business chart showing how their production either made a profit or a loss. Schools also use the computer for keeping records of each student. Doctor makes reports
The History of the Internet
1409 words - 6 pages wires, cable lines, or satellite signals. These wires, lines, or signals are then pipelined from server computer to server computer until your host server transmits the electronic information into your computer. The governing body of the internet is the Internet Society (ISOC).[4 Krol] The Internet Society purpose, according to Ed Krol, is to “promote global information exchange through Internet technology”. Another
Laptop vs Ipad
526 words - 3 pages system resources, and can be somewhat of a pain to install. The app store has allowed for the development of affordable micro-programs to do everything from managing your finances to communicating with your social network. The consolidated app store makes it convenient to find new apps without having to browse through the websites of multiple software providers. In my experience, this can be a huge time saver and a great way to discover new and
Achieving Academic Excellence
2356 words - 10 pages is impossible. It is that basic. Your computer can either be a desktop or laptop. Having both is ideal, so if something happens to one, you have backup. Make sure you have plenty of memory and hard drive. Always back up your files. Microphones and speakers – In order to hear audio and video clips and lectures and to participate in live chats, you will need microphones and speakers. You may also need headsets to listen to these materials
Computer Virus
1196 words - 5 pages “Computer Virus” What is a Computer Virus ? “A Software program able of reproducing itself and usually capable of causing great harm to files or other programs on the same .” OR “A virus is a program that may disturb the normal working of a computer virus .” How is a Computer Virus created? The following are the points through which the computer virus is created: History * Computer viruses are created by programmers who
Viruses, Worms and Trojans, Oh My!
1320 words - 6 pages Viruses, Worms and Trojans, Oh my! Abstract Viruses, Worms or Trojans ever wonder what the differences between these are, or how they invade your computer. What they actually do to your system? I will start this research paper with a brief history on these villains from one of the first viruses created, through the year 2000 when a vicious virus sprang into action and spread worldwide. In the following pages I will give you just what you are
Related Papers
The Importance Of Communication In The Mechanical Engineering Community
2293 words - 10 pages people can mass email. Typing with no grammatical errors is always a must. Co-workers might not take the message seriously if there are many typos. Another plus of emailing is the computer stores the information so the employee will always have it there. Oral Being able to talk face-to-face or on the phone is a skill that is extensively used in communicating with others. According to both Raj and Balaji, an employee’s voice can help them move
Computer Security Essay
1158 words - 5 pages investing to shopping and communicating with others through email or chat programs.Although we may not consider our communiction a 'top secret' ,but you dont want others to eavesdrop on you conversations, read your mails, use your computer to attack others system , send forged mails from your computer to others or check the stuff from your computer hard drive. There are many people who whould want to break into you computer system they are
Computer Network & Information Security Essay
1478 words - 6 pages of your computer or PC. As the old saying goes “prevention is better than cure”, according to this we realize that if we learn about the possible loopholes in the security, then we can prevent it from occurring in the first place. But the big question is 'why should I care about my computer security?’. We use computers for everything from banking and investing to shopping and communicating with others through email or chat programs. Although we
Computer Innovation Essay
2567 words - 11 pages a communications and software cure for troubleshooting in the major problem people have in the computer system. In the communications they have a Chat line/E-mail to send about anything between you and your friend through a network computer. This is something people enjoy doing to communicate with anybody they know. It’s a lifesaver now to send anything across a computer network in the world. The next thing is that software that can destroy
|
{
"url": "https://www.avsabonline.org/papers/communicating-through-your-computer",
"source_domain": "www.avsabonline.org",
"snapshot_id": "crawl=CC-MAIN-2019-26",
"warc_metadata": {
"Content-Length": "54997",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KYQPE7IFEWYIXFJGE6JVPWEVTAESKPXL",
"WARC-Concurrent-To": "<urn:uuid:37826ae9-466a-426f-bc7a-6254434529e7>",
"WARC-Date": "2019-06-19T12:07:52Z",
"WARC-IP-Address": "52.34.104.73",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WBNR3JY3UNVWL5Y3KTL5XLMHTHRFASYY",
"WARC-Record-ID": "<urn:uuid:16a93a91-632b-4091-9fa6-a215491642f5>",
"WARC-Target-URI": "https://www.avsabonline.org/papers/communicating-through-your-computer",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:9bcab50e-3ef2-43ad-98c2-c60ac9fa24a3>"
},
"warc_info": "isPartOf: CC-MAIN-2019-26\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-113-175-32.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,
77,
78,
120,
121,
143,
144,
180,
181,
873,
874,
1003,
1004,
1738,
1739,
2503,
2504,
2809,
2810,
3867,
3868,
3922,
3923,
3963,
3964,
4432,
4433,
4456,
4457,
4925,
4926,
4947,
4948,
5422,
5423,
5455,
5456,
5917,
5918,
5950,
5951,
6412,
6413,
6448,
6449,
6920,
6921,
6949,
6950,
7391,
7392,
7407,
7408,
7877,
7878,
7908,
7909,
8372,
8373,
8388,
8389,
8834,
8835,
8870,
8871,
9338,
9339,
9354,
9355,
9427,
9428,
9899,
9900,
9924,
9925,
10390,
10391,
10437,
10438,
10908,
10909,
10935,
10936
],
"line_end_idx": [
77,
78,
120,
121,
143,
144,
180,
181,
873,
874,
1003,
1004,
1738,
1739,
2503,
2504,
2809,
2810,
3867,
3868,
3922,
3923,
3963,
3964,
4432,
4433,
4456,
4457,
4925,
4926,
4947,
4948,
5422,
5423,
5455,
5456,
5917,
5918,
5950,
5951,
6412,
6413,
6448,
6449,
6920,
6921,
6949,
6950,
7391,
7392,
7407,
7408,
7877,
7878,
7908,
7909,
8372,
8373,
8388,
8389,
8834,
8835,
8870,
8871,
9338,
9339,
9354,
9355,
9427,
9428,
9899,
9900,
9924,
9925,
10390,
10391,
10437,
10438,
10908,
10909,
10935,
10936,
11402
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 11402,
"ccnet_original_nlines": 82,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.43402299284935,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.017931029200553894,
"rps_doc_frac_lines_end_with_ellipsis": 0.02409639023244381,
"rps_doc_frac_no_alph_words": 0.1245976984500885,
"rps_doc_frac_unique_words": 0.376433789730072,
"rps_doc_mean_word_length": 4.789885520935059,
"rps_doc_num_sentences": 110,
"rps_doc_symbol_to_word_ratio": 0.001379310037009418,
"rps_doc_unigram_entropy": 5.742176055908203,
"rps_doc_word_count": 1918,
"rps_doc_frac_chars_dupe_10grams": 0.013715029694139957,
"rps_doc_frac_chars_dupe_5grams": 0.026559270918369293,
"rps_doc_frac_chars_dupe_6grams": 0.026559270918369293,
"rps_doc_frac_chars_dupe_7grams": 0.013715029694139957,
"rps_doc_frac_chars_dupe_8grams": 0.013715029694139957,
"rps_doc_frac_chars_dupe_9grams": 0.013715029694139957,
"rps_doc_frac_chars_top_2gram": 0.015674319118261337,
"rps_doc_frac_chars_top_3gram": 0.004789379891008139,
"rps_doc_frac_chars_top_4gram": 0.010449550114572048,
"rps_doc_books_importance": -887.4632568359375,
"rps_doc_books_importance_length_correction": -887.4632568359375,
"rps_doc_openwebtext_importance": -501.7375793457031,
"rps_doc_openwebtext_importance_length_correction": -501.7375793457031,
"rps_doc_wikipedia_importance": -279.2550964355469,
"rps_doc_wikipedia_importance_length_correction": -279.2550964355469
},
"fasttext": {
"dclm": 0.08277589082717896,
"english": 0.9600252509117126,
"fineweb_edu_approx": 2.22259521484375,
"eai_general_math": 0.034998420625925064,
"eai_open_web_math": 0.1010320782661438,
"eai_web_code": 0.01870613917708397
}
}
|
{
"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": "302.3",
"labels": {
"level_1": "Social sciences",
"level_2": "",
"level_3": "Social psychology"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "4",
"label": "Analyze"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "9",
"label": "Personal/Misc"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "1",
"label": "Truncated Snippets"
},
"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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,450,348,534,008,564,200 |
Properties
Label 42T34
Order \(168\)
n \(42\)
Cyclic No
Abelian No
Solvable Yes
Primitive No
$p$-group No
Group: $C_7\times S_4$
Learn more about
Group action invariants
Degree $n$ : $42$
Transitive number $t$ : $34$
Group : $C_7\times S_4$
Parity: $-1$
Primitive: No
Nilpotency class: $-1$ (not nilpotent)
Generators: (1,5,4)(2,6,3)(7,11,9)(8,12,10)(13,17,15)(14,18,16)(19,24,22)(20,23,21)(25,30,28)(26,29,27)(31,35,33)(32,36,34)(37,41,39)(38,42,40), (1,37,31,26,20,13,8,2,38,32,25,19,14,7)(3,41,34,29,22,17,9,6,39,36,27,24,15,11)(4,42,33,30,21,18,10,5,40,35,28,23,16,12)
$|\Aut(F/K)|$: $14$
Low degree resolvents
|G/N|Galois groups for stem field(s)
2: $C_2$
6: $S_3$
7: $C_7$
24: $S_4$
Resolvents shown for degrees $\leq 10$
Subfields
Degree 2: None
Degree 3: $S_3$
Degree 6: $S_4$
Degree 7: $C_7$
Degree 14: None
Degree 21: 21T6
Low degree siblings
There are no siblings with degree $\leq 10$
Data on whether or not a number field with this Galois group has arithmetically equivalent fields has not been computed.
Conjugacy classes
Cycle TypeSizeOrderRepresentative
$ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 $ $1$ $1$ $()$
$ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 $ $3$ $2$ $( 3, 4)( 5, 6)( 9,10)(11,12)(15,16)(17,18)(21,22)(23,24)(27,28)(29,30)(33,34) (35,36)(39,40)(41,42)$
$ 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 $ $6$ $4$ $( 3, 5, 4, 6)( 9,12,10,11)(15,18,16,17)(21,24,22,23)(27,30,28,29)(33,36,34,35) (39,42,40,41)$
$ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 $ $6$ $2$ $( 1, 2)( 3, 5)( 4, 6)( 7, 8)( 9,12)(10,11)(13,14)(15,18)(16,17)(19,20)(21,24) (22,23)(25,26)(27,30)(28,29)(31,32)(33,36)(34,35)(37,38)(39,42)(40,41)$
$ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 $ $8$ $3$ $( 1, 3, 5)( 2, 4, 6)( 7,10,11)( 8, 9,12)(13,16,17)(14,15,18)(19,21,24) (20,22,23)(25,27,30)(26,28,29)(31,34,35)(32,33,36)(37,40,41)(38,39,42)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1, 7,14,19,25,32,38, 2, 8,13,20,26,31,37)( 3, 9,15,22,27,34,39) ( 4,10,16,21,28,33,40)( 5,11,18,24,30,36,42, 6,12,17,23,29,35,41)$
$ 14, 14, 14 $ $6$ $14$ $( 1, 7,14,19,25,32,38, 2, 8,13,20,26,31,37)( 3,11,15,24,27,36,39, 6, 9,17,22, 29,34,41)( 4,12,16,23,28,35,40, 5,10,18,21,30,33,42)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1, 8,14,20,25,31,38)( 2, 7,13,19,26,32,37)( 3, 9,15,22,27,34,39) ( 4,10,16,21,28,33,40)( 5,12,18,23,30,35,42)( 6,11,17,24,29,36,41)$
$ 28, 7, 7 $ $6$ $28$ $( 1, 8,14,20,25,31,38)( 2, 7,13,19,26,32,37)( 3,11,16,23,27,36,40, 5, 9,17,21, 30,34,41, 4,12,15,24,28,35,39, 6,10,18,22,29,33,42)$
$ 21, 21 $ $8$ $21$ $( 1, 9,17,20,27,36,38, 3,11,14,22,29,31,39, 6, 8,15,24,25,34,41) ( 2,10,18,19,28,35,37, 4,12,13,21,30,32,40, 5, 7,16,23,26,33,42)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1,13,25,37, 8,19,31, 2,14,26,38, 7,20,32)( 3,15,27,39, 9,22,34) ( 4,16,28,40,10,21,33)( 5,17,30,41,12,24,35, 6,18,29,42,11,23,36)$
$ 14, 14, 14 $ $6$ $14$ $( 1,13,25,37, 8,19,31, 2,14,26,38, 7,20,32)( 3,17,27,41, 9,24,34, 6,15,29,39, 11,22,36)( 4,18,28,42,10,23,33, 5,16,30,40,12,21,35)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1,14,25,38, 8,20,31)( 2,13,26,37, 7,19,32)( 3,15,27,39, 9,22,34) ( 4,16,28,40,10,21,33)( 5,18,30,42,12,23,35)( 6,17,29,41,11,24,36)$
$ 28, 7, 7 $ $6$ $28$ $( 1,14,25,38, 8,20,31)( 2,13,26,37, 7,19,32)( 3,17,28,42, 9,24,33, 5,15,29,40, 12,22,36, 4,18,27,41,10,23,34, 6,16,30,39,11,21,35)$
$ 21, 21 $ $8$ $21$ $( 1,15,29,38, 9,24,31, 3,17,25,39,11,20,34, 6,14,27,41, 8,22,36) ( 2,16,30,37,10,23,32, 4,18,26,40,12,19,33, 5,13,28,42, 7,21,35)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1,19,38,13,31, 7,25, 2,20,37,14,32, 8,26)( 3,21,39,16,34,10,27, 4,22,40,15, 33, 9,28)( 5,23,42,18,35,12,30)( 6,24,41,17,36,11,29)$
$ 14, 14, 14 $ $6$ $14$ $( 1,19,38,13,31, 7,25, 2,20,37,14,32, 8,26)( 3,23,39,18,34,12,27, 5,22,42,15, 35, 9,30)( 4,24,40,17,33,11,28, 6,21,41,16,36,10,29)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1,20,38,14,31, 8,25)( 2,19,37,13,32, 7,26)( 3,22,39,15,34, 9,27) ( 4,21,40,16,33,10,28)( 5,23,42,18,35,12,30)( 6,24,41,17,36,11,29)$
$ 28, 7, 7 $ $6$ $28$ $( 1,20,38,14,31, 8,25)( 2,19,37,13,32, 7,26)( 3,23,40,17,34,12,28, 6,22,42,16, 36, 9,30, 4,24,39,18,33,11,27, 5,21,41,15,35,10,29)$
$ 21, 21 $ $8$ $21$ $( 1,21,41,14,33,11,25, 4,24,38,16,36, 8,28, 6,20,40,17,31,10,29) ( 2,22,42,13,34,12,26, 3,23,37,15,35, 7,27, 5,19,39,18,32, 9,30)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1,25, 8,31,14,38,20)( 2,26, 7,32,13,37,19)( 3,27, 9,34,15,39,22) ( 4,28,10,33,16,40,21)( 5,30,12,35,18,42,23)( 6,29,11,36,17,41,24)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1,25, 8,31,14,38,20)( 2,26, 7,32,13,37,19)( 3,28, 9,33,15,40,22, 4,27,10,34, 16,39,21)( 5,29,12,36,18,41,23, 6,30,11,35,17,42,24)$
$ 28, 7, 7 $ $6$ $28$ $( 1,25, 8,31,14,38,20)( 2,26, 7,32,13,37,19)( 3,29,10,35,15,41,21, 5,27,11,33, 18,39,24, 4,30, 9,36,16,42,22, 6,28,12,34,17,40,23)$
$ 14, 14, 14 $ $6$ $14$ $( 1,26, 8,32,14,37,20, 2,25, 7,31,13,38,19)( 3,29, 9,36,15,41,22, 6,27,11,34, 17,39,24)( 4,30,10,35,16,42,21, 5,28,12,33,18,40,23)$
$ 21, 21 $ $8$ $21$ $( 1,27,11,31,15,41,20, 3,29, 8,34,17,38,22, 6,25, 9,36,14,39,24) ( 2,28,12,32,16,42,19, 4,30, 7,33,18,37,21, 5,26,10,35,13,40,23)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1,31,20, 8,38,25,14)( 2,32,19, 7,37,26,13)( 3,33,22,10,39,28,15, 4,34,21, 9, 40,27,16)( 5,36,23,11,42,29,18, 6,35,24,12,41,30,17)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1,31,20, 8,38,25,14)( 2,32,19, 7,37,26,13)( 3,34,22, 9,39,27,15) ( 4,33,21,10,40,28,16)( 5,35,23,12,42,30,18)( 6,36,24,11,41,29,17)$
$ 28, 7, 7 $ $6$ $28$ $( 1,31,20, 8,38,25,14)( 2,32,19, 7,37,26,13)( 3,35,21,11,39,30,16, 6,34,23,10, 41,27,18, 4,36,22,12,40,29,15, 5,33,24, 9,42,28,17)$
$ 14, 14, 14 $ $6$ $14$ $( 1,32,20, 7,38,26,14, 2,31,19, 8,37,25,13)( 3,35,22,12,39,30,15, 5,34,23, 9, 42,27,18)( 4,36,21,11,40,29,16, 6,33,24,10,41,28,17)$
$ 21, 21 $ $8$ $21$ $( 1,33,24, 8,40,29,14, 4,36,20,10,41,25,16, 6,31,21,11,38,28,17) ( 2,34,23, 7,39,30,13, 3,35,19, 9,42,26,15, 5,32,22,12,37,27,18)$
$ 14, 14, 7, 7 $ $3$ $14$ $( 1,37,31,26,20,13, 8, 2,38,32,25,19,14, 7)( 3,39,34,27,22,15, 9) ( 4,40,33,28,21,16,10)( 5,41,35,29,23,17,12, 6,42,36,30,24,18,11)$
$ 14, 14, 14 $ $6$ $14$ $( 1,37,31,26,20,13, 8, 2,38,32,25,19,14, 7)( 3,41,34,29,22,17, 9, 6,39,36,27, 24,15,11)( 4,42,33,30,21,18,10, 5,40,35,28,23,16,12)$
$ 7, 7, 7, 7, 7, 7 $ $1$ $7$ $( 1,38,31,25,20,14, 8)( 2,37,32,26,19,13, 7)( 3,39,34,27,22,15, 9) ( 4,40,33,28,21,16,10)( 5,42,35,30,23,18,12)( 6,41,36,29,24,17,11)$
$ 28, 7, 7 $ $6$ $28$ $( 1,38,31,25,20,14, 8)( 2,37,32,26,19,13, 7)( 3,41,33,30,22,17,10, 5,39,36,28, 23,15,11, 4,42,34,29,21,18, 9, 6,40,35,27,24,16,12)$
$ 21, 21 $ $8$ $21$ $( 1,39,36,25,22,17, 8, 3,41,31,27,24,14, 9, 6,38,34,29,20,15,11) ( 2,40,35,26,21,18, 7, 4,42,32,28,23,13,10, 5,37,33,30,19,16,12)$
Group invariants
Order: $168=2^{3} \cdot 3 \cdot 7$
Cyclic: No
Abelian: No
Solvable: Yes
GAP id: [168, 45]
Character table: Data not available.
|
{
"url": "https://www.lmfdb.org/GaloisGroup/42T34",
"source_domain": "www.lmfdb.org",
"snapshot_id": "crawl=CC-MAIN-2020-34",
"warc_metadata": {
"Content-Length": "28267",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ZBQJQC3YU5DHJVM53LPYPEVVJJQN6FOT",
"WARC-Concurrent-To": "<urn:uuid:174ba5a0-d0dd-45df-9107-a99422f256a1>",
"WARC-Date": "2020-08-11T15:21:44Z",
"WARC-IP-Address": "35.241.19.59",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:6ZN2N67FECPFYNECVV3QNSBCMBBU3GPT",
"WARC-Record-ID": "<urn:uuid:2025105d-940e-489c-9d8b-8d00cc318226>",
"WARC-Target-URI": "https://www.lmfdb.org/GaloisGroup/42T34",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:fed5cce8-d57b-4001-8ea1-e7ca66d28781>"
},
"warc_info": "isPartOf: CC-MAIN-2020-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-212.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
11,
12,
24,
38,
47,
57,
68,
81,
94,
107,
130,
131,
148,
149,
173,
174,
193,
223,
248,
262,
277,
317,
584,
605,
606,
628,
629,
666,
676,
686,
696,
707,
708,
747,
748,
758,
759,
774,
775,
791,
792,
808,
809,
825,
826,
842,
843,
859,
860,
880,
881,
925,
1046,
1047,
1065,
1066,
1100,
1242,
1439,
1608,
1833,
2030,
2190,
2347,
2512,
2667,
2819,
2979,
3136,
3301,
3456,
3608,
3768,
3925,
4090,
4245,
4397,
4562,
4722,
4877,
5034,
5186,
5346,
5511,
5666,
5823,
5975,
6135,
6292,
6457,
6612,
6764,
6765,
6782,
6783,
6819,
6831,
6844,
6859,
6878
],
"line_end_idx": [
11,
12,
24,
38,
47,
57,
68,
81,
94,
107,
130,
131,
148,
149,
173,
174,
193,
223,
248,
262,
277,
317,
584,
605,
606,
628,
629,
666,
676,
686,
696,
707,
708,
747,
748,
758,
759,
774,
775,
791,
792,
808,
809,
825,
826,
842,
843,
859,
860,
880,
881,
925,
1046,
1047,
1065,
1066,
1100,
1242,
1439,
1608,
1833,
2030,
2190,
2347,
2512,
2667,
2819,
2979,
3136,
3301,
3456,
3608,
3768,
3925,
4090,
4245,
4397,
4562,
4722,
4877,
5034,
5186,
5346,
5511,
5666,
5823,
5975,
6135,
6292,
6457,
6612,
6764,
6765,
6782,
6783,
6819,
6831,
6844,
6859,
6878,
6914
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 6914,
"ccnet_original_nlines": 100,
"rps_doc_curly_bracket": 0.0002892700140364468,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.006524470169097185,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.004516940098255873,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.967126727104187,
"rps_doc_frac_unique_words": 0.3948051929473877,
"rps_doc_mean_word_length": 4.832467555999756,
"rps_doc_num_sentences": 2,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.607280254364014,
"rps_doc_word_count": 770,
"rps_doc_frac_chars_dupe_10grams": 0.032518140971660614,
"rps_doc_frac_chars_dupe_5grams": 0.1542596071958542,
"rps_doc_frac_chars_dupe_6grams": 0.07686106115579605,
"rps_doc_frac_chars_dupe_7grams": 0.0454179011285305,
"rps_doc_frac_chars_dupe_8grams": 0.0454179011285305,
"rps_doc_frac_chars_dupe_9grams": 0.032518140971660614,
"rps_doc_frac_chars_top_2gram": 0.03708679974079132,
"rps_doc_frac_chars_top_3gram": 0.05321149900555611,
"rps_doc_frac_chars_top_4gram": 0.06772372871637344,
"rps_doc_books_importance": -3199.751220703125,
"rps_doc_books_importance_length_correction": -3199.751220703125,
"rps_doc_openwebtext_importance": -2014.25439453125,
"rps_doc_openwebtext_importance_length_correction": -2014.25439453125,
"rps_doc_wikipedia_importance": -1121.7076416015625,
"rps_doc_wikipedia_importance_length_correction": -1121.7076416015625
},
"fasttext": {
"dclm": 0.40812742710113525,
"english": 0.3879588544368744,
"fineweb_edu_approx": 0.9941266775131226,
"eai_general_math": 0.6437700390815735,
"eai_open_web_math": 0.13463515043258667,
"eai_web_code": 0.7918121218681335
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "512.2",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
},
"secondary": {
"code": "512",
"labels": {
"level_1": "Science and Natural history",
"level_2": "Mathematics",
"level_3": "Algebra"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "2",
"label": "Academic/Research"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "20",
"label": "Structured Data"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
5,562,029,501,925,006,000 |
Perguntas com a marcação «ghci»
7
Como definir uma função em ghci em várias linhas?
Estou tentando definir qualquer função simples que abranja várias linhas em ghci, considere o seguinte como exemplo: let abs n | n >= 0 = n | otherwise = -n Até agora, tentei pressionar Enter após a primeira linha: Prelude> let abs n | n >= 0 = n Prelude> …
161 haskell ghci
5
Comandos de várias linhas no GHCi
Estou tendo problemas ao inserir comandos de várias linhas no ghci. O seguinte código de duas linhas funciona a partir de um arquivo: addTwo :: Int -> Int -> Int addTwo x y = x + y Mas quando entro em ghci, recebo um erro: <interactive>:1:1: error: Variable not in …
134 haskell ghci
1
O Emacs Interactive-Haskell substitui a não resposta se o cabal ou o diretório ativo estiver definido como o diretório do projeto
Estou tendo um comportamento estranho com a substituição do Interactive-Haskell emacs. Quando eu origino um arquivo, o emacsmini buffer mostra uma série de prompts interativos: Start a new project named 'myproject'? Cabal dir (guessed from myproject.cabal): Build target (empty for default): Set current directory: Se eu deixar o diretório cabal …
124 haskell emacs cabal ghci
1
Comportamento estranho de (^) em Haskell
Por que o GHCi fornece respostas incorretas abaixo? GHCi λ> ((-20.24373193905347)^12)^2 - ((-20.24373193905347)^24) 4.503599627370496e15 Python3 >>> ((-20.24373193905347)**12)**2 - ((-20.24373193905347)**24) 0.0 ATUALIZAÇÃO Eu implementaria a função de Haskell (^) da seguinte maneira. powerXY :: Double -> Int -> Double powerXY x 0 = 1 powerXY x y | y < 0 …
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.
|
{
"url": "https://qastack.com.br/programming/tagged/ghci/",
"source_domain": "qastack.com.br",
"snapshot_id": "crawl=CC-MAIN-2022-33",
"warc_metadata": {
"Content-Length": "16518",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:G3ZAR3ZZFVU2JVYE2BAPZ5BKYWHDO6NT",
"WARC-Concurrent-To": "<urn:uuid:833d229a-7117-4414-9afc-a58d3fe3d390>",
"WARC-Date": "2022-08-11T20:26:29Z",
"WARC-IP-Address": "116.203.77.254",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:ILKGQ5JKHIUDBDDV57BG6TWNDUQGCLMU",
"WARC-Record-ID": "<urn:uuid:330f607b-0769-424a-acf5-e5a6eb1bc7b7>",
"WARC-Target-URI": "https://qastack.com.br/programming/tagged/ghci/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:324771e1-345a-42d4-a74d-f3c234db79a6>"
},
"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-115\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,
32,
33,
35,
85,
355,
374,
375,
377,
411,
690,
709,
710,
712,
842,
1190,
1223,
1224,
1225,
1226,
1227,
1229,
1270,
1650,
1651,
1771
],
"line_end_idx": [
32,
33,
35,
85,
355,
374,
375,
377,
411,
690,
709,
710,
712,
842,
1190,
1223,
1224,
1225,
1226,
1227,
1229,
1270,
1650,
1651,
1771,
1825
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1825,
"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.1274999976158142,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.007499999832361937,
"rps_doc_frac_lines_end_with_ellipsis": 0.1538461446762085,
"rps_doc_frac_no_alph_words": 0.3375000059604645,
"rps_doc_frac_unique_words": 0.5595667958259583,
"rps_doc_mean_word_length": 5.1046929359436035,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0.009999999776482582,
"rps_doc_unigram_entropy": 4.774553298950195,
"rps_doc_word_count": 277,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05799150839447975,
"rps_doc_frac_chars_dupe_6grams": 0.05799150839447975,
"rps_doc_frac_chars_dupe_7grams": 0.016973130404949188,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03677510842680931,
"rps_doc_frac_chars_top_3gram": 0.009900989942252636,
"rps_doc_frac_chars_top_4gram": 0.011315420269966125,
"rps_doc_books_importance": -210.38038635253906,
"rps_doc_books_importance_length_correction": -208.37034606933594,
"rps_doc_openwebtext_importance": -124.08141326904297,
"rps_doc_openwebtext_importance_length_correction": -124.08141326904297,
"rps_doc_wikipedia_importance": -93.00261688232422,
"rps_doc_wikipedia_importance_length_correction": -92.99237060546875
},
"fasttext": {
"dclm": 0.24602633714675903,
"english": 0.017027180641889572,
"fineweb_edu_approx": 1.3476476669311523,
"eai_general_math": 0.011252880096435547,
"eai_open_web_math": 0.3761001229286194,
"eai_web_code": 0.5993930697441101
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "3",
"label": "Irrelevant Content"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
129,828,700,257,693,440 |
In the previous part we created a subtype that accepted either the letter 'm' or the letter 'f' for male and female respectively.
What if we would like to accept the word 'male' and 'female' as well but still we don't want to accept any other word and we still want the values to be kept as 'm' and 'f' respectively?
For this in Moose we can use coercion.
Download: mp4 ogv webm
See the script/person.pl file for how we would like to use the class:
use strict;
use warnings;
use v5.10;
use Person;
use DateTime;
my $student = Person->new( name => 'Foo' );
$student->sex('m'); # should be accepted as 'm'
say $student->sex;
$student->sex('female'); # should be accepted as 'f'
say $student->sex;
$student->sex('other'); # should not be accepted
This is the implementation in lib/Person.pm:
package Person;
use Moose;
use Moose::Util::TypeConstraints;
subtype 'Person::Type::Sex'
=> as 'Str'
=> where { $_ eq 'f' or $_ eq 'm' }
=> message { "The sex you provided ($_) is not valid. " .
"Valid values are 'f' and 'm'." };
coerce 'Person::Type::Sex'
=> from 'Str'
=> via { lc substr($_, 0, 1) };
has 'name' => (is => 'rw');
has 'birthday' => (isa => 'DateTime', is => 'rw');
has 'sex' => (isa => 'Person::Type::Sex', is => 'rw', coerce => 1);
1;
Everything is the same as in the previous example, but here we also have this extra code:
coerce 'Person::Type::Sex'
=> from 'Str'
=> via { lc substr($_, 0, 1) };
and at the definition of the 'sex' attribute we added coerce => 1 to enable coercion.
The coercion is related to a specific type, that's the first parameter the coerce function receives. Then we declare what kind of values can we try to coerce, in this case from 'Str' means this rule can handle any value that is a string. The last part in our declaration is new code snippet. This is what actually converts the value provided by the user to some other value. In our case this is quite simple: via { lc substr($_, 0, 1) }; will take the first character of the string and convert it into a lower-case character. Note, this part does not care what was the value the user pass as long as it was a string. It will just convert (coerce) the string to the lower case version of its first character and then the subtype declaration we saw earlier will apply its constraint where { $_ eq 'f' or $_ eq 'm' }.
This means the user can pass any string, 'f', 'F', 'Female', they will all be converted to lower-case 'f'. If the user passes 'm', 'M', 'male', or even other words starting with the letter 'm' such as 'mule' will all be converted to 'm' and will be accepted as male.
|
{
"url": "https://perlmaven.com/moose-coerce-to-subtype",
"source_domain": "perlmaven.com",
"snapshot_id": "crawl=CC-MAIN-2021-39",
"warc_metadata": {
"Content-Length": "16674",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:YT5RCZCXBBQNDAN2CVLKOIAUSWBR5PCW",
"WARC-Concurrent-To": "<urn:uuid:2d3662a2-7d9e-46b6-b24a-25cd2eab9a69>",
"WARC-Date": "2021-09-21T15:24:04Z",
"WARC-IP-Address": "173.255.196.65",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:JAUTAAF73UQLDMMEFXBVG7KZE6QJQMT5",
"WARC-Record-ID": "<urn:uuid:6ed8a3b3-d8d6-4124-a3f4-96e38eafacc5>",
"WARC-Target-URI": "https://perlmaven.com/moose-coerce-to-subtype",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7ffdffed-41e0-4375-afc2-02a3032534e9>"
},
"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-130\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,
130,
131,
318,
319,
358,
359,
382,
383,
453,
454,
466,
480,
491,
492,
504,
518,
519,
563,
564,
619,
638,
639,
694,
713,
714,
766,
767,
812,
813,
829,
840,
874,
875,
903,
919,
959,
1021,
1064,
1065,
1092,
1110,
1146,
1147,
1179,
1230,
1303,
1304,
1307,
1308,
1398,
1399,
1426,
1444,
1480,
1481,
1567,
1568,
2383,
2384
],
"line_end_idx": [
130,
131,
318,
319,
358,
359,
382,
383,
453,
454,
466,
480,
491,
492,
504,
518,
519,
563,
564,
619,
638,
639,
694,
713,
714,
766,
767,
812,
813,
829,
840,
874,
875,
903,
919,
959,
1021,
1064,
1065,
1092,
1110,
1146,
1147,
1179,
1230,
1303,
1304,
1307,
1308,
1398,
1399,
1426,
1444,
1480,
1481,
1567,
1568,
2383,
2384,
2650
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2650,
"ccnet_original_nlines": 59,
"rps_doc_curly_bracket": 0.004528299905359745,
"rps_doc_ldnoobw_words": 3,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.36082473397254944,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.002945509972050786,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.34462445974349976,
"rps_doc_frac_unique_words": 0.3981264531612396,
"rps_doc_mean_word_length": 4.238875865936279,
"rps_doc_num_sentences": 18,
"rps_doc_symbol_to_word_ratio": 0.0044182599522173405,
"rps_doc_unigram_entropy": 4.732558250427246,
"rps_doc_word_count": 427,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.08674032986164093,
"rps_doc_frac_chars_dupe_6grams": 0.05745856091380119,
"rps_doc_frac_chars_dupe_7grams": 0.04309391975402832,
"rps_doc_frac_chars_dupe_8grams": 0.04309391975402832,
"rps_doc_frac_chars_dupe_9grams": 0.04309391975402832,
"rps_doc_frac_chars_top_2gram": 0.02209945023059845,
"rps_doc_frac_chars_top_3gram": 0.019889499992132187,
"rps_doc_frac_chars_top_4gram": 0.019889499992132187,
"rps_doc_books_importance": -267.1053161621094,
"rps_doc_books_importance_length_correction": -267.1053161621094,
"rps_doc_openwebtext_importance": -163.7059326171875,
"rps_doc_openwebtext_importance_length_correction": -163.7059326171875,
"rps_doc_wikipedia_importance": -149.83685302734375,
"rps_doc_wikipedia_importance_length_correction": -149.83685302734375
},
"fasttext": {
"dclm": 0.4176402688026428,
"english": 0.8879314064979553,
"fineweb_edu_approx": 2.5293006896972656,
"eai_general_math": 0.9461087584495544,
"eai_open_web_math": 0.33300602436065674,
"eai_web_code": 0.9812049269676208
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,713,801,805,416,177,200 |
Веб-консоль
Веб-консоль:
1. Выводит информацию, связанную с веб-страницей: сетевые запросы, ошибки и предупреждения JavaScript и CSS, а также сообщения об ошибках, предупреждения и информационные сообщения, выдаваемые кодом JavaScript, выполняющимся в контексте страницы;
2. Позволяет взаимодействовать с веб-страницей, выполняя выражения JavaScript в её контексте.
Это часть замены старой Консоли Ошибок, встроенной в Firefox. Старая Консоль Ошибок выводила ошибки, предупреждения и сообщения от всех веб-страниц, ошибки самого выполнения самого браузера и его дополнений. Из-за этого было трудно выделить, сообщения от конкретной страницы. Новая Веб-консоль всегда привязана к определенной веб-странице и показывает только связанную с ней информацию.
На другой половине Консоли ошибок заменили — Консоль браузера, которая выводит ошибки, предупреждения и сообщения от кода браузера и от дополнений.
Как открыть Веб Консоль
Чтобы открыть Веб-консоль, выберите «Веб-консоль» в меню (Веб-)разработка в Меню Firefox (или меню Инструменты, если Вы настроили показывать панель меню или Вы работаете на Mac OS X), или нажмите её комбинацию клавиш CtrlShiftK (CommandOptionK в OS X).
Внизу окна браузера появится Набор инструментов с выбранной Веб-консолью (в Панели инструментов разработчика она называется просто «Консоль»):
Под панелью инструментов окна инструментов разработчика, интерфейс веб-консоли разделён на три части:
• Панель инструментов: вдоль верхнего края — панель инструментов с кнопками типа «Сеть» ("Net"), «CSS», «JS», "Защита" ("Security"), "Журнал" ("Logging") и "Сервер". Эта панель — для фильтрации выводимых сообщений.
• Командная строка: вдоль нижнего края — командная строка, в которую можно вводить выражения JavaScript
• Поле вывода сообщений: между панелью инструментов и командной строкой, занимая большую часть окна, располагается пространство, в которое Веб-консоль выводит сообщения.
Поле вывода сообщений
Большую часть Веб-консоли занимает поле вывода сообщений:
В поле вывода сообщений можно увидеть:
Каждое сообщение показывается в отдельной строке:
Время (Time) Время когда сообщение было записано. Начиная с Firefox 28 и новее, по умолчанию время сообщения не выводится. Но при необходимости можно изменить это поведение активировав вывод времени в настроках Инструментов.
Категория (Category)
Категория: указывает на тип сообщения:
• чёрный: HTTP-запрос
• голубой: CSS: предупреждения/ошибки/лог
• оранжевый: JavaScript: предупреждения/ошибки
• красный: безопасность: предупреждения/ошибки
• светло-серый: сообщения которые выводятся в консоль с помощью консольного API cс использование кода JavaScript
• Dark Gray: input/output из интерфейса интерпретатора командной строки
Тип (Type) Для все сообщений за исключением HTTP запросов и интерактивного input/output, иконка обозначает тип сообщения: ошибка (X), предупреждение(!), или просто информационное сообщение(i).
Сообщение (Message) Само сообщение.
Количество повторов (Occurrences) Если строка которая генерирует предупреждение или ошибку выполняется больше одного раза, то на поле сообщений она попадет только один раз, но рядом появится счётчик который укажет сколько раз это сообщение было выведено в поле сообщений.
Имя файля и номер строки
(Filename:Line number)
Для сообщений JavaScript, CSS, и консольного API, можно отследить строку с кодом которая стала причиной этого сообщения. Консоль также покажет ссылку на файл и номер строки ставшей причиной сообщения..
Начиная с Firefox 36, сообщение также включает в себя в номер колонки в строке.
По умолчанию консоль очищается каждый раз когда вы открываете новую страницу или перезагружает текущую. Чтобы переопределить это поведение, активируйте опцию "Enable persistent logs" в Настройках.
HTTP запросы
HTTP запросы записываются следующим образом:
Время (Time) Время записи сообщения
Категория (Category) Показывает что сообщение является HTTP запросом.
Метод (Method) Вид запроса HTTP
URI целевая ссылка URI
Резюме (Summary) Версия и статус HTTP протокола, время выполнения запроса.
Нажав мышкой на сообщение вы увидите следующее окно с более детальной информацией о запросе и ответе на него:
Прокрутка вниз показывает заголовки ответа. По умолчанию веб-консоль не записывает в журнал запрос и ответ тела: чтобы сделать это, войдите в контекстное меню веб-консоли и выберите "Log Request and Response Bodies", перезагрузите страницу, а затем вы увидите их в окне " Inspect Network Request ".
Только первый мегабайт данных регистрируется для каждого запроса или ответа тела, поэтому очень большие запросы и ответы будут обрезаны.
Сообщения журнала сети не отображаются по умолчанию. Используйте filtering чтобы показать их.
XHR
С Firefox 38 и далее, веб-консоль показывает, когда сетевой запрос был сделан как XMLHttpRequest:
Кроме того, с Firefox 38 и далее, вы можете filter сетевые запросы так, чтобы только видеть XMLHttpRequests.
Как и обычный журнал запроса сетевых сообщений, журналы запросы XMLHttpRequest не отображаются по умолчанию. Использовать filtering feature to show them.
JavaScript ошибки и предупреждения
JavaScript ошибки выглядят вот так:
CSS ошибки, сообщения и переформатирование сообщения
CSS сообщения выглядят так:
По умолчанию, CSS предупреждения и регистрирования сообщений не отображаются.
Отправка-события
Веб-консоль также регистрирует события переформатированые в CSS категорию. Переформатирование это название операции, которой браузер вычисляет расположение части или всей страницы. Переформатирования происходят, когда изменение произошли на странице, чтобы браузер считал, что влияет на расположение. . Многие события могут вызвать переформатирование, в том числе: изменение размера окна браузера, активируя как псевдо-классы :hover, или манипулирование DOM в JavaScript.
Поскольку переформатирования могут быть дорогостоящими вычислениями и непосредственно влияют на пользовательский интерфейс, они могут иметь большое влияние на отзывчивость веб-сайта или веб-приложения. При переформатировании события веб-консоль может дать вам понять в какой момент оно начинает инициацию, как долго они принимаются к выполнению и, если есть переформатирования synchronous reflows сработавшие от JavaScript, то какой код вызвал их .
Переформатирования события регистрируются как "Журнал" сообщений, в отличие от ошибок CSS или предупреждений. По умолчанию они отключены. Вы можете включить их, нажав на кнопку "CSS" в toolbar и выбрать "Журнал".
Каждое сообщение маркируется "переформатирование" и показывает время, необходимое для выполнения переформатирования :
Если переформатирование является синхронным переформатированием, вызванным JavaScript, будет также показанна ссылка на строку кода, инициировавшего переформатирование:
Нажмите на ссылку, чтобы открыть файл в Debugger.
Синхронные и асинхронные переформатирования
Если сделанное изменение аннулирует текущую схему - например, окно браузера изменяется или некоторые JavaScript изменяют CSS элемент - макет не пересчитывается немедленно. Вместо переформатирования в асинхронном режиме, в следующий раз браузер решает что это должно быть сделано (как правило, в следующий раз браузер перекрашивается). Таким образом, браузер может накопить коллекцию основаную на недействующих изменениях и пересчитать их эффект сразу.
Тем не менее, если какой-то JavaScript код читает что стиль был изменен, то браузер должен выполнить синхронное переформатирование в порядке вычисленным расчетом стиля чтобы вернуться. Например, код как этот хочет вызовать немедленное, синхронное, переформатирование, когда вызовет window.getComputedStyle(thing).height:
var thing = document.getElementById("the-thing");
thing.style.display = "inline-block";
var thingHeight = window.getComputedStyle(thing).height;
Из-за этого, эта хорошая идея избежать чередования чтения и записи вызовов выше указанных основ стилей, когда воздействует DOM, потому что каждый раз, когда вы возвращаете стиль, который был недействительным в ранее вызваной записи, вы принуждаете к синхронному переформатированию.
Предупреждения безопасности и ошибки
Предупреждения безопасности и ошибки выглядят следующим образом :
Сообщения безопасности показанные в веб-консоли помогают разработчикам найти потенциальные или фактические уязвимости в своих сайтах. Кроме того, многие из этих сообщений помогают обучающимся разработчикам, потому что они заканчиваются "Подробной" ссылкой ведущей вас на страницу со справочной информации и рекомендациями для смягчения этой проблемы.
Полный список сообщений безопасности выглядит следующим образом :
Сообщение Подробности
Blocked loading mixed active content Страница содержит смешанные активные доли: то есть, главная страница была подана через HTTPS, но попросил браузер для загрузки "активные доли", такие как скрипты, через HTTP. Браузер заблокировал активные доли. Смотрите Mixed Content чтобы узнать подробнее.
Blocked loading mixed display content Страница содержит смешанное отображение долей: то есть, главная страница была подана через HTTPS, но попросил браузер, чтобы загрузить "отображение долей", таких как изображения, через HTTP. Браузер заблокировал эти отображения долей. Смотрите Mixed Content чтобы узнать подробнее.
Loading mixed (insecure) active content on a secure page Страница содержит смешанные активные доли: то есть, главная страница была подана через HTTPS, но попросил браузер для загрузки "активные доли", такие как скрипты, через HTTP. Браузер загрузил эти активные доли. Смотрите Mixed Content чтобы узнать подробнее.
Loading mixed (insecure) display content on a secure page Страница содержит смешанное отображение долей: то есть, главная страница была подана через HTTPS, но попросил браузер, чтобы загрузить "отображение долей", таких как изображения, через HTTP. Браузер загрузил эти отображения долей. Смотрите Mixed Content чтобы узнать подробнее.
This site specified both an X-Content-Security-Policy/Report-Only header and a Content-Security-Policy/Report-Only header. The X-Content-Security-Policy/Report-Only header(s) will be ignored. Смотрите Content Security Policy чтобы узнать подробнее.
The X-Content-Security-Policy and X-Content-Security-Report-Only headers will be deprecated in the future. Please use the Content-Security-Policy and Content-Security-Report-Only headers with CSP spec compliant syntax instead. Смотрите Content Security Policy чтобы узнать подробнее.
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen. Страницы, содержащие регистрационные формы должны быть поданы через HTTPS, а не HTTP.
Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen. Формы, содержащие поля пароля должны представить их через HTTPS, а не HTTP.
Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen. плавающие фреймы, содержащие регистрационные формы должны быть поданы через HTTPS, а не HTTP.
The site specified an invalid Strict-Transport-Security header. Смотрите HTTP Strict Transport Security чтобы узнать подробнее.
Новое в Firefox 36
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.
Сайт использует сертификат чья подпись использует алгоритм хеширования SHA-1.
SHA-1 по-прежнему до сих пор широко используется в сертификатах, но он начинает показывать свой возраст. Веб-сайтам и центрам сертификации рекомендуется перейти на более сильные хэш-алгоритмы в будущем. Смотрите Weak Signature Algorithm статью рассказывающюю подробнее.
Обратите внимание, что сертификат SHA-1 не может быть собственным сертификатом вашего сайта, но может свидетельствовать о принадлежности к сертификации, которая использовалась для подписи сертификата вашего сайта.
Bug 863874 это мета-ошибка для регистрации соответствующих сообщений о проблемах безопасности в веб-консоль. Если у вас есть идеи для полезных функций, таких как те, что обсуждаемые здесь, или заинтересованы в содействии, проверьте мета-ошибку и ее зависимости.
Сообщения консоли API
This section describes the Web Console output for those console API calls that actually result in output. For more general documentation on the console API, please refer to its documentation page.
From Firefox 40 onwards, the Web Console can display console messages from Shared Workers, Service Workers, and Chrome Workers. Check the relevant options in the Filtering dropdown menu to see them.
Сообщения об ошибках
API Message content
error()
The argument to error().
console.error("an error");
The console will display a full stack trace for errors:
function error() {
console.error("an error");
}
function call_error() {
error();
}
call_error();
exception() An alias for error().
assert()
If the assertion succeeds, nothing. If the assertion fails, the argument:
console.assert(false, "My assertion always fails");
The console will display a full stack trace for assertions:
function assertion() {
console.assert(false, "assertion failed");
}
function call_assertion() {
assertion();
}
call_assertion();
Предупреждающие сообщения
API Message content
warn()
The argument to warn().
console.warn("a warning");
Информативные сообщения
API Message content
info()
The argument to info().
console.info("some info");
Журнальные сообщения
API Message content
count()
The label supplied, if any, and the number of times this occurrence of count() has been called with the given label:
console.count(user.value);
dir()
Listing of the object's properties:
var user = document.getElementById('user');
console.dir(user);
dirxml() Aliased to log().
log()
The argument to log().
console.log("logged");
Если аргумент — это узел DOM, консоль выдаст его в виде инспектируемого rich text:
table()
Display tabular data as a table.
time()
Notification that the specified timer started.
console.time("t");
timeEnd()
Duration for the specified timer.
console.timeEnd("t");
trace()
Stack trace:
console.trace();
Группировка сообщений
Вы можете использовать console.group() для создания indented groups в выводе консоли. Смотрите Использование групп в консоли для более детальной информации.
Оформление сообщений
Начиная с Firefox 31, вы можете использовать спецификатор формата "%c" для стилизации консольных сообщений:
console.log("%cMy stylish message", "color: red; font-style: italic");
Сообщения ввода/вывода
Команды, отправленные браузеру через командную строку, как и результаты их выполнения, выводятся в поле вывода сообщений Веб-консоли в следуюем виде:
Темно-серая полоса служит индикатором того, что это сообщения ввода/вывода, тогда как направление стрелки обозначает разлчия между вводом и выводом.
Фильтрация и поиск
Фильтрация по типу
Для фильтрации сообщений в поле вывода сообщений Веб-консоли используется панель вверху.
Чтобы увидеть только сообщения определённого типа, нажмите на кнопку, название которой соответствует желаемому типу сообщений ("Net", "CSS", и т.д.). Нажатие на основную часть кнопки включает/выключает отображение сообщений выбранного типа, тогда как нажатие на стрелку в правой части кнопки вызывает выпадающее меню с более специфическими вариантами фильтров для сообщений выбранного типа (например, вывод только предупреждений и сообщений об ошибках).
Начиная с Firefox 40, можно настроить опции фильтра "Logging", чтобы видеть сообщения от workers и add-ons:
Фильтрация по тексту
Чтобы видеть только сообщения, содержащие определённую строку, введите её в поле с меткой "Filter output".
Очистка содержимого
Наконец, Вы можете использовать эту панель для очистки всех выведенных сообщений.
Интерпретатор командной строки
Вы можете выполнять JavaScript-код в реальном времени, используя командную строку в Web-консоли.
Ввод выражений
Для ввода выражений просто введите в командную строку и нажмите Enter. Для ввода выражений, состоящих из нескольких строк, используйте комбинацию ShiftEnter вместо Enter.
Введённое выражение отобразится в окне сообщений, с выводом результата последующей строкой:
Accessing variables
You can access variables defined in the page, both built-in variables like window and variables added by JavaScript like jQuery:
Автозавершение
The command line has autocomplete: enter the first few letters and a popup appears with possible completions:
Type Enter or Tab to accept the suggestion, use the up/down arrows to move to a different suggestion, or just keep typing if you don't like any of the suggestions.
The console suggests completions from the scope of the currently executing stack frame. This means that if you've hit a breakpoint in a function you get autocomplete for objects local to the function.
You get autocomplete suggestions for array elements, as well:
Объявление переменных
Вы можете объявить ваши собственные переменные, и в последующем обращаться к ним:
История команд
Командная строка запоминает введённые ранее команды: чтобы перемещаться вперёд и назад по истории, используйте стрелки вниз и вверх на клавиатуре.
Начиная с Firefox 39, эта история сохраняется между сессиями. Чтобы очистить историю, используйте clearHistory() helper function.
Работа с iframes
If a page contains embedded iframes, you can use the cd() command to change the console's scope to a specific iframe, and then you can execute functions defined in the document hosted by that iframe. There are three ways to select an iframe using cd():
You can pass the iframe DOM element:
var frame = document.getElementById("frame1");
cd(frame);
You can pass a CSS selector that matches the iframe:
cd("#frame1");
You can pass the iframe's global window object:
var frame = document.getElementById("frame1");
cd(frame.contentWindow);
To switch the context back to the top-level window, call cd() with no arguments:
cd();
For example, suppose we have a document that embeds an iframe:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<iframe id="frame1" src="static/frame/my-frame1.html"></iframe>
</body>
</html>
The iframe defines a new function:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
function whoAreYou() {
return "I'm frame1";
}
</script>
</head>
<body>
</body>
</html>
You can switch context to the iframe like this:
cd("#frame1");
Now you'll see that the global window's document is the iframe:
And you can call the function defined in the iframe:
Helper commands
The JavaScript command line provided by the Web Console offers a few built-in helper functions that make certain tasks easier.
$(selector, element)
Looks up a CSS selector string selector , returning the first node descended from element that matches. If unspecified, element defaults to document. Equivalent to document.querySelector() or calls the $ function in the page, if it exists.
See the QuerySelector code snippet.
$$(selector, element)
Looks up a CSS selector string selector, returning an array of DOM nodes descended from element that match. If unspecified, element defaults to document. This is like for document.querySelectorAll(), but returns an array instead of a NodeList.
$0
The currently-inspected element in the page.
$_
Stores the result of the last expression executed in the console's command line. For example, if you type "2+2 <enter>", then "$_ <enter>", the console will print 4.
$x(xpath, element)
Evaluates the XPath xpath expression in the context of element and returns an array of matching nodes. If unspecified, element defaults to document
keys()
Given an object, returns a list of the keys (or property names) on that object. This is a shortcut for Object.keys.
values()
Given an object, returns a list of the values on that object; serves as a companion to keys().
clear()
Clears the console output area.
inspect()
Given an object, opens the object inspector for that object.
pprint()
Formats the specified value in a readable way; this is useful for dumping the contents of objects and arrays.
help()Deprecated since Gecko 62
:helpRequires Gecko 62
Displays help text. Actually, in a delightful example of recursion, it will bring you to this page.
cd()
Switch JavaScript evaluation context to a different iframe in the page. This helper accepts multiple different ways of identifying the frame to switch to. You can supply any of the following:
• a selector string that will be passed to document.querySelector to locate the iframe element
• the iframe element itself
• the content window inside the iframe
See working with iframes.
copy()
New in Firefox 38. Copy the argument to the clipboard. If the argument is a string, it's copied as-is. If the argument is a DOM node, its outerHTML is copied. Otherwise, JSON.stringify will be called on the argument, and the result will be copied to the clipboard.
clearHistory()
New in Firefox 39. Just like a normal command line, the console command line remembers the commands you've typed. Use this function to clear the console's command history.
:screenshot
New in Firefox 62. Create a screenshot of the current page with the supplied filename. If you don't supply a filename, the image file will be named:
Screen Shot yyy-mm-dd at hh.mm.ss.png
The command has the following optional parameters:
Command Type Description
--clipboard boolean When present, this parameter will cause the screenshot to be copied to the clipboard.
--delay number The number of seconds to delay before taking the screenshot.
--dpr number The device pixel ratio to use when taking the screenshot.
--file boolean When present, the screenshot will be saved to a file, even if other options (e.g. --clipboard) are included.
--filename string The name to use in saving the file. The file should have a ".png" extension.
--fullpage boolean If included, the full webpage will be saved. With this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot. When used, "-fullpage" will be appended to the file name.
--selector string The CSS query selector for a single element on the page. When supplied, only this element will be included in the screenshot.
Please refer to the Console API for more information about logging from content.
Rich output for objects
When the Web console prints objects, it includes a richer set of information than just the object's name. In particular, it:
Type-specific rich output
The Web Console provides rich output for many object types, including the following:
Object
Array
Date
Promise
Новое в Firefox 36
RegExp
Window
Document
Element
Examining object properties
When an object is logged to the console it appears in italics. Click on it, and you'll see a new panel appear containing details of the object:
To dismiss this panel press Esc..
Выделение и инспектирование узлов DOM
If you hover the mouse over any DOM element in the console output, it's highlighted in the page:
In the screenshot above you'll also see a blue "target" icon next to the node in the console output: click it to switch to the Inspector with that node selected.
The split console
You can use the console alongside other tools. While you're in another tool in the Toolbox, just press Esc or press the "Toggle split console" button in the Toolbar. The toolbox will now appear split, with the original tool above and the web console underneath.
As usual, $0 works as a shorthand for the element currently selected in the Inspector:
When you use the split console with the debugger, the console's scope is the currently executing stack frame. So if you hit a breakpoint in a function, the scope will be the function's scope. You'll get autocomplete for objects defined in the function, and can easily modify them on the fly:
Клавиши быстрово вызова
Команда Windows OS X Linux
Открыть веб-консоль Ctrl + Shift + K Cmd + Opt + K Ctrl + Shift + K
Искать в панели показа сообщений Ctrl + F Cmd + F Ctrl + F
Очистить панель инспектирования объекта Esc Esc Esc
Переместить фокус на командную строку Ctrl + Shift + K Cmd + Opt + K Ctrl + Shift + K
Очистить
Ctrl + L
С Firefox 44:
Ctrl + Shift + L
Ctrl + L
Ctrl + L
С Firefox 44:
Ctrl + Shift + L
Интерпретатор командной строки
Эти клавиатурные сокращения работают, пока вы находитесь в Интерпретаторе командной строки.
Команда Windows OS X Linux
Прокрутить в начало вывода в консоль (новое в Firefox 34, и только при пустой командной строке) Home Home Home
Прикрутить в конец вывода в консоль (новое в Firefox 34, и только при пустой командной строке) End End End
Прокрутить вверх вывод консоли Page up Page up Page up
Прокрутить вниз вывод консоли Page down Page down Page down
Переместиться назад по истории команд Up arrow Up arrow Up arrow
Переместиться вперёд по истории команд Down arrow Down arrow Down arrow
Перейти в начало строки Home Ctrl + A Ctrl + A
Перейти в конец строки End Ctrl + E Ctrl + E
Выполнить текущее выражение Enter Enter Enter
Добавить новую строку, чтобы войти в режим ввода многострочного выражения Shift + Enter Shift + Enter Shift + Enter
Всплывающее окно автодополнения
Эти клавиатурные сокращения работают, когда открыто всплывающее окно автодополнения:
Команда Windows OS X Linux
Выбрать текущее предложение в окне автодополнения Tab Tab Tab
Закрыть окно автодополнения Esc Esc Esc
Перейти к предыдущему предложению в окне автодополнения вверх вверх вверх
Перейти к следующему предложению в окне автодополнения вниз вниз вниз
Прокрутить вверх предложения в окне автодополнения Page up Page up Page up
Прокрутить вниз предложения в окне автодополнения Page down Page down Page down
Прокрутить в начало списка (новое в Firefox 34) Home Home Home
Прокрутить в конец списка (новое в Firefox 34) End End End
Global shortcuts
Эти сокращения работают для всех инструментов, находящихся в окне набора инструментов.
Команда Windows OS X Linux
Увеличить размер шрифта Ctrl + + Cmd + + Ctrl + +
Уменьшить размер шрифта Ctrl + - Cmd + - Ctrl + -
Сбросить размер шрифта Ctrl + 0 Cmd + 0 Ctrl + 0
|
{
"url": "https://developer.mozilla.org/ru/docs/Tools/Web_Console",
"source_domain": "developer.mozilla.org",
"snapshot_id": "crawl=CC-MAIN-2019-47",
"warc_metadata": {
"Content-Length": "402668",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:CLTAXKBP7SNZ4JQ6T7EKHZOUEFVBLBU2",
"WARC-Concurrent-To": "<urn:uuid:1099742a-9ddf-4721-a781-2e2a2cddcf2c>",
"WARC-Date": "2019-11-14T05:12:33Z",
"WARC-IP-Address": "99.86.230.42",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:CMWOVL2DSMYKIMGEOKSJHXNE2U3CVJUR",
"WARC-Record-ID": "<urn:uuid:8688a7ee-fe7c-4ed7-866a-9316083e1d0b>",
"WARC-Target-URI": "https://developer.mozilla.org/ru/docs/Tools/Web_Console",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:174a222d-ee1e-4f74-ab18-edfe14ce2ade>"
},
"warc_info": "isPartOf: CC-MAIN-2019-47\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-153.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,
12,
13,
26,
27,
276,
372,
373,
760,
761,
909,
910,
934,
935,
1188,
1189,
1332,
1333,
1435,
1436,
1653,
1759,
1931,
1932,
1954,
1955,
2013,
2014,
2053,
2054,
2104,
2105,
2330,
2351,
2352,
2391,
2392,
2416,
2460,
2509,
2558,
2674,
2748,
2941,
2977,
3249,
3274,
3297,
3298,
3500,
3501,
3581,
3582,
3779,
3780,
3793,
3794,
3839,
3840,
3876,
3946,
3978,
4001,
4076,
4077,
4079,
4080,
4190,
4191,
4490,
4491,
4628,
4629,
4724,
4725,
4729,
4730,
4828,
4829,
4938,
4939,
5093,
5094,
5129,
5130,
5166,
5167,
5220,
5221,
5249,
5250,
5328,
5329,
5346,
5347,
5819,
5820,
6269,
6270,
6485,
6486,
6604,
6605,
6773,
6774,
6824,
6825,
6869,
6870,
7322,
7323,
7645,
7646,
7696,
7734,
7791,
7792,
8075,
8076,
8113,
8114,
8180,
8181,
8532,
8533,
8599,
8600,
8622,
8917,
9237,
9552,
9888,
10137,
10421,
10635,
10858,
11082,
11210,
11211,
11230,
11231,
11384,
11385,
11463,
11464,
11734,
11735,
11949,
11950,
12212,
12213,
12235,
12236,
12237,
12434,
12435,
12634,
12635,
12656,
12657,
12677,
12685,
12686,
12711,
12712,
12739,
12740,
12796,
12797,
12816,
12845,
12847,
12848,
12872,
12883,
12885,
12886,
12900,
12901,
12935,
12944,
12945,
13019,
13020,
13072,
13073,
13133,
13134,
13157,
13202,
13204,
13205,
13233,
13248,
13250,
13251,
13269,
13270,
13296,
13297,
13317,
13324,
13325,
13349,
13350,
13377,
13378,
13402,
13403,
13423,
13430,
13431,
13455,
13456,
13483,
13484,
13505,
13506,
13526,
13534,
13535,
13652,
13653,
13680,
13681,
13687,
13688,
13724,
13725,
13769,
13788,
13815,
13821,
13822,
13845,
13846,
13869,
13870,
13872,
13873,
13956,
13957,
13965,
13966,
13999,
14000,
14007,
14008,
14055,
14056,
14075,
14085,
14086,
14120,
14121,
14143,
14151,
14152,
14165,
14166,
14183,
14184,
14206,
14207,
14364,
14365,
14386,
14387,
14495,
14496,
14567,
14568,
14591,
14592,
14742,
14743,
14892,
14893,
14912,
14913,
14932,
14933,
15022,
15023,
15477,
15478,
15586,
15587,
15608,
15609,
15716,
15717,
15737,
15738,
15820,
15821,
15852,
15853,
15950,
15951,
15966,
15967,
16138,
16139,
16231,
16232,
16252,
16253,
16382,
16383,
16398,
16399,
16509,
16510,
16674,
16675,
16876,
16877,
16939,
16940,
16962,
16963,
17045,
17046,
17061,
17062,
17209,
17210,
17340,
17341,
17358,
17359,
17612,
17613,
17650,
17651,
17698,
17709,
17710,
17763,
17764,
17779,
17780,
17828,
17829,
17876,
17901,
17902,
17983,
17984,
17990,
17991,
18054,
18055,
18071,
18078,
18087,
18114,
18124,
18133,
18201,
18211,
18219,
18220,
18255,
18256,
18272,
18279,
18288,
18315,
18328,
18357,
18386,
18394,
18407,
18417,
18426,
18436,
18444,
18445,
18493,
18494,
18509,
18510,
18574,
18575,
18628,
18629,
18645,
18646,
18773,
18774,
18795,
18796,
19036,
19037,
19073,
19074,
19096,
19340,
19343,
19388,
19391,
19557,
19576,
19724,
19731,
19847,
19856,
19951,
19959,
19991,
20001,
20062,
20071,
20181,
20213,
20236,
20336,
20341,
20342,
20534,
20535,
20632,
20662,
20703,
20704,
20730,
20731,
20738,
21003,
21018,
21190,
21202,
21351,
21352,
21390,
21391,
21442,
21444,
21469,
21575,
21651,
21722,
21846,
21941,
22201,
22345,
22346,
22427,
22428,
22452,
22453,
22578,
22579,
22605,
22606,
22691,
22692,
22699,
22705,
22710,
22718,
22719,
22738,
22739,
22746,
22753,
22762,
22770,
22771,
22799,
22800,
22944,
22945,
22979,
22980,
23018,
23019,
23116,
23117,
23279,
23280,
23298,
23299,
23561,
23562,
23649,
23650,
23942,
23943,
23967,
23968,
23995,
24063,
24122,
24174,
24260,
24269,
24270,
24279,
24280,
24294,
24295,
24312,
24313,
24322,
24323,
24332,
24333,
24347,
24348,
24365,
24366,
24397,
24398,
24490,
24491,
24518,
24629,
24736,
24791,
24851,
24916,
24988,
25035,
25080,
25126,
25242,
25243,
25275,
25276,
25361,
25362,
25389,
25451,
25491,
25565,
25635,
25710,
25790,
25853,
25912,
25913,
25930,
25931,
26018,
26019,
26046,
26096,
26146
],
"line_end_idx": [
12,
13,
26,
27,
276,
372,
373,
760,
761,
909,
910,
934,
935,
1188,
1189,
1332,
1333,
1435,
1436,
1653,
1759,
1931,
1932,
1954,
1955,
2013,
2014,
2053,
2054,
2104,
2105,
2330,
2351,
2352,
2391,
2392,
2416,
2460,
2509,
2558,
2674,
2748,
2941,
2977,
3249,
3274,
3297,
3298,
3500,
3501,
3581,
3582,
3779,
3780,
3793,
3794,
3839,
3840,
3876,
3946,
3978,
4001,
4076,
4077,
4079,
4080,
4190,
4191,
4490,
4491,
4628,
4629,
4724,
4725,
4729,
4730,
4828,
4829,
4938,
4939,
5093,
5094,
5129,
5130,
5166,
5167,
5220,
5221,
5249,
5250,
5328,
5329,
5346,
5347,
5819,
5820,
6269,
6270,
6485,
6486,
6604,
6605,
6773,
6774,
6824,
6825,
6869,
6870,
7322,
7323,
7645,
7646,
7696,
7734,
7791,
7792,
8075,
8076,
8113,
8114,
8180,
8181,
8532,
8533,
8599,
8600,
8622,
8917,
9237,
9552,
9888,
10137,
10421,
10635,
10858,
11082,
11210,
11211,
11230,
11231,
11384,
11385,
11463,
11464,
11734,
11735,
11949,
11950,
12212,
12213,
12235,
12236,
12237,
12434,
12435,
12634,
12635,
12656,
12657,
12677,
12685,
12686,
12711,
12712,
12739,
12740,
12796,
12797,
12816,
12845,
12847,
12848,
12872,
12883,
12885,
12886,
12900,
12901,
12935,
12944,
12945,
13019,
13020,
13072,
13073,
13133,
13134,
13157,
13202,
13204,
13205,
13233,
13248,
13250,
13251,
13269,
13270,
13296,
13297,
13317,
13324,
13325,
13349,
13350,
13377,
13378,
13402,
13403,
13423,
13430,
13431,
13455,
13456,
13483,
13484,
13505,
13506,
13526,
13534,
13535,
13652,
13653,
13680,
13681,
13687,
13688,
13724,
13725,
13769,
13788,
13815,
13821,
13822,
13845,
13846,
13869,
13870,
13872,
13873,
13956,
13957,
13965,
13966,
13999,
14000,
14007,
14008,
14055,
14056,
14075,
14085,
14086,
14120,
14121,
14143,
14151,
14152,
14165,
14166,
14183,
14184,
14206,
14207,
14364,
14365,
14386,
14387,
14495,
14496,
14567,
14568,
14591,
14592,
14742,
14743,
14892,
14893,
14912,
14913,
14932,
14933,
15022,
15023,
15477,
15478,
15586,
15587,
15608,
15609,
15716,
15717,
15737,
15738,
15820,
15821,
15852,
15853,
15950,
15951,
15966,
15967,
16138,
16139,
16231,
16232,
16252,
16253,
16382,
16383,
16398,
16399,
16509,
16510,
16674,
16675,
16876,
16877,
16939,
16940,
16962,
16963,
17045,
17046,
17061,
17062,
17209,
17210,
17340,
17341,
17358,
17359,
17612,
17613,
17650,
17651,
17698,
17709,
17710,
17763,
17764,
17779,
17780,
17828,
17829,
17876,
17901,
17902,
17983,
17984,
17990,
17991,
18054,
18055,
18071,
18078,
18087,
18114,
18124,
18133,
18201,
18211,
18219,
18220,
18255,
18256,
18272,
18279,
18288,
18315,
18328,
18357,
18386,
18394,
18407,
18417,
18426,
18436,
18444,
18445,
18493,
18494,
18509,
18510,
18574,
18575,
18628,
18629,
18645,
18646,
18773,
18774,
18795,
18796,
19036,
19037,
19073,
19074,
19096,
19340,
19343,
19388,
19391,
19557,
19576,
19724,
19731,
19847,
19856,
19951,
19959,
19991,
20001,
20062,
20071,
20181,
20213,
20236,
20336,
20341,
20342,
20534,
20535,
20632,
20662,
20703,
20704,
20730,
20731,
20738,
21003,
21018,
21190,
21202,
21351,
21352,
21390,
21391,
21442,
21444,
21469,
21575,
21651,
21722,
21846,
21941,
22201,
22345,
22346,
22427,
22428,
22452,
22453,
22578,
22579,
22605,
22606,
22691,
22692,
22699,
22705,
22710,
22718,
22719,
22738,
22739,
22746,
22753,
22762,
22770,
22771,
22799,
22800,
22944,
22945,
22979,
22980,
23018,
23019,
23116,
23117,
23279,
23280,
23298,
23299,
23561,
23562,
23649,
23650,
23942,
23943,
23967,
23968,
23995,
24063,
24122,
24174,
24260,
24269,
24270,
24279,
24280,
24294,
24295,
24312,
24313,
24322,
24323,
24332,
24333,
24347,
24348,
24365,
24366,
24397,
24398,
24490,
24491,
24518,
24629,
24736,
24791,
24851,
24916,
24988,
25035,
25080,
25126,
25242,
25243,
25275,
25276,
25361,
25362,
25389,
25451,
25491,
25565,
25635,
25710,
25790,
25853,
25912,
25913,
25930,
25931,
26018,
26019,
26046,
26096,
26146,
26194
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 26194,
"ccnet_original_nlines": 550,
"rps_doc_curly_bracket": 0.0003817699907813221,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1380612701177597,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.023289969190955162,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5853965878486633,
"rps_doc_frac_unique_words": 0.360619455575943,
"rps_doc_mean_word_length": 5.859513282775879,
"rps_doc_num_sentences": 219,
"rps_doc_symbol_to_word_ratio": 0.00041964001138694584,
"rps_doc_unigram_entropy": 6.467925071716309,
"rps_doc_word_count": 3616,
"rps_doc_frac_chars_dupe_10grams": 0.055267129093408585,
"rps_doc_frac_chars_dupe_5grams": 0.13786104321479797,
"rps_doc_frac_chars_dupe_6grams": 0.10992071032524109,
"rps_doc_frac_chars_dupe_7grams": 0.09396827965974808,
"rps_doc_frac_chars_dupe_8grams": 0.08495374768972397,
"rps_doc_frac_chars_dupe_9grams": 0.07093638181686401,
"rps_doc_frac_chars_top_2gram": 0.0047196499072015285,
"rps_doc_frac_chars_top_3gram": 0.006607510149478912,
"rps_doc_frac_chars_top_4gram": 0.003964509814977646,
"rps_doc_books_importance": -2177.5009765625,
"rps_doc_books_importance_length_correction": -2177.5009765625,
"rps_doc_openwebtext_importance": -956.200927734375,
"rps_doc_openwebtext_importance_length_correction": -956.200927734375,
"rps_doc_wikipedia_importance": -608.843017578125,
"rps_doc_wikipedia_importance_length_correction": -608.843017578125
},
"fasttext": {
"dclm": 0.547397255897522,
"english": 0.0035101999528706074,
"fineweb_edu_approx": 2.286358594894409,
"eai_general_math": 0.0007829099777154624,
"eai_open_web_math": 0.2320014238357544,
"eai_web_code": 0.540817141532898
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.4",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "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": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,214,175,865,512,618,500 |
№1 Практическая онлайн-школа обучения языкам программирования Python (Django), JavaScript, Kotlin В. Бовсуновского.
Специальная, подарочная акция получения доступа к Django4!
Как, я, начал код писать в Python? Смотрите, если уперлись и ничего не получается.
25. Связи между моделями.
Смотрите, частая ситуация. У нас есть пользователь и мы хотим посмотреть сколько у него друзей, на кого он подписан и т.д.
То есть стоит вопрос, а как же соединять профиль пользователя с каким-то приложением.
Похожий принцип будет лежать, если мы хотим узнать например, какой пользователь оставил сколько комментариев. Как ни крути на выходе получается так, есть одна модель и есть вторая модель, нам нужно научить модели обмениваться данными вот в этом и будем далее разбираться.
Это понимание даст вам писать сложные вещи и выодить для пользователей любую информацию - это нужно везде, как правило.
В этом уроке я просто наглядно показал в видео, что бы было понятно в чём разбираться то, будем.
-
Перейти к уроку
26. Установим связь между пользователем и записями.
В уроке рассмотрим общую схему, а дальше ещё поработаем в командной строке и все станет на место.
Но в начале давайте напишем метод по этой схеме, так будет понятнее далее.
чтобы установить связь между пользователем и постом,
напишите связанное имя модели в маленьком регистре,
а затем используйте _set.
fields.name_model_relation + _set.metod()
Перейти к уроку
27. Учимся использовать _set для связей между моделями.
Связанный менеджер» — это менеджер, используемый в связях «один ко многим» или «многие ко многим». связанный контекст. Разберём на практике в командной строке.
Перейти к уроку
28. Убираем туман, назовём точную причину, когда же использовать _set.
Посмотрев предыдущие уроки, я уверен, что вы поняли, но все же думаю туман какой-то остался.
Для того, что бы поставить все на свои места, давайте посмотрим на два варианта и сделаем ясный, чёткий вывод, когда используется _set.
Перейти к уроку
29. Поработаем с related_name.
так как мы продолжим писать методы модели, давайте зацепим и related_name(обратная связь). И посмотрим, как связывать пользователя и например following и подсчёт друзей. Сделаем это в командной строке.
В итоге урока Вы будете знать, для себя, что есть два способа связей related_name и _set.
Перейти к уроку
1 2 >
Просмотр всех сообщений c тегом: связи между моделями
|
{
"url": "https://spb-tut.ru/%D1%83%D1%80%D0%BE%D0%BA%D0%B8-django-4/8-%D0%B7%D0%B0%D0%BA%D0%B0%D0%BD%D1%87%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B8%D1%81%D0%B0%D1%82%D1%8C-%D0%B1%D0%BB%D0%BE%D0%B3/tags/sviazi-mezhdu-modeliami/",
"source_domain": "spb-tut.ru",
"snapshot_id": "CC-MAIN-2023-14",
"warc_metadata": {
"Content-Length": "57736",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:WLOW3UKKJRKOQSMW4HY3LFSRXSI2WBYH",
"WARC-Concurrent-To": "<urn:uuid:9c68a383-3672-4e05-8ae5-781694a7dcc3>",
"WARC-Date": "2023-03-25T17:38:08Z",
"WARC-IP-Address": "93.125.18.71",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:WIKHXHYY5EY6DPY6MSHMUQYQHBGJGOYI",
"WARC-Record-ID": "<urn:uuid:cc147130-6481-437b-b7bf-7add23367053>",
"WARC-Target-URI": "https://spb-tut.ru/%D1%83%D1%80%D0%BE%D0%BA%D0%B8-django-4/8-%D0%B7%D0%B0%D0%BA%D0%B0%D0%BD%D1%87%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B8%D1%81%D0%B0%D1%82%D1%8C-%D0%B1%D0%BB%D0%BE%D0%B3/tags/sviazi-mezhdu-modeliami/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:df56e728-11bc-42d2-b462-3a2731631a1c>"
},
"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-195\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
116,
117,
176,
177,
260,
261,
287,
288,
411,
412,
498,
499,
771,
772,
892,
893,
990,
991,
993,
994,
1010,
1011,
1063,
1064,
1162,
1163,
1238,
1239,
1292,
1344,
1370,
1412,
1413,
1429,
1430,
1486,
1487,
1647,
1648,
1664,
1665,
1736,
1737,
1830,
1831,
1967,
1968,
1984,
1985,
2016,
2017,
2219,
2220,
2310,
2311,
2327,
2328,
2334,
2335,
2336
],
"line_end_idx": [
116,
117,
176,
177,
260,
261,
287,
288,
411,
412,
498,
499,
771,
772,
892,
893,
990,
991,
993,
994,
1010,
1011,
1063,
1064,
1162,
1163,
1238,
1239,
1292,
1344,
1370,
1412,
1413,
1429,
1430,
1486,
1487,
1647,
1648,
1664,
1665,
1736,
1737,
1830,
1831,
1967,
1968,
1984,
1985,
2016,
2017,
2219,
2220,
2310,
2311,
2327,
2328,
2334,
2335,
2336,
2389
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2389,
"ccnet_original_nlines": 60,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.004444439895451069,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.013333329930901527,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.9555555582046509,
"rps_doc_frac_unique_words": 0.6207865476608276,
"rps_doc_mean_word_length": 5.446629047393799,
"rps_doc_num_sentences": 38,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.138369560241699,
"rps_doc_word_count": 356,
"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.02320783957839012,
"rps_doc_frac_chars_top_3gram": 0.0361010804772377,
"rps_doc_frac_chars_top_4gram": 0.024755030870437622,
"rps_doc_books_importance": -195.94129943847656,
"rps_doc_books_importance_length_correction": -195.94129943847656,
"rps_doc_openwebtext_importance": -122.00680541992188,
"rps_doc_openwebtext_importance_length_correction": -122.00680541992188,
"rps_doc_wikipedia_importance": -76.1349868774414,
"rps_doc_wikipedia_importance_length_correction": -76.1349868774414
},
"fasttext": {
"dclm": 0.9108547568321228,
"english": 0,
"fineweb_edu_approx": 2.1768100261688232,
"eai_general_math": -0.000009299999874201603,
"eai_open_web_math": 0.23467910289764404,
"eai_web_code": 0.505200982093811
}
}
|
{
"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.74",
"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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,807,163,837,408,729,000 |
is it possible to send oush messages to a group of people (like a multi addres sms?)
0 votes
We would like to send push messages to a group of users all using Zoiper
asked Dec 8, 2015 in General by PAUL STOOP (120 points)
share
Is it "push notifications" that you need or just 1 message to be sent to several SIP users?
I would like to sen 1 message to several users at the same time
1 Answer
0 votes
Hello,
If you want to send 1 message to several contacts from Zoiper - that is not possible.
If you have access to the VoIP server you could do that from it.
answered Dec 9, 2015 by Anton (3,950 points)
share
Welcome!
Ask your questions and receive answers from other members of the Zoiper Community.
Did you check our Help Section?
You are a Zoiper Biz or Premium customer? If so, click HERE to get premium support.
Top users 02/2021
1. Tsetso.Zdravkov
33750 Points
2. Ivan
18410 Points
3. Joachim
11490 Points
4. Anton
3950 Points
Latest tweets
|
{
"url": "https://community.zoiper.com/1237/possible-send-oush-messages-group-people-like-multi-addres",
"source_domain": "community.zoiper.com",
"snapshot_id": "crawl=CC-MAIN-2021-10",
"warc_metadata": {
"Content-Length": "47189",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:Q2TLMTAL4FQIT37A4YS3622PLOL5NLS2",
"WARC-Concurrent-To": "<urn:uuid:879adb17-3c01-43bf-bf41-385f39e34ea2>",
"WARC-Date": "2021-02-26T01:23:24Z",
"WARC-IP-Address": "185.117.83.37",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5N6LKDPBFKLCGEOPUTM4PRNL5WQHBYOZ",
"WARC-Record-ID": "<urn:uuid:8938ae6a-36cd-40c8-a133-41a271012513>",
"WARC-Target-URI": "https://community.zoiper.com/1237/possible-send-oush-messages-group-people-like-multi-addres",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:330b76f4-92e1-44cb-b7b5-3366bb74dea0>"
},
"warc_info": "isPartOf: CC-MAIN-2021-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February/March 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-229.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
85,
86,
94,
95,
168,
169,
227,
233,
234,
326,
327,
391,
392,
401,
402,
410,
411,
418,
419,
505,
506,
571,
572,
619,
625,
634,
717,
718,
750,
751,
835,
853,
874,
875,
892,
893,
903,
904,
921,
922,
935,
936,
953,
954,
965,
966,
982,
983
],
"line_end_idx": [
85,
86,
94,
95,
168,
169,
227,
233,
234,
326,
327,
391,
392,
401,
402,
410,
411,
418,
419,
505,
506,
571,
572,
619,
625,
634,
717,
718,
750,
751,
835,
853,
874,
875,
892,
893,
903,
904,
921,
922,
935,
936,
953,
954,
965,
966,
982,
983,
996
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 996,
"ccnet_original_nlines": 48,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.34761905670166016,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02380952052772045,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24285714328289032,
"rps_doc_frac_unique_words": 0.6033519506454468,
"rps_doc_mean_word_length": 4.128491401672363,
"rps_doc_num_sentences": 15,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.444082260131836,
"rps_doc_word_count": 179,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.04871448129415512,
"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.02435724064707756,
"rps_doc_frac_chars_top_3gram": 0.0405954010784626,
"rps_doc_frac_chars_top_4gram": 0.04330176115036011,
"rps_doc_books_importance": -82.16703796386719,
"rps_doc_books_importance_length_correction": -82.16703796386719,
"rps_doc_openwebtext_importance": -58.438011169433594,
"rps_doc_openwebtext_importance_length_correction": -44.38849639892578,
"rps_doc_wikipedia_importance": -48.83009338378906,
"rps_doc_wikipedia_importance_length_correction": -48.83009338378906
},
"fasttext": {
"dclm": 0.03196603059768677,
"english": 0.9206997156143188,
"fineweb_edu_approx": 1.026226282119751,
"eai_general_math": 0.013997199945151806,
"eai_open_web_math": 0.1652197241783142,
"eai_web_code": 0.00009786999726202339
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.6",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "621.392",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Engineering",
"level_3": "Mechanical engineering and Machinery"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,771,318,542,841,384,000 |
Super User is a question and answer site for computer enthusiasts and power users. 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
Sometimes I have PDF files that have pages shown horizontally. I usually use Google Chrome to open PDF files, and I was wondering is there anyway to "turn" the file by 90 degrees so that I can read it in Google Chrome?
share|improve this question
up vote 13 down vote accepted
As of Chrome 17 you can right-click on the PDF and choose "Rotate clockwise" or "Rotate counterclockwise".
share|improve this answer
Unfortunately, with Chrome, you cant. You can read the article about it here. You will have to open it in another browser, or within Acrobat.
In IE, for example, you can press Ctrl+Shift++ or - to rotate a PDF in the browser.
share|improve this answer
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged .
|
{
"url": "http://superuser.com/questions/327879/how-can-i-rotate-pdf-files-by-90-in-google-chrome",
"source_domain": "superuser.com",
"snapshot_id": "crawl=CC-MAIN-2016-30",
"warc_metadata": {
"Content-Length": "68913",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:XBN62PANY4XDZJUUBYJRQY2NGYNLFIB5",
"WARC-Concurrent-To": "<urn:uuid:72d960b3-3337-4143-9f3c-2cdd3b12e881>",
"WARC-Date": "2016-07-23T11:46:35Z",
"WARC-IP-Address": "151.101.1.69",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:KH6KWBSRVTNQAFOFUYT3GNO62OPGQUKA",
"WARC-Record-ID": "<urn:uuid:09825446-8664-4808-a96a-33c5b52baeaa>",
"WARC-Target-URI": "http://superuser.com/questions/327879/how-can-i-rotate-pdf-files-by-90-in-google-chrome",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:46534640-f280-4259-bc1c-5b913112eebd>"
},
"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,
118,
119,
127,
148,
180,
204,
259,
260,
479,
480,
508,
538,
539,
646,
647,
673,
674,
816,
817,
901,
902,
928,
929,
970,
971
],
"line_end_idx": [
118,
119,
127,
148,
180,
204,
259,
260,
479,
480,
508,
538,
539,
646,
647,
673,
674,
816,
817,
901,
902,
928,
929,
970,
971,
1037
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1037,
"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.39823007583618164,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0398230105638504,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.190265491604805,
"rps_doc_frac_unique_words": 0.5769230723381042,
"rps_doc_mean_word_length": 4.390110015869141,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.400227069854736,
"rps_doc_word_count": 182,
"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.06007508933544159,
"rps_doc_frac_chars_top_3gram": 0.055068839341402054,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -90.77042388916016,
"rps_doc_books_importance_length_correction": -90.77042388916016,
"rps_doc_openwebtext_importance": -50.055538177490234,
"rps_doc_openwebtext_importance_length_correction": -36.828460693359375,
"rps_doc_wikipedia_importance": -35.751708984375,
"rps_doc_wikipedia_importance_length_correction": -35.751708984375
},
"fasttext": {
"dclm": 0.9550521969795227,
"english": 0.9238367080688477,
"fineweb_edu_approx": 2.3163249492645264,
"eai_general_math": 0.0003669300058390945,
"eai_open_web_math": 0.18976068496704102,
"eai_web_code": -0.00000810999972600257
}
}
|
{
"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": "-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": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "2",
"label": "Click Here References"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-5,954,009,297,167,970,000 |
1
0
-1
I have a cascading dropdown list pair that are populated from a prefill XML. When you go into the form and select from the drop downs then continue on it saves the choices and works for the submit. If you save and close the form however it doesn't save the selection on the second drop down box. It just leaves it blank so you have to reselect.
This is also an issue when it moves to the review step, because it doesn't show which choice has been selected and submitted in the previous step.
How do I get the second dropdown to display the select made?
CommentAdd your comment...
|
{
"url": "https://support.avoka.com/kb/questions/43090214/cascading-dropdown-list-not-saving-selection",
"source_domain": "support.avoka.com",
"snapshot_id": "crawl=CC-MAIN-2018-34",
"warc_metadata": {
"Content-Length": "35862",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:AJYCQNSTOGC3DW3WRNMPMY6KT62LRA6S",
"WARC-Concurrent-To": "<urn:uuid:d3580eab-f470-46c1-a35f-1b26175c8216>",
"WARC-Date": "2018-08-17T03:43:05Z",
"WARC-IP-Address": "52.64.24.237",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:63M4BTESKAFMP7VGO2V64J77XP5EXL7P",
"WARC-Record-ID": "<urn:uuid:ad515c93-cbb8-4985-9495-cb5b16e79cf7>",
"WARC-Target-URI": "https://support.avoka.com/kb/questions/43090214/cascading-dropdown-list-not-saving-selection",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:2874e6f4-4535-441f-94de-ddd5d81b9c8c>"
},
"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-180-184-243.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,
2,
4,
6,
9,
10,
355,
356,
503,
504,
565,
566
],
"line_end_idx": [
2,
4,
6,
9,
10,
355,
356,
503,
504,
565,
566,
596
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 596,
"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.47999998927116394,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024000000208616257,
"rps_doc_frac_lines_end_with_ellipsis": 0.0833333283662796,
"rps_doc_frac_no_alph_words": 0.1120000034570694,
"rps_doc_frac_unique_words": 0.6696428656578064,
"rps_doc_mean_word_length": 4.125,
"rps_doc_num_sentences": 7,
"rps_doc_symbol_to_word_ratio": 0.00800000037997961,
"rps_doc_unigram_entropy": 4.09297513961792,
"rps_doc_word_count": 112,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0,
"rps_doc_frac_chars_dupe_6grams": 0,
"rps_doc_frac_chars_dupe_7grams": 0,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.030303029343485832,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -47.60443115234375,
"rps_doc_books_importance_length_correction": -61.52790451049805,
"rps_doc_openwebtext_importance": -34.9018669128418,
"rps_doc_openwebtext_importance_length_correction": -48.825340270996094,
"rps_doc_wikipedia_importance": -19.949174880981445,
"rps_doc_wikipedia_importance_length_correction": -33.872650146484375
},
"fasttext": {
"dclm": 0.5792877674102783,
"english": 0.9487629532814026,
"fineweb_edu_approx": 0.9215677380561829,
"eai_general_math": 0.6507463455200195,
"eai_open_web_math": 0.08915776014328003,
"eai_web_code": 0.8303270936012268
}
}
|
{
"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": "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": "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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "2",
"label": "Partially Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
2,211,076,530,800,200,200 |
ObjectOne > CSS > Футер к низу страницы простой пример
Футер к низу страницы простой пример
Решение проблемы с футером который должен быть всегда внизу страницы. Решение бутстраповское, код можете посмотреть даже в их примерах. Так что и этот замечательный фреймоврк не спасёт вас от внедрения стилей.
Посмотреть пример
А так же ссылка на реализацию от bootstrap
Количество просмотров: 598
| Категория: CSS, HTML, Вёрстка
| Тэги: / / /
zakaz-direct.ru
|
{
"url": "https://objectone.ru/html/futer-k-nizu-stranicy-prostoj-primer/",
"source_domain": "objectone.ru",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "82606",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:R6H3SCIQOD2RLJOKQ4AORJXCC4Z6D7GE",
"WARC-Concurrent-To": "<urn:uuid:b076fa9f-4ef1-487e-bf4c-ab47550893e6>",
"WARC-Date": "2024-09-13T19:00:23Z",
"WARC-IP-Address": "45.130.41.81",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:QVUTOK6XZ7QT32JMPC42KVCVO3JF5GOI",
"WARC-Record-ID": "<urn:uuid:ca17b1ee-7a1c-4cf2-a880-e8e3c2fbf73b>",
"WARC-Target-URI": "https://objectone.ru/html/futer-k-nizu-stranicy-prostoj-primer/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e11134bc-4dec-4a76-8cf5-5ac72a18e8dd>"
},
"warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-217\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
55,
56,
93,
94,
304,
305,
323,
324,
367,
368,
370,
371,
373,
374,
376,
377,
378,
405,
406,
438,
452,
453
],
"line_end_idx": [
55,
56,
93,
94,
304,
305,
323,
324,
367,
368,
370,
371,
373,
374,
376,
377,
378,
405,
406,
438,
452,
453,
468
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 468,
"ccnet_original_nlines": 22,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0476190485060215,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.9047619104385376,
"rps_doc_frac_unique_words": 0.796875,
"rps_doc_mean_word_length": 5.796875,
"rps_doc_num_sentences": 5,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.860940456390381,
"rps_doc_word_count": 64,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.17250673472881317,
"rps_doc_frac_chars_dupe_6grams": 0.17250673472881317,
"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.032345011830329895,
"rps_doc_frac_chars_top_3gram": 0.05390835925936699,
"rps_doc_frac_chars_top_4gram": 0.09703504294157028,
"rps_doc_books_importance": -34.56684875488281,
"rps_doc_books_importance_length_correction": -38.39900207519531,
"rps_doc_openwebtext_importance": -17.251235961914062,
"rps_doc_openwebtext_importance_length_correction": -21.08338737487793,
"rps_doc_wikipedia_importance": -11.4661226272583,
"rps_doc_wikipedia_importance_length_correction": -15.298274040222168
},
"fasttext": {
"dclm": 0.27663731575012207,
"english": 0,
"fineweb_edu_approx": 1.3010386228561401,
"eai_general_math": -0.000009180000233754981,
"eai_open_web_math": 0.06553685665130615,
"eai_web_code": 0.372367799282074
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "-1",
"labels": {
"level_1": "",
"level_2": "",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "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": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,664,789,869,193,213,000 |
Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.
I'm developing a mobile website for iPhone, Android, etc. using jQuery Mobile. I'd like to be able to test this in my desktop browser and was wondering what the best approach is. I guess I could use a plugin to change the User-Agent header to the appropriate value and manually resize the browser to the device's width, but is there a simpler/more reliable way?
Update
Sorry, I should have mentioned that the only hardware available is a Windows laptop
share|improve this question
4 Answers 4
Well if you have a Mac and xCode is installed you can use the Simulator. Open Mobile Safari and point to you web page on all Apple devices
You can also use the Android Emulator ( But I've not tested that it can access the web from the browser )
Alternatively you could use a plugin ( as you have suggested ).
I personally use Chrome with this plugin:
with pretty good results.
I've used Device Anywhere before
you access the device through a web portal/site and control it, but this costs $$$
Actual device testing in going to be the most reliable
related:
share|improve this answer
3
Chrome comes with a UA changer and Device Metric "matcher." In Chrome, open the dev tools (F12) and then click the Preferences icon (a gear at the bottom right), then click on the "User Agent" tab and choose "Override User Agent" and "Override Device Metrics" (by default when you change the UA to something mobile, Chrome should automatically setup the device metrics for that device). I know this is available since Chrome 21 and it may have been offered sooner. – Jasper Sep 14 '12 at 16:49
@Jasper Thanks! that's a gem I'm going to have to start using – Phill Pafford Sep 14 '12 at 17:35
There's also PerfectoMobile for testing on devices remotely...though it can be painfully slow. I'd really recommend at least getting some 'base' testing devices, if possible.
share|improve this answer
Manymo should work very well simulating Android for you. It shows me exactly what my cell phone shows, even though my desktop browsers don't. Manymo is a website with a lot of Android phones pictured. Just click one and enter your URL. There are options such as Android versions and screen sizes.
share|improve this answer
Look for Chrome plugin Responsive Web Design Tester - you'll be able to emulate mobile browser of different device sizes on all platforms.
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/12427736/test-mobile-website-in-desktop-browser?answertab=votes",
"source_domain": "stackoverflow.com",
"snapshot_id": "crawl=CC-MAIN-2015-35",
"warc_metadata": {
"Content-Length": "85656",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BRYC3VSA3XSHIZPL3XDZIIB6JSS34FZ2",
"WARC-Concurrent-To": "<urn:uuid:e9cdde36-e37d-489b-b52a-4c5aca75787a>",
"WARC-Date": "2015-08-28T13:28:11Z",
"WARC-IP-Address": "104.16.103.85",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:CFHKGZFZAAY45Q7OORIZPHE226LCGETN",
"WARC-Record-ID": "<urn:uuid:62e20eca-f816-47fc-9e58-f4164806462d>",
"WARC-Target-URI": "http://stackoverflow.com/questions/12427736/test-mobile-website-in-desktop-browser?answertab=votes",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:67e89e8e-2301-47cf-9b10-22253b958dc5>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-171-96-226.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
25,
131,
132,
494,
495,
502,
503,
587,
588,
616,
617,
629,
630,
769,
770,
876,
877,
941,
942,
984,
985,
1011,
1012,
1045,
1046,
1129,
1130,
1185,
1186,
1195,
1196,
1222,
1226,
1721,
1726,
1825,
1826,
2001,
2002,
2028,
2029,
2326,
2327,
2353,
2354,
2493,
2494,
2520,
2521,
2533,
2534,
2536,
2544,
2545,
2623,
2624
],
"line_end_idx": [
25,
131,
132,
494,
495,
502,
503,
587,
588,
616,
617,
629,
630,
769,
770,
876,
877,
941,
942,
984,
985,
1011,
1012,
1045,
1046,
1129,
1130,
1185,
1186,
1195,
1196,
1222,
1226,
1721,
1726,
1825,
1826,
2001,
2002,
2028,
2029,
2326,
2327,
2353,
2354,
2493,
2494,
2520,
2521,
2533,
2534,
2536,
2544,
2545,
2623,
2624,
2714
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2714,
"ccnet_original_nlines": 56,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4017699062824249,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.02654867060482502,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1787610650062561,
"rps_doc_frac_unique_words": 0.5197368264198303,
"rps_doc_mean_word_length": 4.660087585449219,
"rps_doc_num_sentences": 25,
"rps_doc_symbol_to_word_ratio": 0.0017699099844321609,
"rps_doc_unigram_entropy": 5.0788350105285645,
"rps_doc_word_count": 456,
"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.0376470610499382,
"rps_doc_frac_chars_top_3gram": 0.041411761194467545,
"rps_doc_frac_chars_top_4gram": 0.014117649756371975,
"rps_doc_books_importance": -259.39501953125,
"rps_doc_books_importance_length_correction": -259.39501953125,
"rps_doc_openwebtext_importance": -131.55191040039062,
"rps_doc_openwebtext_importance_length_correction": -131.55191040039062,
"rps_doc_wikipedia_importance": -98.00315856933594,
"rps_doc_wikipedia_importance_length_correction": -98.00315856933594
},
"fasttext": {
"dclm": 0.03191709890961647,
"english": 0.9252012968063354,
"fineweb_edu_approx": 1.301385760307312,
"eai_general_math": 0.00047897998592816293,
"eai_open_web_math": 0.10707145929336548,
"eai_web_code": 0.0003237699856981635
}
}
|
{
"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": "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": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,975,673,954,116,311,000 |
Main MRPT website > C++ reference for MRPT 1.9.9
CSetOfLines.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2 | Mobile Robot Programming Toolkit (MRPT) |
3 | http://www.mrpt.org/ |
4 | |
5 | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6 | See: http://www.mrpt.org/Authors - All rights reserved. |
7 | Released under BSD License. See details in http://www.mrpt.org/License |
8 +------------------------------------------------------------------------+ */
9 #pragma once
10
13
14 namespace mrpt
15 {
16 namespace opengl
17 {
18 /** A set of independent lines (or segments), one line with its own start and
19 * end positions (X,Y,Z).
20 * Optionally, the vertices can be also shown as dots.
21 * \sa opengl::COpenGLScene
22 *
23 * <div align="center">
24 * <table border="0" cellspan="4" cellspacing="4" style="border-width: 1px;
25 * border-style: solid;">
26 * <tr> <td> mrpt::opengl::CSetOfLines </td> <td> \image html
27 * preview_CSetOfLines.png </td> </tr>
28 * </table>
29 * </div>
30 *
31 * \ingroup mrpt_opengl_grp
32 */
34 {
36 protected:
37 std::vector<mrpt::math::TSegment3D> mSegments;
38 float mLineWidth;
40 /** 0: means hidden */
42
43 public:
44 /**
45 * Clear the list of segments
46 */
47 inline void clear()
48 {
49 mSegments.clear();
51 }
52 /**
53 * Sets the width with which lines will be drawn.
54 */
55 inline void setLineWidth(float w)
56 {
57 mLineWidth = w;
59 }
60 /**
61 * Gets the width with which lines are drawn.
62 */
63 float getLineWidth() const { return mLineWidth; }
64 float getVerticesPointSize() const;
65 /** Enable showing vertices as dots if size_points>0 */
66 void setVerticesPointSize(const float size_points);
67 /**
68 * Appends a line to the set.
69 */
70 inline void appendLine(const mrpt::math::TSegment3D& sgm)
71 {
72 mSegments.push_back(sgm);
74 }
75 /**
76 * Appends a line to the set, given the coordinates of its bounds.
77 */
78 inline void appendLine(
79 float x0, float y0, float z0, float x1, float y1, float z1)
80 {
82 mrpt::math::TPoint3D(x0, y0, z0),
83 mrpt::math::TPoint3D(x1, y1, z1)));
85 }
86
87 /** Appends a line whose starting point is the end point of the last line
88 * (similar to OpenGL's GL_LINE_STRIP)
89 * \exception std::exception If there is no previous segment */
90 inline void appendLineStrip(float x, float y, float z)
91 {
92 ASSERT_(!this->empty());
93 this->appendLine(this->rbegin()->point2, mrpt::math::TPoint3D(x, y, z));
94 }
95 //! \overload
96 template <class U>
97 inline void appendLineStrip(const U& point)
98 {
99 ASSERT_(!this->empty());
100 this->appendLine(this->rbegin()->point2, point);
101 }
102
103 /**
104 * Appends any iterable collection of lines to the set. Note that this
105 * includes another CSetOfLines.
106 * \sa appendLine
107 */
108 template <class T>
109 inline void appendLines(const T& sgms)
110 {
111 mSegments.insert(mSegments.end(), sgms.begin(), sgms.end());
113 }
114 /**
115 * Appends certain amount of lines, located between two iterators, into the
116 * set.
117 * \sa appendLine
118 */
119 template <class T_it>
120 inline void appendLines(const T_it& begin, const T_it& end)
121 {
122 mSegments.reserve(mSegments.size() + (end - begin));
123 mSegments.insert(mSegments.end(), begin, end);
125 }
126 /**
127 * Resizes the set.
128 * \sa reserve
129 */
130 void resize(size_t nLines)
131 {
132 mSegments.resize(nLines);
134 }
135 /**
136 * Reserves an amount of lines to the set. This method should be used when
137 * some known amount of lines is going to be inserted, so that only a memory
138 * allocation is needed.
139 * \sa resize
140 */
141 void reserve(size_t r)
142 {
143 mSegments.reserve(r);
145 }
146 /**
147 * Inserts a line, given its bounds. Works with any pair of objects with
148 * access to x, y and z members.
149 */
150 template <class T, class U>
151 inline void appendLine(T p0, U p1)
152 {
153 appendLine(p0.x, p0.y, p0.z, p1.x, p1.y, p1.z);
155 }
156 /** Returns the total count of lines in this set. */
157 inline size_t getLineCount() const { return mSegments.size(); }
158 /** Returns the total count of lines in this set. */
159 inline size_t size() const { return mSegments.size(); }
160 /** Returns true if there are no line segments. */
161 inline bool empty() const { return mSegments.empty(); }
162 /**
163 * Sets a specific line in the set, given its index.
164 * \sa appendLine
165 */
166 void setLineByIndex(size_t index, const mrpt::math::TSegment3D& segm);
167 /**
168 * Sets a specific line in the set, given its index.
169 * \sa appendLine
170 */
171 inline void setLineByIndex(
172 size_t index, double x0, double y0, double z0, double x1, double y1,
173 double z1)
174 {
177 mrpt::math::TPoint3D(x0, y0, z0),
178 mrpt::math::TPoint3D(x1, y1, z1)));
180 }
181 /**
182 * Gets a specific line in the set, given its index.
183 * \sa getLineByIndex
184 */
185 void getLineByIndex(
186 size_t index, double& x0, double& y0, double& z0, double& x1,
187 double& y1, double& z1) const;
188
189 /** Class factory */
190 static CSetOfLines::Ptr Create(
191 const std::vector<mrpt::math::TSegment3D>& sgms,
192 const bool antiAliasing = true);
193
194 /** Render */
195 void render_dl() const override;
196
197 // Iterator management
199 using reverse_iterator =
200 std::vector<mrpt::math::TSegment3D>::reverse_iterator;
202 using const_reverse_iterator =
203 std::vector<mrpt::math::TSegment3D>::const_reverse_iterator;
204 /**
205 * Beginning const iterator.
206 * \sa end,rbegin,rend
207 */
208 inline const_iterator begin() const { return mSegments.begin(); }
209 inline iterator begin()
210 {
212 return mSegments.begin();
213 }
214 /**
215 * Ending const iterator.
216 * \sa begin,rend,rbegin
217 */
218 inline const_iterator end() const { return mSegments.end(); }
219 inline iterator end()
220 {
222 return mSegments.end();
223 }
224 /**
225 * Beginning const reverse iterator (actually, accesses the end of the
226 * set).
227 * \sa rend,begin,end
228 */
229 inline const_reverse_iterator rbegin() const { return mSegments.rbegin(); }
230 /**
231 * Ending const reverse iterator (actually, refers to the starting point of
232 * the set).
233 * \sa rbegin,end,begin
234 */
235 inline const_reverse_iterator rend() const { return mSegments.rend(); }
236 /** Evaluates the bounding box of this object (including possible children)
237 * in the coordinate frame of the object parent. */
238 void getBoundingBox(
239 mrpt::math::TPoint3D& bb_min,
240 mrpt::math::TPoint3D& bb_max) const override;
241
242 void enableAntiAliasing(bool enable = true)
243 {
244 m_antiAliasing = enable;
246 }
247 bool isAntiAliasingEnabled() const { return m_antiAliasing; }
248 /** Constructor */
249 CSetOfLines();
250 /** Constructor with a initial set of lines. */
251 CSetOfLines(
252 const std::vector<mrpt::math::TSegment3D>& sgms,
253 bool antiAliasing = true);
254 /** Private, virtual destructor: only can be deleted from smart pointers. */
255 virtual ~CSetOfLines() {}
256 };
257 /** Inserts a set of segments into the list. Allows call chaining.
258 * \sa mrpt::opengl::CSetOfLines::appendLines
259 */
260 template <class T>
262 {
263 l->appendLines(s.begin(), s.end());
264 return l;
265 }
266 /** Inserts a segment into the list. Allows call chaining.
267 * \sa mrpt::opengl::CSetOfLines::appendLine(const TSegment &)
268 */
269 template <>
272 {
273 l->appendLine(s);
274 return l;
275 }
276 } // namespace opengl
277 } // namespace mrpt
size_t size() const
Returns the total count of lines in this set.
Definition: CSetOfLines.h:159
std::vector< mrpt::math::TSegment3D > mSegments
Definition: CSetOfLines.h:37
void enableAntiAliasing(bool enable=true)
Definition: CSetOfLines.h:242
Scalar * iterator
Definition: eigen_plugins.h:26
void setLineByIndex(size_t index, double x0, double y0, double z0, double x1, double y1, double z1)
Sets a specific line in the set, given its index.
Definition: CSetOfLines.h:171
GLdouble GLdouble z
Definition: glext.h:3872
void appendLines(const T &sgms)
Appends any iterable collection of lines to the set.
Definition: CSetOfLines.h:109
void appendLineStrip(float x, float y, float z)
Appends a line whose starting point is the end point of the last line (similar to OpenGL's GL_LINE_ST...
Definition: CSetOfLines.h:90
const_iterator begin() const
Beginning const iterator.
Definition: CSetOfLines.h:208
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const mrpt::opengl::CLight &o)
Definition: CLight.cpp:130
size_t getLineCount() const
Returns the total count of lines in this set.
Definition: CSetOfLines.h:157
void getLineByIndex(size_t index, double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) const
Gets a specific line in the set, given its index.
const_iterator end() const
Ending const iterator.
Definition: CSetOfLines.h:218
void setLineWidth(float w)
Sets the width with which lines will be drawn.
Definition: CSetOfLines.h:55
void resize(size_t nLines)
Resizes the set.
Definition: CSetOfLines.h:130
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
float m_verticesPointSize
0: means hidden
Definition: CSetOfLines.h:41
std::vector< mrpt::math::TSegment3D >::const_reverse_iterator const_reverse_iterator
Definition: CSetOfLines.h:203
GLdouble s
Definition: glext.h:3676
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:4178
A renderizable object suitable for rendering with OpenGL's display lists.
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
std::vector< mrpt::math::TSegment3D >::iterator iterator
Definition: CSetOfLines.h:198
float getLineWidth() const
Gets the width with which lines are drawn.
Definition: CSetOfLines.h:63
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line to the set.
Definition: CSetOfLines.h:70
float getVerticesPointSize() const
Definition: CSetOfLines.cpp:56
3D segment, consisting of two points.
GLuint index
Definition: glext.h:4054
GLuint GLuint end
Definition: glext.h:3528
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
void reserve(size_t r)
Reserves an amount of lines to the set.
Definition: CSetOfLines.h:141
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
Definition: CSetOfLines.cpp:57
void clear()
Clear the list of segments.
Definition: CSetOfLines.h:47
virtual ~CSetOfLines()
Private, virtual destructor: only can be deleted from smart pointers.
Definition: CSetOfLines.h:255
void render_dl() const override
Render.
Definition: CSetOfLines.cpp:66
const_reverse_iterator rbegin() const
Beginning const reverse iterator (actually, accesses the end of the set).
Definition: CSetOfLines.h:229
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CSetOfLines()
Constructor.
Definition: CSetOfLines.cpp:26
std::vector< mrpt::math::TSegment3D >::reverse_iterator reverse_iterator
Definition: CSetOfLines.h:200
GLdouble GLdouble GLdouble r
Definition: glext.h:3705
const_reverse_iterator rend() const
Ending const reverse iterator (actually, refers to the starting point of the set).
Definition: CSetOfLines.h:235
std::vector< mrpt::math::TSegment3D >::const_iterator const_iterator
Definition: CSetOfLines.h:201
GLenum GLint GLint y
Definition: glext.h:3538
bool isAntiAliasingEnabled() const
Definition: CSetOfLines.h:247
void appendLine(T p0, U p1)
Inserts a line, given its bounds.
Definition: CSetOfLines.h:151
GLenum GLint x
Definition: glext.h:3538
Lightweight 3D point.
bool empty() const
Returns true if there are no line segments.
Definition: CSetOfLines.h:161
A set of independent lines (or segments), one line with its own start and end positions (X...
Definition: CSetOfLines.h:33
void appendLines(const T_it &begin, const T_it &end)
Appends certain amount of lines, located between two iterators, into the set.
Definition: CSetOfLines.h:120
const Scalar * const_iterator
Definition: eigen_plugins.h:27
static Ptr Create(Args &&... args)
Definition: CSetOfLines.h:35
void appendLine(float x0, float y0, float z0, float x1, float y1, float z1)
Appends a line to the set, given the coordinates of its bounds.
Definition: CSetOfLines.h:78
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.
Definition: CSetOfLines.cpp:46
void appendLineStrip(const U &point)
Definition: CSetOfLines.h:97
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019
|
{
"url": "https://docs.mrpt.org/reference/no_more_table/_c_set_of_lines_8h_source.html",
"source_domain": "docs.mrpt.org",
"snapshot_id": "crawl=CC-MAIN-2022-05",
"warc_metadata": {
"Content-Length": "91512",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MPWHHG33YEJWZZ2T4ULYS6OYL2DVBVIP",
"WARC-Concurrent-To": "<urn:uuid:243675df-562d-412e-9ade-451848db7d6a>",
"WARC-Date": "2022-01-16T19:39:49Z",
"WARC-IP-Address": "150.214.150.101",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DR7SHXXH6LUOXXZ27K434NPEQMTCDI3O",
"WARC-Record-ID": "<urn:uuid:8149acaa-5a0e-4204-9175-3f6cb858dfb1>",
"WARC-Target-URI": "https://docs.mrpt.org/reference/no_more_table/_c_set_of_lines_8h_source.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7156b6ac-d5f0-4162-80e9-ad6f299eca94>"
},
"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-243\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,
49,
63,
101,
181,
228,
256,
263,
337,
400,
478,
559,
574,
578,
582,
600,
605,
625,
630,
711,
740,
798,
829,
835,
862,
941,
970,
1035,
1077,
1092,
1105,
1111,
1142,
1149,
1154,
1169,
1220,
1242,
1269,
1273,
1285,
1293,
1326,
1333,
1357,
1363,
1386,
1392,
1400,
1453,
1460,
1498,
1504,
1524,
1530,
1538,
1587,
1594,
1648,
1688,
1748,
1804,
1812,
1845,
1852,
1914,
1920,
1950,
1956,
1964,
2034,
2041,
2069,
2133,
2139,
2177,
2217,
2223,
2227,
2305,
2347,
2414,
2473,
2479,
2508,
2585,
2591,
2609,
2632,
2680,
2686,
2715,
2769,
2776,
2781,
2790,
2865,
2902,
2924,
2932,
2956,
3000,
3007,
3073,
3080,
3089,
3169,
3181,
3203,
3211,
3238,
3303,
3310,
3368,
3420,
3427,
3436,
3460,
3479,
3487,
3519,
3526,
3557,
3564,
3573,
3652,
3733,
3762,
3780,
3788,
3816,
3823,
3850,
3857,
3866,
3943,
3980,
3988,
4021,
4061,
4068,
4121,
4128,
4186,
4255,
4313,
4374,
4430,
4491,
4500,
4557,
4579,
4587,
4663,
4672,
4729,
4751,
4759,
4792,
4866,
4882,
4889,
4928,
4969,
4976,
4985,
5042,
5068,
5076,
5102,
5169,
5205,
5210,
5236,
5273,
5327,
5365,
5370,
5389,
5427,
5432,
5460,
5490,
5550,
5586,
5652,
5661,
5694,
5721,
5729,
5800,
5829,
5836,
5867,
5874,
5883,
5913,
5942,
5950,
6017,
6044,
6051,
6080,
6087,
6096,
6171,
6184,
6210,
6218,
6299,
6308,
6388,
6405,
6433,
6441,
6518,
6599,
6655,
6681,
6716,
6767,
6772,
6821,
6828,
6858,
6865,
6932,
6956,
6976,
7029,
7047,
7101,
7133,
7215,
7246,
7253,
7324,
7374,
7382,
7405,
7411,
7452,
7467,
7473,
7536,
7603,
7611,
7627,
7633,
7656,
7671,
7677,
7703,
7727,
7747,
7793,
7823,
7871,
7900,
7942,
7972,
7990,
8021,
8121,
8171,
8201,
8221,
8246,
8278,
8331,
8361,
8409,
8518,
8547,
8576,
8602,
8632,
8742,
8769,
8797,
8843,
8873,
8985,
9035,
9062,
9085,
9115,
9142,
9189,
9218,
9245,
9262,
9292,
9338,
9434,
9460,
9476,
9505,
9590,
9620,
9631,
9656,
9690,
9715,
9793,
9812,
9844,
9873,
9930,
9960,
9987,
10030,
10059,
10110,
10137,
10166,
10201,
10232,
10270,
10283,
10308,
10326,
10351,
10446,
10551,
10574,
10614,
10644,
10695,
10745,
10776,
10789,
10817,
10846,
10869,
10939,
10969,
11001,
11009,
11040,
11078,
11152,
11182,
11270,
11310,
11415,
11429,
11442,
11473,
11546,
11576,
11605,
11630,
11666,
11749,
11779,
11848,
11878,
11899,
11924,
11959,
11989,
12017,
12051,
12081,
12096,
12121,
12143,
12162,
12206,
12236,
12330,
12359,
12412,
12490,
12520,
12550,
12581,
12616,
12645,
12721,
12785,
12814,
12884,
12934,
12965,
13002,
13031,
13032,
13033,
13034
],
"line_end_idx": [
49,
63,
101,
181,
228,
256,
263,
337,
400,
478,
559,
574,
578,
582,
600,
605,
625,
630,
711,
740,
798,
829,
835,
862,
941,
970,
1035,
1077,
1092,
1105,
1111,
1142,
1149,
1154,
1169,
1220,
1242,
1269,
1273,
1285,
1293,
1326,
1333,
1357,
1363,
1386,
1392,
1400,
1453,
1460,
1498,
1504,
1524,
1530,
1538,
1587,
1594,
1648,
1688,
1748,
1804,
1812,
1845,
1852,
1914,
1920,
1950,
1956,
1964,
2034,
2041,
2069,
2133,
2139,
2177,
2217,
2223,
2227,
2305,
2347,
2414,
2473,
2479,
2508,
2585,
2591,
2609,
2632,
2680,
2686,
2715,
2769,
2776,
2781,
2790,
2865,
2902,
2924,
2932,
2956,
3000,
3007,
3073,
3080,
3089,
3169,
3181,
3203,
3211,
3238,
3303,
3310,
3368,
3420,
3427,
3436,
3460,
3479,
3487,
3519,
3526,
3557,
3564,
3573,
3652,
3733,
3762,
3780,
3788,
3816,
3823,
3850,
3857,
3866,
3943,
3980,
3988,
4021,
4061,
4068,
4121,
4128,
4186,
4255,
4313,
4374,
4430,
4491,
4500,
4557,
4579,
4587,
4663,
4672,
4729,
4751,
4759,
4792,
4866,
4882,
4889,
4928,
4969,
4976,
4985,
5042,
5068,
5076,
5102,
5169,
5205,
5210,
5236,
5273,
5327,
5365,
5370,
5389,
5427,
5432,
5460,
5490,
5550,
5586,
5652,
5661,
5694,
5721,
5729,
5800,
5829,
5836,
5867,
5874,
5883,
5913,
5942,
5950,
6017,
6044,
6051,
6080,
6087,
6096,
6171,
6184,
6210,
6218,
6299,
6308,
6388,
6405,
6433,
6441,
6518,
6599,
6655,
6681,
6716,
6767,
6772,
6821,
6828,
6858,
6865,
6932,
6956,
6976,
7029,
7047,
7101,
7133,
7215,
7246,
7253,
7324,
7374,
7382,
7405,
7411,
7452,
7467,
7473,
7536,
7603,
7611,
7627,
7633,
7656,
7671,
7677,
7703,
7727,
7747,
7793,
7823,
7871,
7900,
7942,
7972,
7990,
8021,
8121,
8171,
8201,
8221,
8246,
8278,
8331,
8361,
8409,
8518,
8547,
8576,
8602,
8632,
8742,
8769,
8797,
8843,
8873,
8985,
9035,
9062,
9085,
9115,
9142,
9189,
9218,
9245,
9262,
9292,
9338,
9434,
9460,
9476,
9505,
9590,
9620,
9631,
9656,
9690,
9715,
9793,
9812,
9844,
9873,
9930,
9960,
9987,
10030,
10059,
10110,
10137,
10166,
10201,
10232,
10270,
10283,
10308,
10326,
10351,
10446,
10551,
10574,
10614,
10644,
10695,
10745,
10776,
10789,
10817,
10846,
10869,
10939,
10969,
11001,
11009,
11040,
11078,
11152,
11182,
11270,
11310,
11415,
11429,
11442,
11473,
11546,
11576,
11605,
11630,
11666,
11749,
11779,
11848,
11878,
11899,
11924,
11959,
11989,
12017,
12051,
12081,
12096,
12121,
12143,
12162,
12206,
12236,
12330,
12359,
12412,
12490,
12520,
12550,
12581,
12616,
12645,
12721,
12785,
12814,
12884,
12934,
12965,
13002,
13031,
13032,
13033,
13034,
13158
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 13158,
"ccnet_original_nlines": 390,
"rps_doc_curly_bracket": 0.004559960216283798,
"rps_doc_ldnoobw_words": 5,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.13041993975639343,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.012973709963262081,
"rps_doc_frac_lines_end_with_ellipsis": 0.012787720188498497,
"rps_doc_frac_no_alph_words": 0.4537384808063507,
"rps_doc_frac_unique_words": 0.42069393396377563,
"rps_doc_mean_word_length": 5.900248050689697,
"rps_doc_num_sentences": 164,
"rps_doc_symbol_to_word_ratio": 0.0037555499002337456,
"rps_doc_unigram_entropy": 5.831036567687988,
"rps_doc_word_count": 1614,
"rps_doc_frac_chars_dupe_10grams": 0.16108368337154388,
"rps_doc_frac_chars_dupe_5grams": 0.2833140790462494,
"rps_doc_frac_chars_dupe_6grams": 0.26021212339401245,
"rps_doc_frac_chars_dupe_7grams": 0.23080961406230927,
"rps_doc_frac_chars_dupe_8grams": 0.2064475566148758,
"rps_doc_frac_chars_dupe_9grams": 0.18544575572013855,
"rps_doc_frac_chars_top_2gram": 0.01260107010602951,
"rps_doc_frac_chars_top_3gram": 0.006720569916069508,
"rps_doc_frac_chars_top_4gram": 0.009450799785554409,
"rps_doc_books_importance": -1217.090087890625,
"rps_doc_books_importance_length_correction": -1217.090087890625,
"rps_doc_openwebtext_importance": -884.5435180664062,
"rps_doc_openwebtext_importance_length_correction": -884.5435180664062,
"rps_doc_wikipedia_importance": -507.9493408203125,
"rps_doc_wikipedia_importance_length_correction": -507.9493408203125
},
"fasttext": {
"dclm": 0.7964156270027161,
"english": 0.30623623728752136,
"fineweb_edu_approx": 1.837315559387207,
"eai_general_math": 0.838000476360321,
"eai_open_web_math": 0.4682132601737976,
"eai_web_code": 0.2518404722213745
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.035",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "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": "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": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
333,711,727,946,848,640 |
Next: , Previous: , Up: mpg-bpr [Contents][Index]
11.3.55 current_predicate/[1,2] ISO
Synopsis
current_predicate(?PredSpec)
Unifies PredSpec with a predicate specifications of the form Name/Arity.
current_predicate(?Name, ?Term)
Unifies Name with the name of a user-defined predicate, and Term with the most general term corresponding to that predicate.
Arguments
:PredSpec
pred_spec
Name
atom
:Term
callable
Description
If you have loaded the predicates foo/1 and foo/3 into Prolog, then current_predicate/2 would return the following:
| ?- current_predicate(foo, T).
T = foo(_A) ;
T = foo(_A,_B,_C) ;
no
Examples
To find out whether a predicate is built-in, use predicate_property/2.
% Is there a callable predicate named gc?
| ?- current_predicate(gc, Term).
no
| ?- predicate_property(gc, Prop)
Prop = built_in
Exceptions
instantiation_error
type_error
in PredSpec
Comments
current_predicate/1 is part of the ISO Prolog standard; current_predicate/2 is not.
See Also
predicate_property/2, ref-lps-ove.
Send feedback on this subject.
|
{
"url": "https://sicstus.sics.se/sicstus/docs/4.7.0/html/sicstus/mpg_002dref_002dcurrent_005fpredicate.html",
"source_domain": "sicstus.sics.se",
"snapshot_id": "crawl=CC-MAIN-2021-49",
"warc_metadata": {
"Content-Length": "6613",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:J6GZQSJ5MXTIHVEKDBIXYDOC5KQC677P",
"WARC-Concurrent-To": "<urn:uuid:534d9807-92fe-43fc-8b73-bcc425cce6f6>",
"WARC-Date": "2021-11-29T08:59:09Z",
"WARC-IP-Address": "193.10.64.8",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:M7LCGTU3WBVM7HBKEJNX4QAIL6RE3W7U",
"WARC-Record-ID": "<urn:uuid:38eeb1a0-d18a-4c35-a656-edda383af358>",
"WARC-Target-URI": "https://sicstus.sics.se/sicstus/docs/4.7.0/html/sicstus/mpg_002dref_002dcurrent_005fpredicate.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:c57c6bbc-c9d4-4a56-ba91-7aa2929cb0ee>"
},
"warc_info": "isPartOf: CC-MAIN-2021-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-67\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,
52,
53,
54,
92,
93,
102,
103,
132,
133,
206,
207,
239,
240,
365,
366,
376,
377,
387,
388,
398,
399,
404,
405,
410,
411,
417,
418,
427,
428,
440,
441,
557,
558,
591,
592,
606,
607,
627,
628,
631,
632,
641,
642,
713,
714,
756,
757,
791,
792,
795,
829,
830,
846,
847,
858,
859,
879,
890,
891,
903,
904,
913,
914,
998,
999,
1008,
1009,
1044,
1045,
1046
],
"line_end_idx": [
52,
53,
54,
92,
93,
102,
103,
132,
133,
206,
207,
239,
240,
365,
366,
376,
377,
387,
388,
398,
399,
404,
405,
410,
411,
417,
418,
427,
428,
440,
441,
557,
558,
591,
592,
606,
607,
627,
628,
631,
632,
641,
642,
713,
714,
756,
757,
791,
792,
795,
829,
830,
846,
847,
858,
859,
879,
890,
891,
903,
904,
913,
914,
998,
999,
1008,
1009,
1044,
1045,
1046,
1076
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1076,
"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.190265491604805,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0398230105638504,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.38053098320961,
"rps_doc_frac_unique_words": 0.671999990940094,
"rps_doc_mean_word_length": 6.368000030517578,
"rps_doc_num_sentences": 16,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.25300931930542,
"rps_doc_word_count": 125,
"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.02512563019990921,
"rps_doc_frac_chars_top_3gram": 0,
"rps_doc_frac_chars_top_4gram": 0,
"rps_doc_books_importance": -97.54256439208984,
"rps_doc_books_importance_length_correction": -97.54256439208984,
"rps_doc_openwebtext_importance": -54.710166931152344,
"rps_doc_openwebtext_importance_length_correction": -43.770355224609375,
"rps_doc_wikipedia_importance": -51.29046630859375,
"rps_doc_wikipedia_importance_length_correction": -51.29046630859375
},
"fasttext": {
"dclm": 0.5250988006591797,
"english": 0.6768203377723694,
"fineweb_edu_approx": 1.9864989519119263,
"eai_general_math": 0.07144802808761597,
"eai_open_web_math": 0.6780807971954346,
"eai_web_code": 0.5002920031547546
}
}
|
{
"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": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,078,493,967,078,630,000 |
PHP – Form Introduction
By | October 2, 2021
PHP Form Introduction
You can store, update, or even delete data from the database with the help of dynamic website forms. These forms are provided with some fields which can be filled by the user to perform the action required. You can directly play with the data of the database.
Example of creating the form
Vamware
<html>
<head>
<title>PHP First Form</title>
</head>
<body>
<?php
// defining variables and seting them to empty values
$name = $email = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = test_input($_POST["name"]);
$email = test_input($_POST["email"]);
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<h2>Classes Registration</h2>
<form method = "post" action = "/php/php_form_introduction.htm">
<table>
<tr>
<td>Name:</td>
<td><input type = "text" name = "name"></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type = "text" name = "email"></td>
</tr>
<tr>
<td>
<input type = "submit" name = "submit" value = "Submit">
</td>
</tr>
</table>
</form>
<?php
echo "<h2>Your details are:</h2>";
echo $name;
echo "<br>";
echo $email;
echo "<br>";
?>
</body>
</html>
Output
Classes Registration
People are also reading:
Leave a Reply
Your email address will not be published. Required fields are marked *
|
{
"url": "https://www.techgeekbuzz.com/php-form-introduction/",
"source_domain": "www.techgeekbuzz.com",
"snapshot_id": "crawl=CC-MAIN-2021-49",
"warc_metadata": {
"Content-Length": "49229",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:MSKZRVMKD7K4DJI46OBOTN25XP2IACRH",
"WARC-Concurrent-To": "<urn:uuid:939bda27-459b-4335-a8c7-e1962605012a>",
"WARC-Date": "2021-12-03T00:24:38Z",
"WARC-IP-Address": "160.153.138.105",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PKXI5VSZK4OMUCXXLYTHPIYA2CCRWNTZ",
"WARC-Record-ID": "<urn:uuid:55a5fbef-3cff-4d36-8293-b79c0d1bfb5b>",
"WARC-Target-URI": "https://www.techgeekbuzz.com/php-form-introduction/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:5156161a-511b-44e0-ad83-ebc031fe8e35>"
},
"warc_info": "isPartOf: CC-MAIN-2021-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-99\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,
24,
25,
46,
68,
69,
329,
330,
359,
360,
368,
375,
385,
421,
435,
445,
466,
529,
568,
621,
669,
719,
721,
750,
783,
824,
869,
895,
906,
918,
960,
1031,
1048,
1065,
1096,
1156,
1174,
1191,
1223,
1284,
1313,
1318,
1338,
1414,
1435,
1453,
1471,
1485,
1491,
1535,
1556,
1587,
1609,
1630,
1633,
1644,
1652,
1653,
1660,
1661,
1682,
1683,
1708,
1709,
1723,
1724
],
"line_end_idx": [
24,
25,
46,
68,
69,
329,
330,
359,
360,
368,
375,
385,
421,
435,
445,
466,
529,
568,
621,
669,
719,
721,
750,
783,
824,
869,
895,
906,
918,
960,
1031,
1048,
1065,
1096,
1156,
1174,
1191,
1223,
1284,
1313,
1318,
1338,
1414,
1435,
1453,
1471,
1485,
1491,
1535,
1556,
1587,
1609,
1630,
1633,
1644,
1652,
1653,
1660,
1661,
1682,
1683,
1708,
1709,
1723,
1724,
1794
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1794,
"ccnet_original_nlines": 65,
"rps_doc_curly_bracket": 0.0022296500392258167,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.13276836276054382,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.025423729792237282,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.44915252923965454,
"rps_doc_frac_unique_words": 0.6162790656089783,
"rps_doc_mean_word_length": 5.337209224700928,
"rps_doc_num_sentences": 10,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.454631805419922,
"rps_doc_word_count": 172,
"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.03485839068889618,
"rps_doc_frac_chars_top_3gram": 0.03267974033951759,
"rps_doc_frac_chars_top_4gram": 0.04139434173703194,
"rps_doc_books_importance": -159.26873779296875,
"rps_doc_books_importance_length_correction": -154.04751586914062,
"rps_doc_openwebtext_importance": -108.56660461425781,
"rps_doc_openwebtext_importance_length_correction": -108.56660461425781,
"rps_doc_wikipedia_importance": -80.67056274414062,
"rps_doc_wikipedia_importance_length_correction": -80.13001251220703
},
"fasttext": {
"dclm": 0.501122236251831,
"english": 0.6771420240402222,
"fineweb_edu_approx": 3.4306139945983887,
"eai_general_math": 0.00003088000084972009,
"eai_open_web_math": 0.04722326993942261,
"eai_web_code": 0.00016361000598408282
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1332",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "1",
"label": "Leftover HTML"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
1,097,683,559,676,688,500 |
Difference between revisions of "RPi Wheezy raspi-config 2012-06-18"
From eLinux.org
Jump to: navigation, search
m (EXPAND-ROOTFS - Expand Root Partition to Fill SD Card)
(Redirect to newer page)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
raspi-config was introduced with the advent of the Debian Wheezy image. It helps you configure your Pi. It is a work in progress so the number of menu items and the ease of use of those items will increase with time. If anyone feels willing and able to improve raspi-config then please contact Alex Bradbury [https://github.com/asb/raspi-config].
+
#REDIRECT [[RPi raspi-config]]
+
== The raspi-config ==
+
+
When you start your Pi for the first time using the Wheezy image then, following lots of scrolling text with a couple of pauses lasting in total a few tens of seconds, you will be automatically logged in as pi with the password raspberry and the raspi-config menu will appear. It has the following entries:
+
+
info Information about this tool
+
expand-rootfs Expand root partition to fill SD card
+
overscan Change overscan
+
configure-keyboard Set keyboard layout
+
change_pass Change password for ‘pi’ user
+
change_locale Set locale
+
change_timezone Set timezone
+
memory_split Change memory split
+
ssh Enable or disable ssh server
+
finish Finish config and don’t start raspi-config at boot
+
<Ok> <Exit>
+
+
== Moving Around the Menu ==
+
+
At any point from within any of the menu or sub-menu options the Tab key will toggle about the selected entry and the options at the bottom inside angle brackets, cursor keys move up and down menus. There is an exception to this and that’s with the change_locale option, ignore that exception for now it’s covered later.
+
+
Some of the menu entries take quite a while to display. The user experience looks like its running a desktop but in fact it isn't; its using the command line and its graphics capabilities (remember VDU's) so occasionally the screen will scroll a bit.
+
+
+
== What raspi-config does ==
+
+
Some menu entries modify the file /boot/config.txt. This file, out of the box, contains a number of commented out configuration entries; raspi-config adds entries at the end of this file. You can see what raspi-config has done to the file by viewing it on the Pi using Leafpad and, if you really mess things up you can edit the file from the SD card using Notepad on a Windows PC. More information on editing config.txt here [[R-Pi_ConfigurationFile]]
+
+
Other entries modify Linux configuration files, some take effect immediately, others at the next boot.
+
+
+
== INFO - Information About This Tool ==
+
+
This would be really helpful if it actually explained the options in the menu, hopefully at least it will provide a reference to this Wiki page.
+
+
It helpfully advises you may have difficulties if you have heavily customized your installation but as this is probably the first thing a rookie is going to see the likelihood of a heavily customized installation is small.
+
+
raspi-config appears automatically at first boot. You can run it at any time after that by typing sudo raspi-config (case sensitive) at the command line or in a terminal window. The sudo (do as superuser) is necessary because you will be changing files that you as user pi do not own, its Debian's way of providing a root login.
+
+
The lovely thing about the Pi is that, if you mess up, it will not be difficult to re-image; killing the install may require a re-image (check this).
+
+
+
== EXPAND-ROOTFS - Expand Root Partition to Fill SD Card ==
+
When you image an SD card the image has to fit on cards as small as 2GB so once it has been done you need to expand this reduced image to make use of whatever space remains unallocated on your SD Card.
+
+
This option in the raspi-config script menu does this for you you need to reboot after but the reboot can wait till you finish the other things on the menu
+
+
EXPAND-ROOTFS does what it says on the tin so if you have installed Wheezy on a 4GB or greater card use this option and AFTER REBOOT it will use all of the SD card. The Wheezy image takes nearly 2GB so if you are going to install additional software or large files its worth doing, however you don't need to do it on first boot. The downside of using all of a larger card is that it takes much longer to backup the image.
+
+
== OVERSCAN - Change Overscan ==
+
+
What would you like to do with overscan
+
<Disable> <Enable>
+
+
Any changes will take effect after a reboot. If you change a setting and end up losing the left side of the screen you can easily edit /boot/config.txt on a PC to undo the changes.
+
+
Televisions do not usually display the whole of the picture, they Overscan and crop off a few percent of the image. This is to hide the data signals such as teletext which use the outer lines of the picture (could be a hangover from analogue TV). Computers, including the Pi, use all the lines for real display so often the image displayed by computers on TV's is cropped.
+
+
To avoid losing the critical left column at first boot the clever Pi people have deliberately enabled Overscan and used positive Overscan vlauses to make the displayed image smaller, and to play safe much smaller. This means, depending on your monitor/TV, there may be black borders around the picture. LXDE will show the wrong resolution in its display information as it shows you the size of the framebuffer (display size-overscan), and the display may be a bit fuzzy.
+
+
On some displays, particularly monitors, just disabling Overscan will make the picture fill the whole screen and correct the resolution. For other displays it may be necessary to leave overscan enabled and fiddle with Overscan values, more information here [[R-Pi_Troubleshooting#Big_black_borders_around_small_image_on_HD_monitors]].
+
+
== CONFIGURE-KEYBOARD - Set keyboard layout ==
+
+
Slow to display and, if you select some of the non-default options, there will be a short delay while changes are made. Changes take effect immeadiately except for changes to X-server exit which require a reboot.
+
+
This menu for using different attached keyboards. Brands of keyboards are chosen first followed by other choices to set up nationality of keyboards etc.
+
+
Default is Generic 105-key (Intl) PC. If you cannot find your keyboard on the list then use one of the generic keyboards but it’s probably not a big deal if you can't find yours on the list, have fun remember you can always, change it later or re-image if you're really stuck.
+
+
The next screen regards keyboard layout. If you are not using the first choice of English UK select Other and you will be faced with a long list of other national keyboards. Funnily enough this list includes English UK.
+
+
Next screen is quite well documented on the screen you're probably going to run with one of the top two choices. These are:
+
+
The default for the keyboard layout
+
Or
+
No AltGr key
+
+
To be honest if this is your first setup and you get this wrong it’s not going to break the bank and as I keep saying if in doubt re-image and start again.
+
+
Next screen; well if your using a standard keyboard then you probably don’t have a compose key and if your new to computing as intended you're not likely to need one for a while so I would suggest choosing
+
+
No compose key
+
+
The next screen is a useful one and the on screen documentation is actually quite clear provided you know what is meant by “X server” so here’s an outline:
+
+
When you have finished your install the last line of the start-up will tell you that you can run startx. Startx is the command to run the windows (like) screen where you use a mouse to select options.
+
+
This is the X server and to get back to command line (that’s all the typed stuff) you can use [Ctrl][Alt][Backspace] all pressed at the same time to shut down this X server screen; you can always restart it by typing “startx”. Always handy if you have a flaky mouse or are using a wireless mouse that eats batteries.
+
+
Of course this is pointless if you don’t remember the key combination when the time comes!
+
+
+
== CHANGE_PASS - Change password for ‘pi’ user ==
+
+
The default user for the Wheezy install is pi and its password is raspberry. Until you're familiar with the setup it’s probably better to leave this password as it is at least till you are happy changing stuff. In addition you can re-run raspi-config to change it at any time.
+
+
If you screw this up be prepared to re-image and lose any work you have done and programs installed (you did back up your data didn't you). With Linux and Unix forgotten passwords are a killer the Raspberry Pi is one of the simpler systems. Let's face it till you know what your looking at, the out of the box solution of pi and raspberry are probably all you will need.
+
+
+
== CHANGE_LOCALE - Set locale ==
+
+
Slow to start up and there will be a delay while locales are generated.
+
+
You can tell this was written by a computer engineer and not a human how about this as an alternative.
+
+
change_locale Tell the computer if you need non English characters.
+
+
Sheesh! a computer aimed at children and new users and then you expect them to know what locale means (google's your friend?).
+
+
This menu option gives you a massive list of choices that look like they were written by one of the infinite monkeys of legend (goggle infinite monkeys Shakespeare if you don’t understand this reference).
+
+
The default setting is
+
+
en_GB UTF-8 UTF-8 (ain't it nice to have a UK produced computer!)
+
+
English, Great Britain and UTF-8 is a code related to showing all of the characters usually needed to show English letters and other symbols on the screen. If you are working in some other language than English then you will probably need to play around with this.
+
+
You can select multiple choices in the list the space bar toggles them on and off (this was the exception I mentioned earlier) and it’s a long list. Basically if you want to work in more than one language then you will need to make other choices from this list based on the languages you intend to use.
+
+
If you are working in English only the default choice is probably the only one you will need.
+
+
+
== CHANGE_TIMEZONE - Set timezone ==
+
+
Slow to display.
+
+
This is where you setup your clock; now it’s no big issue if it’s wrong it just means the date and time assigned to files you create (automatically when you make them) will be out and its not hard to set this up. (What is the effect if you are not connected to the internet and don't have time set with ntp?)
+
+
The set up consists of two layers basically to make your selection easier to find.
+
+
First option screen think Continent; just to confuse things you have US and America because we all know USA is not part of America. Actually the US option just gives you a shorter list containing the US time zones that are included in the American list; they just made a shorter list under US for all those Good Old Boy American Citizens who don’t know about American places outside of the USA. (flames imminent!).
+
+
SystemV relies on you knowing what SystemV is (Think Unix and ignore it for now).
+
+
Most people know where they are in the world for time zone; for me it’s Europe then London on the next screen but I’ve always been of the opinion that there should be ropes and lights around the M25 with signs saying “Danger hole in the world Keep Out” but then I’m not from London and the M25 was always the road to hell.
+
+
+
== MEMORY_SPLIT - Change memory split ==
+
+
This allows you to choose how much of the RAM memory is set aside for the Broadcom Graphics Processing Unit (Videocore) and how much for the operation of the main ARM processor.
+
+
Three choices 32MiB for Videocore, 64MiB for Videocore, 128MiB for Videocore. First time users should leave it at the default 64MiB for the Videocore. There is more information on when to use the different options here [[RPi_Advanced_Setup]]. You can change it with raspi-config and it will take effect at the next reboot (check).
+
+
Now let’s assume your really fresh to writing code, as in never done this before ever. You're not going to be writing really complex Artificial Intelligence type programs and your also unlikely to be running cutting edge real time first person shooter games not yet anyways. I like the idea of having 128 meg for graphics. As a new programmer your not likely to push graphics unless you want to do something with photos or live streaming (Watching Live TV on your Pi).
+
+
== SSH - Enable or disable ssh server ==
+
+
NOTE: This is broken in Wheezy Beta. If you enter it by mistake press CTRL-C and type sudo raspi-config to recover.
+
+
This change takes effect when???
+
+
This option enables or disables the ssh server, a program which sits quietly in the Pi looking for ssh connections from other computers. The default setting is on and there's little reason for a new user to change this unless your home network has hostile users or is open to the Internet.
+
+
ssh means 'secure shell'. It is a communication protocol which will allow you to log into the Pi from another computer on your network using a program like Putty to provide a command line interface in a terminal window.
+
+
Putty is free and available to download. It’s free Open source and runs on both Windows,Linux. There are other things available for Mac’s (I’m not really familiar enough but I believe there’s an option in Xterm).
+
+
This option allows access to the Pi without a monitor attached to the Pi. OK it’s easier if you have one but let’s say you want to do some command line stuff and your partner/brother/sister whatever wants to use the TV for Corrie or suchlike. Its particularly useful for starting a VNC server on the Pi so you can use the Pi's desktop on another computer. More details here [http://myraspberrypiexperience.blogspot.co.uk/p/setting-up-vnc.html] this is a link to a Blog page that douments an experience with VNC.
+
+
Using Putty or the like is pretty straightforward. You will need to know the IP address of the Pi, either by watching the startup output as it scrolls by, typing ifconfig at the Pi's command line or terminal window, or looking at your router. The IP address is dynamic and can change, particularly if you have not used the Pi for a day or so.
+
+
However if you are using everything from the box as is. That is to say you have your HDMI connected to a TV and a Keyboard and Mouse on the Pi and you have the menu running then I suggest you could disable ssh just to be on the safe side security wise(note just a suggestion).
+
+
== FINISH - Finish config and don’t start raspi-config at boot ==
+
+
If you select <Ok> from this option then on all future startups you won't get the raspi-config menu. If you choose <Exit> then the next time you start you are going to get this menu again automatically.
+
+
+
== After Exiting the Menu ==
+
+
OK let's assume you have happily worked your way through this and you selected OK for the final menu option.
+
+
You are going to get the text that is displayed each time you login to your Pi:
+
+
First information about the Last Login which is useful for finding out if it was you, your son/daughter/grandmother/cat was the last to login and screw up your Pi.
+
+
Then you get the standard copyright and NO WARRANTY message the latter just legalese for “your doing this at your own risk” that kind of goes without saying.
+
+
Then the key line.
+
+
Type ‘startx’ to launch graphical session
+
+
or
+
+
Type 'sudo raspi-config' to relaunch the script
+
+
So, if at this point you type startx followed by hitting the Enter key you will be launched headlong into a windows style environment. When you have finished work logout using the red exit button (bottom right) and then type sudo halt at the command line. Wait until 'System Halted' is displayed before pulling the plug. (Exiting the desktop is a bit flakey on Wheezy beta, you may find you end up with a blank screen and will have to pull the plug with a small risk of corrupting the SD card. Enabling and using CTRL-ALT-BACKSPACE appears to be much more reliable.)
+
+
If on the other hand you want to play in the rarefied atmosphere of the command line environs then type away. You are in the home directory of the pi user; typing ls followed by [enter] will display its files and directories. Directories are in blue so type cd python_games then ls to change folder and display its contents. When you have finished don't forget to type sudo halt and wait until 'System Halted' is displayed before pulling the plug.
+
+
Finally you may want to manually reboot just to allow allow the delayed configuration settings to take effect; type sudo reboot at the command line.
+
+
If you use just the command "reboot" your RaspberryPi will tell you that you must be super user so type sudo reboot
+
+
This should restart your Pi. Scrolling text should appear immediately and there will be a pause if you have chosen to resize your SD card.
+
+
'''NOTE''' All of this is specific to the 2012-06-18 Beta version of Wheezy and not the New version.
+
+
[[Category:RaspberryPi]]
+
+
=References=
+
<references/>
+
Latest revision as of 11:51, 10 January 2013
Redirect to:
|
{
"url": "http://elinux.org/index.php?title=RPi_Wheezy_raspi-config_2012-06-18&diff=209852&oldid=164036",
"source_domain": "elinux.org",
"snapshot_id": "crawl=CC-MAIN-2016-50",
"warc_metadata": {
"Content-Length": "75093",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:EICUQNP34T27TCZDVXXGS7SSNECOX5NA",
"WARC-Concurrent-To": "<urn:uuid:5e453b48-1f77-4646-8385-9ebf6d63bd74>",
"WARC-Date": "2016-12-09T16:03:20Z",
"WARC-IP-Address": "140.211.9.35",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:DNFXC6O3JBYW4U3S5DR4HTSFXFQ2SV77",
"WARC-Record-ID": "<urn:uuid:db73d18b-1c4f-4089-8e81-91afb3a02c39>",
"WARC-Target-URI": "http://elinux.org/index.php?title=RPi_Wheezy_raspi-config_2012-06-18&diff=209852&oldid=164036",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:b82b9892-6607-4a93-aba7-ec7bd1e644a4>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-31-129-80.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-50\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for November 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
69,
70,
86,
114,
172,
197,
199,
255,
271,
618,
620,
651,
653,
655,
678,
680,
682,
684,
991,
993,
995,
997,
1030,
1032,
1084,
1086,
1111,
1113,
1152,
1154,
1196,
1198,
1223,
1225,
1261,
1263,
1296,
1298,
1331,
1333,
1391,
1393,
1405,
1407,
1409,
1411,
1440,
1442,
1444,
1446,
1767,
1769,
1771,
1773,
2024,
2026,
2028,
2030,
2032,
2034,
2063,
2065,
2067,
2069,
2521,
2523,
2525,
2527,
2630,
2632,
2634,
2636,
2638,
2640,
2681,
2683,
2685,
2687,
2833,
2835,
2837,
2839,
3063,
3065,
3067,
3069,
3398,
3400,
3402,
3404,
3555,
3557,
3559,
3561,
3563,
3565,
3625,
3627,
3829,
3831,
3833,
3835,
3991,
3993,
3995,
3997,
4419,
4421,
4423,
4425,
4458,
4460,
4462,
4464,
4504,
4506,
4546,
4548,
4550,
4552,
4733,
4735,
4737,
4739,
5112,
5114,
5116,
5118,
5589,
5591,
5593,
5595,
5930,
5932,
5934,
5936,
5983,
5985,
5987,
5989,
6202,
6204,
6206,
6208,
6362,
6364,
6366,
6368,
6645,
6647,
6649,
6651,
6874,
6876,
6878,
6880,
7005,
7007,
7009,
7011,
7051,
7053,
7056,
7058,
7075,
7077,
7079,
7081,
7238,
7240,
7242,
7244,
7450,
7452,
7454,
7456,
7475,
7477,
7479,
7481,
7637,
7639,
7641,
7643,
7846,
7848,
7850,
7852,
8171,
8173,
8175,
8177,
8268,
8270,
8272,
8274,
8276,
8278,
8328,
8330,
8332,
8334,
8612,
8614,
8616,
8618,
8989,
8991,
8993,
8995,
8997,
8999,
9032,
9034,
9036,
9038,
9110,
9112,
9114,
9116,
9220,
9222,
9224,
9226,
9295,
9297,
9299,
9301,
9429,
9431,
9433,
9435,
9641,
9643,
9645,
9647,
9671,
9673,
9675,
9677,
9748,
9750,
9752,
9754,
10020,
10022,
10024,
10026,
10330,
10332,
10334,
10336,
10431,
10433,
10435,
10437,
10439,
10441,
10478,
10480,
10482,
10484,
10501,
10503,
10505,
10507,
10817,
10819,
10821,
10823,
10907,
10909,
10911,
10913,
11328,
11330,
11332,
11334,
11417,
11419,
11421,
11423,
11747,
11749,
11751,
11753,
11755,
11757,
11798,
11800,
11802,
11804,
11982,
11984,
11986,
11988,
12319,
12321,
12323,
12325,
12795,
12797,
12799,
12801,
12842,
12844,
12846,
12848,
12964,
12966,
12968,
12970,
13003,
13005,
13007,
13009,
13300,
13302,
13304,
13306,
13526,
13528,
13530,
13532,
13745,
13747,
13749,
13751,
14263,
14265,
14267,
14269,
14612,
14614,
14616,
14618,
14896,
14898,
14900,
14902,
14968,
14970,
14972,
14974,
15178,
15180,
15182,
15184,
15186,
15188,
15217,
15219,
15221,
15223,
15333,
15335,
15337,
15339,
15419,
15421,
15423,
15425,
15590,
15592,
15594,
15596,
15755,
15757,
15759,
15761,
15781,
15783,
15785,
15787,
15833,
15835,
15837,
15839,
15842,
15844,
15846,
15848,
15900,
15902,
15904,
15906,
16473,
16475,
16477,
16479,
16927,
16929,
16931,
16933,
17083,
17085,
17087,
17089,
17205,
17207,
17209,
17211,
17350,
17352,
17354,
17356,
17458,
17460,
17462,
17464,
17489,
17491,
17493,
17495,
17508,
17510,
17524,
17526,
17527,
17572,
17573
],
"line_end_idx": [
69,
70,
86,
114,
172,
197,
199,
255,
271,
618,
620,
651,
653,
655,
678,
680,
682,
684,
991,
993,
995,
997,
1030,
1032,
1084,
1086,
1111,
1113,
1152,
1154,
1196,
1198,
1223,
1225,
1261,
1263,
1296,
1298,
1331,
1333,
1391,
1393,
1405,
1407,
1409,
1411,
1440,
1442,
1444,
1446,
1767,
1769,
1771,
1773,
2024,
2026,
2028,
2030,
2032,
2034,
2063,
2065,
2067,
2069,
2521,
2523,
2525,
2527,
2630,
2632,
2634,
2636,
2638,
2640,
2681,
2683,
2685,
2687,
2833,
2835,
2837,
2839,
3063,
3065,
3067,
3069,
3398,
3400,
3402,
3404,
3555,
3557,
3559,
3561,
3563,
3565,
3625,
3627,
3829,
3831,
3833,
3835,
3991,
3993,
3995,
3997,
4419,
4421,
4423,
4425,
4458,
4460,
4462,
4464,
4504,
4506,
4546,
4548,
4550,
4552,
4733,
4735,
4737,
4739,
5112,
5114,
5116,
5118,
5589,
5591,
5593,
5595,
5930,
5932,
5934,
5936,
5983,
5985,
5987,
5989,
6202,
6204,
6206,
6208,
6362,
6364,
6366,
6368,
6645,
6647,
6649,
6651,
6874,
6876,
6878,
6880,
7005,
7007,
7009,
7011,
7051,
7053,
7056,
7058,
7075,
7077,
7079,
7081,
7238,
7240,
7242,
7244,
7450,
7452,
7454,
7456,
7475,
7477,
7479,
7481,
7637,
7639,
7641,
7643,
7846,
7848,
7850,
7852,
8171,
8173,
8175,
8177,
8268,
8270,
8272,
8274,
8276,
8278,
8328,
8330,
8332,
8334,
8612,
8614,
8616,
8618,
8989,
8991,
8993,
8995,
8997,
8999,
9032,
9034,
9036,
9038,
9110,
9112,
9114,
9116,
9220,
9222,
9224,
9226,
9295,
9297,
9299,
9301,
9429,
9431,
9433,
9435,
9641,
9643,
9645,
9647,
9671,
9673,
9675,
9677,
9748,
9750,
9752,
9754,
10020,
10022,
10024,
10026,
10330,
10332,
10334,
10336,
10431,
10433,
10435,
10437,
10439,
10441,
10478,
10480,
10482,
10484,
10501,
10503,
10505,
10507,
10817,
10819,
10821,
10823,
10907,
10909,
10911,
10913,
11328,
11330,
11332,
11334,
11417,
11419,
11421,
11423,
11747,
11749,
11751,
11753,
11755,
11757,
11798,
11800,
11802,
11804,
11982,
11984,
11986,
11988,
12319,
12321,
12323,
12325,
12795,
12797,
12799,
12801,
12842,
12844,
12846,
12848,
12964,
12966,
12968,
12970,
13003,
13005,
13007,
13009,
13300,
13302,
13304,
13306,
13526,
13528,
13530,
13532,
13745,
13747,
13749,
13751,
14263,
14265,
14267,
14269,
14612,
14614,
14616,
14618,
14896,
14898,
14900,
14902,
14968,
14970,
14972,
14974,
15178,
15180,
15182,
15184,
15186,
15188,
15217,
15219,
15221,
15223,
15333,
15335,
15337,
15339,
15419,
15421,
15423,
15425,
15590,
15592,
15594,
15596,
15755,
15757,
15759,
15761,
15781,
15783,
15785,
15787,
15833,
15835,
15837,
15839,
15842,
15844,
15846,
15848,
15900,
15902,
15904,
15906,
16473,
16475,
16477,
16479,
16927,
16929,
16931,
16933,
17083,
17085,
17087,
17089,
17205,
17207,
17209,
17211,
17350,
17352,
17354,
17356,
17458,
17460,
17462,
17464,
17489,
17491,
17493,
17495,
17508,
17510,
17524,
17526,
17527,
17572,
17573,
17585
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 17585,
"ccnet_original_nlines": 421,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.4360138773918152,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.024044880643486977,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.1806037873029709,
"rps_doc_frac_unique_words": 0.2782667577266693,
"rps_doc_mean_word_length": 4.5304670333862305,
"rps_doc_num_sentences": 133,
"rps_doc_symbol_to_word_ratio": 0.000534330029040575,
"rps_doc_unigram_entropy": 5.70728063583374,
"rps_doc_word_count": 2954,
"rps_doc_frac_chars_dupe_10grams": 0.007771050091832876,
"rps_doc_frac_chars_dupe_5grams": 0.04789659008383751,
"rps_doc_frac_chars_dupe_6grams": 0.03384891152381897,
"rps_doc_frac_chars_dupe_7grams": 0.024583429098129272,
"rps_doc_frac_chars_dupe_8grams": 0.024583429098129272,
"rps_doc_frac_chars_dupe_9grams": 0.014944329857826233,
"rps_doc_frac_chars_top_2gram": 0.010087420232594013,
"rps_doc_frac_chars_top_3gram": 0.0040349699556827545,
"rps_doc_frac_chars_top_4gram": 0.006949109956622124,
"rps_doc_books_importance": -1663.486328125,
"rps_doc_books_importance_length_correction": -1663.486328125,
"rps_doc_openwebtext_importance": -996.4500122070312,
"rps_doc_openwebtext_importance_length_correction": -996.4500122070312,
"rps_doc_wikipedia_importance": -727.3037719726562,
"rps_doc_wikipedia_importance_length_correction": -727.3037719726562
},
"fasttext": {
"dclm": 0.46358758211135864,
"english": 0.894582211971283,
"fineweb_edu_approx": 1.6056694984436035,
"eai_general_math": 0.12146825343370438,
"eai_open_web_math": 0.30867230892181396,
"eai_web_code": 0.020335499197244644
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.16",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "005.452",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-4,388,257,556,817,061,400 |
Edit | Attach | New | Raw | Delete | History | Print | Tools
Tomcat 5.5 Integration with Atomikos 3.3+
It is possible to fully integrate the Atomikos transaction manager into Tomcat. Doing it this way makes the transaction manager shared across all web applications exactly like with any full-blown J2EE server.
Important note
When the Atomikos transaction manager is installed globally in Tomcat, you now must also install your JDBC driver at the same global location (ie: into the TOMCAT_HOME/common/lib folder). If you dont do that, you will get a NoClassDefFoundErrors or a ClassNotFoundException or even a ClassCastException during your web application deployment.
This is not a limitation of Atomikos nor of Tomcat but of the J2EE class loading design that both Tomcat and Atomikos must follow.
Installation
Installation is quite simple, it just involves copying some JAR files, a propery file and editing some Tomcat configuration files.
Copying Atomikos Tomcat Lifecycle library
This JAR contains a single class file that is a Tomcat lifecycle listener: it listens for Tomcat's startup and shutdown events and start or stop the transaction manager accordingly. Here is its source code:
Atomikos Lifecycle Listener.java
package com.atomikos.tomcat;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.atomikos.icatch.jta.UserTransactionManager;
import com.atomikos.icatch.system.Configuration;
public class AtomikosLifecycleListener implements LifecycleListener {
private static Log log = LogFactory.getLog(AtomikosLifecycleListener.class);
private UserTransactionManager utm;
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.START_EVENT.equals(event.getType())) {
if (utm == null) {
log.info("starting Atomikos Transaction Manager " + Configuration.VERSION);
utm = new UserTransactionManager();
}
}
else if (Lifecycle.STOP_EVENT.equals(event.getType())) {
if (utm != null) {
log.info("shutting down Atomikos Transaction Manager");
utm.close();
}
}
}
}
Copying Atomikos Tomcat BeanFactory library
This JAR contains a single class file that is an enhanced version of Tomcat JNDI's Bean Factory. Here is its source code:
Bean Factory.java
package com.atomikos.tomcat;
import java.util.Hashtable;
import java.util.Enumeration;
import javax.naming.Name;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.RefAddr;
import javax.naming.spi.ObjectFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.naming.ResourceRef;
import org.apache.naming.factory.Constants;
import com.atomikos.beans.PropertyUtils;
import com.atomikos.jdbc.AtomikosDataSourceBean;
public class BeanFactory implements ObjectFactory {
private final static Log log = LogFactory.getLog(BeanFactory.class);
public Object getObjectInstance(Object obj,
Name name, Context nameCtx, Hashtable environment)
throws NamingException {
if (obj instanceof ResourceRef) {
try {
Reference ref = (Reference) obj;
String beanClassName = ref.getClassName();
Class beanClass = null;
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
if (tcl != null) {
try {
beanClass = tcl.loadClass(beanClassName);
} catch(ClassNotFoundException e) {
}
} else {
try {
beanClass = Class.forName(beanClassName);
} catch(ClassNotFoundException e) {
e.printStackTrace();
}
}
if (beanClass == null) {
throw new NamingException("Class not found: " + beanClassName);
}
if (!AtomikosDataSourceBean.class.isAssignableFrom(beanClass)) {
throw new NamingException(
"Class is not a AtomikosDataSourceBean: " + beanClassName);
}
if (log.isDebugEnabled())
log.debug("instanciating bean of class " + beanClass.getName());
AtomikosDataSourceBean bean =
(AtomikosDataSourceBean) beanClass.newInstance();
int i=0;
Enumeration en = ref.getAll();
while (en.hasMoreElements()) {
RefAddr ra = (RefAddr) en.nextElement();
String propName = ra.getType();
if (propName.equals(Constants.FACTORY) ||
propName.equals("scope") ||
propName.equals("auth")) {
continue;
}
String value = (String) ra.getContent();
if (log.isDebugEnabled())
log.debug("setting property '" +
propName + "' to '" + value + "'");
PropertyUtils.setProperty(bean, propName, value);
i++;
}
if (log.isDebugEnabled())
log.debug("done setting " + i +
" property(ies), now initializing resource " + bean);
bean.init();
return bean;
} catch (Exception ex) {
throw new NamingException(
"error creating AtomikosDataSourceBean").initCause(ex);
}
} else {
return null;
}
}
}
Copying TransactionsEssentials libraries
• Drop the following JARs from the Atomikos distribution into the TOMCAT_HOME/common/lib folder:
• transactions.jar
• transactions-api.jar
• transactions-jta.jar
• transactions-jdbc.jar
• atomikos-util.jar.jar
• jta.jar
You should also copy the transactions-hibernate3.jar and/or transactions-hibernate2.jar at the same location if you're planning to use Hibernate.
Copying Atomikos configuration file
• Drop the following properties file into the TOMCAT_HOME/common/classes folder: jta.properties
Edit server.xml
Then edit the TOMCAT_HOME/conf/server.xml file. At the beginning of the file you should see these four lines:
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
Right after the last one, add this fifth one:
<Listener className="com.atomikos.tomcat.AtomikosLifecycleListener" />
Edit context.xml
Then edit the TOMCAT_HOME/conf/context.xml file. At the beginning of the file you should see this line:
<WatchedResource>WEB-INF/web.xml</WatchedResource>
Right after it, add that one:
<Transaction factory="com.atomikos.icatch.jta.UserTransactionFactory" />
Example application
Here is a sample application that demonstrates how you can run TransactionsEssentials in a web application after it has been globally installed.
It is a simple blueprint application that shows and updates the content of a single Derby database.
Download the sample application here: dbtest.war
To install it, simply copy the WAR file in Tomcat's webapps folder. You also need to install Derby's JDBC driver in TOMCAT_HOME/common/lib.
You can then access it via this URL: http://localhost:8080/dbtest/.
Notes
• This demo uses an embedded Derby database. If it doesn't exist a new one is created in TOMCAT_HOME/work or else, the existing one is reused.
• The transactions logs and debug logs are stored in TOMCAT_HOME/work.
• You should get logs during Tomcat's startup and shutdown:
• during startup: INFO: starting Atomikos Transaction Manager 3.3.0
• during shutdown: INFO: shutting down Atomikos Transaction Manager
Attach
else version 1 uploaded by LudovicOrban on 19 May 2008 - 11:58
else version 1 uploaded by LudovicOrban on 19 May 2008 - 11:58
else
dbtest.war (4.3 K)
version 1 uploaded by LudovicOrban on 19 May 2008 - 12:15
else
derby-10.2.2.0.jar (2222.7 K)
version 1 uploaded by LudovicOrban on 19 May 2008 - 12:17
else version 1 uploaded by LudovicOrban on 19 May 2008 - 12:12
spacer
Copyright © 2013 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM
|
{
"url": "http://www.atomikos.com/Documentation/Tomcat55Integration33",
"source_domain": "www.atomikos.com",
"snapshot_id": "crawl=CC-MAIN-2013-20",
"warc_metadata": {
"Content-Length": "30207",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4PEY4LWEQKQDKEMTCENHWENO7OR2T2HD",
"WARC-Concurrent-To": "<urn:uuid:a12ed52b-a9d4-4dca-95c1-cad0069f6dc0>",
"WARC-Date": "2013-05-23T12:44:52Z",
"WARC-IP-Address": "216.107.146.146",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:EBY2YFGHJLIAJO72W7TJN5RIJHF3I2O5",
"WARC-Record-ID": "<urn:uuid:73557eb4-03ac-410c-95c8-e3f9245ed6a1>",
"WARC-Target-URI": "http://www.atomikos.com/Documentation/Tomcat55Integration33",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:d0fc2507-585b-4345-b889-171ab5a05940>"
},
"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,
61,
62,
104,
105,
314,
315,
330,
331,
674,
675,
806,
807,
820,
821,
952,
953,
995,
996,
1203,
1204,
1237,
1238,
1267,
1268,
1306,
1349,
1395,
1434,
1480,
1481,
1536,
1585,
1586,
1656,
1657,
1737,
1738,
1777,
1778,
1832,
1891,
1919,
2007,
2055,
2066,
2074,
2137,
2165,
2233,
2258,
2269,
2277,
2282,
2283,
2285,
2286,
2330,
2331,
2453,
2454,
2472,
2473,
2502,
2503,
2531,
2561,
2587,
2616,
2653,
2684,
2713,
2752,
2753,
2792,
2838,
2876,
2920,
2921,
2962,
3011,
3012,
3064,
3065,
3138,
3139,
3188,
3247,
3279,
3280,
3322,
3340,
3389,
3448,
3488,
3570,
3605,
3631,
3697,
3753,
3775,
3800,
3826,
3892,
3948,
3993,
4015,
4033,
4074,
4158,
4176,
4257,
4304,
4384,
4402,
4403,
4446,
4531,
4532,
4579,
4649,
4650,
4675,
4722,
4769,
4830,
4882,
4883,
4946,
4999,
5050,
5084,
5106,
5107,
5168,
5169,
5216,
5273,
5333,
5334,
5404,
5405,
5430,
5448,
5449,
5492,
5545,
5619,
5620,
5649,
5678,
5679,
5716,
5759,
5831,
5845,
5846,
5863,
5888,
5898,
5899,
5905,
5907,
5908,
5949,
5950,
6049,
6072,
6099,
6126,
6154,
6182,
6196,
6197,
6343,
6344,
6380,
6381,
6479,
6480,
6496,
6497,
6607,
6608,
6681,
6759,
6846,
6933,
6934,
6980,
6981,
7053,
7054,
7071,
7072,
7176,
7177,
7229,
7230,
7260,
7261,
7335,
7336,
7356,
7357,
7502,
7503,
7603,
7604,
7653,
7654,
7794,
7795,
7863,
7864,
7870,
7871,
8016,
8089,
8151,
8223,
8295,
8302,
8365,
8367,
8430,
8432,
8437,
8456,
8514,
8516,
8521,
8551,
8609,
8611,
8674,
8676,
8683,
8847
],
"line_end_idx": [
61,
62,
104,
105,
314,
315,
330,
331,
674,
675,
806,
807,
820,
821,
952,
953,
995,
996,
1203,
1204,
1237,
1238,
1267,
1268,
1306,
1349,
1395,
1434,
1480,
1481,
1536,
1585,
1586,
1656,
1657,
1737,
1738,
1777,
1778,
1832,
1891,
1919,
2007,
2055,
2066,
2074,
2137,
2165,
2233,
2258,
2269,
2277,
2282,
2283,
2285,
2286,
2330,
2331,
2453,
2454,
2472,
2473,
2502,
2503,
2531,
2561,
2587,
2616,
2653,
2684,
2713,
2752,
2753,
2792,
2838,
2876,
2920,
2921,
2962,
3011,
3012,
3064,
3065,
3138,
3139,
3188,
3247,
3279,
3280,
3322,
3340,
3389,
3448,
3488,
3570,
3605,
3631,
3697,
3753,
3775,
3800,
3826,
3892,
3948,
3993,
4015,
4033,
4074,
4158,
4176,
4257,
4304,
4384,
4402,
4403,
4446,
4531,
4532,
4579,
4649,
4650,
4675,
4722,
4769,
4830,
4882,
4883,
4946,
4999,
5050,
5084,
5106,
5107,
5168,
5169,
5216,
5273,
5333,
5334,
5404,
5405,
5430,
5448,
5449,
5492,
5545,
5619,
5620,
5649,
5678,
5679,
5716,
5759,
5831,
5845,
5846,
5863,
5888,
5898,
5899,
5905,
5907,
5908,
5949,
5950,
6049,
6072,
6099,
6126,
6154,
6182,
6196,
6197,
6343,
6344,
6380,
6381,
6479,
6480,
6496,
6497,
6607,
6608,
6681,
6759,
6846,
6933,
6934,
6980,
6981,
7053,
7054,
7071,
7072,
7176,
7177,
7229,
7230,
7260,
7261,
7335,
7336,
7356,
7357,
7502,
7503,
7603,
7604,
7653,
7654,
7794,
7795,
7863,
7864,
7870,
7871,
8016,
8089,
8151,
8223,
8295,
8302,
8365,
8367,
8430,
8432,
8437,
8456,
8514,
8516,
8521,
8551,
8609,
8611,
8674,
8676,
8683,
8847,
8868
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 8868,
"ccnet_original_nlines": 238,
"rps_doc_curly_bracket": 0.004961660131812096,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.1740812361240387,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.021921340376138687,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3662153482437134,
"rps_doc_frac_unique_words": 0.46344485878944397,
"rps_doc_mean_word_length": 7.451053142547607,
"rps_doc_num_sentences": 185,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.4877729415893555,
"rps_doc_word_count": 807,
"rps_doc_frac_chars_dupe_10grams": 0.06602361798286438,
"rps_doc_frac_chars_dupe_5grams": 0.09795442968606949,
"rps_doc_frac_chars_dupe_6grams": 0.06602361798286438,
"rps_doc_frac_chars_dupe_7grams": 0.06602361798286438,
"rps_doc_frac_chars_dupe_8grams": 0.06602361798286438,
"rps_doc_frac_chars_dupe_9grams": 0.06602361798286438,
"rps_doc_frac_chars_top_2gram": 0.02394811064004898,
"rps_doc_frac_chars_top_3gram": 0.02594378963112831,
"rps_doc_frac_chars_top_4gram": 0.014967570081353188,
"rps_doc_books_importance": -713.76953125,
"rps_doc_books_importance_length_correction": -713.76953125,
"rps_doc_openwebtext_importance": -456.1102294921875,
"rps_doc_openwebtext_importance_length_correction": -456.1102294921875,
"rps_doc_wikipedia_importance": -271.0184326171875,
"rps_doc_wikipedia_importance_length_correction": -271.0184326171875
},
"fasttext": {
"dclm": 0.22456437349319458,
"english": 0.5963940024375916,
"fineweb_edu_approx": 1.998464584350586,
"eai_general_math": 0.3436090350151062,
"eai_open_web_math": 0.09607183933258057,
"eai_web_code": 0.3443496823310852
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.455",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.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": "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": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-1,837,617,111,287,346,200 |
Under the hood for NSW Sydney and Regional Planning Panels
More of the gory details of how information gets into PlanningAlerts. This is here so you can see and learn how it's done but also so you are able to fix things and see in detail what isn't working.
The steps to getting data into Planning Alerts
1. Applications are published on the NSW Sydney and Regional Planning Panels website in a human readable, non-structured form.
2. The latest scraper code on Github is loaded by our scraping platform morph.io.
3. The scraper planningalerts-scrapers/nsw_joint_regional_planning_panels on our scraping platform morph.io collects the information daily and converts it into a machine-readable format.
4. If the scraper errors anyone who is watching the scraper on morph.io gets informed via a daily email alert.
5. The machine readable data is validated, imported and geocoded by PlanningAlerts daily. If there are any validation errors on an application, the application is skipped and the error is logged. See below for the most recent logs.
6. The information is published on PlanningAlerts, made available via the API, and people are informed of new applications via email alerts.
Most recent import logs
1909 applications found for NSW Sydney and Regional Planning Panels, NSW with date from 2024-09-13
Took 9 s to import applications from NSW Sydney and Regional Planning Panels, NSW
What you can do next
If something isn't right with the scraper or the data coming in then you could do one or several of the following:
If everything is working fine right now but you want to help if something goes wrong:
• Watch the scraper on morph.io, so you will get an email if it errors. Press the "Watch" button in the top right while you're logged in to morph.io.
• View any scraper issues. Help fix them or comment on them if they are out of date
|
{
"url": "https://www.planningalerts.org.au/authorities/nsw_jrpp/under_the_hood",
"source_domain": "www.planningalerts.org.au",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "20947",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:E6MQH3KMT64EFQBHH7W43UGQE7GWHQCK",
"WARC-Concurrent-To": "<urn:uuid:507d02bc-59e4-46d8-86a1-86f15bbb0068>",
"WARC-Date": "2024-09-19T00:32:27Z",
"WARC-IP-Address": "13.238.204.170",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:S7IXHR7UGR3OIL26XVRQ5IYMK63FKMTA",
"WARC-Record-ID": "<urn:uuid:5a6a8ee3-9388-46c4-bce5-67cf9a841f54>",
"WARC-Target-URI": "https://www.planningalerts.org.au/authorities/nsw_jrpp/under_the_hood",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:71344000-7d8b-46d3-9334-948d8c84df94>"
},
"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,
59,
60,
259,
260,
307,
308,
437,
521,
710,
823,
1057,
1200,
1201,
1225,
1226,
1325,
1407,
1408,
1429,
1430,
1545,
1546,
1632,
1633,
1785
],
"line_end_idx": [
59,
60,
259,
260,
307,
308,
437,
521,
710,
823,
1057,
1200,
1201,
1225,
1226,
1325,
1407,
1408,
1429,
1430,
1545,
1546,
1632,
1633,
1785,
1870
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1870,
"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.42513367533683777,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01871657930314541,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15775400400161743,
"rps_doc_frac_unique_words": 0.4792332351207733,
"rps_doc_mean_word_length": 4.738018989562988,
"rps_doc_num_sentences": 25,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.683215141296387,
"rps_doc_word_count": 313,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.09979771077632904,
"rps_doc_frac_chars_dupe_6grams": 0.09979771077632904,
"rps_doc_frac_chars_dupe_7grams": 0.07687120884656906,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.033715441823005676,
"rps_doc_frac_chars_top_3gram": 0.03236681967973709,
"rps_doc_frac_chars_top_4gram": 0.05394471064209938,
"rps_doc_books_importance": -167.7517852783203,
"rps_doc_books_importance_length_correction": -167.7323455810547,
"rps_doc_openwebtext_importance": -83.0844497680664,
"rps_doc_openwebtext_importance_length_correction": -83.0844497680664,
"rps_doc_wikipedia_importance": -74.85540008544922,
"rps_doc_wikipedia_importance_length_correction": -74.85539245605469
},
"fasttext": {
"dclm": 0.03496574983000755,
"english": 0.9112809300422668,
"fineweb_edu_approx": 1.1908220052719116,
"eai_general_math": 0.03408759832382202,
"eai_open_web_math": 0.0765378475189209,
"eai_web_code": 0.025231359526515007
}
}
|
{
"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": "352.4",
"labels": {
"level_1": "Social sciences",
"level_2": "Public administration and Military art and science",
"level_3": "Local government"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,906,533,401,124,348,400 |
Perl 6 - the future is here, just unevenly distributed
IRC log for #gluster, 2016-08-08
| Channels | #gluster index | Today | | Search | Google Search | Plain-Text | summary
All times shown according to UTC.
Time Nick Message
00:20 shyam joined #gluster
00:30 Guest84 joined #gluster
00:44 PotatoGim joined #gluster
00:47 Vaelatern joined #gluster
00:56 repnzscasb joined #gluster
01:00 shdeng joined #gluster
01:23 minimicro joined #gluster
01:24 minimicro I am in the process of deploying gluster on a 16 node gluster that has 1GB Ethernet
01:24 minimicro I had set up a second network using the second NIC card on each machine
01:24 minimicro and so I have a 192.168.10.* which is shared across all of my machines
01:25 minimicro and was trying to configure gluster, at least internally, to use the 192.168.50.* network
01:25 minimicro and am running into walls---
01:25 glusterbot minimicro: walls-'s karma is now -1
01:25 minimicro sorry running into issues on setting up the proper network/hostname info so it works
01:28 minimicro i am not sure if and how modifying/updating the /etc/hosts file in this case--- and how to tell gluster which network it should "probe" on
01:28 glusterbot minimicro: case-'s karma is now -1
01:30 aj__ joined #gluster
01:30 minimicro any guides on configuring gluster on multiple networks any one knows of?
01:31 dnunez joined #gluster
01:37 Legacy_ joined #gluster
01:37 Legacy_ Hello, I am trying to configure 3x node glusterfs with nfs-ganesha. I am trying to follow http://blog.gluster.org/2015/10/linux-scale-out-nfsv4-using-nfs-ganesha-and-glusterfs-one-step-at-a-time/
01:37 glusterbot Title: Linux scale out NFSv4 using NFS-Ganesha and GlusterFS — one step at a time | Gluster Community Website (at blog.gluster.org)
01:38 Legacy_ But I am having issue with shared_storage
01:38 Legacy_ I never see the folder shared_storage getting created
01:38 Legacy_ [root@GNode0 ~]# ls /var/run/gluster 8fab5d870263b35f262e348d66bf6aae.socket snaps [root@GNode0 ~]#
01:38 minimicro joined #gluster
01:38 Legacy_ Even after running gluster volume set all cluster.enable-shared-storage enable
01:38 minimicro ack! my machine crashed
01:38 minimicro did someone just send me a quote?
01:38 Legacy_ gluster peer are up & connected
01:39 minimicro multiple network connections?
01:39 Legacy_ Any idea anyone
01:39 minimicro not sure how many people are actively on
01:41 Legacy_ anyone any help here ?
01:47 ilbot3 joined #gluster
01:47 Topic for #gluster is now Gluster Community - http://gluster.org | Documentation - https://gluster.readthedocs.io/en/latest/ | Patches - http://review.gluster.org/ | Developers go to #gluster-dev | Channel Logs - https://botbot.me/freenode/gluster/ & http://irclog.perlgeek.de/gluster/
01:54 ahino joined #gluster
01:58 Lee1092 joined #gluster
02:23 minimicro joined #gluster
02:23 minimicro Can anyone let me know what the expected write performance for gluster should be on a 1GB network?
02:23 minimicro at least a ballpark
02:24 minimicro im getting relatively low write performance (50 mb/s)
02:24 minimicro this is on a setup with 8 machines, 2 bricks per machine
02:35 Guest84 joined #gluster
02:35 julim joined #gluster
03:01 Gambit15 joined #gluster
03:14 ahino joined #gluster
03:15 Gnomethrower joined #gluster
03:18 magrawal joined #gluster
03:23 wadeholler joined #gluster
03:34 kshlm joined #gluster
03:37 luis_silva joined #gluster
03:38 luis_silva1 joined #gluster
03:42 Gnomethrower joined #gluster
03:42 itisravi joined #gluster
03:46 atinm joined #gluster
03:47 ahino joined #gluster
04:12 arcolife joined #gluster
04:22 rafi joined #gluster
04:23 aspandey joined #gluster
04:38 Muthu joined #gluster
04:43 kdhananjay joined #gluster
04:46 poornimag joined #gluster
04:54 sanoj joined #gluster
05:01 jiffin joined #gluster
05:01 skoduri joined #gluster
05:02 hgowtham joined #gluster
05:03 karthik_ joined #gluster
05:08 harish_ joined #gluster
05:10 hchiramm joined #gluster
05:10 RameshN joined #gluster
05:15 itisravi joined #gluster
05:19 gem joined #gluster
05:21 prasanth joined #gluster
05:23 ppai joined #gluster
05:24 karnan joined #gluster
05:25 msvbhat joined #gluster
05:27 atalur joined #gluster
05:31 nbalacha joined #gluster
05:33 jiffin1 joined #gluster
05:34 ankitraj joined #gluster
05:34 Rick_ joined #gluster
05:34 kovshenin joined #gluster
05:36 rafi1 joined #gluster
05:38 karthik_ joined #gluster
05:38 ndarshan joined #gluster
05:47 skoduri joined #gluster
05:49 sanoj joined #gluster
05:52 aravindavk joined #gluster
05:52 aspandey joined #gluster
05:54 rafi joined #gluster
05:55 Bhaskarakiran joined #gluster
05:57 ramky joined #gluster
06:01 satya4ever joined #gluster
06:02 kotreshhr joined #gluster
06:17 javi404 joined #gluster
06:17 [diablo] joined #gluster
06:17 Alghost joined #gluster
06:18 pur joined #gluster
06:22 rastar joined #gluster
06:22 rastar joined #gluster
06:24 mchangir joined #gluster
06:26 jtux joined #gluster
06:26 poornimag joined #gluster
06:28 jiffin joined #gluster
06:41 hchiramm joined #gluster
06:41 skoduri joined #gluster
06:50 arcolife joined #gluster
06:51 devyani7_ joined #gluster
06:51 aj__ joined #gluster
06:52 devyani7_ joined #gluster
06:54 wushudoin joined #gluster
07:01 lezo joined #gluster
07:03 nehar joined #gluster
07:03 Philambdo joined #gluster
07:04 anil_ joined #gluster
07:05 msvbhat joined #gluster
07:08 masuberu joined #gluster
07:19 ramky joined #gluster
07:29 Alghost joined #gluster
07:31 fsimonce joined #gluster
07:43 nehar joined #gluster
07:50 prasanth joined #gluster
07:51 rafi1 joined #gluster
07:53 aspandey_ joined #gluster
07:57 Wizek joined #gluster
08:03 hgowtham joined #gluster
08:05 mbukatov joined #gluster
08:05 prasanth joined #gluster
08:07 kotreshhr joined #gluster
08:16 aj__ joined #gluster
08:19 Slashman joined #gluster
08:20 ira joined #gluster
08:21 deniszh joined #gluster
08:22 pur joined #gluster
08:26 Wizek joined #gluster
08:27 Siavash joined #gluster
08:32 atalur_ joined #gluster
08:33 kdhananjay joined #gluster
08:39 pur joined #gluster
08:41 hackman joined #gluster
08:42 anil_ joined #gluster
08:43 karthik_ joined #gluster
08:44 deniszh1 joined #gluster
08:45 aj__ joined #gluster
08:47 harish_ joined #gluster
08:47 aspandey joined #gluster
08:49 cloph joined #gluster
08:51 sanoj joined #gluster
08:55 cloph Hi - question about geo-replication and the changelog processing.. It seems that changelogs pile up at a greater rate than they are processed on a volume with lots of changes, but the geo-replication link or the slave-io don't seem to be limiting part.
08:56 siada joined #gluster
08:56 Siavash joined #gluster
08:56 cloph it transfers one changelog. Processes it on the slave, then sits idle, waiting for the next...
08:56 siada I've got a gluster volume that's not in use but I can't remove it because "Another transaction could be in progress", is there anyway to force remove? I'm just trying to reset my gluster volumes back to default and start over
08:57 cloph siada: how long id you wait?
08:58 siada well the server has just freshly rebooted, so in theory gluster shouldn't be doing anything as the volume isnt mounted?
08:58 siada i'm 95% sure the volume is corrupt as I did some bad stuff I shouldn't have done (hence why I'm resetting it)
08:59 atalur_ joined #gluster
09:00 legreffier joined #gluster
09:00 jiffin siada: some of the glusterd took a lock on that gluster volume, only one thing which come into my mind is restartd glusterd daemon on all nodes
09:07 siada jiffin: how do I restart glusterd? neither /etc/init.d/glusterd or /etc/init.d/glusterfsd exist
09:07 kshlm siada, Which distribution are you using?
09:07 post-factum siada: systemctl restart glusterd, maybe
09:07 siada I've tried service glusterfs-server stop / service glusterfs-server start -- however still getting "Another transaction could be in progress"
09:08 siada kshlm: ubuntu 14.04
09:08 post-factum oh
09:08 post-factum what glusterfs version?
09:08 kshlm siada, Did you restart on all machines.
09:08 siada kshlm: yes, post-factum: 3.4.2
09:08 post-factum ohhh
09:09 post-factum kshlm: how should we prevent users from using outdated versions?
09:09 kshlm siada, Could you try a newer version please? 3.4.2 is really old.
09:09 kshlm post-factum, As long as they're being provided by the default repositories of a distribution it's gonna be really hard.
09:10 siada it's the highest version available by default on 14.04 :(
09:10 kshlm I don't think we'll be able to get Ubuntu to remove the old version from their repos.
09:10 kshlm siada, Use the official glusterfs ppa https://launchpad.net/~gluster
09:10 glusterbot Title: Gluster in Launchpad (at launchpad.net)
09:10 kshlm In any case since you're stuck and want to restart,
09:11 kshlm You could just nuke /var/lib/glusterd/ to clear out all configs.
09:11 kshlm Also delete the brick paths.
09:11 kshlm And after that install a newer version and try.
09:13 Mmike joined #gluster
09:13 gem joined #gluster
09:14 deniszh joined #gluster
09:15 siada Updating to 3.8.1 seems to have partly fixed my situation, should be able to get to the end on my own now :D
09:15 cloph siada: just don't create a striped volume
09:16 siada the reason I ended up in this mess was because I did the one thing that everyone seems to tell you not to do ... edit the volume directly instead of mouting it *facepalm*
09:24 siada how do I find out what type of split-brain I've got?
09:43 msvbhat joined #gluster
09:50 kdhananjay joined #gluster
09:57 aspandey joined #gluster
10:04 aj__ joined #gluster
10:07 msvbhat joined #gluster
10:08 Muthu_ joined #gluster
10:09 siada kshlm / post_factum: thanks for the assistance, cluster is finally back up and running correctly :D
10:10 siada ls -l
10:10 siada .. woops
10:15 siada ok it's.. mostly working, has something changed between 3.4 and 3.8 to do with symlinks? my gluster volumes have a symlink to a folder that exists on all nodes, however once everythings running under gluster the link is completey broken, when i ls -l the directory, the symlink just shows as "???????? ? ? ? ? <filename>" and I can't remove it or do anything with it, just get "input/output error"
10:18 karthik_ joined #gluster
10:19 pa9tv joined #gluster
10:20 pa9tv is there a way to force bitrot scrubbing to start now?
10:21 pa9tv i've tried:
10:21 pa9tv gluster volume bitrot vbox enable
10:21 pa9tv gluster volume bitrot vbox scrub-throttle aggressive
10:21 pa9tv gluster volume bitrot vbox scrub-frequency daily
10:21 pa9tv gluster volume bitrot vbox scrub resume
10:23 pa9tv the intention is, to have a scrub every day, scheduled by cron.
10:23 gem joined #gluster
10:25 itisravi joined #gluster
10:26 cloph urgh, if you don't trust your disk to that extent, what is the point of using them for storage?
10:28 ndevos pa9tv: kotreshhr might be able to help with your bitrot questions
10:29 pa9tv ndevos, kotreshhr is away i think.
10:29 pa9tv i'll hang a while.
10:29 ndevos pa9tv: maybe, but he'll likely responds when he comes back
10:29 pa9tv rgr!
10:30 ndevos cloph: it can be disk problems, cables, controller-firmware or even RAM errors - and probably many more
10:31 ndevos cloph: written to disk once, does not mean you will always read the same data at a later point in time
10:32 cloph oh, I don't deny that bitrot can happen, just that a daily scan just is too pessimistic from my POV - or otherwise put: if integrity of the data is so important, I'd rather have additional checksums that the client can check / won't rely on the storage to have correct data
10:32 ndevos it is not a very common issue, but with bigger disks the chances increase, and for archiving some bitrot detection is quite helpful to find failing storage
10:32 ndevos ah, yes, daily is maybe a little often
10:33 shdeng joined #gluster
10:33 pa9tv cloph, ndevos, in any case a predictable moment when the scrub takes place is helpfull.
10:34 ndevos pa9tv: yes, I agree with that :)
10:35 cloph yeah, sorry for sidetracking (don't use it myself as underlying stuff is RAID10) - but what does the bitrot status say?
10:36 pa9tv v3.7.6 i cannot find bitrot status cmd.
10:38 cloph no "volume bitrot name-of-volume scrub status" command? /me has that in 3.7.11
10:39 pa9tv # gluster volume bitrot vbox scrub status
10:39 pa9tv Invalid scrub option for bitrot
10:41 sanoj joined #gluster
10:41 muneerse joined #gluster
10:44 luis_silva joined #gluster
10:52 rastar joined #gluster
11:06 jith_ joined #gluster
11:07 jith_ Hi all.. I have tried swift storage with glusterfs backend which ends in failure. Whether created glusterfs volume can be used as swift backend without swiftonfile?
11:08 Guest_83747 joined #gluster
11:09 Guest_83747 Allah is doingn
11:09 Guest_83747 left #gluster
11:12 jiffin jith_: ppai can help you out
11:12 jith_ thanks jiffin
11:12 ppai jith_, hi
11:13 anoopcs cloph, pa9tv : bitrot scrub status command is only available from v3.7.7
11:13 ppai jith_, swiftonfile is suited for cases where you have an existing swift cluster and want glusterfs as one of the storage policy backends
11:13 ppai jith_, there is also gluster-swift which will provide swift object interface in glusterfs cluster
11:14 jith_ ppai: hi, ya i read that..so i can directly use the glusterfs volume for swift backends without swiftonfile??
11:14 ppai jith_, yes you can
11:15 ppai jith_, provided you only use glusterfs to store objects
11:16 ppai jith_, the differences between two projects are listed here: https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Object%20Storage/
11:16 glusterbot Title: Object Storage - Gluster Docs (at gluster.readthedocs.io)
11:17 jith_ ppai: thanks.. which will be better? if i am adding glusterfs to the existing swift i can go for swiftonfile.. right??
11:17 jith_ ppai.. thanks really
11:18 ppai jith_, if you have existing swift cluster with need for different backends i.e xfs, gluster, ceph then swiftonfile is the right choice
11:19 ppai jith_, if your primary way of consuming storage is exclusively via gluster, you can use gluster-swift. You don't need to maintain a swift cluster when using gluster-swift
11:19 jtux joined #gluster
11:19 hackman joined #gluster
11:20 jith_ ppai.. thanks.. so it means i dont want to install swift??
11:21 ppai jith_, well both projects have a dependency on swift. So you'd have to install swift packages
11:22 jith_ ppai: thanks without gluster-swift i cant do that?
11:22 deniszh1 joined #gluster
11:22 jith_ i dont understand the primary use of it.. i m new to this
11:24 ppai jith_, Ok. glusterfs has various access methods and protocols such as FUSE, NFS, SMB. Object is one of the access methods. Object access can be done over HTTP protocol using Swift API or S3 API.
11:24 ppai jith_, So the primary use is to let HTTP clients store and retrieve objects (file) in a glusterfs volume
11:27 jith_ ppai, i can access it from swift api also na.. i just wanted to configure it for glance backend
11:28 aj__ joined #gluster
11:29 ppai jith_, yes you can access it over swift API. I remember glance could directly use glusterfs as backend instead of having to go over swift
11:30 jith_ ppai, sorry if i am troubling.. for accessing the glusterfs volume other than swift i need gluster-swift.. any other purpose
11:30 jith_ ya i sa that in config file... so no need of swift in that?
11:31 jith_ ya i saw *
11:31 ppai jith_, yep for glance you don't need swift or gluster-swift or swiftonfile. glance can directly use glusterfs: https://www.rdoproject.org/storage/Glance/using-glusterfs-for-glance-with-rdo/
11:31 glusterbot Title: Using GlusterFS for Glance with RDO Liberty RDO (at www.rdoproject.org)
11:32 jri joined #gluster
11:32 jith_ ppai, in that case, glance backend will be file storage right not object storage(swift)
11:33 ppai jith_, correct
11:33 jith_ ppai, thanks for the guidance, if we want object storage i should go for swift with glusterfs??
11:34 ppai jith_, right. you have a choice between swift+swiftonfile and swift+gluster-swift
11:35 jith_ without gluster-swift or swiftonfile i cant use swift and glusterfs?? because i tried it which is not successful
11:36 shubhendu joined #gluster
11:38 ppai jith_, you can but that isn't straight forward.
11:40 jith_ ppai, I didnt use gluster-swift or swiftonfile.. I configured glusterfs in two machines(A and B) and created a glusterfs volume and mounted in machine C.. In third machine(C) i installed swift and added the mounted disk (glusterfs volume) in swift ring for storing objects.. It ends in failure
11:41 jith_ what should i do in this case??
11:42 ppai jith_, what fails ? how have you configured your rings ?
11:42 kovshenin joined #gluster
11:43 jith_ yes i configured rings with the mounted volume as device
11:44 ppai jith_, could share how you created the rings ?
11:45 jith_ sure.. but why did you say it is not straightforward.. sorry for the trouble
11:47 ppai jith_, I meant about generating ring files, placing the DBs and turning off replication
11:48 karnan joined #gluster
11:49 jith_ swift-ring-builder account.builder create 10 1 1
11:49 jith_ swift-ring-builder account.builder add r1z1-10.10.15.151:6002/data 100
11:49 jith_ swift-ring-builder account.builder rebalance
11:49 mchangir joined #gluster
11:50 ppai I'm assuming you have similarly build ring files for account, container and object. And glusterfs is FUSE mounted at path /data ?
11:51 jith_ ppai, but i have a doubt, i have mounted in /data directory.. used the same for creating ring files... should i have created some subdirectory under /data for creating swift rings?
11:51 jith_ ppai, yes same steps
11:51 jith_ yes yes
11:52 satya4ever joined #gluster
11:52 ppai jith_, that's good enough. You'd have to update 'devices' path in all account, container, object conf files too
11:53 ppai jith_, https://github.com/openstack/swift/blob/master/etc/object-server.conf-sample#L8
11:53 glusterbot Title: swift/object-server.conf-sample at master · openstack/swift · GitHub (at github.com)
11:56 jith_ ppai, ya i did
11:56 ppai jith_, so effectively look for /srv/node/data which is where the glusterfs volume should be mounted
11:57 jith_ ppai, sorry the mounted path is /mnt/data
11:57 ppai jith_, if that's the case, use 'data' in ring and change 'devices' to '/mnt'
11:57 jith_ but i have created rings withonly data..
11:58 jith_ yes i did
11:58 ppai which is fine
11:58 jith_ what is /srv/node/data?
11:59 ppai that is the default path where swift will look for the mount point unless you change it
12:00 karnan joined #gluster
12:02 baojg joined #gluster
12:02 jith_ oh ok... where i have to specify it
12:03 jith_ so i should mount the glusterfs volume in /srv/node?
12:03 ppai where do you have glusterfs mounted ?
12:03 ppai Is it at "/mnt/data" ?
12:03 jith_ yes
12:03 jith_ exactly
12:04 ppai then just change 'devices' field in each of the 3 conf files (account, container, object) to '/mnt'
12:05 jith_ ppai: i did mount.glusterfs gluster-host1:/glustervol /mnt/data
12:05 jith_ it was there already
12:06 jith_ [DEFAULT]
12:06 jith_ bind_ip = 10.10.15.151
12:06 jith_ bind_port = 6002
12:06 jith_ # bind_timeout = 30
12:06 jith_ # backlog = 4096
12:06 jith_ user = root
12:06 jith_ swift_dir = /etc/swift
12:06 jith_ devices = /mnt
12:06 jith_ # mount_check = true
12:06 jith_ # disable_fallocate = false
12:06 jith_ this is part of account-server.conf..
12:07 ppai make the same changes to container-server.conf and object-server.conf
12:07 ppai and restart the swift services - swift-init main restart
12:08 jith_ ok if this steps are right.. i will try again with another setup... because i havent checked whether glusterfs is working right after creating it...
12:08 jith_ ppai, that i have did already
12:08 ppai jith_, alright
12:08 jith_ ppai, thanks for the guidance, i will do it again and will you know
12:08 ppai jith_, sure.
12:09 jith_ ppai, thanks
12:11 jith_ ppai, i hope u have got my requirement.. so why does gluster-swift is needed in this case.. i mean in which part..
12:12 ppai ppai, without gluster-swift, you'll have use sqlite DBs for account and container server.
12:12 ppai so your glusterfs volume will store objects and the DBs
12:13 ppai But when you use gluster-swift, you don't need to use DBs or manage ring files manually, but at the expense of slower listings
12:20 jith_ ppai, thanks
12:35 baojg joined #gluster
12:40 unclemarc joined #gluster
12:55 plarsen joined #gluster
12:57 pur joined #gluster
12:59 bwerthmann joined #gluster
12:59 baojg joined #gluster
13:04 mchangir joined #gluster
13:10 baojg joined #gluster
13:19 pdrakeweb joined #gluster
13:28 ctria joined #gluster
13:29 Pupeno joined #gluster
13:29 hgowtham joined #gluster
13:33 julim joined #gluster
13:36 jiffin joined #gluster
13:43 atalur_ joined #gluster
13:45 shyam joined #gluster
13:45 Bhaskarakiran joined #gluster
13:53 baojg joined #gluster
13:53 BitByteNybble110 joined #gluster
13:56 hagarth joined #gluster
14:04 bowhunter joined #gluster
14:09 archit_ joined #gluster
14:11 baojg joined #gluster
14:11 muneerse joined #gluster
14:13 ppai joined #gluster
14:18 msvbhat joined #gluster
14:20 rwheeler joined #gluster
14:25 BitByteNybble110 joined #gluster
14:27 ira joined #gluster
14:30 luis_silva joined #gluster
14:33 skylar joined #gluster
14:33 nbalacha joined #gluster
14:34 skylar left #gluster
14:37 skylar joined #gluster
14:38 baojg_ joined #gluster
14:39 side_control its it normal to have files in a constant state of 'possibly undergoing heal' ?
14:39 pdrakeweb joined #gluster
14:40 pur joined #gluster
14:42 post-factum side_control: for how long?
14:42 post-factum side_control: does "heal full" help?
14:43 Acinonyx joined #gluster
14:43 side_control post-factum: i think this time its about 14 hours, one file is in split-brain and can't seem to heal
14:43 post-factum side_control: is it in split-brain for real?
14:44 side_control the one file, recovered, but went back into split-brain 5 minutes later
14:44 ndevos side_control: I think it is normal for files that are currently having i/o, the possible split-brain gets detected when transactions are in progress
14:45 ndevos side_control: only when the transaction has finished, it is certain that the file is (not) in split-brain
14:45 post-factum side_control: rephrasing ndevos, is that file big and actively used?
14:45 side_control ndevos: again, its weird though, that some other files on other vols are impacted by this heal
14:45 side_control post-factum: atm, no
14:45 post-factum ndevos: we don't have heal progress indicator, do we?
14:46 ndevos side_control: that definitely sounds weird
14:46 ndevos post-factum: not that I am aware of
14:46 * ndevos normally passes self-heal questions on to itisravi, kd<tab> or pranithk
14:47 side_control im seeing two issues that been causing me a lot of problems.. gluster mounts will fail after X amount of time, causing the VMs to pause, i digress.. i'll just wait for a reply on the user-lsit
14:47 side_control i'll wait for this to heal and see what happens
14:48 post-factum side_control: which gluster version do you have?
14:48 side_control 3.8.1
14:51 post-factum side_control: is that replica 2 volume?
14:52 side_control replica 3 /w arbiter
14:52 post-factum side_control: hoho, looks like a bug then
14:52 dnunez joined #gluster
14:52 post-factum side_control: replica 3 arbiter 1 should not have split-brains at all
14:53 side_control hrmmm
14:54 side_control why is that?
14:54 post-factum why is what? why split brain happens?
14:54 side_control post-factum: no, why shouldnt splitbrain happen?
14:55 side_control if all nodes went offline, came back up, split-brain should happen but it should be able to heal itself no?
14:55 post-factum side_control: because volume should go read-only if server-side quorum is not met, and then no split-brains could happen
14:55 post-factum side_control: if it was "hard outage", and some parts were not replicated across nodes, then yes, it could happen
14:56 post-factum side_control: do you observe healing actually happens atm? like glusterfsd process cpu usage, traffic between hosts
14:56 wushudoin joined #gluster
14:57 post-factum glusterfs shd cpu usage as well
14:57 side_control post-factum: the infiniband gear i've upgraded to, has been, well having issues, connectivity was dropping like flies for a while
14:57 wushudoin joined #gluster
15:00 side_control post-factum: yea its definitely doing something
15:00 post-factum side_control: i guess you should wait then
15:04 side_control post-factum: welp, thanks for the info, we'll see how it goesw
15:13 atalur_ joined #gluster
15:13 hagarth joined #gluster
15:42 pdrakewe_ joined #gluster
15:43 hchiramm joined #gluster
16:01 msvbhat joined #gluster
16:19 cloph I wonder what a suitable features.shard-block-size is for replica 3 volume for multiple qemu disk-images in the 50-100GB range. the default of 4MB seems very low - what are the rules of thumb here?
16:20 mahdi joined #gluster
16:22 Gambit15 joined #gluster
16:26 mahdi Hi, GlusterFS with distributed replica using nfs-ganesha, im seeing lots of traffic on "lo" interface, is this normal ?
16:28 mahdi my network setup is two 10G bonded interface (LACP)
16:28 mahdi on the native nfs i do not see such a traffic on the loopback interface
16:32 post-factum cloph: 128–256M might be reasonable choice
16:36 cloph thx
16:38 minimicro joined #gluster
16:47 Acinonyx joined #gluster
16:50 bagualistico joined #gluster
16:54 Acinonyx joined #gluster
16:56 rafi joined #gluster
16:57 pramsky joined #gluster
17:07 Acinonyx joined #gluster
17:24 aj__ joined #gluster
17:25 pramsky hey everyone, i have a 2 node gluster in replicate mode, I copied a few GB of file to one of the nodes. But I do not see the disk usage of the brick on the second node match the first.The gluster mounts themselves update correctly.
17:26 pramsky the nodes are connected to each other via GB ethernet
17:27 bowhunter joined #gluster
17:32 gnulnx Anyone able to get the glusterfs fuse mount working on freebsd? I loaded the 'fuse' module, wondering if I need any other modules / ports installed.
17:36 dnunez joined #gluster
17:38 msvbhat joined #gluster
17:42 jiffin joined #gluster
17:51 Pupeno joined #gluster
17:51 Pupeno joined #gluster
17:52 rafi joined #gluster
17:56 JoeJulian pramsky: gluster is not a replication service, it's a clustered filesystem. Do not write directly to the bricks, always mount the volume and write to that mount.
17:56 bwerthmann joined #gluster
17:57 JoeJulian gnulnx: as far as I know, fuse should be sufficient. Are you getting errors?
17:58 gnulnx JoeJulian: I was, yes, but a generic one. I just got it working by calling mount_glusterfs as opposed to mount -t glusterfs
17:59 poornimag joined #gluster
17:59 JoeJulian +1
17:59 gnulnx It looks like fbsd has a preconfigured list of valid programs to automatically call when doing -t (e.g. /sbin/mount_$t)
18:00 gnulnx So I had to add -o mountprog=/sbin/mount_glusterfs
18:00 dnunez joined #gluster
18:01 jiffin joined #gluster
18:02 JoeJulian @learn freebsd as "Use \"-o mountprog=/sbin/mount_glusterfs\" instead of -t."
18:02 glusterbot JoeJulian: The operation succeeded.
18:02 JoeJulian @freebsd
18:02 glusterbot JoeJulian: Use "-o mountprog=/sbin/mount_glusterfs" instead of -t.
18:02 hchiramm joined #gluster
18:04 gnulnx JoeJulian: Do I have permission to edit that, or is there a restricted list?
18:05 JoeJulian Feel free
18:05 JoeJulian factoids are for everybody
18:05 Pupeno joined #gluster
18:05 julim joined #gluster
18:08 gnulnx @learn freebsd as "Mount gluster client: Use \"mount_glusterfs\" instead of \"mount -t glusterfs\". gluster client in fstab example: \"192.168.110.1:/ftp /media/ glusterfs rw,mountprog=/sbin/mount_glusterfs,late 0 0\""
18:08 glusterbot gnulnx: The operation succeeded.
18:08 gnulnx @freebsd
18:08 glusterbot gnulnx: (#1) Use "-o mountprog=/sbin/mount_glusterfs" instead of -t., or (#2) Mount gluster client: Use "mount_glusterfs" instead of "mount -t glusterfs". gluster client in fstab example: "192.168.110.1:/ftp /media/ glusterfs rw,mountprog=/sbin/mount_glusterfs,late 0 0"
18:09 Pupeno_ joined #gluster
18:10 pramsky JoeJulian, thats what I did, I mounted the glusterfs on one node and then wrote to it
18:11 msvbhat joined #gluster
18:12 JoeJulian Cool.
18:12 ahino joined #gluster
18:12 rafi1 joined #gluster
18:13 JoeJulian Which also means you could have theoretically done "mount -o mountprog=/sbin/mount_glusterfs 192.168.110.1:ftp /media"
18:16 side_control JoeJulian: just wanna say thanks for all your informative posts/blogs, its certainly helpful
18:16 JoeJulian You're welcome. Thank's for the feedback.
18:18 Gnomethrower joined #gluster
18:21 jiffin1 joined #gluster
18:23 rafi joined #gluster
18:29 side_control post-factum: i figured out what was happening....
18:29 side_control post-factum: one node, infiniband is dropping, and more files go under healing
18:30 side_control https://paste.fedoraproject.org/404490/
18:30 glusterbot Title: #404490 Fedora Project Pastebin (at paste.fedoraproject.org)
18:49 mrErikss1n joined #gluster
18:49 yosafbridge` joined #gluster
18:50 rossdm_ joined #gluster
18:50 shruti` joined #gluster
18:50 cvstealt1 joined #gluster
18:50 aj__ joined #gluster
18:50 d-fence__ joined #gluster
18:50 sac` joined #gluster
18:50 csaba1 joined #gluster
18:50 Dave__ joined #gluster
18:50 glustin joined #gluster
18:50 Nebraskka joined #gluster
18:50 lh joined #gluster
18:51 Nebraskka joined #gluster
18:53 om joined #gluster
19:13 deniszh joined #gluster
19:17 robb_nl joined #gluster
19:17 social joined #gluster
19:25 rafi joined #gluster
19:25 Pupeno joined #gluster
19:25 Pupeno joined #gluster
19:27 B21956 joined #gluster
19:46 Siavash joined #gluster
19:47 shruti` joined #gluster
19:47 sac` joined #gluster
19:47 csaba1 joined #gluster
19:47 glustin joined #gluster
19:52 gluco joined #gluster
20:16 aj__ joined #gluster
20:35 kpease joined #gluster
20:37 kpease joined #gluster
20:59 Jacob843 joined #gluster
21:09 repnzscasb joined #gluster
21:10 johnmilton joined #gluster
21:14 deniszh joined #gluster
21:20 Acinonyx joined #gluster
21:23 hackman joined #gluster
21:44 deniszh joined #gluster
21:51 wadeholler joined #gluster
21:59 kpease joined #gluster
22:09 deniszh joined #gluster
22:12 deniszh joined #gluster
22:19 julim joined #gluster
22:28 madm1ke I just simulated a completely failed node in a dispersed volume (2+1) with gluster 3.7. Now I cannot detach the old node (same name) because the volume contains a brick and I cannot replace-brick because the new node is not yet part of the cluster. How is that supposed to be handled ?
22:50 madm1ke replacing the new UUID with the old one in /var/lib/glusterd/glusterd.info seemed to have done the trick /o\
22:56 bkolden joined #gluster
23:33 pramsky JoeJulian, maybe i missed your response earlier during the net split, but i wrote files to the mounted gluster volume on a replicated 2 node cluster, one node shows the brick's disk usage as the same as the volume, other does not. I am wondering if this is expected behavior. Basically on node1, gluster volume and brick usage are 100gb, on node 2 the gluster volume is 100gb but the brick itself is 400Mb
| Channels | #gluster index | Today | | Search | Google Search | Plain-Text | summary
|
{
"url": "http://irclog.perlgeek.de/gluster/2016-08-08",
"source_domain": "irclog.perlgeek.de",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "155474",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:6NJI4CG3VHZOAA5XW2JSCCYWIFWD3R46",
"WARC-Concurrent-To": "<urn:uuid:16cee90d-fc76-4270-a26b-d50186aaabf7>",
"WARC-Date": "2017-03-25T19:51:40Z",
"WARC-IP-Address": "213.95.21.23",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:OXZUCPLOW3NI72GX6TDJSYP6NBIUPMOL",
"WARC-Record-ID": "<urn:uuid:f1c1c3f3-40f2-4ef1-88fc-ffe7263fefd1>",
"WARC-Target-URI": "http://irclog.perlgeek.de/gluster/2016-08-08",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e6b56940-d33b-4743-8197-e78f50851136>"
},
"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,
55,
56,
89,
90,
176,
177,
211,
212,
230,
258,
288,
320,
352,
385,
414,
446,
546,
634,
721,
827,
872,
925,
1026,
1181,
1233,
1260,
1349,
1378,
1408,
1620,
1769,
1825,
1893,
2008,
2040,
2134,
2174,
2224,
2270,
2316,
2346,
2403,
2440,
2469,
2761,
2789,
2819,
2851,
2966,
3002,
3072,
3145,
3175,
3203,
3234,
3262,
3297,
3328,
3361,
3389,
3422,
3456,
3491,
3522,
3550,
3578,
3609,
3636,
3667,
3695,
3728,
3760,
3788,
3817,
3847,
3878,
3909,
3939,
3970,
4000,
4031,
4057,
4088,
4115,
4144,
4174,
4203,
4234,
4264,
4295,
4323,
4355,
4383,
4414,
4445,
4475,
4503,
4536,
4567,
4594,
4630,
4658,
4691,
4723,
4753,
4784,
4814,
4840,
4869,
4898,
4929,
4956,
4988,
5017,
5048,
5078,
5109,
5141,
5168,
5200,
5232,
5259,
5287,
5319,
5347,
5377,
5408,
5436,
5466,
5497,
5525,
5556,
5584,
5616,
5644,
5675,
5706,
5737,
5769,
5796,
5827,
5853,
5883,
5909,
5937,
5967,
5997,
6030,
6056,
6086,
6114,
6145,
6176,
6203,
6233,
6264,
6292,
6320,
6585,
6613,
6643,
6750,
6989,
7030,
7162,
7284,
7314,
7347,
7504,
7612,
7665,
7724,
7878,
7910,
7931,
7973,
8025,
8068,
8091,
8174,
8252,
8384,
8454,
8552,
8633,
8697,
8761,
8838,
8879,
8939,
8967,
8993,
9023,
9144,
9198,
9381,
9446,
9476,
9509,
9540,
9567,
9597,
9626,
9738,
9756,
9777,
10187,
10218,
10246,
10313,
10337,
10383,
10448,
10509,
10561,
10637,
10663,
10694,
10802,
10881,
10928,
10959,
11031,
11048,
11165,
11281,
11567,
11736,
11788,
11817,
11918,
11964,
12096,
12148,
12239,
12293,
12337,
12365,
12396,
12429,
12458,
12486,
12663,
12697,
12731,
12763,
12806,
12832,
12853,
12940,
13088,
13197,
13320,
13350,
13417,
13571,
13653,
13784,
13817,
13963,
14145,
14172,
14202,
14273,
14378,
14441,
14472,
14542,
14748,
14864,
14972,
14999,
15148,
15286,
15358,
15381,
15583,
15679,
15705,
15805,
15831,
15939,
16032,
16157,
16189,
16248,
16555,
16599,
16667,
16699,
16768,
16826,
16915,
17014,
17043,
17104,
17187,
17244,
17275,
17416,
17609,
17642,
17662,
17695,
17818,
17917,
18026,
18053,
18164,
18218,
18306,
18359,
18381,
18406,
18442,
18541,
18570,
18598,
18646,
18711,
18760,
18794,
18810,
18830,
18941,
19017,
19050,
19072,
19107,
19136,
19168,
19197,
19221,
19256,
19283,
19316,
19356,
19406,
19487,
19555,
19716,
19758,
19784,
19864,
19888,
19913,
20040,
20141,
20208,
20346,
20371,
20399,
20431,
20461,
20487,
20520,
20548,
20579,
20607,
20639,
20667,
20696,
20727,
20755,
20784,
20814,
20842,
20878,
20906,
20945,
20975,
21007,
21037,
21065,
21096,
21123,
21153,
21184,
21223,
21249,
21282,
21311,
21342,
21369,
21398,
21427,
21526,
21558,
21584,
21630,
21685,
21716,
21836,
21899,
21990,
22152,
22271,
22358,
22472,
22512,
22584,
22640,
22689,
22776,
22989,
23056,
23123,
23148,
23206,
23246,
23306,
23335,
23423,
23448,
23480,
23536,
23604,
23731,
23870,
24002,
24136,
24168,
24218,
24367,
24399,
24466,
24527,
24609,
24639,
24669,
24701,
24732,
24762,
24972,
25000,
25031,
25163,
25227,
25311,
25372,
25388,
25420,
25451,
25486,
25517,
25544,
25574,
25605,
25632,
25878,
25946,
25978,
26141,
26170,
26200,
26229,
26258,
26287,
26314,
26492,
26525,
26618,
26756,
26788,
26807,
26940,
27004,
27033,
27062,
27156,
27209,
27234,
27318,
27349,
27439,
27465,
27508,
27537,
27565,
27798,
27848,
27870,
28159,
28189,
28289,
28319,
28341,
28369,
28397,
28532,
28644,
28702,
28737,
28767,
28794,
28863,
28961,
29020,
29105,
29138,
29173,
29203,
29233,
29265,
29292,
29324,
29351,
29380,
29409,
29439,
29471,
29496,
29528,
29553,
29583,
29613,
29642,
29669,
29698,
29727,
29756,
29786,
29816,
29843,
29872,
29902,
29930,
29957,
29986,
30015,
30046,
30079,
30112,
30142,
30173,
30203,
30233,
30266,
30295,
30325,
30355,
30383,
30683,
30806,
30836,
31256,
31257
],
"line_end_idx": [
55,
56,
89,
90,
176,
177,
211,
212,
230,
258,
288,
320,
352,
385,
414,
446,
546,
634,
721,
827,
872,
925,
1026,
1181,
1233,
1260,
1349,
1378,
1408,
1620,
1769,
1825,
1893,
2008,
2040,
2134,
2174,
2224,
2270,
2316,
2346,
2403,
2440,
2469,
2761,
2789,
2819,
2851,
2966,
3002,
3072,
3145,
3175,
3203,
3234,
3262,
3297,
3328,
3361,
3389,
3422,
3456,
3491,
3522,
3550,
3578,
3609,
3636,
3667,
3695,
3728,
3760,
3788,
3817,
3847,
3878,
3909,
3939,
3970,
4000,
4031,
4057,
4088,
4115,
4144,
4174,
4203,
4234,
4264,
4295,
4323,
4355,
4383,
4414,
4445,
4475,
4503,
4536,
4567,
4594,
4630,
4658,
4691,
4723,
4753,
4784,
4814,
4840,
4869,
4898,
4929,
4956,
4988,
5017,
5048,
5078,
5109,
5141,
5168,
5200,
5232,
5259,
5287,
5319,
5347,
5377,
5408,
5436,
5466,
5497,
5525,
5556,
5584,
5616,
5644,
5675,
5706,
5737,
5769,
5796,
5827,
5853,
5883,
5909,
5937,
5967,
5997,
6030,
6056,
6086,
6114,
6145,
6176,
6203,
6233,
6264,
6292,
6320,
6585,
6613,
6643,
6750,
6989,
7030,
7162,
7284,
7314,
7347,
7504,
7612,
7665,
7724,
7878,
7910,
7931,
7973,
8025,
8068,
8091,
8174,
8252,
8384,
8454,
8552,
8633,
8697,
8761,
8838,
8879,
8939,
8967,
8993,
9023,
9144,
9198,
9381,
9446,
9476,
9509,
9540,
9567,
9597,
9626,
9738,
9756,
9777,
10187,
10218,
10246,
10313,
10337,
10383,
10448,
10509,
10561,
10637,
10663,
10694,
10802,
10881,
10928,
10959,
11031,
11048,
11165,
11281,
11567,
11736,
11788,
11817,
11918,
11964,
12096,
12148,
12239,
12293,
12337,
12365,
12396,
12429,
12458,
12486,
12663,
12697,
12731,
12763,
12806,
12832,
12853,
12940,
13088,
13197,
13320,
13350,
13417,
13571,
13653,
13784,
13817,
13963,
14145,
14172,
14202,
14273,
14378,
14441,
14472,
14542,
14748,
14864,
14972,
14999,
15148,
15286,
15358,
15381,
15583,
15679,
15705,
15805,
15831,
15939,
16032,
16157,
16189,
16248,
16555,
16599,
16667,
16699,
16768,
16826,
16915,
17014,
17043,
17104,
17187,
17244,
17275,
17416,
17609,
17642,
17662,
17695,
17818,
17917,
18026,
18053,
18164,
18218,
18306,
18359,
18381,
18406,
18442,
18541,
18570,
18598,
18646,
18711,
18760,
18794,
18810,
18830,
18941,
19017,
19050,
19072,
19107,
19136,
19168,
19197,
19221,
19256,
19283,
19316,
19356,
19406,
19487,
19555,
19716,
19758,
19784,
19864,
19888,
19913,
20040,
20141,
20208,
20346,
20371,
20399,
20431,
20461,
20487,
20520,
20548,
20579,
20607,
20639,
20667,
20696,
20727,
20755,
20784,
20814,
20842,
20878,
20906,
20945,
20975,
21007,
21037,
21065,
21096,
21123,
21153,
21184,
21223,
21249,
21282,
21311,
21342,
21369,
21398,
21427,
21526,
21558,
21584,
21630,
21685,
21716,
21836,
21899,
21990,
22152,
22271,
22358,
22472,
22512,
22584,
22640,
22689,
22776,
22989,
23056,
23123,
23148,
23206,
23246,
23306,
23335,
23423,
23448,
23480,
23536,
23604,
23731,
23870,
24002,
24136,
24168,
24218,
24367,
24399,
24466,
24527,
24609,
24639,
24669,
24701,
24732,
24762,
24972,
25000,
25031,
25163,
25227,
25311,
25372,
25388,
25420,
25451,
25486,
25517,
25544,
25574,
25605,
25632,
25878,
25946,
25978,
26141,
26170,
26200,
26229,
26258,
26287,
26314,
26492,
26525,
26618,
26756,
26788,
26807,
26940,
27004,
27033,
27062,
27156,
27209,
27234,
27318,
27349,
27439,
27465,
27508,
27537,
27565,
27798,
27848,
27870,
28159,
28189,
28289,
28319,
28341,
28369,
28397,
28532,
28644,
28702,
28737,
28767,
28794,
28863,
28961,
29020,
29105,
29138,
29173,
29203,
29233,
29265,
29292,
29324,
29351,
29380,
29409,
29439,
29471,
29496,
29528,
29553,
29583,
29613,
29642,
29669,
29698,
29727,
29756,
29786,
29816,
29843,
29872,
29902,
29930,
29957,
29986,
30015,
30046,
30079,
30112,
30142,
30173,
30203,
30233,
30266,
30295,
30325,
30355,
30383,
30683,
30806,
30836,
31256,
31257,
31342
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 31342,
"ccnet_original_nlines": 547,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.22038939595222473,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01176312007009983,
"rps_doc_frac_lines_end_with_ellipsis": 0.005474450066685677,
"rps_doc_frac_no_alph_words": 0.4015684127807617,
"rps_doc_frac_unique_words": 0.2928434908390045,
"rps_doc_mean_word_length": 5.186239242553711,
"rps_doc_num_sentences": 238,
"rps_doc_symbol_to_word_ratio": 0.040968090295791626,
"rps_doc_unigram_entropy": 6.056843280792236,
"rps_doc_word_count": 4709,
"rps_doc_frac_chars_dupe_10grams": 0.012120219878852367,
"rps_doc_frac_chars_dupe_5grams": 0.04520513862371445,
"rps_doc_frac_chars_dupe_6grams": 0.043812960386276245,
"rps_doc_frac_chars_dupe_7grams": 0.020637130364775658,
"rps_doc_frac_chars_dupe_8grams": 0.01695192977786064,
"rps_doc_frac_chars_dupe_9grams": 0.01695192977786064,
"rps_doc_frac_chars_top_2gram": 0.14744901657104492,
"rps_doc_frac_chars_top_3gram": 0.007657030131667852,
"rps_doc_frac_chars_top_4gram": 0.0049136001616716385,
"rps_doc_books_importance": -2845.388916015625,
"rps_doc_books_importance_length_correction": -2845.388916015625,
"rps_doc_openwebtext_importance": -1500.9068603515625,
"rps_doc_openwebtext_importance_length_correction": -1500.9068603515625,
"rps_doc_wikipedia_importance": -1099.510498046875,
"rps_doc_wikipedia_importance_length_correction": -1099.510498046875
},
"fasttext": {
"dclm": 0.05768131837248802,
"english": 0.8606892824172974,
"fineweb_edu_approx": 0.7593430280685425,
"eai_general_math": 0.08876795321702957,
"eai_open_web_math": 0.06547355651855469,
"eai_web_code": 0.0861440896987915
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "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": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,285,991,119,287,285,000 |
Magento 1.x API
SOAP
About Magento API
For Magento 2 API documentation, see devdocs.magento.com
Module: GiftCard API
Resource: giftcard_customer
Method:
• giftcard_customer.redeem (SOAP V1)
• giftcardCustomerRedeem (SOAP V2)
Allows you to redeem amount from a giftcard to the customer store credit.
Arguments:
Type Name Description
string sessionId
Session ID
string code Gift card code
string
customer_id Customer ID
string
store_id Store view ID
Return:
Type Description
boolean True if the amount is redeemed
Faults:
Fault Code Fault Message
100 Gift card does not exists.
101 Gift card is not valid.
103 Redemption functionality is disabled.
104 Unable to redeem gift card.
Examples
Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$code = "giftcardcode";
$customerId = 1;
$storeId = 1;
$giftcardInfo = $proxy->call(
$sessionId,
"giftcard_customer.redeem",
array(
$code,
$customerId,
$storeId
)
);
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary
$result = $proxy->giftcardCustomerRedeem($sessionId, 'giftcardcode', '1', '1');
var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey'));
$result = $proxy->giftcardCustomerRedeem((object)array('sessionId' => $sessionId->result, 'code' => 'giftcardcode', 'customerId' => '1', 'storeId' => '1'));
var_dump($result->result);
|
{
"url": "http://www.magentocommerce.com/api/soap/enterpriseGiftCard/giftCardCustomer/giftcard_customer.redeem.html",
"source_domain": "www.magentocommerce.com",
"snapshot_id": "crawl=CC-MAIN-2015-35",
"warc_metadata": {
"Content-Length": "77510",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:GNQRSDDONNZNA732SHK7NKQL35CEKV32",
"WARC-Concurrent-To": "<urn:uuid:8b4d9415-e7f2-4966-8a64-9da756474399>",
"WARC-Date": "2015-08-31T22:49:34Z",
"WARC-IP-Address": "66.211.190.109",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:PTEW77SY3XXQHRAUN7YBP2DW7FIKFFI7",
"WARC-Record-ID": "<urn:uuid:9cfc7f74-6b7e-4995-9db7-0e900d92646c>",
"WARC-Target-URI": "http://www.magentocommerce.com/api/soap/enterpriseGiftCard/giftCardCustomer/giftcard_customer.redeem.html",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:92fee174-7c62-4d42-9fb2-aa3712ecbc8c>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-171-96-226.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
16,
17,
22,
23,
41,
98,
99,
120,
121,
149,
150,
158,
197,
234,
235,
309,
310,
321,
322,
344,
361,
372,
399,
406,
430,
437,
460,
461,
469,
470,
487,
526,
527,
535,
536,
561,
592,
620,
662,
694,
695,
704,
705,
729,
791,
840,
841,
865,
882,
896,
897,
927,
943,
975,
986,
1002,
1024,
1042,
1048,
1051,
1075,
1161,
1254,
1255,
1335,
1354,
1401,
1467,
1468,
1559,
1561,
1721,
1722
],
"line_end_idx": [
16,
17,
22,
23,
41,
98,
99,
120,
121,
149,
150,
158,
197,
234,
235,
309,
310,
321,
322,
344,
361,
372,
399,
406,
430,
437,
460,
461,
469,
470,
487,
526,
527,
535,
536,
561,
592,
620,
662,
694,
695,
704,
705,
729,
791,
840,
841,
865,
882,
896,
897,
927,
943,
975,
986,
1002,
1024,
1042,
1048,
1051,
1075,
1161,
1254,
1255,
1335,
1354,
1401,
1467,
1468,
1559,
1561,
1721,
1722,
1748
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1748,
"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.06451612710952759,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05913978070020676,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.4543010890483856,
"rps_doc_frac_unique_words": 0.5480226278305054,
"rps_doc_mean_word_length": 7.0282487869262695,
"rps_doc_num_sentences": 14,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.383366584777832,
"rps_doc_word_count": 177,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.05627010017633438,
"rps_doc_frac_chars_dupe_6grams": 0.05627010017633438,
"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.025723470374941826,
"rps_doc_frac_chars_top_3gram": 0.043408360332250595,
"rps_doc_frac_chars_top_4gram": 0.043408360332250595,
"rps_doc_books_importance": -117.4710922241211,
"rps_doc_books_importance_length_correction": -108.2745132446289,
"rps_doc_openwebtext_importance": -66.84248352050781,
"rps_doc_openwebtext_importance_length_correction": -66.84248352050781,
"rps_doc_wikipedia_importance": -56.79095458984375,
"rps_doc_wikipedia_importance_length_correction": -51.81081008911133
},
"fasttext": {
"dclm": 0.03514581918716431,
"english": 0.3715093731880188,
"fineweb_edu_approx": 2.2739603519439697,
"eai_general_math": 0.0015696299960836768,
"eai_open_web_math": 0.00815058033913374,
"eai_web_code": 0.8342999815940857
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "658.85",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Business",
"level_3": "Management"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
3,112,961,523,752,740,400 |
16.20 - 16.50 - Definición de entornos planeados - Teradata Viewpoint - Teradata Workload Management
Teradata® Viewpoint Guía del usuario
Product
Teradata Viewpoint
Teradata Workload Management
Release Number
16.20
16.50
Release Date
Julio de 2021
Content Type
Guía del usuario
Publication ID
B035-2206-071K-ESN
Language
Español (España)
Los Entornos planeados se utilizan para reasignar los recursos del sistema durante horarios programados. Los entornos planeados se activan cuando sucede al menos un evento planeado asociado. El entorno planeado estándar es Always(Siempre) y no se puede eliminar ni mover. El orden de prioridad es de menor a mayor, leyendo de izquierda a derecha. Si hay varios eventos planeados activos al mismo tiempo, se activa el entorno planeado con mayor prioridad.
1. Edite o cree un conjunto de reglas.
2. En la barra de herramientas de conjunto de reglas, haga clic en Estados.
3. Junto a Entornos planeados, haga clic en .
Un entorno planeado se agrega con el nombre estándar newEnv.
4. Junto al entorno planeado, haga clic en .
5. Introduzca un nombre.
6. Haga clic fuera del nombre.
7. Si existen varios entornos planeados, haga clic en el nombre de un entorno planeado y arrástrelo a la izquierda o a la derecha en la lista para cambiar el orden de prioridad.
8. [Opcional] Junto al nombre del entorno, haga clic en para eliminar un entorno planeado.
No se puede eliminar el entorno Always(Siempre).
9. Haga clic en Save (Guardar).
|
{
"url": "https://docs.teradata.com/r/wBBPGIsLxG~PXWTf2Qljcg/USgV51LSGheUv8coIxCepw",
"source_domain": "docs.teradata.com",
"snapshot_id": "crawl=CC-MAIN-2021-43",
"warc_metadata": {
"Content-Length": "270722",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:W7UCRCRNZGZAKYPBZZB7Z2JJCZQW74QI",
"WARC-Concurrent-To": "<urn:uuid:d1909fb8-38d4-4b66-b1b8-b59c06aab5e0>",
"WARC-Date": "2021-10-16T16:14:27Z",
"WARC-IP-Address": "3.14.232.74",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UT3ARUW4HFMGUNNZH3FFXVAW5CS3KECB",
"WARC-Record-ID": "<urn:uuid:acce3455-2cf2-4a7b-9f94-ab1d59ec2223>",
"WARC-Target-URI": "https://docs.teradata.com/r/wBBPGIsLxG~PXWTf2Qljcg/USgV51LSGheUv8coIxCepw",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:546ee3b0-0304-40b3-a80a-51ee11f38f83>"
},
"warc_info": "isPartOf: CC-MAIN-2021-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-227\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,
101,
102,
139,
140,
148,
167,
196,
211,
217,
223,
236,
250,
263,
280,
295,
314,
323,
340,
795,
836,
914,
962,
1027,
1074,
1101,
1134,
1314,
1407,
1460
],
"line_end_idx": [
101,
102,
139,
140,
148,
167,
196,
211,
217,
223,
236,
250,
263,
280,
295,
314,
323,
340,
795,
836,
914,
962,
1027,
1074,
1101,
1134,
1314,
1407,
1460,
1493
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1493,
"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.05119454115629196,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.01365188043564558,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.24232082068920135,
"rps_doc_frac_unique_words": 0.4698275923728943,
"rps_doc_mean_word_length": 5.099137783050537,
"rps_doc_num_sentences": 29,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.382646083831787,
"rps_doc_word_count": 232,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.11834319680929184,
"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.047337278723716736,
"rps_doc_frac_chars_top_3gram": 0.050718508660793304,
"rps_doc_frac_chars_top_4gram": 0.055790361016988754,
"rps_doc_books_importance": -149.45538330078125,
"rps_doc_books_importance_length_correction": -141.08799743652344,
"rps_doc_openwebtext_importance": -79.4744644165039,
"rps_doc_openwebtext_importance_length_correction": -79.4744644165039,
"rps_doc_wikipedia_importance": -60.64743423461914,
"rps_doc_wikipedia_importance_length_correction": -49.15646743774414
},
"fasttext": {
"dclm": 0.8522390723228455,
"english": 0.004249149933457375,
"fineweb_edu_approx": 1.0297762155532837,
"eai_general_math": 0.000007990000085555948,
"eai_open_web_math": 0.46650898456573486,
"eai_web_code": 0.3684777021408081
}
}
|
{
"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.758",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
111,963,550,230,528,660 |
Data Recovery Oxfordshire Services
24 Hour Data Recovery Helpline Tel: +44 (0)1865 469468
Stop! Don’t Make Things Worse
When something stops working, it’s natural to attempt to find a way to fix it before calling for help. We’re all used to the odd random issue, which might cause the operating system to crash, or some things to stop working, which are fixed by rebooting the computer. This is however often masking an underlying issue, particularly if it’s a regular occurrence. If it’s a problem with a hard disk drive, it will eventually get worse, and lead to serious damage.
If the computer will not boot, it is important not to panic, but instead stop and assess the options. Attempting to keep rebooting a computer particularly if it is making unusual noises, can potentially lead to an escalation of the damage causing a total loss of data. The sensible course of action is to call for help, which could include consulting with a data recovery company who can give the correct guidance.
Typical Scenarios
A common problem seen is when a disk drive suffers corruption of the partition table or volume boot sector at the front of the disk, causing the volume to be inaccessible. In this situation the operating system may display a dialog box saying that the drive should be formatted before proceeding. In such a scenario, it is important to stop, and consider what this would do.
It is tempting to either give the disk to a friend who dabbles, or even try running some software yourself. If the problem is due to data being corrupted by malware, this approach may work, but if it’s a physical disk issue, working on the disk could cause further damage to occur.
Truth is the Best Option
We all hate letting someone else know that our knowledge is limited, particularly if we’ve attempted some speculative solution which didn’t work. It is useful to the engineers to know what steps if any were taken to attempt a recovery of the data, as well as the sequence of events which lead to failure in the first place. This information could be vital in determining the best course of action for our data recovery engineers to take with a given storage media.
A common reason for someone not wanting to tell the truth is that they do not want their boss to find out the real cause of the failure. Always tell the data recovery engineers what happened, as they will in almost all cases determine what occurred, which may waste valuable time. This is especially important if a laptop was dropped, or liquid was spilt onto the device.
Stop Digging a Hole
The phrase “when in a hole, stop digging” is well known, and particularly apt when it comes to data storage devices when a failure has occurred. Before doing anything else, it is important to understand the nature of the failure, as that will determine the best course of action, and what will make the situation worse. Stop and think before doing anything, to avoid making the situation worse, which could reduce the likelihood of a successful data recovery.
One thing that data recovery engineers hate to hear is when somebody has attempted to recover the data themselves. While in some cases it does increase the complexity of the data recovery, the problems caused by this in many other situations could in the worst cases lead to an unnecessary total loss of data. This extends from the most common devices such as USB sticks, laptop and desktop hard drives, right through the most complex enterprise level RAID servers.
Copyright © 2015 DiskEng Data Recovery Oxfordshire - All Rights Reserved
|
{
"url": "http://datarecoveryoxfordshire.co.uk/stop-dont-make-things-worse/",
"source_domain": "datarecoveryoxfordshire.co.uk",
"snapshot_id": "crawl=CC-MAIN-2019-47",
"warc_metadata": {
"Content-Length": "43886",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:PCTPKNCITSY3UX3TJQLMYLDCSK3X54ZV",
"WARC-Concurrent-To": "<urn:uuid:aff27daf-8440-44b4-a7ac-2537e1420886>",
"WARC-Date": "2019-11-14T21:13:33Z",
"WARC-IP-Address": "109.203.99.70",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:IYW42CEXKK626KHT5MZQLMMWNQPA6OKM",
"WARC-Record-ID": "<urn:uuid:974a646f-a5f9-49dd-b945-2fd8b81374fd>",
"WARC-Target-URI": "http://datarecoveryoxfordshire.co.uk/stop-dont-make-things-worse/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:cd6dacbe-b13d-4400-80aa-284aac2ed86c>"
},
"warc_info": "isPartOf: CC-MAIN-2019-47\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-147.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
35,
36,
91,
92,
122,
123,
584,
585,
1000,
1001,
1019,
1020,
1395,
1396,
1678,
1679,
1704,
1705,
2170,
2171,
2543,
2544,
2564,
2565,
3025,
3026,
3492,
3493
],
"line_end_idx": [
35,
36,
91,
92,
122,
123,
584,
585,
1000,
1001,
1019,
1020,
1395,
1396,
1678,
1679,
1704,
1705,
2170,
2171,
2543,
2544,
2564,
2565,
3025,
3026,
3492,
3493,
3565
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3565,
"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.4785100221633911,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.005730660166591406,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.11461318284273148,
"rps_doc_frac_unique_words": 0.4496753215789795,
"rps_doc_mean_word_length": 4.662337779998779,
"rps_doc_num_sentences": 26,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.06054162979126,
"rps_doc_word_count": 616,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.014623959548771381,
"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.03760445863008499,
"rps_doc_frac_chars_top_3gram": 0.007311979774385691,
"rps_doc_frac_chars_top_4gram": 0.010445679537951946,
"rps_doc_books_importance": -295.2266845703125,
"rps_doc_books_importance_length_correction": -295.2266845703125,
"rps_doc_openwebtext_importance": -171.4396209716797,
"rps_doc_openwebtext_importance_length_correction": -171.4396209716797,
"rps_doc_wikipedia_importance": -98.00615692138672,
"rps_doc_wikipedia_importance_length_correction": -98.00615692138672
},
"fasttext": {
"dclm": 0.023437680676579475,
"english": 0.9550169110298157,
"fineweb_edu_approx": 2.578839063644409,
"eai_general_math": 0.3636099100112915,
"eai_open_web_math": 0.2912929058074951,
"eai_web_code": 0.1061519980430603
}
}
|
{
"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.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": "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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "10",
"label": "Knowledge Article"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-6,058,605,132,135,847,000 |
HTTPS Everywhere Atlas
Embedded content loaded from third-party domains (for example, YouTube, Google Analytics, ad networks, or CDNs) may also be affected. You can test this by loading the web page in question in a browser with HTTPS Everywhere installed and pulling down the HTTPS Everywhere rules menu. This will show a list of HTTPS Everywhere rules that were applied as the page was loaded, including rules that might have affected embedded content from other domains.
The stable (as yet unreleased) branch contains the following rule that is enabled by default:
<!--
Fully covered subdomains:
- (www.)
- helpdesk
- reg
- wiki
--><ruleset name="SoCal Linux Expo.org">
<target host="socallinuxexpo.org"/>
<target host="reg.socallinuxexpo.org"/>
<target host="www.socallinuxexpo.org"/>
<!-- Not secured by server:
-->
<securecookie host="^reg\.socallinuxexpo\.org$" name=".+"/>
<rule from="^http:" to="https:"/>
</ruleset>
SoCal_Linux_Expo.org.xml File a bug
The release branch contains the following rules that are enabled by default:
<!--
Fully covered subdomains:
- (www.)
- helpdesk
- reg
- wiki
--><ruleset name="SoCal Linux Expo.org">
<target host="socallinuxexpo.org"/>
<target host="reg.socallinuxexpo.org"/>
<target host="www.socallinuxexpo.org"/>
<!-- Not secured by server:
-->
<securecookie host="^reg\.socallinuxexpo\.org$" name=".+"/>
<rule from="^http:" to="https:"/>
</ruleset>
SoCal_Linux_Expo.org.xml File a bug
The HTTPS Everywhere developers welcome corrections and updates to rules. Please see our developer information and documentation of the ruleset format. If filing a bug in the Tor Project's Trac bug tracker, you can use the shared username and password cypherpunks / writecode; please ensure that the bug is marked as applying to HTTPS Everywhere.
Information current as of:
current release ba424424 2020-05-20 12:39:18 -0700;
next release 7fdec24a 2020-07-11 04:22:50 +0000;
|
{
"url": "https://atlas.eff.org/domains/socallinuxexpo.org.html",
"source_domain": "atlas.eff.org",
"snapshot_id": "crawl=CC-MAIN-2020-29",
"warc_metadata": {
"Content-Length": "5419",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:U75QX6S5DQU3Q3N52XYQIK5HSUBZOZXJ",
"WARC-Concurrent-To": "<urn:uuid:b1a5026a-8d6f-41b8-8e86-cbf63522706e>",
"WARC-Date": "2020-07-11T21:49:26Z",
"WARC-IP-Address": "173.239.79.196",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:DWDIU557TABYLAFSRPVIG36L2GDP3JHA",
"WARC-Record-ID": "<urn:uuid:4f99b0cd-23c3-4815-a077-1617dcc4cb78>",
"WARC-Target-URI": "https://atlas.eff.org/domains/socallinuxexpo.org.html",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:632ed70e-57a4-475e-b270-70b57ae67fcc>"
},
"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-198.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,
23,
24,
475,
476,
570,
571,
576,
603,
604,
615,
628,
636,
645,
646,
687,
688,
725,
766,
807,
808,
809,
838,
847,
908,
909,
910,
945,
946,
957,
958,
997,
998,
1075,
1076,
1081,
1108,
1109,
1120,
1133,
1141,
1150,
1151,
1192,
1193,
1230,
1271,
1312,
1313,
1314,
1343,
1352,
1413,
1414,
1415,
1450,
1451,
1462,
1463,
1502,
1503,
1850,
1851,
1878,
1879,
1880,
1932
],
"line_end_idx": [
23,
24,
475,
476,
570,
571,
576,
603,
604,
615,
628,
636,
645,
646,
687,
688,
725,
766,
807,
808,
809,
838,
847,
908,
909,
910,
945,
946,
957,
958,
997,
998,
1075,
1076,
1081,
1108,
1109,
1120,
1133,
1141,
1150,
1151,
1192,
1193,
1230,
1271,
1312,
1313,
1314,
1343,
1352,
1413,
1414,
1415,
1450,
1451,
1462,
1463,
1502,
1503,
1850,
1851,
1878,
1879,
1880,
1932,
1980
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1980,
"ccnet_original_nlines": 66,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20792078971862793,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.014851490035653114,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3391089141368866,
"rps_doc_frac_unique_words": 0.5443037748336792,
"rps_doc_mean_word_length": 6.097046375274658,
"rps_doc_num_sentences": 35,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.636791706085205,
"rps_doc_word_count": 237,
"rps_doc_frac_chars_dupe_10grams": 0.39584773778915405,
"rps_doc_frac_chars_dupe_5grams": 0.39584773778915405,
"rps_doc_frac_chars_dupe_6grams": 0.39584773778915405,
"rps_doc_frac_chars_dupe_7grams": 0.39584773778915405,
"rps_doc_frac_chars_dupe_8grams": 0.39584773778915405,
"rps_doc_frac_chars_dupe_9grams": 0.39584773778915405,
"rps_doc_frac_chars_top_2gram": 0.06228373944759369,
"rps_doc_frac_chars_top_3gram": 0.024913489818572998,
"rps_doc_frac_chars_top_4gram": 0.03598615899682045,
"rps_doc_books_importance": -160.68142700195312,
"rps_doc_books_importance_length_correction": -160.68142700195312,
"rps_doc_openwebtext_importance": -99.96004486083984,
"rps_doc_openwebtext_importance_length_correction": -99.96004486083984,
"rps_doc_wikipedia_importance": -95.65422058105469,
"rps_doc_wikipedia_importance_length_correction": -95.65422058105469
},
"fasttext": {
"dclm": 0.15590590238571167,
"english": 0.7333172559738159,
"fineweb_edu_approx": 2.0819053649902344,
"eai_general_math": 0.009350179694592953,
"eai_open_web_math": 0.16659528017044067,
"eai_web_code": 0.021853739395737648
}
}
|
{
"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.678",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "4",
"label": "Graduate/Expert Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,719,674,218,319,872,000 |
Comments on: Monitoring Changes to Table Data https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/ Miscellaneous Random Oracle Topics: Stop, Think, ... Understand Mon, 20 Mar 2017 17:34:23 +0000 hourly 1 http://wordpress.com/ By: damirvadas https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4656 Tue, 24 Apr 2012 15:55:58 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4656 Charles,
Thank you … will take a look
Rg,
Damir
]]>
By: Charles Hooper https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4655 Tue, 24 Apr 2012 15:08:34 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4655 Damir,
I am not sure that I understand your question. My VBS script and EXE referenced above allow the user to select which columns of a table to log, and which columns that undergo changes will trigger the logging. The existing and the new values may be captured in the same logging table row. If you capture the existing and the new values, you can determine how the value has changed, and you can determine how the row changed with the assistance of the LOG_TRANSACTION_TYPE column in the logging table.
]]>
By: Charles Hooper https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4654 Tue, 24 Apr 2012 15:02:04 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4654 Damir,
A Windows VBS/Internet Explorer version:
https://hoopercharles.wordpress.com/2010/08/25/oracle-logging-trigger-creator/
An executable version that is part of a much larger project:
https://hoopercharles.wordpress.com/2012/03/15/hyper-extended-oracle-performance-monitor-6-0-beta/
]]>
By: damirvadas https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4653 Tue, 24 Apr 2012 14:45:27 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4653 Hi!
I look in your example and I do not see how easy to see only changes? Not whole rows?
Did I missed something?
Rg
Damir
]]>
By: damirvadas https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4652 Tue, 24 Apr 2012 14:42:37 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4652 Charles,
This program, that you mention, is this public or private stuff …
Any demo/download?
Rg
Damir
]]>
By: hourim https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4587 Sat, 24 Mar 2012 12:13:01 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4587 Charles,
What I have implemented in several real life applications is a little bit different from the example I mentioned in my blog. In these applications the table to be audited (emp here) contains the columns dml_usr, dml_dat, dml_pgm so that the historical table (emp_history here) doesn’t contain any trigger. As such there is no trigger at all in the historical table.
Yes, your suggestion to use DEFAULT values could be envisaged and might give the same results.
As per regards to performance, I can assure you this audit history has never caused us any noticeable performance problem. In addition I can tell you that what was initially implemented as an audit task (to maintain a change history), you could not imagine, how it reveals itself as a wonderful tool for debugging and understanding some bugs in PRODUCTION, just by looking at those dml_usr, dml_dat, dml_pgm (which in reality have been implemented as user_ins, dat_ins, pgm_ins and user_upd, dat_upd, pgm_upd)
]]>
By: Charles Hooper https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4586 Sat, 24 Mar 2012 01:06:48 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4586 You are correct that the OP was using Microsoft SQL Server – he was previously running Oracle Database but switched to SQL Server to save money.
My comment was intended to state that while I probably could not write a trigger in SQL Server (or Sybase) I could understand what your trigger was accomplishing (even though the trigger syntax appears a bit different than that used by Oracle). I used to be able to say the same about Fortran, COBOL, ARREX and a couple of other programming languages, but those languages are just distant now memories.
]]>
By: Charles Hooper https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4585 Sat, 24 Mar 2012 00:54:33 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4585 Marcus,
Nice ideas. “Continuous Query Notification” is a feature that I was unaware of – probably a sign that I need to stop reading/reviewing books, and instead read the official Oracle Database documentation instead. 🙂
“Continuous Query Notification”:
http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_cqn.htm
]]>
By: Charles Hooper https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4584 Sat, 24 Mar 2012 00:46:44 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4584 Mohamed,
I just read your article – nice, and you covered the topic a week before it was mentioned here.
For your emp_history table, would you grant to PUBLIC just INSERT and not SELECT, UPDATE, and DELETE to minimize the chances of the problems mentioned by Pete. Or possibly call a definer’s rights (http://docs.oracle.com/cd/E11882_01/timesten.112/e21639/accesscntl.htm#BABDDCHC ) procedure within the trigger code to perform the insert into your _HISTORY tables?
I see that your method makes use of two table triggers – does that present more of a performance overhead than a single trigger?
Two of your _HISTORY columns are defined as follows:
dml_usr varchar2(48),
dml_dat date
I would probably create those two columns with the following definitions so that I would not need to populate those columns in a trigger (that is not to say that this method is better than your method):
dml_usr varchar2(30) DEFAULT USER,
dml_dat date DEFAULT SYSDATE
I have not experimented yet, but could a DEFAULT value also be declared for your lv_module column?
]]>
By: talebzadeh https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/#comment-4583 Fri, 23 Mar 2012 22:42:38 +0000 http://hoopercharles.wordpress.com/?p=6198#comment-4583 The same code in Oracle
drop sequence identity;
CREATE SEQUENCE identity
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH 1
INCREMENT BY 1
CACHE 1000;
drop table source;
create table source
(
col1 number not null
,col2 varchar(30) not null
);
alter table source add constraint source_pk primary key (col1);
desc source
drop table source_audit;
create table source_audit
(
col1 number not null
,col2 varchar(30) not null
,who varchar(30) not null
,application varchar(30) null
,hostname varchar(30) null
,when_changed date not null
,action char(1) not null
);
desc source_audit
create or replace trigger source_b_ud_tr
before update or delete
on source
for each row
declare
v_who varchar(30) := USER;
v_application varchar(30);
v_hostname varchar(30);
v_when_changed date := sysdate;
v_action char(1);
begin
SELECT
substr(sys_context('USERENV','HOST'),1,30)
, substr(sys_context('USERENV','MODULE'),1,30)
INTO v_hostname
,v_application
FROM
dual;
if updating then
v_action := 'U';
elsif deleting then
v_action := 'D';
end if;
insert into source_audit
(
col1
,col2
,who
,application
,hostname
,when_changed
,action
)
values
(
:old.col1
,:old.col2
,v_who
,v_application
,v_hostname
,v_when_changed
,v_action
);
end source_b_ud_tr;
/
show error
create or replace trigger source_a_iu_tr
after insert or update
on source
for each row
declare
v_who varchar(30) := USER;
v_application varchar(30);
v_hostname varchar(30);
v_when_changed date := sysdate;
v_action char(1);
begin
SELECT
substr(sys_context('USERENV','HOST'),1,30)
, substr(sys_context('USERENV','MODULE'),1,30)
INTO v_hostname
,v_application
FROM
dual;
if inserting then
v_action := 'I';
elsif updating then
v_action := 'U';
end if;
insert into source_audit
(
col1
,col2
,who
,application
,hostname
,when_changed
,action
)
values
(
:new.col1
,:new.col2
,v_who
,v_application
,v_hostname
,v_when_changed
,v_action
);
end source_a_iud_tr;
/
show error
exit
Well it works. Let us try it
insert into source values (identity.nextval,'LOndon');
1 row created.
update source set col2 = 'London';
1 row updated.
insert into source values (identity.nextval,'NY');
1 row created.
insert into source values (identity.nextval,'LA');
1 row created.
delete from source where col2 = 'LA';
1 row deleted.
select * from source_audit;
COL1 COL2 WHO APPLICATION
---------- ------------------------------ ------------------------------ ------------------------------
HOSTNAME WHEN_CHANGED A
------------------------------ ------------------- -
2 LOndon SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:52:26 I
2 LOndon SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:52:50 U
2 London SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:52:50 U
3 NY SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:53:30 I
4 LA SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:53:39 I
4 LA SCRATCHPAD SQL*Plus
rhes564 23/03/2012 22:54:24 D
6 rows selected.
I am sure you guys can write better code than myself so please suggest where it can be bettered.
Mich
]]>
|
{
"url": "https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/feed/",
"source_domain": "hoopercharles.wordpress.com",
"snapshot_id": "crawl=CC-MAIN-2017-13",
"warc_metadata": {
"Content-Length": "23513",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:QY4QSF3VLZSVHPCMHSMZIJR2I25PZE37",
"WARC-Concurrent-To": "<urn:uuid:102e2d2d-a10c-4dac-8510-cbf1e3e804c1>",
"WARC-Date": "2017-03-28T23:33:45Z",
"WARC-IP-Address": "192.0.78.12",
"WARC-Identified-Payload-Type": null,
"WARC-Payload-Digest": "sha1:QB7BIEEOWOXAFDNQYICM6PN7NTMPJYNU",
"WARC-Record-ID": "<urn:uuid:12834dbd-9b29-435d-96dc-a29e97d9c6eb>",
"WARC-Target-URI": "https://hoopercharles.wordpress.com/2012/03/22/monitoring-changes-to-table-data/feed/",
"WARC-Truncated": "length",
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:60771cb4-f9b3-4396-9b5a-2532dba0f288>"
},
"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,
460,
461,
490,
494,
500,
501,
505,
713,
714,
1214,
1215,
1219,
1427,
1428,
1469,
1548,
1549,
1610,
1709,
1710,
1714,
1915,
1916,
2002,
2026,
2029,
2035,
2036,
2040,
2246,
2247,
2313,
2332,
2333,
2336,
2342,
2343,
2347,
2549,
2550,
2916,
2917,
3012,
3013,
3523,
3524,
3528,
3874,
3875,
4278,
4279,
4283,
4492,
4493,
4706,
4707,
4740,
4808,
4809,
4813,
5023,
5024,
5120,
5121,
5483,
5484,
5613,
5614,
5667,
5668,
5690,
5704,
5705,
5908,
5909,
5944,
5973,
5974,
6073,
6074,
6078,
6299,
6300,
6324,
6349,
6364,
6405,
6422,
6441,
6458,
6477,
6497,
6499,
6531,
6568,
6571,
6635,
6647,
6672,
6698,
6700,
6732,
6769,
6806,
6846,
6883,
6922,
6957,
6960,
6978,
7019,
7043,
7053,
7066,
7074,
7103,
7132,
7158,
7192,
7212,
7218,
7227,
7282,
7339,
7360,
7384,
7389,
7403,
7422,
7443,
7465,
7486,
7496,
7523,
7527,
7542,
7557,
7571,
7593,
7612,
7635,
7652,
7656,
7665,
7669,
7689,
7709,
7725,
7749,
7770,
7795,
7814,
7819,
7839,
7841,
7852,
7893,
7916,
7926,
7939,
7947,
7976,
8005,
8031,
8065,
8085,
8091,
8100,
8155,
8212,
8233,
8257,
8262,
8276,
8296,
8317,
8339,
8360,
8370,
8397,
8401,
8416,
8431,
8445,
8467,
8486,
8509,
8526,
8530,
8539,
8543,
8563,
8583,
8599,
8623,
8644,
8669,
8688,
8693,
8714,
8716,
8727,
8732,
8733,
8762,
8763,
8818,
8819,
8834,
8835,
8870,
8871,
8886,
8887,
8938,
8939,
8954,
8955,
9006,
9007,
9022,
9023,
9061,
9062,
9077,
9078,
9106,
9107,
9192,
9296,
9349,
9402,
9484,
9537,
9538,
9620,
9673,
9674,
9756,
9809,
9810,
9892,
9945,
9946,
10028,
10081,
10082,
10164,
10217,
10218,
10219,
10236,
10237,
10334,
10335,
10340,
10341
],
"line_end_idx": [
460,
461,
490,
494,
500,
501,
505,
713,
714,
1214,
1215,
1219,
1427,
1428,
1469,
1548,
1549,
1610,
1709,
1710,
1714,
1915,
1916,
2002,
2026,
2029,
2035,
2036,
2040,
2246,
2247,
2313,
2332,
2333,
2336,
2342,
2343,
2347,
2549,
2550,
2916,
2917,
3012,
3013,
3523,
3524,
3528,
3874,
3875,
4278,
4279,
4283,
4492,
4493,
4706,
4707,
4740,
4808,
4809,
4813,
5023,
5024,
5120,
5121,
5483,
5484,
5613,
5614,
5667,
5668,
5690,
5704,
5705,
5908,
5909,
5944,
5973,
5974,
6073,
6074,
6078,
6299,
6300,
6324,
6349,
6364,
6405,
6422,
6441,
6458,
6477,
6497,
6499,
6531,
6568,
6571,
6635,
6647,
6672,
6698,
6700,
6732,
6769,
6806,
6846,
6883,
6922,
6957,
6960,
6978,
7019,
7043,
7053,
7066,
7074,
7103,
7132,
7158,
7192,
7212,
7218,
7227,
7282,
7339,
7360,
7384,
7389,
7403,
7422,
7443,
7465,
7486,
7496,
7523,
7527,
7542,
7557,
7571,
7593,
7612,
7635,
7652,
7656,
7665,
7669,
7689,
7709,
7725,
7749,
7770,
7795,
7814,
7819,
7839,
7841,
7852,
7893,
7916,
7926,
7939,
7947,
7976,
8005,
8031,
8065,
8085,
8091,
8100,
8155,
8212,
8233,
8257,
8262,
8276,
8296,
8317,
8339,
8360,
8370,
8397,
8401,
8416,
8431,
8445,
8467,
8486,
8509,
8526,
8530,
8539,
8543,
8563,
8583,
8599,
8623,
8644,
8669,
8688,
8693,
8714,
8716,
8727,
8732,
8733,
8762,
8763,
8818,
8819,
8834,
8835,
8870,
8871,
8886,
8887,
8938,
8939,
8954,
8955,
9006,
9007,
9022,
9023,
9061,
9062,
9077,
9078,
9106,
9107,
9192,
9296,
9349,
9402,
9484,
9537,
9538,
9620,
9673,
9674,
9756,
9809,
9810,
9892,
9945,
9946,
10028,
10081,
10082,
10164,
10217,
10218,
10219,
10236,
10237,
10334,
10335,
10340,
10341,
10344
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 10344,
"ccnet_original_nlines": 257,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2100478559732437,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.05167464166879654,
"rps_doc_frac_lines_end_with_ellipsis": 0.003875969909131527,
"rps_doc_frac_no_alph_words": 0.40622010827064514,
"rps_doc_frac_unique_words": 0.40307971835136414,
"rps_doc_mean_word_length": 6.383152008056641,
"rps_doc_num_sentences": 106,
"rps_doc_symbol_to_word_ratio": 0.011483250185847282,
"rps_doc_unigram_entropy": 5.62856912612915,
"rps_doc_word_count": 1104,
"rps_doc_frac_chars_dupe_10grams": 0.08599404245615005,
"rps_doc_frac_chars_dupe_5grams": 0.15935859084129333,
"rps_doc_frac_chars_dupe_6grams": 0.15339860320091248,
"rps_doc_frac_chars_dupe_7grams": 0.12714630365371704,
"rps_doc_frac_chars_dupe_8grams": 0.10955016314983368,
"rps_doc_frac_chars_dupe_9grams": 0.08599404245615005,
"rps_doc_frac_chars_top_2gram": 0.0069533102214336395,
"rps_doc_frac_chars_top_3gram": 0.02043423056602478,
"rps_doc_frac_chars_top_4gram": 0.027245640754699707,
"rps_doc_books_importance": -780.3148803710938,
"rps_doc_books_importance_length_correction": -780.3148803710938,
"rps_doc_openwebtext_importance": -439.7555236816406,
"rps_doc_openwebtext_importance_length_correction": -439.7555236816406,
"rps_doc_wikipedia_importance": -323.82904052734375,
"rps_doc_wikipedia_importance_length_correction": -323.82904052734375
},
"fasttext": {
"dclm": 0.024946389719843864,
"english": 0.7057292461395264,
"fineweb_edu_approx": 1.6305444240570068,
"eai_general_math": 0.1894059181213379,
"eai_open_web_math": 0.12280458211898804,
"eai_web_code": 0.09840363264083862
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.44",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "5",
"label": "Comment Section"
},
"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": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
7,265,649,183,819,572,000 |
Putting the Domain Catalog to a Bit of Use
Apr 3, 2012, 1:33 PM
Tags: domino
Since I kind of backed my way into Domino development and administration, there are a number of areas of the server's functionality that I'm either unfamiliar with or casually brushed off as unreliable or not overly useful.
The Domain Catalog is one such area: I've been vaguely familiar with it, but have never bothered to tend to it or use it to solve problems. Fortunately, a problem it's perfectly suited to fell into my lap. In an overarching administration database, I want to get from a document with a database doclink to the database itself as quickly as possible. The easiest way, programmatically, is to use the .ServerHint and .DBReplicaID properties in a call to an unconnected NotesDatabase object's .openWithReplicaID(...) method.
This works well, but doesn't take into account the existence of local replicas - the admin database is running on one server, while the databases are created and linked to on the primary production server. Given that these servers aren't even in the same physical state, it's significantly faster to use a local replica when available, and only fall back when it hasn't been created yet. My first attempt at getting around this was direct: I first call .openByReplicaID(...) with a blank first parameter and, if it's not open, try the real server. Again, this worked, but is not ideal. It's programmatically ugly and, besides, there are more than just the two servers. .openWithFailover(...) looked promising, but seems to only accept real file paths, not replica IDs, which ruled it out for this purpose.
This is where the Domain Catalog comes in. It already contains a (hopefully-up-to-date) list of all of the replicas of every database in the domain along with everything I could need to connect to them. Furthermore, I realized I could use this information with a dash of extra intelligence: since I know which servers are physically closest, I could use that to find the "best" replica in each situation. So I made a view for this admin server ("Ganymede") of all of the database stubs, sorted first by replica ID and then by a column with this formula:
name := @Name([CN]; Server);
@If(
name="Ganymede"; 1;
name="Demeter"; 2;
name="Invidia"; 3;
name="Dionysus"; 4;
1000
)
With replica ID in hand, this means that I can just do a @DbLookup() in the view and the first result will always be the best, regardless of which server it is. I have another column with the full "Server!!FilePath" path, so I can just pull that value and do it in one function. Nice, easy, and it lets Domino take care of the nitty-gritty details for me.
New Comment
|
{
"url": "http://unenc.frostillic.us/blog/posts/2012/4/3/putting-the-domain-catalog-to-a-bit-of-use",
"source_domain": "unenc.frostillic.us",
"snapshot_id": "crawl=CC-MAIN-2021-49",
"warc_metadata": {
"Content-Length": "8594",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:KUP335HPTJOWVYT76H4K4X7SPCTFCXYS",
"WARC-Concurrent-To": "<urn:uuid:62b0e17f-6068-45c7-a72b-e1408813bd4d>",
"WARC-Date": "2021-11-27T07:47:04Z",
"WARC-IP-Address": "50.116.54.181",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:UMVKDRO72LYEDTVOFRWN6UGTO2EMKMC4",
"WARC-Record-ID": "<urn:uuid:f7ba8739-605e-42a2-854e-6ebcc3d58802>",
"WARC-Target-URI": "http://unenc.frostillic.us/blog/posts/2012/4/3/putting-the-domain-catalog-to-a-bit-of-use",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:3a101122-3e47-4012-8099-941744ed73d4>"
},
"warc_info": "isPartOf: CC-MAIN-2021-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-155\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
43,
44,
65,
66,
79,
80,
304,
305,
827,
828,
1634,
1635,
2189,
2190,
2219,
2224,
2249,
2273,
2297,
2322,
2332,
2334,
2335,
2691,
2692
],
"line_end_idx": [
43,
44,
65,
66,
79,
80,
304,
305,
827,
828,
1634,
1635,
2189,
2190,
2219,
2224,
2249,
2273,
2297,
2322,
2332,
2334,
2335,
2691,
2692,
2703
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2703,
"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.44999998807907104,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.031034480780363083,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.20000000298023224,
"rps_doc_frac_unique_words": 0.5277162194252014,
"rps_doc_mean_word_length": 4.614190578460693,
"rps_doc_num_sentences": 26,
"rps_doc_symbol_to_word_ratio": 0.005172410048544407,
"rps_doc_unigram_entropy": 5.028890132904053,
"rps_doc_word_count": 451,
"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.017299380153417587,
"rps_doc_frac_chars_top_3gram": 0.023065829649567604,
"rps_doc_frac_chars_top_4gram": 0.009610760025680065,
"rps_doc_books_importance": -310.6040954589844,
"rps_doc_books_importance_length_correction": -310.6040954589844,
"rps_doc_openwebtext_importance": -140.10662841796875,
"rps_doc_openwebtext_importance_length_correction": -140.10662841796875,
"rps_doc_wikipedia_importance": -100.08924865722656,
"rps_doc_wikipedia_importance_length_correction": -100.08924865722656
},
"fasttext": {
"dclm": 0.03150302171707153,
"english": 0.9326291084289551,
"fineweb_edu_approx": 1.575163722038269,
"eai_general_math": 0.8357730507850647,
"eai_open_web_math": 0.3230673670768738,
"eai_web_code": 0.8266269564628601
}
}
|
{
"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": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "16",
"label": "Personal Blog"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
8,289,597,062,461,720,000 |
Visa Developer Community
Newbie
IAT visa net and ICA
Greetings, I need to get ICA visa net and ICA.. am I in the right place? Can someone tell me how to go about it pls?
2 REPLIES 2
Visa Dev Moderator
Re: IAT visa net and ICA
Hi @Tatum,
To answer your question, you are not in the right place for an IAT/ICA query because the IAT/ICA number is not directly related to the Visa Developer Portal, therefore, I will not be able to comment directly on how you will get the IAT/ICA number. Please contact the person asking you to provide IAT/ICA number for the significance of IAT/ICA.
However, I can help to provide you with further assistance, if you send an email and reference this community forum post to [email protected]
Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
Thanks,
Diana
Tags (2)
Newbie
Re: IAT visa net and ICA
Hi there,
when working on the essaytyper.pro project, I followed the guide from https://developer.visa.com/pages/encryption_guide
Best of luck
|
{
"url": "https://community.developer.visa.com/t5/Getting-Started-with-Visa/IAT-visa-net-and-ICA/td-p/9303",
"source_domain": "community.developer.visa.com",
"snapshot_id": "crawl=CC-MAIN-2019-35",
"warc_metadata": {
"Content-Length": "111141",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:LCJM5XXLY2HY2O2I3ZP2DAMP2SSWHM4N",
"WARC-Concurrent-To": "<urn:uuid:9d793fd1-b1a9-4e09-8e97-4f491109808a>",
"WARC-Date": "2019-08-24T14:34:44Z",
"WARC-IP-Address": "208.74.204.221",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:D4V2HLGJS44H7H2Q4FLJCWII24A3XB2P",
"WARC-Record-ID": "<urn:uuid:501dc701-14a9-4f3a-93b0-3d00f4a859b2>",
"WARC-Target-URI": "https://community.developer.visa.com/t5/Getting-Started-with-Visa/IAT-visa-net-and-ICA/td-p/9303",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7b1a2e07-30e8-4535-a3f0-52f1edcd5bf2>"
},
"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-36.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,
25,
26,
33,
34,
55,
56,
173,
174,
176,
177,
189,
208,
209,
234,
235,
246,
247,
249,
250,
594,
595,
738,
739,
741,
742,
744,
745,
876,
877,
885,
891,
892,
901,
908,
909,
934,
935,
945,
946,
1066,
1067
],
"line_end_idx": [
25,
26,
33,
34,
55,
56,
173,
174,
176,
177,
189,
208,
209,
234,
235,
246,
247,
249,
250,
594,
595,
738,
739,
741,
742,
744,
745,
876,
877,
885,
891,
892,
901,
908,
909,
934,
935,
945,
946,
1066,
1067,
1079
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1079,
"ccnet_original_nlines": 41,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.37021276354789734,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.10212765634059906,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.17446808516979218,
"rps_doc_frac_unique_words": 0.5573770403862,
"rps_doc_mean_word_length": 4.524590015411377,
"rps_doc_num_sentences": 12,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.337042808532715,
"rps_doc_word_count": 183,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.06763284653425217,
"rps_doc_frac_chars_dupe_6grams": 0.04830918088555336,
"rps_doc_frac_chars_dupe_7grams": 0.04830918088555336,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03381643071770668,
"rps_doc_frac_chars_top_3gram": 0.04830918088555336,
"rps_doc_frac_chars_top_4gram": 0.06280192732810974,
"rps_doc_books_importance": -101.76972198486328,
"rps_doc_books_importance_length_correction": -101.76972198486328,
"rps_doc_openwebtext_importance": -66.29389953613281,
"rps_doc_openwebtext_importance_length_correction": -55.58921432495117,
"rps_doc_wikipedia_importance": -57.57624435424805,
"rps_doc_wikipedia_importance_length_correction": -57.57624435424805
},
"fasttext": {
"dclm": 0.10764294862747192,
"english": 0.8560672402381897,
"fineweb_edu_approx": 0.9935199022293091,
"eai_general_math": 0.00684785982593894,
"eai_open_web_math": 0.16020077466964722,
"eai_web_code": 0.000005960000180493807
}
}
|
{
"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": "325.25",
"labels": {
"level_1": "Social sciences",
"level_2": "Political science",
"level_3": "Colonies and Emigration and immigration"
}
}
},
"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": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "6",
"label": "Not Applicable/Indeterminate"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,772,362,986,888,403,500 |
A Quick Way To Solve The ‘Discord Javascript Error”
| Last Updated On: January 1, 2021
NeoGamr.net is supported by its audience. When you buy through links on our site, we may earn an affiliate commission. Learn More
Discord Javascript Error
Discord is quite a useful application when it comes to gaming. However, since the Discord community has been increasing drastically, it is not just a gamers hub anymore.
Like all other apps, Discord is also prone to many errors, and “Discord Javascript Error” is one of them.
What Is JavaScript Discord Error? And How To Fix It?
Many users have reportedly experienced this Javascript Error. However, it is one of those errors that have little to no underlying reasons discovered. There is not much information about this error on Discord’s official website as well. However, this error has some tried and tested solutions.
Head to the solutions below to run the Discord Error-free:
1. Delete Discord Files
Just like all other programs, Discord stores temporary data on the computer to make it function as efficiently as possible. But, sometimes, these data files are the main culprit behind displaying this error and interfere when a program runs.
Now, to start the Discord error-free, it is important to delete the troublesome files.
Follow these steps, to delete the discord files:
1. First of all, Close the Discord from the Task Manager. To do so, right-click on the taskbar and select task manager from the drop menu. Locate the discord process from the running programs and select End Task.Discord icon in Task Manager
2. Now open the run dialogue box either by searching in the Windows Search Bar or by right-clicking the Windows start menu icon and then selecting the run from the options.
3. Once the run windows appear, type “%appdata%” in the dialogue box and hit the run button.Type Appdata in Windows Run Dialogue Box
4. Now once the corresponding Window opens, search for the folder named “discord” and right-click and press delete from the menu
5. Now launch the run dialogue box once again as in step 2.
6. Type “%localappdata%” in the dialogue box and press the run button.
7. Again find the Discord folder in this directory and delete it by right-clicking and then selecting delete from the menu.Discord Folder in LocalAppData
8. Go to the Discord installation folder and relaunch the Discord setup. Follow the on-screen installation instructions.
2. Whitelist/Remove Discord Files From Antivirus Software
Almost all the well-known antiviruses block some of the Discord installation files altering the access to those files.
Sometimes this blockage of files can cause a JavaScript error for Discord. One common file that is totally under the eye of every Antivirus is the “discord_voice” file. Now, to fix this issue, the simplest thing to do is to whitelist the discord files from Antivirus that is picking up and quarantining.
So there are tons of Antiviruses available in the market, and each has a different way to whitelist files. However, we are here using ever famous and free Avast antivirus.
1. Firstly, open the Avast by right-clicking the Avast icon and selecting Open Avast User interface option from the menu.
2. Now once the Avast interface opens, click on the Protection tab from the options running down on the left of the Avast Screen.Avast antivirus dashboard
3. Click on the Virus Chest option displayed on the right. In this section, you’ll find all the quarantined files.Virus Chest Option in Avast
4. Now locate the Discord related files in the list. Discord files can be identified easily as they start with Discord_ mostly or some similar variant.
5. Now, as you’ll hover over the files, three dots will appear, click those and then select “restore and add exception” from the given list.
6. Now repeat the step 5 above for each discord file.
7. Restart the installation for Discord.
To avoid any future interruptions from the Avast when installing the Discord, we can add the discord folders in exception in Avast. That means the installation process will be smooth without any interruptions from Avast or Avast, putting the files again in Virus Chest.
Follow these steps:
1. Again open the Avast as shown above.
2. Now go to settings by clicking on the menu icon located in the top right windows of Avast.
3. Then go to the General section displayed on the left.
4. Select the Exceptions option from the left in the general section.
5. Click on the “Add exception” option. Then browse the discord installation folder.
6. Select “Exception”.Add exception Option in Avast Antivirus
7. Now, launch the Discord installer to install the Discord.
3. Solution For Windows 7 Users
This solution is especially for the Windows 7 users who struggle to install and then run Discord on their computer.
However, few users have tried and tested a few tweaks that can fix this problem in no time. The solution is quite simple, keep reading to know how you can fix Discord javascript error for Windows 7.
1. Firstly, click on the Start Menu in your Windows 7. Then locate the “Computer” in the left menu, right-click on the “computer” and select manage from the drop-down menu. Allow the administrative permissions to proceed.
2. Now go to the Server Manager and then features. Click the option “add features” located on the right side.
3. Once the add feature wizard opens, locate the “Quality Windows Audio Video Experience” option. Check the given box and then click on Next to move forward.
4. Now, confirm the installation and ensure that you have selected an option named QWAVE when confirming.
5. Click the “Install” button and wait until the installation completes. Once the installation finishes, restart your computer. In this way, you’ll be saving the changes made to your PC.
4. Perform The Clean Reinstall
If you are not running Windows Server and also there are no issues related to the Antivirus, this method is the one for you! This method has successfully worked for many users, so give it a try.
The solution might be intuitive. However, each and every step of this solution is important. To reinstall the Discord properly, follow these steps:
1. Firstly, make sure that you have logged in to your PC as an administrator. This is necessary because only an administrator can delete the program files.
2. Now, search for the control panel from the Start menu. In windows 10, you can go to the control panel by clicking on the gear icon.
3. Once the control panel, view the options according to categories from the top right corner. Then locate “Uninstall a program” under the Programs section in the control panel.Windows 10 Control Panel Dashboard
4. Alternatively, if you are using the Settings app on the windows, click on the “Apps” option. This will open the list of all the installed programs on your PC.Windows 10 Settings Dashboard
5. Now locate the Discord app in the settings app or control panel.
6. Now click uninstall, this will open the uninstallation wizard for the Discord. The Window will prompt you, select “completely remove Discord on your computer.” Click yes to proceed uninstallation.Discord in Control Panel
7. Click Finish when the uninstallation completes and closes the Window.
So you think uninstalling the Discord removes all the files? Uh-uh, No! There are several related folders that need to be removed that are actually the problem in Discord Javascript Error. It is an essential step to reinstall the Discord properly.
To delete such files, follow the steps given below:
1. Open the Run dialog box, either by searching it on the search bar or by clicking the Windows + R keys simultaneously. This will open the run box.
2. Once the dialog box opens, type %appdata% in the box and click “OK”.Appdata in Run Dialogue Box
3. This will open a directory, locate the Discord folder in the given files. Right-click the Discord folder and select delete option from the menu
4. Now open the Run dialog box again as in step 1. Then type, %localappdata% in the dialog box and click “OK”.
5. Again, locate the Discord folder and delete that as well.
6. Ensure that the Discord folders are completely deleted, and there is no remaining folder.
Now, that all the uninstallation and deletion of discord files is done, it is time to reinstall the Discord from scratch. Firstly, download the latest version of Discord setup from its official website.
Then, follow the on-screen installation steps and make sure you are following the steps carefully. Now, hopefully, the javascript error won’t appear again.
5. Launch Discord Without Administrative Privileges/Rights
1. Right Click the Discord application and select the “properties” option. You can find the application on your Desktop or pin to your taskbar. If you can’t find it, simply search in the search bar.
2. Once the Window opens, go to the shortcut tab and then select the “Advanced..” button.Discord Properties Advanced Button
3. Uncheck the option Run as administrator and then click OK to save changes.Discord Advanced Properties
4. Then again, go to the compatibility tab and uncheck the option “run as administrator” there as well. Apply changes by clicking OK.
Now, this will start the Discord as non-admin every time you launch the Discord. This might solve your problem, however, if it doesn’t give the administrative privileges again and then relaunch the Discord.
Final Overview
This marks the end of our discussion on How to fix the Discord Javascript error. Above are the few most commonly approached to resolve the Javascript issue while installing the Discord.
These methods are not just Javascript error centric. Even if you have some other Discord issue, try the fixes above, and 9/10 times these will make the issue go away.
Your Author
Leave a Comment
|
{
"url": "https://www.neogamr.net/discord-javascript-error/",
"source_domain": "www.neogamr.net",
"snapshot_id": "crawl=CC-MAIN-2021-25",
"warc_metadata": {
"Content-Length": "113384",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:A4X4ZFNC3GQKVIL7MOCB2SJHMOQFIML7",
"WARC-Concurrent-To": "<urn:uuid:a8df2047-40a4-4135-9d8c-c61b874b6b87>",
"WARC-Date": "2021-06-22T05:47:18Z",
"WARC-IP-Address": "104.154.179.227",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:JYLPCDYBPYLOQXOOQQOQVZERMML7YD5N",
"WARC-Record-ID": "<urn:uuid:761028c8-6b54-4b11-88f2-b721f977d6b0>",
"WARC-Target-URI": "https://www.neogamr.net/discord-javascript-error/",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:bc23c0d2-ad92-4655-8aa9-e79e0dd2ff0f>"
},
"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-40.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,
52,
53,
88,
90,
222,
247,
248,
418,
419,
525,
526,
527,
580,
581,
582,
876,
877,
936,
937,
938,
962,
963,
964,
1206,
1207,
1294,
1295,
1344,
1345,
1588,
1763,
1898,
2029,
2091,
2164,
2320,
2443,
2444,
2502,
2503,
2504,
2623,
2624,
2928,
2929,
3101,
3102,
3226,
3383,
3527,
3681,
3824,
3880,
3923,
3924,
4194,
4195,
4215,
4216,
4258,
4354,
4413,
4485,
4572,
4636,
4699,
4700,
4732,
4733,
4734,
4850,
4851,
5050,
5051,
5275,
5387,
5547,
5655,
5844,
5845,
5876,
5877,
5878,
6073,
6074,
6222,
6223,
6381,
6518,
6732,
6925,
6995,
7221,
7296,
7297,
7545,
7546,
7598,
7599,
7750,
7851,
8000,
8113,
8176,
8271,
8272,
8475,
8476,
8632,
8633,
8634,
8693,
8694,
8695,
8896,
9022,
9129,
9265,
9266,
9473,
9474,
9475,
9490,
9491,
9677,
9678,
9845,
9846,
9858,
9859,
9860,
9861
],
"line_end_idx": [
52,
53,
88,
90,
222,
247,
248,
418,
419,
525,
526,
527,
580,
581,
582,
876,
877,
936,
937,
938,
962,
963,
964,
1206,
1207,
1294,
1295,
1344,
1345,
1588,
1763,
1898,
2029,
2091,
2164,
2320,
2443,
2444,
2502,
2503,
2504,
2623,
2624,
2928,
2929,
3101,
3102,
3226,
3383,
3527,
3681,
3824,
3880,
3923,
3924,
4194,
4195,
4215,
4216,
4258,
4354,
4413,
4485,
4572,
4636,
4699,
4700,
4732,
4733,
4734,
4850,
4851,
5050,
5051,
5275,
5387,
5547,
5655,
5844,
5845,
5876,
5877,
5878,
6073,
6074,
6222,
6223,
6381,
6518,
6732,
6925,
6995,
7221,
7296,
7297,
7545,
7546,
7598,
7599,
7750,
7851,
8000,
8113,
8176,
8271,
8272,
8475,
8476,
8632,
8633,
8634,
8693,
8694,
8695,
8896,
9022,
9129,
9265,
9266,
9473,
9474,
9475,
9490,
9491,
9677,
9678,
9845,
9846,
9858,
9859,
9860,
9861,
9876
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 9876,
"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.36395761370658875,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.005047960206866264,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.18778395652770996,
"rps_doc_frac_unique_words": 0.283353716135025,
"rps_doc_mean_word_length": 4.790085792541504,
"rps_doc_num_sentences": 161,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 5.244712829589844,
"rps_doc_word_count": 1634,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.01712021976709366,
"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.04216175153851509,
"rps_doc_frac_chars_top_3gram": 0.005366039928048849,
"rps_doc_frac_chars_top_4gram": 0.00804905965924263,
"rps_doc_books_importance": -831.0824584960938,
"rps_doc_books_importance_length_correction": -831.0824584960938,
"rps_doc_openwebtext_importance": -365.6859130859375,
"rps_doc_openwebtext_importance_length_correction": -365.6859130859375,
"rps_doc_wikipedia_importance": -229.6302490234375,
"rps_doc_wikipedia_importance_length_correction": -229.6302490234375
},
"fasttext": {
"dclm": 0.06951075792312622,
"english": 0.8927794694900513,
"fineweb_edu_approx": 1.4762834310531616,
"eai_general_math": 0.6148467659950256,
"eai_open_web_math": 0.21042639017105103,
"eai_web_code": 0.12483209371566772
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.467",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.67",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "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": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "21",
"label": "Customer Support"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "3",
"label": "Mostly Correct"
},
"secondary": {
"code": "4",
"label": "Highly Correct"
}
},
"education_level": {
"primary": {
"code": "1",
"label": "General Audience"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,213,291,214,993,298,000 |
IDebugCustomAttributeQuery2IDebugCustomAttributeQuery2
Détermine l’existence d’un attribut personnalisé de ce champ et, si elle existe, retourne les informations d’attribut.Determines the existence of a custom attribute for this field and, if it exists, returns the attribute information.
SyntaxeSyntax
IDebugCustomAttributeQuery2 : IDebugCustomAttributeQuery
Notes pour les implémenteursNotes for Implementers
Un fournisseur de symbole implémente cette interface sur le même objet qui implémente IDebugField pour prendre en charge les attributs personnalisés.A symbol provider implements this interface on the same object that implements IDebugField in order to support custom attributes.
Remarques pour les appelantsNotes for Callers
Utilisez QueryInterface pour obtenir cette interface à partir de la IDebugField interface.Use QueryInterface to obtain this interface from the IDebugField interface.
Méthodes dans l'ordre VtableMethods in Vtable Order
Le tableau suivant présente les méthodes de la IDebugCustomAttributeQuery interface.The following table shows the methods of the IDebugCustomAttributeQuery interface.
MéthodeMethod DescriptionDescription
IsCustomAttributeDefinedIsCustomAttributeDefined Détermine si un attribut personnalisé existe par nom.Determines whether a custom attribute exists by name.
GetCustomAttributeByNameGetCustomAttributeByName Obtient les informations d’attribut pour l’attribut personnalisé.Gets the attribute information for the given custom attribute.
Outre la IDebugCustomAttributeQuery méthodes, IDebugCustomAttributeQuery2 implémente la méthode suivante :In addition to the IDebugCustomAttributeQuery methods, IDebugCustomAttributeQuery2 implements the following method:
MéthodeMethod DescriptionDescription
EnumCustomAttributesEnumCustomAttributes Obtient un énumérateur pour tous les attributs personnalisés attachés à ce champ.Gets an enumerator for all custom attributes attached to this field.
NotesRemarks
Le IEnumDebugCustomAttributes méthode peut retourner un énumérateur pour tous les attributs personnalisés définis pour ce champ.The IEnumDebugCustomAttributes method can return an enumerator for all custom attributes defined for this field.
SpécificationsRequirements
En-tête : sh.hHeader: sh.h
Namespace : Microsoft.VisualStudio.Debugger.InteropNamespace: Microsoft.VisualStudio.Debugger.Interop
Assembly : Microsoft.VisualStudio.Debugger.Interop.dllAssembly: Microsoft.VisualStudio.Debugger.Interop.dll
Voir aussiSee Also
Interfaces de fournisseur de symboles Symbol Provider Interfaces
IDebugField IDebugField
IEnumDebugCustomAttributesIEnumDebugCustomAttributes
|
{
"url": "https://docs.microsoft.com/fr-fr/visualstudio/extensibility/debugger/reference/idebugcustomattributequery2",
"source_domain": "docs.microsoft.com",
"snapshot_id": "crawl=CC-MAIN-2018-17",
"warc_metadata": {
"Content-Length": "20569",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:DGJV3UQ5R37RR4W3LSAMN6SGQHNKA3HV",
"WARC-Concurrent-To": "<urn:uuid:4eaa9c5a-815f-4143-9948-c2e12893a389>",
"WARC-Date": "2018-04-22T18:31:39Z",
"WARC-IP-Address": "23.196.97.9",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:CJJH3ZZMNCMSKA3Y2H37UFKXVPVDPGDT",
"WARC-Record-ID": "<urn:uuid:046ec52a-41f8-4fa2-b8c6-490226ccd9ff>",
"WARC-Target-URI": "https://docs.microsoft.com/fr-fr/visualstudio/extensibility/debugger/reference/idebugcustomattributequery2",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7ba08822-d132-419a-a954-a0fbf53164b9>"
},
"warc_info": "robots: classic\r\nhostname: ip-10-146-107-169.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-17\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for April 2018\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf"
}
|
{
"line_start_idx": [
0,
55,
56,
290,
291,
305,
306,
365,
366,
417,
418,
697,
698,
744,
745,
911,
912,
964,
965,
1132,
1133,
1170,
1326,
1503,
1504,
1726,
1727,
1764,
1955,
1956,
1969,
1970,
2211,
2212,
2239,
2240,
2267,
2268,
2370,
2371,
2479,
2480,
2499,
2500,
2565,
2589
],
"line_end_idx": [
55,
56,
290,
291,
305,
306,
365,
366,
417,
418,
697,
698,
744,
745,
911,
912,
964,
965,
1132,
1133,
1170,
1326,
1503,
1504,
1726,
1727,
1764,
1955,
1956,
1969,
1970,
2211,
2212,
2239,
2240,
2267,
2268,
2370,
2371,
2479,
2480,
2499,
2500,
2565,
2589,
2641
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 2641,
"ccnet_original_nlines": 45,
"rps_doc_curly_bracket": 0,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.17514124512672424,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0028248599264770746,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.15819208323955536,
"rps_doc_frac_unique_words": 0.5464683771133423,
"rps_doc_mean_word_length": 8.657992362976074,
"rps_doc_num_sentences": 33,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.735910415649414,
"rps_doc_word_count": 269,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.07127522677183151,
"rps_doc_frac_chars_dupe_6grams": 0.07127522677183151,
"rps_doc_frac_chars_dupe_7grams": 0.04207814857363701,
"rps_doc_frac_chars_dupe_8grams": 0,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.01932159997522831,
"rps_doc_frac_chars_top_3gram": 0.013739800080657005,
"rps_doc_frac_chars_top_4gram": 0.019750969484448433,
"rps_doc_books_importance": -197.7203826904297,
"rps_doc_books_importance_length_correction": -197.7203826904297,
"rps_doc_openwebtext_importance": -113.24821472167969,
"rps_doc_openwebtext_importance_length_correction": -113.24821472167969,
"rps_doc_wikipedia_importance": -102.60652160644531,
"rps_doc_wikipedia_importance_length_correction": -102.60652160644531
},
"fasttext": {
"dclm": 0.24367260932922363,
"english": 0.07463700324296951,
"fineweb_edu_approx": 1.0859841108322144,
"eai_general_math": 0.009414429776370525,
"eai_open_web_math": 0.07406718283891678,
"eai_web_code": 0.35829538106918335
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.452",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "10",
"label": "Knowledge Article"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,499,038,601,718,913,000 |
🌐
[Unity][C# Script] 回転を自在にあやつろう。
2021/02/17に公開
はじめに
その Slerp、使い方はあってますか?
はい、私は間違ってました(真顔
さて、GameObject(ゲームオブジェクト) の rotation はクォータニオン型なのですが、実際に使われるときはVector3型で行うことも少なくありません。
そして、 Vector3型の使い方がベクトル(方向)・座標・角度の3つあるのですが、これをあまり区別して説明されてなかったり、操作する組み合わせもそのぶんあり混同しやすいという罠。
そしてウェブのサンプルを動かしているとき、たまーに期待していない挙動をしめすものがあったので、首をひねりながら調べたてことをまとめてみました。さあこれでスッキリです。
Vector3型は、使いみちに応じてサンプルでは以下のように表記します。
・方向(移動量)は Direction。単位ベクトルの長さがUnityの距離単位になる。
・座標は Position。単位はUnityの距離単位(m / 物理演算時)
・角度(オイラー角・回転量)は Angle。X,Y,Zがそれぞれ角度。単位は°(度)
・クォータニオンは Rotation で表記します。
また、各サンプルの target はターゲットの GameObject を想定しています。
1.ゲームオブジェクトの向きの操作
1) ゲームオブジェクトの向きは、transform.rotation
ゲームオブジェクトが向いている方向は、GameObject.transform.rotation であり、クォータニオン(Quaternion)型です。
// trQ → Q
Quaternion myRotation = transform.rotation;
2) 他のゲームオブジェクトとrotationを一致させる
Quaternion 型なので直接代入して問題ありません。
// Q → trQ
transform.rotation = target.transform.rotation;
transform.rotation = Quaternion.identity; // ワールド座標の正面
他にも、Quaternion 型であれば直接代入できます。
3) ゲームオブジェクトの向きを、度数で指定する。
transform.rotation の向きを度数で指定します。
このときの Vector3型は、角度として扱われています。
// a) 角度指定(v3Angle → trQ)
transform.rotation = Quaternion.Euler( 0f, 0f, 10f); // Z軸を10°に設定
// b) 角度指定(v3Angle → trQ)
transform.eulerAngles = new Vector3( 0f, 0f, 10f); // 同上
// c) 角度指定(親子関係の子の相対角度)(v3Angle → trQ)
transform.localRotation = Quaternion.Euler( 0f, 0f, 10f); // Z軸を10°に設定
transform.localEulerAngles = new Vector3( 0f, 0f, 10f); // 同上
4) ゲームオブジェクトを度数で回転する。
transform.rotation の向きを度数で回転します。
このときの Vector3型は、角度として扱われています。
// 回転(v3Angle → trQ (加算))
transform.Rotate ( 0f, 0f, 10f ); // Z軸を10°回転
5) ゲームオブジェクトの向きをVector3型(角度)で取り出す。
ゲームオブジェクトの向き(transform.rotation)はクォータニオン型のため、スクリプト内で角度を制御する場合はオイラー角(Vector3型)のほうが扱いやすいことが多いです。Inspectorの数値とも一致しますし。
// trQ → v3Angle
Vevtor3 myAngle = transform.eulerAngles; // 結果はVector3(Angle)型
6) ゲームオブジェクトの向きをVector3型(方向)で取り出す。
ゲームオブジェクトの向きをベクトル量で取り出します。たとえばゲームオブジェクトを前に進めるときの移動量を求めるときや、ゲームオブジェクトの前方の座標を得たいときなどは、これを使います。
// trQ → v3Direction
Vector3 myDirection = transform.forword; // 結果はVector3(Direction)型
// transform.rotation * Vector3.up も同値となる。
射出するオブジェクトの位置をオフセットするような場合は、以下のようにするとよいでしょう。
// v3Direction Offset(前に1.0、上に0.1、左に0.1オフセット)
transform.position += (transform.forword *1.0f)
+ (transform.up *0.1f)
+ (transform.right * -0.1f);
7) ゲームオブジェクトの向きをfloat型の角度(度数法)で取り出す。
ゲームオブジェクトの向きの、xyzどれかひとつの軸の角度のみを取り出します。平面上で向いている角度を得るときは、yの値を得ることになります。
// trQ → v3Angle
float myAngleY = transform.eulerAngles.y; // y軸の回転量
// 実質、オブジェクトの向いている角度になります。
8) ゲームオブジェクトを度数法(0~360°)でゆっくり回転させる。
単純に回転させる場合はこれが便利ですね。サンプルは、1秒ごとにY軸(xz平面)にそって120度回転します。
// 回転(v3Angle → trQ)
transform.Rotate( 0f, 120.0f * Time.deltaTime ,0f );
GameObjectを円周軌道にそって移動させたい場合は、回転させたい中心に空の GameObject をおいてそれを親GameObjectに設定し、親のtransform.rotationを上のスクリプトで回転させるとよいでしょう。このように、オブジェクトを回転させたり傾けたりする場合は、オブジェクトの角度を直接操作するよりは、回転させたり傾けたりするパラメータの数に応じた親オブジェクトを作り、それを操作したほうが単純になることが多いと思います。
targetをスクリプトから親にするとき。
transform.parent = target.transform;
8) Vector3型(座標)を指定して、そちらを向かせる。
target.transform.position は Vector3型。座標として扱われています。
// v3Position → trQ
transform.LookAt ( target.transform.position ); // target は GameObject型
9) ゆっくりとVector3型(座標)を向かせる。
ホーミングの仕組みは、これで簡単に作れそうですね。
サンプルは1秒間に120度の速度で回転します。
// trQ と v3Position → trQ
transform.rotation = Quaternion.RotateTowards ( transform.rotation,
Quaternion.LookRotation( target.transform.position - transform.position ),
120.0f * Time.deltaTime );
(少し解説)
・Vector3 direction = target.transform.position - transform.position;
targetのVector3型(方向)を算出
・Quaternion rotation = Quaternion.LookRotation( direction );
Vector3型(方向)から Quaternion型(向き)に変換。
・transform.rotation = Quaternion.RotateTowards ( transform.rotation, rotation, 120.0f * Time.deltaTime );
今の向きからtargetの向きに、1秒間に120度の速度で回転
10) 回転座標をy軸の回転のみに限定(アジャスト)する。
Rotationのxとzを0を代入します。
// v3Angle → Q
transform.rotation = Quaternion.Euler(new Vector3( 0f, transform.eulerAngles.y, 0f ));
相手と上下にずれていると、オブジェクトも上下を向くので補正したりするのに使います。
11) オブジェクトを、面に垂直に立つよう傾かせる
対象の面の法線ベクトルを取得できれば、それにRotationをあわせることができます。
// raycastHitは別途得たRaycastHit型を想定
Vector3 direction = raycastHit.normal; // 面の法線ベクトル
transform.rotation = Quaternion.FromToRotation(Vector3.up, direction);
2. Quaternion型の操作
Quaternion型をVector3型に変換したり、またその逆の操作は、その仕組上計算コストが高いと考えています。なるべくQuaternion型のまま扱うことができれば、そのような心配がなくなるので、Quaternion型がどう扱えるか少々調べてみました。
Quaternion型は内部で 4つの数値 (Unity では x、y、z、w)を持ちます。この数値はどうやら専門的な知識なしにそれを直接操作しても期待した結果は得られないようで、実際には、Quaternion型はそのメソッドを使い操作することがメインとなるようです。
ちょっと調べてみましたが、パターンはそれほど多くなさそうですね。
1) Quaternion型を 単位回転(identity)で初期化する。
回転していないクォータニオンにて初期化します。つまり、worldの正面(哲学)を向きます。
// Q → Q
Quaternion rotation = Quaternion.identity;
2) クォータニオンを回転する。
クォータニオンをクォータニオンで回転させた結果は、クオータニオン同士を*(掛け算記号による演算)することで求められます。
// Q → Q
Quaternion Rotation30 = Quaternion.Euler(0f, 30f, 0f);
Quaternion Rotation60 = Quaternion.Euler(0f, 60f, 0f);
Quaternion Rotation90 = Rotation30 * Rotation60;
3) 2つの角度の差を返す
Quaternion型同士の差からQuaternion型の差を得るには、逆クォータニオンを掛けるとよいらしいです。すこし不思議。
// Q → Q
// 必要な回転量を得る(Inverse したクォータニオンを乗算)
// targetRotation は Quaternion型
Quaternion requiredRotation = targetRotation
* Quaternion.Inverse(transform.rotation);
4) Quaternion型に Vector3型(角度)を代入する。
Vector(オイラー角) と Quaternion の相互変換を行う方法です。なお、Quaternionは0~360°に相当する数値しか保持しないようです。
// a) v3Angle → Q
Quaternion rotation = Quaternion.Euler(new Vector3(0f, 30f, 0f));
// b) v3Angle → Q
Quaternion rotation = Quaternion.identity;
rotation.eulerAngles = new Vector3(0f, 30f, 0f);
5) Quaternion型を Vector3型(角度)に変換。
Quaternion と Vector3(オイラー角) の相互変換を行う方法です。2)とは逆方向の型に変換します。取り出される範囲はそれぞれ0~360°になります。
// Q → v3Angle
Vector3 angle = Quaternion.eulerAngles;
6) Quaternion型を Vector3型(方向)に変換。
GameObjectであれば、transform.forwardで向きをベクトル量に変換できます。Quatanion型でこれと同等の操作をしたいときは、Vector3.upを*(乗算記号による演算)します。
// Q(rotationQ) → v3Direction
Vector3 direction = rotationQ * Vector3.up; // 記述順番は厳守のこと
7) Vector3型(方向)を Quaternion型に変換。
// v3Direction → Q(rotationQ)
Vector3 direction = new Vector3( 3f, 2f, 0f );
transform.rotation = Quaternion.FromToRotation(Vector3.up, direction);
8) Quaternion型をfloat(度数法 / 0~360°)で取り出す。
Quaternion から、xyzのうち1つの軸について角度を取り出します。
float angleY = Quaternion.eulerAngles.y; // y軸の回転量
-180° ~ 180° にする場合は、以下で変換するとよいでしょう。
angleY = angleY <= 180f ? angleY : (360f - angleY );
9) Vector3型(座標)から回転させる量(Quaternion型)を得る。
元となる位置とtargetの位置からtargetの方向を回転量(Quaternion型)として得ます。これをtransform.rotatonに代入することも可能ですが、その場合はおそらく通常はtansform.LookAtを使ったほうがスッキリすることが多いはずです。
// a v3Position → Q
transform.rotation = Quaternion.FromToRotation(transform.position,
target.transform.position );
10) Vector3型(方向)から回転量を得る。
Quaternion.LookRotationは方向(移動量)から回転量を得ます。下のサンプルは第2パラメータ(Vector3.up)が省略されています。
// v3Direction → Q
transform.rotation = Quaternion.LookRotation( target.transform.position
- transform.position );
public static Quaternion LookRotation (Vector3 forward, Vector3 upwards= Vector3.up);
・forward 向かせたい方向
・upwards 上方向を定義するベクトル。 Vector3.up は Vector3(0f, 1f, 0f) と同義。
transform.LookAt とは、場合に応じた使い分けができそうですね。
11) 回転量(Quaternion型)から回転量(Quaternion型)へ制限つき回転を行う。
transfom のホーミングの仕組みで利用したQuaternion.RotateTowardsです。
// Q → Q
// toRotation = 目標のRotation
// step = 回転量制限(サンプルは120°/秒)
transform.rotation = Quaternion.RotateTowards( ransform.rotation,
toRotation, 120.0f * Time.deltaTime );
12) 2つの角度の差を角度をfloat(度数法 / 0~180°)で返す。
GameObjectが視界内に入っているか、あるいは顔の向く角度以外は無視するなどの判定に使えそうです。
クォータニオンの差分で出力されるわけでないので、得た値を利用して物体を回転させる事は出来ないようです。
// targetRotation は Quaternion型
float angle = Quaternion.Angle(transform.rotation, targetRotation);
if( angle < 15f )
{
// 視界内
}
13) ゆっくりと対象の方向を向ける(球面回転)
1秒かけて回転するサンプルです。
// float timeCount = 0f; 別の場所で定義
// Quaternion fromRotation = transform.rotation;
// Quaternion targetRotation = Quaternion.LookRotation( target.transform.position - transform.position );
transform.rotation = Quaternion.Slerp ( fromRotation, targetRotation, timeCount );
timeCount += Time.deltaTime;
※球面回転と非球面回転は以下と考えてください。
球面回転 精度:高 処理速度:低
非球面回転 精度:低 処理速度:高
14) ゆっくりと対象の方向を向ける(非球面回転)
1秒かけて回転するサンプルです。
// float timeCount = 0f; 別の場所で定義
// Quaternion fromRotation = transform.rotation;
// Quaternion targetRotation = Quaternion.LookRotation( target.transform.position - transform.position );
transform.rotation = Quaternion.Leap ( fromRotation, targetRotation, timeCount );
timeCount += Time.deltaTime;
15) ゆっくりと対象の方向を向ける(非等速・回転量指定)
下のサンプルは、1秒間にかけて目的の方向に回転しようとします。角度が離れている場合は回転量が多く、近づくにつれ補正の割合が小さくなります。
よって、指定された方向をそのものを向くことはありません(哲学)
Quaternion targetRotation = Quaternion.LookRotation( target.transform.position
- transform.position );
transform.rotation = Quaternion.Lerp( transform.rotation, targetRotation,
Time.deltaTime );
サンプル等で回転にSlerpやLerpを使っているものを参考にする場合、意図した使いかたかどうかに留意してください。
16) ドリフトするホーミングミサイル
ホーミングミサイルで、ミサイルの向きに加速する表現です。
自分がいま向いている方向から targetのある向きにむけて旋回し、その方向に加速しますが、旋回速度によっては進行方向とミサイルの向きがアンマッチになり、ドリフトしているように見えます。
下のサンプルでは、1秒間に120°の割合で等速回転します。
// Vector3 moveSpeed = new Vector3(0f,0f,0f); 別の場所で定義
// float accSpeed = 3.0f; 別の場所で定義
// float maxSpeed = 3.0f; 別の場所で定義
Quaternion targetRotation = Quaternion.LookRotation( target.transform.position
- transform.position );
transform.rotation = Quaternion.RotateTowards( transform.rotation,
targetRotation, 120f*Time.deltaTime );
moveSpeed += transform.rotation * Vector3.forward * accSpeed * Time.deltaTime;
if( moveSpeed.magnitude >= maxSpeed )
{
moveSpeed = speed.normalized * maxSpeed;
}
17) 起き上がり小法師
起き上がり小法師のように、GameObjectをコルーチンでプルプルと振動させます。
コルーチンを呼び出すとき、振動を与える角度を度数(float)で与えます。
振動の中心はtransform.positionになります。
// StartCoroutine(PuruDo(30)); メインルーチンなどから呼び出す
IEnumerator PuruDo(float shockAngle)
{
float purupuruTime = 2f; // 振動時間
float amplitude = 20f; // 振幅
float cycleAcc = 20f; // 振動速度
while (purupuruTime > 0f)
{
// 振動量
float tiltAngle = purupuruTime * amplitude * (Mathf.Sin(purupuruTime * cycleAcc));
// 振動量を振動角度に割り振る
var shoccRad = (transform.eulerAngles.y - shockAngle) * Mathf.Deg2Rad; ;
var angleX = Mathf.Cos(shoccRad) * tiltAngle;
var angleZ = Mathf.Sin(shoccRad) * tiltAngle;
transform.eulerAngles = new Vector3(angleX, transform.eulerAngles.y, angleZ);
purupuruTime -= Time.deltaTime;
yield return null;
}
}
3. Vector3型のベクトル(方向)、座標、角度の操作
1) ベクトル(方向)からベクトル(角度)への変換
いったんQuaternionを経由してみます。
// v3Direction → Q(rotationQ) → v3Angle
Vector3 direction = new Vector3( 3f, 2f, 0f );
Quaternion rotation = Quaternion.FromToRotation(Vector3.up, direction);
Vector3 angle = Quaternion.EulerAngles;
2) ベクトル(角度)からベクトル(方向)への変換
おなじく、いったんQuaternionを経由してみます。
Vector3 angle = new Vector3( 30f, 90f, 0f );
Quaternion rotation = Quaternion.Euler( angle );
Vector3 direction = rotation * Vector3.up;
3) 2つの位置間の角度を得る
方向制御するために、2つの位置間の角度を得るのはよく使う操作ですが、unityでは実際には操作対象はtransformである場合が多いでしょうから、これを使う機会はあまりないかもしれません。
ターゲットをロックオンしているときなど、向いている方向を固定したまま移動方向に応じてアニメーションを変更する場合は、-180~180°(あるいは0~360°)の値をとる角度を求める必要があります。
// v3Position と v3Position → floatAngle
// a) Vector3.SignedAngle
Vector3 targetDir = target.transform.position - transform.position;
float angle = Vector3.SignedAngle(targetDir, transform.forward, Vector3.up);
// -180~180°となる模様
// b) Atan2をつかう(サンプルはy軸。高低差は考慮しない)
float angleY = Mathf.Atan2( target.transform.position.x - transform.position.x , target.transform.position.z - transform.position.z ) * Mathf.Rad2Deg;
// -180~180°となる模様
// c) Quaternion.FromToRotationを使う(サンプルはy軸。高低差は考慮しない)
Quaternion rotation = Quaternion.FromToRotation(fromDirection,targetDirection);
float angleY = rotation.eulerAngles.y;
// 0~360°となる模様
// d) Vector3.Angle(サンプルは角度)
Vector3 targetDir = target.transform.position - transform.position;
float angle = Vector3.Angle(targetDir, transform.forward );
// 0~180°となる模様。第3~4象限がないため、移動等には使えなさそう。
// GameObjectが視界内に入っているかなどの判定に使えそう。
4) ベクトルの正規化
ベクトルの大きさが単位ベクトルになるよう調整します。
// v3Direction → v3Direction
Vector3 direction = target.transform.position - transform.position;
Vector3 normalizedDirection = direction.normalized;
5) ベクトルの長さ(読み取り専用)
ベクトルの長さは、2点間の距離を求めるのに使われます。便利です。
Vector3 direction = target.transform.position - transform.position;
float distance = direction.magnitude;
ピュタゴラスの定理
Mathf.Sqrt( Mathf.Pow( target.transform.position.x - transform.position.x ,2) + Mathf.Pow( target.transform.position.z - transform.position.z ,2) );
6) ベクトルの長さの2乗(読み取り専用)
ベクトルの長さは、2点間の距離を求めるのに使われます。便利ですがそれゆえに多用されます。ちょっとでも処理を軽くしたい場合はこちらを使うことも検討します。
Vector3 direction = target.transform.position - transform.position;
float sqrDistance = direction.sqrMagnitude;
ベクトルの長さはできるだけ2乗同士のまま扱ったほうが処理が速いことが期待できる。平方根の演算をはさまないため。
7) ベクトル(角度)を回転させる
// Y軸に90°、Z軸に-90°回転
Vector3 angle = transform.eulerAngles;
angle.y += 90;
angle.z -= 90;
8) ベクトル(方向)を回転させる
// Y軸に90°、Z軸に-90°回転
Vector3 direction = transform.forward;
direction = Quaternion.Euler( 0f, 90f, -90f ) * direction;
9) じわじわと回転
自分がいま向いている方向から targetのある向きにむけて旋回します。結果をQuaternionではなくVector3で得る必要がある場合は、こちらを使うことになります。
// v3Position → v3Direction
Vector3 targetDir = target.transform.position - transform.position;
Vector3 newDirection = Vector3.RotateTowards( transform.forward, targetDirection, 120.0f * time.deltaTime );
10) 直線上にある 2 つのベクトル間をゆっくりと補間する
時間値をもとに、直線上のどこに位置するかを求める必要があれときは、これを使うのが便利そうです。
// v3Position
// float timeCount = 0f; 別の場所で定義
transform.position = Vector3.Lerp( startMarker.position, endMarker.position, timeCount );
timeCount += Time.deltaTime;
11) 方向(移動量)を、回転量を指定して回転
方向(移動量)を回転する場合、三角関数を使用して回転することもできますが、回転量をQuaternionで表現できる場合は、クォータニオンにVector3を*(掛け算)するとすっきりする場合があります。
「Quaternion * Vector3」と、演算の順番は決まっていることに注意してください。
// v3Direction と Q → v3Direction
Vector3 targetDir = target.transform.position - transform.position;
Quaternion Rotation30 = Quaternion.Euler(new Vector3(0f, 30f, 0f));
Vector3 newDirection = Rotation30 * targetDir; // 必ずQuaternion * Vector3
4.(解説)クォータ二オンとオイラー角について
Unityユーザーズマニュアル「Unity の回転と向き」より
3D アプリケーションの回転は、たいていクォータ二オンかオイラー角のどちらかによって表されています。
それぞれ、利点と欠点があります。Unity では内部でクォータ二オンを採用していますが、編集しやすいように、インスペクターでは同等のオイラー角で表しています。
オイラー角とクォータ二オンの違い
・オイラー角(Euler angles)
オイラー角は、3つの角度の値を X、Y、Z 軸に順に当てはめて回転を表す簡易な方法です。
オイラー角をあるオブジェクトに応用する場合は、オブジェクトを各軸に沿って与えられた角度で回転させます。
利点 - オイラー角は、3つの角度から構成される直感的で「人間が理解できる」フォーマットで表現されています。
利点 - オイラー角は、180度以上の回転を経て、1つの向きから別の向きへの回転を表現できます。
制限 - オイラー角はジンバルロック (Gimbal lock) として知られている制限があります。
ジンバルロックについて
対象をそれぞれの軸に沿って順に回転させるとき、第一、第二の回転によって、結果的に 3つ目の軸にそろってしまうことがあります。
つまり、第三の回転値を 3つ目の軸に反映できないために、「角度の自由」が失われてしまいます。
・クォータニオン(Quaternion)
クォータニオンは、オブジェクトの向きや回転を表すのに使用されます。
この表現法では、内部で 4つの数字 (Unity では x、y、z、w と呼びます) で構成されています。
ただし、この数字は、角度や軸を表現しているわけでなく、通常、直接アクセスすることはありません。
クォータ二オン (四元数)について特別に興味がない限り、クォータニオンが 3D 空間の回転を表しているのだということを知っているだけで十分で、
通常、x、y、z プロパティーを操作したり変更することはありません。
ベクトルが位置と方向 (方向は原点から測ります) を表現するのと同様に、クォータ二オンは向きと回転を表現できます。
回転は、回転「基準」か「単位」を基準に測られます。回転を、ある向きからもう一方の向きへの方向として計測するため、クォータ二オンでは、180度より大きな回転を表現することができません。
利点 - クォータ二オンの回転は、ジンバルロックの影響を受けません。
制限 - 単体のクォータ二オンでは、180度を超す回転を表すことができません。
制限 - クォータ二オンの数的表現は、直感的に理解できません。
Unity では、ゲームオブジェクトのすべての回転は、内部ではクォータ二オンで保存します。なぜなら、利点のほうが、制限を上回るためです。
しかし、Transform Inspector では、回転は、理解しやすく編集しやすいオイラー角で表示されます。
ゲームオブジェクトを回転させるために Inspector に新しい値を入力すると、目に見えない内部で、新しいクォータニオン回転値に変換されます。
ex.関係ありそうな記事
https://zenn.dev/k1togami/articles/f2ea13c663cabf
https://note.com/k1togami/n/n42389783cc98
https://note.com/k1togami/n/nadc12cef7700
2021.2.17 noteより転記
2021.2.19 一部修正。言葉遣いの統一など
2022.9.6、2022.10.9 2022.11.24 transform回転にまつわる記述・挙動ついての誤記を修正。
Discussion
|
{
"url": "https://zenn.dev/k1togami/articles/18f04da51d4d05",
"source_domain": "zenn.dev",
"snapshot_id": "CC-MAIN-2024-22",
"warc_metadata": {
"Content-Length": "256273",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:TC655JGYBEY5H52WJQ4JFNOCKJ5ROEUV",
"WARC-Concurrent-To": "<urn:uuid:4940a941-ec32-451a-a07f-c9e6492b28bd>",
"WARC-Date": "2024-05-22T18:15:34Z",
"WARC-IP-Address": "172.67.72.220",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PAUMGKWVMBU4SIP52FADZ4D5BO2I3EED",
"WARC-Record-ID": "<urn:uuid:abd01474-6a6f-42ca-a46f-726ab42b02c3>",
"WARC-Target-URI": "https://zenn.dev/k1togami/articles/18f04da51d4d05",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:ebd221e5-f63b-47de-abd8-6477f09beb2a>"
},
"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-217\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
2,
3,
35,
36,
50,
51,
56,
57,
78,
79,
95,
96,
181,
273,
358,
359,
396,
441,
480,
523,
550,
596,
597,
615,
616,
652,
653,
730,
731,
742,
786,
787,
817,
818,
848,
849,
860,
908,
963,
964,
994,
995,
1021,
1022,
1055,
1086,
1087,
1113,
1179,
1180,
1206,
1263,
1264,
1303,
1374,
1436,
1437,
1459,
1460,
1493,
1524,
1525,
1551,
1598,
1599,
1634,
1635,
1751,
1752,
1769,
1832,
1833,
1868,
1869,
1962,
1963,
1984,
2051,
2052,
2095,
2096,
2141,
2142,
2188,
2236,
2279,
2314,
2315,
2352,
2353,
2424,
2425,
2442,
2494,
2521,
2522,
2558,
2559,
2613,
2614,
2635,
2688,
2689,
2916,
2917,
2939,
2976,
2977,
3008,
3009,
3060,
3061,
3081,
3153,
3154,
3181,
3182,
3208,
3233,
3234,
3260,
3329,
3405,
3433,
3434,
3441,
3510,
3534,
3595,
3631,
3737,
3770,
3771,
3801,
3802,
3824,
3825,
3840,
3927,
3928,
3970,
3971,
3997,
3998,
4042,
4043,
4076,
4128,
4199,
4200,
4218,
4219,
4349,
4350,
4485,
4519,
4520,
4558,
4559,
4605,
4606,
4615,
4658,
4659,
4676,
4677,
4738,
4739,
4748,
4803,
4858,
4907,
4908,
4922,
4923,
4988,
4989,
4998,
5033,
5065,
5110,
5182,
5183,
5218,
5219,
5299,
5300,
5318,
5384,
5385,
5403,
5446,
5495,
5496,
5529,
5530,
5613,
5614,
5629,
5669,
5670,
5703,
5704,
5808,
5809,
5839,
5897,
5898,
5931,
5932,
5962,
6009,
6080,
6081,
6122,
6123,
6162,
6163,
6214,
6215,
6251,
6304,
6305,
6346,
6347,
6483,
6484,
6504,
6573,
6650,
6651,
6677,
6678,
6756,
6757,
6776,
6848,
6918,
6919,
7005,
7022,
7083,
7123,
7124,
7174,
7175,
7227,
7228,
7237,
7265,
7294,
7360,
7441,
7442,
7481,
7482,
7535,
7588,
7589,
7621,
7691,
7692,
7710,
7712,
7721,
7723,
7724,
7749,
7750,
7767,
7768,
7801,
7850,
7956,
7957,
8040,
8069,
8070,
8094,
8113,
8132,
8133,
8159,
8160,
8177,
8178,
8211,
8260,
8366,
8367,
8449,
8478,
8479,
8509,
8510,
8580,
8613,
8614,
8693,
8772,
8846,
8925,
8926,
8985,
8986,
9006,
9007,
9036,
9131,
9162,
9163,
9217,
9251,
9285,
9364,
9444,
9511,
9591,
9670,
9708,
9710,
9754,
9756,
9757,
9770,
9771,
9814,
9852,
9883,
9884,
9931,
9932,
9969,
9971,
10008,
10041,
10075,
10076,
10106,
10112,
10127,
10218,
10243,
10324,
10378,
10432,
10433,
10519,
10559,
10586,
10592,
10594,
10595,
10625,
10626,
10652,
10653,
10677,
10678,
10718,
10765,
10837,
10877,
10878,
10904,
10905,
10934,
10935,
10980,
11029,
11072,
11073,
11089,
11090,
11186,
11285,
11286,
11326,
11352,
11420,
11498,
11516,
11517,
11552,
11703,
11721,
11722,
11776,
11856,
11895,
11910,
11911,
11940,
12008,
12068,
12108,
12144,
12145,
12157,
12158,
12185,
12186,
12215,
12283,
12335,
12336,
12355,
12356,
12389,
12390,
12458,
12496,
12497,
12507,
12656,
12657,
12679,
12680,
12757,
12758,
12826,
12870,
12871,
12927,
12928,
12946,
12947,
12967,
13006,
13022,
13038,
13039,
13057,
13058,
13078,
13117,
13177,
13178,
13189,
13190,
13277,
13278,
13306,
13374,
13483,
13484,
13515,
13516,
13564,
13565,
13579,
13612,
13702,
13731,
13732,
13756,
13757,
13858,
13907,
13908,
13941,
14009,
14077,
14150,
14151,
14175,
14176,
14208,
14209,
14260,
14340,
14341,
14358,
14359,
14380,
14425,
14477,
14478,
14533,
14582,
14633,
14634,
14646,
14709,
14756,
14757,
14778,
14779,
14813,
14867,
14915,
14987,
15022,
15023,
15081,
15173,
15174,
15209,
15249,
15281,
15350,
15351,
15408,
15481,
15482,
15495,
15496,
15546,
15588,
15630,
15631,
15650,
15675,
15737,
15738
],
"line_end_idx": [
2,
3,
35,
36,
50,
51,
56,
57,
78,
79,
95,
96,
181,
273,
358,
359,
396,
441,
480,
523,
550,
596,
597,
615,
616,
652,
653,
730,
731,
742,
786,
787,
817,
818,
848,
849,
860,
908,
963,
964,
994,
995,
1021,
1022,
1055,
1086,
1087,
1113,
1179,
1180,
1206,
1263,
1264,
1303,
1374,
1436,
1437,
1459,
1460,
1493,
1524,
1525,
1551,
1598,
1599,
1634,
1635,
1751,
1752,
1769,
1832,
1833,
1868,
1869,
1962,
1963,
1984,
2051,
2052,
2095,
2096,
2141,
2142,
2188,
2236,
2279,
2314,
2315,
2352,
2353,
2424,
2425,
2442,
2494,
2521,
2522,
2558,
2559,
2613,
2614,
2635,
2688,
2689,
2916,
2917,
2939,
2976,
2977,
3008,
3009,
3060,
3061,
3081,
3153,
3154,
3181,
3182,
3208,
3233,
3234,
3260,
3329,
3405,
3433,
3434,
3441,
3510,
3534,
3595,
3631,
3737,
3770,
3771,
3801,
3802,
3824,
3825,
3840,
3927,
3928,
3970,
3971,
3997,
3998,
4042,
4043,
4076,
4128,
4199,
4200,
4218,
4219,
4349,
4350,
4485,
4519,
4520,
4558,
4559,
4605,
4606,
4615,
4658,
4659,
4676,
4677,
4738,
4739,
4748,
4803,
4858,
4907,
4908,
4922,
4923,
4988,
4989,
4998,
5033,
5065,
5110,
5182,
5183,
5218,
5219,
5299,
5300,
5318,
5384,
5385,
5403,
5446,
5495,
5496,
5529,
5530,
5613,
5614,
5629,
5669,
5670,
5703,
5704,
5808,
5809,
5839,
5897,
5898,
5931,
5932,
5962,
6009,
6080,
6081,
6122,
6123,
6162,
6163,
6214,
6215,
6251,
6304,
6305,
6346,
6347,
6483,
6484,
6504,
6573,
6650,
6651,
6677,
6678,
6756,
6757,
6776,
6848,
6918,
6919,
7005,
7022,
7083,
7123,
7124,
7174,
7175,
7227,
7228,
7237,
7265,
7294,
7360,
7441,
7442,
7481,
7482,
7535,
7588,
7589,
7621,
7691,
7692,
7710,
7712,
7721,
7723,
7724,
7749,
7750,
7767,
7768,
7801,
7850,
7956,
7957,
8040,
8069,
8070,
8094,
8113,
8132,
8133,
8159,
8160,
8177,
8178,
8211,
8260,
8366,
8367,
8449,
8478,
8479,
8509,
8510,
8580,
8613,
8614,
8693,
8772,
8846,
8925,
8926,
8985,
8986,
9006,
9007,
9036,
9131,
9162,
9163,
9217,
9251,
9285,
9364,
9444,
9511,
9591,
9670,
9708,
9710,
9754,
9756,
9757,
9770,
9771,
9814,
9852,
9883,
9884,
9931,
9932,
9969,
9971,
10008,
10041,
10075,
10076,
10106,
10112,
10127,
10218,
10243,
10324,
10378,
10432,
10433,
10519,
10559,
10586,
10592,
10594,
10595,
10625,
10626,
10652,
10653,
10677,
10678,
10718,
10765,
10837,
10877,
10878,
10904,
10905,
10934,
10935,
10980,
11029,
11072,
11073,
11089,
11090,
11186,
11285,
11286,
11326,
11352,
11420,
11498,
11516,
11517,
11552,
11703,
11721,
11722,
11776,
11856,
11895,
11910,
11911,
11940,
12008,
12068,
12108,
12144,
12145,
12157,
12158,
12185,
12186,
12215,
12283,
12335,
12336,
12355,
12356,
12389,
12390,
12458,
12496,
12497,
12507,
12656,
12657,
12679,
12680,
12757,
12758,
12826,
12870,
12871,
12927,
12928,
12946,
12947,
12967,
13006,
13022,
13038,
13039,
13057,
13058,
13078,
13117,
13177,
13178,
13189,
13190,
13277,
13278,
13306,
13374,
13483,
13484,
13515,
13516,
13564,
13565,
13579,
13612,
13702,
13731,
13732,
13756,
13757,
13858,
13907,
13908,
13941,
14009,
14077,
14150,
14151,
14175,
14176,
14208,
14209,
14260,
14340,
14341,
14358,
14359,
14380,
14425,
14477,
14478,
14533,
14582,
14633,
14634,
14646,
14709,
14756,
14757,
14778,
14779,
14813,
14867,
14915,
14987,
15022,
15023,
15081,
15173,
15174,
15209,
15249,
15281,
15350,
15351,
15408,
15481,
15482,
15495,
15496,
15546,
15588,
15630,
15631,
15650,
15675,
15737,
15738,
15748
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 15748,
"ccnet_original_nlines": 515,
"rps_doc_curly_bracket": 0.0005080000264570117,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.023373980075120926,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.012533879838883877,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.6646341681480408,
"rps_doc_frac_unique_words": 0.4810810685157776,
"rps_doc_mean_word_length": 14.095134735107422,
"rps_doc_num_sentences": 264,
"rps_doc_symbol_to_word_ratio": 0.00033874998916871846,
"rps_doc_unigram_entropy": 5.487522602081299,
"rps_doc_word_count": 925,
"rps_doc_frac_chars_dupe_10grams": 0.028225189074873924,
"rps_doc_frac_chars_dupe_5grams": 0.10369689017534256,
"rps_doc_frac_chars_dupe_6grams": 0.07240373641252518,
"rps_doc_frac_chars_dupe_7grams": 0.03313392028212547,
"rps_doc_frac_chars_dupe_8grams": 0.028225189074873924,
"rps_doc_frac_chars_dupe_9grams": 0.028225189074873924,
"rps_doc_frac_chars_top_2gram": 0.042951371520757675,
"rps_doc_frac_chars_top_3gram": 0.028531979769468307,
"rps_doc_frac_chars_top_4gram": 0.021168889477849007,
"rps_doc_books_importance": -1412.7462158203125,
"rps_doc_books_importance_length_correction": -1412.7462158203125,
"rps_doc_openwebtext_importance": -710.8204956054688,
"rps_doc_openwebtext_importance_length_correction": -710.8204956054688,
"rps_doc_wikipedia_importance": -834.4716796875,
"rps_doc_wikipedia_importance_length_correction": -834.4716796875
},
"fasttext": {
"dclm": 0.9887297749519348,
"english": 0.0046439399011433125,
"fineweb_edu_approx": 3.6969308853149414,
"eai_general_math": 0.7933760285377502,
"eai_open_web_math": 0.020952219143509865,
"eai_web_code": 0.9673996567726135
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "794.8",
"labels": {
"level_1": "Arts",
"level_2": "Amusements and Recreation",
"level_3": ""
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "2",
"label": "Click Here References"
}
},
"document_type_v2": {
"primary": {
"code": "23",
"label": "Tutorial"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "3",
"label": "Intermediate Reasoning"
},
"secondary": {
"code": "2",
"label": "Basic Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
4,473,785,569,540,073,000 |
From a63da4511d0fee66695ff4afd264ba1dbf1e812d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Tue, 22 Nov 2016 22:58:35 +0200 Subject: [PATCH] aarch64: vp9itxfm: Do separate functions for half/quarter idct16 and idct32 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This work is sponsored by, and copyright, Google. This avoids loading and calculating coefficients that we know will be zero, and avoids filling the temp buffer with zeros in places where we know the second pass won't read. This gives a pretty substantial speedup for the smaller subpartitions. The code size increases from 14740 bytes to 24292 bytes. The idct16/32_end macros are moved above the individual functions; the instructions themselves are unchanged, but since new functions are added at the same place where the code is moved from, the diff looks rather messy. Before: vp9_inv_dct_dct_16x16_sub1_add_neon: 236.7 vp9_inv_dct_dct_16x16_sub2_add_neon: 1051.0 vp9_inv_dct_dct_16x16_sub4_add_neon: 1051.0 vp9_inv_dct_dct_16x16_sub8_add_neon: 1051.0 vp9_inv_dct_dct_16x16_sub12_add_neon: 1387.4 vp9_inv_dct_dct_16x16_sub16_add_neon: 1387.6 vp9_inv_dct_dct_32x32_sub1_add_neon: 554.1 vp9_inv_dct_dct_32x32_sub2_add_neon: 5198.5 vp9_inv_dct_dct_32x32_sub4_add_neon: 5198.6 vp9_inv_dct_dct_32x32_sub8_add_neon: 5196.3 vp9_inv_dct_dct_32x32_sub12_add_neon: 6183.4 vp9_inv_dct_dct_32x32_sub16_add_neon: 6174.3 vp9_inv_dct_dct_32x32_sub20_add_neon: 7151.4 vp9_inv_dct_dct_32x32_sub24_add_neon: 7145.3 vp9_inv_dct_dct_32x32_sub28_add_neon: 8119.3 vp9_inv_dct_dct_32x32_sub32_add_neon: 8118.7 After: vp9_inv_dct_dct_16x16_sub1_add_neon: 236.7 vp9_inv_dct_dct_16x16_sub2_add_neon: 640.8 vp9_inv_dct_dct_16x16_sub4_add_neon: 639.0 vp9_inv_dct_dct_16x16_sub8_add_neon: 842.0 vp9_inv_dct_dct_16x16_sub12_add_neon: 1388.3 vp9_inv_dct_dct_16x16_sub16_add_neon: 1389.3 vp9_inv_dct_dct_32x32_sub1_add_neon: 554.1 vp9_inv_dct_dct_32x32_sub2_add_neon: 3685.5 vp9_inv_dct_dct_32x32_sub4_add_neon: 3685.1 vp9_inv_dct_dct_32x32_sub8_add_neon: 3684.4 vp9_inv_dct_dct_32x32_sub12_add_neon: 5312.2 vp9_inv_dct_dct_32x32_sub16_add_neon: 5315.4 vp9_inv_dct_dct_32x32_sub20_add_neon: 7154.9 vp9_inv_dct_dct_32x32_sub24_add_neon: 7154.5 vp9_inv_dct_dct_32x32_sub28_add_neon: 8126.6 vp9_inv_dct_dct_32x32_sub32_add_neon: 8127.2 Signed-off-by: Martin Storsjö --- libavcodec/aarch64/vp9itxfm_neon.S | 525 ++++++++++++++++++++++++++++++++----- 1 file changed, 466 insertions(+), 59 deletions(-) diff --git a/libavcodec/aarch64/vp9itxfm_neon.S b/libavcodec/aarch64/vp9itxfm_neon.S index b6cadfb66b..c954d1a5e1 100644 --- a/libavcodec/aarch64/vp9itxfm_neon.S +++ b/libavcodec/aarch64/vp9itxfm_neon.S @@ -75,6 +75,17 @@ endconst .endif .endm +// Same as dmbutterfly0 above, but treating the input in in2 as zero, +// writing the same output into both out1 and out2. +.macro dmbutterfly0_h out1, out2, in1, in2, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6 + smull \tmp1\().4s, \in1\().4h, v0.h[0] + smull2 \tmp2\().4s, \in1\().8h, v0.h[0] + rshrn \out1\().4h, \tmp1\().4s, #14 + rshrn2 \out1\().8h, \tmp2\().4s, #14 + rshrn \out2\().4h, \tmp1\().4s, #14 + rshrn2 \out2\().8h, \tmp2\().4s, #14 +.endm + // out1,out2 = in1 * coef1 - in2 * coef2 // out3,out4 = in1 * coef2 + in2 * coef1 // out are 4 x .4s registers, in are 2 x .8h registers @@ -104,6 +115,43 @@ endconst rshrn2 \inout2\().8h, \tmp4\().4s, #14 .endm +// Same as dmbutterfly above, but treating the input in inout2 as zero +.macro dmbutterfly_h1 inout1, inout2, coef1, coef2, tmp1, tmp2, tmp3, tmp4 + smull \tmp1\().4s, \inout1\().4h, \coef1 + smull2 \tmp2\().4s, \inout1\().8h, \coef1 + smull \tmp3\().4s, \inout1\().4h, \coef2 + smull2 \tmp4\().4s, \inout1\().8h, \coef2 + rshrn \inout1\().4h, \tmp1\().4s, #14 + rshrn2 \inout1\().8h, \tmp2\().4s, #14 + rshrn \inout2\().4h, \tmp3\().4s, #14 + rshrn2 \inout2\().8h, \tmp4\().4s, #14 +.endm + +// Same as dmbutterfly above, but treating the input in inout1 as zero +.macro dmbutterfly_h2 inout1, inout2, coef1, coef2, tmp1, tmp2, tmp3, tmp4 + smull \tmp1\().4s, \inout2\().4h, \coef2 + smull2 \tmp2\().4s, \inout2\().8h, \coef2 + smull \tmp3\().4s, \inout2\().4h, \coef1 + smull2 \tmp4\().4s, \inout2\().8h, \coef1 + neg \tmp1\().4s, \tmp1\().4s + neg \tmp2\().4s, \tmp2\().4s + rshrn \inout2\().4h, \tmp3\().4s, #14 + rshrn2 \inout2\().8h, \tmp4\().4s, #14 + rshrn \inout1\().4h, \tmp1\().4s, #14 + rshrn2 \inout1\().8h, \tmp2\().4s, #14 +.endm + +.macro dsmull_h out1, out2, in, coef + smull \out1\().4s, \in\().4h, \coef + smull2 \out2\().4s, \in\().8h, \coef +.endm + +.macro drshrn_h out, in1, in2, shift + rshrn \out\().4h, \in1\().4s, \shift + rshrn2 \out\().8h, \in2\().4s, \shift +.endm + + // out1 = in1 + in2 // out2 = in1 - in2 .macro butterfly_8h out1, out2, in1, in2 @@ -463,6 +511,30 @@ function idct16x16_dc_add_neon ret endfunc +.macro idct16_end + butterfly_8h v18, v7, v4, v7 // v18 = t0a, v7 = t7a + butterfly_8h v19, v22, v5, v22 // v19 = t1a, v22 = t6 + butterfly_8h v4, v26, v20, v26 // v4 = t2a, v26 = t5 + butterfly_8h v5, v6, v28, v6 // v5 = t3a, v6 = t4 + butterfly_8h v20, v28, v16, v24 // v20 = t8a, v28 = t11a + butterfly_8h v24, v21, v23, v21 // v24 = t9, v21 = t10 + butterfly_8h v23, v27, v25, v27 // v23 = t14, v27 = t13 + butterfly_8h v25, v29, v29, v17 // v25 = t15a, v29 = t12a + + dmbutterfly0 v2, v3, v27, v21, v2, v3, v16, v17, v30, v31 // v2 = t13a, v3 = t10a + dmbutterfly0 v28, v27, v29, v28, v21, v29, v16, v17, v30, v31 // v28 = t12, v27 = t11 + + butterfly_8h v16, v31, v18, v25 // v16 = out[0], v31 = out[15] + butterfly_8h v17, v30, v19, v23 // v17 = out[1], v30 = out[14] + butterfly_8h_r v25, v22, v22, v24 // v25 = out[9], v22 = out[6] + butterfly_8h v23, v24, v7, v20 // v23 = out[7], v24 = out[8] + butterfly_8h v18, v29, v4, v2 // v18 = out[2], v29 = out[13] + butterfly_8h v19, v28, v5, v28 // v19 = out[3], v28 = out[12] + butterfly_8h v20, v27, v6, v27 // v20 = out[4], v27 = out[11] + butterfly_8h v21, v26, v26, v3 // v21 = out[5], v26 = out[10] + ret +.endm + function idct16 dmbutterfly0 v16, v24, v16, v24, v2, v3, v4, v5, v6, v7 // v16 = t0a, v24 = t1a dmbutterfly v20, v28, v0.h[1], v0.h[2], v2, v3, v4, v5 // v20 = t2a, v28 = t3a @@ -485,28 +557,65 @@ function idct16 dmbutterfly0 v22, v26, v22, v26, v2, v3, v18, v19, v30, v31 // v22 = t6a, v26 = t5a dmbutterfly v23, v25, v0.h[1], v0.h[2], v18, v19, v30, v31 // v23 = t9a, v25 = t14a dmbutterfly v27, v21, v0.h[1], v0.h[2], v18, v19, v30, v31, neg=1 // v27 = t13a, v21 = t10a + idct16_end +endfunc - butterfly_8h v18, v7, v4, v7 // v18 = t0a, v7 = t7a - butterfly_8h v19, v22, v5, v22 // v19 = t1a, v22 = t6 - butterfly_8h v4, v26, v20, v26 // v4 = t2a, v26 = t5 - butterfly_8h v5, v6, v28, v6 // v5 = t3a, v6 = t4 - butterfly_8h v20, v28, v16, v24 // v20 = t8a, v28 = t11a - butterfly_8h v24, v21, v23, v21 // v24 = t9, v21 = t10 - butterfly_8h v23, v27, v25, v27 // v23 = t14, v27 = t13 - butterfly_8h v25, v29, v29, v17 // v25 = t15a, v29 = t12a +function idct16_half + dmbutterfly0_h v16, v24, v16, v24, v2, v3, v4, v5, v6, v7 // v16 = t0a, v24 = t1a + dmbutterfly_h1 v20, v28, v0.h[1], v0.h[2], v2, v3, v4, v5 // v20 = t2a, v28 = t3a + dmbutterfly_h1 v18, v30, v0.h[3], v0.h[4], v2, v3, v4, v5 // v18 = t4a, v30 = t7a + dmbutterfly_h2 v26, v22, v0.h[5], v0.h[6], v2, v3, v4, v5 // v26 = t5a, v22 = t6a + dmbutterfly_h1 v17, v31, v0.h[7], v1.h[0], v2, v3, v4, v5 // v17 = t8a, v31 = t15a + dmbutterfly_h2 v25, v23, v1.h[1], v1.h[2], v2, v3, v4, v5 // v25 = t9a, v23 = t14a + dmbutterfly_h1 v21, v27, v1.h[3], v1.h[4], v2, v3, v4, v5 // v21 = t10a, v27 = t13a + dmbutterfly_h2 v29, v19, v1.h[5], v1.h[6], v2, v3, v4, v5 // v29 = t11a, v19 = t12a - dmbutterfly0 v2, v3, v27, v21, v2, v3, v16, v17, v30, v31 // v2 = t13a, v3 = t10a - dmbutterfly0 v28, v27, v29, v28, v21, v29, v16, v17, v30, v31 // v28 = t12, v27 = t11 + butterfly_8h v4, v28, v16, v28 // v4 = t0, v28 = t3 + butterfly_8h v5, v20, v24, v20 // v5 = t1, v20 = t2 + butterfly_8h v6, v26, v18, v26 // v6 = t4, v26 = t5 + butterfly_8h v7, v22, v30, v22 // v7 = t7, v22 = t6 + butterfly_8h v16, v25, v17, v25 // v16 = t8, v25 = t9 + butterfly_8h v24, v21, v29, v21 // v24 = t11, v21 = t10 + butterfly_8h v17, v27, v19, v27 // v17 = t12, v27 = t13 + butterfly_8h v29, v23, v31, v23 // v29 = t15, v23 = t14 - butterfly_8h v16, v31, v18, v25 // v16 = out[0], v31 = out[15] - butterfly_8h v17, v30, v19, v23 // v17 = out[1], v30 = out[14] - butterfly_8h_r v25, v22, v22, v24 // v25 = out[9], v22 = out[6] - butterfly_8h v23, v24, v7, v20 // v23 = out[7], v24 = out[8] - butterfly_8h v18, v29, v4, v2 // v18 = out[2], v29 = out[13] - butterfly_8h v19, v28, v5, v28 // v19 = out[3], v28 = out[12] - butterfly_8h v20, v27, v6, v27 // v20 = out[4], v27 = out[11] - butterfly_8h v21, v26, v26, v3 // v21 = out[5], v26 = out[10] - ret + dmbutterfly0 v22, v26, v22, v26, v2, v3, v18, v19, v30, v31 // v22 = t6a, v26 = t5a + dmbutterfly v23, v25, v0.h[1], v0.h[2], v18, v19, v30, v31 // v23 = t9a, v25 = t14a + dmbutterfly v27, v21, v0.h[1], v0.h[2], v18, v19, v30, v31, neg=1 // v27 = t13a, v21 = t10a + idct16_end +endfunc + +function idct16_quarter + dsmull_h v24, v25, v19, v1.h[6] + dsmull_h v4, v5, v17, v0.h[7] + dsmull_h v7, v6, v18, v0.h[4] + dsmull_h v30, v31, v18, v0.h[3] + neg v24.4s, v24.4s + neg v25.4s, v25.4s + dsmull_h v29, v28, v17, v1.h[0] + dsmull_h v26, v27, v19, v1.h[5] + dsmull_h v22, v23, v16, v0.h[0] + drshrn_h v24, v24, v25, #14 + drshrn_h v16, v4, v5, #14 + drshrn_h v7, v7, v6, #14 + drshrn_h v6, v30, v31, #14 + drshrn_h v29, v29, v28, #14 + drshrn_h v17, v26, v27, #14 + drshrn_h v28, v22, v23, #14 + + dmbutterfly_l v20, v21, v22, v23, v17, v24, v0.h[1], v0.h[2] + dmbutterfly_l v18, v19, v30, v31, v29, v16, v0.h[1], v0.h[2] + neg v22.4s, v22.4s + neg v23.4s, v23.4s + drshrn_h v27, v20, v21, #14 + drshrn_h v21, v22, v23, #14 + drshrn_h v23, v18, v19, #14 + drshrn_h v25, v30, v31, #14 + mov v4.16b, v28.16b + mov v5.16b, v28.16b + dmbutterfly0 v22, v26, v7, v6, v18, v19, v30, v31 + mov v20.16b, v28.16b + idct16_end endfunc function iadst16 @@ -756,6 +865,13 @@ function ff_vp9_\txfm1\()_\txfm2\()_16x16_add_neon, export=1 .endif mov x9, #32 +.ifc \txfm1\()_\txfm2,idct_idct + cmp w3, #10 + b.le idct16x16_quarter_add_neon + cmp w3, #38 + b.le idct16x16_half_add_neon +.endif + .irp i, 0, 8 add x0, sp, #(\i*32) .ifc \txfm1\()_\txfm2,idct_idct @@ -812,6 +928,116 @@ itxfm_func16x16 iadst, idct itxfm_func16x16 idct, iadst itxfm_func16x16 iadst, iadst +function idct16_1d_8x16_pass1_quarter_neon + mov x14, x30 + movi v2.8h, #0 +.irp i, 16, 17, 18, 19 + load_clear \i, x2, x9 +.endr + + bl idct16_quarter + + // Do two 8x8 transposes. Originally, v16-v31 contain the + // 16 rows. Afterwards, v16-v23 and v24-v31 contain the two + // transposed 8x8 blocks. + transpose_8x8H v16, v17, v18, v19, v20, v21, v22, v23, v2, v3 + transpose_8x8H v24, v25, v26, v27, v28, v29, v30, v31, v2, v3 + + // Store the transposed 8x8 blocks horizontally. + // The first 8x8 block is kept in registers for the second pass, + // store the rest in the temp buffer. + // Since only a 4x4 part of the input was nonzero, this means that + // only 4 rows are nonzero after transposing, and the second pass + // only reads the topmost 4 rows. Therefore only store the topmost + // 4 rows. + add x0, x0, #16 +.irp i, 24, 25, 26, 27 + store \i, x0, x9 +.endr + br x14 +endfunc + +function idct16_1d_8x16_pass2_quarter_neon + mov x14, x30 + cbz x3, 1f +.irp i, 16, 17, 18, 19 + load \i, x2, x9 +.endr +1: + + add x3, x0, x1 + lsl x1, x1, #1 + bl idct16_quarter + + load_add_store v16.8h, v17.8h, v18.8h, v19.8h, v20.8h, v21.8h, v22.8h, v23.8h, v16.8b, v17.8b + load_add_store v24.8h, v25.8h, v26.8h, v27.8h, v28.8h, v29.8h, v30.8h, v31.8h, v16.8b, v17.8b + + br x14 +endfunc + +function idct16_1d_8x16_pass1_half_neon + mov x14, x30 + movi v2.8h, #0 +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load_clear \i, x2, x9 +.endr + + bl idct16_half + + // Do two 8x8 transposes. Originally, v16-v31 contain the + // 16 rows. Afterwards, v16-v23 and v24-v31 contain the two + // transposed 8x8 blocks. + transpose_8x8H v16, v17, v18, v19, v20, v21, v22, v23, v2, v3 + transpose_8x8H v24, v25, v26, v27, v28, v29, v30, v31, v2, v3 + + // Store the transposed 8x8 blocks horizontally. + // The first 8x8 block is kept in registers for the second pass, + // store the rest in the temp buffer. + add x0, x0, #16 +.irp i, 24, 25, 26, 27, 28, 29, 30, 31 + store \i, x0, x9 +.endr + br x14 +endfunc + +function idct16_1d_8x16_pass2_half_neon + mov x14, x30 + cbz x3, 1f +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load \i, x2, x9 +.endr +1: + + add x3, x0, x1 + lsl x1, x1, #1 + bl idct16_half + + load_add_store v16.8h, v17.8h, v18.8h, v19.8h, v20.8h, v21.8h, v22.8h, v23.8h, v16.8b, v17.8b + load_add_store v24.8h, v25.8h, v26.8h, v27.8h, v28.8h, v29.8h, v30.8h, v31.8h, v16.8b, v17.8b + + br x14 +endfunc + +.macro idct16_partial size +function idct16x16_\size\()_add_neon + add x0, sp, #(0*32) + add x2, x6, #(0*2) + bl idct16_1d_8x16_pass1_\size\()_neon +.irp i, 0, 8 + add x0, x4, #(\i) + mov x1, x5 + add x2, sp, #(\i*2) + mov x3, #\i + bl idct16_1d_8x16_pass2_\size\()_neon +.endr + + add sp, sp, #512 + br x15 +endfunc +.endm + +idct16_partial quarter +idct16_partial half function idct32x32_dc_add_neon movrel x4, idct_coeffs @@ -848,6 +1074,37 @@ function idct32x32_dc_add_neon ret endfunc +.macro idct32_end + butterfly_8h v16, v5, v4, v5 // v16 = t16a, v5 = t19a + butterfly_8h v17, v20, v23, v20 // v17 = t17, v20 = t18 + butterfly_8h v18, v6, v7, v6 // v18 = t23a, v6 = t20a + butterfly_8h v19, v21, v22, v21 // v19 = t22, v21 = t21 + butterfly_8h v4, v28, v28, v30 // v4 = t24a, v28 = t27a + butterfly_8h v23, v26, v25, v26 // v23 = t25, v26 = t26 + butterfly_8h v7, v3, v29, v31 // v7 = t31a, v3 = t28a + butterfly_8h v22, v27, v24, v27 // v22 = t30, v27 = t29 + + dmbutterfly v27, v20, v0.h[1], v0.h[2], v24, v25, v30, v31 // v27 = t18a, v20 = t29a + dmbutterfly v3, v5, v0.h[1], v0.h[2], v24, v25, v30, v31 // v3 = t19, v5 = t28 + dmbutterfly v28, v6, v0.h[1], v0.h[2], v24, v25, v30, v31, neg=1 // v28 = t27, v6 = t20 + dmbutterfly v26, v21, v0.h[1], v0.h[2], v24, v25, v30, v31, neg=1 // v26 = t26a, v21 = t21a + + butterfly_8h v31, v24, v7, v4 // v31 = t31, v24 = t24 + butterfly_8h v30, v25, v22, v23 // v30 = t30a, v25 = t25a + butterfly_8h_r v23, v16, v16, v18 // v23 = t23, v16 = t16 + butterfly_8h_r v22, v17, v17, v19 // v22 = t22a, v17 = t17a + butterfly_8h v18, v21, v27, v21 // v18 = t18, v21 = t21 + butterfly_8h_r v27, v28, v5, v28 // v27 = t27a, v28 = t28a + butterfly_8h v29, v26, v20, v26 // v29 = t29, v26 = t26 + butterfly_8h v19, v20, v3, v6 // v19 = t19a, v20 = t20 + + dmbutterfly0 v27, v20, v27, v20, v2, v3, v4, v5, v6, v7 // v27 = t27, v20 = t20 + dmbutterfly0 v26, v21, v26, v21, v2, v3, v4, v5, v6, v7 // v26 = t26a, v21 = t21a + dmbutterfly0 v25, v22, v25, v22, v2, v3, v4, v5, v6, v7 // v25 = t25, v22 = t22 + dmbutterfly0 v24, v23, v24, v23, v2, v3, v4, v5, v6, v7 // v24 = t24a, v23 = t23a + ret +.endm + function idct32_odd ld1 {v0.8h,v1.8h}, [x11] @@ -875,37 +1132,88 @@ function idct32_odd dmbutterfly v27, v20, v0.h[3], v0.h[4], v16, v17, v18, v19, neg=1 // v27 = t29a, v20 = t18a dmbutterfly v21, v26, v0.h[5], v0.h[6], v16, v17, v18, v19 // v21 = t21a, v26 = t26a dmbutterfly v25, v22, v0.h[5], v0.h[6], v16, v17, v18, v19, neg=1 // v25 = t25a, v22 = t22a + idct32_end +endfunc - butterfly_8h v16, v5, v4, v5 // v16 = t16a, v5 = t19a - butterfly_8h v17, v20, v23, v20 // v17 = t17, v20 = t18 - butterfly_8h v18, v6, v7, v6 // v18 = t23a, v6 = t20a - butterfly_8h v19, v21, v22, v21 // v19 = t22, v21 = t21 - butterfly_8h v4, v28, v28, v30 // v4 = t24a, v28 = t27a - butterfly_8h v23, v26, v25, v26 // v23 = t25, v26 = t26 - butterfly_8h v7, v3, v29, v31 // v7 = t31a, v3 = t28a - butterfly_8h v22, v27, v24, v27 // v22 = t30, v27 = t29 +function idct32_odd_half + ld1 {v0.8h,v1.8h}, [x11] - dmbutterfly v27, v20, v0.h[1], v0.h[2], v24, v25, v30, v31 // v27 = t18a, v20 = t29a - dmbutterfly v3, v5, v0.h[1], v0.h[2], v24, v25, v30, v31 // v3 = t19, v5 = t28 - dmbutterfly v28, v6, v0.h[1], v0.h[2], v24, v25, v30, v31, neg=1 // v28 = t27, v6 = t20 - dmbutterfly v26, v21, v0.h[1], v0.h[2], v24, v25, v30, v31, neg=1 // v26 = t26a, v21 = t21a + dmbutterfly_h1 v16, v31, v0.h[0], v0.h[1], v4, v5, v6, v7 // v16 = t16a, v31 = t31a + dmbutterfly_h2 v24, v23, v0.h[2], v0.h[3], v4, v5, v6, v7 // v24 = t17a, v23 = t30a + dmbutterfly_h1 v20, v27, v0.h[4], v0.h[5], v4, v5, v6, v7 // v20 = t18a, v27 = t29a + dmbutterfly_h2 v28, v19, v0.h[6], v0.h[7], v4, v5, v6, v7 // v28 = t19a, v19 = t28a + dmbutterfly_h1 v18, v29, v1.h[0], v1.h[1], v4, v5, v6, v7 // v18 = t20a, v29 = t27a + dmbutterfly_h2 v26, v21, v1.h[2], v1.h[3], v4, v5, v6, v7 // v26 = t21a, v21 = t26a + dmbutterfly_h1 v22, v25, v1.h[4], v1.h[5], v4, v5, v6, v7 // v22 = t22a, v25 = t25a + dmbutterfly_h2 v30, v17, v1.h[6], v1.h[7], v4, v5, v6, v7 // v30 = t23a, v17 = t24a - butterfly_8h v31, v24, v7, v4 // v31 = t31, v24 = t24 - butterfly_8h v30, v25, v22, v23 // v30 = t30a, v25 = t25a - butterfly_8h_r v23, v16, v16, v18 // v23 = t23, v16 = t16 - butterfly_8h_r v22, v17, v17, v19 // v22 = t22a, v17 = t17a - butterfly_8h v18, v21, v27, v21 // v18 = t18, v21 = t21 - butterfly_8h_r v27, v28, v5, v28 // v27 = t27a, v28 = t28a - butterfly_8h v29, v26, v20, v26 // v29 = t29, v26 = t26 - butterfly_8h v19, v20, v3, v6 // v19 = t19a, v20 = t20 + ld1 {v0.8h}, [x10] - dmbutterfly0 v27, v20, v27, v20, v2, v3, v4, v5, v6, v7 // v27 = t27, v20 = t20 - dmbutterfly0 v26, v21, v26, v21, v2, v3, v4, v5, v6, v7 // v26 = t26a, v21 = t21a - dmbutterfly0 v25, v22, v25, v22, v2, v3, v4, v5, v6, v7 // v25 = t25, v22 = t22 - dmbutterfly0 v24, v23, v24, v23, v2, v3, v4, v5, v6, v7 // v24 = t24a, v23 = t23a - ret + butterfly_8h v4, v24, v16, v24 // v4 = t16, v24 = t17 + butterfly_8h v5, v20, v28, v20 // v5 = t19, v20 = t18 + butterfly_8h v6, v26, v18, v26 // v6 = t20, v26 = t21 + butterfly_8h v7, v22, v30, v22 // v7 = t23, v22 = t22 + butterfly_8h v28, v25, v17, v25 // v28 = t24, v25 = t25 + butterfly_8h v30, v21, v29, v21 // v30 = t27, v21 = t26 + butterfly_8h v29, v23, v31, v23 // v29 = t31, v23 = t30 + butterfly_8h v31, v27, v19, v27 // v31 = t28, v27 = t29 + + dmbutterfly v23, v24, v0.h[3], v0.h[4], v16, v17, v18, v19 // v23 = t17a, v24 = t30a + dmbutterfly v27, v20, v0.h[3], v0.h[4], v16, v17, v18, v19, neg=1 // v27 = t29a, v20 = t18a + dmbutterfly v21, v26, v0.h[5], v0.h[6], v16, v17, v18, v19 // v21 = t21a, v26 = t26a + dmbutterfly v25, v22, v0.h[5], v0.h[6], v16, v17, v18, v19, neg=1 // v25 = t25a, v22 = t22a + idct32_end endfunc +function idct32_odd_quarter + ld1 {v0.8h,v1.8h}, [x11] + + dsmull_h v4, v5, v16, v0.h[0] + dsmull_h v28, v29, v19, v0.h[7] + dsmull_h v30, v31, v16, v0.h[1] + dsmull_h v22, v23, v17, v1.h[6] + dsmull_h v7, v6, v17, v1.h[7] + dsmull_h v26, v27, v19, v0.h[6] + dsmull_h v20, v21, v18, v1.h[0] + dsmull_h v24, v25, v18, v1.h[1] + + ld1 {v0.8h}, [x10] + + neg v28.4s, v28.4s + neg v29.4s, v29.4s + neg v7.4s, v7.4s + neg v6.4s, v6.4s + + drshrn_h v4, v4, v5, #14 + drshrn_h v5, v28, v29, #14 + drshrn_h v29, v30, v31, #14 + drshrn_h v28, v22, v23, #14 + drshrn_h v7, v7, v6, #14 + drshrn_h v31, v26, v27, #14 + drshrn_h v6, v20, v21, #14 + drshrn_h v30, v24, v25, #14 + + dmbutterfly_l v16, v17, v18, v19, v29, v4, v0.h[3], v0.h[4] + dmbutterfly_l v27, v26, v20, v21, v31, v5, v0.h[3], v0.h[4] + drshrn_h v23, v16, v17, #14 + drshrn_h v24, v18, v19, #14 + neg v20.4s, v20.4s + neg v21.4s, v21.4s + drshrn_h v27, v27, v26, #14 + drshrn_h v20, v20, v21, #14 + dmbutterfly_l v16, v17, v18, v19, v30, v6, v0.h[5], v0.h[6] + drshrn_h v21, v16, v17, #14 + drshrn_h v26, v18, v19, #14 + dmbutterfly_l v16, v17, v18, v19, v28, v7, v0.h[5], v0.h[6] + drshrn_h v25, v16, v17, #14 + neg v18.4s, v18.4s + neg v19.4s, v19.4s + drshrn_h v22, v18, v19, #14 + + idct32_end +endfunc + +.macro idct32_funcs suffix // Do an 32-point IDCT of a 8x32 slice out of a 32x32 matrix. // The 32-point IDCT can be decomposed into two 16-point IDCTs; // a normal IDCT16 with every other input component (the even ones, with @@ -917,19 +1225,30 @@ endfunc // x9 = double input stride // x10 = idct_coeffs // x11 = idct_coeffs + 32 -function idct32_1d_8x32_pass1_neon +function idct32_1d_8x32_pass1\suffix\()_neon mov x14, x30 ld1 {v0.8h,v1.8h}, [x10] - movi v4.8h, #0 + movi v2.8h, #0 // v16 = IN(0), v17 = IN(2) ... v31 = IN(30) +.ifb \suffix .irp i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - ld1 {v\i\().8h}, [x2] - st1 {v4.8h}, [x2], x9 + load_clear \i, x2, x9 .endr +.endif +.ifc \suffix,_quarter +.irp i, 16, 17, 18, 19 + load_clear \i, x2, x9 +.endr +.endif +.ifc \suffix,_half +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load_clear \i, x2, x9 +.endr +.endif - bl idct16 + bl idct16\suffix // Do two 8x8 transposes. Originally, v16-v31 contain the // 16 rows. Afterwards, v16-v23 and v24-v31 contain the @@ -964,17 +1283,36 @@ function idct32_1d_8x32_pass1_neon // Move x2 back to the start of the input, and move // to the first odd row +.ifb \suffix sub x2, x2, x9, lsl #4 +.endif +.ifc \suffix,_quarter + sub x2, x2, x9, lsl #2 +.endif +.ifc \suffix,_half + sub x2, x2, x9, lsl #3 +.endif add x2, x2, #64 - movi v4.8h, #0 + movi v2.8h, #0 // v16 = IN(1), v17 = IN(3) ... v31 = IN(31) +.ifb \suffix .irp i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - ld1 {v\i\().8h}, [x2] - st1 {v4.8h}, [x2], x9 + load_clear \i, x2, x9 +.endr +.endif +.ifc \suffix,_quarter +.irp i, 16, 17, 18, 19 + load_clear \i, x2, x9 +.endr +.endif +.ifc \suffix,_half +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load_clear \i, x2, x9 .endr +.endif - bl idct32_odd + bl idct32_odd\suffix transpose_8x8H v31, v30, v29, v28, v27, v26, v25, v24, v2, v3 transpose_8x8H v23, v22, v21, v20, v19, v18, v17, v16, v2, v3 @@ -1023,33 +1361,61 @@ endfunc // x9 = double temp buffer stride // x10 = idct_coeffs // x11 = idct_coeffs + 32 -function idct32_1d_8x32_pass2_neon +function idct32_1d_8x32_pass2\suffix\()_neon mov x14, x30 ld1 {v0.8h,v1.8h}, [x10] // v16 = IN(0), v17 = IN(2) ... v31 = IN(30) +.ifb \suffix .irp i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - ld1 {v\i\().8h}, [x2], x9 + load \i, x2, x9 .endr sub x2, x2, x9, lsl #4 +.endif +.ifc \suffix,_quarter +.irp i, 16, 17, 18, 19 + load \i, x2, x9 +.endr + sub x2, x2, x9, lsl #2 +.endif +.ifc \suffix,_half +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load \i, x2, x9 +.endr + sub x2, x2, x9, lsl #3 +.endif - bl idct16 + bl idct16\suffix .irp i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - st1 {v\i\().8h}, [x2], x9 + store \i, x2, x9 .endr sub x2, x2, x9, lsl #4 add x2, x2, #64 // v16 = IN(1), v17 = IN(3) ... v31 = IN(31) +.ifb \suffix .irp i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - ld1 {v\i\().8h}, [x2], x9 + load \i, x2, x9 .endr sub x2, x2, x9, lsl #4 +.endif +.ifc \suffix,_quarter +.irp i, 16, 17, 18, 19 + load \i, x2, x9 +.endr + sub x2, x2, x9, lsl #2 +.endif +.ifc \suffix,_half +.irp i, 16, 17, 18, 19, 20, 21, 22, 23 + load \i, x2, x9 +.endr + sub x2, x2, x9, lsl #3 +.endif sub x2, x2, #64 - bl idct32_odd + bl idct32_odd\suffix .macro load_acc_store a, b, c, d, neg=0 .if \neg == 0 @@ -1105,6 +1471,11 @@ function idct32_1d_8x32_pass2_neon .purgem load_acc_store br x14 endfunc +.endm + +idct32_funcs +idct32_funcs _quarter +idct32_funcs _half const min_eob_idct_idct_32, align=4 .short 0, 34, 135, 336 @@ -1135,6 +1506,11 @@ function ff_vp9_idct_idct_32x32_add_neon, export=1 mov x9, #128 neg x7, x9 + cmp w3, #34 + b.le idct32x32_quarter_add_neon + cmp w3, #135 + b.le idct32x32_half_add_neon + .irp i, 0, 8, 16, 24 add x0, sp, #(\i*64) .if \i > 0 @@ -1177,3 +1553,34 @@ function ff_vp9_idct_idct_32x32_add_neon, export=1 br x15 endfunc + +.macro idct32_partial size +function idct32x32_\size\()_add_neon + add x0, sp, #(0*64) + add x2, x6, #(0*2) + bl idct32_1d_8x32_pass1_\size\()_neon +.ifc \size,half + add x0, sp, #(8*64) + add x2, x6, #(8*2) + bl idct32_1d_8x32_pass1_\size\()_neon +.endif +.irp i, 0, 8, 16, 24 + add x0, x4, #(\i) + mov x1, x5 + add x2, sp, #(\i*2) + bl idct32_1d_8x32_pass2_\size\()_neon +.endr + + add sp, sp, #2048 + + ldp d8, d9, [sp], 0x10 + ldp d10, d11, [sp], 0x10 + ldp d12, d13, [sp], 0x10 + ldp d14, d15, [sp], 0x10 + + br x15 +endfunc +.endm + +idct32_partial quarter +idct32_partial half -- 2.11.0
|
{
"url": "http://git.videolan.org/?p=ffmpeg.git;a=patch;h=a63da4511d0fee66695ff4afd264ba1dbf1e812d",
"source_domain": "git.videolan.org",
"snapshot_id": "crawl=CC-MAIN-2019-26",
"warc_metadata": {
"Content-Length": "31341",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:OMJIFJVYITHI5SZFV7O7ZBNVEPU5A4GB",
"WARC-Concurrent-To": "<urn:uuid:0d439af9-ac84-4d56-9b84-a8c2ce2686a0>",
"WARC-Date": "2019-06-25T01:31:28Z",
"WARC-IP-Address": "88.191.250.5",
"WARC-Identified-Payload-Type": "application/mbox",
"WARC-Payload-Digest": "sha1:P6WF6EVSOTZETOGYL6T4256EJWNHOXRT",
"WARC-Record-ID": "<urn:uuid:08bade3a-92fa-45e0-a5c6-9819317089f0>",
"WARC-Target-URI": "http://git.videolan.org/?p=ffmpeg.git;a=patch;h=a63da4511d0fee66695ff4afd264ba1dbf1e812d",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:1961f61d-6aca-47b0-95ec-eb2d397bde02>"
},
"warc_info": "isPartOf: CC-MAIN-2019-26\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-138-121-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
],
"line_end_idx": [
24381
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 24381,
"ccnet_original_nlines": 0,
"rps_doc_curly_bracket": 0.0011484399437904358,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.05114753916859627,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.0031475399155169725,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.5457049012184143,
"rps_doc_frac_unique_words": 0.1795835644006729,
"rps_doc_mean_word_length": 4.380856037139893,
"rps_doc_num_sentences": 437,
"rps_doc_symbol_to_word_ratio": 0.011540980078279972,
"rps_doc_unigram_entropy": 5.494715213775635,
"rps_doc_word_count": 3458,
"rps_doc_frac_chars_dupe_10grams": 0.43501222133636475,
"rps_doc_frac_chars_dupe_5grams": 0.5000990033149719,
"rps_doc_frac_chars_dupe_6grams": 0.49303585290908813,
"rps_doc_frac_chars_dupe_7grams": 0.46814972162246704,
"rps_doc_frac_chars_dupe_8grams": 0.45587167143821716,
"rps_doc_frac_chars_dupe_9grams": 0.4437916576862335,
"rps_doc_frac_chars_top_2gram": 0.008449399843811989,
"rps_doc_frac_chars_top_3gram": 0.0071291797794401646,
"rps_doc_frac_chars_top_4gram": 0.009505580179393291,
"rps_doc_books_importance": -3200.776123046875,
"rps_doc_books_importance_length_correction": -3200.776123046875,
"rps_doc_openwebtext_importance": -1063.48095703125,
"rps_doc_openwebtext_importance_length_correction": -1063.48095703125,
"rps_doc_wikipedia_importance": -552.9293823242188,
"rps_doc_wikipedia_importance_length_correction": -552.9293823242188
},
"fasttext": {
"dclm": 0.9986984133720398,
"english": 0.3049474060535431,
"fineweb_edu_approx": 3.3833820819854736,
"eai_general_math": 0.3988600969314575,
"eai_open_web_math": 0.34899866580963135,
"eai_web_code": 0.5699911117553711
}
}
|
{
"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.3922",
"labels": {
"level_1": "Industrial arts, Technology, and Engineering",
"level_2": "Engineering",
"level_3": "Mechanical engineering and Machinery"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "5",
"label": "Exceptionally Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-2,927,122,085,097,228,300 |
Forrest logo
tool overview
On this page you find all important commands for the CLI tool composer-require-checker. If the command you are looking for is missing please ask our AI.
composer-require-checker
A CLI tool to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies
List of commands for composer-require-checker:
• composer-require-checker:tldr:aa014 composer-require-checker: Analyze a Composer JSON file with a specific configuration.
$ composer-require-checker check --config-file ${path-to-config-json} ${path-to-composer-json}
try on your machine
explain this command
• composer-require-checker:tldr:b4fc2 composer-require-checker: Analyze a Composer JSON file.
$ composer-require-checker check ${path-to-composer-json}
try on your machine
explain this command
tool overview
|
{
"url": "https://forrestcli.com/tools/composer-require-checker",
"source_domain": "forrestcli.com",
"snapshot_id": "CC-MAIN-2024-30",
"warc_metadata": {
"Content-Length": "13572",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:SHNKEBEQWI4A7PVFZLS7DKDCPSJG5X4F",
"WARC-Concurrent-To": "<urn:uuid:b401c546-a22a-4a75-85d7-afdbf262f503>",
"WARC-Date": "2024-07-14T14:41:01Z",
"WARC-IP-Address": "167.235.151.140",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:F2VSZJTOOZBZBQQCVYYV3WRNBF2UNNIL",
"WARC-Record-ID": "<urn:uuid:90518ef0-ab72-47d9-8fd8-a1dc48d41dd2>",
"WARC-Target-URI": "https://forrestcli.com/tools/composer-require-checker",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:94018ca8-043f-4cac-a643-4ff1b51ac883>"
},
"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-164\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
13,
27,
180,
181,
206,
207,
338,
339,
386,
387,
513,
612,
636,
661,
757,
819,
843,
868
],
"line_end_idx": [
13,
27,
180,
181,
206,
207,
338,
339,
386,
387,
513,
612,
636,
661,
757,
819,
843,
868,
881
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 881,
"ccnet_original_nlines": 18,
"rps_doc_curly_bracket": 0.006810440216213465,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.21311475336551666,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03278689086437225,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2786885201931,
"rps_doc_frac_unique_words": 0.5841584205627441,
"rps_doc_mean_word_length": 6.8712873458862305,
"rps_doc_num_sentences": 5,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.908003568649292,
"rps_doc_word_count": 101,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.2824207544326782,
"rps_doc_frac_chars_dupe_6grams": 0.2824207544326782,
"rps_doc_frac_chars_dupe_7grams": 0.14985591173171997,
"rps_doc_frac_chars_dupe_8grams": 0.14985591173171997,
"rps_doc_frac_chars_dupe_9grams": 0,
"rps_doc_frac_chars_top_2gram": 0.03458213061094284,
"rps_doc_frac_chars_top_3gram": 0.0864553302526474,
"rps_doc_frac_chars_top_4gram": 0.10951008647680283,
"rps_doc_books_importance": -105.15840148925781,
"rps_doc_books_importance_length_correction": -105.15840148925781,
"rps_doc_openwebtext_importance": -41.35260772705078,
"rps_doc_openwebtext_importance_length_correction": -34.236244201660156,
"rps_doc_wikipedia_importance": -4.74075174331665,
"rps_doc_wikipedia_importance_length_correction": -4.74075174331665
},
"fasttext": {
"dclm": 0.019417110830545425,
"english": 0.7286505103111267,
"fineweb_edu_approx": 2.6036410331726074,
"eai_general_math": 0.14158231019973755,
"eai_open_web_math": 0.3252210021018982,
"eai_web_code": 0.022351980209350586
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.133",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.136",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "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": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-8,946,087,362,717,100,000 |
3
I have Latex code embedded in my org file.
*** Equations
\begin{equation}
h(x) = \theta_0 + \theta_1 x
\end{equation}
When I run C-c C-x C-l while my cursor is on the code, I get an empty box rendered on my file. Why is the code not rendering correctly?
EDIT 1: I have dvipng installed, and I have set org-latex-create-formula-image-program to dvipng.
(setq org-latex-create-formula-image-program 'dvipng)
I am using org mode version 8.2.10.
EDIT 2: I installed imagemagick and set org-latex-create-formula-image-program to it. No luck. When I run C-c C-x C-l, the command bar displays two messages in quick succession.
Creating image...1
PDF file /tmp/orgtex8421NqG.pdf wasn't produced
2 Answers 2
2
Do you have dvipng or imagemagick installed? Depending on the setting of org-preview-latex-default-process (in versions of org-mode >= 9.0) or org-latex-create-formula-image-program (in earlier versions), you need one or the other (or you could install both).
1
• Question edited to address this answer.
– NJay
Commented Jun 17, 2017 at 9:16
2
The problem was fixed when I installed package texlive-full. I was missing some latex packages, which led to a white box being rendered instead of the equation.
The update on this question led me to question whether I had all required latex packages: Preview Latex Fragment in org mode : blank square shown
Sure enough, when I checked my logs in /tmp directory of my system, I was missing package ulem. On Linux Mint, latex package ulem can be installed by installing texlive-full.
sudo apt install texlive-full
Your Answer
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Not the answer you're looking for? Browse other questions tagged or ask your own question.
|
{
"url": "https://emacs.stackexchange.com/questions/33603/why-wont-my-latex-render-in-org-mode",
"source_domain": "emacs.stackexchange.com",
"snapshot_id": "CC-MAIN-2024-26",
"warc_metadata": {
"Content-Length": "163829",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:4BDGRJTA2JJGID4CLHBE3QFWX4VLH5ML",
"WARC-Concurrent-To": "<urn:uuid:fd25dfa5-875f-4f63-ac5f-e6ace138c094>",
"WARC-Date": "2024-06-14T03:02:39Z",
"WARC-IP-Address": "104.18.43.226",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:PFNHTOMQPIQBR7IE7TANQZ2PUV4EQ3F7",
"WARC-Record-ID": "<urn:uuid:852d2c8a-56aa-43b2-9099-18fca2733c9a>",
"WARC-Target-URI": "https://emacs.stackexchange.com/questions/33603/why-wont-my-latex-render-in-org-mode",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:7fe22254-a163-41ed-971c-3b0b14179670>"
},
"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-109\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
2,
3,
46,
47,
61,
78,
107,
122,
123,
259,
260,
358,
359,
413,
414,
450,
451,
629,
630,
649,
697,
698,
710,
711,
713,
714,
974,
975,
977,
1021,
1032,
1067,
1069,
1070,
1231,
1232,
1378,
1379,
1554,
1555,
1585,
1586,
1598,
1599,
1715,
1716
],
"line_end_idx": [
2,
3,
46,
47,
61,
78,
107,
122,
123,
259,
260,
358,
359,
413,
414,
450,
451,
629,
630,
649,
697,
698,
710,
711,
713,
714,
974,
975,
977,
1021,
1032,
1067,
1069,
1070,
1231,
1232,
1378,
1379,
1554,
1555,
1585,
1586,
1598,
1599,
1715,
1716,
1806
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 1806,
"ccnet_original_nlines": 46,
"rps_doc_curly_bracket": 0.0022148399148136377,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.2511737048625946,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.051643189042806625,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.2793427109718323,
"rps_doc_frac_unique_words": 0.5765124559402466,
"rps_doc_mean_word_length": 4.928825855255127,
"rps_doc_num_sentences": 23,
"rps_doc_symbol_to_word_ratio": 0.0023474199697375298,
"rps_doc_unigram_entropy": 4.8170976638793945,
"rps_doc_word_count": 281,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.02021661028265953,
"rps_doc_frac_chars_dupe_6grams": 0.02021661028265953,
"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.014440430328249931,
"rps_doc_frac_chars_top_3gram": 0.011552349664270878,
"rps_doc_frac_chars_top_4gram": 0.014440430328249931,
"rps_doc_books_importance": -206.06045532226562,
"rps_doc_books_importance_length_correction": -202.0597686767578,
"rps_doc_openwebtext_importance": -92.04083251953125,
"rps_doc_openwebtext_importance_length_correction": -92.04083251953125,
"rps_doc_wikipedia_importance": -17.158767700195312,
"rps_doc_wikipedia_importance_length_correction": -17.02094841003418
},
"fasttext": {
"dclm": 0.05442541837692261,
"english": 0.8426069617271423,
"fineweb_edu_approx": 1.318127989768982,
"eai_general_math": 0.0244256891310215,
"eai_open_web_math": 0.15593230724334717,
"eai_web_code": 0.000639019999653101
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.435",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "2",
"label": "Understand"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "5",
"label": "Social/Forum"
},
"secondary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "18",
"label": "Q&A Forum"
},
"secondary": {
"code": "8",
"label": "Documentation"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "3",
"label": "Undergraduate Level"
},
"secondary": {
"code": "2",
"label": "High School Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-3,298,798,760,524,367,400 |
Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Combined question type.
Combined question type
From MoodleDocs
The Combined question incorporates features of four existing question types into one composite question.
Note: qtype_combined has recently been made available for Moodle 3.0 (17th march 2016) in the Moodle plugins directory because it needed to be updated to account for the fact that qtype_gapselect is now a standard plugin.. See this forum post
combinedcomplete.png
combinedqtype.png
The four question types that are included are
Response fields
The response fields have the form
[[<identifier>:<type>{:<options>}]]
<identifier> may be alphanumeric up to 8 characters. In our example we’ve just used numbers. <type> is one of numeric, pmatch, multiresponse or selectmenu.
Numeric and pmatch have the option to limit the size of the input box.
• __10__ is the width of the displayed input box in characters alone.
• _____ (i.e.) without a number provides a box equivalent in length to the number of underscores.
If no ____ is present the input box follows the question stem and is a ‘full single line’.
Multiresponse can be displayed vertically or horizontally
• v for vertical display. This is the default.
• h for horizontal display. If the rendering is too long it wraps at a choice.
Selectmenu must be followed by the correct choice.
Note that it is possible to have multiple choices that use the same menu choices e.g. The quick brown [[4:selectmenu:2]] jumps over the lazy [[4:selectmenu:4]].
Where the choices are, cow, fox, cat, dog.
After adding new input fields and to remove unwanted input fields click the ‘Verify the question text and update the form’ button. At this point your question text will be validated.
Answer section
The sub-sections of the form are presented in the order that they are first mentioned in the question.
For our example there are four sub-sections. For open ended responses we are only expecting to match correct responses and as such the ability to match and comment on specific incorrect responses is not supported.
combineda1.png
Scientific notation enables the input of 10n.
combineda2.png
The Pattern match syntax can be found here Pattern match documentation
combineda3.png
combineda4.png
These response matching sections follow the rules of the single questions that they are taken from.
Feedback is given in the order
• Combined feedback
• Feedback to any incorrect response in the order given.
• any Hint.
Weightings should add to 100%.
Combined feedback
combinedcf.png
The number of correct responses is counted as the number of correct input boxes plus choices from multiresponse and selectmenu.
Settings for multiple tries
This section is used when a try is not totally correct and the test author has chosen to run the test as ‘Interactive with multiple tries’.
The number of correct responses is counted as the number of correct input boxes plus choices from multiresponse and selectmenu.
Scoring
There is no negative marking of gaps that are filled incorrectly. If the question is used in 'interactive with multiple tries' style the marking is modified as follows:
1. The mark is reduced for each try by the penalty factor.
2. Allowance is made for when a correct choice is first chosen providing it remains chosen in subsequent tries.
See also
|
{
"url": "https://docs.moodle.org/34/en/Combined_question_type",
"source_domain": "docs.moodle.org",
"snapshot_id": "crawl=CC-MAIN-2021-49",
"warc_metadata": {
"Content-Length": "39492",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:UOXJHJJ5TRM63LCDCOY7UJHX6AVO3ODO",
"WARC-Concurrent-To": "<urn:uuid:155250fb-b2bf-48bc-963b-97f760d7eccc>",
"WARC-Date": "2021-12-09T13:15:02Z",
"WARC-IP-Address": "104.22.64.81",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:5N37M5YKKHYA45B2BW25WR7CKKVA6OWP",
"WARC-Record-ID": "<urn:uuid:a3c512ea-42a3-4835-bd41-6688bc97d057>",
"WARC-Target-URI": "https://docs.moodle.org/34/en/Combined_question_type",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:080a2335-ffad-4914-ad44-ffd89e8a6de8>"
},
"warc_info": "isPartOf: CC-MAIN-2021-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-12\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,
177,
178,
201,
202,
218,
219,
220,
325,
326,
569,
570,
571,
592,
593,
611,
612,
658,
659,
660,
676,
677,
711,
712,
751,
752,
908,
909,
980,
981,
1053,
1153,
1154,
1245,
1246,
1304,
1305,
1354,
1435,
1436,
1487,
1488,
1649,
1650,
1693,
1694,
1877,
1878,
1879,
1894,
1895,
1998,
1999,
2213,
2214,
2229,
2230,
2276,
2277,
2292,
2293,
2364,
2365,
2380,
2381,
2396,
2397,
2497,
2498,
2529,
2530,
2552,
2611,
2625,
2626,
2657,
2658,
2659,
2677,
2678,
2693,
2694,
2822,
2823,
2824,
2852,
2853,
2993,
2994,
3122,
3123,
3124,
3132,
3133,
3302,
3303,
3364,
3478,
3479
],
"line_end_idx": [
177,
178,
201,
202,
218,
219,
220,
325,
326,
569,
570,
571,
592,
593,
611,
612,
658,
659,
660,
676,
677,
711,
712,
751,
752,
908,
909,
980,
981,
1053,
1153,
1154,
1245,
1246,
1304,
1305,
1354,
1435,
1436,
1487,
1488,
1649,
1650,
1693,
1694,
1877,
1878,
1879,
1894,
1895,
1998,
1999,
2213,
2214,
2229,
2230,
2276,
2277,
2292,
2293,
2364,
2365,
2380,
2381,
2396,
2397,
2497,
2498,
2529,
2530,
2552,
2611,
2625,
2626,
2657,
2658,
2659,
2677,
2678,
2693,
2694,
2822,
2823,
2824,
2852,
2853,
2993,
2994,
3122,
3123,
3124,
3132,
3133,
3302,
3303,
3364,
3478,
3479,
3487
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 3487,
"ccnet_original_nlines": 98,
"rps_doc_curly_bracket": 0.000573560013435781,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.3799391984939575,
"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.16869300603866577,
"rps_doc_frac_unique_words": 0.4652014672756195,
"rps_doc_mean_word_length": 5.0421247482299805,
"rps_doc_num_sentences": 50,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 4.997018337249756,
"rps_doc_word_count": 546,
"rps_doc_frac_chars_dupe_10grams": 0.07773338258266449,
"rps_doc_frac_chars_dupe_5grams": 0.07773338258266449,
"rps_doc_frac_chars_dupe_6grams": 0.07773338258266449,
"rps_doc_frac_chars_dupe_7grams": 0.07773338258266449,
"rps_doc_frac_chars_dupe_8grams": 0.07773338258266449,
"rps_doc_frac_chars_dupe_9grams": 0.07773338258266449,
"rps_doc_frac_chars_top_2gram": 0.009081000462174416,
"rps_doc_frac_chars_top_3gram": 0.01997821033000946,
"rps_doc_frac_chars_top_4gram": 0.026153290644288063,
"rps_doc_books_importance": -253.85986328125,
"rps_doc_books_importance_length_correction": -253.85986328125,
"rps_doc_openwebtext_importance": -89.02972412109375,
"rps_doc_openwebtext_importance_length_correction": -89.02972412109375,
"rps_doc_wikipedia_importance": -82.76947784423828,
"rps_doc_wikipedia_importance_length_correction": -82.76947784423828
},
"fasttext": {
"dclm": 0.09832572937011719,
"english": 0.872219979763031,
"fineweb_edu_approx": 2.2308530807495117,
"eai_general_math": 0.9870641827583313,
"eai_open_web_math": 0.5247244834899902,
"eai_web_code": 0.8689708113670349
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "004.072",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
},
"secondary": {
"code": "371.3922",
"labels": {
"level_1": "Social sciences",
"level_2": "Education",
"level_3": "Teachers, Teaching, and School management and organization"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "4",
"label": "Missing Images or Figures"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "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"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-232,608,252,340,646,560 |
Skip to main content
Simple Conditions
The conditions within an If construct are expressions which evaluate to true or false.
In the simple case, the expression is a constant, variable, or function call. Expressions whose numeric interpretation evaluates to a non-zero value are true. Those which evaluate to zero are false.
Terminal
USER>if 0 {write "true"}
USER>if 5 {write "true"}
true
USER>set condition = "a"
USER>if condition {write "true"}
USER>set condition = "1000"
USER>if condition {write "true"}
true
USER>set condition = -2
USER>if condition {write "true"}
true
USER>if $zsqr(64) {write "true"}
true
USER>
|
{
"url": "https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=TOS_SimpleConditions",
"source_domain": "docs.intersystems.com",
"snapshot_id": "CC-MAIN-2024-38",
"warc_metadata": {
"Content-Length": "320167",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:BCVMFZ3PDIODBZ6LGSKRQUICOGIBQ3CJ",
"WARC-Concurrent-To": "<urn:uuid:14fac146-a678-4b7a-9356-6b60b1bb1b0f>",
"WARC-Date": "2024-09-18T08:51:29Z",
"WARC-IP-Address": "198.133.74.116",
"WARC-Identified-Payload-Type": "text/html",
"WARC-Payload-Digest": "sha1:M74P6GLJQTQS3QPDVSHI7ZYBGVJRMGBL",
"WARC-Record-ID": "<urn:uuid:867b5436-3d4a-4862-b364-e8f2b220f798>",
"WARC-Target-URI": "https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=TOS_SimpleConditions",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:e2d64cda-d04f-44f2-9167-536dd10e1f38>"
},
"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-5\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/"
}
|
{
"line_start_idx": [
0,
21,
22,
40,
41,
128,
129,
328,
329,
338,
339,
340,
366,
367,
393,
398,
423,
425,
458,
460,
488,
490,
523,
528,
552,
554,
587,
592,
625,
630
],
"line_end_idx": [
21,
22,
40,
41,
128,
129,
328,
329,
338,
339,
340,
366,
367,
393,
398,
423,
425,
458,
460,
488,
490,
523,
528,
552,
554,
587,
592,
625,
630,
635
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 635,
"ccnet_original_nlines": 29,
"rps_doc_curly_bracket": 0.018897639587521553,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.20270270109176636,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.06756757199764252,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.3513513505458832,
"rps_doc_frac_unique_words": 0.5111110806465149,
"rps_doc_mean_word_length": 5.255555629730225,
"rps_doc_num_sentences": 5,
"rps_doc_symbol_to_word_ratio": 0,
"rps_doc_unigram_entropy": 3.4942193031311035,
"rps_doc_word_count": 90,
"rps_doc_frac_chars_dupe_10grams": 0,
"rps_doc_frac_chars_dupe_5grams": 0.21353065967559814,
"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.11416489630937576,
"rps_doc_frac_chars_top_3gram": 0.10993658006191254,
"rps_doc_frac_chars_top_4gram": 0.15221987664699554,
"rps_doc_books_importance": -70.34220886230469,
"rps_doc_books_importance_length_correction": -81.57838439941406,
"rps_doc_openwebtext_importance": -36.97169876098633,
"rps_doc_openwebtext_importance_length_correction": -48.2078742980957,
"rps_doc_wikipedia_importance": -25.89185333251953,
"rps_doc_wikipedia_importance_length_correction": -37.128028869628906
},
"fasttext": {
"dclm": 0.7175922989845276,
"english": 0.6964972019195557,
"fineweb_edu_approx": 3.2809085845947266,
"eai_general_math": 0.9330576658248901,
"eai_open_web_math": 0.7524247169494629,
"eai_web_code": 0.004227160010486841
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "004.0151",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computers and Computer science"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "2",
"label": "Understand"
},
"secondary": {
"code": "3",
"label": "Apply"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "2",
"label": "Conceptual"
},
"secondary": {
"code": "3",
"label": "Procedural"
}
},
"document_type_v1": {
"primary": {
"code": "3",
"label": "Reference/Encyclopedic/Educational"
},
"secondary": {
"code": "4",
"label": "Code/Software"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "3",
"label": "Irrelevant Content"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "23",
"label": "Tutorial"
}
},
"reasoning_depth": {
"primary": {
"code": "2",
"label": "Basic Reasoning"
},
"secondary": {
"code": "1",
"label": "No Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "2",
"label": "High School Level"
},
"secondary": {
"code": "1",
"label": "General Audience"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
-7,126,859,659,190,954,000 |
/* ----------------------------------------------------------------------------- * * (c) The GHC Team, 1998-2004 * * Storage manager front end * * ---------------------------------------------------------------------------*/ #include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" #include "Stats.h" #include "Hooks.h" #include "BlockAlloc.h" #include "MBlock.h" #include "Weak.h" #include "Sanity.h" #include "Arena.h" #include "OSThreads.h" #include "Capability.h" #include "Storage.h" #include "Schedule.h" #include "RetainerProfile.h" // for counting memory blocks (memInventory) #include "OSMem.h" #include #include /* * All these globals require sm_mutex to access in THREADED_RTS mode. */ StgClosure *caf_list = NULL; StgClosure *revertible_caf_list = NULL; rtsBool keepCAFs; bdescr *small_alloc_list; /* allocate()d small objects */ bdescr *pinned_object_block; /* allocate pinned objects into this block */ nat alloc_blocks; /* number of allocate()d blocks since GC */ nat alloc_blocks_lim; /* approximate limit on alloc_blocks */ StgPtr alloc_Hp = NULL; /* next free byte in small_alloc_list */ StgPtr alloc_HpLim = NULL; /* end of block at small_alloc_list */ generation *generations = NULL; /* all the generations */ generation *g0 = NULL; /* generation 0, for convenience */ generation *oldest_gen = NULL; /* oldest generation, for convenience */ step *g0s0 = NULL; /* generation 0, step 0, for convenience */ ullong total_allocated = 0; /* total memory allocated during run */ nat n_nurseries = 0; /* == RtsFlags.ParFlags.nNodes, convenience */ step *nurseries = NULL; /* array of nurseries, >1 only if THREADED_RTS */ #ifdef THREADED_RTS /* * Storage manager mutex: protects all the above state from * simultaneous access by two STG threads. */ Mutex sm_mutex; /* * This mutex is used by atomicModifyMutVar# only */ Mutex atomic_modify_mutvar_mutex; #endif /* * Forward references */ static void *stgAllocForGMP (size_t size_in_bytes); static void *stgReallocForGMP (void *ptr, size_t old_size, size_t new_size); static void stgDeallocForGMP (void *ptr, size_t size); static void initStep (step *stp, int g, int s) { stp->no = s; stp->blocks = NULL; stp->n_blocks = 0; stp->old_blocks = NULL; stp->n_old_blocks = 0; stp->gen = &generations[g]; stp->gen_no = g; stp->hp = NULL; stp->hpLim = NULL; stp->hp_bd = NULL; stp->scavd_hp = NULL; stp->scavd_hpLim = NULL; stp->scan = NULL; stp->scan_bd = NULL; stp->large_objects = NULL; stp->n_large_blocks = 0; stp->new_large_objects = NULL; stp->scavenged_large_objects = NULL; stp->n_scavenged_large_blocks = 0; stp->is_compacted = 0; stp->bitmap = NULL; } void initStorage( void ) { nat g, s; generation *gen; if (generations != NULL) { // multi-init protection return; } /* Sanity check to make sure the LOOKS_LIKE_ macros appear to be * doing something reasonable. */ ASSERT(LOOKS_LIKE_INFO_PTR(&stg_BLACKHOLE_info)); ASSERT(LOOKS_LIKE_CLOSURE_PTR(&stg_dummy_ret_closure)); ASSERT(!HEAP_ALLOCED(&stg_dummy_ret_closure)); if (RtsFlags.GcFlags.maxHeapSize != 0 && RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) { RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion; } if (RtsFlags.GcFlags.maxHeapSize != 0 && RtsFlags.GcFlags.minAllocAreaSize > RtsFlags.GcFlags.maxHeapSize) { errorBelch("maximum heap size (-M) is smaller than minimum alloc area size (-A)"); exit(1); } initBlockAllocator(); #if defined(THREADED_RTS) initMutex(&sm_mutex); initMutex(&atomic_modify_mutvar_mutex); #endif ACQUIRE_SM_LOCK; /* allocate generation info array */ generations = (generation *)stgMallocBytes(RtsFlags.GcFlags.generations * sizeof(struct generation_), "initStorage: gens"); /* Initialise all generations */ for(g = 0; g < RtsFlags.GcFlags.generations; g++) { gen = &generations[g]; gen->no = g; gen->mut_list = allocBlock(); gen->collections = 0; gen->failed_promotions = 0; gen->max_blocks = 0; } /* A couple of convenience pointers */ g0 = &generations[0]; oldest_gen = &generations[RtsFlags.GcFlags.generations-1]; /* Allocate step structures in each generation */ if (RtsFlags.GcFlags.generations > 1) { /* Only for multiple-generations */ /* Oldest generation: one step */ oldest_gen->n_steps = 1; oldest_gen->steps = stgMallocBytes(1 * sizeof(struct step_), "initStorage: last step"); /* set up all except the oldest generation with 2 steps */ for(g = 0; g < RtsFlags.GcFlags.generations-1; g++) { generations[g].n_steps = RtsFlags.GcFlags.steps; generations[g].steps = stgMallocBytes (RtsFlags.GcFlags.steps * sizeof(struct step_), "initStorage: steps"); } } else { /* single generation, i.e. a two-space collector */ g0->n_steps = 1; g0->steps = stgMallocBytes (sizeof(struct step_), "initStorage: steps"); } #ifdef THREADED_RTS n_nurseries = n_capabilities; nurseries = stgMallocBytes (n_nurseries * sizeof(struct step_), "initStorage: nurseries"); #else n_nurseries = 1; nurseries = g0->steps; // just share nurseries[0] with g0s0 #endif /* Initialise all steps */ for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (s = 0; s < generations[g].n_steps; s++) { initStep(&generations[g].steps[s], g, s); } } #ifdef THREADED_RTS for (s = 0; s < n_nurseries; s++) { initStep(&nurseries[s], 0, s); } #endif /* Set up the destination pointers in each younger gen. step */ for (g = 0; g < RtsFlags.GcFlags.generations-1; g++) { for (s = 0; s < generations[g].n_steps-1; s++) { generations[g].steps[s].to = &generations[g].steps[s+1]; } generations[g].steps[s].to = &generations[g+1].steps[0]; } oldest_gen->steps[0].to = &oldest_gen->steps[0]; #ifdef THREADED_RTS for (s = 0; s < n_nurseries; s++) { nurseries[s].to = generations[0].steps[0].to; } #endif /* The oldest generation has one step. */ if (RtsFlags.GcFlags.compact) { if (RtsFlags.GcFlags.generations == 1) { errorBelch("WARNING: compaction is incompatible with -G1; disabled"); } else { oldest_gen->steps[0].is_compacted = 1; } } #ifdef THREADED_RTS if (RtsFlags.GcFlags.generations == 1) { errorBelch("-G1 is incompatible with -threaded"); stg_exit(EXIT_FAILURE); } #endif /* generation 0 is special: that's the nursery */ generations[0].max_blocks = 0; /* G0S0: the allocation area. Policy: keep the allocation area * small to begin with, even if we have a large suggested heap * size. Reason: we're going to do a major collection first, and we * don't want it to be a big one. This vague idea is borne out by * rigorous experimental evidence. */ g0s0 = &generations[0].steps[0]; allocNurseries(); weak_ptr_list = NULL; caf_list = NULL; revertible_caf_list = NULL; /* initialise the allocate() interface */ small_alloc_list = NULL; alloc_blocks = 0; alloc_blocks_lim = RtsFlags.GcFlags.minAllocAreaSize; /* Tell GNU multi-precision pkg about our custom alloc functions */ mp_set_memory_functions(stgAllocForGMP, stgReallocForGMP, stgDeallocForGMP); IF_DEBUG(gc, statDescribeGens()); RELEASE_SM_LOCK; } void exitStorage (void) { stat_exit(calcAllocated()); } void freeStorage (void) { freeAllMBlocks(); } /* ----------------------------------------------------------------------------- CAF management. The entry code for every CAF does the following: - builds a CAF_BLACKHOLE in the heap - pushes an update frame pointing to the CAF_BLACKHOLE - invokes UPD_CAF(), which: - calls newCaf, below - updates the CAF with a static indirection to the CAF_BLACKHOLE Why do we build a BLACKHOLE in the heap rather than just updating the thunk directly? It's so that we only need one kind of update frame - otherwise we'd need a static version of the update frame too. newCaf() does the following: - it puts the CAF on the oldest generation's mut-once list. This is so that we can treat the CAF as a root when collecting younger generations. For GHCI, we have additional requirements when dealing with CAFs: - we must *retain* all dynamically-loaded CAFs ever entered, just in case we need them again. - we must be able to *revert* CAFs that have been evaluated, to their pre-evaluated form. To do this, we use an additional CAF list. When newCaf() is called on a dynamically-loaded CAF, we add it to the CAF list instead of the old-generation mutable list, and save away its old info pointer (in caf->saved_info) for later reversion. To revert all the CAFs, we traverse the CAF list and reset the info pointer to caf->saved_info, then throw away the CAF list. (see GC.c:revertCAFs()). -- SDM 29/1/01 -------------------------------------------------------------------------- */ void newCAF(StgClosure* caf) { ACQUIRE_SM_LOCK; if(keepCAFs) { // HACK: // If we are in GHCi _and_ we are using dynamic libraries, // then we can't redirect newCAF calls to newDynCAF (see below), // so we make newCAF behave almost like newDynCAF. // The dynamic libraries might be used by both the interpreted // program and GHCi itself, so they must not be reverted. // This also means that in GHCi with dynamic libraries, CAFs are not // garbage collected. If this turns out to be a problem, we could // do another hack here and do an address range test on caf to figure // out whether it is from a dynamic library. ((StgIndStatic *)caf)->saved_info = (StgInfoTable *)caf->header.info; ((StgIndStatic *)caf)->static_link = caf_list; caf_list = caf; } else { /* Put this CAF on the mutable list for the old generation. * This is a HACK - the IND_STATIC closure doesn't really have * a mut_link field, but we pretend it has - in fact we re-use * the STATIC_LINK field for the time being, because when we * come to do a major GC we won't need the mut_link field * any more and can use it as a STATIC_LINK. */ ((StgIndStatic *)caf)->saved_info = NULL; recordMutableGen(caf, oldest_gen); } RELEASE_SM_LOCK; #ifdef PAR /* If we are PAR or DIST then we never forget a CAF */ { globalAddr *newGA; //debugBelch("<##> Globalising CAF %08x %s",caf,info_type(caf)); newGA=makeGlobal(caf,rtsTrue); /*given full weight*/ ASSERT(newGA); } #endif /* PAR */ } // An alternate version of newCaf which is used for dynamically loaded // object code in GHCi. In this case we want to retain *all* CAFs in // the object code, because they might be demanded at any time from an // expression evaluated on the command line. // Also, GHCi might want to revert CAFs, so we add these to the // revertible_caf_list. // // The linker hackily arranges that references to newCaf from dynamic // code end up pointing to newDynCAF. void newDynCAF(StgClosure *caf) { ACQUIRE_SM_LOCK; ((StgIndStatic *)caf)->saved_info = (StgInfoTable *)caf->header.info; ((StgIndStatic *)caf)->static_link = revertible_caf_list; revertible_caf_list = caf; RELEASE_SM_LOCK; } /* ----------------------------------------------------------------------------- Nursery management. -------------------------------------------------------------------------- */ static bdescr * allocNursery (step *stp, bdescr *tail, nat blocks) { bdescr *bd; nat i; // Allocate a nursery: we allocate fresh blocks one at a time and // cons them on to the front of the list, not forgetting to update // the back pointer on the tail of the list to point to the new block. for (i=0; i < blocks; i++) { // @LDV profiling /* processNursery() in LdvProfile.c assumes that every block group in the nursery contains only a single block. So, if a block group is given multiple blocks, change processNursery() accordingly. */ bd = allocBlock(); bd->link = tail; // double-link the nursery: we might need to insert blocks if (tail != NULL) { tail->u.back = bd; } bd->step = stp; bd->gen_no = 0; bd->flags = 0; bd->free = bd->start; tail = bd; } tail->u.back = NULL; return tail; } static void assignNurseriesToCapabilities (void) { #ifdef THREADED_RTS nat i; for (i = 0; i < n_nurseries; i++) { capabilities[i].r.rNursery = &nurseries[i]; capabilities[i].r.rCurrentNursery = nurseries[i].blocks; capabilities[i].r.rCurrentAlloc = NULL; } #else /* THREADED_RTS */ MainCapability.r.rNursery = &nurseries[0]; MainCapability.r.rCurrentNursery = nurseries[0].blocks; MainCapability.r.rCurrentAlloc = NULL; #endif } void allocNurseries( void ) { nat i; for (i = 0; i < n_nurseries; i++) { nurseries[i].blocks = allocNursery(&nurseries[i], NULL, RtsFlags.GcFlags.minAllocAreaSize); nurseries[i].n_blocks = RtsFlags.GcFlags.minAllocAreaSize; nurseries[i].old_blocks = NULL; nurseries[i].n_old_blocks = 0; /* hp, hpLim, hp_bd, to_space etc. aren't used in the nursery */ } assignNurseriesToCapabilities(); } void resetNurseries( void ) { nat i; bdescr *bd; step *stp; for (i = 0; i < n_nurseries; i++) { stp = &nurseries[i]; for (bd = stp->blocks; bd; bd = bd->link) { bd->free = bd->start; ASSERT(bd->gen_no == 0); ASSERT(bd->step == stp); IF_DEBUG(sanity,memset(bd->start, 0xaa, BLOCK_SIZE)); } } assignNurseriesToCapabilities(); } lnat countNurseryBlocks (void) { nat i; lnat blocks = 0; for (i = 0; i < n_nurseries; i++) { blocks += nurseries[i].n_blocks; } return blocks; } static void resizeNursery ( step *stp, nat blocks ) { bdescr *bd; nat nursery_blocks; nursery_blocks = stp->n_blocks; if (nursery_blocks == blocks) return; if (nursery_blocks < blocks) { IF_DEBUG(gc, debugBelch("Increasing size of nursery to %d blocks\n", blocks)); stp->blocks = allocNursery(stp, stp->blocks, blocks-nursery_blocks); } else { bdescr *next_bd; IF_DEBUG(gc, debugBelch("Decreasing size of nursery to %d blocks\n", blocks)); bd = stp->blocks; while (nursery_blocks > blocks) { next_bd = bd->link; next_bd->u.back = NULL; nursery_blocks -= bd->blocks; // might be a large block freeGroup(bd); bd = next_bd; } stp->blocks = bd; // might have gone just under, by freeing a large block, so make // up the difference. if (nursery_blocks < blocks) { stp->blocks = allocNursery(stp, stp->blocks, blocks-nursery_blocks); } } stp->n_blocks = blocks; ASSERT(countBlocks(stp->blocks) == stp->n_blocks); } // // Resize each of the nurseries to the specified size. // void resizeNurseriesFixed (nat blocks) { nat i; for (i = 0; i < n_nurseries; i++) { resizeNursery(&nurseries[i], blocks); } } // // Resize the nurseries to the total specified size. // void resizeNurseries (nat blocks) { // If there are multiple nurseries, then we just divide the number // of available blocks between them. resizeNurseriesFixed(blocks / n_nurseries); } /* ----------------------------------------------------------------------------- The allocate() interface allocate(n) always succeeds, and returns a chunk of memory n words long. n can be larger than the size of a block if necessary, in which case a contiguous block group will be allocated. -------------------------------------------------------------------------- */ StgPtr allocate( nat n ) { bdescr *bd; StgPtr p; ACQUIRE_SM_LOCK; TICK_ALLOC_HEAP_NOCTR(n); CCS_ALLOC(CCCS,n); /* big allocation (>LARGE_OBJECT_THRESHOLD) */ /* ToDo: allocate directly into generation 1 */ if (n >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { nat req_blocks = (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE; bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0s0->large_objects); g0s0->n_large_blocks += req_blocks; bd->gen_no = 0; bd->step = g0s0; bd->flags = BF_LARGE; bd->free = bd->start + n; alloc_blocks += req_blocks; RELEASE_SM_LOCK; return bd->start; /* small allocation ( alloc_HpLim) { if (small_alloc_list) { small_alloc_list->free = alloc_Hp; } bd = allocBlock(); bd->link = small_alloc_list; small_alloc_list = bd; bd->gen_no = 0; bd->step = g0s0; bd->flags = 0; alloc_Hp = bd->start; alloc_HpLim = bd->start + BLOCK_SIZE_W; alloc_blocks++; } p = alloc_Hp; alloc_Hp += n; RELEASE_SM_LOCK; return p; } lnat allocated_bytes( void ) { lnat allocated; allocated = alloc_blocks * BLOCK_SIZE_W - (alloc_HpLim - alloc_Hp); if (pinned_object_block != NULL) { allocated -= (pinned_object_block->start + BLOCK_SIZE_W) - pinned_object_block->free; } return allocated; } void tidyAllocateLists (void) { if (small_alloc_list != NULL) { ASSERT(alloc_Hp >= small_alloc_list->start && alloc_Hp <= small_alloc_list->start + BLOCK_SIZE); small_alloc_list->free = alloc_Hp; } } /* ----------------------------------------------------------------------------- allocateLocal() This allocates memory in the current thread - it is intended for use primarily from STG-land where we have a Capability. It is better than allocate() because it doesn't require taking the sm_mutex lock in the common case. Memory is allocated directly from the nursery if possible (but not from the current nursery block, so as not to interfere with Hp/HpLim). -------------------------------------------------------------------------- */ StgPtr allocateLocal (Capability *cap, nat n) { bdescr *bd; StgPtr p; TICK_ALLOC_HEAP_NOCTR(n); CCS_ALLOC(CCCS,n); /* big allocation (>LARGE_OBJECT_THRESHOLD) */ /* ToDo: allocate directly into generation 1 */ if (n >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { nat req_blocks = (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE; ACQUIRE_SM_LOCK; bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0s0->large_objects); g0s0->n_large_blocks += req_blocks; bd->gen_no = 0; bd->step = g0s0; bd->flags = BF_LARGE; bd->free = bd->start + n; alloc_blocks += req_blocks; RELEASE_SM_LOCK; return bd->start; /* small allocation (r.rCurrentAlloc; if (bd == NULL || bd->free + n > bd->start + BLOCK_SIZE_W) { // The CurrentAlloc block is full, we need to find another // one. First, we try taking the next block from the // nursery: bd = cap->r.rCurrentNursery->link; if (bd == NULL || bd->free + n > bd->start + BLOCK_SIZE_W) { // The nursery is empty, or the next block is already // full: allocate a fresh block (we can't fail here). ACQUIRE_SM_LOCK; bd = allocBlock(); cap->r.rNursery->n_blocks++; RELEASE_SM_LOCK; bd->gen_no = 0; bd->step = cap->r.rNursery; bd->flags = 0; } else { // we have a block in the nursery: take it and put // it at the *front* of the nursery list, and use it // to allocate() from. cap->r.rCurrentNursery->link = bd->link; if (bd->link != NULL) { bd->link->u.back = cap->r.rCurrentNursery; } } dbl_link_onto(bd, &cap->r.rNursery->blocks); cap->r.rCurrentAlloc = bd; IF_DEBUG(sanity, checkNurserySanity(cap->r.rNursery)); } } p = bd->free; bd->free += n; return p; } /* --------------------------------------------------------------------------- Allocate a fixed/pinned object. We allocate small pinned objects into a single block, allocating a new block when the current one overflows. The block is chained onto the large_object_list of generation 0 step 0. NOTE: The GC can't in general handle pinned objects. This interface is only safe to use for ByteArrays, which have no pointers and don't require scavenging. It works because the block's descriptor has the BF_LARGE flag set, so the block is treated as a large object and chained onto various lists, rather than the individual objects being copied. However, when it comes to scavenge the block, the GC will only scavenge the first object. The reason is that the GC can't linearly scan a block of pinned objects at the moment (doing so would require using the mostly-copying techniques). But since we're restricting ourselves to pinned ByteArrays, not scavenging is ok. This function is called by newPinnedByteArray# which immediately fills the allocated memory with a MutableByteArray#. ------------------------------------------------------------------------- */ StgPtr allocatePinned( nat n ) { StgPtr p; bdescr *bd = pinned_object_block; // If the request is for a large object, then allocate() // will give us a pinned object anyway. if (n >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { return allocate(n); } ACQUIRE_SM_LOCK; TICK_ALLOC_HEAP_NOCTR(n); CCS_ALLOC(CCCS,n); // we always return 8-byte aligned memory. bd->free must be // 8-byte aligned to begin with, so we just round up n to // the nearest multiple of 8 bytes. if (sizeof(StgWord) == 4) { n = (n+1) & ~1; } // If we don't have a block of pinned objects yet, or the current // one isn't large enough to hold the new object, allocate a new one. if (bd == NULL || (bd->free + n) > (bd->start + BLOCK_SIZE_W)) { pinned_object_block = bd = allocBlock(); dbl_link_onto(bd, &g0s0->large_objects); bd->gen_no = 0; bd->step = g0s0; bd->flags = BF_PINNED | BF_LARGE; bd->free = bd->start; alloc_blocks++; } p = bd->free; bd->free += n; RELEASE_SM_LOCK; return p; } /* ----------------------------------------------------------------------------- This is the write barrier for MUT_VARs, a.k.a. IORefs. A MUT_VAR_CLEAN object is not on the mutable list; a MUT_VAR_DIRTY is. When written to, a MUT_VAR_CLEAN turns into a MUT_VAR_DIRTY and is put on the mutable list. -------------------------------------------------------------------------- */ void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p) { Capability *cap = regTableToCapability(reg); bdescr *bd; if (p->header.info == &stg_MUT_VAR_CLEAN_info) { p->header.info = &stg_MUT_VAR_DIRTY_info; bd = Bdescr((StgPtr)p); if (bd->gen_no > 0) recordMutableCap(p,cap,bd->gen_no); } } /* ----------------------------------------------------------------------------- Allocation functions for GMP. These all use the allocate() interface - we can't have any garbage collection going on during a gmp operation, so we use allocate() which always succeeds. The gmp operations which might need to allocate will ask the storage manager (via doYouWantToGC()) whether a garbage collection is required, in case we get into a loop doing only allocate() style allocation. -------------------------------------------------------------------------- */ static void * stgAllocForGMP (size_t size_in_bytes) { StgArrWords* arr; nat data_size_in_words, total_size_in_words; /* round up to a whole number of words */ data_size_in_words = (size_in_bytes + sizeof(W_) + 1) / sizeof(W_); total_size_in_words = sizeofW(StgArrWords) + data_size_in_words; /* allocate and fill it in. */ #if defined(THREADED_RTS) arr = (StgArrWords *)allocateLocal(myTask()->cap, total_size_in_words); #else arr = (StgArrWords *)allocateLocal(&MainCapability, total_size_in_words); #endif SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words); /* and return a ptr to the goods inside the array */ return arr->payload; } static void * stgReallocForGMP (void *ptr, size_t old_size, size_t new_size) { void *new_stuff_ptr = stgAllocForGMP(new_size); nat i = 0; char *p = (char *) ptr; char *q = (char *) new_stuff_ptr; for (; i < old_size; i++, p++, q++) { *q = *p; } return(new_stuff_ptr); } static void stgDeallocForGMP (void *ptr STG_UNUSED, size_t size STG_UNUSED) { /* easy for us: the garbage collector does the dealloc'n */ } /* ----------------------------------------------------------------------------- * Stats and stuff * -------------------------------------------------------------------------- */ /* ----------------------------------------------------------------------------- * calcAllocated() * * Approximate how much we've allocated: number of blocks in the * nursery + blocks allocated via allocate() - unused nusery blocks. * This leaves a little slop at the end of each block, and doesn't * take into account large objects (ToDo). * -------------------------------------------------------------------------- */ lnat calcAllocated( void ) { nat allocated; bdescr *bd; allocated = allocated_bytes(); allocated += countNurseryBlocks() * BLOCK_SIZE_W; { #ifdef THREADED_RTS nat i; for (i = 0; i < n_nurseries; i++) { Capability *cap; for ( bd = capabilities[i].r.rCurrentNursery->link; bd != NULL; bd = bd->link ) { allocated -= BLOCK_SIZE_W; } cap = &capabilities[i]; if (cap->r.rCurrentNursery->free < cap->r.rCurrentNursery->start + BLOCK_SIZE_W) { allocated -= (cap->r.rCurrentNursery->start + BLOCK_SIZE_W) - cap->r.rCurrentNursery->free; } } #else bdescr *current_nursery = MainCapability.r.rCurrentNursery; for ( bd = current_nursery->link; bd != NULL; bd = bd->link ) { allocated -= BLOCK_SIZE_W; } if (current_nursery->free < current_nursery->start + BLOCK_SIZE_W) { allocated -= (current_nursery->start + BLOCK_SIZE_W) - current_nursery->free; } #endif } total_allocated += allocated; return allocated; } /* Approximate the amount of live data in the heap. To be called just * after garbage collection (see GarbageCollect()). */ extern lnat calcLive(void) { nat g, s; lnat live = 0; step *stp; if (RtsFlags.GcFlags.generations == 1) { live = (g0s0->n_blocks - 1) * BLOCK_SIZE_W + ((lnat)g0s0->hp_bd->free - (lnat)g0s0->hp_bd->start) / sizeof(W_); return live; } for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (s = 0; s < generations[g].n_steps; s++) { /* approximate amount of live data (doesn't take into account slop * at end of each block). */ if (g == 0 && s == 0) { continue; } stp = &generations[g].steps[s]; live += (stp->n_large_blocks + stp->n_blocks - 1) * BLOCK_SIZE_W; if (stp->hp_bd != NULL) { live += ((lnat)stp->hp_bd->free - (lnat)stp->hp_bd->start) / sizeof(W_); } if (stp->scavd_hp != NULL) { live -= (P_)(BLOCK_ROUND_UP(stp->scavd_hp)) - stp->scavd_hp; } } } return live; } /* Approximate the number of blocks that will be needed at the next * garbage collection. * * Assume: all data currently live will remain live. Steps that will * be collected next time will therefore need twice as many blocks * since all the data will be copied. */ extern lnat calcNeeded(void) { lnat needed = 0; nat g, s; step *stp; for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (s = 0; s < generations[g].n_steps; s++) { if (g == 0 && s == 0) { continue; } stp = &generations[g].steps[s]; if (generations[g].steps[0].n_blocks + generations[g].steps[0].n_large_blocks > generations[g].max_blocks && stp->is_compacted == 0) { needed += 2 * stp->n_blocks; } else { needed += stp->n_blocks; } } } return needed; } /* ---------------------------------------------------------------------------- Executable memory Executable memory must be managed separately from non-executable memory. Most OSs these days require you to jump through hoops to dynamically allocate executable memory, due to various security measures. Here we provide a small memory allocator for executable memory. Memory is managed with a page granularity; we allocate linearly in the page, and when the page is emptied (all objects on the page are free) we free the page again, not forgetting to make it non-executable. ------------------------------------------------------------------------- */ static bdescr *exec_block; void *allocateExec (nat bytes) { void *ret; nat n; ACQUIRE_SM_LOCK; // round up to words. n = (bytes + sizeof(W_) + 1) / sizeof(W_); if (n+1 > BLOCK_SIZE_W) { barf("allocateExec: can't handle large objects"); } if (exec_block == NULL || exec_block->free + n + 1 > exec_block->start + BLOCK_SIZE_W) { bdescr *bd; lnat pagesize = getPageSize(); bd = allocGroup(stg_max(1, pagesize / BLOCK_SIZE)); IF_DEBUG(gc, debugBelch("allocate exec block %p\n", bd->start)); bd->gen_no = 0; bd->flags = BF_EXEC; bd->link = exec_block; if (exec_block != NULL) { exec_block->u.back = bd; } bd->u.back = NULL; setExecutable(bd->start, bd->blocks * BLOCK_SIZE, rtsTrue); exec_block = bd; } *(exec_block->free) = n; // store the size of this chunk exec_block->gen_no += n; // gen_no stores the number of words allocated ret = exec_block->free + 1; exec_block->free += n + 1; RELEASE_SM_LOCK return ret; } void freeExec (void *addr) { StgPtr p = (StgPtr)addr - 1; bdescr *bd = Bdescr((StgPtr)p); if ((bd->flags & BF_EXEC) == 0) { barf("freeExec: not executable"); } if (*(StgPtr)p == 0) { barf("freeExec: already free?"); } ACQUIRE_SM_LOCK; bd->gen_no -= *(StgPtr)p; *(StgPtr)p = 0; // Free the block if it is empty, but not if it is the block at // the head of the queue. if (bd->gen_no == 0 && bd != exec_block) { IF_DEBUG(gc, debugBelch("free exec block %p\n", bd->start)); if (bd->u.back) { bd->u.back->link = bd->link; } else { exec_block = bd->link; } if (bd->link) { bd->link->u.back = bd->u.back; } setExecutable(bd->start, bd->blocks * BLOCK_SIZE, rtsFalse); freeGroup(bd); } RELEASE_SM_LOCK } /* ----------------------------------------------------------------------------- Debugging memInventory() checks for memory leaks by counting up all the blocks we know about and comparing that to the number of blocks allegedly floating around in the system. -------------------------------------------------------------------------- */ #ifdef DEBUG static lnat stepBlocks (step *stp) { lnat total_blocks; bdescr *bd; total_blocks = stp->n_blocks; total_blocks += stp->n_old_blocks; for (bd = stp->large_objects; bd; bd = bd->link) { total_blocks += bd->blocks; /* hack for megablock groups: they have an extra block or two in the second and subsequent megablocks where the block descriptors would normally go. */ if (bd->blocks > BLOCKS_PER_MBLOCK) { total_blocks -= (MBLOCK_SIZE / BLOCK_SIZE - BLOCKS_PER_MBLOCK) * (bd->blocks/(MBLOCK_SIZE/BLOCK_SIZE)); } } return total_blocks; } void memInventory(void) { nat g, s, i; step *stp; bdescr *bd; lnat total_blocks = 0, free_blocks = 0; /* count the blocks we current have */ for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (i = 0; i < n_capabilities; i++) { for (bd = capabilities[i].mut_lists[g]; bd != NULL; bd = bd->link) { total_blocks += bd->blocks; } } for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) { total_blocks += bd->blocks; } for (s = 0; s < generations[g].n_steps; s++) { if (g==0 && s==0) continue; stp = &generations[g].steps[s]; total_blocks += stepBlocks(stp); } } for (i = 0; i < n_nurseries; i++) { total_blocks += stepBlocks(&nurseries[i]); } #ifdef THREADED_RTS // We put pinned object blocks in g0s0, so better count blocks there too. total_blocks += stepBlocks(g0s0); #endif /* any blocks held by allocate() */ for (bd = small_alloc_list; bd; bd = bd->link) { total_blocks += bd->blocks; } #ifdef PROFILING if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_RETAINER) { total_blocks += retainerStackBlocks(); } #endif // count the blocks allocated by the arena allocator total_blocks += arenaBlocks(); // count the blocks containing executable memory for (bd = exec_block; bd; bd = bd->link) { total_blocks += bd->blocks; } /* count the blocks on the free list */ free_blocks = countFreeList(); if (total_blocks + free_blocks != mblocks_allocated * BLOCKS_PER_MBLOCK) { debugBelch("Blocks: %ld live + %ld free = %ld total (%ld around)\n", total_blocks, free_blocks, total_blocks + free_blocks, mblocks_allocated * BLOCKS_PER_MBLOCK); } ASSERT(total_blocks + free_blocks == mblocks_allocated * BLOCKS_PER_MBLOCK); } nat countBlocks(bdescr *bd) { nat n; for (n=0; bd != NULL; bd=bd->link) { n += bd->blocks; } return n; } /* Full heap sanity check. */ void checkSanity( void ) { nat g, s; if (RtsFlags.GcFlags.generations == 1) { checkHeap(g0s0->blocks); checkChain(g0s0->large_objects); } else { for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (s = 0; s < generations[g].n_steps; s++) { if (g == 0 && s == 0) { continue; } ASSERT(countBlocks(generations[g].steps[s].blocks) == generations[g].steps[s].n_blocks); ASSERT(countBlocks(generations[g].steps[s].large_objects) == generations[g].steps[s].n_large_blocks); checkHeap(generations[g].steps[s].blocks); checkChain(generations[g].steps[s].large_objects); if (g > 0) { checkMutableList(generations[g].mut_list, g); } } } for (s = 0; s < n_nurseries; s++) { ASSERT(countBlocks(nurseries[s].blocks) == nurseries[s].n_blocks); ASSERT(countBlocks(nurseries[s].large_objects) == nurseries[s].n_large_blocks); } checkFreeListSanity(); } } /* Nursery sanity check */ void checkNurserySanity( step *stp ) { bdescr *bd, *prev; nat blocks = 0; prev = NULL; for (bd = stp->blocks; bd != NULL; bd = bd->link) { ASSERT(bd->u.back == prev); prev = bd; blocks += bd->blocks; } ASSERT(blocks == stp->n_blocks); } // handy function for use in gdb, because Bdescr() is inlined. extern bdescr *_bdescr( StgPtr p ); bdescr * _bdescr( StgPtr p ) { return Bdescr(p); } #endif
|
{
"url": "https://gitlab.haskell.org/trac-jberryman/ghc/-/raw/e3c55aebd4f9ce7a5b4390d4726612865fd207f2/rts/Storage.c?inline=false",
"source_domain": "gitlab.haskell.org",
"snapshot_id": "crawl=CC-MAIN-2021-25",
"warc_metadata": {
"Content-Length": "35626",
"Content-Type": "application/http; msgtype=response",
"WARC-Block-Digest": "sha1:ACWRXNC5HV4PK7FIPXVM5UHSTJVR4I4Q",
"WARC-Concurrent-To": "<urn:uuid:bb0b246f-0736-4fed-ba15-85356270fe82>",
"WARC-Date": "2021-06-13T13:44:38Z",
"WARC-IP-Address": "147.75.105.243",
"WARC-Identified-Payload-Type": "text/x-csrc",
"WARC-Payload-Digest": "sha1:TKSPVPQR7NPWTYOKC42VVRRCP2NR6AU6",
"WARC-Record-ID": "<urn:uuid:a85d116f-e8f8-46dd-a417-1c90b6b5d9bd>",
"WARC-Target-URI": "https://gitlab.haskell.org/trac-jberryman/ghc/-/raw/e3c55aebd4f9ce7a5b4390d4726612865fd207f2/rts/Storage.c?inline=false",
"WARC-Truncated": null,
"WARC-Type": "response",
"WARC-Warcinfo-ID": "<urn:uuid:32a64149-1353-494b-a7e1-86d08cbebfd2>"
},
"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-177.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
],
"line_end_idx": [
31713
]
}
|
{
"red_pajama_v2": {
"ccnet_original_length": 31713,
"ccnet_original_nlines": 0,
"rps_doc_curly_bracket": 0.008040869608521461,
"rps_doc_ldnoobw_words": 0,
"rps_doc_lorem_ipsum": 0,
"rps_doc_stop_word_fraction": 0.18853844702243805,
"rps_doc_ut1_blacklist": 0,
"rps_doc_frac_all_caps_words": 0.03407490998506546,
"rps_doc_frac_lines_end_with_ellipsis": 0,
"rps_doc_frac_no_alph_words": 0.44438186287879944,
"rps_doc_frac_unique_words": 0.2723214328289032,
"rps_doc_mean_word_length": 6.24404764175415,
"rps_doc_num_sentences": 294,
"rps_doc_symbol_to_word_ratio": 0.0076034897938370705,
"rps_doc_unigram_entropy": 5.907872676849365,
"rps_doc_word_count": 3360,
"rps_doc_frac_chars_dupe_10grams": 0.04995233938097954,
"rps_doc_frac_chars_dupe_5grams": 0.11539561301469803,
"rps_doc_frac_chars_dupe_6grams": 0.09237369149923325,
"rps_doc_frac_chars_dupe_7grams": 0.0771210715174675,
"rps_doc_frac_chars_dupe_8grams": 0.06653956323862076,
"rps_doc_frac_chars_dupe_9grams": 0.05538608133792877,
"rps_doc_frac_chars_top_2gram": 0.0012392799835652113,
"rps_doc_frac_chars_top_3gram": 0.002144899917766452,
"rps_doc_frac_chars_top_4gram": 0.002573879901319742,
"rps_doc_books_importance": -3343.496826171875,
"rps_doc_books_importance_length_correction": -3343.496826171875,
"rps_doc_openwebtext_importance": -1704.7734375,
"rps_doc_openwebtext_importance_length_correction": -1704.7734375,
"rps_doc_wikipedia_importance": -877.6549682617188,
"rps_doc_wikipedia_importance_length_correction": -877.6549682617188
},
"fasttext": {
"dclm": 0.9772934317588806,
"english": 0.5703908801078796,
"fineweb_edu_approx": 2.9300527572631836,
"eai_general_math": 0.8636091351509094,
"eai_open_web_math": 0.313663125038147,
"eai_web_code": 0.7215220332145691
}
}
|
{
"free_decimal_correspondence": {
"primary": {
"code": "005.4",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
},
"secondary": {
"code": "005.1",
"labels": {
"level_1": "General works, books and libraries, information sciences",
"level_2": "",
"level_3": "Computer programming"
}
}
},
"bloom_cognitive_process": {
"primary": {
"code": "3",
"label": "Apply"
},
"secondary": {
"code": "4",
"label": "Analyze"
}
},
"bloom_knowledge_domain": {
"primary": {
"code": "3",
"label": "Procedural"
},
"secondary": {
"code": "2",
"label": "Conceptual"
}
},
"document_type_v1": {
"primary": {
"code": "4",
"label": "Code/Software"
},
"secondary": {
"code": "-1",
"label": "Abstain"
}
},
"extraction_artifacts": {
"primary": {
"code": "0",
"label": "No Artifacts"
},
"secondary": {
"code": "0",
"label": "No Artifacts"
}
},
"missing_content": {
"primary": {
"code": "0",
"label": "No missing content"
},
"secondary": {
"code": "0",
"label": "No missing content"
}
},
"document_type_v2": {
"primary": {
"code": "8",
"label": "Documentation"
},
"secondary": {
"code": "3",
"label": "Academic Writing"
}
},
"reasoning_depth": {
"primary": {
"code": "4",
"label": "Advanced Reasoning"
},
"secondary": {
"code": "3",
"label": "Intermediate Reasoning"
}
},
"technical_correctness": {
"primary": {
"code": "4",
"label": "Highly Correct"
},
"secondary": {
"code": "3",
"label": "Mostly Correct"
}
},
"education_level": {
"primary": {
"code": "4",
"label": "Graduate/Expert Level"
},
"secondary": {
"code": "3",
"label": "Undergraduate Level"
}
}
}
|
672f1e42c33a7f9846924a2431ea77df
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.