identifier
stringlengths
7
768
collection
stringclasses
3 values
open_type
stringclasses
1 value
license
stringclasses
2 values
date
float64
2.01k
2.02k
title
stringlengths
1
250
creator
stringlengths
0
19.5k
language
stringclasses
357 values
language_type
stringclasses
3 values
word_count
int64
0
69k
token_count
int64
2
438k
text
stringlengths
1
388k
__index_level_0__
int64
0
57.4k
https://meta.stackoverflow.com/questions/325954
StackExchange
Open Web
CC-By-SA
2,016
Stack Exchange
BSMP, Bill the Lizard, Daedalus, Glorfindel, Oriol, Pekka, https://meta.stackoverflow.com/users/1288, https://meta.stackoverflow.com/users/1413395, https://meta.stackoverflow.com/users/1529630, https://meta.stackoverflow.com/users/187606, https://meta.stackoverflow.com/users/2423164, https://meta.stackoverflow.com/users/2840103, https://meta.stackoverflow.com/users/4076315, https://meta.stackoverflow.com/users/4751173, https://meta.stackoverflow.com/users/575376, https://meta.stackoverflow.com/users/578411, https://meta.stackoverflow.com/users/785241, https://meta.stackoverflow.com/users/99456, johnnyRose, juergen d, ndnenkov, rene, yannis, πάντα ῥεῖ
English
Spoken
1,841
2,539
Add `color` attribute Colours add another dimension to text. We use them to educate children. Some use them in different note taking frameworks. Colours are awesome. Imagine how easier it would be to explain how this regex: ^.*?[a-zA-Z]*M\d+$ Matches this string: awesome_ColoursM888888 If you could start like this: PS: Don't argue about the validity of the question or alternatives in this specific example. It's just an example. Update: For all the people instantly assuming newbies and spammers will post unreadable rainbow mess, here are two possible solutions: Make it a privilege. You simply can't use colours if you don't have at least x reputation. Don't add UI for it. How many people actually know you can use kbd tag to make something appear as a button (Shift)? I would guess not that many, even though we actively encourage its use when appropriate. Out of those who know - probably almost none are complete newcomers. Please no! This would make the look of posts incredibly distractive. @πάνταῥεῖ, there can be guidelines on when to use colours or people could just use common sense. I don't think you will suddenly see every second post be a Picasso masterpiece. We have tons of formatting guidelines, and people consistently fail to follow them. Same with common sense. Using backticks for anything that isn't code, for example. @Yannis, ok, then we should remove formatting as well, right? I mean, there are people that don't know how to use it, the benefit doesn't outway the cost? I see no benefit in this. This isn't a necessary evil, this is just evil. @Yannis, did you see the example? Are you seriously suggesting that colours don't have explanatory power in general? The examples work against your proposal. Sure, colours do have explanatory power, the vibrant mess you presented in your examples does not. At least not for me. That said, my opinion is just that and you shouldn't care about it. However, without giving us a sensible way of controlling even the most basic abuses of your feature (hey, look, each word/letter in my question is a different colour!), I don't see this being implemented. @Yannis I never said question titles should have colours. Hell, they don't support basic formatting, look at this question's title. So your counter example is a fail. Could you add actual examples of how colours can be abused? We don't have it so we don't need it is not an argument. When did I say anything about titles? @Yannis So how is it abuse? If anything people will be less likely to answer your question if every letter is in different colour. It's like saying that people will start posting gibberish if we don't have forced spell checking. Beyond the fact that this will lit up like a Christmas tree I also suspect an implementation issue as CommonMark doesn't seem to support color and IIRC Stack Overflow is or will be moving towards that implementation. If anything, this FR would also need to fit in that spec. In the rare cases that colours would help, such as your Regex example, you can just use a picture instead. I vote no on this. I get your example, and agree that colors are helpful in that situation, but that's a very narrow subset of questions on SO. Can you think of how colors might be helpful in a broader sense? For a change like this, the benefits should far outweigh the potential for abuse. I'm a super artsy, visually oriented person and not once in my six years have I missed this feature. The fewer formatting options there are, the better is the overall readability of the site's content. Notice that the texts in your example picture are all black. @BilltheLizard, everyone can find different uses, the possibilities are only limited by your imagination. In the same sense, what is the broader use of italics? I still don't understand how this can be abused. My understanding of abuse is taking advantage of something, not just using something to troll even though there is no point in doing so. I see the merit for this in the context of your regex example, but it seems like this could lead to inconsistent highlighting and ugly, illegible posts - not to mention new users using it in an obnoxious way to highlight their post. It's easy to achieve a similar, more readable effect by breaking the regex up into a list of its parts and associating each individual part. I still don't understand how this can be abused. White text to cram keywords, spam, and offensive text into posts. Defacing posts in a similar manner Making posts difficult to read by choosing colors with poor contrast Making it harder to see links because the color of the surrounding text and the link text now match Use of just color to convey information, harming post quality for blind/color-blind users In the same sense, what is the broader use of italics? It's for emphasis, like in the last bullet point above. Italics and bold are pretty basic font styles and there's really no alternate way to convey emphasis other than all caps, which is generally read as shouting but can also be confused for the user writing an acronym. My understanding of the word abuse is to use a feature in a way it was not intended to gain an unfair advantage. None of your examples do that. If you are worried people will use it to wreak havoc, they already have ways of doing that and we moderate them. If you are worried about people not knowing how to use the feature - there are a lot of people that don't know how to use the existing ones - we guide them and edit their posts. As for blind/colour-blind people - this is even more a case in favour of adding it as an attribute of the text as opposed to being forced to create an image. @ndn - There's not enough benefit to adding the feature to outweigh the negatives. The fact that they don't fall under that specific definition of abuse is irrelevant; they'd still be harmful to the site. There's no reason to waste resources adding something that will increase the moderation burden if it won't be useful. If I didn't think it would be useful I wouldn't have brought it up in the first place. People keep repeating "There's not enough benefit to adding the feature to outweigh the negatives." yet noone has provided any data to support it. How did you measure the costs and benefits to come to this conclusion? Also updated the question with solutions for the supposed danger of abuse. @ndn Where is your data to support your assertion this will be beneficial to the site? If your FR hinges on the regex case, that's a matter of syntax highlighting, meaning this FR is on the wrong website. I forget which library or script does the pretty-ifying, but if you want highlighting for regex, I'd suggest making an FR for that specifically. Otherwise, sure, people haven't provided evidence of danger, but you haven't provided any evidence to the contrary either. Your own graph has all black text. @Daedalus, it doesn't "hinge" on regexes. It says it's just an example right there in the question. The reason it makes sense that it would be beneficial is that it adds another dimension to text and we already use it in traditional education. The reason people will start posting colourful garbage is because? They simply can? They want to troll? As I said, even if we assume every single newbie and spammer comes to rainbowify SO once the feature is released, the "danger" can easily be mitigated in one of the ways proposed in the update of the question. If I didn't think it would be useful I wouldn't have brought it up in the first place. @ndn - I wasn't saying that you don't think it's useful, I'm saying that you haven't proven that to anyone else. noone has provided any data to support it You're the one that wants to change the site. Where's your data that there is a significant benefit to this? @BSMP, where was the data that SO will be useful at all before SO was created? Where was the data that italic and bold will be useful before they were added? As I said, we have reasons to believe that colours have explanatory power. I haven't seen someone stating the contrary so far. How useful will they be in the context of SO, I can not quantify until it has actually been implemented. Yet there are people like you that suggest that they know exactly how helpful and harmful it will be. When I already provided solutions for the "harmful" side of things. @ndn - The solutions to mitigate the harm only matter if the benefit is worth it. For example, they recently blacklisted a bunch of link shorteners because the benefit didn't outweigh the hassle of having them. It looks like we simply aren't going to agree on this point: you want this implemented with little evidence it will be worth the effort, we think you ought to show how it will be broadly useful first. @BSMP, assume we lived in a world where SO didn't have bold and italic. I'm very interested in what evidence you are going to provide that the benefit would outway the cost. Your initial argument revolved around imaginary strawmen rainbow spammers. And I provided a solution, even though I didn't think it will be a problem in the first place. If people were making the argument that it's not requested enough feature to justify development cost, I would see that as a valid point. But only one person has pointed out possible difficulties with implementation and most of the arguments start with the assumption that the average SO user is a 10 yo troll. If you want colors, you can use a code snippet: .re-1 { color: red; } .re-2 { color: orange; } .re-3 { color: green; } .re-4 { color: blue; } <p>^<span class="re-1">.*?</span><span class="re-2">[a-zA-Z]*</span><span class="re-3">M</span><span class="re-4">\d+</span>$</p> <p><span class="re-1">awesome_</span><span class="re-2">Colours</span><span class="re-3">M</span><span class="re-4">888888</span></p> To make it look prettier, you can only include the regular expression, the text, and some JS script. That script would tokenize the regular expression, match the given string, and display the result with CSS colors. As I said, this was only an example. What if you wanted to use colours somewhere in the text of your explanation rather than highlight code in a different way? Would you force people to run a snippet so they read your post? If so, why do we have bold and italic at all, people could just use snippets if they wanted any formatting? Snippets are meant to demonstrate your examples/solution, not be part of the actual explanation. @ndn Technically, Markdown doesn't have bold and italic which, like colors, wouldn't be semantic. It has text with strong importance, or with stress emphasis.
23,926
https://fr.wikipedia.org/wiki/Langweid%20am%20Lech
Wikipedia
Open Web
CC-By-SA
2,023
Langweid am Lech
https://fr.wikipedia.org/w/index.php?title=Langweid am Lech&action=history
French
Spoken
305
557
Langweid am Lech est une commune allemande de Bavière située dans l'arrondissement d'Augsbourg et le district de Souabe. Géographie Langweid am Lech est située entre la Lech à l'est et la Schmutter à l'ouest, à au nord d'Augsbourg, à la limite avec l'arrondissement d'Aichach-Friedberg. La commune est composée des quatre villages de Langweid, Foret, Stettenhofen et Achsheim. Communes limitrophes (en commençant par le nord et dans le sens des aiguilles d'une montre) : Biberbach, Meitingen, Todtenweis, Rehling, Gersthofen et Gablingen. Histoire Le village est de fondation romaine (Longa Quinta). Au , un établissement militaire y est fondé et des colons romains et celtes s'y installent, le long de la Via Claudia Augusta. La première mention écrite date de 1143 sous le nom de Lanchwate. Le village est alors la propriété de l'évêché d'Augsbourg, ce qui sera le cas jusqu'en 1803. En 1632, pendant la Guerre de Trente Ans, après la prise de Donauworth, le roi Gustave II Adolphe de Suède s'y installe quelque temps. Langweid est intégré au royaume de Bavière en 1803 et érigé en commune en 1818. Situé sur la première ligne de chemin de fer de l'état bavarois, Langweid possède une gare dès 1844 et, en 1906, la construction d'un barrage sur la canal de la Lech permet les débuts de l'électrification. Pendant la Guerre froide, un centre d'écoute militaire et de recherche de fréquences radios par antenne circulaire de type Wullenweber est installé au sud de la commune sur le site de la base aérienne de Gersthofen-Gablingen par l'armée américaine. Les communes de Stettenhofen en 1972 et Achsheim en 1978 sont incorporées au territoire de Langweid. Démographie Lieux de culte Langweid, église catholique, St Vitus. Stettenhofen, église évangélique luthérienne ; Stettenhofen, église catholique du Bon Berger ; Achsheim, église catholique Sts Pierre et Paul ; Notes et références Commune en Bavière
46,940
https://hy.wikipedia.org/wiki/%D5%8E%D5%A1%D6%80%D5%A4%D5%A1%D5%B6%20%D5%94%D5%A5%D5%B7%D5%AB%D5%B7%D5%B5%D5%A1%D5%B6
Wikipedia
Open Web
CC-By-SA
2,023
Վարդան Քեշիշյան
https://hy.wikipedia.org/w/index.php?title=Վարդան Քեշիշյան&action=history
Armenian
Spoken
179
1,169
Վարդան Խաչերի Քեշիշյան (1883, Մարաշ, Մարաշի գավառ, Հալեպի նահանգ, Օսմանյան կայսրություն- 20 հունվարի, 1920, Մարաշ), հայ դեղագործ։ Կենսագրություն Ծնվել է 1883 թվականին Օս­մա­նյան կայս­րու­թյան Հա­լե­պի նա­հան­գի Մա­րա­շի գա­վա­ռի կենտ­րոն Մա­րաշ քա­ղա­քում։ Դե­ղա­գործ-բժիշկ Խաչեր Քեշիշյանի ավագ որ­դին է։ Սո­վո­րել է ամե­րի­կա­ցի մի­սի­ո­ներ­նե­րի Մա­րա­շի «Ակա­դե­մի» բարձ­րա­գույն վար­ժա­րա­նում, այ­նու­հե­տև՝ ամե­րի­կա­ցի մի­սի­ո­ներ­նե­րի Տարսոնի Սեյնթ Պոլ քո­լե­ջում, որը թե­րա­վարտ է թո­ղել։ 1906 թվականին ավար­տել է Կ. Պոլսի Օսմանյան կայսերական բժշկական համալսարանի դե­ղա­գոր­ծա­կան բա­ժի­նը և դե­ղա­գոր­ծի վկա­յա­կան ստա­ցել։ 1914 թվականին՝ Առաջին համաշխարհային պատերազմի ժա­մա­նակ զո­րա­կոչ­վել է օս­մա­նյան բա­նակ և ու­ղարկ­վել Զեյթուն` զին­վո­րա­կան դե­ղա­գործ ծա­ռա­յե­լու։ Զեյ­թու­նում 8 ամիս ծա­ռա­յե­լուց հե­տո տա­րագր­վել է Կոնիա, որ­տե­ղից էլ ըն­տա­նի­քով` Մեսքենե։ Այս­տե­ղից փախ­ել է Հալեպ, ուր կրկին մտել է օս­մա­նյան բա­նակ և զին­վո­րա­կան դե­ղա­գործ ծա­ռա­յել Նաբլուսի (Պաղեստին) ռազ­մա­ճա­կա­տում։ 1918 թվականի զի­նա­դա­դա­րից հե­տո վե­րա­դար­ձել է Մա­րաշ։ 1920 թվականի հուն­վա­րի 26-ին՝ Մա­րա­շի հա­յե­րի կո­տո­րա­ծի ժա­մա­նակ, թուր­քե­րը նրան սրա­խող­խող են արել՝ 37 տա­րե­կա­նում։ Գրականություն Գա­լուս­տե­ան Գրի­գոր Հ., Մա­րաշ, Նիւ Եորք, 1934։ Գա­լուս­տե­ան Գրի­գոր Հ., Մա­րաշ կամ Գեր­մա­նիկ եւ հե­րոս Զէյ­թուն, Նիւ Եորք, 1988։ «Գե­ղարդ» սու­րի­ա­հայ տա­րե­գիրք, Ե. գիրք, Հա­լէպ, 1996։ Աղբյուր Հայ դեղագործներ 1883 ծնունդներ Մարաշ քաղաքում ծնվածներ 1920 մահեր Հունվարի 20 մահեր
22,634
https://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%86%D8%AB%D8%B1%D9%88%D8%A8%20%28%D9%88%D8%A7%D8%B4%D9%86%D8%B7%D9%86%29
Wikipedia
Open Web
CC-By-SA
2,023
وينثروب (واشنطن)
https://ar.wikipedia.org/w/index.php?title=وينثروب (واشنطن)&action=history
Arabic
Spoken
629
1,748
وينثروب هي بلدة تقع بولاية واشنطن في الولايات المتحدة. تبلغ مساحتها 2.43 (كم²)، وترتفع عن سطح البحر 539 م، بلغ عدد سكانها 394 نسمة في عام 2010 حسب إحصاء مكتب تعداد الولايات المتحدة وتصل الكثافة السكانية فيها 161.8 نسمة/كم2. التركيبة السكانية قام مكتب تعداد الولايات المتحدة بتحديد بيانات التركيبة السكانية لوينثروب في تعداد الولايات المتحدة. في ما يلي، التركيبة السكانية حسب تعدادي 2000 و2010. تعداد عام 2000 بلغ عدد سكان وينثروب 1,367 نسمة بحسب تعداد عام 2000، وبلغ عدد الأسر 591 أسرة وعدد العائلات 346 عائلة مقيمة في المدينة. في حين سجلت الكثافة السكانية . وبلغ عدد الوحدات السكنية 632 وحدة بمتوسط كثافة قدره . وتوزع التركيب العرقي للمدينة بنسبة 93.71% من البيض و 0.29% من الأمريكيين الأصليين و 0.15% من الأمريكيين ذوي الأصول الآسيوية و 0.07% من الأمريكيين الأفارقة و 1.24% من عرقين مختلطين أو أكثر. بلغ عدد الأسر 591 أسرة كانت نسبة 26.1% منها لديها أطفال تحت سن الثامنة عشر تعيش معهم، وبلغت نسبة الأزواج القاطنين مع بعضهم البعض 48.7% من أصل المجموع الكلي للأسر، ونسبة 6.8% من الأسر كان لديها معيلات من الإناث دون وجود شريك، وكانت نسبة 41.3% من غير العائلات. تألفت نسبة 38.7% من أصل جميع الأسر من أفراد ونسبة 21.5% كانوا يعيش معهم شخص وحيد يبلغ من العمر 65 عاماً فما فوق. وبلغ متوسط حجم الأسرة المعيشية 2.96، أما متوسط حجم العائلات فبلغ 2.22. بلغ العمر الوسطي للسكان 43 عاماً. وكانت نسبة 23.7% من القاطنين تحت سن الثامنة عشر، وكانت نسبة 6.1% بين الثامنة عشر والأربعة وعشرون عاماً، ونسبة 23.3% كانت واقعةً في الفئة العمرية ما بين الخامسة والعشرون حتى والأربعة وأربعون عاماً، ونسبة 21.2% كانت ما بين الخامسة والأربعون حتى الرابعة والستون، ونسبة 25.6% كانت ضمن فئة الخامسة والستون عاماً فما فوق. يوجد لكل 100 أنثى 88.3 ذكر، ويوجد لكل 100 أنثى في الثامنة عشر من عمرها فما فوق 83.6 ذكر. بلغ متوسط دخل الأسرة في المدينة 34,813 دولار، أما متوسط دخل العائلة فبلغ 47,159 دولار. وكان متوسط دخل الذكور 31,149 دولار مقابل 20,573 دولار للإناث. وسجل دخل الفرد الخاص بالمدينة 18,188 دولار. وكانت نسبة 3.5% من العائلات ونسبة 6.1% من السكان تحت خط الفقر، وكان من هؤلاء نسبة 5.7% تحت سن الثامنة عشر ونسبة 8.2% في الخامسة والستين من العمر وما فوق. تعداد عام 2010 بلغ عدد سكان وينثروب 1,399 نسمة بحسب تعداد عام 2010، وبلغ عدد الأسر 574 أسرة وعدد العائلات 355 عائلة مقيمة في المدينة. في حين سجلت الكثافة السكانية . وبلغ عدد الوحدات السكنية 640 وحدة بمتوسط كثافة قدره . وتوزع التركيب العرقي للمدينة بنسبة 93.4% من البيض و 0.7% من الأمريكيين الأصليين و 0.5% من الأمريكيين ذوي الأصول الآسيوية و 0.5% من الأمريكيين الأفارقة و 1.1% من عرقين مختلطين أو أكثر. بلغ عدد الأسر 574 أسرة كانت نسبة 28.0% منها لديها أطفال تحت سن الثامنة عشر تعيش معهم، وبلغت نسبة الأزواج القاطنين مع بعضهم البعض 48.6% من أصل المجموع الكلي للأسر، ونسبة 8.7% من الأسر كان لديها معيلات من الإناث دون وجود شريك، بينما كانت نسبة 4.5% من الأسر لديها معيلون من الذكور دون وجود شريكة وكانت نسبة 38.2% من غير العائلات. تألفت نسبة 33.8% من أصل جميع الأسر من أفراد ونسبة 18.8% كانوا يعيش معهم شخص وحيد يبلغ من العمر 65 عاماً فما فوق. وبلغ متوسط حجم الأسرة المعيشية 2.97، أما متوسط حجم العائلات فبلغ 2.36. بلغ العمر الوسطي للسكان 41.7 عاماً. وكانت نسبة 25.9% من القاطنين تحت سن الثامنة عشر، وكانت نسبة 5.1% بين الثامنة عشر والأربعة وعشرون عاماً، ونسبة 21.7% كانت واقعةً في الفئة العمرية ما بين الخامسة والعشرون حتى والأربعة وأربعون عاماً، ونسبة 25.3% كانت ما بين الخامسة والأربعون حتى الرابعة والستون، ونسبة 22% كانت ضمن فئة الخامسة والستون عاماً فما فوق. وتوزع التركيب الجنسي للسكان بنسبة 47.7% ذكور و52.3% إناث. مراجع وصلات خارجية townofwinthrop.com The US50 - Cities and Towns in Washington State Washington Cities and Towns, Facts, Map, Flag, Colleges, Government, and More بلدات في مقاطعة أوكانوغان (واشنطن) بلدات ولاية واشنطن
24,475
https://war.wikipedia.org/wiki/Echinopla%20densistriata
Wikipedia
Open Web
CC-By-SA
2,023
Echinopla densistriata
https://war.wikipedia.org/w/index.php?title=Echinopla densistriata&action=history
Waray
Spoken
36
70
An Echinopla densistriata in uska species han Formicidae nga ginhulagway ni Hermann Stitz hadton 1938. An Echinopla densistriata in nahilalakip ha genus nga Echinopla, ngan familia nga formicidae. Waray hini subspecies nga nakalista. Mga kasarigan Echinopla
24,395
https://smn.wikipedia.org/wiki/1545
Wikipedia
Open Web
CC-By-SA
2,023
1545
https://smn.wikipedia.org/w/index.php?title=1545&action=history
Inari Sami
Spoken
44
170
1545 (MDXLV) lâi normaalihe, mii aalgij já nuuvâi juliaanlâš kalender mield tuorâstuv. Tot lâi 1540-lovo kuuđâd ihe. Tábáhtusah Kesimáánu kesimáánu 9. peeivi – Eennâm tuárgistij korrâsávt Taro-juuvâ leevist Tave-Italiast. Eennâmtuárgástâs intensiteet lâi 5,3 Richter ciäkkáduv mield já VII–VIII Mercalli ciäkkáduv mield. Šoddâmeh Jämimeh Käldeeh
7,902
https://ar.wikipedia.org/wiki/%D8%A5%D9%8A%D8%B1%D9%88%D9%84%20%D8%B3%D8%AA%D9%8A%D9%88%D8%A7%D8%B1%D8%AA
Wikipedia
Open Web
CC-By-SA
2,023
إيرول ستيوارت
https://ar.wikipedia.org/w/index.php?title=إيرول ستيوارت&action=history
Arabic
Spoken
58
186
إيرول ستيوارت هو لاعب بولينغ أسترالي، ولد في 21 ديسمبر 1931. مراجع أستراليون في القرن 20 أشخاص على قيد الحياة فائزون بميداليات فضية في ألعاب الكومنولث من أستراليا فائزون بميداليات في ألعاب الكومنولث في البولينغ العشبي فائزون بميداليات في دورة ألعاب الكومنولث البريطانية 1974 لاعبو بولينج ذكور أستراليون لاعبو بولينج في دورة ألعاب الكومنولث البريطانية 1974 مواليد 1931
42,475
https://pl.wikipedia.org/wiki/Stara%20D%C4%85browa%20%28gromada%20w%20powiecie%20stargardzkim%29
Wikipedia
Open Web
CC-By-SA
2,023
Stara Dąbrowa (gromada w powiecie stargardzkim)
https://pl.wikipedia.org/w/index.php?title=Stara Dąbrowa (gromada w powiecie stargardzkim)&action=history
Polish
Spoken
162
431
Stara Dąbrowa (do 31 XII 1961 Nowa Dąbrowa) – dawna gromada, czyli najmniejsza jednostka podziału terytorialnego Polskiej Rzeczypospolitej Ludowej w latach 1954–1972. Gromady, z gromadzkimi radami narodowymi (GRN) jako organami władzy najniższego stopnia na wsi, funkcjonowały od reformy reorganizującej administrację wiejską przeprowadzonej jesienią 1954 do momentu ich zniesienia z dniem 1 stycznia 1973, tym samym wypierając organizację gminną w latach 1954–1972. Gromadę Dobrzany z siedzibą GRN w Starej Dąbrowie utworzono 1 stycznia 1962 w powiecie stargardzkim w woj. szczecińskim w związku z przeniesieniem siedziby gromady Nowa Dąbrowa z Nowej Dąbrowy do Starej Dąbrowy i zmianą nazwy jednostki na gromada Stara Dąbrowa; równocześnie do gromady Stara Dąbrowa włączono miejscowości Wiry, Chlebówko, Rokicie i Białuń ze zniesionej gromady Chlebówek oraz miejscowości Piaszno, Storkówko, Parlino, Tolcz, Łęczówka, Załęcze, Łęczyca, Łęczyna i Moskorze ze zniesionej gromady Łęczyca w tymże powiecie. Gromada przetrwała do końca 1972 roku, czyli do kolejnej reformy gminnej. 1 stycznia 1973 w powiecie stargardzkim utworzono gminę Stara Dąbrowa Przypisy Stara Dazzxbrowa (powiat stargardzki)
18,039
https://de.wikipedia.org/wiki/Aleksandar%20Zwetkow
Wikipedia
Open Web
CC-By-SA
2,023
Aleksandar Zwetkow
https://de.wikipedia.org/w/index.php?title=Aleksandar Zwetkow&action=history
German
Spoken
28
86
Aleksandar Zwetkow ist der Name folgender Personen: * Aleksandar Zwetkow (Schachspieler) (1914–1990), bulgarischer Schachspieler Aleksandar Zwetkow (Politiker) (* 1967), bulgarischer Politiker Aleksandar Zwetkow (Fußballspieler) (* 1990), bulgarischer Fußballspieler
35,049
https://tr.wikipedia.org/wiki/Try%20This
Wikipedia
Open Web
CC-By-SA
2,023
Try This
https://tr.wikipedia.org/w/index.php?title=Try This&action=history
Turkish
Spoken
210
560
Try This, Amerikalı şarkıcı Pink'in üçüncü stüdyo albümüdür. Albüm 10 Kasım 2003 tarihinde Arista Records tarafından yayınlandı. Albüm hakkında Önceki albüm M!ssundaztood'daki gibi Linda Perry ve buna ek olarak Madonna'nın yapımcısı olarak bilinen Willam Orbit ile çalışan Pink, üçüncü stüdyo albümünü 2003 sonlarında yayınladı. Albümdeki gitar soloları Rancid grubunun gitaristi Tim Armstrong tarafından kaydedildi. Plak şirketi olan Arista, albümün yayınlanmasından önce Pink'e, albümün önceki albüm gibi bir temaya sahip olması için baskı yapmaktaydı. Ancak Pink, tüm bu baskılara rağmen albümü tümüyle kendi istediği biçimde kaydetti. İlk tekli Feel Good Time, ABD'de düşük bir başarı gösterdi, ancak yine de sonrasında Charlie's Angels: Full Throttle adlı filmin film müzikleri albümünde yer aldı. Albümden toplam altı şarkı yayınlandı ancak hiçbiri Amerikan listelerinde üst sırada yer almadı. Ancak buna rağmen albüm Billboard 200 listesinde 9 numaraya kadar çıktı. İçerik "Trouble" – 3:13 "God Is a DJ" – 3:46 "Last to Know" – 4:03 "Tonights the Night" – 4:01 "Oh My God" (Peaches ile) – 3:44 "Catch Me While I'm Sleeping" – 5:03 "Waiting for Love" – 5:28 "Save My Life" – 3:16 "Try Too Hard" – 3:14 "Humble Neighborhoods" – 3:52 "Walk Away" – 3:39 "Unwind" – 3:14 "Love Song" – 2:29 / "Hooker" (saklı parça) – 3:04 Listeler Kaynakça Pink albümleri 2003 albümleri
45,571
https://stackoverflow.com/questions/11041168
StackExchange
Open Web
CC-By-SA
2,012
Stack Exchange
Ajay Patel, Aleksei Zabrodskii, Andrew Theken, CatDadCode, cmonsqpr, https://stackoverflow.com/users/1340699, https://stackoverflow.com/users/2507644, https://stackoverflow.com/users/32238, https://stackoverflow.com/users/498624, https://stackoverflow.com/users/704503, https://stackoverflow.com/users/716492, mshindal
English
Spoken
553
938
nodejs jade conditional extend I would like to make my Jade page extend different layouts, depending on a condition. So my code looks like this: if myConditionVariable extends layout1 else extends layout2 block content p here goes my content! Now this does not work. It seems as if only the last defined extends will be respected, regardless of the conditions. I also tried dynamically defining the templatename, such as extends myLayoutNameVariable and set the myLayoutNameVariable in different manners (express dynamic helper function, set it as var, local var etc...) Is there any other solution for conditional layouts or can someone tell me what i am doing wrong? Cheers, simon Did you mean - if myConditionVariable — see that minus in front of if? (Same for else branch.) Also, you probably mean append block or something. This seems to be an issue that's still open on github. thanks for the hint! Apparently the same goes for includes, as the layouts and includes are resolved at compile time, not runtime. So, a slightly less intrusive way to deal with this is to change the layout itself. I added a bit of middleware, and the rest flows.. app.use(function(req, res, next){ res.locals.isAjax = req.headers['x-requested-with'] && req.headers['x-requested-with'] === 'XMLHttpRequest'; next(); }); Now that this is set, "isAjax" is available to jade. In my "layout.jade" (the template you will extend from), I do this: - if(!isAjax) doctype 5 html head body block content block scripts - else block content block scripts I have stripped out the other elements of the full layout.jade for (hopefully) clarity. Finally, my normal views that extend layout.jade work without modification (this jade template includes both cases). extends layout.jade .container. This is text will be wrapped for a non-ajax request, but not for an ajax request. Does this affect performance at all? When I looked at the issue on github linked above it seemed like TJ said Express wouldn't cache the pages. Sorry to raise a old question from the dead. @mshindal - I'm not sure how to answer your question, there's really multiple parts to this: 1) JADE compilation happens the same as before, so more template code, but not really a huge impact. 2) Depends on how caching is configured, if you're using ETags, you'll need to account for this header in generating the etag, but honestly, I think this solution is orthogonal to caching concerns. So.. my answer would be "no, it doesn't impact performance" Just so you know, express exposes req.xhr which checks for the x-requested-with header for you ;) Well, there you go @chev! -- even easier. I hope it's not too late but i ran across this issue and I think I figured out a workaround: Make a layout.jade that conditionaly includes both layouts: layout.jade: if conditionalVariable include firstLayout.jade else include otherLayout In your view, extend layout.jade, and define conditionalVariable in the controller (true/false): view.jade: extends layout block content p here goes my content! Disco! What about extends, I tried for extends firstLayout but it didn't work Can you do something like: if myConditionVariable p test ? If not, do you pass myConditionVariable correct when you tell to render that view? A short example for this: app.get "/", (req, res) -> res.render "index", myConditionVariable: true He's passing it correctly. If not, there would be error saying myConditionVariable not defined.
491
https://zu.wikipedia.org/wiki/Itilima%20District
Wikipedia
Open Web
CC-By-SA
2,023
Itilima District
https://zu.wikipedia.org/w/index.php?title=Itilima District&action=history
Zulu
Spoken
11
47
I-Itilima yisifunda esingaphansi kwesifundazwe se Simiyu, eThanzaniya. Imithombo Izifunda zase Thanzaniya
45,475
https://vi.wikipedia.org/wiki/L%E1%BB%8Bch%20s%E1%BB%AD%20Liverpool%20F.C.%20%281985%E2%80%93nay%29
Wikipedia
Open Web
CC-By-SA
2,023
Lịch sử Liverpool F.C. (1985–nay)
https://vi.wikipedia.org/w/index.php?title=Lịch sử Liverpool F.C. (1985–nay)&action=history
Vietnamese
Spoken
5,245
10,839
Lịch sử Câu lạc bộ bóng đá Liverpool từ năm 1985 tới nay bắt đầu từ việc bổ nhiệm Kenny Dalglish làm huấn luyện viên trưởng, Thảm họa Hillsborough, và sự trở lại của đội bóng tại đấu trường châu Âu vào năm 1991. Trong giai đoạn này, câu lạc bộ thi đấu ở cấp độ số một của bóng đá Anh, giải đấu mà tới năm 1992 trở thành Giải bóng đá Ngoại hạng Anh. Dalglish trở thành huấn luyện viên kiêm cầu thủ do sự ra đi của Joe Fagan sau thảm họa Heysel 1985, nguyên nhân dẫn tới lệnh cấm tham dự các giải đấu của UEFA đối với các câu lạc bộ Anh. Liverpool vô địch quốc gia và Cúp FA ở mùa giải đầu tiên của Dalglish, cùng với đó là một chức vô địch quốc gia nữa vào 1987–88. Thảm họa Hillsborough trong khuôn khổ trận bán kết Cúp FA với Nottingham Forest tại Sân vận động Hillsborough vào tháng 4 năm 1989 gây ra cái chết của 96 cổ động viên. Sau thảm kịch, Dalglish dẫn dắt đội bóng tới chức vô địch quốc nội thứ mười tám; ông từ chức vào tháng 2 năm 1991. Bản báo cáo Taylor về thảm họa trên đã chấm dứt việc sử dụng các khán đài đứng. Anfield trở thành một sân vận động lắp ghế ngồi trong thập niên 1990, qua đó giảm sức chứa của sân. Người kế nhiệm Dalglish là Graeme Souness giành chức vô địch Cúp FA trong mùa giải trọn vẹn đầu tiên của ông. Tại Giải Ngoại hạng mới, ông không thể duy trì thành công của câu lạc bộ và bị thay thế bởi Roy Evans giữa mùa giải 1993–94. Liverpool vươn lên thứ 4 mùa sau đó và đồng thời giành chức vô địch Cúp Liên đoàn. Vào năm 1998, Gérard Houllier trở thành đồng huấn luyện viên với Evans. Sự hợp tác kéo dài tới tháng 11 khi Evans từ chức còn Houllier trở thành huấn luyện viên duy nhất. Câu lạc bộ giành cú ăn ba danh hiệu vào năm 2001, và một năm sau đứng thứ nhì Giải ngoại hạng, vị trí tốt nhất của họ trong vòng 11 năm. Houllier từ biệt câu lạc bộ vào giữa năm 2004. Liverpool lần thứ năm vô địch UEFA Champions League trong mùa giải đầu tiên của Rafael Benítez, và giành tiếp FA Cup vào năm 2006. Câu lạc bộ được mua lại vào giữa mùa giải 2006–07 bởi hai doanh nhân người Mỹ, Tom Hicks và George Gillett. Đầu mùa giải 2010-11, Liverpool đứng bên bờ vực phá sản; câu lạc bộ được bán lại cho Tập đoàn Thể thao Fenway sau phán của tòa án cấp cao. Roy Hodgson, người được mời về thay cho Benítez, rời đội bóng vào năm 2011; Dalglish là người được chọn để thay thế. Ông đem về chức vô địch League Cup 2012. Dalglish được thay thế bằng Brendan Rodgers sau khi đội bóng chỉ xếp thứ 8 tại Giải bóng đá Ngoại hạng Anh 2011-12. Rodgers đưa Liverpool tới vị trí thứ 2 mùa giải 2013-14, tuy nhiên sự bất đồng của ban giám đốc về chuyển nhượng cầu thủ và thành tích bết bát khiến Rodgers bị sa thải vào tháng 10 năm 2015. Người thay thế ông, Jürgen Klopp, đưa câu lạc bộ trở lại khi họ lọt vào hai trận chung kết Champions League liên tiếp, vô địch vào năm 2019 và giành Siêu cúp châu Âu 2019. 1985–90: Kế tiếp thành công và thảm họa Hillsborough Dalglish trở thành người thay cho Fagan sau thảm họa Heysel. Ông thay thế hai hậu vệ lão tướng là Phil Neal và Alan Kennedy bằng Steve Nicol và Jim Beglin. Liverpool khởi đầu mùa giải 1985–86 khá tệ hại và bị đội đầu bảng Manchester United bỏ xa 10 điểm khi tháng 9 khép lại. Câu lạc bộ tiếp tục đấu tranh cho đến cuối mùa giải khi họ thắng mười một trong số mười hai trận đấu cuối cùng trong lúc các đối thủ của họ đang đánh mất điểm số. Liverpool cần phải đánh bại Chelsea trong trận đấu cuối cùng để lên ngôi và họ đã thành công với bàn thắng duy nhất của Dalglish. Đội cũng lọt vào Chung kết Cúp FA 1986 gặp Everton. Liverpool bị dẫn trước ở hiệp một bởi bàn thắng của Gary Lineker, tuy nhiên hai bàn thắng của Ian Rush cùng pha lập công của Craig Johnston ở hiệp hai giúp họ lội ngược dòng thắng 3–1. Đây là lần đầu họ giành cú đúp vô địch quốc gia và Cúp FA trong một mùa giải. Vào đầu mùa giải 1986-87, Rush bày tỏ ý định ra đi để tới với Juventus khi mùa giải kết thúc. Rush sau đó không muốn rời đội nữa nhưng câu lạc bộ vẫn quyết định bán anh bởi họ đang cần tiền để bù đắp cho việc không được thi đấu quốc tế. Vào giai đoạn giữa mùa Dalglish chiêu mộ John Aldridge để thay thế cho Rush. Trước khi ra đi, Rush vẫn kịp mang về 40 bàn thắng cho đội bóng. Liverpool đứng thứ hai ở giải hạng nhất sau Everton, và bị Luton Town loại khỏi Cúp FA ở vòng ba. Đội bóng vào tới trận chung kết League Cup, nhưng thúc thủ 1–2 trước Arsenal F.C.. Cuối mùa giải năm đó, Dalglish mang về Peter Beardsley và John Barnes để cải thiện hàng công. Liverpool đòi lại ngôi vị số một nước Anh; họ bất bại cho tới tận vòng đấu thứ 29 (thua Everton) và chỉ thua 2 trận trong cả mùa giải. Đội có cơ hội giành cú đúp khi lọt vào Chung kết Cúp FA 1988 với Wimbledon, tuy nhiên bất ngờ để thua 1–0. Rush trở lại Liverpool vào đầu mùa giải 1988–89 do không quen với môi trường nước ngoài. Liverpool gặp khó khăn ngay từ đầu mùa giải và đến tháng 1, họ kém đội dẫn đầu Arsenal 9 điểm; vào tháng 4, hai đội bằng điểm nhau và Arsenal xếp trên nhờ hiệu số bàn thắng thua. Đến lúc này, Liverpool đã lọt vào bán kết Cúp FA gặp Nottingham Forest tại sân vận động Hillsborough vào ngày 15 tháng 4 năm 1989. Sau sáu phút, trận đấu bị hủy bỏ bởi tình trạng quá tải ở phía khán đài Leppings Lane dẫn đến cái chết của 96 người do bị ép chặt vào hàng rào. Chín mươi tư người hâm mộ thiệt mạng trong thảm họa Hillsborough; nạn nhân thứ 95 tử vong trong bệnh viên bốn ngày sau đó, trong khi người thứ 96 mất vào bốn năm sau sau thời gian dài hôn mê. Liverpool chiến thắng 3–1 trong đá lại để lọt vào trận chung kết với Everton. Họ là những người dẫn trước trong phần lớn thời gian trận đấu nhờ bàn thắng của Aldridge. Stuart McCall gỡ hòa ở phút 89 để kéo trận đấu vào hiệp phụ. Rush vào sân thay người và ghi bàn ở phút 95, tuy nhiên McCall một lần nữa lên tiếng ở phút 102 để cân bằng tỉ số. Chỉ hai phút sau Rush ghi bàn ấn định chiến thắng 3–2 cho Liverpool. Liverpool có cơ hội giành cú đúp. Trận đấu cuối cùng ở giải hạng nhất là với đội xếp thứ hai Arsenal, đội đang kém họ ba điểm. Trận đấu đáng lẽ diễn ra vào ngày 23 tháng 4, tuy nhiên do Liverpool vướng thi đấu tại Cúp FA nên phải dời sang ngày 26 tháng 5. Arsenal cần phải thắng trận đấu này với hai bàn cách biệt mới có thể vô địch. Họ vươn lên ở phút 52 nhờ công của tiền đạo Alan Smith. Khi trận đấu bước vào thời gian bù giờ, Michael Thomas nâng tỉ số cho Arsenal lên 2–0. Kết quả này giúp Arsenal giành chức vô địch nhờ hơn về số bàn thắng ghi được. Sau khi mùa giải khép lại, một ủy ban điều tra do Nam tước Taylor lập ra để điều tra nguyên nhân dẫn tới thảm họa Hillsborough. Một bản báo cao mang tên Báo cáo Taylor đăng tải năm 1990 chỉ ra rằng sự yếu kém trong khả năng kiểm soát tình hình của cảnh sát là nguyên nhân chính, đồng thời đề nghị các sân vận động lớn loại bỏ các khán đài đứng và chuyển đổi thành sân vận động lắp ghế ngồi toàn bộ. Liverpool bắt đầu mùa giải 1989-90 với phong độ tốt, trong đó có chiến thắng 9–0 trước đội mới lên hạng Crystal Palace. Có tới tám cầu thủ ghi bàn cho Liverpool trong trận này, con số cao nhất trong lịch sử bóng đá Anh. Họ thua bốn trận trong tháng 10 và tháng 11, tuy nhiên vẫn có chuỗi 11 trận bất bại trước khi để thua 1–0 trước Tottenham Hotspur vào tháng 3. Sau trận này Liverpool mượn cầu thủ Ronny Rosenthal từ Standard Liège. Anh ngay lập tức ghi bảy bàn trong tám trận, trong đó có một hat-trick trước Charlton Athletic để giúp Liverpool mang về danh hiệu thứ 18. Câu lạc bộ lọt vào bán kết Cúp FA nhưng thua 4–3 trước Crystal Palace ở hiệp phụ. 1990–98: Tụt dốc Liverpool khởi đầu mùa 1990–91 với tám trận thắng. Họ giữ vững thành tích bất bại trước khi để thua 3–0 trước Arsenal vào tháng 12, và thua tiếp Crystal Palace vào cuối tháng. Phong độ của câu lạc bộ bắt đầu đi xuống và Arsenal đã vượt lên trên họ vào tháng Giêng. Sau trận hòa 4-4 với Everton trong trận tái đấu tại Cúp FA hồi tháng 2, Dalglish tuyên bố từ chức huấn luyện viên trưởng vì bị quá nhiều áp lực. Huấn luyện viên Ronnie Moran tạm thời lên nắm đội; ông chỉ thắng ba trong mười trận dẫn dắt, và càng lúc càng bị Arsenal bỏ xa về điểm số. Cựu cầu thủ Graeme Souness được đưa về nắm đội bóng vào tháng 4, tuy nhiên không thể đuổi kịp Arsenal, đội bóng vô địch với khoảng cách 7 điểm. Souness cải thiện đội hình trong mùa giải 1991-92, vốn đã không được Dalglish làm mới kể từ khi mua về Barnes và Beardsley. Beardsley, Gary Gillespie và Steve McMahon là những người phải ra đi. Souness mua về Dean Saunders với giá 2,9 triệu bảng, tuy nhiên Liverpool chỉ về thứ sáu. Đây là lần đầu tiên họ nằm ngoài hai vị trí dẫn đầu kể từ năm 1981. Đội bóng lọt vào Chung kết Cúp FA 1992 với Sunderland và thắng với tỉ số 2–0. Đây là mùa giải đầu tiên Liverpool tham dự đấu trường châu Âu kể từ thảm họa Heysel năm 1985; họ được phép quay trở lại muộn hơn một năm so với các đội bóng Anh khác. Liverpool thua tại tứ kết Cúp UEFA trước Genoa của Ý với tổng tỉ số 4–1. The Boot Room, nơi ban huấn luyện Liverpool họp chiến thuật từ thời Bill Shankly bị phá bỏ vào thời gian Souness cầm quân, thay vào đó là phòng họp báo. Anfield được tu sửa lại vào đầu mùa giải 1992–93 dựa trên các đề xuất của báo cáo Taylor. Khán đài Kemlyn Road được xây thêm một tầng khán đài với khu ghế ngồi hạng sang và phòng họp cùng 11.000 chỗ ngồi. Khán đài được đổi tên thành Centenary Stand và khai trương vào ngày 1 tháng 9 năm 1992 với sự hiện diện của chủ tịch UEFA, Lennart Johansson. Vào mùa giải Ngoại hạng Anh đầu tiên, Liverpool tiếp tục cán đích ở vị trí thứ sáu, thua 15 trong tổng số 42 trận. Họ đều bị loại sớm tại Cúp FA, League Cup và Cúp C2. Vào mùa giải 1993-94 Liverpool thắng cả ba trận đầu tiên, nhưng ngay sau đó thua tới bốn trận liền. Điểm sáng của mùa giải là sự nổi lên của tiền đạo trẻ Robbie Fowler. Anh ghi bàn trong trận đầu tiên cho đội bóng gặp Fulham ở lượt đi League Cup, và ghi cả 5 bàn trong thắng lợi 5–0 ở lượt về. Liverpool sau đó để thua Bristol City trong trận đá lại Cúp FA. Souness bị sa thải ngay sau trận đấu và được thay thế bằng Roy Evans. Câu lạc bộ kết thúc mùa bóng ở vị trí thứ tám với 16 trận thua. Liverpool bắt đầu bị các đối thủ bỏ lại trong cuộc đua ngoài sân cỏ. Manchester United kiếm về 93 triệu bảng sau khi họ phát hành cổ phiếu ra công chúng trên thị trường chứng khoán, trong khi Liverpool thu về 22 triệu bảng khi công ty Granada mua lại 9,9% cổ phần câu lạc bộ. Sau khi khán đài Centenary Stand được xây xong, khán đài Spion Kop cũng được sửa sang lại vào đầu mùa 1994–95. Khán đài được lắp ghế toàn bộ, giữ nguyên một khán đài duy nhất với sức chứa giảm còn 12.000. Ở mùa giải trọn vẹn đầu tiên Evans cầm Liverpool, họ cán đích ở hạng tư. Đội vào tới vòng sáu Cúp FA, nơi họ thua 2–1 trước Tottenham Hotspur và lọt vào Chung kết League Cup với Bolton Wanderers. Hai bàn thắng của Steve McManaman giúp Liverpool giành chiến thắng 2–1, qua đó có danh hiệu League Cup thứ năm. Nhiều cựu binh bắt đầu nói lời tạm biệt với đội bóng, trong đó có Grobbelaar, Nicol và Ronnie Whelan. Trước khi mùa bóng 1995-96, Liverpool thể hiện tham vọng thay đổi với bản hợp đồng kỷ lục Stan Collymore với giá 8,5 triệu bảng. Collymore ghi bàn duy nhất trong trận thắng 1–0 trước Sheffield Wednesday trong ngày khai mạc mùa giải. Cuối mùa đó Liverpool xếp hạng ba. Họ lọt vào Chung kết Cúp FA gặp Manchester United; bàn thắng duy nhất ở phút thứ 85 của Eric Cantona đem về chức vô địch cho United. Liverpool bắt đầu mùa giải 1996-97 khá mĩ mãn. Họ dẫn đầu giải Ngoại hạng khi bước sang năm mới với hai điểm nhiều hơn Arsenal. Câu lạc bộ không thể giữ vững phong độ đó trong phần còn lại của mùa giải khi những trận thua trước Coventry City, Manchester United và Wimbledon khiến đội bóng tụt xuống thứ tư. Mặc dù bị loại sớm ở cả League Cup và Cúp FA, Liverpool lọt vào bán kết Cúp C2. Họ để thua 3–0 ở trận lượt đi, và mặc dù rất nỗ lực, họ chỉ có thể thắng 2–0 ở sân nhà và bị loại khỏi Cúp C2 bởi Paris Saint-Germain. Liverpool mất tiền đạo Fowler vào giai đoạn đầu mùa 1997–98 sau khi anh gặp chấn thương dây chằng đầu gối trong một trận đấu giao hữu trước mùa giải. Tuy nhiên đây là thời điểm đánh dấu sự xuất hiện của Michael Owen, người ghi 18 bàn trong 36 trận ra sân mùa giải đó. Paul Ince được mua về để thay thế Barnes, người đã chuyển sang Newcastle United. Liverpool không thể vượt qua đội đầu bảng Arsenal và chấp nhận đứng vị trí thứ ba. Việc sửa sân Anfield được tiếp tục thực hiện khi mùa giải diễn ra với việc bổ sung thêm tầng hai cho khán đài Anfield Road. 1998–2006: Thành công trở lại Liverpool bổ nhiệm Gérard Houllier làm đồng huấn luyện viên trưởng cùng với Evans cho mùa giải 1998-99. Những kết quả tệ hại khiến áp lực đè nặng hai người và thất bại 3–1 trước Tottenham Hotspur ở League Cup là giọt nước tràn ly khiến Evans ra đi. Trận đấu đầu tiên của Houllier trong vai trò huấn luyện viên toàn quyền là thất bại 3–1 trước Leeds United. Phong độ của Liverpool không cải thiện nhiều dưới thời Houllier khi đội bóng bị loại sớm tại Cúp UEFA và Cúp FA, chỉ về thứ bảy ở giải Ngoại hạng và mất suất dự cúp châu Âu mùa sau. Houllier làm mới đội hình trong mùa bóng 1999-2000. Ông đem về các tân binh người nước ngoài như Dietmar Hamann, Sami Hyypiä và Sander Westerveld; David James, Ince và McManaman là những người ra đi. Houllier tiếp tục công cuộc cải cách với bản hợp đồng kỷ lục Emile Heskey trị giá 11 triệu bảng vào tháng 3. Liverpool thất bại trong việc tìm đường trở lại UEFA Champions League khi chỉ cán đích thứ tư. Họ cũng thi đấu không tốt ở Cúp FA và League Cup khi đều bị loại sớm. Vào mùa giải 2000-01 Liverpool giành cú ăn ba danh hiệu độc nhất vô nhị. Danh hiệu đầu tiên là League Cup khi họ thắng Birmingham City 5–4 trong loạt sút luân lưu sau khi hai đội hòa nhau 1-1. Họ tiếp tục vô địch Cúp FA khi Owen ghi hai bàn trong mười phút giúp đội bóng vượt qua Arsenal với tỉ số 2–1. Danh hiệu cuối cùng là Cúp UEFA khi bàn bàn phản lưới nhà trong hiệp phụ của Delfí Geli giúp họ giành chiến thắng 5–4 trước Alavés của Tây Ban Nha. Liverpool về thứ ba tại giải vô địch quốc gia và chính thức trở lại với giải đấu hàng đầu châu Âu UEFA Champions League lần đầu tiên kể từ Thảm họa Heysel. UEFA Champions League mùa giải 2001–02 chứng kiến đội bóng đi tới vòng tứ kết, nơi họ bị Bayer 04 Leverkusen của Đức loại với tổng tỉ số 4–3. Đây là mùa giải tốt nhất của Liverpool trong nhiều năm trở lại đây khi họ về thứ nhì giải Ngoại hạng với bảy điểm kém hơn so với nhà vô địch Arsenal. Mặc dù vậy Liverpool không thể bảo vệ thành công chức vô địch Cúp FA và League Cup khi lần lượt bị loại ở vòng bốn và vòng ba. Vấn đề sức khỏe của Houllier cũng là một nét buồn của mùa giải. Ông lên cơn đau tim trong thời gian nghỉ giữa hiệp trong trận đấu với Leeds tại Anfield. Ông phải trải qua ca mổ dài 11 tiếng đồng hồ để phẫu thuật lại động mạch chủ và chỉ trở lại vào tháng 2. Trợ lý Phil Thompson là người tạm thời cầm quân. Houllier mua về thêm nhiều cầu thủ cho mùa bóng 2002–03, trong đó có Bruno Cheyrou, Salif Diao và El Hadji Diouf. Cheyrou được chọn thay cho Nicolas Anelka, người có màn thể hiện không tồi khi chuyển tới theo dạng cho mượn từ Paris Saint-Germain ở mùa giải trước. Liverpool bất bại trong 12 trận đầu tiên mùa giải và đứng đầu bảng xếp hạng với cách biệt 7 điểm. Thất bại trước Middlesbrough ở trận đấu sau đó khởi đầu chuỗi 12 trận không biết mùi chiến thắng cho tới khi họ vượt qua Southampton 1–0 vào tháng 1. Câu lạc bộ kết thúc mùa giải ở vị trí thứ năm. Mặc dù bị loại sớm ở Cúp FA và UEFA Champions League, Liverpool vẫn vô địch Cúp Liên đoàn khi hạ Manchester United trong trận chung chung kết. Mùa giải 2003-04 bắt đầu khá muộn màng khi Liverpool thua trận đấu tiên của mùa giải với tỉ số 2–1 trước Chelsea. Kết thúc năm 2003 họ thua 6 trong số 18 trận ở giải Ngoại hạng. Trong nửa sau của mùa giải họ chỉ thua thêm có bốn trận và có suất dự UEFA Champions League 2004-05 với vị trí thứ 4. Họ đều bị loại ở Cúp UEFA và League Cup. Ở Cúp FA, họ bị Portsmouth vượt qua với tỉ số 1–0 trong trận đá lại vòng 5. Cuối mùa giải đó Houllier được thay thế bởi Rafael Benítez. Trong mùa giải 2004-05 họ bị đội hạng dưới Burnley loại ngay từ vòng ba Cúp FA. Câu lạc bộ lọt vào chung kết League Cup nhưng thua 3-2 trước Chelsea. Liverpool cũng lọt vào chung kết UEFA Champions League. Họ bị A.C. Milan của Ý dẫn trước 3–0 ngay trước giờ nghỉ, tuy nhiên ba bàn thắng trong vòng 6 phút giúp Liverpool gỡ hòa 3–3. Hiệp phụ không có thêm bàn thắng nào được ghi đồng nghĩa với việc trận đấu bước vào loạt luân lưu, nơi Liverpool thắng 3–2. Việc chỉ đứng thứ 5 ở giải Ngoại hạng khiến đội bóng không thể dự Champions League mùa sau cũng như không thể bảo vệ ngôi vương. UEFA sau đó cho phép họ tham dự, nhưng là từ vòng loại thứ nhất. Tại giải đấu mà họ là đương kim vô địch, Liverpool bị loại bởi đội bóng Bồ Đào Nha Benfica tại vòng loại trực tiếp thứ nhất. Ở mùa bóng 2005-06 họ đứng ở vị trí thứ ba. Họ lọt vào Chung kết Cúp FA 2006 gặp West Ham United. Liverpool thắng 3–1 trong loạt luân lưu 11m sau khi trận đấu kết thúc với tỉ số hòa 3–3. 2006–15: Cơn khát danh hiệu Mùa giải 2006–07 là mùa giải Liverpool được mua lại bởi hai doanh nhân Mỹ, George Gillett và Tom Hicks, theo một hợp đồng định giá câu lạc bộ và khoản nợ mà họ đang gánh ở mức 218,9 triệu bảng. Liverpool một lần nữa đứng thứ ba ở giải Ngoại hạng, tuy nhiên kém tới 21 điểm so với đội vô địch Manchester United. Họ bị Arsenal loại ở cả Cúp Liên đoàn và Cúp FA, nhưng vào tới Chung kết UEFA Champions League 2007 và một lần nữa đối đầu với Milan. Không giống nhữ năm 2005, Liverpool không thể lật ngược thế cờ và thất thủ 2–1. Vào mùa hè Benítez tăng cường sức mạnh đội hình với bản hợp đồng Fernando Torres trị giá 24 triệu bảng, cùng Ryan Babel và Yossi Benayoun. Họ hòa 13 trong số 38 trận và kết thúc ở vị trí thứ tư. Liverpool bị loại tại vòng năm của Cúp FA và League Cup, nhưng vào tới bán kết UEFA Champions League lần thứ ba trong bốn mùa giải, tuy nhiên thua với tổng tỉ số 4–3 trước Chelsea. Torres ghi 33 bàn trên tất cả các mặt trận. Anh là cầu thủ đầu tiên của Liverpool sau Fowler ghi trên 20 bàn một mùa giải vô địch quốc gia, và cân bằng kỷ lục về số trận ghi bàn liên tiếp tại Anfield của Roger Hunt (8 trận). Ở mùa bóng 2008-09 chiến thắng 5–1 trước Newcastle United vào tháng 12 đưa Liverpool lên đầu bảng xếp hạng khi mùa giải đi qua được nửa chặng đường. Họ không thắng một trận nào trong tháng 1 và bất chấp phong độ không tồi trong phần còn lại của mùa giải, họ không thể đuổi kịp Manchester United và đành đứng thứ hai. Họ bị loại ở vòng 4 Cúp FA và League Cup. Tại UEFA Champions League, họ bị Chelsea loại ở tứ kết. Mùa giải 2009-10 vẫn tiếp tục là nỗi thất vọng của Liverpool khi họ không thể cải thiện so với mùa giải trước. Họ đứng thứ bảy ở giải Ngoại hạng, để thua 11 trận, nhiều hơn 9 trận so với mùa trước đó, và bật khỏi top bốn lần đầu kể từ năm 2005. Họ bị loại ở vòng bảng UEFA Champions League và được chuyển xuống tham dự Europa League (tiền thân là Cúp UEFA). Ở Europa League họ lọt vào tới bán kết và để thua Atlético Madrid bởi luật bàn thắng sân khách. Benitez rời câu lạc bộ vào cuối mùa giải và được thay thế bởi Roy Hodgson. Câu lạc bộ được bán lại cho Tập đoàn Thể thao Fenway vào mùa giải 2010-11. Các báo cáo chỉ ra rằng Liverpool có khoản nợ 350 triệu bảng với khoản lỗ 55 triệu bảng, buộc công ty kiểm toán KPMG chấp thuận ý kiến kiểm toán của Liverpool. Ngân hàng Hoàng gia Scotland, chủ nợ của câu lạc bộ, đã đưa chủ sở hữu Gillett và Hicks ra tòa để buộc họ phải bán lại câu lạc bộ. Tòa án ra phán quyết có lợi cho các chủ nợ và câu lạc bộ được bán cho Tập đoàn Thể thao Fenway với giá 300 triệu bảng vào ngày 15 tháng 10 năm 2010. Còn trên sân cỏ Liverpool tiếp tục thể hiện hình ảnh bạc nhược. Thất bại 3–1 trước Blackburn Rovers vào tháng 1 khiến đội bóng tụt xuống vị trí thứ 12 với 9 thất bại kể từ đầu mùa. Hodgson bị sa thải sau trận này và người lên thay là Dalglish. Sau trận thua trong ngày ra mắt trước Manchester United ở Cúp FA, Liverpool kết thúc mùa giải ở vị trí thứ sáu. Dalglish mua nhiều cầu thủ mới để chuẩn bị cho mùa giải 2011–12 trong đó có những cái tên như Charlie Adam, Stewart Downing và Jordan Henderson. Họ cán đích ở vị trí thứ tám, thành tích tệ nhất trong 18 năm qua. Dù vậy họ đều lọt vào chung kết League Cup và Cúp FA. Họ vô địch League Cup lần thứ tám (kỷ lục) sau khi thắng 3–2 trong loạt luân lưu trước Cardiff City sau khi hai đội hòa 2–2 ở thời gian thi đấu chính thức. Liverpool để thua 2-1 trong trận Chung kết Cúp FA 2012 trước Chelsea. Mùa giải còn được nhắc tới bởi vụ phân biệt chủng tộc của Luis Suárez vào tháng 10 đối với Patrice Evra của Manchester United. Anh bị phạt 40.000 bảng và bị cấm thi đấu tám trận. Dalglish bị sa thải vào cuối mùa giải và Brendan Rodgers là người lên thay. Rodgers hứa "sẽ cống hiến cuộc đời mình để chiến đấu cho câu lạc bộ này và bảo vệ các nguyên tắc tuyệt vời của Câu lạc bộ bóng đá Liverpool trong và ngoài sân cỏ." Liverpool đứng thứ 7 trong mùa đầu tiên ông dẫn dắt, tuy nhiên có mùa giải 2013-14 sau đó thành công ngoài mong đợi khi có cơ hội lên ngôi vô địch Premier League. Chuỗi 11 chiến thắng liên tiếp của họ bị chặn đứng bởi trận thua 2–0 trên sân nhà trước Chelsea. Thất bại này khiến Liverpool quyền tự quyết trong cuộc đua vô địch. Mặc dù dẫn trước 3–0 ở trận tiếp theo trên sân của Crystal Palace, Liverpool để thua ba quả trong vòng 15 phút cuối và bị cầm hòa 3-3. Kết quả đã làm sứt mẻ khát vọng danh hiệu của họ. Mặc dù trên lý thuyết Liverpool vẫn còn cơ hội vô địch ở vòng đấu cuối, họ đã bị Manchester City vượt qua. Vào tháng 7, Suárez được bán cho Barcelona với giá 75 triệu bảng. Tới tháng 1 năm 2015 Steven Gerrard đồng ý chuyển tới LA Galaxy vào cuối mùa giải 2014-15, qua đó kết thúc 17 năm ở câu lạc bộ. Rodgers bị sa thải sau chuỗi trận thất vọng đầu mùa bóng 2015-16. 2015–nay: Kỷ nguyên Klopp Sau sự sa thải của Rodgers, vào ngày 8 tháng 10 năm 2015 câu lạc bộ công bố Jürgen Klopp đồng ý với bản hợp đồng dẫn dắt Liverpool với thời hạn ba năm. Tại buổi họp báo, Klopp mong muốn mang về câu lạc bộ nhiều danh hiệu trong vòng bốn năm tới. Sau khi bổ nhiệm Klopp, Liverpool lọt vào hai trận chung kết League Cup và UEFA Europa League. Họ thua với tỉ số 3–1 trong loat luân lưu tại chung kết League Cup sau khi hòa 1-1 với Manchester City, và thua với tỉ số 3-1 trước Sevilla tại chung kết Europa League ở Basel. Ở mùa giải trọn vẹn đầu tiên dưới thời Klopp, họ đứng thứ tư ở giải Ngoại hạng. Họ tiếp tục về thứ tư ở mùa giải kế tiếp, cùng với đó Klopp đưa đội bóng lọt vào Chung kết UEFA Champions League 2018, nơi họ thua 3–1 trước Real Madrid. Klopp đem về nhiều cầu thủ chất lượng ở mùa giải này, trong đó có trung vệ Virgil van Dijk ở kỳ chuyển nhượng mùa đông, với giá 75 triệu bảng, con số kỷ lục đối với một hậu vệ. và bán Philippe Coutinho cho FC Barcelona với mức giá 160 triệu Euro. Vào mùa hè họ đem về các tiền vệ Naby Keïta và Fabinho, tiền đạo Xherdan Shaqiri, và thủ môn Alisson. Liverpool khởi đầu mùa bóng 2018-19 với màn chạy đà hoàn hảo ở Giải Ngoại hạng với sáu trận đầu mùa toàn thắng. Chiến thắng 4–0 trước Newcastle United vào ngày Lễ Tặng quà giúp Liverpool nới rộng cách biệt giữa họ và phần còn lại lên thành sáu điểm khi mùa giải trôi qua một nửa chặng đường. Họ cũng là đội thứ tư tại Premier League đạt thành tích bất bại ở giai đoạn lượt đi. Họ cũng cân bằng kỷ lục về số bàn thua ít nhất sau lượt đi, với chỉ 7 bàn và giữ sạch lưới trong 12/19 trận. Liverpool kết thúc mùa giải với vị trí á quân với chỉ một trận thua trước Manchester City trong cả mùa giải. Họ thắng cả 9 trận cuối cùng của mùa giải, đem về 97 điểm. Đây là điểm số cao thứ ba trong lịch sử giải vô địch quốc gia Anh và là điểm số cao nhất của một đội bóng không vô địch, đồng thời giữ thành tích bất bại trên sân nhà; 30 trận thắng trong mùa giải cân bằng kỷ lục về số trận thắng trong một mùa giải. Liverpool có năm thứ hai liên tiếp lọt vào chung kết Champions League và giành thắng lợi với tỉ số 2–0 trước Tottenham Hotspur, mang về chức vô địch Champions League thứ sáu và chấm dứt 7 năm không danh hiệu. Liverpool sau đó tiếp tục vô địch Siêu cúp châu Âu 2019 sau loạt luân lưu với Chelsea. Đây là siêu cúp châu Âu thứ tư của họ, thành tích chỉ xếp sau Barcelona và Milan (5 lần mỗi đội). Tiếp đó đội đạt danh hiệu FIFA Club World Cup trước đại diện đến từ Brazil Flamengo để kết thúc một năm 2019 đầy rực rỡ. Jürgen Klopp sau đó ký gia hạn hợp đồng đến hè 2024. Tại giải Ngoại hạng anh, Liverpool vô địch sớm 7 vòng đấu, họ kết thúc mùa bóng với 99 điểm, đây là danh hiệu quốc gia đầu tiên sau 30 năm. Rạng sáng ngày 5 tháng 10 năm 2020, ở vòng 5, Liverpool đã nhận cú sốc lớn khi để thua 2-7 trước Aston Villa. Cùng với chấn thương của các trụ cột, Liverpool thi đấu sa sút và chỉ kết thúc mùa giải 2020-21 ở vị trí thứ 3. Sang mùa giải 2021-22, Liverpool đã 2 lần đánh bại Chelsea ở chung kết Carabao Cup, và FA Cup đều ở loạt luân lưu. Tuy nhiên, đội về nhì tại giải quốc nội với 92 điểm, đứng sau Manchester City với 1 điểm ít hơn, và nhận thất bại 0-1 tại chung kết Champions League trước Real Madrid. Chú thích Tham khảo Lịch sử (1985-nay) Lịch sử câu lạc bộ bóng đá Anh
20,770
https://stackoverflow.com/questions/10248435
StackExchange
Open Web
CC-By-SA
2,012
Stack Exchange
Gage Christensen, KALAtchalla, Shehzad Hussain, https://stackoverflow.com/users/23513858, https://stackoverflow.com/users/23513859, https://stackoverflow.com/users/23513860, https://stackoverflow.com/users/23513934, user23513858
English
Spoken
111
235
KVO on outside class not working I have a MainViewController with NSString property currentTag. So I do: [self addObserver:self forKeyPath:@"currentTag" options:NSKeyValueObservingOptionNew context:nil]; and this works fine, and the changes do get handled properly. However, I have another class SecondViewController, and I also want it to observe MainViewController's currentTag, so in the SecondViewController's viewDidLoad method, I do: [self addObserver:self.mainViewController forKeyPath:@"currentTag" options:NSKeyValueObservingOptionNew context:nil]; However, this one doesn't get handled for some reason. It never gets called. I want to make sure my syntax and form is correct before looking elsewhere in my code for the problem. Does this code seem ok? You're doing it wrong, you should do: [self.mainViewController addObserver:self forKeyPath:@"currentTag" options:NSKeyValueObservingOptionNew context:nil];
7,369
https://ceb.wikipedia.org/wiki/W%C4%81d%C4%AB%20al%20Far%C4%AB%E1%B8%A9
Wikipedia
Open Web
CC-By-SA
2,023
Wādī al Farīḩ
https://ceb.wikipedia.org/w/index.php?title=Wādī al Farīḩ&action=history
Cebuano
Spoken
83
153
Wadi ang Wādī al Farīḩ sa Yemen. Nahimutang ni sa lalawigan sa Muḩāfaz̧at al Jawf, sa kasadpang bahin sa nasod, km sa amihanan sa Sanaa ang ulohan sa nasod. Ang klima init nga kamadan. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hunyo, sa  °C, ug ang kinabugnawan Enero, sa  °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Agosto, sa milimetro nga ulan, ug ang kinaugahan Pebrero, sa milimetro. Ang mga gi basihan niini Mga suba sa Muḩāfaz̧at al Jawf
43,440
https://ru.stackoverflow.com/questions/419306
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Shamov, https://ru.stackoverflow.com/users/14618, https://ru.stackoverflow.com/users/179402, https://ru.stackoverflow.com/users/180139, https://ru.stackoverflow.com/users/8566, sys_dev, Вадим Вова, Владимир Мартьянов
Russian
Spoken
216
553
Замена значений в списке python Нужна помощь! Нужно сделать функцию, которая бы в листе winner = [ [1, 2, 3], [1, 4, 7], [4, 5, 6], [7, 8, 9], [2, 5, 8], [3, 6, 9], [1, 5, 9], [3, 5, 7] ] def replace(list, number): for i in winner[[]]: i = "X" заменяла каждую одинаковую цифру целом списке на нужное мне значение. Добавил кусок кода (игра крестики нолики) Покажите ваш код, покажите где и как он работает неправильно. Одинаковость - это не свойство какой-то отдельно взятой цифры. При таком критерии замены работать нужно сразу с группой цифр. а как например заменить все единицы допустим на значение "X"? Вас уже просили привести кусок кода. Настоятельно рекомендую выполнить эту рекомендацию. Если конечно хотите получить качественный ответ Вот так: map(lambda y: ['X' if x == 1 else x for x in y], winner) def replace(lst, number): for row in lst: for i, val in enumerate(row): if val == number: row[i] = 'X' return lst winner = [ [1, 2, 3], [1, 4, 7], [4, 5, 6], [7, 8, 9], [2, 5, 8], [3, 6, 9], [1, 5, 9], [3, 5, 7] ] print(replace(winner, 1)) >>> [['X', 2, 3], ['X', 4, 7], [4, 5, 6], [7, 8, 9], [2, 5, 8], [3, 6, 9], ['X', 5, 9], [3, 5, 7]]
30,346
https://hu.wikipedia.org/wiki/Az%20AFC%20Ajax%202015%E2%80%932016-os%20szezonja
Wikipedia
Open Web
CC-By-SA
2,023
Az AFC Ajax 2015–2016-os szezonja
https://hu.wikipedia.org/w/index.php?title=Az AFC Ajax 2015–2016-os szezonja&action=history
Hungarian
Spoken
1,481
4,154
A 2015-2016-os szezon az AFC Ajax 60. szezonja volt az Eredivisie-ben, a holland labdarúgás legmagasabb osztályában. Az amszterdami csapat még mindig az elejétől kezdve jelen van az első osztályban. Idén a csapat - tétmérkőzéseit magába foglaló - szezonja július végén a Bajnokok Ligája selejtezőjével kezdődött és május elején ért véget a bajnokság utolsó fordulójával. Ahogy eddig is, most is voltak barátságos mérkőzések a szezon kezdete előtt és télen. A bajnokságban elejétől kezdve a végéig az egyik legnagyobb esélyese volt a végső győzelemre. A legnagyobb részben az Ajax állt az első helyen. Végül viszont ezen szezont is a második helyen zárták, mivel elbukták az utolsó fordulót. Története során már a 19. ezüstérmet szerezte meg az Eredivisie-ben. A kupában sem diadalmaskodtak de még a tavalyi eredményt - nyolcaddöntőt - sem érték el, mivel már a harmadik fordulóban kiestek. Nem vettek részt a Bajnokok Ligájában sem, mivel már a selejtezőben kiestek. Végül az Európa Liga csoportkörében képviselték hazájukat de onnan sem jutottak tovább, pedig csupán egy vereséget szenvedtek. Ebben a szezonban tehát semmiben nem ért el sikert a csapat. Legjobb támadójuk idén is a lengyel Arkadiusz Milik volt. A szokásokat megtartva a szezon előtti nyáron is voltak eligazoló és érkező játékosok. Az edzői poszton maradt a holland Frank de Boer, viszont a szezon végén felmondott. A mérkőzéseknél látható színek a következőket jelölik: Piros szín: győzelem Sárga szín: döntetlen Zöld szín: vereség Csapat Csapatmezek Gyártó: Adidas / Mezszponzor: Ziggo Játékoskeret Íme az Ajax idei játékoskerete. Ezen a listán a csapat minden játékosa szerepel akik legalább 1 tétmérkőzésen pályára léptek. Akik csupán a barátságos mérkőzéseken jutottak szerephez, ők nem szerepelnek a listán. Ilyenek leginkább azok akik már a szezon első tétmérkőzése előtt eligazoltak, vagy azok a fiatalok akik a szezon közben még a fiatalcsapatokban játszottak. A játékosok nevei után a szezonban lejátszott tétmérkőzések és a szerzett gólok számai szerepelnek. MEGJEGYZÉS: A Szuperkupa oszlop ki van húzva minden játékosnál mert az Ajax nem játszott a 2015-ös döntőben. Vezetők Érkező és távozó játékosok Érkezők Összesen 5 játékost igazolt le az Ajax, két védőt, két középpályást és egy támadót. Köztük van John Heitinga aki hét év után tért vissza ismét Amszterdamba és így ez lett a 8. szezonja az Ajax-ban. Az újak között még Mitchell Dijks is szerepel aki az előző nyáron igazolt el végleg az Ajaxtól a Willem Tilburgba. Ott nagyon jól játszott és ezért ismét felkeltette nevelőklubja figyelmét akik vissza is hozták. A középpályát pedig az előző szezon egyik legjobb középpályásával, a szerb Nemanja Gudelj-el erősítették meg. A kölcsönbe érkezett Yaya Sanogo csak az őszi szezonban volt a csapat tagja, mivel január végén visszament eredeti klubjához. Távozók Íme a csapat azon játékosai akik már szerepeltek az elsőcsapatban de a nyáron más csapathoz igazoltak, és a fiatal játékosok akiket kölcsönadtak más csapatnak. A kölcsönbe ment játékosok közül mindenki a szezon végéig marad a másik csapatban, kivéve Frenkie de Jong-ot és Richairo Živković-ot akiket szezon közben visszahoztak az Ajax-hoz. Felkészülési mérkőzések Nyári felkészülés Téli felkészülés Tétmérkőzések Íme az Ajax idei tétmérkőzéseinek listája Eredivisie A 2015/2016-os Eredivisie első 8 helyezettje Bajnoki statisztika Holland Kupa 2. forduló 3. forduló Bajnokok Ligája 3. selejtezőkör Európa Liga Rájátszás Csoportmérkőzések Az A-csoport végeredménye Sajátnevelések első tétmérkőzése a felnőttcsapatban A táblázatban azon fiatal játékosok szerepelnek akik az előző 3 évben az Ajax-akadémiáján képezték magukat és közben a fiatalcsapatokat (Ajax A1 vagy Jong Ajax) erősítették. Ebben a szezonban pedig bemutatkoztak a felnőttcsapatban már tétmérkőzésen is. Díjazottak Csapaton belül Csapaton belül is kiosztották a díjakat, amiket már régóta kapnak a legjobb játékosok. Ebben a szezonban is a kapus Jasper Cillessen lett az Év játékosa, ahogy tavaly is. Így ő lett a csapat második olyan játékosa aki kétszer egymás után megkapta ezt a díjat. Rinus Michels - díj (Év Játékosa): Jasper Cillessen Marco van Basten - díj (Év Tehetsége): Riechedly Bazoer Sjaak Swart - díj (Jövő Tehetsége): Mathijs de Ligt Bajnokságban Ebben a szezonban egy Ajax-játékos érdemelte ki a bajnokság díját, amit a legjobbnak adnak. Ez a játékos a csapatkapitány - Davy Klaassen - lett. A szezon legjobb játékosa: Davy Klaassen Mérkőzés statisztika Minden mérkőzés a rendes játékidőben elért eredmények alapján van besorolva, de a hosszabbításban lőtt gólok is be vannak írva. Ebben a szezonban nem volt olyan mérkőzése az Ajax-nak amely hosszabbítás után dőlt volna el. Csapat statisztika Íme néhány érdekes statisztikai adat, amelyek a szezonban lejátszott 46 tétmérkőzés alatt jöttek össze. ÁLTALÁNOS KAPOTT GÓLOK NÉLKÜLI MÉRKŐZÉSEK SZÁMA: 23 LEGNAGYOBB ARÁNYÚ GYŐZELEM: 6:0 Ajax-Roda Kerkrade (bajnokság) LEGNAGYOBB ARÁNYÚ VERESÉG: mind az 5 vereség 1 gólos volt SOROZATOK LEGHOSSZABB VERETLEN SOROZAT: 18 mérkőzés (2015. december 20. - 2016. május 8.) LEGHOSSZABB GYŐZELMI SOROZAT: 5 mérkőzés (2016. február 7. - március 6.) LEGHOSSZABB NYERETLEN SOROZAT: 2 mérkőzés LEGHOSSZABB KAPOTT GÓL NÉLKÜLI SOROZAT: 6 mérkőzés (2015. augusztus 9. - augusztus 30.) LEGHOSSZABB GÓLSZERZŐ SOROZAT: 9 mérkőzés (2015. augusztus 30. - október 17.) LEGHOSSZABB RÚGOTT GÓL NÉLKÜLI SOROZAT: 1 mérkőzés (6 alkalommal) LEGTÖBB / LEGKEVESEBB LEGTÖBB GÓL EGY MÉRKŐZÉSEN: 5:2 Ajax-Heerenveen (bajnokság) LEGTÖBB LŐTT GÓL EGY MÉRKŐZÉSEN: 6:0 Ajax-Roda Kerkrade (bajnokság) LEGTÖBB LAP EGY MÉRKŐZÉSEN: 5 Feyenoord-Ajax (bajnokság) LEGTÖBB NÉZŐ HAZAI BAJNOKI MÉRKŐZÉSEN: 51.875 Ajax-Feyenoord LEGTÖBB NÉZŐ HAZAI TÉTMÉRKŐZÉSEN: 53.000 Ajax-Rapid Wien (BL-selejtező) LEGKEVESEBB NÉZŐ HAZAI BAJNOKI MÉRKŐZÉSEN: 43.578 Ajax-ADO Den Haag LEGKEVESEBB NÉZŐ HAZAI TÉTMÉRKŐZÉSEN: 34.738 Ajax-De Graafschap (kupa) Játékos statisztikák Góllövőlista Akárcsak a tavalyi szezonban, úgy ebben is a csapat lengyel csatára, Arkadiusz Milik lett a csapaton belüli gólkirály. A 2009-2010-es szezon óta ő lett az első Ajax-játékos, aki a bajnokságban elérte a 20 gólt. A bajnokságban és az összes tétmérkőzésen is ő lőtte a legtöbb gólt a csapaton belül. Kanadai ponttáblázat Íme az Ajax játékosainak elért teljesítménye a kanadai ponttáblázat alapján. Ezen táblázatban azokat a játékosokat (jelenlegi vagy volt játékosokat) lehet látni, akik legalább egy pontot szereztek tétmérkőzésen. Ebben a szezonban is a csapat legjobb támadójának a lengyel középcsatár, Arkadiusz Milik bizonyult az általa elért 35 ponttal. A rangsor a pontszám alapján állt össze. Azonos pontszám alapján az van előnyben aki a legtöbb gólt szerezte. Lapok * MEGJEGYZÉS: A játékos aki egy mérkőzésen 2 sárga lap után kap pirosat, annak be van írva mind a három lap a táblázatba. Egy tétmérkőzésen legtöbb gólt szerző játékosok Az idei szezonban egy játékos sem tudott 2-nél több gólt lőni egy tétmérkőzésen. Idei büntetők A következő táblázat a csapat idei büntetőit mutatja meg, amiket tétmérkőzéseken lőttek. A büntetők sorrendje a dátum szerint van megadva. Érdekességek és jubileumok 1978 óta most került be először német játékos az Ajax felnőttcsapatának a keretébe. Ez a játékos a nyáron igazolt Amin Younes volt. Bár voltak azóta is fiatal német játékosok az Ajax fiatalcsapataiban de egyikük sem jutott el a felnőttcsapatig. Younes szeptember 17-én, a Celtic Glasgow elleni EL-csoportkörben lépett először pályára. Ebben a szezonban Davy Klaassen lett az Ajax csapatkapitánya és tétmérkőzésen először július 28-án - 22 évesen és 156 naposan - viselte a karszalagot. Így 2004 óta ő lett a csapat legfiatalabb kapitánya. A csapat augusztus 4-én pályára lépett a BL-selejtező visszavágóján az osztrák Rapid Wien ellen. Ezen a mérkőzésen minden idők eddigi legfiatalabb kezdőcsapatával léptek pályára tétmérkőzésen. A csapat átlagéletkora 21 év 140 nap volt. Az Ajax edzője, Frank de Boer csatlakozott elődjéhez Louis van Gaal-hoz. Az Ajax edzői közül eddig csak neki sikerült kapott gól nélkül megnyerni a bajnokság első négy fordulóját (az 1995/96-os szezonban), ebben a szezonban ugyanez De Boer-nak is sikerült. A csapat öt játékosa belépett az Ajax "századosai" közé. Négyen - Jasper Cillessen, Davy Klaassen, Joël Veltman és Viktor Fischer - azon játékosok közé akik már legalább 100 tétmérkőzésen pályára léptek a csapatban, egyikük - Lasse Schøne - pedig azok közé akik már legalább 100 Eredivisie-bajnoki mérkőzésen pályára léptek. A kapus Cillessen-nek ez augusztus 27-én az EL-rájátszás visszavágóján sikerült, Klaassen szeptember 17-én az EL-csoportkör 1. fordulójában csatlakozott, Schöne és Veltman pedig november 21-én az Eredivisie 13. fordulójában érte el a 100-as határt. Ebben a szezonban összesen 4 Ajax-játékos debütált a Holland válogatott felnőttcsapatában. Szeptember 7-én a Törökország elleni EB-selejtezőn lépett pályára először a 19 éves védő, Jairo Riedewald, október 10-én a Kazahsztán elleni EB-selejtezőn a két 20 éves játékos, Anwar El Ghazi és Kenny Tete debütáltak. Végül november 12-én egy barátságos mérkőzésen Wales ellen a 19 éves Riechedly Bazoer is debütált a válogatottban. Október 1-én az EL-csoportkörben a norvég Molde FK ellen játszotta az Ajax története 350. európai kupamérkőzését. A február 7-én lejátszott Feyenoord elleni rangadón gólt szerző Amin Younes volt 1975. november 1-je óta az első német állampolgárságú játékos aki gólt lőtt a De Klassieker-en. A csapat dán középpályása, Lasse Schøne február 21-én, a bajnokság 24. fordulójában lépett pályára 150. alkalommal az Ajaxban tétmérkőzésen. A 29. fordulóban lejátszott AFC Ajax - PEC Zwolle mérkőzés előtt búcsúztatták el a 2016. március 24-én - 68 éves korában - elhunyt Johan Cruyff-ot, a csapat történetének eddigi leghíresebb játékosát. A 10. fordulóban játszotta le az Ajax a 2000. mérkőzését az Eredivisie-ben. A 33. fordulóban, az Twente Enschede elleni győzelemmel az Ajax megszerezte az Eredivisie-ben a 3 500. pontját. Ők az elsők akik idáig eljutottak Hollandiában. Források Az AFC Ajax szezonjai Labdarúgócsapatok 2015–2016-os szezonja
19,919
https://drupal.stackexchange.com/questions/127021
StackExchange
Open Web
CC-By-SA
2,014
Stack Exchange
https://drupal.stackexchange.com/users/4958, user1015214
English
Spoken
164
241
How to delete a cck field base in Drupal 6 I have programatically created some cck fields with this function: content_field_instance_create($field) and I tried to delete them with this: content_field_instance_delete($field_name, 'product', FALSE) However, this didn't actually delete the cck field from the Product types database table. The fields didn't show up on the UI edit page but they still exist in the database, which is causing me some issues. How can I systematically make sure the database entry is wipes as well? I believe deleting the fields programmatically like this flags the fields as deleted by CCK or the Field API in Drupal 6/7. You must then run Cron to have the system fully purge the database tables from the system. I just ran cron manually and inspected the table, and there was no change. Not sure if this makes a difference, but as these fields are not reused, instead of new tables in the database, they are extra columns in the content_type_product table.
1,308
https://stackoverflow.com/questions/14725622
StackExchange
Open Web
CC-By-SA
2,013
Stack Exchange
Andrew, DevSolar, TemplateRex, https://stackoverflow.com/users/1014874, https://stackoverflow.com/users/1413395, https://stackoverflow.com/users/186997, https://stackoverflow.com/users/60281, https://stackoverflow.com/users/819272, utnapistim, πάντα ῥεῖ
English
Spoken
1,124
1,770
Namespaces and packaging in C++ What is the best/cleanest way to use namespaces in packaged code? E.g. in libraries like boost there seem to be very organized namespaces management, some techniques are used that allow to disambiguate names. The important thing, however, is that one won't see much code like typedef namespace1::namespace2::sth_else::a_class<namespace3::namespace4::b_class> type; usually, there's not much cross-namespacing, which indicates good architecture but also a good namespace management. The question is: what IS the good namespace management? Say we have file structure like this: component1/... (depends on reusable_if) component2/... (depends directly on reusable_if and on component 1) reusable/ reusable/some_part/ reusable/some_part/... reusable/some_other_part/ reusable/some_other_part/... reusable/SthThatUsesBothReusableParts.h (implements reusable_if/ISth.h) reusable/SthThatUsesBothReusableParts.cpp (implements reusable_if/ISth.h) reusable_if/ reusable_if/ISth.h (pure abstract class) reusable_if/ISthElse.h (pure abstract class) main.cpp (e.g. instantiates SthThatUsesBothReusableParts and passes to component1/2) The reason why there is reusable_if/ folder is because both component1 and component2 want to reuse the same interfaces (hence none of them 'owns' the interfaces exclusively). Also, the assumption is that the project is indeed very big and needs proper namespaces for classes in each of the folders. How would you apply namespaces in such a project? Say I declare all classes in reusable/ in namespace ::reusable. Should I put interfaces from reusable_if into namespace ::reusable or into ::reusable_if? Or maybe into none since it is used by component1 and component2? What about namespaces in component1 and component2? Anything to remember? What about keyword using? Let's say that I decide to add this ::reusable_if namespace. Can I put using reusable_if into header files in component1 and component2, provided that using ... is placed inside namespace ::component1 and ::component2? I am open to any suggestions, also those not necessarily related to the above example. In general keep namespace hierarchies as flat as possible. @g-makulik but not any flatter than necessary to avoid name clashes Here's what I use for my projects. My main rule is that each directory is a namespace and each file is a class, with very few exceptions (sometimes I group helper functions in subdirectories of a namespace detail, but without another nested namespace). Keep your entire project inside a single top-level namespace named after your project. Keep each utility component inside the top-level namespace, but in a separate directory. This is the only time I don't let my namespaces overlap with my directory tree. Keep each independently releasable component within your project inside a nested namespace named after your component. For convenience, provide a single header named after your component and containing your entire component interface either in the directory corresponding to your namespace or directly at the top-level directory of your project. Keep the implementation of each component inside a nested namespace detail. Contrary to classes, namespace do not have language support for private members, but the convention in Boost is that namespace detail should not directly be called by user-code. No further nesting than project::component::detail::function() or project:::component::class.member() is required. If you provide complete interfaces that facilitate ADL, you can reuse your component functions inside your project as function(x) for a variable x of type project::component::class without worrying about name clashes. Note that in Uncle Bob's language: "the unit of reuse is the unit of release". Each component should provide a bunch of coherent and mutually dependent classes and functions. In particular, it should provide a complete interface for that component. The C++ language will support this through argument-dependent-lookup (ADL). See this old column "Namespaces and the Interface Principle" by Herb Sutter. The presence of reuse_if and the presence of both component and reusable might be a code smell, unless the considerations that you mentioned in the comments actually apply. A component should be the unit of release. If you could independently reuse a piece of code, make it a separate component. If the code depends on another piece, release it together with that other code. See Sutter's column for these dependency relations. Very useful answer, it aims exactly at what I wanted to know. However, regarding your remark about reusable_if: I don't agree - I cannot release "reusable" nor its interfaces together with component1 because component2 wants to use it as well. I did exactly what you suggested - I identified a reused (between component1 and component2) piece of code (the interfaces that reusable implements) and made it a separate component (reusable_if). @Andrew Then it's probably not a smell, but it's good to make those dependency considerations explicit in your documentation! In this case - would you put interfaces in reusable_if into any namespace or none (also having ADL in mind)? @Andrew probably in a single namespace but in different headers so that clients can only include what they actually depend on. See also this old column by Scott Meyers. Personal opinion disclaimer. Your question basically asks for subjective answers, and will probably be closed for it, but I'll give it a shot. Namespaces are primarily useful to avoid identifier clashes. There is "your" namespace (mylib::), and the namespaces of everybody else (std::, boost::, icu::, ...), and that is about as far as namespaces should be taken. There is little benefit to be had by subdividing your project (as in, "your team's project") into sub-namespaces, unless you get a problem with identifier clashes -- in which case you should reconsider your strategy of calling your classes X and Y. ;-) Things are a bit different in huge libs, like Boost. They effectively consist of many different projects, maintained by seperate teams, so there's a problem of project-specific identifiers clashing with each other if they were all lumped into boost:: (and the clash possibly not showing up in casual testing). If you stop looking at boost::filesystem as a "sub-namespace", and instead look at boost:: as an "identity wrapper" for the individual projects filesystem::, thread::, program_options:: and whatnot, so that they look more "Boost-ish", the picture becomes clearer. Good points. I sometimes use namespaces to remove a part of a name. That is, instead of having a typedef xyz::abcde_callback_type I usually write my code to have xyz::callback::abcde_type. Do you consider that a bad practice? @utnapistim: Hm... difficult question without having the context. The name might be used without the namespace alongside it (using namespace xyz::callback;). Would it still be expressive then? I readily accept longer typenames if it gives me crucial type information where it might needed, i.e. at the point of use (as opposed to "hidden somewhere else in the source"). Due to this, I consider typedef to be bad practice, with the sole exceptions of portability type wrapping and function pointers. I think it would be (~expressive when using namespace xyz::callback). Consider the similar case in the lambda implementation of std library: you have _1, _2, ... _?? for unbound parameters binding and you can write using namespace std::placeholders; without loosing (much) readability.
33,272
https://lmo.wikipedia.org/wiki/Mergozz%20%28vent%29
Wikipedia
Open Web
CC-By-SA
2,023
Mergozz (vent)
https://lmo.wikipedia.org/w/index.php?title=Mergozz (vent)&action=history
Lombard
Spoken
106
221
El Mergozz (localment: [mar'gøts]) a l'è on vent del Lagh Magior. El nass arent al Sempion, el traversa tutta l'Ossola e 'l riva arent al Lagh de Mergozz (che ghe da el nomm). De lì el boffa in sul Verban, de l'Isola Mader fina a Scerr (frazzion de Laven-Mombell). L'è consideraa vun di vent pussee pericolos del Lagh Magior, e l'è bon de fà nass di ond quasi marinn. L'è bon de rivà a 100 chilometer a l'ora. A bon cunt, el boffa al massim per ona desena de menutt. Varda anca Lagh de Mergozz Lagh Magior Mergozzin Ligamm de foeura centrovela.com Vent del Lagh Magior
40,222
https://en.wikipedia.org/wiki/Coin-l%C3%A8s-Cuvry
Wikipedia
Open Web
CC-By-SA
2,023
Coin-lès-Cuvry
https://en.wikipedia.org/w/index.php?title=Coin-lès-Cuvry&action=history
English
Spoken
31
65
Coin-lès-Cuvry (, literally Corner near Cuvry; ) is a commune in the Moselle department in Grand Est in north-eastern France. See also Communes of the Moselle department References External links Coinlescuvry
32,719
https://stackoverflow.com/questions/24322473
StackExchange
Open Web
CC-By-SA
2,014
Stack Exchange
JD Vangsness, MackieeE, https://stackoverflow.com/users/2387756, https://stackoverflow.com/users/292735
English
Spoken
643
1,883
PHPExcel - iterate through rows - if image then save image file So i have an import that loops though an excel file and gets the rows and adds them to the database. Now what i am trying to do is find if there is an image in the last comlumn of that row. Not all rows will have an image, it isnt required. I have tried using the solution stated here Retrieving image in PHPExcel But that gets all of the images. This is not good if not every row has an image. i wont know which image belongs to which row. Any help would be greatly appreciatted Although MarkBarker does mention within the link, the images are overlaid on cells rather than in the cells - especially as they could start at one row, and irregularly finish at another; he also relates the answer to another question better here: PHPexcel: Image extraction the linked answer though does state you can get the coordinates $drawing->getCoordinates(); of the image if that would help in some way of filtering your images Thank you for pointing that out. i will see if i can use that to cross reference and then grab the image based on cell. yay! Awesome! :) If you managed to solve it, answer your own question with some example code and mark as accept for people in the future! I was able to get this working with the following script. if ($_FILES['file_source']['tmp_name']) { // Get our import file extension ${'Extension'} = strtolower(array_pop(explode('.', $_FILES['file_source']['name']))); // Store our content array ${'Accounts'} = array(); if (${'Extension'} == 'xls' || ${'Extension'} == 'xlsx') { // Create a new Excel instance if (${'Extension'} == 'xlsx') { $objReader = PHPExcel_IOFactory::createReader('Excel2007'); } else { $objReader = PHPExcel_IOFactory::createReader('Excel5'); } $objReader->setReadDataOnly(false); $objPHPExcel = $objReader->load($_FILES['file_source']['tmp_name']); $objWorksheet = $objPHPExcel->getActiveSheet(); // Check for the columns and column titles if($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, 1)->getValue() != 'Post Title' || $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, 1)->getValue() != 'Content' || $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(2, 1)->getValue() != 'Link' || $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, 1)->getValue() != 'Link Title' || $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(4, 1)->getValue() != 'Link Description' || $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(5, 1)->getValue() != 'Image'){ echo json_encode(array('response'=>'fail', 'reason'=>'column_error')); exit; } // Get the total number of rows in the spreadsheet $rows = $objWorksheet->getHighestRow(); // Check that each row contains all the required data $row_errors = 0; $row = 1; // skip the first row if it has our column names for (((($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue()) == 'Post Title') ? $row = 2 : $row = 1); $row <= $rows; ++$row) { // Sanitize all our & add them to the accounts array if($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue() == '') { $row_errors++; } if($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, $row)->getValue() == '') { $row_errors++; } } if($row_errors>0){ echo json_encode(array('response'=>'fail', 'reason'=>'required_data')); exit; } // Loop through all the rows (line items) $row = 1; ${'Iterator'} = 0; // skip the first row if it has our column names for (((($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue()) == 'Post Title') ? $row = 2 : $row = 1); $row <= $rows; ++$row) { // Sanitize all our & add them to the accounts array ${'Accounts'}[${'Iterator'}] = array('Post Title' => inputCleanSQL($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue()), 'Content' => inputCleanSQL($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, $row)->getValue()), 'Link' => inputCleanSQL($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(2, $row)->getValue()), 'Link Title' => inputCleanSQL($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, $row)->getValue()), 'Link Description' => inputCleanSQL($objPHPExcel->getActiveSheet()->getCellByColumnAndRow(4, $row)->getValue()) ); // Check if there is a corresponding image with this row foreach ($objPHPExcel->getActiveSheet()->getDrawingCollection() as $drawing) { if ($drawing instanceof PHPExcel_Worksheet_MemoryDrawing) { $cellID = $drawing->getCoordinates(); if($cellID == PHPExcel_Cell::stringFromColumnIndex(5).$row){ ob_start(); call_user_func( $drawing->getRenderingFunction(), $drawing->getImageResource() ); $imageContents = ob_get_contents(); ob_end_clean(); $filetype = $drawing->getMimeType(); $filename = md5(microtime()); switch ($filetype) { case 'image/gif': $image = imagecreatefromstring($imageContents); imagegif($image, "/var/www/social/uploads/i/$filename.gif", 100); $new_file = "$filename.gif"; break; case 'image/jpeg': $image = imagecreatefromstring($imageContents); imagejpeg($image, "/var/www/social/uploads/i/$filename.jpeg", 100); $new_file = "$filename.jpeg"; break; case 'image/png': $image = imagecreatefromstring($imageContents); imagepng($image, "/var/www/social/uploads/i/$filename.png", 100); $new_file = "$filename.png"; break; default: continue 2; } // Add our image location to the array ${'Accounts'}[${'Iterator'}]['image'] = array('link'=>'http://IMAGECDN/'.$new_file, 'type'=>$filetype, 'name'=>$new_file, 'size'=>filesize('/'.$new_file)); } } } // increase our interator ${'Iterator'}++; } // if not proper file type throw an error } else { echo json_encode(array('response'=>'fail', 'reason'=>'invalid_type')); exit; } }
31,579
https://stackoverflow.com/questions/75263395
StackExchange
Open Web
CC-By-SA
2,023
Stack Exchange
Corralien, Lucas Brecht Fernandes, https://stackoverflow.com/users/15239951, https://stackoverflow.com/users/17061127
English
Spoken
304
909
Filter Pandas dataframe with user input I'm trying to develop this code where I would have certain inputs for different variables, these would make the filter happen and return the filtered dataframe, this input will always only receive a single value that the user will choose amoung fewer options and if the input is empty, that filter must bring all the data. I didn't put the user input because I was testing the function first, however, the function always returns an empty dataframe and I can't find out why. Here is the code I was developing: I didn't put the dataframe because it comes from an excel, but if necessary I'll put together a sample that fits df = pd.DataFrame({"FarolAging":["Vermelho","Verde","Amarelo"],"Dias Pendentes":["20 dias","40 dias","60 dias"],"Produto":["Prod1","Prod1","Prod2"], "Officer":["Alexandre Denardi","Alexandre Denardi","Lucas Fernandes"],"Analista":["Guilherme De Oliveira Moura","Leonardo Silva","Julio Cesar"], "Coord":["Anna Claudia","Bruno","Bruno"]}) FarolAging1 = ['Vermelho'] DiasPendentes = [] Produto = [] Officer = [] def func(FarolAging1,DiasPendentes,Produto,Officer): if len(Officer) <1: Officer = df['Officer'].unique() if len(FarolAging1) <1: FarolAging1 = df['FarolAging'].unique() if len(DiasPendentes) <1: DiasPendentes = df['Dias Pendentes'].unique() if len(Produto) <1: Produto = df['Produto'].unique() dados2 = df.loc[df['FarolAging'].isin([FarolAging1]) & (df['Dias Pendentes'].isin([DiasPendentes])) & (df['Produto'].isin([Produto])) & (df['Officer'].isin([Officer]))] print(dados2) func(FarolAging1, DiasPendentes, Produto, Officer) ``` Are you sure you want to test & and not |? Actually Yes, I updated the code, probably It's clear now the why You have to remove the square brackets in isin because you already have lists: def func(FarolAging1,DiasPendentes,Produto,Officer): if len(Officer) <1: Officer = df['Officer'].unique() if len(FarolAging1) <1: FarolAging1 = df['FarolAging'].unique() if len(DiasPendentes) <1: DiasPendentes = df['Dias Pendentes'].unique() if len(Produto) <1: Produto = df['Produto'].unique() # Transform .isin([...]) into .isin(...) dados2 = (df.loc[df['FarolAging'].isin(FarolAging1) & (df['Dias Pendentes'].isin(DiasPendentes)) & (df['Produto'].isin(Produto)) & (df['Officer'].isin(Officer))]) print(dados2) return dados2 # don't forget to return something Output: >>> func(FarolAging1, DiasPendentes, Produto, Officer) FarolAging Dias Pendentes Produto Officer Analista Coord 0 Vermelho 20 dias Prod1 Alexandre Denardi Guilherme De Oliveira Moura Anna Claudia
7,652
https://uk.wikipedia.org/wiki/%D0%97%D0%BD%D0%BE%D0%B1-%D0%9D%D0%BE%D0%B2%D0%B3%D0%BE%D1%80%D0%BE%D0%B4%D1%81%D1%8C%D0%BA%D0%B0%20%D1%81%D0%B5%D0%BB%D0%B8%D1%89%D0%BD%D0%B0%20%D0%B3%D1%80%D0%BE%D0%BC%D0%B0%D0%B4%D0%B0
Wikipedia
Open Web
CC-By-SA
2,023
Зноб-Новгородська селищна громада
https://uk.wikipedia.org/w/index.php?title=Зноб-Новгородська селищна громада&action=history
Ukrainian
Spoken
94
450
Зноб-Новгородська селищна територіальна громада — об'єднана територіальна громада в Україні, в Шосткинському районі Сумської області. Адміністративний центр — смт Зноб-Новгородське. Утворена 30 серпня 2016 року шляхом об'єднання Зноб-Новгородської селищної ради та Голубівської, Зноб-Трубчевської, Кренидівської, Кривоносівської, Нововасилівської, Очкинської, Стягайлівської сільських рад Середино-Будського району. Населені пункти До складу громади входять 1 смт (Зноб-Новгородське) і 28 сіл: Боровичі, Василівське, Голубівка, Журавка, Заріччя, Зноб-Трубчевська, Карпеченкове, Красноярське, Кренидівка, Кривоносівка, Кудоярове, Кустине, Лісне, Любахове, Люте, Мефедівка, Нововасилівка, Очкине, Поліське, Стягайлівка, Таборище, Українське, Улиця, Уралове, Хильчичі, Червоне, Четвертакове та Чигин. Див. також Обстріли Зноб-Новгородської селищної громади Примітки Джерела Громади Шосткинського району
45,724
https://ko.wikipedia.org/wiki/%ED%85%8C%EC%98%A4%ED%81%AC%EB%A6%AC%ED%86%A0%EC%8A%A4
Wikipedia
Open Web
CC-By-SA
2,023
테오크리토스
https://ko.wikipedia.org/w/index.php?title=테오크리토스&action=history
Korean
Spoken
139
626
테오크리토스(, 기원전 310?~기원전 250?)는 시라쿠사 태생의 시인이다. 원숙기를 알렉산드리아에서 보냈으며 동(東)에게해의 코스섬 문인과도 교류하여 그 영향을 받았다. 전원생활을 주제로 목자(牧者)를 노래한 짧은 시형 '목가'의 창시자이자 완성자이다. 모름지기 '목가'라 불리는 서구의 시는 현재에 이르기까지 그의 영향하에 있다고 해도 과언이 아니다. 또한 그리스에서는 최후의 참된 영감을 지닌 시인으로 손꼽히고 있다. 그의 시는 고전작가가 지닌 웅대한 늠름함은 없으나, 사실성과 낭만성을 훌륭히 조화시킨 정교한 완성미를 보여주고 있다. 주요 작품은 <목가>,<에피그램>등이 있다. 작품 목가 - 테오크리토스 작의 30개의 소품으로 된 시집. 각개의 시는 창작연대가 다르며 이 가운데는 다른 시인의 작품도 몇 편 들어 있다. 그리스어의 원제는 , 즉 '짧은 시의 모임'이란 뜻으로 <목가>는 그 일부이며 나머지는 서사시·연애시·극시 등이 들어가 있다. 하나하나의 시는 주옥과 같은 아름다움으로 빛나며 그리스 문학의 가장 아름다운 유산 가운데 하나이다. 생몰년 미상 고대 시라쿠사의 시인 고대 이집트의 시인 기원전 3세기 그리스 사람 기원전 3세기 이집트 사람 기원전 3세기 시인 그리스 사화집
4,043
https://es.wikipedia.org/wiki/Globigerinitidae
Wikipedia
Open Web
CC-By-SA
2,023
Globigerinitidae
https://es.wikipedia.org/w/index.php?title=Globigerinitidae&action=history
Spanish
Spoken
69
200
Globigerinitidae es una familia de foraminíferos planctónicos de la Superfamilia Globorotalioidea, del Suborden Globigerinina y del Orden Globigerinida. Su rango cronoestratigráfico abarca desde el Aquitaniense (Mioceno inferior) hasta la Actualidad. Discusión Clasificaciones posteriores han incluido Globigerinitidae en la Superfamilia Globigerinoidea. Clasificaciones previas incluían los taxones de Globigerinitidae en la Familia Candeinidae Clasificación Globigerinitidae incluye a las siguientes subfamilia y géneros: Subfamilia Globigerinitinae † Antarcticella Globigerinita Tenuitellinata Tinophodella Bibliografía Globigerinida
44,089
https://stackoverflow.com/questions/3307194
StackExchange
Open Web
CC-By-SA
2,010
Stack Exchange
Lev2048, Nico Timmerman, Sirierx, Viktor Maksimenko, https://stackoverflow.com/users/6870494, https://stackoverflow.com/users/6870495, https://stackoverflow.com/users/6870496, https://stackoverflow.com/users/6870545
English
Spoken
84
107
How to identify slowing code in application I've got an appli where images are touched and replaced once touched. not quiet complex but the response time of the touch and the replacement is really high and I'd like to find a way to detect where/why the appli is slowing down... what could I do to identify the code portion that is slowing the app ?? Have you tried sampling the application with Instruments.app? It should give you lots of details about your application's activity.
47,013
https://sh.wikipedia.org/wiki/Llano%20de%20la%20Rochera%2C%20Quer%C3%A9taro
Wikipedia
Open Web
CC-By-SA
2,023
Llano de la Rochera, Querétaro
https://sh.wikipedia.org/w/index.php?title=Llano de la Rochera, Querétaro&action=history
Serbo-Croatian
Spoken
58
156
Llano de la Rochera je naselje u Meksiku, u saveznoj državi Querétaro, u opštini Querétaro. Prema proceni iz 2014. godine u naselju je živelo 109 stanovnika. Naselje se nalazi na nadmorskoj visini od 2377 m. Vidite još Meksiko Administrativna podjela Meksika Popis gradova u Meksiku Reference Literatura Vanjske veze Naselja u opštini Querétaro, Keretaro Wikiprojekat geografija/Naselja u Meksiku
1,930
https://nl.wikipedia.org/wiki/Bertrimoutier
Wikipedia
Open Web
CC-By-SA
2,023
Bertrimoutier
https://nl.wikipedia.org/w/index.php?title=Bertrimoutier&action=history
Dutch
Spoken
75
182
Bertrimoutier is een gemeente in het Franse departement Vosges in de regio Grand Est. De plaats maakt deel uit van het arrondissement Saint-Dié-des-Vosges en sinds 22 maart 2015 van het kanton Saint-Dié-des-Vosges-2. Daarvoor viel de gemeente onder het op die dag opgeheven kanton Saint-Dié-des-Vosges-Est. Geografie De oppervlakte van Bertrimoutier bedraagt 3,7 km², de bevolkingsdichtheid is 90,8 inwoners per km². Demografie Onderstaande figuur toont het verloop van het inwonertal (bron: INSEE-tellingen). Externe links Gemeente in Vosges
7,884
https://cs.wikipedia.org/wiki/Sest%C5%99el
Wikipedia
Open Web
CC-By-SA
2,023
Sestřel
https://cs.wikipedia.org/w/index.php?title=Sestřel&action=history
Czech
Spoken
102
292
Letecký sestřel je vojenský termín, který označuje záměrné zničení, poškození nebo uzemnění nepřátelského letadla. Většinou je projevem válečného střetu. Ve výjimečných případech se lze setkat s případy leteckých sestřelů mimo válečný konflikt, kdy je terčem útoku letadlo ohrožující veřejnou bezpečnost. Historie Fenomén leteckých sestřelů šel ruku v ruce s vývojem válečného letectví. První projevy letecké agrese v průběhu ozbrojeného konfliktu se objevily během první světové války, kdy válečná letadla krom průzkumné a výzvědné činnosti sloužila k cílenému zneškodňování pozemních cílů pomocí ručně vrhaných bomb a v pozdějších fázích konfliktu i k zneškodňování nepřátelských letadel. Související články Letecké eso Vojenská terminologie Letecká terminologie
11,840
https://ja.wikipedia.org/wiki/%E6%BC%95%E9%81%8B%E9%80%9A%E5%BF%97
Wikipedia
Open Web
CC-By-SA
2,023
漕運通志
https://ja.wikipedia.org/w/index.php?title=漕運通志&action=history
Japanese
Spoken
10
496
『漕運通志』(そううんつうし)は、中国の漕運の歴史についてまとめた明代の書物。楊宏が著作したものを、後に謝純が加筆して嘉靖4年(1525年)に刊行した。全10巻。 初め楊宏が「漕運志」の編纂を志して草稿を作成するが、満足の行くものではなかった。後に謝純がこれを受け継いで加筆や諸表の作成を行って刊行にこぎつけた。 漢より嘉靖年間までの漕運の歴史や実情についてを記述するとともに関連する史料の採録も行っている。「漕渠」(全2巻)・「漕職」・「漕卒」・「漕船」・「漕倉」・「漕数」についてそれぞれの巻きで触れた後に永楽2年(1404年)から嘉靖3年(1524年)までの漕運の実情について記した漕例、漢の元光元年(紀元前134年)から嘉靖4年(1525年)までの漕運に関する政治論争をまとめた「漕議」、そして各地に残された漕運関連の碑文を採録した「漕文」の9つのテーマについて論じている。明の漕運政策を知る上で貴重な史料である。 参考文献 星斌夫「漕運通志」『アジア歴史事典 5』(平凡社、1984年) 中国の歴史書 中国の経済史 16世紀の書籍 明代の書籍
8,135
https://simple.wikipedia.org/wiki/Jay%20Lake
Wikipedia
Open Web
CC-By-SA
2,023
Jay Lake
https://simple.wikipedia.org/w/index.php?title=Jay Lake&action=history
Simple English
Spoken
148
217
Joseph Edward "Joe" Lake, Jr. (June 6, 1964 – June 1, 2014) was an American science fiction and fantasy writer. He wrote Trial of Flowers (2006), Mainspring (2007), Escapement (2008), Madness of Flowers (2009) and Pinion (2010). He was a quarterly first place winner in the Writers of the Future contest in 2003. In 2004, he won the John W. Campbell Award for Best New Writer in Science Fiction. Lake was born in Taiwan to foreign service officer Joseph Edward Lake (born 1941). He was raised in both Taiwan and Nigeria before settling in the United States. Lake died of colorectal cancer on June 1, 2014 in Portland, Oregon. He was 49 years old. References Other websites Jay Lake at the Internet Speculative Fiction Database 1964 births 2014 deaths American science fiction writers Cancer deaths in Oregon Deaths from colorectal cancer Writers from Portland, Oregon Writers from Texas
10,271
https://stackoverflow.com/questions/74373685
StackExchange
Open Web
CC-By-SA
2,022
Stack Exchange
Danish
Spoken
119
313
Connect 2 Android devices using Bluetooth Serial Is it possible connecting 2 android phones with Bluetooth and share/send data to another Android phone and sends back a response after receiving and reading the data. The idea is to send data/share data offline using Bluetooth on Android to Android Phone/tablet Below is my environment Ionic: Ionic CLI : 6.20.1 Ionic Framework : @ionic/angular 6.2.2 @angular-devkit/build-angular : 13.0.4 @angular-devkit/schematics : 13.0.4 @angular/cli : 13.0.4 @ionic/angular-toolkit : 5.0.3 Cordova: Cordova CLI : 11.0.0 Cordova Platforms : android 10.1.2 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 14 other plugins) Utility: cordova-res : 0.15.4 native-run (update available: 1.7.1) : 1.5.0 System: NodeJS : v14.15.4 (C:\Program Files\nodejs\node.exe) npm : 6.14.10 OS : Windows 10
22,075
https://stackoverflow.com/questions/19080813
StackExchange
Open Web
CC-By-SA
2,013
Stack Exchange
DSM, Erik Kaplun, Matt Bryant, Noctua, Randoms, Thomas Orozco, Veedrac, https://stackoverflow.com/users/1626199, https://stackoverflow.com/users/1763356, https://stackoverflow.com/users/1903116, https://stackoverflow.com/users/201359, https://stackoverflow.com/users/2220206, https://stackoverflow.com/users/247623, https://stackoverflow.com/users/2809263, https://stackoverflow.com/users/416467, https://stackoverflow.com/users/487339, https://stackoverflow.com/users/873145, kindall, thefourtheye, Óscar López
English
Spoken
743
1,288
Python Search within Lists within Lists Why does the following code not work? data = [["4","5"],["3","7"]] search = "4" for sublist in data: if sublist[1] == "4": print ("there"), sublist break else: print("not there") break Very sorry for all the confusion, everyone. I was trying to check the entire list and all its sublists and I didn't understand that this would only check the second element of the list, for I forgot Python has a 0th position for the first element. But, how would I check the entire list? remove the "break"s and [1]? What isn't working? The code correctly states "not there" -- there are no sublists in the list whose second element is "4". .. your prints are strange too. If you're using Python 2, you don't need the parentheses. And if you're using Python 3, print("there"), sublist won't actually print sublist. You're actually creating a length-2 tuple (print("there"), sublist) -- where print("there") returns None, and then throwing it away. Probably you meant print("there", sublist). This is easy to do using generator expressions and the any built-in function: data = [["4","5"],["3","7"]] search = "4" if any(element == search for sublist in data for element in sublist): print ("there") else: print("not there") Or even shorter, as pointed by @Veedrac in the comments: if any(search in sublist for sublist in data): print ("there") else: print("not there") EDIT: If you want to print the sublist where the element was found, it's necessary to use explicit looping, as shown in @thefourtheye's answer: for sublist in data: if search in sublist: print("there", sublist) break else: print("not there") any(search in sublist for sublist in data) technically, it's a generator expression not a list comprehension :) +1 if you include Veedracs suggestion. @Noctua I just did that :) @Veedrac thanks for the suggestion, I edited my answer to include it @ErikAllik you're right, of course. I updated my answer Thank you very much, all who contributed and especially Oscar and Veedra, for your thorough and comprehensive answer, but how could this (and please do excuse my limited experience with Python) be expanded so that it might also print the sublist in which the search was found, when I tried print (sublist), I got NameError: name 'sublist' is not defined. @user2809263 I edit my answer, see the last part Lists are 0-indexed in Python, so ["4", "5"][1] is "5", not "4". Also, did you want to check whether "4" was in the sub-list, or in the sub-list, in the first position? If it's the former, you might want to use if search in sublist instead. Note that as mentioned by Noctua in the comments, you'll only be checking the first sub-list here, since you break in any case, so you might want to remove that statement, at the very least in the else branch. Also, the break should be removed from the else, if he wants to check the complete list. @Noctua Yes, it's unclear exactly what the OP is trying to do here, hopefully he'll clarify : ) The code would be completely pointless if he didn't want to check every sublist, so... :P @Noctua Indeed, I hadn't realized that the break was in the else branch too ; ) data = [["4","5"],["3","7"]] search = "4" for sublist in data: if search in sublist: print ("there", sublist) break else: print("not there") wow, identical to my snippet—did you copy-paste? I learnt the else part from your code. But I search with in operator. Hope you don't mind. :) @ErikAllik: it's not identical, check the print. Come on @ErikAllik, don't squabble. There aren't many derivatives of such simple algorithms so there's no reason to accuse people of foul play. What Thomas said, + you're breaking in any case, so after the first element in the main list, you're just breaking out of the for-loop and not checking any further elements. What you need is: data = [["4","5"],["3","7"]] search = "4" for sublist in data: if sublist[0] == "4": print "there", sublist break else: print "not there" # executed when the for-loop finishes without break When you write if sublist[1] == "4": you are checking if the 2nd element is "4". To check is "4" is in sublist, use if "4" in sublist: To check if "4" is in position 1, use if sublist[0] == "4": Additionally, you break after every else, so if there isn't a match for the first list you don't check the later ones! Remove that break!
34,042
https://fr.wikipedia.org/wiki/Rathjensdorf
Wikipedia
Open Web
CC-By-SA
2,023
Rathjensdorf
https://fr.wikipedia.org/w/index.php?title=Rathjensdorf&action=history
French
Spoken
43
82
Rathjensdorf est une commune allemande du Schleswig-Holstein, située dans l'arrondissement de Plön, à trois kilomètres au nord de la ville de Plön. Rathjensdorf fait partie de l'Amt Großer Plöner See qui regroupe dix communes entourant le lac Großer Plöner See. Commune au Schleswig-Holstein
49,048
https://stackoverflow.com/questions/11120603
StackExchange
Open Web
CC-By-SA
2,012
Stack Exchange
Eliran Malka, Vjeetje, https://stackoverflow.com/users/1467482, https://stackoverflow.com/users/547020
English
Spoken
306
514
gwteventservice support multiple tabs I've tried the chatdemo of gwt-comet and gwteventservice so far. I personally prefer the gwteventservice more, but they both have the same problem: I have two tabs open in firefox: say with user ff1 and user ff2 and one tab in chrome say user chrome1. When I send an event from chrome1 for example a new message event, then only one of the users ff1 and ff2 will receive the message. This was tested using gwteventservice 1.2.0 and the latest source code 1.3.0 (20-6-2012), and gwt-comet 1.2.3 Another problem with the demos is that closing a tab/closing the browser isn't perceived by the server and that user seems logged in to the other users. The user only seems logged out by others when the logout button is pressed. I'd prefer a solution using gwteventservice. My question is thus: how to manage multiple tabs using gwteventservice and logout users correctly in a chatapp? it is not very clear what is being asked here, please elaborate on your goal or address specific technical issues. see the FAQ entry on how to ask for more on this. and welcome aboard. Thanks, in short: 1)when you use multiple tabs in a browser using gwt-comet or gwteventservice, only one of the tabs will receive an event from the serverpush. I want all tabs to receive each event. I'm looking for a solution to this problem 2) When a user is logged in and he closes browser, other users on the channel won't be notified of the user leaving, so it seems the user is still online. I want all users on the channel to be notified this user left the channel. This problem occurs for gwteventservice only as it has no heartbeat. http://stackoverflow.com/questions/5880519/gwt-event-servise-browsers-synchronization-problem # Generator for unique client ids eventservice.connection.id.generator=de.novanic.eventservice.service.connection.id.SessionExtendedClientIdGenerator more information can be found at: https://stackoverflow.com/a/5882001/1467482
7,450
https://scicomp.stackexchange.com/questions/23567
StackExchange
Open Web
CC-By-SA
2,016
Stack Exchange
Ophion, Paul, Richard Zhang, Wolfgang Bangerth, https://scicomp.stackexchange.com/users/11716, https://scicomp.stackexchange.com/users/393, https://scicomp.stackexchange.com/users/4947, https://scicomp.stackexchange.com/users/549
English
Spoken
1,218
2,336
Solving a set of linear equations with block structure and weak coupling I have a standard set of linear equations $Ax=b$ where the Hessian matrix $A$ has the special block structure as shown: $A= \begin{pmatrix} T & U\\ U^T & V \end{pmatrix}$, $x= \begin{pmatrix} c\\ d \end{pmatrix}$ Where $A$ is square Hessian matrix and each dimension is of size $n = c_n + d_n$. This compound dimension is quite large, typically $10^6-10^{10}$. The gradient vector $b$ has the same block structure as $x$. This set of equations is solved for a full Newton step to an iterative procedure. One can think of the matrices $T$ and $V$ as two different basis expansions of a given problem with the coupling between these two bases represented by $U$. This set of linear equations is usually solved through CG or an associated method as the matrix $A$ is too large to store. What is interesting about this is that the "coupling" block $U$ is quite small. Often, the $c$ and $d$ blocks are solved alternatively without consideration of $U$; however, this can lead to somewhat slow convergence. It would appear that this can be solved in a somewhat decoupled manner where were $Ax$ Hessian-vector guesses can be split as follows: $Ax_1 = T*c + U*d$ $Ax_2 = U^T*c + V*d$ For example, $Ax_1$ could be updated on every third iteration of $Ax_2$. As the computation of $Ax_1$ is much more costly than $Ax_2$ this would be quite advantageous. I assume that this kind of system is well described somewhere, but have been unable to google the correct combination of words. Does anyone know what this kind of system of equations is called? Also, if anyone has a good recommendation for material on approximate Newton methods for ill-conditioned systems that would be quite helpful as well. Full disclosure: I asked the same question here with a 100 point bounty without luck. I decided to try again here as this community has more experience with practical solutions. This is a saddle point system and numerical methods for this kind of system have been well studied. Related: http://scicomp.stackexchange.com/questions/7288/which-preconditioners-and-solver-in-petsc-for-indefinite-symmetric-systems-sho/7291#7291. Chances are, you may need a krylov subspace method coupled with an approximate commutator preconditioner. @Paul My understanding is that V would have to be 0 for this to be a saddle point problem? I am currently solving this with Krylov methods utilizing good preconditions, what I more curious in is how to decouple the problem since the U blocks are so small. What you're after is a block Jacobi preconditioner, and the resulting convergence rate (e.g. using PCG) can easily be bounded. Is the system symmetric? Edit: What do you mean when you say the off-diagonal blocks are small? Spectral norm? Frobenius norm? Low-rank? @Paul: In order for this to be a saddle-point system, $V$ would have to be negative semidefinite. But OP is currently solving it using CG, which wouldn't necessarily work under that setting. @RichardZhang The system, $T$, and $V$ blocks are symmetric. The $U$ blocks are small via Eucledian norm (or simply the relative magnitude of the elements are much smaller than other blocks). @Paul The system is positive definite, although the existence of negative eigenvalues is a problem. @Ophion -- your statement is self-contradictory: the system can not be both positive definite and have negative eigenvalues. @WolfgangBangerth It is formally positive definite; however, a poor basis or starting guess can result in negative eigenvalues that are easily circumvented with level shifting. I probably should not have mentioned it to avoid confusion. @Ophion -- I still don't understand. A matrix either has negative eigenvalues, or it doesn't. If it doesn't, then it is positive definite, if it does have negative eigenvalues, it is not positive definite. It cannot be both. @WolfgangBangerth I don't quite understand the Hessian ($A$) is not static, but depends on a given problem. Since the matrix depends on many factors its a bit simplistic to simply state that it is always positive definite, the reasons that it will not be are beyond the scope of this question. @Ophion -- ok, so you are saying that it is sometimes positive definite. That's not a useful property, in practice, though, since it can't be used in an actual algorithm. @WolfgangBangerth Re: you can condition or shift out the negative eigenvalues. Unless there is a more efficient answer which does not assume positive definiteness (which I doubt) this whole argument is moot as this assumption works perfectly fine in actual algorithms. Consider the alternating directions method $$ x_{k+1}=T^{-1}(c-Uy_{k}),\qquad y_{k+1}=V^{-1}(d-U^{T}x_{k}). $$ If $\|U\|$ is sufficiently small (in a rigorously defined sense described below) then the sequence $\{x_{k},y_{k}\}$ is guaranteed to converge to a solution. But conjugate gradients will always converge faster. To see this, define the matrix $P$ as the version of $A$ in which the coupling is eliminated altogether, $$ P=\begin{bmatrix}T & 0\\ 0 & V \end{bmatrix}, $$ and note that the alternating directions method is really just the preconditioned iterations $$ Pz_{k+1}+(A-P)z_{k}=b\iff z_{k+1}=b-P^{-1}(A-P)z_{k}. $$ It is a well-known theorem that preconditioned conjugate gradient (PCG) with $P$ as the preconditioner converges as fast or faster than the corresponding fixed-point iterations. But of course this may not matter if the alternating directions method already convergences very quickly. Theorem. Define $\alpha=\sigma_{\max}(U)$ and $\beta=\sqrt{\lambda_{\min}(T)\lambda_{\min}(V)}$. If $\alpha<\beta$, then the alternating directions iteration converges within $$ \frac{\beta}{\beta-\alpha}\log\epsilon^{-1}\text{ iterations,} $$ and PCG with $P$ as the preconditioner converges within $$ \sqrt{\frac{\beta}{2(\beta-\alpha)}}\log2\epsilon^{-1}\text{ iterations.} $$ Proof. After preconditioning, the matrix $P^{-1/2}AP^{-1/2}=I+G$ where $G=P^{-1/2}(A-P)P^{-1/2}$ is written explicitly as $$ G=\begin{bmatrix}0 & T^{-1/2}UV^{-1/2}\\ V^{-1/2}U^{T}T^{-1/2} & 0 \end{bmatrix}, $$ and the spectral radius for the iteration matrix is $$\begin{align*} \rho(G) & =\|T^{-1/2}UV^{-1/2}\|\\ & \le\|U\|\sqrt{\|T^{-1}\|\|V^{-1}\|} = \frac{\alpha}{\beta} \end{align*}$$ where we note that if $A$ is positive definite, then $\|A^{-1}\|^{-1}=\lambda_{\min}(A)$. If the spectral radius is strictily less than 1, then the iterated sequence is convergent. Finally, the condition number for $P^{-1/2}AP^{-1/2}$ is equal to $\kappa=(1+\rho(G))/(1-\rho(G))=(\beta+\alpha)/(\beta-\alpha)$. Gradient descent converges in $\frac{1}{2}(\kappa+1)\log\epsilon^{-1}$ iterations, and PCG gradients converges in $\frac{1}{2}\sqrt{\kappa+1}\log2\epsilon^{-1}$ iterations. References Shewchuk, Jonathan Richard. "An introduction to the conjugate gradient method without the agonizing pain." (1994). Saad, Yousef. Iterative methods for sparse linear systems. Siam, 2003. Greenbaum, Anne. Iterative methods for solving linear systems. Vol. 17. Siam, 1997. Kelley, C.T. Iterative methods for linear and nonlinear equations. Siam, 1995. This is quite interesting that CG will always converge faster; however, practicalities (cost of $V$ >> $U$ and the number of iterations is typically 6-10) make a decoupled approach (if possible) much more cost effective. The alternating directions method may be the answer I am searching for. I should emphasize that alternating directions can diverge if $\alpha \ge \beta$, whereas CG will at worst be stagnant. Also, the Jacobi splitting is only one of several possible "alternating directions" methods, with prominent others being the Gauss-Seidel version and the SSOR versions. Regardless, I like Jacobi here because it's really simple to implement, and its convergence is guaranteed to be monotonous. Every iteration gets you a multiplicative factor of $\alpha / \beta$ closer to the true solution. Combining the two is proving to be quite successful, PCG for several iterations until $||Up_k||$ (where $p_k$ is a CG conjugate vector) is below some threshold and then switching to the alternating directions method. Ill give this question a few more days, but I think this is what I was looking for.
8,652
https://wordpress.stackexchange.com/questions/177943
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Aaron, Jen, https://wordpress.stackexchange.com/users/13810, https://wordpress.stackexchange.com/users/36436
English
Spoken
494
1,122
Filter out a meta key in the Search results page with two CPT I have two CPT: Listings and Events. In Events I have custom fields for the start and end dates. What I need is a way to filter out any events that are past the current date. What I have right now is: function search_pre_get_posts( $query ) { if ( is_search() && $query->is_main_query() ) { $currentdate = current_time('Ymd'); global $wp_query; $args = array_merge( $wp_query->query_vars, array( 'meta_query'=> array( array( 'key' => 'DTEND', 'compare' => '>=', 'value' => $currentdate, )), ) ); query_posts( $args ); } } add_action( 'pre_get_posts', 'search_pre_get_posts' ); This does filter out the past events, but it also removes all Listings. What I need is a way to add an IF statement to run this meta query only for 'events'. Anyone have an idea of how to do this? Whenever I put an IF statement anywhere in there, using a get_post_type(), like 'events' == get_post_type(), it breaks the whole filter. You could add a second array to check if the 'DTEND' value is not set: $args = array_merge( $wp_query->query_vars, array( 'meta_query'=> array( 'relation' => 'OR', array( 'key' => 'DTEND', 'compare' => '>=', 'value' => $currentdate, ), array( 'key' => 'DTEND', 'compare' => 'NOT EXISTS', ) ), ) ); That way, any custom posts without a DTEND meta value will also be allowed. Ok, @guiniveretoo nailed it, with a couple edits: Ok, @guiniveretoo, you nailed it! With a couple tweaks, this is what I used and it works: function search_pre_get_posts( $query ) { global $wp_query; if ( is_search() && $query->is_main_query() ) { $currentdate = current_time('Ymd'); $args = array_merge( $wp_query->query_vars, array( 'meta_query'=> array( 'relation' => 'OR', array( 'key' => 'DTEND', 'compare' => '>=', 'value' => $currentdate, ), array( 'key' => 'DTEND', 'compare' => 'NOT EXISTS', ) ), ) ); query_posts( $args ); } } add_action( 'pre_get_posts', 'search_pre_get_posts' );' Now, i just need to figure out how to sort the 'events' CPT by a meta key 'DTSTART', so the events that are coming up get listed first.... .... So i got the right answer, but you reposted it and then accepted your own answer? Low man... low. Sorry, changed the status to your answer being the one! It was correct, but with a slightly different layout than my first bit of code. So didn't want to confuse people who try my first bit of code. @Aaron, here is an alternate version of your solution, including sorting: function search_pre_get_posts( $query ) { if ( $query->is_search() && $query->is_main_query() ) { $currentdate = current_time('Ymd'); $query->set( 'meta_query', array( 'relation' => 'OR', array( 'key' => 'DTEND', 'compare' => '>=', 'value' => $currentdate, ), array( 'key' => 'DTEND', 'compare' => 'NOT EXISTS', ) ) ); $query->set( 'orderby', 'meta_value' ); } } add_action( 'pre_get_posts', 'search_pre_get_posts' );' Big difference: $query is passed by reference, so you don't need to call $wp_query or query_posts (which you should never call anyway). Also, setting orderby by meta_value will sort the posts by the meta value.
38,606
https://stackoverflow.com/questions/19120215
StackExchange
Open Web
CC-By-SA
2,013
Stack Exchange
chepner, doctorlove, https://stackoverflow.com/users/1055118, https://stackoverflow.com/users/1126841, https://stackoverflow.com/users/2417731, user2417731
English
Spoken
444
953
Python Error Init of Class Below is my code. It is giving me a compile error saying that artist has not been defined. This confuses me since artist is a parameter I'm passing. Thanks. class Track: def __init__(self, artist, title, album=None): self.artist = str(artist) self.title = str(title) self.album = album def __str__(self): return self.artist + " " + self.title + " " + self.album def set_album(self, album): self.album = album class Album: def init(self, artist, title, year='', genre='', tracks=None): self.artist = str(artist) self.title = str(title) self.year = str(year) self.genre = str(genre) self.tracks = tracks def __str__(self): return self.artist + " " + self.title + " " + self.year + " " + self.genre + " " + self.tracks def add_track(track): self.tracks.append(track) def music_library(tracks, albums): while true: command = raw_input("Please enter a command (s, st or sa)").lower() if "s " in command: searchText = command.split()(1) elif "sa " in command: searchText = command.split()(1) elif "st " in command: searchText = command.split()(1) import os from mutagen.mp3 import MP3 def load_library(dir): for root, dirs, files in os.walk("."): for filename in files: if filename.lower().endswith(".mp3"): fullname = os.path.join(root, filename) print "\n%s" % fullname try: audio = MP3(fullname) for key in audio: print " %s: %s" % (key, str(audio[key])) except: print "Error on %s" % fullname That is the entire file. I am running it using python musiclib.py Provide the complete code and the complete traceback and don't throw incomplete class definitions in front of our feet. This code is running fine. Why do you need str() here? It works on my machine. How are you using it? Are you initializing the class? You need to do that first. I added the full code. All I am doing is running the file in Python using python musiclib.py And which line has the error? Where is the traceback? http://i.imgur.com/tUMMlwP.png When I "s/\t/ /g" it works on my machine Your code has inconsistent indentation, due to tabs, which makes it difficult to tell if the indentation errors are the code you are running or just in the code you posted. I suspect it's because you're mixing tabs and spaces. When I copy and paste your code and look at it, I see: ' class Track:' ' \tdef __init__(self, artist, title, album=None):' ' \t\tself.artist = str(artist)' ' self.title = str(title)' ' self.album = album' ' ' ' \tdef __str__(self):' ' \t\treturn self.artist + " " + self.title + " " + self.album' ' ' ' \tdef set_album(self, album):' ' \t\tself.album = album' Mixing tabs and spaces confuses Python about how far code is indented. Switch to using four spaces for indentation, and run your code using python -tt yourprogramname.py to confirm this diagnosis.
16,751
https://it.wikipedia.org/wiki/Jonathan%20Harker
Wikipedia
Open Web
CC-By-SA
2,023
Jonathan Harker
https://it.wikipedia.org/w/index.php?title=Jonathan Harker&action=history
Italian
Spoken
321
594
Jonathan Harker è il protagonista del romanzo Dracula di Bram Stoker. Harker è un giovane e brillante avvocato londinese, prossimo alle nozze con la fidanzata Mina Murray, viene incaricato di recarsi in Transilvania, presso il castello del Conte Dracula, per conto di un'agenzia immobiliare. Dopo un viaggio all'insegna di foschi presagi, il giovane giunge al castello, dove, dopo aver scoperto che il conte è un vampiro, riesce a fuggire tra mille difficoltà. Salvato grazie all'opera pia di un ospedale gestito da monache ortodosse, Harker riesce a riprendersi e a sposare Mina, tuttavia è provato nel fisico e a stento riuscirà a trovare l'energia per affrontare Dracula, di cui Harker è la nemesi. Sarà lui a uccidere Dracula, insieme a Quincey Morris e a salvare Mina e a liberare lo stesso Dracula dalla dannazione eterna. Al cinema è stato rappresentato in diversi modi, dal vampirologo più o meno esperto e assistente di Van Helsing nel Dracula il vampiro di Terence Fisher, al predestinato alla vampirizzazione del Nosferatu il vampiro di Werner Herzog, dove nel finale un vampirizzato Bruno Ganz, si avvia a cavallo in cerca di nuove prede dopo aver fatto arrestare Van Helsing per l'omicidio di Dracula. Nell'immaginario collettivo, l'interpretazione più conosciuta è probabilmente quella di Keanu Reeves nel film di Francis Ford Coppola, nel quale appare (anche se solo accennato) il legame tra Harker e Dracula, i quali, innamorati della stessa donna, invecchiano l'uno al ringiovanire dell'altro e viceversa, ma il più fedele al personaggio del romanzo è quello di Bosco Hogan, in Count Dracula del 1977, prodotto dalla BBC. Jonathan Harker è presente anche nel videogioco Dracula: La risurrezione, per PlayStation e pc, in cui cerca la sua fidanzata Mina rapita da Dracula. Jonathan Harker ha probabilmente ispirato il personaggio di Jonathan Joestar, protagonista di Phantom Blood, ovvero la prima parte del manga e anime Le bizzarre avventure di JoJo. Altri progetti Collegamenti esterni Personaggi di Dracula Avvocati immaginari
13,231
https://en.wikipedia.org/wiki/Charlotte%20Champe%20Stearns
Wikipedia
Open Web
CC-By-SA
2,023
Charlotte Champe Stearns
https://en.wikipedia.org/w/index.php?title=Charlotte Champe Stearns&action=history
English
Spoken
645
967
Charlotte Champe Eliot (née Stearns; October 22, 1843September 10, 1929), was an American school teacher, poet, biographer, and social worker. She was the mother of T.S. Eliot, a famous poet, editor and literary critic, wife of Henry Ware Eliot, who ran the Hydraulic Press Brick Company in St. Louis, Missouri, and daughter-in-law of William Greenleaf Eliot, a leading minister in St. Louis and a founder of Washington University. Early life and education Charlotte Champe Stearns was born in Baltimore, Maryland, the second daughter of nine children from her parents Charlotte Stearns (née Blood) and Thomas Stearns Jr. Her father, Thomas, was a merchant who lived in several cities, before he settled down as a partner in the trading firm of Stearns & Bailey in Boston, Massachusetts. Charlotte attended private school and graduated from the State Normal School of Framingham, Massachusetts in 1862. She was employed as a teacher at a private school in West Chester, Pennsylvania. Her teaching career led her to Pennsylvania and Milwaukee at Antioch College, back to Framingham and then to the St. Louis Normal School in St. Louis, Missouri. Married life Stearns married Henry Ware Eliot (18431919) on October 27, 1868, in Lexington, Massachusetts. They returned to Eliot's home city of Saint Louis where they worked and reared their family. They had five daughters and two sons: Ada (Eliot) Sheffield, born in 1869; Margaret Dawes Eliot, born in 1871; Charlotte (Eliot) Smith, born in 1874; Marian Cushing Eliot, born in 1877; Henry Ware Eliot, Jr., born in 1879; Theodora Sterling Eliot, born in 1885 but died in infancy; and Thomas Stearns Eliot, born in 1888. In the 1870s when her husband went bankrupt, Charlotte taught school at the nearby Mary Institute. Charlotte's youngest child, Thomas Stearns Eliot, would become well known as the poet T. S. Eliot. Life with T.S. Eliot T.S. Eliot was born in St. Louis, Missouri in 1888, while the family resided at 2635 Locust Street. T.S. attended Smith Academy and then furthered his education at Harvard University in Cambridge, Massachusetts. When T.S. was at Harvard, Charlotte sent him a letter that stated: "I hope in your literary work you will receive early the recognition I strove for and failed. I should so have loved a college course, but was obliged to teach before I was nineteen. I graduated with high rank, 'a young lady of unusual brilliancy as a scholar' my old yellow testimonial says, but when I was set to teaching young children, my Trigonometry and Astronomy counted for nought, and I made a dead failure." Career Eliot was a teacher for several years before she was a scholar and a writer of poems. Many of her poems appeared in religious periodicals. A collection of her poems, Easter Songs, was published in 1899. Her dramatic poem, Savonarola, was published in 1926 with the help of her son, T.S. Eliot. She was interested in the dramatization of events from medieval and Renaissance history that reflected the struggles of men who died for their faith. After her years as a teacher, she participated in social reforms including providing a house of detention for juveniles. Eliot wrote a biography of her father-in-law, William Greenleaf Eliot, a Unitarian minister and leading citizen of St. Louis titled, William Greenleaf Eliot: Minister, Educator, Philanthropist. It was published in 1904. Death Eliot left St. Louis and moved to Cambridge, Massachusetts after the death of her husband in 1919. She died there in 1929 at eighty-six of a cerebral thrombosis. Her ashes were buried next to her husband's plot in Bellefontaine Cemetery in St. Louis. After her death, Henry Ware Eliot Jr. placed her poems and literary work in the Eliot collection at Harvard University. References "Eliot, Charlotte Champe Stearns." Notable American Women, 1607–1950 (1971): Biography Reference Bank (H.W. Wilson). Web. 15 May 2012. Notes and citations 1843 births 1929 deaths American women poets
35,909
https://en.wikipedia.org/wiki/Seny%20Kamara
Wikipedia
Open Web
CC-By-SA
2,023
Seny Kamara
https://en.wikipedia.org/w/index.php?title=Seny Kamara&action=history
English
Spoken
509
758
Seny Kamara is a Senegalese-French-American computer scientist best known for his work on cryptography. He has delivered multiple congressional testimonies about the potential harms and opportunities with technology. He leads or co-leads numerous centers and activities focused on cryptography and social good. His work has been covered extensively in high-profile media, including Wired and Forbes. Education Kamara received his Bachelors in Computer Science from Purdue University in 2001. He received his Master's degree and PhD in Computer Science from Johns Hopkins University in 2008. His dissertation, Computing Securely with Untrusted Resources, explored cryptographic problems in the setting of cloud computing including searchable symmetric encryption and proofs of storage. Career He is an associate professor of computer science at Brown University. He has worked as a chief scientist at Aroki Systems, as a principal scientist at MongoDB, and as a researcher at Microsoft Research. At Brown University, he co-directs the Encrypted Systems Lab and is affiliated with the CAPS group, the Data Science Initiative, the Center for Human Rights and Humanitarian Studies and the Policy Lab. He teaches a popular Algorithms for the People course that surveys, critiques, and aspires to address the ways in which computer science & technology affect marginalized communities. Research Kamara is one of the principal contributors to the field of encrypted search and to searchable symmetric encryption (SSE). With Reza Curtmola, Juan Garay and Rafail Ostrovsky, he proposed the first SSE constructions to achieve optimal search time. Along with Melissa Chase, he later introduced structured encryption which underlies most practical SSE and encrypted database schemes. Public work Kamara has given congressional testimony to the U.S. House Committee on Space, Science, and Technology in 2021 where he argued for considering the harms technology can cause and advocated for computer science and technology communities to work hard to mitigate those harms. Also in 2021, he collaborated with Senator Ron Wyden to advocate for an encrypted gun registry. In 2019, he delivered congressional testimony to the Financial Services Committee of the U.S. House of Representatives about how data uses in the financial industry have the potential to erode consumer privacy and increase discrimination. He joined a National Academy of Sciences committee focused on "Law Enforcement and Intelligence Access to Plaintext Information in an Era of Widespread Strong Encryption: Options and Tradeoffs" which has produced a report on encryption and cybersecurity. Publications His most cited publications are: Reza Curtmola, Juan Garay, Seny Kamara, Rafail Ostrovsky, Searchable symmetric encryption: improved definitions and efficient constructions (2011) Journal of Computer Security 19:895-934 (Cited 2830 times, according to Google Scholar ) Seny Kamara, Kristin Lauter, Cryptographic cloud storage. (2010) International Conference on Financial Cryptography and Data Security, 136-149 (Cited 1880 times, according to Google Scholar.) Seny Kamara, Charalampos Papamanthou, Tom Roeder, Dynamic searchable symmetric encryption (2012) Proceedings of the 2012 ACM conference on Computer and communications (Cited 1063 times, according to Google Scholar.) References External links African-American computer scientists 21st-century African-American academics 21st-century American academics French computer scientists American computer scientists French cryptographers American cryptographers Year of birth missing (living people) Living people
18,189
https://ar.wikipedia.org/wiki/%D9%83%D8%A3%D8%B3%20%D8%A3%D9%88%D8%B1%D9%88%D8%A8%D8%A7%201973%E2%80%9374
Wikipedia
Open Web
CC-By-SA
2,023
كأس أوروبا 1973–74
https://ar.wikipedia.org/w/index.php?title=كأس أوروبا 1973–74&action=history
Arabic
Spoken
103
294
كأس أوروبا 1973-74 اقيم نهائي دوري أبطال أوروبا 1973-1974 في مدينة بروكسل في ملعب الملك بودوان بين بايرن ميونيخ وأتلتيكو مدريد إنتهت المباراة الأولى التي أقيمت في 15 مايو 1974 بالتعادل 1-1 بعد أن امتدت لشوطين إضافيين، أقيمت مباراة الإعادة على ذات الملعب يوم 17 مايوانتهت المباراة بفوز البايرن 4-0. سجل الأهداف : أولي هونيس في الدقيقة 28 ' و الدقيقة 83 ' وجيرد مولر في الدقيقة 58 ' و الدقيقة 71 ' وبلغ عدد الجماهير 23,000. الدور التمهيدي دور الـ 32 |} دور الـ 16 |} ربع النهائي |} نصف النهائي |} النهائي مراجع كرة القدم الأوروبية في 1973-74 مواسم كأس أوروبا
27,024
https://stackoverflow.com/questions/74375476
StackExchange
Open Web
CC-By-SA
2,022
Stack Exchange
DarrylG, R overflow, StonedTensor, https://stackoverflow.com/users/3066077, https://stackoverflow.com/users/5917999, https://stackoverflow.com/users/6023918
English
Spoken
957
2,011
How to make a calculation based on a value and multiple columns in pandas? I am trying to create a column, that should do a calculation per product, based on multiple columns. Logic for the calculation column: Calculations should be done per product Use quantity as default IF promo[Y/N] = 1, then take previous weeks quantity * season perc. change. Except when the promo is on the first week of the product. Then keep quantity as well. In the example below, You see the calculation column (I placed comments for the logic). week product promo[Y/N] quantity Season calculation 1 A 0 100 6 100 # no promo, so = quantity col 2 A 0 100 10 100 # no promo, so = quantity col 3 A 1 ? -10 90 # 100 (quantity last week)- 10% (season) 4 A 1 ? 20 108 # quantity last week, what we calculated, 90 + 20% (18) = 108. 5 A 0 80 4 80 # no promo, so = quantity col 1 B 1 100 6 100 # Promo, but first week of this product. So regular quantity. 2 B 0 100 10 100 # no promo, so = quantity col 3 B 1 ? -10 90 # 100 (quantity last week)- 10% (season) 4 B 1 ? 20 108 # quantity last week, what we calculated, 90 + 20% (18) = 108. 5 B 0 80 4 80 # no promo, so = quantity col I tried to solve this in two ways: Via a groupby(), and then the Product, but this was messing up my end file (I would like to have it in the format above, so with 1 additional column. By looping over the dataframe with iterrows(). However, I messed up, because it doesn't distinct between products unfortunately. Anyone an idea what a proper method is to solve this? Appreciated! I would try the apply method for dataframes. It allows you to define a function that can perform this task to then pass to the apply method. Using custom apply function to add column to dataframe Code def calc(xf): ''' xf is dataframe from groupby ''' calc = [] # Faster to loop over rows using zip than iterrows for promo, quantity, season in zip(xf['promo[Y/N]'], xf['quantity'], xf['Season']): if not np.isnan(quantity): calc.append(quantity) # not missing value elif promo and calc: # beyond first week if calc is not None prev_quantity = float(calc[-1]) # previous quantity estimate = round((1 + season/100.)*prev_quantity) # estimate calc.append(estimate) else: calc.append(quantity) # use current quantity xf['calculated'] = calc # Add calculated column to dataframe return xf Test from io import StringIO s = '''week product promo[Y/N] quantity Season 1 A 0 100 6 2 A 0 100 10 3 A 1 ? -10 4 A 1 ? 20 5 A 0 80 4 1 B 1 100 6 2 B 0 100 10 3 B 1 ? -10 4 B 1 ? 20 5 B 0 80 4''' # convert '?' to np.nan (missing value so column become float) df = pd.read_csv(StringIO(s), sep = '\s{2,}', na_values = ['?'], engine = 'python') print(df.type) # Output week int64 product object promo[Y/N] int64 quantity float64 Season int64 dtype: object tf = df.groupby('product').apply(calc) print(tf) # Output week product promo[Y/N] quantity Season calculated 0 1 A 0 100 6 100 1 2 A 0 100 10 100 2 3 A 1 ? -10 90 3 4 A 1 ? 20 108 4 5 A 0 80 4 80 5 1 B 1 100 6 100 6 2 B 0 100 10 100 7 3 B 1 ? -10 90 8 4 B 1 ? 20 108 9 5 B 0 80 4 80 Appreciated, Not sure why, but the 'if quantity.isnumeric(): leads to an error: AttributeError: 'float' object has no attribute 'isnumeric' @Roverflow with df.dtypes, what is the type for the quantity column? I would expect it to be object since there "?" in the quantity column (i.e. string). Did you convert the '?' to np.nan so the column becomes float? Hi DarrylG, the quantity column has float64 in it @Roverflow since it is float64--how do have "?" for some values? This is easily handled but just wondering why the type is different from what's shown in your post. @Roverflow I updated my answer to show how the data types. @Roverflow 1) Add converter to read_csv so missing value '?' is converted to np.nan (allowing column to become float) and 2) modified function calc to check for nan values. groupby() is a good approach in my opinion. Let's build our dataset first : csvfile = StringIO( """week\tproduct\tpromo\tquantity\tseason 1\tA\t0\t100\t6 2\tA\t0\t100\t10 3\tA\t1\tnan\t-10 4\tA\t1\tnan\t20 5\tA\t0\t80\t4 1\tB\t1\t100\t6 2\tB\t0\t100\t10 3\tB\t1\tnan\t-10 4\tB\t1\tnan\t20 5\tB\t0\t80\t4""") df = pd.read_csv(csvfile, sep='\t', engine='python') I strongly encourage to not use '?' or other non numeric character to transcript the lack of data. It will be a mess in your future analysis. Instead use np.nan. Then let's build a function hich will translate your expected behaviour for each product : def computation(pd_input): previous_calculation = np.nan # output dataframe pd_output = pd.DataFrame(index=pd_input.index, columns=["calculation"]) # we need to loop other all your row for index, row in pd_input.iterrows(): # if promo = 0 OR for the first row, use quantity if row.promo == 0 or np.isnan(previous_calculation): pd_output.loc[index, "calculation"] = row.quantity # else, use the previous value we computed and apply the percentage else: pd_output.loc[index, "calculation"] = (1 + row.season/100) * previous_calculation previous_calculation = pd_output.loc[index, "calculation"] # return the pandas return pd_output Finally we just need to apply the previous function to our grouped dataframe : calculation = df.groupby("product", group_keys=True).apply(lambda x: computation(x)) Let's check our ouput : print(calculation ) calculation product A 0 100.0 1 100.0 2 90.0 3 108.0 4 80.0 B 5 100.0 6 100.0 7 90.0 8 108.0 9 80.0
45,429
https://stackoverflow.com/questions/45818374
StackExchange
Open Web
CC-By-SA
2,017
Stack Exchange
English
Spoken
85
429
Odoo xpath roat This is code from original report. my goal is to put my_field_name before Product. how can i reach it with xpath. <table class="table table-condensed" t-if="o.pack_operation_ids"> <t t-set="has_barcode" t-value="any([pack_operation.product_id and pack_operation.product_id.sudo().barcode or pack_operation.package_id for pack_operation in o.pack_operation_ids])"/> <t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('pack_lot_ids')" groups="stock.group_production_lot"/> <thead> <tr> <th><strong>Product</strong></th> <th class="text-right"><strong>Quantity</strong></th> <t t-if="o.picking_type_id.code != 'incoming'"><th><strong>Source</strong></th></t> <th t-if="has_barcode" class="text-center"> <strong>Barcode</strong> </th> <th t-if="has_serial_number"> <strong>Lot/Serial Number</strong> </th> <t t-if="o.picking_type_id.code != 'outgoing'"><th><strong>Destination</strong></th></t> </tr> </thead> <tbody> <xpath expr="//table[@t-if='o.pack_operation_ids']/thead/tr/th[1]" position="before"> ------ your code goes here ------ </xpath Please use above code for reference.
4,099
https://an.wikipedia.org/wiki/Club%20Atl%C3%A9tico%20de%20Madrid
Wikipedia
Open Web
CC-By-SA
2,023
Club Atlético de Madrid
https://an.wikipedia.org/w/index.php?title=Club Atlético de Madrid&action=history
Aragonese
Spoken
76
189
O Club Atlético de Madrid ye un club de fútbol espanyol d'a ciutat de Madrit, fundau o 25 d'abril de 1902. En l'anyada 2022/23 chuga actualment en a Primera División espanyola de fútbol. Plantilla 2019/2020 ''Actualizato o 1 de marzo de 2020. Equipo tecnico: Entrenador: Diego Pablo Simeone. Segundo entrenador: Germán Burgos. Entrenador de porteros: Pablo Vercellone. Preparadors fisicos: Profe Ortega. Chugadors ceditos Referencias Vinclos externos Pachina web oficial. Equipos d'a primera división espanyola de fútbol
38,106
https://eu.wikipedia.org/wiki/Ti%C5%A1t%C3%ADn
Wikipedia
Open Web
CC-By-SA
2,023
Tištín
https://eu.wikipedia.org/w/index.php?title=Tištín&action=history
Basque
Spoken
31
95
Tištín Txekiar Errepublikako udalerri bat da. 492 biztanle ditu eta 8,25 kilometro koadroko azalera. Prostějoveko barrutian dago. Historia Udalerriaren lehen aipamen idatzia 1141 urtean egin zen. Kanpo estekak Prostějoveko barrutiko udalerriak
21,869
https://stackoverflow.com/questions/5085015
StackExchange
Open Web
CC-By-SA
2,011
Stack Exchange
Diana Lee, Haaran Ajgaonkar, OTR, Rk Solanki, Victoria Tapia, https://stackoverflow.com/users/10818801, https://stackoverflow.com/users/10818802, https://stackoverflow.com/users/10818803, https://stackoverflow.com/users/10825403, https://stackoverflow.com/users/10835471, https://stackoverflow.com/users/10838519, شروحات للاندرويد
English
Spoken
248
411
Sort and shuffle optimization in Hadoop MapReduce I'm looking for a research/implementation based project on Hadoop and I came across the list posted on the wiki page - http://wiki.apache.org/hadoop/ProjectSuggestions. But, this page was last updated in September, 2009. So, I'm not sure if some of these ideas have already been implemented or not. I was particularly interested in "Sort and Shuffle optimization in the MR framework" which talks about "combining the results of several maps on rack or node before the shuffle. This can reduce seek work and intermediate storage". Has anyone tried this before? Is this implemented in the current version of Hadoop? The project description is aimed "optimization". This feature is already present in the current Hadoop-MapReduce and it can probably run in a lot less time. Sounds like a valuable enhancement to me. There is the combiner functionality (as described under the "Combine" section of http://wiki.apache.org/hadoop/HadoopMapReduce), which is more-or-less an in-memory shuffle. But I believe that the combiner only aggregates key-value pairs for a single map job, not all the pairs for a given node or rack. I think it is very challenging task. In my understanding the idea is to make a computation tree instead of "flat" map-reduce.The good example of it is Google's Dremel engine (called BigQuey now). I would suggest to read this paper: http://sergey.melnix.com/pub/melnik_VLDB10.pdf If you interesting in this kind of architecture - you can also take a look on the open source clone of this technology - Open Dremel. http://code.google.com/p/dremel/
23,260
https://vi.wikipedia.org/wiki/Chelyocarpus%20chuco
Wikipedia
Open Web
CC-By-SA
2,023
Chelyocarpus chuco
https://vi.wikipedia.org/w/index.php?title=Chelyocarpus chuco&action=history
Vietnamese
Spoken
37
76
Chelyocarpus chuco là loài thực vật có hoa thuộc họ Arecaceae. Loài này được (Mart.) H.E.Moore mô tả khoa học đầu tiên năm 1972. Tham khảo Liên kết ngoài Chelyocarpus Thực vật được mô tả năm 1972
48,113
https://es.wikipedia.org/wiki/El%20Hato%20de%20Las%20P%C3%A9rez
Wikipedia
Open Web
CC-By-SA
2,023
El Hato de Las Pérez
https://es.wikipedia.org/w/index.php?title=El Hato de Las Pérez&action=history
Spanish
Spoken
291
490
El Hato de Las Pérez (Hato Las Pérez o El Hato) es un caserío que se encuentra en el Parque nacional Sierra Nevada de Mérida. Para llegar a él, se sale de Mérida (Venezuela) por la vía que conduce a la Urbanización Carabobo o Chamita, tomando el desvío de la carretera que conduce a Acequias-El Morro-Aricagua-Los Nevados, justo en el sector conocido como El Plan. La entrada a El Hato se distingue por los abetos alineados de la casa de Los Araque, siguiendo la carretera por la Curva de Eustoquio hacia Llano del Piojo, que es la colina desde donde puede observarse El Hato en su total extensión. Pasando la casa de la Familia Quintero, llamada La Patrona, se encuentra un desvío por el cual puede llegarse a La Vega de Ejido y que era un antiguo camino que se enlazaba con la primera carretera para llegar a El Morro. Siguiendo el alineamiento de los Eucaliptos se alcanza la bifurcación de la carretera por donde puede llegarse a Escuque por la vía de Las Tapias o continuar, bordeando La Laguna Encantada, rumbo a los predios de El Verde, La Laguna Seca, Los Algodones y Los Ranchos. Los terrenos de El Hato pasaron de manos de la Iglesia católica a un siervo nativo mucubache cuyas hijas María Antonia y Natividad Pérez, dan origen al nombre completo El Hato de Las Pérez. Con las uniones nupciales de ambas hermanas, se da inicio a las sucesivas hegemonías de las familias Quintero y Dugarte, que en la actualidad ostentan nuevamente los Dugarte. El éxodo de los Quintero parece garantizar su carácter definitivo. El Hato de Las Pérez ha servido de inspiración para la obra literaria Las Flores de El Hato. El Hato de Las Perez
26,559
https://uk.wikipedia.org/wiki/%D0%90%D0%B4%D0%B0%D0%BC%20%D0%93%D0%B5%D0%BE%D1%80%D0%B3
Wikipedia
Open Web
CC-By-SA
2,023
Адам Георг
https://uk.wikipedia.org/w/index.php?title=Адам Георг&action=history
Ukrainian
Spoken
202
714
Ада́м Ґе́орг (, 8 лютого 1874, Берлін —  1948, Берлін) — німецький славіст, дослідник і популяризатор української літератури. Вивчав медицину в університетах Берліна й Ростока. Працював лікарем. У 90-х pp. 19 ст. зацікавився українською та болгарською літературами. Досліджував і популяризував у Німеччині українські народні пісні, творчість українських письменників. 1902 року відвідав Чернівці та Львів, де зустрічався з І. Франком, М. Павликом, Ольгою Кобилянською, В. Гнатюком; листувався з ними, а також із М. Грушевським та Осипом Маковеєм. У серії публікацій про Україну (1898—1900) знайомив своїх співвітчизників із подіями культурного життя України. Автор нарису «KleinruBland» («Малоросія»), у якій подав стислий огляд розвитку українського художнього слова від І. Котляревського до поч. 20 ст. Того ж року з незначними змінами була надрукована як передмова до збірки «Die kleinrussischen Novellen» («Малоруські новели») Ольги Кобилянської. Адаму належать статті «Von der modernen kleinrussischen Literatur» («Про сучасну малоруську літерату-ру»); «Ruthenischer Brief (1902 bis 1904)» («Рутенський лист»); рецензія на книгу «Taras Schewtschenko. Ausgewahlte Ge-dichte» («Тарас Шевченко. Вибрані вірші»). Твори: український переклад — Український лист (уривок); «Сторіччя української літератури (уривок)», де про Тараса Шевченка написано з позицій німецької прогресивної критики. Бібліографія Джерела  — С. 24. Проект «Українці в світі» Славісти Німецькі славісти Німецькі літературознавці Німецькі перекладачі Німецькі публіцисти Німецькі критики Німецькі шевченкознавці
41,864
https://ar.wikipedia.org/wiki/%D9%85%D8%A7%20%D9%84%D9%8A%D9%84%D9%8A
Wikipedia
Open Web
CC-By-SA
2,023
ما ليلي
https://ar.wikipedia.org/w/index.php?title=ما ليلي&action=history
Arabic
Spoken
95
249
ما ليلي (22 مارس 1989 بتيانجين في الصين - ) هو لاعب كرة قدم صيني في مركز الوسط. لعب مع كينغداو جونون ونادي تيانجين تيدا و. مراجع وصلات خارجية لاعبو كرة قدم رجالية صينيون لاعبو كرة قدم رجالية مغتربون في البرتغال لاعبو وسط كرة قدم رجالية رياضيون صينيون مغتربون في البرتغال لاعبو دوري السوبر الصيني لاعبو الدوري الصيني لكرة القدم الدرجة الأولى لاعبو كرة قدم صينيون لاعبو كرة قدم صينيون مغتربون لاعبو كرة قدم مغتربون في البرتغال لاعبو كرة قدم من تيانجين لاعبو كينغداو جونون لاعبو نادي تيانجين تيدا لاعبو نادي نيوكاسل جيتس مواليد 1989
17,233
https://stackoverflow.com/questions/5068486
StackExchange
Open Web
CC-By-SA
2,011
Stack Exchange
Arielle, Boppity Bop, Hans Passant, Jim Smith, Kadir Çolak, Tim Robinson, clever_coding, https://stackoverflow.com/users/10781150, https://stackoverflow.com/users/10781151, https://stackoverflow.com/users/10781152, https://stackoverflow.com/users/10781261, https://stackoverflow.com/users/10781330, https://stackoverflow.com/users/17034, https://stackoverflow.com/users/32133, https://stackoverflow.com/users/347484, precious
English
Spoken
313
400
C# GC. Do calls to VirtualAlloc and VirtualFree Win32 functions cause page swap? MSDN says that GC calls the Win32 VirtualAlloc function to reserve segment of memory and calls the Win32 VirtualFree to release segments back to the operating system. Does that mean each time a segment allocated/released there is a Page Fault generated (soft or hard - depends on the memory availability). Is that correct interpretation? All Windows programs use VirtualAlloc/Free. Page faults don't happen until the memory is accessed. could you please explain - if a program calls VirtualAlloc AND access the allocated memory immediately afterwards - will it ALWAYS generate page fault? Individual pages within a block allocated by VirtualAlloc are committed via soft page faults. There's no reason for a call to VirtualFree to cause page faults, however, since it's just bookkeeping. That's not to say that GC allocations always cause page faults: in the absence of a memory leak, the GC will collect garbage, and re-use the part of the heap belonging to that garbabge, before it requests more memory from the OS. can you please elaborate on the " not to say that GC allocations always cause page faults". My question was specific to GC allocating a segment. Not allocation of memory for a new object by .NET.... Are you saying that GC segment allocation is not always cause a page fault? Yes, I expect GC segment allocation to always cause page faults. That is because I expect all segment allocations to cause page faults, whether they're in code that uses a GC, or unmanaged code. Note that these will be soft page faults, which are mostly harmless. A page fault is a trap to the software raised by the hardware when a program accesses a page that is mapped in the virtual address space, but not loaded in physical memory So the short answer is NO.
49,279
https://mrj.wikipedia.org/wiki/%D0%A8%D0%BE%D0%BD%D0%B0%D0%B2%D0%BB%D3%93
Wikipedia
Open Web
CC-By-SA
2,023
Шонавлӓ
https://mrj.wikipedia.org/w/index.php?title=Шонавлӓ&action=history
Western Mari
Spoken
42
209
Шонавлӓ (шонала AmaShona) — банту группыш пырышы шона (chiShona) йӹлмӹлӓ попышы Зимбабвештӹ дӓ Мозамбикиштӹ ӹлӹшӹ халык. Шонавлӓ цилажӹ 13 000 000 нарӹн ылыт. Кугижӓнӹшвлӓ Зимбабве — 11 млн. эдем нӓрӹ Мозамбик — 2 млн. эдем нӓрӹ Ажедмӓшвлӓ Бантувлӓ Зимбабве халыквлӓ Мозамбик халыквлӓ
22,187
https://ceb.wikipedia.org/wiki/Quebrada%20de%20Guandita
Wikipedia
Open Web
CC-By-SA
2,023
Quebrada de Guandita
https://ceb.wikipedia.org/w/index.php?title=Quebrada de Guandita&action=history
Cebuano
Spoken
63
122
Suba ang Quebrada de Guandita sa Kolombiya. Nahimutang ni sa departamento sa Departamento de Cundinamarca, sa sentro nga bahin sa nasod, km sa amihanan-sidlakan sa Bogotá ang ulohan sa nasod. Ang Quebrada de Guandita mao ang bahin sa tubig-saluran sa Río Magdalena. Ang mga gi basihan niini Río Magdalena (suba sa Kolombiya, lat 11,10, long -74,85) tubig-saluran Mga suba sa Departamento de Cundinamarca
17,439
https://es.wikipedia.org/wiki/Pancheria
Wikipedia
Open Web
CC-By-SA
2,023
Pancheria
https://es.wikipedia.org/w/index.php?title=Pancheria&action=history
Spanish
Spoken
40
159
Pancheria es un género con 38 especies de plantas con flores perteneciente a la familia Cunoniaceae. Etimología El género fue nombrado en honor de Jean Armand Isidore Pancher, botánico y explorador francés. Especies seleccionadas Enlaces externos https://web.archive.org/web/20130711170000/http://biopl-a-181.plantbio.cornell.edu/ http://www.ppp-index.de/ https://web.archive.org/web/20090115165326/http://www.catalogueoflife.org/search.php Cunoniaceae
46,621
https://cs.wikipedia.org/wiki/Sigma%20Octantis
Wikipedia
Open Web
CC-By-SA
2,023
Sigma Octantis
https://cs.wikipedia.org/w/index.php?title=Sigma Octantis&action=history
Czech
Spoken
171
450
Sigma Octantis (σ Oct, σ Octantis) je hvězda zdánlivé hvězdné velikosti 5,42 v souhvězdí Oktantu, je známa jako Polaris Australis (Jižní Polárka). Od Země je vzdálena 270 světelných let a je to obr spektrální třídy F0 a také proměnná hvězda typu Delta Scuti, hvězdná velikost se mění o 0,03m v periodě dlouhé 2,3 hodin. Tato hvězda je vyobrazená na vlajce Brazílie, kde symbolizuje Federální distrikt. Jižní polární hvězda Sigma Octantis je ze všech pouhým okem viditelných hvězd nejblíže jižnímu nebeskému pólu, na jižní obloze se tedy zdánlivě téměř nepohybuje a ostatní hvězdy se otáčí kolem ní. Nachází se o něco více než 1 úhlový stupeň od jižního nebeského pólu a tato vzdálenost se v důsledku precese zvyšuje. Poloha hvězdy Hvězda je se svou hvězdnou velikostí viditelná pouhým okem jen slabě, a proto nemůže být používána jako navigační hvězda, Polárku lze k tomuto účelu použít, protože je mnohem jasnější a snáze viditelná. Z tohoto důvodu se k nalezení jižního nebeského pólu používá souhvězdí Jižního kříže. Reference Hvězdy v souhvězdí Oktantu Bíložlutí obři
44,163
https://stackoverflow.com/questions/27813448
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Chris Traynor, https://stackoverflow.com/users/2626313, https://stackoverflow.com/users/4343918, xmojmr
English
Spoken
632
1,061
Cucumber-java vs. Cucumber.js My team is developing a Java web system using the Play framework and implementing Angular.js throughout. My question is, should I use Cucumber-java or Cucumber.js for automated BDD functional testing? What are the pros and cons of each when using them against this technology stack? I've found very little online about which to use with this particular technology stack. Firstly, the Cucumber is designed as a collaboration tool. If you're looking for a test automation tool, then you're probably best off choosing something that doesn't add the overhead of devising and maintaining a plain-English, ubiquitous language. If you are collaborating with non-technical stakeholders, then Cucumber is a good choice. The whole team will collaborate writing the scenarios, but it will be the devs and testers that write the 'glue' that links the scenarios to the application you're building. If you choose Cucumber-JVM you'll write the glue code in Java/Groovy (or other JVM language); if you choose Cucumber-JS you'll write the glue code in Javascript. So, one of the questions to ask is "what language will my testers and devs be most comfortable using?" You'll probably mostly drive your app through an interface that it exposes(e.g. the GUI or a published RESTful API). Whichever Cucumber you choose, your 'glue' code will use some other library to interact with your application (e.g. Selenium WebDriver), so another question to ask yourself is "are the libraries I need available for Java or Javascript?" Sometimes you might want your 'glue' code to talk directly to your application code. Cucumber-JS 'glue' can easily call Javascript directly, Cucumber-JVM 'glue' can easily call Java directly - so that might affect your choice. Remember, though, that only a minority of your scenarios will normally bypass your application's interface, so if this is your major stumbling block, you should revisit your approach to BDD. Some of these tradeoffs are also discussed in these slides Finally, my feeling is that Cucumber-JVM is currently more mature than Cucumber-JS. Aslak Helesøy and Julien Biezeman are founders of Cucumber Ltd (along with Matt Wynne), so I expect them to reach parity at some point. For more information about Cucumber take a look at their online videos or <personal_plug>buy The Cucumber for Java Book</personal_plug>. Before signing a vendor-lock from the open source perspective I would compare: number of open issues, the less the better, no serious issue should be left open for years number of unapproved pull requests, the less the better, no request should be left pending for months what the key developers say about their product your estimated technology learning costs ...? Cucumber-JVM Issues: GitHub: /cucumber/cucumber-jvm/issues Pull requests: GitHUb: /cucumber/cucumber-jvm/pulls Heroes: GitHub: /cucumber/cucumber-jvm/graphs/contributors → Aslak’s view of BDD, Cucumber and automated testing, December 12, 2014 Cucumber.js Issues: GitHub: /cucumber/cucumber-js/issues Pull requests: GitHub: /cucumber/cucumber-js/pulls Heroes: GitHub: /cucumber/cucumber-js/graphs/contributors → Cucumber.js for BDD in JavaScript: An Interview with Julien Biezemans, April 15, 2014 User's voice may be also a good indicator but that would fall into the site's off-topic category primarily opinion-based Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. Great run down and thanks for the links @xmojmr. Have you had any first hand experience with one or the other? @ChrisTraynor Nope. I had a look at both and then decided to use lightweight unit testing framework based on the Gherkin philosophy where both feature and it's steps are defined in one TypeScript external module (not 2 different files). Test reports created in Test Anything Protocol format. I'm testing node.js + TypeScript application, no external business users defining any high-level scenarios, so my choice was "natural". It works, BDD-cucumber-style test design is nice, no new weird tools to install/learn
16,709
https://stackoverflow.com/questions/59772356
StackExchange
Open Web
CC-By-SA
2,020
Stack Exchange
Smilez June , aseriesofdarkcaves, https://stackoverflow.com/users/4214228, https://stackoverflow.com/users/7125873
English
Spoken
283
438
Orchestrating Talend Jobs/ Tasks with Azure Data Factory is it posssible to orchestrate Talend Jobs with Azure Data factory? On the talend website, there is an API called Metaservlet. Has any one used it with Data factory API to orchestrate/ trigger Talend Jobs? If you can make RESTful calls via Azure Data Factory, you should be able to use the Metaservlet API (which isn't actually RESTful, but uses a more RPC style). However, in my experience the Metaservlet API isn't very secure (or implemented well for that matter) as you have to send your JSON payload via a Base64 encoded URL query parameter. Most of the time, you'll be sending a username and password within that Base64 encoded string. This is pretty much like sending the username and password in cleartext - which isn't the sort of thing you should be doing anywhere, let alone over the Internet. As an alternative, you could implement your own more secure REST wrapper as a proxy for the Metaservlet API. How do you implement a secure REST wrapper? You could use Talend ESB Routes (not jobs) to create a REST service with Apache Camel. As for deployment, you have options: deploy it in the same Tomcat container that TAC is using (metaservlet API is also in this container) or you can use Talend Runtime, which is based on Apache Karaf. Either way, you should be calling the metaservlet locally in the REST implementation so that you don't leak your passwords via URL. Tomcat or Runtime will manage HTTPS and certificates, so you don't need to implement that yourself if you use Talend Routes. Check out the Talend help website. This link should help you out: https://help.talend.com/reader/eZlGM25B48v7aoSuC92FqQ/IVd5gndDACbq3fAi8helGA
7,052
https://en.wikipedia.org/wiki/Diving%20at%20the%202022%20Asian%20Games%20%E2%80%93%20Women%27s%2010%20metre%20platform
Wikipedia
Open Web
CC-By-SA
2,023
Diving at the 2022 Asian Games – Women's 10 metre platform
https://en.wikipedia.org/w/index.php?title=Diving at the 2022 Asian Games – Women's 10 metre platform&action=history
English
Spoken
40
71
The women's 10 metre platform competition at the 2022 Asian Games took place on 3 October 2023 at the Hangzhou Olympic Sports Expo Center. Schedule All times are China Standard Time (UTC+08:00) Results Preliminary Final References Women's 10 metre platform
46,185
https://ceb.wikipedia.org/wiki/Catenaria%20allomycis
Wikipedia
Open Web
CC-By-SA
2,023
Catenaria allomycis
https://ceb.wikipedia.org/w/index.php?title=Catenaria allomycis&action=history
Cebuano
Spoken
50
97
Espesye sa uhong sakop sa division nga Blastocladiomycota, ug nga gihulagway ni John Nathaniel Couch ni adtong 1945 ang Catenaria allomycis. Ang Catenaria allomycis sakop sa kahenera nga Catenaria sa kabanay nga Catenariaceae. Pagka karon wala pay siak nga nalista ubos niini niya. Ang mga gi basihan niini Uhong Catenaria
677
https://stackoverflow.com/questions/63909491
StackExchange
Open Web
CC-By-SA
2,020
Stack Exchange
D. SM, Luney1788, dododo, https://stackoverflow.com/users/14283615, https://stackoverflow.com/users/9492730, https://stackoverflow.com/users/9540925
English
Spoken
609
1,321
MongoDB Changestream Filters Currently using the MongoDB.Driver v2.11.0 in a .Net Core 3.1 application. Trying to read values from a changestream and have been following the documentation here: https://mongodb.github.io/mongo-csharp-driver/2.11/reference/driver/change_streams/ My problem is i'm trying to only get objects with a specific type and updated field, but cannot get both filters working. I can get the changestream to grab only objects that have a type of Z from the fulldocument, but cannot get any updateDescription.updatedFields filters to work properly. Object public class Abc { [BsonElement("d")] public D D{ get; set; } [BsonElement("e")] public E E{ get; set; } } public class D { [BsonElement("type")] public string Type{ get; set; } } public class E { [BsonElement("e")] public F F{ get; set; } } public class F { [BsonElement("status")] public string Status { get; set; } } So after connecting to mongo and getting the collection here is the code to setup the change stream. protected ChangeStreamOptions _changeStreamOptions => new ChangeStreamOptions { FullDocument = ChangeStreamFullDocumentOption.UpdateLookup }; public IChangeStreamCursor<ChangeStreamDocument<Abc>> GetChangeStreamCursor() { return _collection.Watch(ConfigurePipeline(), _changeStreamOptions); } private PipelineDefinition<ChangeStreamDocument<Abc>, ChangeStreamDocument<Abc>> ConfigurePipeline() { List<IPipelineStageDefinition> pipeline = new List<IPipelineStageDefinition>(); pipeline.Add(PipelineStageDefinitionBuilder.Match(ConfigureFilters())); return pipeline; } private FilterDefinition<ChangeStreamDocument<Abc>> ConfigureFilters() { var builder = Builders<ChangeStreamDocument<Abc>>.Filter; //here is where I build the filters and having the issues. //if its just based on the object type It works. return builder.Eq("fullDocument.d.type", "z"); } This works and have no problems getting only objects that had a type of Z that were updated. If I try to then also add a filter to only return objects of the Z and that had the field Status to have been updated to a specific type. Here is what I've tried for that: builder.Eq("fullDocument.d.type", "z") & builder.AnyEq(x => x.UpdateDescription.UpdatedFields.Values, "Action"); builder.Eq("updateDescription.updatedFields.e.f.status", "Action"); builder.Eq("e.f.status", "Action"); The application will run with this but just never picks up any changes. Also only tried looking at the updated fields since the UpdateDescription.UpdatedFields is an array. builder.ElemMatch(x => x.UpdateDescription.UpdatedFields, x => x.Name == "e.f.status" && x.Value == "Action") This fails in the program main with this error Unable to determine the serialization information for x => x.UpdateDescription.UpdatedFields.' Simply put I need to create a change stream and only get back objects that have a specific property type in the fulldocument and where another property was updated to a specific type. Any help would be appreciated! Edit Update: If I change the types to be a BsonDocument I can pass this as the pipeline and it works: So I got it working with a BsonObject and using this: var filter = "{ $and: [ { operationType: 'update' }, " + "{ 'fullDocument.d.type' : 'z'}" + "{ 'updateDescription.updatedFields': { 'e.f.status': 'Action' } } ] }"; But I would like to keep it typed if possible. Get this working in mongo shell first, if you have difficulty remove everything .net related from the question and only leave shell commands. Agree with the above, also regarding: This fails in the program main with this error, try using BsonDocument instead Abc (or any other classes). It will allow you to avoid any serialization issues, at least in the beginning So I got it working with a BsonObject and using this: var filter = "{ $and: [ { operationType: 'update' }, " + "{ 'fullDocument.d.type' : 'z'}" + "{ 'updateDescription.updatedFields': { 'e.f.status': 'Action' } } ] }"; See edit above for formatting. see also this example https://github.com/mongodb/mongo-csharp-driver/blob/master/tests/MongoDB.Driver.Examples/ChangeStreamExamples.cs#L130. You should be able using your typed way instead BsonDocument in this line https://github.com/mongodb/mongo-csharp-driver/blob/master/tests/MongoDB.Driver.Examples/ChangeStreamExamples.cs#L156 So I figured out a solution that is working for me the way I described above. private FilterDefinition<ChangeStreamDocument<Abc>> ConfigureFilters() { var builder = Builders<ChangeStreamDocument<Abc>>.Filter; var filters = builder.And(builder.Eq("fullDocument.d.type", "z") & new BsonDocument("e.f.status", new BsonDocument("$eq", "Action"))); return filters; }
30,542
https://fa.wikipedia.org/wiki/%D8%A7%D9%84%DA%A9%D8%B3%DB%8C%D8%A7%20%D8%AF%D9%84%DA%AF%D8%A7%D8%AF%D9%88
Wikipedia
Open Web
CC-By-SA
2,023
الکسیا دلگادو
https://fa.wikipedia.org/w/index.php?title=الکسیا دلگادو&action=history
Persian
Spoken
70
201
الکسیا دلگادو (؛ زادهٔ ) بازیکن فوتبال اهل مکزیک است. وی همچنین در تیم‌های ملی فوتبال Mexico women's national under-17 football team, Mexico women's national under-20 football team، و زنان مکزیک بازی کرده‌است. منابع افراد زنده بازیکنان فوتبال زن اهل مکزیک بازیکنان فوتبال زن دور از وطن در ایالات متحده آمریکا زادگان ۱۹۹۹ (میلادی) ورزشکاران اهل تپیک ورزشکاران دور از وطن اهل مکزیک در ایالات متحده آمریکا هافبک‌های زن فوتبال
33,402
https://ceb.wikipedia.org/wiki/Callerinnys%20statheuta
Wikipedia
Open Web
CC-By-SA
2,023
Callerinnys statheuta
https://ceb.wikipedia.org/w/index.php?title=Callerinnys statheuta&action=history
Cebuano
Spoken
42
81
Kaliwatan sa alibangbang ang Callerinnys statheuta. Una ning gihulagway ni Louis Beethoven Prout ni adtong 1932. Ang Callerinnys statheuta sakop sa kahenera nga Callerinnys, ug kabanay nga Geometridae. Walay nalista nga matang nga sama niini. Ang mga gi basihan niini Insekto Callerinnys
16,763
https://eo.wikipedia.org/wiki/Sablokalidro
Wikipedia
Open Web
CC-By-SA
2,023
Sablokalidro
https://eo.wikipedia.org/w/index.php?title=Sablokalidro&action=history
Esperanto
Spoken
535
1,258
La Sablokalidro (Calidris alba, Crocethia alba aŭ Erolia alba) estas eta kalidro kaj eta vadbirdo de la familio de Skolopedoj kaj ordo de Ĥaradrioformaj. Disvastiĝo Tiu kalidro reproduktiĝas en tundro de nordaj Alasko, Gronlando, Siberio kaj Kanado. Ĝi estas ĉirkaŭpola arkta reproduktanto kaj longdistanca migranto kiu vintras suden en Ameriko el Usono suben, en centra kaj suda Eŭropo, Afriko, suda Azio kaj Aŭstralio. Ĝi estas tre socia vintre, foje formante grandajn arojn en marbordaj kotejoj aŭ sablaj strandoj. Aspekto Ĝi estas sufiĉe malsimila al aliaj kalidroj laŭ aspekto, kio supozigas la fakton, ke ĝi estu lokita en unutipa genro Crocethia. Lastatempaj pristudoj (Thomas et al., 2004) indikas tamen, ke la Sablokalidro estas preskaŭ tipa "kalidro" aŭ eta kalidro kaj estu disigita de la grandaj kalidroj de la preciza genro Calidris kaj lokita kun siaj samgenranoj en aparta genro. La Sablokalidro estas simila laŭ grando -20 cm longa kaj pezo 55 ĝis 85 g- al la Bunta kalidro, sed pli fortika kaj kun maldika beko. Ĝi montras fortan blankan flugilstrion dumfluge kaj nigran centran strion en blankoborda pugo kaj griza vosto. Someraj plenkreskuloj estas ruĝbrunaj dorse, bruste kaj kape. La dorso tamen estas forte markita de nigraj plumoj ĝis la vosto. Krome estas nigra traokula strio. La gorĝo kaj la tuta ventro estas blankaj. La kruroj, okulo kaj beko nigraj. La vintra birdo estas tre pala -la plej pala kalidro-, preskaŭ blanka escepte helgrizaj dorso, krono kaj traokula strio kaj preskaŭ nigra makulo en ŝultro. Tiu blankeco estas la kialo de la scienca latinlingva nomo, alba, kiu estas latina vorto por "blanka". Junuloj estas makulitaj je blanko kaj nigro kaj montras pli da kontrasto ol plenkreskuloj. Kutimoj La Sablokalidro kuras laŭ la sablaj strandoj aŭ estuaroj per specifa rapideco kiel de "biciklado", kun oftaj haltiĝoj por pluki etajn manĝerojn kaj forkuro el venantaj ondoj. Ĝi manĝas etajn krabojn kaj aliajn etajn senvertebrulojn. Printempe tiuj birdoj migras norden el ekzemple Sudameriko kaj manĝas grandajn kvantojn de ovoj de Hufuma krabo en la golfeto Delavaro. Printempe la birdoj alvenas al arktaj reproduktejoj (vidu mapon), kie la ino demetas 3-4 ovojn en surplanka truo. Poste, somere, vizaĝo kaj gorĝo iĝas ruĝeca. En nestejoj tiuj birdoj manĝas ĉefe insektojn kaj iome da planta materialo. Foje ili estas monogamaj, foje la ino demetas por pli ol unu masklo, foje faras duan demetadon por sia masklo dum ŝi zorgas la unuan. La konduto de la Sablokalidro estas diferenciga kiam la grando ne povas sufiĉi kaj la reprodukta plumaro povas esti miskonsiderata kiel alia variaĵo de kalidro, aŭ vintra plumaro povas estis misidentigita kiel de Bunta kalidro aŭ Granda kalidro. Ĝi povas esti identigita disde aliaj etaj vadbirdoj pro manko de malantaŭa fingro. Ili vivas ĝis 13 jarojn. Sablokalidro estas unu el la specioj protektitaj de la Traktato por la Konservado de afrikaeŭraziaj migrantaj akvobirdoj (AEWA). Bildaro Referencoj Thomas, Gavin H.; Wills, Matthew A. & Székely, Tamás (2004): A supertree approach to shorebird phylogeny. BMC Evol. Biol. 4: 28. PDF plena teksto Kroma Materialo Eksteraj ligiloj filmoj pri Sablokalidro Interreta Birdo Kolekto Informaro pri specio Sablokalidro - Laboratorio Cornell pri Ornitologio Sablokalidro Calidris alba - Birdidentigejo USGS Patŭent Sanderling Informaro kaj fotoj pri Sablokalidro - Birdoj kaj Birdumo ĉe Suda Dakoto Birdoj Ĥaradrioformaj
35,113
https://sh.wikipedia.org/wiki/Glicerofosfoholinska%20fosfodiestaraza
Wikipedia
Open Web
CC-By-SA
2,023
Glicerofosfoholinska fosfodiestaraza
https://sh.wikipedia.org/w/index.php?title=Glicerofosfoholinska fosfodiestaraza&action=history
Serbo-Croatian
Spoken
43
217
Glicerofosfoholinska fosfodiestaraza (, glicerofosfinikoholinska diesteraza, glicerilfosforilholindiesteraza, sn-glicero-3-fosforilholin diesteraza, glicerolfosforilholinska fosfodiesteraza, glicerofosfohidrolaza) je enzim sa sistematskim imenom sn-glicero-3-fosfoholin glicerofosfohidrolaza. Ovaj enzim katalizuje sledeću hemijsku reakciju sn-glicero-3-fosfoholin + H2O holin + sn-glicerol 3-fosfat Ovaj enzim takođe deluje na sn-glicero-3-fosfoetanolamin. Reference Literatura Spoljašnje veze EC 3.1.4
25,279
https://stackoverflow.com/questions/58119081
StackExchange
Open Web
CC-By-SA
2,019
Stack Exchange
Boardy, Eugen Pechanec, Kuvonchbek Yakubov, https://stackoverflow.com/users/1466046, https://stackoverflow.com/users/2444099, https://stackoverflow.com/users/499448, https://stackoverflow.com/users/7007177, https://stackoverflow.com/users/9351811, magicandre1981, quant
English
Spoken
196
334
Windows 10 blue screen of death when starting AVD Android 10.0 API 29 When I create new AVD Android 10.0 API 29 and run it then Windows 10 shows blue screen of death. AVD Android 9.0 and 8.1 working fine. Laptop: Dell G3, CPU i5-8300H 4.0 GHz, 8GB RAM, 256GB SSD This should be targeted at Google issue tracker. First, go through known bugs, if you don't find anything report new issue. Could this hardware be a problem? Have you tried here https://stackoverflow.com/questions/3550421/android-emulator-gives-blue-screen-of-death?rq=1 update HAXM driver Like @magicandre1981 I'd update the Intel HAXM driver and ensure that in android studio all SDK updates are installed. If no luck there like Eugen Pechanec said, looking and/or raising an issue with the Google issue tracker is probably the best place I've updated HAXM driver. Windows 10 didn't show BSOD, but AVD shows only black screen change GPU settings for the virtual phone GPU changed; didn't work Thank you guys, I have fixed it by using x86_64 image. Before I was using x86 image. Make sure that the Intel HAXM is updated. File > Settings > Appearance & Behavior > System Settings > Android SDK | SDK Tools Tab
45,369
https://pl.wikipedia.org/wiki/Lahti%20%28stacja%20kolejowa%29
Wikipedia
Open Web
CC-By-SA
2,023
Lahti (stacja kolejowa)
https://pl.wikipedia.org/w/index.php?title=Lahti (stacja kolejowa)&action=history
Polish
Spoken
23
56
Lahti () – stacja kolejowa w Lahti, w Finlandii. Budynek dworca pochodzi z roku 1935. Stacje i przystanki kolejowe w regionie Päijät-Häme Lahti
38,989
https://ceb.wikipedia.org/wiki/Augustadt%20Dam
Wikipedia
Open Web
CC-By-SA
2,023
Augustadt Dam
https://ceb.wikipedia.org/w/index.php?title=Augustadt Dam&action=history
Cebuano
Spoken
171
262
Alihan sa tubig ang Augustadt Dam sa Tinipong Bansa. Nahimutang ni sa kondado sa Traill County ug estado sa North Dakota, sa sentro nga bahin sa nasod, km sa amihanan-kasadpan sa Washington, D.C. ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Augustadt Dam. Ang yuta palibot sa Augustadt Dam kay patag. Ang kinahabogang dapit sa palibot dunay gihabogon nga ka metro ug km sa habagatan-sidlakan sa Augustadt Dam. Kunhod pa sa 2 ka tawo kada kilometro kwadrado sa palibot sa Augustadt Dam. Ang kinadul-ang mas dakong lungsod mao ang Hunter, km sa habagatan-sidlakan sa Augustadt Dam. Hapit nalukop sa kaumahan ang palibot sa Augustadt Dam. Sa rehiyon palibot sa Augustadt Dam, mga kanal talagsaon komon. Ang klima hemiboreal. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hulyo, sa  °C, ug ang kinabugnawan Enero, sa  °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Hunyo, sa milimetro nga ulan, ug ang kinaugahan Nobiyembre, sa milimetro. Saysay Ang mga gi basihan niini Mga tinukod sa North Dakota
15,142
https://hy.wikipedia.org/wiki/%D4%B4%D5%B4%D5%AB%D5%BF%D6%80%D5%AB%20%D5%88%D6%82%D5%AC%D5%B5%D5%A1%D5%B6%D5%B8%D5%BE%D5%AB%20%D6%83%D5%B8%D5%B2%D5%B8%D6%81%20%28%D5%85%D5%A1%D5%AC%D5%A9%D5%A1%29
Wikipedia
Open Web
CC-By-SA
2,023
Դմիտրի Ուլյանովի փողոց (Յալթա)
https://hy.wikipedia.org/w/index.php?title=Դմիտրի Ուլյանովի փողոց (Յալթա)&action=history
Armenian
Spoken
186
982
Դմիտրի Ուլյանովի փողոց (), փողոց Ղրիմի Յալթա քաղաքի Վասիլևկա միկրոշրջանում։ Անվանվել է ռուսաստանյան հեղափոխական շարժման գործիչ, Վլադիմիր Լենինի կրտսեր եղբայր Դմիտրի Իլյիչ Ուլյանովի (1874-1943) պատվին։ Սկիզբ է առնում Յուժնոբերեժնոյե խճուղուց և ավարտվում Գոռնայա փողոցի հետ հատումով։ Երկարությունը 1200 մետր է։ Նկարագրություն Յալթա քաղաքի Դմիտրի Ուլյանովի փողոցը գտնվում է Վասիլևկա միկրոշրջանում։ Այն սկսվում է Յուժնոբերեժնոյե խճուղուց, հատում Ռեպինի փողոցը, Պրոլետարսկայա փողոցը, Պրոսմուշկինների փողոցը, Ուլյանովի նրբանցքը, Ա. Ի. Կազանցևի փողոցը և ավարտվում Գոռնայա փողոցի հետ հատումով։ Փողոցում կա համարակալված 63 շինություն։ Երկարությունը 1200 մետր է։ Դմիտրի Ուլյանովի փողոցի փոստային դասիչն է՝ 298624։ Փողոցն անվանվել է ռուսաստանյան հեղափոխական շարժման գործիչ, Վլադիմիր Լենինի կրտսեր եղբայր Դմիտրի Իլյիչ Ուլյանովի (1874-1943) պատվին։ 1902 թվականից որպես բժիշկ նա աշխատել է Ռուսաստանի հարավային շրջաններում։ 1903 թվականին հեղափոխական աշխատանքներ է կատարել Տուլայում, եղել է ՌՍԴԲԿ 2-րդ համագումարի պատգամավոր, ապա ՌՍԴԲԿ գործակալը Կիևում։ Բազմիցս ձերբակալվել է։ 1905-1907 թվականների հեղափոխության տարիներին որպես բժիշկ աշխատել է Սիմբիրսկում։ Մասնակցել է Ղրիմում խորհրդային իշխանության համար պայքարին։ Ծանոթագրություններ Աղբյուրներ Улица Дмитрия Ульянова в Ялте Подробная карта улица Ульянова Д., город Ялта со спутника с номерами домов, индекс и маршруты, Яндекс, Гугл карта Արտաքին հղումներ г. Ялта, улица Дмитрия Ульянова Յալթայի փողոցներ
12,914
https://stackoverflow.com/questions/71736210
StackExchange
Open Web
CC-By-SA
2,022
Stack Exchange
Astrid E., J. S. Garcia, Paul Sinnema, Somar Zein, https://stackoverflow.com/users/15406539, https://stackoverflow.com/users/17213526, https://stackoverflow.com/users/17269871, https://stackoverflow.com/users/561380
English
Spoken
442
688
How to use LINQ Group Records and use Distinct given this Records class Record { DateTime Date {get; set;} string Article {get; set;} string Platform { get; set;} string Amount { get; set;} } With a sql query I get a list of Records and want to Group the Platforms by Article. I do this query: List<Record> recordList = FetchRecords(); var group = recordList.GroupBy( f => f.Article, (key, g) => new { Article= key, Platforms = g.Select(p => p.Platform).ToList() }); There are around 120 different Articles and about 30 different platforms, so the expected amount of items in group is around 120 yet I am recieving thousands of items. Items in record list are a lot as its the stock of all articles in the last 30 Days so I want to get a distinct list of Articles. I just can't figure out where to do this. what am I missing? Edit: After further inspecting the Data at runtime I just noticed that I have it backwards. the Articles are already correctly grouped, the platforms are the ones that need to be distinct, like Astrid E was guessing in the comments Of what do you want to get a distinct list? Do you mean distinct Platform values for each Article? Property Article is from type string, do you have constraints on input of this property (e.g Capital/Small letters) or it you set a const value inside it? What are you using Entity Framework? Where does the list come from? It would be better if you showed some more code surrounding your problem. If you resolve the list before you do your grouping all rows will be fetched into memory. @AstridE. Expected result is a list of distinct articles, each with all platforms that were related to this article. @SomarZein the Article Property is filled from database, there is no user input. As mentioned in the question there are about 120 Articles @PaulSinnema I get the recordList from a SQL Query which I parse into List wich is the recordList I'm unable to quality check this at the moment, but does this bring you closer to your desired result? Platforms = g.Select(p => p.Platform).Distinct().ToList() @AstridE. Yes, this is exactly what i was needing, thank you. if you post this as answer I'll accept it You can return distinct values of the Platform collection by using Enumerable.Distinct(). The Platforms value in the result selector in your .GroupBy() operation should be computed as follows: Platforms = g.Select(p => p.Platform).Distinct().ToList() Maybe you could try something like this: var group = recordList.GroupBy(r => r.Article) .Select(a => new { Article = a.Key, Platforms = a.GroupBy(g => g.Platform) });
844
https://apple.stackexchange.com/questions/206569
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
At0micMutex, MicroMachine, Tom Gewecke, cubuspl42, ftartaggia, https://apple.stackexchange.com/users/132532, https://apple.stackexchange.com/users/143445, https://apple.stackexchange.com/users/147666, https://apple.stackexchange.com/users/49804, https://apple.stackexchange.com/users/50394
English
Spoken
332
422
Why does iOS 9 have different glyphs for some characters on keyboard vs. on screen? With the new San Francisco font in iOS 9 (honestly, I had never paid attention to this in previous versions), I notice that, for some characters, the glyph that actually gets put on the screen after pressing the corresponding key on the keyboard is different from the glyph on the keyboard itself. This happens, for example, with the apostrophe, as you can see from this screenshot. Does this happen for a reason? Have you sent feedback to Apple? apple.com/feedback Are you sure that the font used for keyboard visualization and the one used in the Notes app is indeed the same font? There is no necessary connection between the exact form of the keyboard character and what you see in an app. The keyboard uses the system font, apps can normally use all kinds of different fonts. But two different fonts, especially the keyboard and Notes ones, should have the same amount of characters and therefore display them quite similarly... I assumed that apple own apps used system font (I posted a screenshot from Notes, but the same thing happens in Messages, etc.) and, as far as I can tell, the other characters seem to be using the system font. This problem has existed an every version of iOS until 10 as far as I know, and best I can figure is intentional since it probably would have been fixed by now. It's just more visible with San Francisco. I don't know why Apple does it. Could it be that it looks better on the keyboard? iOS 11 no longer has this behavior as it has added "smart quotes" à la Microsoft Word. Most of the time, as a result, you you will see the character you expected to see typed. To avoid having your sms limit cut to 70, you need to turn off this smart punctuation feature, which is on by default for some users.
22,752
https://stackoverflow.com/questions/66563372
StackExchange
Open Web
CC-By-SA
2,021
Stack Exchange
https://stackoverflow.com/users/1426539, yivi
English
Spoken
130
262
Symfony Filesystem chmod() sets the incorrect permissions I am using the Symfony's Filesystem component, specifically chmod function: $this->filesystem->copy($file_path, $target_file, TRUE); $this->filesystem->chmod($target_file, '0777'); But on the terminal the permissions are weird: $ ls -la 1.mp4 -r----x--t 1 user user 3557378 mar 10 07:55 1.mp4 It is supposed to look like this: -rwxrwxrwx 1 user user 3557378 mar 10 07:55 1.mp4 Am I doing something wrong? I'm using the 5.2.4 version. You are passing a string, and chmod() expects an octal number ( chmod($targetfile, 0777);). Have you tried that? public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false) The second param of the function is the number, you are passing a string. And check that you have a correct file owner, usually web servers working with www-data user
24,690
https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D1%86%D0%BA%D0%B8%D0%B9%2C%20%D0%94%D0%BE%D0%B2-%D0%91%D0%B5%D1%80%20%D0%90%D0%B9%D0%B7%D0%B8%D0%BA%D0%BE%D0%B2%D0%B8%D1%87
Wikipedia
Open Web
CC-By-SA
2,023
Слуцкий, Дов-Бер Айзикович
https://ru.wikipedia.org/w/index.php?title=Слуцкий, Дов-Бер Айзикович&action=history
Russian
Spoken
743
2,306
До́в-Бе́р А́йзикович Слу́цкий (; 26 июня 1877, Городище, Киевская губерния, Российская империя — 1955, Александровский централ, Иркутская область, СССР) — еврейский советский писатель, переводчик, журналист, лексикограф и филолог. Писал на иврите и идише. Биография Бер (Дов-Бер) Слуцкий родился 26 июня 1877 года в зажиточной семье Айзика Слуцкого в деревне вблизи местечка Городище Черкасского уезда Киевской губернии. В детстве учился в хедере, затем занимался самообразованием. Рано заинтересовался современной литературой. В молодом возрасте переехал в Одессу, где познакомился с поэтом Хаимом-Нахманом Бяликом, который посоветовал ему печататься на иврите. В молодости был близок к сионистскому движению, но в политических организациях не состоял. Дебютировал в 1903 году в издании «Луах Ахиасаф», где опубликовал очерк «Лифней хa-саар» («Перед грозой»). В 1905 Слуцкий году опубликовал свое первое произведение на идише в петербургской газете «Дер фрайнд» («Друг»). Нашумевшее произведение под названием «Идиш!», напечатанное в форме письма в редакцию, стало программным и оказало значительное влияние на основание системы школьного образования на родном языке ашкеназских евреев. Перейдя на «маме лошн», публиковал на идиш рассказы, фельетоны, статьи в газетах «Фолкс-штимэ», «Хайнт», «Дер фрайнд». Жил и работал в Одессе, Киеве, Вильно и Варшаве. После Октябрьской революции 1917 года сотрудничал с варшавской ежедневной газетой «Ди найе цайт» («Новое время»), киевских «Ди комунистише фон» («Коммунистическое знамя»), «Дер штерн» («Звезда»), московской «Дер эмес» («Правда»), и рядом других. Писал материалы под псевдонимом Б. Маринский и отправлял их из Киева в нью-йоркскую газету «Фрайхайт» («Свобода») и аргентинскую «Ди пресэ». Дов-Бер Слуцкий известен в том числе как ученый-филолог. В 1919 году в киевском педагогическом журнале «Шул ун лебн» опубликовал статью о еврейской терминологии ремонта часов. Вслед за этим последовали публикации: «Дер лексикон фун менер-шнайдерай» («Лексикон шитья мужской одежды», журнал «Цайтшрифт», Минск, 1926–28), «Идише бадхоним-шойшпилер» («Еврейские бадханы-актеры», там же, 1926), «Лексикон фун политише унд фремдвертер» («Лексикон политических терминов и иноязычных заимствований», Киев, «Култур-лиге», 1929). В словаре Б. Слуцкий отразил либеральные подходы к политическим процессам и институтам, существовавшим в первой половине 1920-х годов. Статьи «Бунд», «Троцкий» и другие «написаны с советских позиций, но без политической обостренности». В 1930 году стал научным сотрудником филологической секции Института еврейской пролетарской культуры. Помимо работы над словарем языка идиш активно занимался переводами. Переводил на идиш прозу европейских, русских и ивритских писателей. Являлся автор первого перевода «Анны Карениной» Л. Н. Толстого и целого ряда других произведений. В годы Великой Отечественной войны в эвакуации в Узбекистане и Казахстане. Находясь в Алма-Ате, писал корреспонденции в газету «Эйникайт» о положении эвакуированных евреев, продолжал трудиться над историческим романом о восстании Бар-Кохбы «Фар эрд, фар фрайhайт» («За землю, за волю»). В 1946 году по приглашению группы литераторов Дальнего Востока приехал в Еврейскую автономную область. Заведовал еврейским отдела областного краеведческого музея. Как знаток языка идиш и штатный переводчик областного радиокомитета, выступал в эфире, печатался в «Биробиджанер штерн». Арестован по обвинению в еврейском буржуазном национализме 29 августа 1949 года по «Биробиджанскому делу» . Осужден 31 мая 1950 года Особым совещанием при МГБ СССР по ст.ст. 58-10 ч. 2, 58-11 УК РСФСР на 10 лет ИТЛ. Умер в 1955 году в больнице Александровского централа. Реабилитирован 14 сентября 1956 года за отсутствием состава преступления. Семья Жена – библиограф, сотрудник Института еврейской пролетарской культуры Доба Нусинсон (1895 - 1941), приемная дочь – Мина Самуиловна Кантор Гулько (род. 1930) Основные произведения Ами Мордехай, Д.Б. Слуцкий. Файвел дер гройсер ун Фавел дер кляйне. Нью-Йорк, Макс Н. Майзель, 1918. – 34 c. Белая Коза / с французского Д. Б. Слуцкий. – Киев: «Киевер ферлаг», 1919. – 14 с. Бреннер И.Х. Арум а пинтеле («Вокруг точки»). – Берлин: Идишер литиратуришер ферлаг, 1923. – 203 c. Лексикон политических и иностранных слов и выражений / Составитель Б.Слуцкий; Редакторы И. Либерберг и Г. Казакевич. – Киев: Кооперативное издательство «Культур-лига», 1929. — 1005 с. Слуцкий Б. Аф риштованьес («На строительных лесах»). – Киев: Центр-фарлаг, 1931. – 245 c. Орланд Г., Слуцкий Б. Вос гевен ун вос геворн («Что было и что стало»: сборник). – Киев: Мэлухе-фарлаг фар ди нацминдэрhайтн ин УССР, 1937 – 216 c. Слуцкий Б. Слуцкий Б. Фунем виснт амоль: ан эмэсэ майсэ («Из проклятого прошлого: Правдивая история»). – «Дэр Штерн», 11.06.1938. Слуцкий Б. Фар эрэ, фар фрайхайт («За честь, за свободу») // «Советиш геймланд», №8-12 ( август-сентябрь), 1991. Библиография Меир Шалант. Бер Слуцкий – писатель-герой, писатель-мученик ( Отрывки из воспоминаний к 30 - летию со дня смерти) // Промолчавши жизнь. Иерусалим: В.Глозман, предисл. Рахиль Баумволь. 1983. – 247 c. Хаим Бейдер. Дов Бер Слуцкий // Этюды о еврейских писателях. — Киев: Дух i Лiтера, 2003. — 335 с. Примечания Персоналии:Биробиджан Детские писатели по алфавиту Детские писатели СССР Репрессированные в СССР Переводчики на идиш
1,972
https://stackoverflow.com/questions/19140353
StackExchange
Open Web
CC-By-SA
2,013
Stack Exchange
Gonzalo Solera, https://stackoverflow.com/users/2598977
English
Spoken
251
422
FFmpeg on Android - Unable to find a suitable output format I want to reduce the resolution of a video before edit it, so I´m using ffmpeg on android. I´m using the executable/binary file of ffmpeg and I´m calling my ffmpeg commands like that: ./ffmpeg -i /sdcard/dcim/video.mp4 -s 320x240 -r 10 -y /sdcard/output.mp4 But when I try this command I get this error: Unable to find a suitable output format for /sdcard/output.mp4 This is the output when I use the adb shell: The only action I have been able to do is to extract the audio of a video and save it as a mp3 using this command: ./ffmpeg -i /sdcard/dcim/video.mp4 -y /sdcard/output.mp3 That works well but this is the only action I can do... Any idea of why I can´t convert a video? (I can´t copy it too) Thanks!! The problem was on my executable ffmpeg file... It didn´t work correctly. I tried with the ffmpeg file from this project and it works perfectly!! I think you can try other command line. Try to change the frame rate, 10 maybe is not suitable and specify de encoder. ffmpeg -i /sdcard/dcim/video.mp4 -vcodec mpeg4 -s 320x240 -r 25 -y /sdcard/output.mp4 Thanks!! I tried a lot of different combinations and any of them works if the output is a video... I don´t know what happens. Could it be that my binary file is badly compiled?? Do you have a correct one or do you know how to get it?? Thanks for help, really
39,447
https://en.wikipedia.org/wiki/Greater%20flameback
Wikipedia
Open Web
CC-By-SA
2,023
Greater flameback
https://en.wikipedia.org/w/index.php?title=Greater flameback&action=history
English
Spoken
841
1,430
The greater flameback (Chrysocolaptes guttacristatus) also known as greater goldenback, large golden-backed woodpecker is a woodpecker species. It occurs widely in the northern Indian subcontinent, eastwards to southern China, the Malay Peninsula, Sumatra, western and central Java and northeast Borneo. Taxonomy It has been suggested to split the greater flameback into the following species: Greater flameback, (C. guttacristatus) (C. lucidus if taken as a group and not split) Crimson-backed flameback, (C. stricklandi) of Sri Lanka Javan flameback (C. strictus) of eastern Java, Bali, and Kangean Islands Luzon flameback (C. haematribon) of Luzon, Polillo, Catanduanes and Marinduque in the northern Philippines Yellow-faced flameback (C. xanthocephalus) of Negros, Guimaras, Panay, Masbate and Ticao, Philippine Islands Buff-spotted flameback (C. lucidus) of Bohol, Leyte, Samar, Biliran, Panaon, Mindando, Basilan, and Samal, Philippine Islands Red-headed flameback (C. erythrocephalus) of Balabac, Palawan, Busuanga, and Calamian, Philippine Islands Malabar flameback (C. socialis) of southwestern India Description The greater flameback is a large woodpecker, at 33 cm in length. It is of typical woodpecker shape, and has an erect crest and a long neck. Coloration is highly variable between subspecies; it always has unmarked golden-yellow to dark brown back and wings. The rump is red and the tail is black. The underparts are white with dark markings (chevrons, stripes, or bands), or light brown. The head is whitish with a black pattern, or it is yellow, brown, or red. The straight-pointed bill is longer than the head, and the legs have four-toed zygodactyl feet (two toes pointing forward, two backward) and are lead-grey in color. The eyes' irises are whitish to yellow. The adult male greater flameback always has a red crown. Females have a crown color varying between subspecies, such as black spotted with white, yellow, or brown with lighter dots. Young birds are like the females, but duller, with brown irises. Similar species White-and-black-headed greater flameback subspecies resemble some of the three-toed Dinopium flamebacks, but are not particularly closely related. Unlike the black-rumped flameback (D. benghalense) and the common flameback (D. javanense), the greater flameback's dark moustache stripes are divided by white (making them inconspicuous at a distance); except in C. stricklandi, their hindneck is white (not black), and even in the Sri Lankan birds, the dark colour does not extend to between the shoulders as it does in Dinopium; consequently, when seen from behind, the black-and-white-headed greater flamebacks outside Sri Lanka show a white neck bordered with black on the sides, while the Dinopium species have a black neck and upper back, with thin, white borders to the neck. Those flamebacks are also smaller (though this is only reliable in direct comparison), have a bill that is shorter than the head, and dark irises. Behaviour and ecology This flameback is a species associated with a diversity of rather open forest habitat, such as found in the foothills of the Himalayas or in the Western Ghats; it also inhabits mangrove forest. It seems to be well-adapted to particular forest types, while the similar-looking common flameback (Dinopium javanense) is more of a generalist; thus, depending on what forests predominate in a region, C. lucidus may be more (e.g. in Thailand) or less common (e.g. in peninsular Malaysia) than D. javanense. In Malaysian mangrove forest, for example, the greater flameback has been found to prefer tall Avicennia alba for foraging, while the common flameback rather indiscriminately uses that species, as well as Bruguiera parviflora and Sonneratia alba. Like other woodpeckers, the greater flameback uses its bill to dig out food from trees, and its zygodactyl feet and stiff tail to provide support against tree trunks. The long tongue can be darted forward to extract wood-boring arthropod prey; while mainly feeding on small invertebrates, greater flamebacks also drink nectar. They nest in tree holes, laying three or four white eggs. Conservation Widely distributed and common in parts of its range, the greater flameback is classified as least concern on the IUCN Red List. Evolution Convergent evolution in plumage between a larger and a smaller species is found among other woodpeckers, such as the North American downy woodpecker ("Picoides" pubescens) and hairy woodpecker ("P." villosus), the tropical American smoky-brown woodpecker ("P." fumigatus) and certain Veniliornis species, or the striped woodpecker (V. lignarius) and checkered woodpecker (V. mixtus), and some South American Piculus and "Picoides". In all of these cases, these birds are neither gregarious nor known to be bad-tasting, and due to their size difference and habitat preferences, do not compete much; hence the usual reasons for mimicry do not seem to apply. While the similar plumage may be due to sheer chance, perhaps as an atavism of plesiomorphic pattern, the facts that such cases are commonplace in the Picinae and that the species involved are usually sympatric suggests that some as yet undiscovered may benefit either some or all of the taxa involved. References Rasmussen, Pamela C. & Anderton, John C. (2005): Birds of South Asia – The Ripley Guide. Lynx Edicions, Barcelona. External links greater flameback Birds of Bangladesh Birds of South Asia Birds of Southeast Asia greater flameback
47,928
https://pms.wikipedia.org/wiki/Corcelles
Wikipedia
Open Web
CC-By-SA
2,023
Corcelles
https://pms.wikipedia.org/w/index.php?title=Corcelles&action=history
Piedmontese
Spoken
44
106
Corcelles a l'é na comun-a fransèisa ant la region aministrativa dël Ròno-Alp, ant ël dipartiment ëd l'Ain. A së stend për n'aira ëd 14,16 km², con 221 abitant, scond ël censiment dël 1999, con na densità ëd 15 ab/km². Comun-e dël dipartiment ëd l'Ain
12,259
https://ceb.wikipedia.org/wiki/Boarmia%20diffusaria
Wikipedia
Open Web
CC-By-SA
2,023
Boarmia diffusaria
https://ceb.wikipedia.org/w/index.php?title=Boarmia diffusaria&action=history
Cebuano
Spoken
42
74
Kaliwatan sa alibangbang ang Boarmia diffusaria. Una ning gihulagway ni Gustav Fridolin Albers ni adtong 1949. Ang Boarmia diffusaria sakop sa kahenera nga Boarmia, ug kabanay nga Geometridae. Walay nalista nga matang nga sama niini. Ang mga gi basihan niini Insekto Boarmia
40,515
https://stackoverflow.com/questions/48232181
StackExchange
Open Web
CC-By-SA
2,018
Stack Exchange
Amy Peng - MSFT, Martin Zikmund, https://stackoverflow.com/users/5258858, https://stackoverflow.com/users/732221, https://stackoverflow.com/users/8178759, rm-84
English
Spoken
525
947
Tracking changes of the pictures library on Windows 10 Mobile devices I am trying to track the changes of the pictures library because I want my app to upload new photos to to a server. To track the changes I followed the MSDN article over here https://msdn.microsoft.com/en-us/magazine/mt790201.aspx If I run my code on my phone (Windows 10 Mobile with Fall Creators Update) it does not work if the pictures are saved to the sd-card. But if remove the sd-card and reboot my phone I can read the changes from the change-tracker. On a Desktop-PC everything works fine. This is how I enable the background task for the change-tracker: public async Task Register() { // Check if your app has access to the background var requestStatus = await BackgroundExecutionManager.RequestAccessAsync(); if (!(requestStatus == BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity || requestStatus == BackgroundAccessStatus.AllowedSubjectToSystemPolicy || requestStatus == BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity || requestStatus == BackgroundAccessStatus.AlwaysAllowed)) { Debug.WriteLine("Failed to get access to the background"); return; } // Build up the trigger to fire when something changes in the pictures library var builder = new BackgroundTaskBuilder(); builder.Name = "Photo Change Trigger"; StorageLibrary picturesLib = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures); var picturesTrigger = StorageLibraryContentChangedTrigger.Create(picturesLib); // We are registering to be activated in OnBackgroundActivated instead of // BackgroundTask.Run; either works, but I prefer the single-process model builder.SetTrigger(picturesTrigger); BackgroundTaskRegistration task = builder.Register(); } And this is how I get the changes, which contains the code that does not work: public async Task GetChanges() { StorageLibrary picturesLib = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures); StorageLibraryChangeTracker picturesTracker = picturesLib.ChangeTracker; picturesTracker.Enable(); StorageLibraryChangeReader changeReader = picturesTracker.GetChangeReader(); // if photos are saved on the SD-card the next line does not work IReadOnlyList<StorageLibraryChange> changes = await changeReader.ReadBatchAsync(); } Am I doing something wrong or is this a bug in Windows 10 Mobile? I already tried to factory reset my device or reformatting my SD-Card, but nothing worked. Could you please tell us if you met any error or it just return null when running the code on your phone and the pictures are saved to the SD card? Based on this article:https://msdn.microsoft.com/en-us/magazine/mt790201.aspx, it shows that because SD cards can be removed from the device while it’s powered off, and there’s no journaling on FAT-based file systems, change tracking can’t be guaranteed on an SD card across boot sessions. I get an exception: Exception from HRESULT: 0x80080222 Yes the pictures are saved to the SD card, the device is powered on all the time, no reboots involved. As described in the official blogpost: Calling Enable() It’s mentioned above, but just to make sure that it is clear: Apps should call ChangeTracker.Enable() as soon as they start tracking the file system and before every enumeration of the changes. This will ensure that the change tracker is not going to miss changes to the folders included in the library. So I would suggest to call the Enable in the Register method as well, right after the task is registered. You are right, I should call it right after registering the task. I added this but unfortunately it does not solve the problem. Oh, that is very unfortunate... I will try it on my device as well to see if it does work on my side or not.
43,738
https://vi.wikipedia.org/wiki/Melanochyla%20longipetiolata
Wikipedia
Open Web
CC-By-SA
2,023
Melanochyla longipetiolata
https://vi.wikipedia.org/w/index.php?title=Melanochyla longipetiolata&action=history
Vietnamese
Spoken
60
140
Melanochyla longipetiolata là một loài thực vật thuộc họ Anacardiaceae. Đây là loài đặc hữu của Malaysia. Chúng hiện đang bị đe dọa vì mất môi trường sống. Chú thích Tham khảo Kochummen, K.M. 1998. Melanochyla longipetiolata. 2006 IUCN Red List of Threatened Species. Truy cập 22 tháng 8 năm 2007. Thực vật Malaysia Melanochyla Thực vật dễ tổn thương
49,081
https://math.stackexchange.com/questions/1235782
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Adwin1033, Empy2, Functional analysis, https://math.stackexchange.com/users/229242, https://math.stackexchange.com/users/468085, https://math.stackexchange.com/users/81790
English
Spoken
211
589
Orthogonal in inner product space Let $(X,<.>)$ is an inner product space prove that $x$ and $y$ are orthogonal if and only if $||x+αy|| \ge ||x||$ for any scalar $α$ . The first direction if $x$ and $y$ are orthogonal then$||x+αy||^2=||x||^2+|α|^2||y||^2 \ge ||x||^2 $ so $||x+αy|| \ge ||x||$ . But the second direction if $||x+αy|| \ge ||x||$ for any scalar $α$ Implies $x$ and $y$ are orthogonal how can I prove that ? $$\langle x+\alpha y,x+\alpha y\rangle\geq\langle x,x\rangle\forall \alpha\\ \langle x,x\rangle+2\alpha\langle x,y\rangle+\alpha^2\langle y,y\rangle\geq\langle x,x\rangle\forall\alpha\\ 2\alpha \langle x,y\rangle+\alpha^2\langle y,y\rangle \geq0\forall\alpha$$ But the left-hand side equals zero if $\alpha=0$ and if $\alpha=-2\langle x,y\rangle/\langle y,y\rangle$. If $\langle x,y\rangle\neq0$ then this is a quadratic in $\alpha$ which has two zeros, and will be negative for some $\alpha$. In particular, $\alpha=-<x,y>/<y,y>$ makes the left-hand side equal to $-<x,y>^2/<y,y>$ I can't understand what do you mean When I squared the inequality I got : $$2Re<x,αy>+|α|^2||y||^2 \ge 0 $$ how can I complete ? $<x,y>$ isn't equal to $<y,x>$ because $<x,y>$ is the conjugate of $<y,x>$ Let $\alpha$ be such that $\langle x,\alpha y\rangle$ is real, then the first term becomes $2|\alpha||\langle x,y\rangle|$ @Empy2 but if you do so, then $\alpha$ isn't arbitrary any more. How can it be sure that the equation above still has two zeros.
43,563
https://tr.wikipedia.org/wiki/%C4%B0stanbul%20Di%C5%9F%20Hekimli%C4%9Fi%20Y%C3%BCksekokulu
Wikipedia
Open Web
CC-By-SA
2,023
İstanbul Diş Hekimliği Yüksekokulu
https://tr.wikipedia.org/w/index.php?title=İstanbul Diş Hekimliği Yüksekokulu&action=history
Turkish
Spoken
110
352
İstanbul Diş Hekimliği Yüksekokulu 1962 yılında İstanbul Özel Diş Hekimliği Yüksekokulu adı ile kurulmuştur. 1965 yılında, Nişantaşı’nda bulunan yeni binasına taşınmış ve ilk mezunlarını bu binada vermiştir. 1969 yılında değiştirilen Okul yönetmeliği ile öğretim yılı 4 yıldan 5 yıla çıkarılmış ve staj sistemi uygulanımına geçilmiştir. 9 Temmuz 1971 tarihinde 1472 sayılı kanunla okul devletleştirilerek İstanbul İktisadi ve Ticari İlimler Akademisi'ne bağlanmış ve adı Diş Hekimliği Yüksekokulu olarak değiştirilmiştir. 6 Kasım 1981’de çıkartılan 2547 sayılı Yükseköğrenim Kanunu ile İstanbul İktisadi ve Ticari İlimler Akademisi'ne bağlı olan Diş Hekimliği Yüksekokulu, 20 Temmuz 1982 tarihinde kurulan Marmara Üniversitesi’ne bağlanarak Marmara Üniversitesi Dişhekimliği Fakültesi adını almıştır. Kaynakça Diş Hekimliği Yüksekokulu 1962'de kurulan eğitim kurumları
48,458
https://en.wikipedia.org/wiki/Karl%20Smith%20%28cricketer%29
Wikipedia
Open Web
CC-By-SA
2,023
Karl Smith (cricketer)
https://en.wikipedia.org/w/index.php?title=Karl Smith (cricketer)&action=history
English
Spoken
86
158
Karl Brian Smith (born 23 September 1978) is a former English cricketer. Smith was a right-handed batsman who bowled right-arm medium pace. He was born at Leicester, Leicestershire. Smith represented the Leicestershire Cricket Board in a single List A match against the Warwickshire Cricket Board in the 2001 Cheltenham & Gloucester Trophy. In his only List A match he scored 8 runs. References External links Karl Smith at Cricinfo Karl Smith at CricketArchive 1978 births Living people Cricketers from Leicester English cricketers Leicestershire Cricket Board cricketers
17,531
https://ja.wikipedia.org/wiki/%E3%83%A6%E3%83%8B%E3%83%90%E3%83%BC%E3%82%B7%E3%83%86%E3%82%A3%E3%83%BB%E3%82%AB%E3%83%AC%E3%83%83%E3%82%B8%E3%83%BB%E3%83%80%E3%83%96%E3%83%AA%E3%83%B3AFC
Wikipedia
Open Web
CC-By-SA
2,023
ユニバーシティ・カレッジ・ダブリンAFC
https://ja.wikipedia.org/w/index.php?title=ユニバーシティ・カレッジ・ダブリンAFC&action=history
Japanese
Spoken
41
736
ユニバーシティ・カレッジ・ダブリン・アソシエーション・フットボールクラブ()は、アイルランドのダブリンをホームタウンとするサッカークラブ。UCDと略される。 歴史 1895年、カトリック・ユニバーシティ・メディカルスクール・セシリアストリート・フットボールクラブ(Catholic University Medical School Cecilia Street Football Club )として創設された。同年10月、ボヘミアンズBとクラブ最初の試合を行い、0-2で敗北した。1908年、カトリック・ユニバーシティはユニバーシティ・カレッジ・ダブリン(UCD)と合併し、サッカーチーム名もユニバーシティ・カレッジ・ダブリンAFCに改称された。 1983-84シーズンは過去最高の6位に入った。また、FAIカップ初優勝を果たし、1984-85シーズンのUEFAカップウィナーズカップ1回戦でエヴァートンと対戦した。前年のUEFAカップ1983-84で同じアイルランドのドロヘダ・ユナイテッドがトッテナム・ホットスパーFCに0-14で大敗していたことから苦戦が予想されたが、ホームで0-0、アウェーで0-1と善戦した。この年のエヴァートンはUEFAカップウィナーズカップ優勝、プレミアリーグ優勝、FAカップ準優勝の成績を残した。 2014年、プレミアディビジョンで11位に終わり、プレーオフでもゴールウェイ・ユナイテッドに敗れてファーストディビジョンに降格した。その一方で、により、UEFAヨーロッパリーグ 2015-16出場権を獲得した。 タイトル 国内タイトル FAIカップ:1回 1983-84 :1回 2000 リーグ・オブ・アイルランド・ファーストディビジョン:3回 1994–95, 2009, 2018 国際タイトル なし 過去の成績 記録 欧州での記録 欧州の成績 歴代所属選手 ピーター・ロリマー 1983 トニー・マクドネル 1994-2007 脚注 外部リンク 公式サイト アイルランドのサッカークラブ ダブリンのサッカークラブ 1895年設立のスポーツチーム
25,206
https://stackoverflow.com/questions/45796832
StackExchange
Open Web
CC-By-SA
2,017
Stack Exchange
Arnaud Stephan, Gerardo Furtado, https://stackoverflow.com/users/3120525, https://stackoverflow.com/users/5768908, https://stackoverflow.com/users/7926263, iulian
English
Spoken
275
545
Padding not making a difference on bar chart I'm making a bar chart but I would like the bars not to be too close to each other. Here is how I define my x scale : let echelleX = d3.scaleBand() .domain(setMots) .range([0, setMots.length * largeurBarre]) .padding(.1); And here is the chart I get : If I now define my scale with a higher padding : let echelleX = d3.scaleBand() .domain(setMots) .range([0, setMots.length * largeurBarre]) .padding(.5); Here is the chart I get : As you can see, only the outer padding changed. According to the d3 API, I'm not doing anything wrong, so I don't see where my mistake is. I looked around StackOverflow and found this fiddle, where changing the padding values effectively modifies the gap between the bars. What am I missing? Please show the code where you actually draw the rects. can you reproduce this behavior in a working fiddle? @iulian here is a jsfiddle : https://jsfiddle.net/8gqp214q/ @GerardoFurtado here is a fiddle with the code where I draw the rects : https://jsfiddle.net/8gqp214q/ The problem with your code is the fact that you are specifying a hardcoded value for bar widths, instead of relying on dynamically computed value from d3. Just update the line that specifies the width of your bars to take the value that takes into account the padding that you have specified earlier by means of using echelleX.bandwidth(): barre.enter() .append("rect") .attr("class", d => d.mot) .attr("x", (d, i) => echelleX(d.mot)) .attr("y", (d) => echelleY(d.freq)) .attr("width", echelleX.bandwidth()) // <--- this one .attr("height", d => height - echelleY(d.freq)) .attr("fill", "#ffcc99"); Here is a working fiddle with updates. Thanks a lot for your answer !
28,398
https://stackoverflow.com/questions/51520240
StackExchange
Open Web
CC-By-SA
2,018
Stack Exchange
CoderTn, MIIB, https://stackoverflow.com/users/2113969, https://stackoverflow.com/users/8029592
English
Spoken
163
343
how to store an array in PHP $_COOKIE value i want to store an array of strings in a PHP cookie example : $array = array("1", "test"); setcookie($cookie_name, $array, time() + (86400 * 30), "/"); $array = array('a'=>"1", 2=>"test", 25); $json = json_encode($array); setcookie('name', $json); array = json_decode($_COOKIE['name']); thanks , that's helpful :) You can parse it into a string (e.g. http_build_query($array) or serialize) and store it in the cookie and then again to read from it you can parse the string (e.g. str_parse($_Cookie['cookie']) or deserialize). what means to parse and serialize please ? There are some methods to convert an array to a string. http_build_query or serialize are methods to convert this. Then you want to convert the string back to an array which you can user str_parse if you converted the array using http_build_query or unserialize if you've used serialize method. $array = array("1", "test"); setcookie($cookie_name, serialize($array), time() + (86400 * 30), "/"); $array = unserialize($_COOKIE['cookie_name']); thanks , that's helpful :)
6,795
https://stackoverflow.com/questions/74388161
StackExchange
Open Web
CC-By-SA
2,022
Stack Exchange
Stark, https://stackoverflow.com/users/10698697, https://stackoverflow.com/users/67579, willeM_ Van Onsem
English
Spoken
102
215
Using signals in django while extending user model Basically I have 2 models that are 1 to 1 related with User model, First model in Employee and second one is Customer. I am also using signals for updates #Signal functions inside each model @receiver(post_save, sender=User) def create_customer(sender, instance, created, **kwargs): if created: Customer.objects.create(user=instance) @receiver(post_save, sender=User) def update_customer(sender, instance, created, **kwargs): if created == False: instance.customer.save() When I register a user it gets duplicated both in customer and employee. Is there a way to prevent this? Tool tip there is also 2 functions with name update_employee and create_employee. Please don't use signals: https://www.django-antipatterns.com/antipattern/signals.html
8,766
https://stackoverflow.com/questions/31925067
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Jason Mcmunn, MonkeyBonkey, W4t3randWind, garnaat, https://stackoverflow.com/users/2005704, https://stackoverflow.com/users/4320744, https://stackoverflow.com/users/611750, https://stackoverflow.com/users/653643
English
Spoken
428
831
lambda not finding my node_modules I'm trying to upload node_modules with my lambda but I'm getting "Cannot find module" error. I've set up a real simple hello world js file with var async = require('async'); And I have manually copied over a node_modules/async folder into the distribution - and I copy up the node_modules folder along with the hello world js file. I do a very similar thing with my photo resizer lambda which takes node modules as well and that works. What's different that I'm doing wrong? My guess it is has to do with packaging. try this example... it is very concrete. build from there: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser-create-test-function-create-function.html The structure of the zip file is important. Let's say I have a javascript function contained in a file called foo.js that has dependencies on other node modules. In my development environment, I would have a structure like this: devdir/ foo/ foo.js node_modules/ <the nodejs modules> I then create a zip file called foo.zip structured like this: $ unzip -vl foo.zip Archive: foo.zip Length Method Size Ratio Date Time CRC-32 Name ------- ------ ------- ----- ---- ---- ------ ---- 0 Defl:N 0 0% 08-05-15 14:44 00000000 ./ 3047 Defl:N 981 68% 08-05-15 14:25 06e3e178 foo.js 0 Defl:N 0 0% 08-03-15 13:37 00000000 node_modules/ 0 Defl:N 0 0% 08-03-15 13:37 00000000 node_modules/.bin/ 597 Defl:N 301 50% 03-05-15 14:29 9b0c2ba2 node_modules/.bin/uuid 0 Defl:N 0 0% 07-16-15 08:32 00000000 node_modules/async/ 3454 Defl:N 1537 56% 06-28-15 18:37 967a5404 node_modules/async/CHANGELOG.md <...> Make sure your zip file is structured like this and you should be ok. the error was on my part - my zip gulp task was leaving out the package.json files Thanks for this answer @garnaat. For the sake of posterity, I am finding that Lambda prefers dependencies to be at the root level and not in a the conventional node_modules directory at all. When you say prefer, what exactly do you mean? Is it not working for you with the node_modules directory? I'm putting this here as an alternative answer. I spent all afternoon trying to get my module to run in Lambda. I had the same structure as shown in the other answer but kept getting "Cannot find module" errors or Object.fs.readFileSync errors. It turns out that making sure all the js files are executable before zipping them was an important step that I was missing. It might also be of benefit to chown all the files to yourself as well. sudo chmod +x *.js -R sudo chown myself.myself * -R zip -r lambda.zip . Then upload the lambda.zip package and test.
46,888
https://serverfault.com/questions/432699
StackExchange
Open Web
CC-By-SA
2,012
Stack Exchange
Daniel, Mahdi IDea, Muhip Altunç, Proderma Clinic, Torsten_R, Tracey Plaatjies, https://serverfault.com/users/32986, https://serverfault.com/users/983276, https://serverfault.com/users/983277, https://serverfault.com/users/983278, https://serverfault.com/users/983320, https://serverfault.com/users/983332, https://serverfault.com/users/983350, voretaq7
English
Spoken
329
406
ID Badge Access System for Building with Active Directory Integration I hope this is the right place for this question. So, we're looking into setting up a building access that uses badges or cards of some kind. I wanted to ask the users on here if they've had to do such setups and/or if they have recommendations? Is there maybe a system that integrates with Active Directory? I know one of the things our managers want to do is to be able to run reports on when people are entering the buildings. With this type of product, forget about which product to get and focus on who will support it. You need to get recommendations for installers, not products. Ask other people in your building. Ask other companies you do business with. Ask the property management companies in your area who they use. Pick someone that has been in business for a while and can guarantee response times for problems. All of the worthwhile access control products (and good installers will only sell the worthwhile ones) have the reporting you need. +1 for finding a good installer / support company. When this beast breaks (and you know it will one day) you want to know the installer will be there helping you fix it so people can get into the building! Such systems do exist, and like all [physical] security products, they're primitive in functionality and way overpriced for what they do. This isn't a site for product recommendations, but most of the systems these days pipe data to a SQL database on a computer somewhere, and you can certainly integrate that with LDAP/AD. I'd search on Building Door Access Control or Physical Door Access Control in a search engine to get a quick lay of the land as to options. There are an absolute slew of them, but you're probably (maybe?) looking at a keypads or badge readers for existing doors, to help narrow your search a bit.
40,987
https://tex.stackexchange.com/questions/248120
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
English
Spoken
309
965
How to project nodes created by relative position on curve to axis and below? In case I have two curves created with pgfplots I can draw a line between two relatively positioned nodes on each. In this example there is an arrow between the points at 50% of each curve. \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[] \addplot[color=black,mark=square*] table { x y 1 1 2 2 3 3 } node [pos=0.5,inner sep=0pt,outer sep=0pt] (A) {}; \addplot[color=black,mark=square*] table { x y 1 2 2 3 } ; \addplot[color=black,mark=square*] table { x y 2 1 3 2 } node [pos=0.5,inner sep=0pt,outer sep=0pt] (B) {}; \draw[latex-latex] (A) -- (B); \end{axis} \end{tikzpicture} \end{document} But how can I set just one node and get a second and third one projected on each axis? And how to get a node outside the axis relatively to the one set on the curve? So basically I'm looking for the red nodes in the following picture and like to draw the red lines and green lines? Any help? There are questions around which could solve my problem, but they all aim at different things and I miss the essential parts. You can use the rel axis cs inside the axis to draw the green lines and set named coordinates at the projected points. \draw[green,very thick] (A|-{rel axis cs:0,0})coordinate(Ax)--(A)--({rel axis cs:0,0}|-A)coordinate(Ay); Then you can draw the red nodes and lines outside the axis. \draw[red,very thick] (Ax)node{\pgfuseplotmark{square*}}--+(0,-5mm)node{\pgfuseplotmark{square*}} (Ay)node{\pgfuseplotmark{square*}}--+(-5mm,0)node{\pgfuseplotmark{square*}}; Code: \documentclass[margin=5pt]{standalone} \usepackage{pgfplots}% loads also tikz \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[color=black,mark=square*] table { x y 1 1 2 2 3 3 } node [pos=0.5,inner sep=0pt,outer sep=0pt] (A) {}; \addplot[color=black,mark=square*] table { x y 1 2 2 3 } ; \addplot[color=black,mark=square*] table { x y 2 1 3 2 } node [pos=0.5,inner sep=0pt,outer sep=0pt] (B) {}; \draw[latex-latex] (A) -- (B); \draw[green,very thick] (A|-{rel axis cs:0,0})coordinate(Ax)--(A)--({rel axis cs:0,0}|-A)coordinate(Ay); \end{axis} \draw[red,very thick] (Ax)node{\pgfuseplotmark{square*}}--+(0,-5mm)node{\pgfuseplotmark{square*}} (Ay)node{\pgfuseplotmark{square*}}--+(-5mm,0)node{\pgfuseplotmark{square*}}; \end{tikzpicture} \end{document}
17,802
https://nl.wikipedia.org/wiki/Necterosoma%20novaecaledoniae
Wikipedia
Open Web
CC-By-SA
2,023
Necterosoma novaecaledoniae
https://nl.wikipedia.org/w/index.php?title=Necterosoma novaecaledoniae&action=history
Dutch
Spoken
27
65
Necterosoma novaecaledoniae is een keversoort uit de familie waterroofkevers (Dytiscidae). De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1939 door J.Balfour-Browne. Waterroofkevers
38,185
https://stackoverflow.com/questions/58930481
StackExchange
Open Web
CC-By-SA
2,019
Stack Exchange
English
Spoken
520
1,147
Jump Point Search result are not correct After I completed the how to make a A* pathfinding I wanted to learn more about Jump Point Search. I did some reasearch how to make one by reading the orginal paper about it. So after reading it a couple of times I try it for myself so I made one and it works short of. so the problem is that he can find a path but not in the most best way see images what I mean. So my first thought was that I did something wrong with the lowest Fcost so try to change that first but that was not answer. then I looked into the Sucessor function if I did something wrong try to change the order of the script but the result stay the same. after that I looked into the jump code. But to be honest I don't see it what I did wrong either. Then I try to find the answer here but, most of the answers resluted in the same result. Maybe it can be that I have forgot something that this algoritme needs. sucessor function. List<Node> IDSucessor(Node currentNode,Node start,Node goal) { List<Node> sucessors = new List<Node>(); List<Node> neighbors = new List<Node>(); neighbors = Neigbors(currentNode); foreach (Node n in neighbors) { Node node = n; node = Jump(currentNode, n.x - currentNode.x, n.y - currentNode.y, start, goal); if (node != null) { if (!closedList.Contains(node)) { int newMovementCost = (int)currentNode.GCost + GetDistance(currentNode, n); if (newMovementCost < node.GCost || !openList.Contains(node)) { node.GCost = newMovementCost; node.HCost = GetDistance(n, goal); node.FCost = n.GCost + n.HCost; node.parent = currentNode; if (!openList.Contains(node)) { sucessors.Add(node); } } } } } return sucessors; } Jump Function Node Jump(Node currentNode,int x,int y,Node start,Node goal) { Node n = RetunNodeDir(currentNode, x, y); if (n==null) { //if n is null return null return null; } if (n.Col) { //if n collider return null. return null; } if (n.x == goal.x && n.y==goal.y) { //if it's a goal then the n will be a sucessor goalFounded = true; return n; } //if A neigbor is forced than return n as it's sucessor. if (IsForced(n, x, y, start, goal)) { return n; } //if diangle if(x!=0 && y!=0) { if (IsForecedDiangle(n, x, y, start, goal)) { return n; } if (Jump(n, x, 0, start, goal) != null || Jump(n, 0, y, start, goal) != null) { return n; } } //jump again return Jump(n, x, y, start, goal); } Force node horizontal. the vertical is the same code but has a diffrent coordination direction. the diangle use also the same code but it needed a extra agrument in the function. bool IsForcedHor(Node currentNode,int dirX) { Node up = RetunNodeDir(currentNode, 0, 1); Node down = RetunNodeDir(currentNode, 0, - 1); if(up!=null) { if(up.Col) { //check next to him. Node upNext = RetunNodeDir(currentNode, dirX, 1); if(upNext!=null) { if(!upNext.Col) { return true; } } } } if(down!=null) { if(down.Col) { Node downNext = RetunNodeDir(currentNode, dirX, - 1); if (downNext != null) { if (!downNext.Col) { return true; } } } } return false; } I hope I gave you enough information. kind regards, codinG
11,680
https://stackoverflow.com/questions/31918410
StackExchange
Open Web
CC-By-SA
2,015
Stack Exchange
Amit, Eser, Yuval Itzchakov, hdoghmen, https://stackoverflow.com/users/1197539, https://stackoverflow.com/users/1870803, https://stackoverflow.com/users/3887516, https://stackoverflow.com/users/5149474
English
Spoken
172
372
How do I to shorten If else My code looks like private bool IsUserAditya(string username) { return username == "Aditya"? true : false; } Can I shorten it further? I would appreciate any help on this. return username == "Aditya"; and even shorter: return username=="Aditya" - Still purposeless :-) With VS2015 bool IsUserAditya(string username) => username == "Aditya"; Can I shorten it further? Yes, a little bit return username == "Aditya"; Any comparison in C# returns a bool, so no need to use the conditional operator. private bool IsUserAditya(string username) { return username == "Aditya"; } Not directly related to shortening (properly even longer), but if you're comparing an input from a user, such as a username, use string.Equals which takes a StringComparison object: private bool IsUserAditya(string username) { return username.Equals("Aditya", StringComparison.OrdinalIgnoreCase); } shouldn't be private bool IsUserAditya(string username) { return username.Equals("Aditya", StringComparison.OrdinalIgnoreCase); } ? missing username. @hdoghmen Doesn't matter, they're interchangeable Even shorter... private bool IsUserAditya(string u){return u=="Aditya";} but that only "shortens" the source code. Generated binary will be same size.
45,244
https://ceb.wikipedia.org/wiki/W%C4%81d%C4%AB%20M%C4%ABl%20Bayt%20Khawr
Wikipedia
Open Web
CC-By-SA
2,023
Wādī Mīl Bayt Khawr
https://ceb.wikipedia.org/w/index.php?title=Wādī Mīl Bayt Khawr&action=history
Cebuano
Spoken
87
145
Wadi ang Wādī Mīl Bayt Khawr sa Yemen. Nahimutang ni sa distrito sa Hat ug lalawigan sa Al Mahrah, sa sidlakang bahin sa nasod, km sa sidlakan sa Sanaa ang ulohan sa nasod. Ang klima init nga kamadan. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hunyo, sa  °C, ug ang kinabugnawan Enero, sa  °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Hulyo, sa milimetro nga ulan, ug ang kinaugahan Hunyo, sa milimetro. Ang mga gi basihan niini Mga suba sa Al Mahrah (lalawigan)
3,728
https://stackoverflow.com/questions/1459383
StackExchange
Open Web
CC-By-SA
2,009
Stack Exchange
Dmitriy, Donovan Huang, Fredriku73, Lucas, Reshmi RS, Vitali Kovalenko, https://stackoverflow.com/users/27126, https://stackoverflow.com/users/2889306, https://stackoverflow.com/users/2889307, https://stackoverflow.com/users/2900618, https://stackoverflow.com/users/2900966, https://stackoverflow.com/users/2915508, https://stackoverflow.com/users/74660, user2900966
English
Spoken
339
528
MATLAB gui loads old settings I created a gui with MATLAB's GUI Builder. After some changing around, an image of an old plot is still loaded into the gui on start up. How can I tell MATLAB to disregard that old plot? I added a toolbar by adding set(hObject,'toolbar','figure'); into the "gui_OpeningFcn". Now I decided that I don't want the toolbar in my gui any longer. But when I remove this line, the toolbar is still created. How do I tell MATLAB not to load the old stuff anymore? And where do those settings get stored anyway? EDIT: I investigated a little bit, and this behaviour can be reproduced as follows: create a new gui with the GUI builder and add plot add the line "set(hObject,'toolbar','figure');" into the "*_OpeningFcn" add a simple function into the plot (adding something like "plot(handles.axes1,[1:10], [1:10])" into the "*_OpeningFcn" will do) run the gui and save the figure by clicking the save button in the toolbar now when I remove "set(hObject,'toolbar','figure');" and "plot(handles.axes1,[1:10], [1:10])" from "*_OpeningFcn" and run the gui, the toolbar and the plot will still be displayed I am sure this behaviour is intentional. But where are those settings stored, so I can reverse them? Good question, I had problems along that line. But couldn't you create a new GUI window with guide, save it and put your code in there, since those windows are without a toolbar by default? As a workaround. That might be what I have to do. But I am sure there is a better solution. I found out how to turn off the toolbar. Select in the GUI builder view->Property Inspector In the ToolBar field select "none" Edit: I also found a way that the old plot is not loaded into the gui. I created an empty "createFcn" for the plot. and ran the gui once afterwards then I deleted the createFcn again But I very much doubt that this would be the standard way to achieve that. So please don't hesitate to give a better solution.
50,532
https://german.stackexchange.com/questions/33453
StackExchange
Open Web
CC-By-SA
2,016
Stack Exchange
Iris, Martin Rosenau, PerlDuck, Raketenolli, cornejo, https://german.stackexchange.com/users/10959, https://german.stackexchange.com/users/16660, https://german.stackexchange.com/users/19409, https://german.stackexchange.com/users/20363, https://german.stackexchange.com/users/22180, https://german.stackexchange.com/users/23807, tofro
English
Spoken
363
571
lake shore, sea coast, river side What do you call these three things in German? lake shore, sea coast, river side Here are my suggestions: lake shore = Seeufer sea coast = Meeresküste river side = Flussseite Am I right? Es lächelt der See, er ladet zum Bade, Der Knabe schlief ein am grünen Gestade 'thank you' messages in the answers are not needed. This are the most common terms: lake shore = Seeufer sea coast = Meeresküste river side = Flussufer »Flussseite« ist very uncommon. »Meeresufer« ist possible, but »Meeresküste« or just »Küste« is better. All three can be just »Ufer« (you don't need to say of which waters if it is clear from the context). Flussseite is uncommon but can be used when someone has a large house and wants to express that the living room is "zur Flussseite hin" (to the river side) while the kitchen is in the opposite direction. I'm just wondering whether you would only use "Ufer" for a "Meer" if said "Meer" is actually just a lake -- the Steinhuder Meer for example. lake shore = Seeufer Correct. sea coast = Meeresküste Most Germans would only say "Küste". "Meeresküste" sounds a bit strange. river side = Flussseite I think this is not the word you are searching for. If you are talking about the question if a city or a country is located on the left or the right side of a river you can use the word "Flusseite" (although most Germans would say "Seite des Flusses" in this case). If you want to say that something is directly beneath the river you would use the word "Ufer" - the same word you use for a lake. So the word you are searching is probably "Flussufer". How about if the river is not a Flus but a big one - a Strom ? @cornejo, a very big 'Fluss' is in German still called a 'Fluss'. 'Strom' is only rarely used. @cornejo As an extension to Iris' answer I would say the word "Strom" is normally used in certain contexts only. In contexts when you use the word "river side" you would definitely use the Word "Fluss".
24,483
https://en.wikipedia.org/wiki/Fencing%20at%20the%202022%20Asian%20Games
Wikipedia
Open Web
CC-By-SA
2,023
Fencing at the 2022 Asian Games
https://en.wikipedia.org/w/index.php?title=Fencing at the 2022 Asian Games&action=history
English
Spoken
64
113
Fencing at the 2022 Asian Games was held at Hangzhou Dianzi University Gymnasium, Hangzhou, China, in September 2023. Schedule Medalists Men Women Medal table Participating nations A total of 280 athletes from 29 nations competed in fencing at the 2022 Asian Games: References External links Fencing at the 2022 Asian Games Fencing at the 2022 Asian Games 2022 2022 Asian Games events Asian Games
22,390
https://sv.wikipedia.org/wiki/Harpactea%20modesta
Wikipedia
Open Web
CC-By-SA
2,023
Harpactea modesta
https://sv.wikipedia.org/w/index.php?title=Harpactea modesta&action=history
Swedish
Spoken
32
71
Harpactea modesta är en spindelart som beskrevs av Peter Mikhailovitch Dunin 1991. Harpactea modesta ingår i släktet Harpactea och familjen ringögonspindlar. Inga underarter finns listade i Catalogue of Life. Källor Ringögonspindlar modesta
23,074
https://nl.wikipedia.org/wiki/Exilisia%20bijuga
Wikipedia
Open Web
CC-By-SA
2,023
Exilisia bijuga
https://nl.wikipedia.org/w/index.php?title=Exilisia bijuga&action=history
Dutch
Spoken
42
86
Exilisia bijuga is een vlinder uit de familie spinneruilen (Erebidae), onderfamilie beervlinders (Arctiinae). De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1899 door Mabille. Deze nachtvlinder komt voor in tropisch Afrika. Exilisia Dier uit het Afrotropisch gebied
7,752
https://serverfault.com/questions/436642
StackExchange
Open Web
CC-By-SA
2,012
Stack Exchange
Android 3, Herman Felani, Joachim Sauer, Jonathan Callen, Martin Schröder, Matt, Nour Slimane, Spammer, daviddanielng, https://serverfault.com/users/1001958, https://serverfault.com/users/57818, https://serverfault.com/users/89813, https://serverfault.com/users/94886, https://serverfault.com/users/973, https://serverfault.com/users/994457, https://serverfault.com/users/994458, https://serverfault.com/users/994459, https://serverfault.com/users/994461, https://serverfault.com/users/994463, klm
English
Spoken
449
812
Custom Openssh Shell The environment is Ubuntu Server 12.04 I would like to create a user on a server that is only able to ssh into a shell that runs tail -f on a log file and closes the session once the program ends (ctrl+c). Is there a way to achieve this? To be pedantic, it won't be ctrl+c, but SIGHUP (closer to ctrl+d) that kills the app. You can put essentially whatever you want in the user's shell in /etc/passwd. Simply replace the default on the user's passwd line (probably /bin/bash) with another program. That program can be a script, such as /usr/bin/tail_log_file, with these contents, owned by root:root, with umode 0755: #!/bin/rbash tail -f /path/to/logfile You can use some interpreter other than rbash, but it is advisable to use a restricted shell in such cases. To be extremely pedantic about it, you should add the script's path to /etc/shells, but I usually find it works anyway. Keep in mind also that the user could potentially put the script in the background, or use some options (ssh username@host bash) and still acquire a shell. If you want to restrict the user in such ways, good filesystem permissions are the only real solution. works great, thanks so much for your quick and accurate reply. The only reason you would want to add something to /etc/shells is to allow users that have something else as their shell to set their shell to this; the superuser (root) can always change anyone's shell to anything they want. To add what @JonathanCallen said: it's actually a security leak to add that script to /etc/shells as that would allow the user to change his shell (because /usr/bin/tail_log_file would then be considered an "unrestricted shell")! Ok I will remove. That is much too complicated; forced commands (see the answer by @tink) are the way to do it. ssh forced commands spring to mind if you're happy to use keypair based authentication. man authorized_keys /command= You can configure ssh to run a command of your choice when you log in using public key authentication. To do this, generate a pair of keys: djs@sardinia:~$ ssh-keygen -f restricted-key Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in restricted-key. Your public key has been saved in restricted-key.pub. The key fingerprint is: b1:8f:26:47:c2:c5:f2:8d:ed:a0:c4:bd:9a:30:9d:08 djs@sardinia [...] restricted-key.pub contains a line suitable for putting in the users's ~/.ssh/authorized_keys file: ssh-rsa AAAA...UDz47Nl djs@sardinia but you can add a command to this, and ssh will run that command when logging in with the key: command="tail -f /my/interesting/file" ssh-rsa AAAA...UDz47Nl djs@sardinia Then the user can ssh to the machine using ssh -i restricted-key.
33,990