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://nl.wikipedia.org/wiki/Flabellum%20%28Ulocyathus%29%20japonicum | Wikipedia | Open Web | CC-By-SA | 2,023 | Flabellum (Ulocyathus) japonicum | https://nl.wikipedia.org/w/index.php?title=Flabellum (Ulocyathus) japonicum&action=history | Dutch | Spoken | 29 | 57 | Flabellum (Ulocyathus) japonicum is een rifkoralensoort uit de familie van de Flabellidae. De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1881 door Moseley.
Rifkoralen | 3,447 |
https://stackoverflow.com/questions/44168295 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | English | Spoken | 410 | 997 | Epicor 10 Linking a BAQ in BPM Workflow Designer (Avoiding Custom Code)
Currently I have been tasked with reviewing a BPM created by Epicor that is not functioning as expected. Currently with the BPM based on the code below its purpose is to reference orders in the system and when its time to ship the orders if there is a price change the order/part will reflect a new price. It seems that the code is causing incorrect price lists to be retrieved from customers not expected. For example a price list is attached to customer #1242 but its updating the price based on customer #1269. (Guessing they share a common part # and the code retrieves the latest value)
Now my problem is I don't have experience in writing code, I have reviewed code before but to a small extent and from what I listed above that was provided to me. Now what I thought may be an easier practice for me to understand is create a BAQ and reference that in the BPM and utilize the BAQ as a reference for the BPM to update prices.
With researching a few forums and Epicors training material I haven't found a definitive answer on how to link a BAQ in a BPM.
(Also if my description makes sense and the code reflects the issue feel free take a guess)
BPM Code:
var ttShipHead_xRow = (from ttShipHead_Row in ttShipHead
where ttShipHead_Row.ReadyToInvoice == true
select ttShipHead_Row).FirstOrDefault();
if (ttShipHead_xRow != null)
{
foreach (var ShipDtl_iterator in (from ShipDtl_Row in Db.ShipDtl
where ttShipHead_xRow.PackNum == ShipDtl_Row.PackNum
&& ttShipHead_xRow.Company == ShipDtl_Row.Company
select ShipDtl_Row))
{
var ShipDtl_xRow = ShipDtl_iterator;
//ShipDtl_xRow.UnitPrice = 1;
var today = DateTime.Today;
var PriceList_xRow = (from PriceLst_Row in Db.PriceLst
from PriceLstParts_Row in Db.PriceLstParts
where ShipDtl_xRow.PartNum == PriceLstParts_Row.PartNum
&& PriceLst_Row.ListCode == PriceLstParts_Row.ListCode
&& PriceLst_Row.Company == PriceLstParts_Row.Company
&& PriceLst_Row.Company == ShipDtl_xRow.Company
&& PriceLst_Row.EndDate >= today
select PriceLstParts_Row).FirstOrDefault();
if (PriceList_xRow != null)
{
var OrderDtl_xRow = (from OrderDtl_Row in Db.OrderDtl
where ShipDtl_xRow.OrderLine == OrderDtl_Row.OrderLine
&& ShipDtl_xRow.PartNum == OrderDtl_Row.PartNum
&& ShipDtl_xRow.OrderNum == OrderDtl_Row.OrderNum
&& ShipDtl_xRow.Company == OrderDtl_Row.Company
select OrderDtl_Row).FirstOrDefault();
{
if (OrderDtl_xRow != null)
{
if (ShipDtl_xRow.UnitPrice != PriceList_xRow.BasePrice)
{
ShipDtl_xRow.UnitPrice = PriceList_xRow.BasePrice;
}
if (ShipDtl_xRow.UnitPrice != OrderDtl_xRow.UnitPrice)
{
OrderDtl_xRow.DocUnitPrice = PriceList_xRow.BasePrice;
OrderDtl_xRow.UnitPrice = PriceList_xRow.BasePrice;
}
}
}
}
}
}
I resolved the code but still could not determine a valid method to link a BAQ in the BPM
The problem was the following code was missing:
&& ttShipHead_xRow.CustNum == ShipDtl_Row. CustNum
to the first foreach statement.
| 49,964 | |
l_9_BMsXdzY_1 | Youtube-Commons | Open Web | CC-By | null | Physiotherapy After Knee Ligament Injury | Orthopedic Hospital In Bangalore | Manipal Hospitals | None | English | Spoken | 383 | 485 | Hello, I'm Dr. Sunil Kini, consultant joint replacement and arthroscopy surgeon at Manipal Hospital's Bangalore. To start with, there are four important ligaments in the knee joint. One in the front and back, which we call as the anterior cruciate ligament or ACL. One in the behind is called the posterior cruciate ligament or the PCL. There are also side supporting ligaments on either side of the knee. The one on the inside is called the medial colorectal ligament or the MCL. The one on the outside of the knee is called the lateral colorectal ligament or the LCL. The physiotherapy for various kinds of these ligament injury and post-surgery is slightly different. I would like to mention about the more common injury in about 80-90% of the cases, which is the ACL or the anterior cruciate ligament injury. Once the surgery is done, it's important to start with the physiotherapy as soon as possible. The physiotherapy after an ACL surgery continues for up to nine months after surgery. At the point of time at which the patient can start sporting activities also. The knee ligament ACL surgery, immediately after surgery, the patient has to be on a brace, what we call. For the first two weeks, it's going to be a straight knee brace. After that, after a stitched removal for the next four weeks, we usually put the patient on what we call as the hinged knee brace in which the patient can actually bend the knee by himself or herself. The other exercises which we strength upon immediately, the day after surgery is the static quadriceps exercises or also what we call as the thigh squeezed exercises. We also start about heel slides, the hamstring exercises, assisted or passive knee bending and knee straightening exercises as well. Immediately after surgery, the patient is expected to have some amount of pain and will be using crutch or a walking stick, say for about the first week, after which can be slowly discarded. During the second and third week, it's also important to continue with the physio. The initial goal of physio is to get back the knee range of motion and secondly is to reduce the pain and swelling and also the thirdly is to strengthen the muscles around the knee. | 36,805 |
https://it.wikipedia.org/wiki/Penev | Wikipedia | Open Web | CC-By-SA | 2,023 | Penev | https://it.wikipedia.org/w/index.php?title=Penev&action=history | Italian | Spoken | 37 | 87 | Dimităr Penev (1945) – calciatore e allenatore di calcio bulgaro
Ivan Penev (1950) – sciatore bulgaro
Ljuboslav Penev (1966) – calciatore e allenatore di calcio bulgaro
Ivan Penev (1993) – calciatore bulgaro
Lyubomir Penev – entomologo bulgaro | 8,574 |
https://nn.wikipedia.org/wiki/Andrea%20del%20Verrocchio | Wikipedia | Open Web | CC-By-SA | 2,023 | Andrea del Verrocchio | https://nn.wikipedia.org/w/index.php?title=Andrea del Verrocchio&action=history | Norwegian Nynorsk | Spoken | 507 | 1,089 | Andrea del Verrocchio, opphavleg Andrea di Michele di Francesco de' Cioni, () var ein italiensk skulptør, gullsmed og kunstmålar. Ein reknar med at han påverka Leonardo da Vinci, Lorenzo di Credi og Perugino, som alle var nokre av elevane hans. Andrea del Verrocchio var verksam under ungrenessansen i tida som blir rekna quattrocento.
Liv og gjerning
Verrocchios var fødd i Firenze. Far hans, Michele di Cione, arbeidde som kakkel- og teglmakar, og seinare òg som skatteinndrivar. Sonen byrja som gullsmed i verkstaden til Francesco di Luca Verrocchi. Verrocchio kan ha vore lærling saman med Donatello. Dei første, kjende måleria laga han truleg på 1460-talet, då han arbeidde i Prato ved sida av Filippo Lippi.
Andrea del Verrocchio gifta seg aldri, og trong økonomisk stønad frå familiemedlemmar. Ryet hans vart betra då han vart tilsett ved hoffet hos huset Medici, som han vert verande hos, til han flytta til Venezia.
Verk
Det einaste signerte måleriet av Verrocchio er Madonnaen med barnet, som no finst i katedralen i Pistoia. Rundt 1465 byrja han å arbeide i det gamle sakristiet 'Sagrestia Vecchia' i basilikaen San Lorenzo i Firenze. Mellom 1465 og 1467 omforma han gravmonumentet over Cosimo de' Medici. År 1472 laga han gravmonument til Piero og Giovanni de' Medici i det gamle sakristiet.
Handelsmennene i Firenze gav i 1466 Verrocchio i oppdrag å lage skulpturgruppa Kristus og den tvilande Tomas, skulpturane skulle plasserast i ei ytre nisje i kyrkja Orsanmichele.
Kristi dåp, som no finst i Uffiziane, vart måla ein gong i 1474 eller 1475. Under arbeidet av dette kunstverket vart Verrocchio assistert av Leonardo da Vinci, som då arbeidde i verkstaden hans. Leonardo ferdigstilte bakgrunnen og måla den venstre engelen, og med ein kvalitet som skilde seg frå resten av måleriet.
Skulptør
På midten av 1470-talet var Verrocchio særleg oppteken av skulpturarbeid og utvikla den florentinske stilen. Omkring 1478 gjorde Verrocchio ferdig Bevinga kjerub med delfin, som i dag finst i Palazzo Vecchio. Verket viser eit drag av naturalisme, som Verrochio lærde seg frå Desiderio da Settignano. Frå same perioden stammar Dame med bukett, og relieffet til Francesca Tornabuoni sitt gravmonument i basilikaen 'Santa Maria sopra Minerva' i Roma.
Bartolomeo Colleoni
År 1478 byrja Verrocchio på det er hans mest kjende verk, ei ryttarstatue som førestiller kondottieren Bartolomeo Colleoni, som hadde døydd tre år tidlegare. Arbeidet var eit oppdrag frå Republikken Venezia. Det var det første forsøket på å lage ei ryttarstatue der eitt av hesten sine bein ikkje støttar seg på underlaget.
I 1480 sende Verrocchio ein voksmodell til opdragsgjevarane. Han flytta i 1488 til Venezia for å assistere ved støypinga av skulpturen. Han døydde der same året, før arbeidet hans var fullført.
Verk i utval
Kristi dåp (1472–75), Uffiziane, Firenze
Madonnaen med Johannes døyparen og Donatus, katedralen i Pistoia
Sankta Monica, Santo Spirito, Florens
Tobias og engelen (1470–80), National Gallery i London
Kristus og den tvilande Tomas (1467–83), Orsanmichele i Firenze
Kjelder
Denne artikkelen bygger på «Andrea del Verrocchio» frå , den 28. juli 2011.
Bakgrunnsstoff
Andrea del Verrocchio: History of Art
Artcyclopedia
Renessansekunstnarar
Italienske målarar | 47,511 |
https://stackoverflow.com/questions/71697374 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | James, ZombieChowder, https://stackoverflow.com/users/535480, https://stackoverflow.com/users/5894918 | English | Spoken | 234 | 307 | How to see if PNG has a transparent background with Javascript
We have an upload form for clients to upload their logos, but many clients don't know how to save a PNG with transparency, so we often get white "backgrounds" behind white text, which is totally unusable. So I would like to add some javascript to check if the png has a transparent background, and then reject the form if it does not (or vice versa).
Can that be done on the client side or the server side?
Thanks.
What if the image itself is white haha? Your question is kind of vague because it can be answered in multiple ways, each one being entirely different from the other.
You could implement a very simple neural network to try and detect if the image has a lot of white pixels.
You could create a simple form asking the client if the image they are about to upload has transparent background.
Do you see how those 2 solutions differ from one another? I suggest you try to come up with a solution on your own or maybe ask in another stack exchange website.
There are a few ideas here - https://stackoverflow.com/questions/41287823/check-image-transparency. Checking the file header as mentioned tells you if that particular PNG supports transparency, but not whether it has any. You'd probably have to load the image into a canvas and check some pixels.
| 8,018 |
https://id.wikipedia.org/wiki/The%20Family%20%28film%202013%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | The Family (film 2013) | https://id.wikipedia.org/w/index.php?title=The Family (film 2013)&action=history | Indonesian | Spoken | 70 | 154 | The Family (dirilis sebagai Malavita dan Cosa Nostra di beberapa negara) adalah sebuah film kejahatan komedi gelap tahun 2013 yang ditulis dan disutradarai oleh Luc Besson. Film tersebut menampilkan Robert De Niro, Michelle Pfeiffer, Tommy Lee Jones, Dianna Agron, dan John D'Leo. Film tersebut berdasarkan pada novel Prancis Malavita (Badfellas dalam terjemahan Inggris tahun 2010) karya Tonino Benacquista.
Referensi
Pranala luar
Film Amerika Serikat tahun 2013
Film Prancis tahun 2013 | 44,594 |
https://math.stackexchange.com/questions/4097499 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | Lavorizia Vaughn, RobertTheTutor, https://math.stackexchange.com/users/883326, https://math.stackexchange.com/users/913264 | English | Spoken | 135 | 335 | Proving Radius of Convergence
I am working on a problem and I am to prove that:
$$\frac {\pi}{4}=1-\frac{1}{3}+\frac{1}{5}-\cdots$$
and I am given the hint: $(−1)^n x^{2n} = \frac {1}{1+x^2}$ for all $|x| < 1$.
If $\sum (−1)^{n}x^{2n} = \frac {1}{1+x^{2}}$ for all $|x| < 1,$ then $\sum \frac {(-1)^n}{n+1}x^{2(n+1)} = \int_0^x$ $\frac{1}{1+x^{2}}$ for all $|x| < 1$ by thm.
Now, when I integrate I get $\arctan(x)$ whose limit is $\frac {\pi}{2}$ which is wrong. I would really appreciate some help, thanks.
Don't integrate $0$ to $\infty$, integrate $0$ to $1$.
I integrated from 0 to $\inf$ because of the equivalence to the sum. Why is this not ok?
The limit going to $\infty$ is for $n$, not $x$. You wrote yourself that your formula is only valid for $|x|<1$.
$$
\arctan 1 = \frac\pi4.{{{{{{{{{{{{}}}}}}}}}}}}
$$
| 6,348 |
https://pt.stackoverflow.com/questions/203073 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | MarceloBoni, Raizant, Woss, erilson freitas, https://pt.stackoverflow.com/users/14262, https://pt.stackoverflow.com/users/43326, https://pt.stackoverflow.com/users/5878, https://pt.stackoverflow.com/users/75760 | Wolof | Spoken | 351 | 1,340 | Ajax não funciona no Internet explorer 6
<html>
<head>
<meta charset="utf-8">
<title>AJAX, JSON E PHP</title>
<script type="text/javascript" charset="utf-8"></script>
</head>
<body>
<select name="secoes" id="secoes" style="font-weight:bold;width:100%">
<option>Selecione...</option>
<option value="25" id="25">Hortifrutti</option>
<option value="15" id="15">Peixaria</option>
</select>
<select id="itens" name="itens" style="width:100%; font-weight:bold;">
<option>Selecione...</option>
<option value=""></option>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('#secoes').change(function(){
$('#itens').load('dados.php?secao='+$('#secoes').val() );
});
$('#itens').change(function(){
var Valor = $('#itens').val();
if(Valor != ''){
$('#tabela').load('dados.php?ean='+$('#itens').val() );
}
});
});
</script>
</body>
Retoro PHP
<head>
<?php header('Content-type: text/html; charset=utf-8'); ?>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<? require_once('bd.php'); ?>
</head>
<body>
<?php
//header('Content-Type: text/html; charset=utf-8');
$SecaoPadrao = $_GET['secao'];
$eanselecionado = $_GET['ean'];
if($secao!= ''){
mysql_set_charset('utf8');
$query = mysql_query("SELECT * FROM ConferenciaCeasa where secao ='$SecaoPadrao' and ForaLinha!='*' order by descricao asc");
echo "<option>Selecione...</option>";
while($row = mysql_fetch_array($query)){
echo "<option value='".$row['ean']."'>".$row['descricao']."</option>";
}
}elseif($eanselecionado!= ''){
$query = mysql_query ("select TaraQuantidade,TaraTroca from ConferenciaCeasa WHERE ean like '$eanselecionado'");
while($row = mysql_fetch_array($query)){
echo "<input type='text' style='width:100%;display:<?echo $mostra;?>' value='".$row['TaraQuantidade']."' id='tara-quantidade' name='tara-quantidade' onblur='CalculaCaixa();' onfocus='this.select()'></input>";
}
}
?>
</body>
</html>
Curiosidade: qual a sua necessidade de ainda utilizar IE6?
Difícil (senão impossível) ver pessoas ainda usando o IE6.... Funciona mais ou menos como o Safari no windows, não tem muito sentido tentar ficar ajustando em todos os navegadores, ainda mais os antigos, um site que seja 100% compatível em todos os browser é algo inalcançável por que a lista de browsers existentes, e a lista de implementações diferentes é enorme
Não posso falar pelo autor da pergunta, mas até pouco tempo atrás (3 meses) as empresas de call center que eu trabalhei usavam o IE6 como único navegador, além do antigo querido windows xp. Tem muita empresa pré-histórica por ai.
Do jQuery 2 em diante não há mais suporte para os navegadores IE 6/7/8 e talvez algumas coisas não funcionem no Android 2 e Internet Explorer 9, como dito em https://blog.jquery.com/2013/04/18/jquery-2-0-released/
Para resolver você pode tentar o jQuery 1.x, baixe estes:
Compactado (para produção): https://code.jquery.com/jquery-1.12.4.min.js
Não compactado: https://code.jquery.com/jquery-1.12.4.js
Deve ficar assim:
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function(){
$('#secoes').change(function(){
$('#itens').load('dados.php?secao='+$('#secoes').val() );
});
$('#itens').change(function(){
var Valor = $('#itens').val();
if(Valor != ''){
$('#tabela').load('dados.php?ean='+$('#itens').val() );
}
});
});
</script>
Note que você pode acompanhar o update do jQuery1 aqui: https://code.jquery.com/jquery/#jquery-all-1.x
Muito Obrigado Brother !!!!! resolveu meu problema.
| 17,174 |
https://tt.wikipedia.org/wiki/%D0%A1%D1%83%D1%81%D1%83%D0%B7%20%28%D0%A1%D0%B5%D0%B9%D0%B4%D0%B8%D1%88%D0%B5%D2%BB%D0%B8%D1%80%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Сусуз (Сейдишеһир) | https://tt.wikipedia.org/w/index.php?title=Сусуз (Сейдишеһир)&action=history | Tatar | Spoken | 59 | 221 | Сусуз () — Төркия Җөмһүриятенең Эчке Анатолия бүлгесе Конья иле Сейдишеһир илчесенә караган бер мәхәллә ().
Географиясе
Халык саны
Искәрмәләр
Сылтамалар
Турция // Большая российская энциклопедия : [в 35 т. / гл. ред. Ю. С. Осипов. — М. : Большая российская энциклопедия, 2004—2017.]
Mahalle Nedir?
Kısaltmalar Dizini
Сейдишеһир илчесе мәхәлләләре
Әлифба буенча торак пунктлар
Төркия торак пунктлары
Төркия мәхәлләләре | 16,240 |
https://ceb.wikipedia.org/wiki/Vadhaugen%20%28bungtod%20sa%20Noruwega%2C%20Hordaland%20Fylke%2C%20Fusa%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Vadhaugen (bungtod sa Noruwega, Hordaland Fylke, Fusa) | https://ceb.wikipedia.org/w/index.php?title=Vadhaugen (bungtod sa Noruwega, Hordaland Fylke, Fusa)&action=history | Cebuano | Spoken | 201 | 365 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Vadhaugen.
Bungtod ang Vadhaugen sa Noruwega. Nahimutang ni sa munisipyo sa Fusa ug lalawigan sa Hordaland Fylke, sa habagatan-kasadpang bahin sa nasod, km sa kasadpan sa Oslo ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Vadhaugen.
Ang yuta palibot sa Vadhaugen kasagaran kabungtoran, apan sa amihang-kasadpan nga kini mao ang kabukiran. Ang yuta palibot sa Vadhaugen nga tinakpan sa ubos sa kasadpan. Kinahabogang dapit sa palibot ang Fossafjellet, ka metros ni kahaboga ibabaw sa dagat, km sa habagatan-sidlakan sa Vadhaugen. Dunay mga ka tawo kada kilometro kwadrado sa palibot sa Vadhaugen may gamay nga populasyon. Ang kinadul-ang mas dakong lungsod mao ang Indre Arna, km sa amihanan-kasadpan sa Vadhaugen. Hapit nalukop sa kasagbotan ang palibot sa Vadhaugen. Sa rehiyon palibot sa Vadhaugen, mga bungtod, mga walog, ug busay talagsaon komon.
Ang klima klima sa kontinente. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hulyo, sa °C, ug ang kinabugnawan Pebrero, sa °C.
Saysay
Ang mga gi basihan niini
Mga bungtod sa Hordaland Fylke
Kabukiran sa Noruwega nga mas taas kay sa 200 metros ibabaw sa dagat nga lebel
sv:Vadhaugen (kulle i Norge, Hordaland fylke, Fusa) | 39,487 |
https://stackoverflow.com/questions/70882713 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | Piyush, https://stackoverflow.com/users/3989163 | English | Spoken | 272 | 724 | RenderFlex children have non-zero flex but incoming height constraints are unbounded: Nested ListView
I am trying to build a Nested listview but getting "RenderFlex children have non-zero flex but incoming height constraints are unbounded" error with below code.
Layers are like this...
Each item of a horizontal ListView has a Text widget and a ListView widget.
At the second level, each item of vertical ListView contains again a Text widget and a ListView.
At the third level, each item of the ListView contains a Text widget.
-Horizontal ListView
- Person's Name
- ListView
- Relation Name
- ListView
- Person's Name
Thanks in advance.
person.relations is a Map<String, List<Person>>
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Relationship Explorer"),
),
body: SafeArea(
child: BlocBuilder<RelationCubit, CubitState>(
bloc: _cubit,
builder: (_, state) {
if (state is RelationSuccessState) {
return ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (_, outerIndex) =>
_relationTreeView(context, outerIndex),
itemCount: _cubit.people.length,
);
} else {
return WaitWidget();
}
},
),
),
);
}
Widget _relationTreeView(BuildContext context, int outerIndex) {
var person = _cubit.people[outerIndex];
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(person.displayName ?? ''),
Expanded(
child: Container(
width: MediaQuery.of(context).size.width,
child: ListView.builder(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: person.relations?.length,
itemBuilder: (_, index) {
var persons = person.relations?[index];
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(person.relations!.keys.elementAt(index)),
Expanded(
child: Container(
width: MediaQuery.of(context).size.width,
child: ListView.builder(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: persons.length,
itemBuilder: (_, index) {
var innerPerson = persons[index];
return Text(innerPerson.displayName ?? '');
},
),
),
)
],
);
},
),
),
),
],
);
}
Wrap the list view with a container and give a height.
thanks. Tried wrapping Outermost listview inside container with width & height, but that didn't work
| 41,565 |
https://sr.wikipedia.org/wiki/%D0%92%D1%83%D0%BB%D0%BA%D0%B0%D0%BD%D0%BE%D0%BA%D0%BB%D0%B0%D1%81%D1%82%D0%B8%D1%87%D0%BD%D0%B5%20%D1%81%D1%82%D0%B5%D0%BD%D0%B5 | Wikipedia | Open Web | CC-By-SA | 2,023 | Вулканокластичне стене | https://sr.wikipedia.org/w/index.php?title=Вулканокластичне стене&action=history | Serbian | Spoken | 330 | 1,098 | Вулканокластичне стене настају од материјала магматског (вулканског) порекла, међутим, начин појављивања, услови стварања и морфолошке карактеристике су исте као код кластичних седимената.
Фрагментирани вулкански материјал је различитих димензија, и према величини зрна се дели на:
блокове (угласте) и бомбе (заобљене), чија је величина зрна изнад 32 -{mm}-;
лапиле, са величином зрна од 32 до 4 -{mm}-;
вулкански песак и пепео, са димензијама мањим од 4 -{mm}-;
вулканску прашину, чије су честице мање од 0,25 -{mm}-.
Према начину формирања, учешћу лавичног, вулканокластичног и теригеног материјала, ове стене се деле на:
лавокластичне,
пирокластичне,
седиментно-пирокластичне.
Од вулканских блокова и незаобљеног грубозрног материјала уопште образују се вулканске брече. Обично су везане ситнозрним материјалом, крупноће песка и пепела. Ако је ова међумаса (матрикс) од вулканског пепела, онда се таква стена назива туфобреча. Међутим, често се вулканске брече везују тако што нагомилани блокови бивају заливени касније изливеном лавом. Овако везане вулканске брече називају се лавобрече.
Нагомилавањем вулканских бомби настаје стена која се назива вулканским агломератом. Разлика у односу на вулканску бречу је што су код агломерата фрагменти заобљени.
Ситнији вулканокластични материјал образује вулканске туфове. Туф је изграђен од угластих фрагмената стена, минерала изграђивача стена и/или од фрагмената вулканског стакла. Име носи према природи стене која је фрагментирана. На основу садржаја фрагмената стакла, кристаластих стена или фрагмената минерала, туфови се деле на:
витрокластичне,
литокластичне,
кристалокластичне,
мешовите.
Везивање туфова се најчешће врши збијањем честица под притиском виших маса, мада је често да се везивање врши слепљивањем честица услед преливања туфа новодошлом лавом. Туфови су веома подложни изменама, нарочито витрокластични туфови. Најчешће промене су силификација и претварање у глиновите минерале. Од туфова се на тај начин стварају наслаге глина изграђених од монморионита, тзв. бентонити.
Ако пирокластични материјал оадне у басен у коме се врши нормална седиментација, тада долази до његовог мешања са глиновитом материјом, песком, шљунком. Стене образоване на овај начин, које су изграђене делимично од вулканокластичног, а делимично од седиментног материјала, називају се туфити.
Литература
Ђорђевић В., Ђорђевић П., Миловановић Д. 1991. Основи петрологије. Београд: Наука
Вулканокластичне стене | 20,379 |
https://sv.wikipedia.org/wiki/Queenvic%20mackay | Wikipedia | Open Web | CC-By-SA | 2,023 | Queenvic mackay | https://sv.wikipedia.org/w/index.php?title=Queenvic mackay&action=history | Swedish | Spoken | 32 | 62 | Queenvic mackay är en spindelart som beskrevs av Norman I. Platnick 2000. Queenvic mackay ingår i släktet Queenvic och familjen Lamponidae. Inga underarter finns listade i Catalogue of Life.
Källor
Spindlar
mackay | 50,054 |
https://stackoverflow.com/questions/13811652 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Andrew Whitaker, Jeff, https://stackoverflow.com/users/1781770, https://stackoverflow.com/users/497356 | English | Spoken | 455 | 1,060 | Issues selecting class in table
I am just diving into jquery, so please excuse any really silly mistakes...
I have a table I am generating from a database.
<table id="DataTable">
<tr>
<th><input type="button" onclick=doCheck()></th>
<th>col 2</th>
<th>col 3</th>
<th>col 4</th>
<th>col 5</th>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>data 2</td>
<td>data 3</td>
<td>data 4</td>
<td class="thisOne">data 5</td>
</tr>
.
.
.
</table>
I need to perform some validation checks on column5, labeled thisOne, based on whether or not it is in a row where the box is checked. Here is what I have so far:
//Get checkboxes
var boxes = $("#DataTable").find("tr td input[type=checkbox]");
var locations = [];
boxes.each(function (index, element) {
if ($(element).is(':checked')) {
//Code here
}
});
In the area marked //code here I have tried many things and have not been able to successfully select the column I want. Some things I have tried (NOTE: I am using Hide() for testing purposes):
$(this).closest("td").next('.thisOne').hide(); Doesn't work
$(this).parent("td").next('.thisOne').hide(); Doesn't Work
$(this).closest("td").hide(); Works as expected
$(this).closest("td").next().hide(); Works as expected
$('.thisOne').hide(); Works as expected
Shouldn't the first line I listed work? .closest() will navigate up to the td level, where .next('thisOne') will traverse the DOM until a td tag with that class is found? Please explain any answers as I am really curious as to why this is not working. Thanks
Maybe a typo, but did you mean $("#datatable")?
Typo is correct. My mistake. Fixing..
What you need is .siblings()
$(this).closest('td').siblings('.thisOne').hide();
Also since #datatable is a table, you do not need to specify tr td.. just go for the checkbox..
var boxes = $("#dataTable :checkbox");
Finally checked is also a property of the checkbox, so no need to query for it through jQuery.. You can use element.checked.
Altogether
var boxes = $("#dataTable :checkbox");
var locations = [];
boxes.each(function () {
if ( this.checked ) {
//Code here
$(this).closest('td').siblings('.thisOne').hide();
}
});
var boxes = $("#DataTable :checkbox");
$.each(boxes, function() {
if ( $(this).is(':checked') ) {
$(this).closest('td').siblings('.thisOne').hide();
}
});
The line you are looking for should look something like this -
$(element).closest('tr').find('td.thisOne');
Lets break it down,
$(element) - the checkbox itself.
closest('tr') the closest parent element that is a <tr>.
find('td.thisOne') - from within that parent element, find the <td> element with the thisOne class.
//Get checkboxes
var boxes = $("#DataTable").find("tr td input[type=checkbox]");
var locations = [];
boxes.each(function (index, element) {
if ($(element).is(':checked')) {
var thatOne = $(element).closest('tr').find('td.thisOne');
}
});
To answer your question:
.next() does not work because it only finds the next sibling.
For your case, you need .nextAll(), which finds all following siblings, i.e.
$(this).closest("td").nextAll('.thisOne').hide();
Detailed breakdown:
$(this) // This is your checkbox.
.closest("td") // This gets its closest ancester "td".
.nextAll('.thisOne') // This finds the closest following sibling that has the class "thisOne".
.hide();
Working demo here.
| 31,675 |
https://stackoverflow.com/questions/51521512 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | Drag and Drop, Panagiotis Kanavos, Richardissimo, Sayed Ali Alwedaei, Sean Lange, Tab Alleman, https://stackoverflow.com/users/134204, https://stackoverflow.com/users/1507566, https://stackoverflow.com/users/3813116, https://stackoverflow.com/users/5198140, https://stackoverflow.com/users/6560478, https://stackoverflow.com/users/9444121 | English | Spoken | 668 | 1,255 | Update Password from Sql server Database in C#
I'm Having issues updating password for users in my assignment. As it requires to have 3 textbox one for the current password, and the to others are one for new password and one to confirm the new password. I try different methods but it is not updating. the user can log in successfully but i cant update the password. this is my code for login part:
public static string settext = "";
public Admin_Login_Form()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-CJGIQ74;Initial Catalog=logininfo;Integrated Security=True");
con.Open();
string newcom = "select Name from login where Name='" + textBox1.Text + "' AND password= '" + textBox2.Text + "'";
SqlDataAdapter adp = new SqlDataAdapter(newcom,con);
DataSet ds = new DataSet();
adp.Fill(ds);
DataTable dt = ds.Tables[0];
if (dt.Rows.Count>=1)
{
settext = textBox1.Text;
Admin_Main_Page Main = new Admin_Main_Page();
Main.Show();
this.Hide();
}
else
{
label5.Text = "Invalid Data";
}
}
And this is my registration part:
private void SignUpAdmin_But_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-CJGIQ74;Initial Catalog=logininfo;Integrated Security=True");
con.Open();
string newcom = "insert into login(Name,password,email,address,contact,creditcard) VALUES ('"+NameTxtb_Admin.Text+"','"+PasswordTxtb_Admin.Text + "','" + EmailTxtb_Admin.Text + "','" + AddressTxtb_Admin.Text + "','" + ContactTxtb_Admin.Text + "','" + CreditCardTxtb_Admin.Text + "')";
SqlCommand cmd = new SqlCommand(newcom , con);
cmd.ExecuteNonQuery();
MessageBox.Show("Congratulations… You've been registered!");
this.Close();
}
Note: i know i didn't use parameters i just noticed, by browsing this site.
Anyone guys have an idea what is the code for this issue?
What does "cant update the password" mean? Do you get an error?
Hi, Don't hand craft query like this. You are vulnerable to SQL Injection. Please use an ORM or Parametrise query. https://stackoverflow.com/questions/14376473/what-are-good-ways-to-prevent-sql-injection
Imagine what would happen if the user entered' OR 1=1; -- as a password. Or '; DROP TABLE USERS;--. Don't reinvent the wheel. ASP.NET already implements proper authentication (with a salted, 1024-iteration SHA2 hashing). You can use those authentication services from desktop applications too. There are a lot of tutorials that show how to make ADO.NET calls properly without risking SQL injection attacks.
Obligatory link...http://bobby-tables.com/
And passwords should NEVER be stored in clear text. They should be salted and hashed.
You don't need to fill a datatable if you only want to retrieve a name. Use ExecuteScalar instead. I suspect this code was copy-pasted from various SO questions ?
From Aldert: Seems you are only selecting/inserting data, I do not see any update sql?
And please take a minute read about ORM, and Crypt the password and the CreditCard.
OUCH...I didn't even see the credit card issue. That is just awful and is illegal in several states to store credit card data like that. And the table structure is pretty bad there also, you have limited a user to only having a single card on file. But unless you are going to follow through with full PCI compliance you should immediately stop storing credit card information.
This is just an assignment for my module Introduction to Object oriented Programming in C# the assignment is about making Online Shopping Store. I did not write the code for updating password and i do not know how to write that is why i asked here. sorry if it wasn't clear
I commented about things like SQL injection attacks and SqlConnection and SqlDataAdapter being disposable in your last question; and that still applies, and will continue to apply to everything you ever do in the future. SqlCommand is also disposable.
looks like you need an update statement if you want to update users' passwords, like:
update login set
Password = 'NewPassword'
where
name = 'usernameifunique' and
Password = 'theoldpassword';
Also, you can at least use parameterized queries to avoid injections, if this is just homework I guess you're fine. You can check out my datalayer at github, it has helped countless of times with SQL.
Thanks for answering, so in where should i put this code exactly and can u plz explain a little more i'm new in c# and sql server world.
| 2,621 |
https://nl.wikipedia.org/wiki/Kanton%20Eymet | Wikipedia | Open Web | CC-By-SA | 2,023 | Kanton Eymet | https://nl.wikipedia.org/w/index.php?title=Kanton Eymet&action=history | Dutch | Spoken | 64 | 190 | Eymet is een voormalig kanton van het Franse departement Dordogne. Het kanton maakte deel uit van het arrondissement Bergerac. Het werd opgeheven bij decreet van 21 februari 2014, met uitwerking op 22 maart 2015. Alle gemeenten werden opgenomen in het nieuwe kanton Sud-Bergeracois.
Gemeenten
Het kanton Eymet omvatte de volgende gemeenten:
Eymet (hoofdplaats)
Fonroque
Razac-d'Eymet
Sadillac
Saint-Aubin-de-Cadelech
Saint-Capraise-d'Eymet
Sainte-Eulalie-d'Eymet
Sainte-Innocence
Saint-Julien-d'Eymet
Serres-et-Montguyard
Singleyrac
Eymet | 2,057 |
https://stackoverflow.com/questions/58074277 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | English | Spoken | 219 | 462 | How to solve "No 'Access-Control-Allow-Origin' header is present on the requested resource" error?
I have two S3 buckets. one is having image and pdf data (via CloudFront) and second is statically hosted on s3. when i call image from my URL then it was loaded, but when i call pdf it shows me following error :-->
"Access to fetch at 'pdf link' from origin 'url' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled".
To solve it i setup S3 CORS policy.
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>HEAD</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
And i also setup cloudfront with whitelisting "access-control-request-headers", "access-control-request-method", "origin" these errors and choose GET, PUT, OPTIONS as well.
Suggest how i can solve this error?
Finally, i overcome from this problem. The main issue was the redirecting of protocol from "HTTP to HTTPS".
when i send the request from HTTP then CloudFront redirects it on HTTPS. By this redirection my image was loading but pdf was not, it was fails during redirection.
Then i change my CloudFront's viewer control protocol to HTTPs Only and now it works.
you can also set it to HTTP and HTTPS.
| 1,921 | |
https://nl.wikipedia.org/wiki/Hydrovatus%20eximius | Wikipedia | Open Web | CC-By-SA | 2,023 | Hydrovatus eximius | https://nl.wikipedia.org/w/index.php?title=Hydrovatus eximius&action=history | Dutch | Spoken | 27 | 54 | Hydrovatus eximius is een keversoort uit de familie waterroofkevers (Dytiscidae). De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1997 door Biström.
eximius | 18,379 |
https://fr.wikipedia.org/wiki/Bleed%20Out | Wikipedia | Open Web | CC-By-SA | 2,023 | Bleed Out | https://fr.wikipedia.org/w/index.php?title=Bleed Out&action=history | French | Spoken | 78 | 144 | est le huitième album studio du groupe néerlandais de metal symphonique Within Temptation, sorti le sous le label du groupe, Force Music Recordings.
Liste des pistes
Crédits
Within Temptation
Sharon den Adel – chant
Ruud Jolie – guitare
Robert Westerholt – guitare
Stefan Helleblad – guitare
Martijn Spierenburg – clavier
Jeroen van Veen – basse
Mike Coolen – batterie
Production
Daniel Gibson – production
Notes et références
Liens externes
Album musical sorti en 2023
Album de Within Temptation | 49,482 |
https://be.wikipedia.org/wiki/%D0%93%D0%BB%D1%8B%D0%B1%D0%BE%D1%87%D1%8B%D1%86%D1%8F%20%28%D0%96%D1%8B%D1%82%D0%BE%D0%BC%D1%96%D1%80%D1%81%D0%BA%D1%96%20%D1%80%D0%B0%D1%91%D0%BD%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Глыбочыця (Жытомірскі раён) | https://be.wikipedia.org/w/index.php?title=Глыбочыця (Жытомірскі раён)&action=history | Belarusian | Spoken | 14 | 56 | Глыбочыця () — вёска ў Жытомірскім раёне Жытомірскай вобласці Украіны.
Населеныя пункты Жытомірскага раёна | 49,896 |
https://tt.wikipedia.org/wiki/NGC%206997 | Wikipedia | Open Web | CC-By-SA | 2,023 | NGC 6997 | https://tt.wikipedia.org/w/index.php?title=NGC 6997&action=history | Tatar | Spoken | 45 | 197 | NGC 6997 — Томанлыклар һәм йолдыз тупланмалары яңа гомуми каталогында теркәлгән галактика.
Тарихы
Әлеге галактика елда тарафыннан, яктылык җыючы элемент буларак көзге кулланучы, зурлыктагы оптик телескоп ярдәмендә ачылган.
Чыганаклар
VizieR
NASA/IPAC Extragalactic Database
Искәрмәләр
Шулай ук карагыз
Яңа гомуми каталог
Мессье җисемнәр исемлеге
6997
6997 | 41,843 |
https://pl.wikipedia.org/wiki/Fran%C3%A7ois%20L%C3%A9otard | Wikipedia | Open Web | CC-By-SA | 2,023 | François Léotard | https://pl.wikipedia.org/w/index.php?title=François Léotard&action=history | Polish | Spoken | 389 | 872 | François Léotard (ur. 26 marca 1942 w Cannes, zm. 25 kwietnia 2023) – francuski polityk i samorządowiec, parlamentarzysta oraz minister, lider Partii Republikańskiej i Unii na rzecz Demokracji Francuskiej.
Życiorys
Brat aktora Philippe’ Léotarda. W młodości krótko był działaczem lewicowej Parti socialiste unifié, brał udział w akcjach przeciwko wojnie algierskiej. Później przygotowywał się do życia zakonnego w jednym z opactw benedyktyńskich. Podjął jednak studia prawnicze na Uniwersytecie Paryskim, następnie kształcił się w Instytucie Nauk Politycznych w Paryżu oraz w École nationale d’administration, uzyskując promocję w 1973. Pracował na stanowiskach urzędniczych w prefekturach, był również członkiem gabinetu politycznego ministra spraw wewnętrznych Michela Poniatowskiego.
Zaangażował się w działalność polityczną w ramach francuskiej centroprawicy. Zajmował różne stanowiska w administracji samorządowej. W 1977 objął urząd mera Fréjus. Miejscowością tą kierował do 1997. Zasiadał również w radzie departamentu Var (1977–1988) oraz regionu PACA (1998–2004). W 1978 po raz pierwszy został wybrany do Zgromadzenia Narodowego w jednym z okręgów departamentu Var. Z powodzeniem ubiegał się o reelekcję w wyborach krajowych w 1981, 1986, 1988 i 1993, wyborach uzupełniających w 1995 i wyborach krajowych w 1997.
W latach 1982–1988 kierował Partią Republikańską jako jej sekretarz generalny, następnie do 1990 jako jej przewodniczący. Ponownie był przewodniczącym tego ugrupowania w latach 1995–1997. Od marca 1986 do maja 1988 sprawował urząd ministra kultury i komunikacji w rządzie, którym kierował Jacques Chirac. Ponownie w skład francuskiego gabinetu wszedł w marcu 1993 – w rządzie Édouarda Balladura został ministrem stanu i ministrem obrony. W kampanii prezydenckiej w 1995 wsparł urzędującego premiera, po zwycięstwie Jacques’a Chiraca w maju 1995 odszedł z rządu. W 1996 został przewodniczącym federacyjnej Unii na rzecz Demokracji Francuskiej. W okresie pełnienia przez niego tej funkcji z UDF wystąpiła Demokracja Liberalna, powołana z przekształcenia Partii Republikańskiej. W tym samym roku François Léotard zrezygnował z kierowania partią, został zastąpiony przez François Bayrou.
W 2001 złożył mandat deputowanego, po czym z uwagi na stan zdrowia wycofał się z aktywnej działalności politycznej. W 2004 został skazany na karę 10 miesięcy pozbawienia wolności z warunkowym zawieszeniem jej wykonania za nielegalne finansowanie Partii Republikańskiej. W 2007 wspierał kandydaturę Nicolasa Sarkozy’ego na urząd prezydenta.
Przypisy
Absolwenci École nationale d’administration w Paryżu
Francuscy ministrowie (V Republika)
Francuscy ministrowie kultury
Francuscy ministrowie obrony
Francuscy parlamentarzyści (V Republika)
Francuscy prawnicy
Francuscy samorządowcy
Politycy Unii na rzecz Demokracji Francuskiej
Ludzie urodzeni w Cannes
Urodzeni w 1942
Zmarli w 2023 | 34,782 |
https://law.stackexchange.com/questions/42714 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | Shazamo Morebucks, https://law.stackexchange.com/users/10872, https://law.stackexchange.com/users/26536, lemony9201 | English | Spoken | 380 | 445 | Can a claimant rely on an estimate of cost incurred rather than actual costs?
I am the defendant in a case where I cycled my bike into an oncoming car. The claimant is asking me to pay him an estimate of the costs he required to fix the car (carried out by an expert witness-a consultant motor engineer). Why can't I just pay the actual amount the repairs came to as evidenced by receipts etc. How do I go about challenging this?
You are under no legal obligation to pay undetermined costs for repair, even if you accept liability for the accident. You have to pay for the repair, but you will pay once there is a quote for the repair / when the repairs are carried out.
What usually happens (if this case goes to court) is that the claimant, (or more likely, his insurers), would sue you (and your insurers would then defend this action), for the damage you caused. Although they can sue you before they have actually repaired the vehicle, a judge will generally award this kind of damages (called special damages) once the amount has been finalized.
What this means is: you can choose to wait until an invoice for the repairs has been sent, and you then pay the invoice.
There are other considerations as well, such as you only needing to pay the reasonable costs of repair (the repairs have to be at a fair market price, etc.). Because of this it is always best to contact a solicitor.
Can I just wait for an invoice of the repairs to be sent or do I have to make an application to the court informing the judge that I am happy to pay actual rather than estimated costs?
Just tell the claimant that you are willing to pay after they get charged for repairs. If they agree then your dispute is settled and you then make an application to stay proceedings. If the claimant still wants you to pay whatever estimated costs they ask for (and if you think those estimates are unreasonable), then you may have to stick it out till trial, where the judge will decide the extent of damages you will have to pay. How much is the claimant asking for?
| 42,732 |
https://stackoverflow.com/questions/561661 | StackExchange | Open Web | CC-By-SA | 2,009 | Stack Exchange | Adam Ralph, Alex Lyman, Cerebrus, Dan, deathtrap, https://stackoverflow.com/users/49241, https://stackoverflow.com/users/53718, https://stackoverflow.com/users/5897, https://stackoverflow.com/users/944915, https://stackoverflow.com/users/972587, https://stackoverflow.com/users/972588, https://stackoverflow.com/users/972589, ksingh, 龚元程 | English | Spoken | 467 | 777 | Take an array of any value type as formal parameter
I would like to be able to declare a function as
void foo(<any value type>[] data){}
in C# 2.0. If I declare it as
void foo(ValueType[] data){}
it compiles, but then the elements in data[] are treated as though they're derived from object, e.g. I can't say something like
fixed (void* pData = data){}
I'd like to avoid taking the void* as the parameter -- I just want to be able to accept any value-type array and then do unmanaged things to it.
ETA: Also, this has the same problem:
public static unsafe void foo<T>(T[] data) where T:struct{
fixed(void *p = data){}
}
in case you were wondering. Fixed fails because it's treated as a managed type -- CS0208, cannot declare a pointer to a managed type. See "mm" below. I think he's right... it probably just can't be done.
LOL - 'do unmanaged things to it' - it sounds quite obscene ;-)
Indeed! +1 just for that... reminds me of "do unimaginable things to it"
yes! that's the word I was looking for - 'unimaginable'... thank you
That last generics-based solution you had should work in any case. Can you provide the code that shows what exactly you're seeing fail with it?
I don't think this is possible using C#. Structs do not inherit (however loosely) from System.ValueType until after compile time so you can't match Foo's method signature via polymorphism. Generics are also out according to the language specification:
"An unmanaged-type is any type that isn’t a reference-type, a type-parameter, or a generic struct-type and
contains no fields whose type is not an unmanaged-type."
So that's why you can't take the address of T[] regardless of the struct constraint.
You could declare a struct type (say, Bar) as the argument to Foo, compile the code, and change the method signature at the IL level:
.method private hidebysig static void Foo(valuetype [mscorlib]System.ValueType[] args) cil managed
And then the call as well:
IL_0020: call void ConsoleApplication1.Program::Foo(valuetype [mscorlib]System.ValueType[])
While I was able to run the resulting program I don't know what kind of side effects this has. Also, even if you could reference the modified function you wouldn't be able to call it from C# because again structs don't inherit from System.ValueType until after compilation so the method signature wouldn't match.
public void foo<T>(params T[] args) where T : struct {
}
public void SomeMethod() {
foo(1, 2, 3, 4);
}
You shouldn't have to enter the generic parameter because the compiler will pick up on the type from the first parameter of foo.
This would work:
public static void foo(System.Array data)
{
}
static void Main(string[] args)
{
foo(new int[10]);
}
It doesn't enforce that the array is an array of value types, but it would work.
| 644 |
https://en.wikipedia.org/wiki/Fred%20Bratschi | Wikipedia | Open Web | CC-By-SA | 2,023 | Fred Bratschi | https://en.wikipedia.org/w/index.php?title=Fred Bratschi&action=history | English | Spoken | 148 | 258 | Frederick Oscar Bratschi (January 16, 1892 – January 10, 1962) was a left fielder in Major League Baseball between and . Bratschi batted and threw right-handed. He was born in Alliance, Ohio.
Bratschi was 29 years old when he reached the majors with the Chicago White Sox in 1921, spending one year with them before moving to the Boston Red Sox during 1926-27. In parts of three seasons, he posted a .276 batting average (54-for-196) with 12 runs, 19 RBI,10 doubles, and one triple with no home runs in 89 games played.
Bratschi died in Massillon, Ohio, at the age of 69, by accidentally drinking battery acid.
External links
Retrosheet
{https://sabr.org/bioproj/person/fred-bratschi/}
Boston Red Sox players
Chicago White Sox players
Major League Baseball left fielders
People from Alliance, Ohio
Sportspeople from Stark County, Ohio
Baseball players from Ohio
1892 births
1962 deaths
Accidental deaths in Ohio
Deaths by poisoning | 6,013 |
https://ceb.wikipedia.org/wiki/Tetranychus%20bellottii | Wikipedia | Open Web | CC-By-SA | 2,023 | Tetranychus bellottii | https://ceb.wikipedia.org/w/index.php?title=Tetranychus bellottii&action=history | Cebuano | Spoken | 51 | 106 | Kaliwatan sa murag-kaka ang Tetranychus bellottii. Una ning gihulagway ni Flechtmann ni adtong 1981. Ang Tetranychus bellottii sakop sa kahenera nga Tetranychus, ug kabanay nga Tetranychidae.
Kini nga matang hayop na sabwag sa:
Indya
Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Murag-kaka
Tetranychus
Murag-kaka sa Indiya | 13,800 |
https://zh.wikipedia.org/wiki/%E8%A5%BF%E7%8F%AD%E7%89%99LGBT%E6%AC%8A%E7%9B%8A | Wikipedia | Open Web | CC-By-SA | 2,023 | 西班牙LGBT權益 | https://zh.wikipedia.org/w/index.php?title=西班牙LGBT權益&action=history | Chinese | Spoken | 55 | 5,930 | 在西班牙,女同性戀者、男同性戀者、雙性戀者與跨性別者(LGBT)的歷史可追溯至古羅馬;隨著時代變遷,在歷經近數十年來的重大改革與變化後,西班牙已成為世界上同志族群自由程度最高的地區之一。
最早在羅馬時代,性行為是一種征服和控制的權力象徵;演變至近代,同性戀學說出現,認為性行為是一種性傾向,甚至是生活型態。性的發展過程中受到許多因素影響,其中一項最主要的因子便是基督教信仰的影響力;它認為性行為的唯一目的是生殖,凡是不為生殖而進行的性行為都是不自然、有罪的,違背上帝的旨意。這個觀念反應在神權時代的立法上,如雞姦被判定為叛國罪,是處以火刑的死罪。直到啟蒙時代,個人自由漸獲重視,方見轉捩;1822年,雞姦行為始自西班牙刑法中除罪、合法化。西班牙社會漸漸突破困境、成功推動接納同性戀的思維之際,卻被接踵而至的西班牙內戰及弗朗西斯科·佛朗哥的獨裁統治硬生生打斷,對同性戀者的壓迫再次興起。獨裁政權落幕後,權利運動又重新運行,但仍遭逢同性戀恐懼症等阻力。
現今,西班牙是世界上具有合法同性婚姻的十個國家之一,也已立法保障同性伴侶合法收養的權利,並積極制定了許多相關法律。西班牙的同志文化亦十分多元,如揚名國際的電影導演佩德羅·阿莫多瓦,以及2007年在馬德里舉行的歐洲同志驕傲遊行(Europride)。同志的可見度已經提升至以往難以想像的各階層,包括軍隊、憲警隊、法官和神父,儘管在足球等其他領域,同志平權之路仍然漫長。
羅馬時代
羅馬帝國統治時期,西班牙接受了各層面的羅馬文化,也受到羅馬性觀念的影響。羅馬人對性行為的思想開放,男性間的性愛關係是一種公認的社會文化。在羅馬人的觀念裡,性愛關係中個人的所占地位比對象更為重要。因此,羅馬公民可以隨時進入非公民男性、下層平民男性、男奴、男孩、閹人或男妓來滿足自己的性慾,與對象為年輕女奴、妾侍和妓女時的情形並無差異,但上層階級絕對不會允許他人進入自己,無論對方的年齡或階層高低與否。在男性性行為中,他必須扮演主導的角色。羅馬社會對同性戀存在一種嚴格的分別,即:主動方(和男女兩性性交)與被動方(被視為具奴性、類似女性的一方)。事實上,這個道德準則是為違對尤利烏斯·凱撒而設;凱撒由於據傳在與比提尼亞國王的性行為中處於被動地位,而被羅馬社會大肆議論。然而,許多上層階級的人民並無視於扮演被動角色的負面評論,其中著名的例子包括羅馬皇帝尼祿和埃拉伽巴路斯。
古羅馬的同性戀文化亦十分豐富,包括文學、藝術與詩歌等形式。古羅馬詩人馬庫斯·瓦勒里烏斯·馬提亞利斯(馬提雅爾)創作的諷刺短詩和詩歌,便以虛構第一人稱筆法描繪透過肛門和陰道的性交,以及接受來自男女兩性的口交。
哈德良是羅馬帝國最著名的同性戀皇帝。他出生於伊斯帕尼亞,西元117年至138年間在位,戀人是美少年安提諾烏斯。安提諾烏斯意外在尼羅河落水而死後,哈德良將他神化,並在埃及以安提諾烏斯為名建立了安提諾波利斯市以作紀念。
基督教的到來
四世紀時,泰法利人是居住在喀爾巴阡山脈和黑海之間的蠻族部落,由於維持希臘式男同性性行為傳統,受到古羅馬晚期史學家阿米阿努斯·馬爾切利努斯嚴厲譴責。當時,隨著基督教的盛行,羅馬的道德與性文化產生了劇變。西元342年,基督教皇帝君士坦丁二世和君士坦提烏斯二世頒布了首部禁止同性婚姻的法律,立法嚴懲同性戀中的被動方,刑罰可能為割刑。到了西元390年狄奧多西一世統治時,更進一步明令對妓院中所有同性戀被動方公然處以火刑。西元438年,對象再擴及至所有同性戀被動方;西元533年查士丁尼一世甚至認定同性戀者是饑荒、地震和瘟疫的罪魁禍首,變本加厲下令禁止同性性行為,違者處以割刑和火刑。
對於羅馬文化的如此轉變,查士丁尼時代的史學家普羅科匹厄斯曾提出三項解釋。首先,他認為法律背後隱含著政治動機:它賦予查士丁尼藉此摧毀政敵、沒收其財產的權力,但事實上在禁止普通公民間的同性性行為方面卻窒礙難行。第二個,也可能是最重要的一個原因,是由於羅馬社會中基督教勢力的興起,即基督教教義相信性只能為生育目的。柯林·史賓瑟在他的著作《同性戀,歷史》中認為,這可能與羅馬社會經過黑熱病等傳染病摧殘後,自我保護意識提高了生殖壓力有關。這個現象也和後來斯多噶學派的興盛相結合。
直到西元313年前,基督教教義中並沒有同性戀的相關規定,但保羅早已表明它「違反本性」:
最後,教父在違抗當代社會風氣(包括原始的教會)之下,針對同性戀及同性性行為定下了文意上的罪名。另一方面,同性戀也很快地被認定是異端邪說,不僅因它是教外人的傳統,據聖奧古斯丁所記載,某些諾斯底教派或摩尼教會進行同性戀儀式。
西哥德人
在日耳曼民族文化,同性戀被動方和婦女皆被視為「癡愚」、地位與奴隸相等,僅頌揚男人之間的戰士情誼。然而,據傳聞斯堪的納維亞民族的女牧師、異裝牧師以及索爾、奧丁等北歐阿薩神族神祇,會透過飲用精液獲得奧秘智力。
中世紀時,對同性戀的態度仍維持羅馬帝國時期原狀。當時亦有明確的同性戀實例,雖然他們不被當代接受,但也未受懲罰。例如,法蘭克王國國王克洛維一世在受洗日供認他和男性間的情愛關係;又如盎格魯撒克遜詩人阿爾琴,留下許多描繪同性愛的詩句和信函。然而,基督教道德觀正一點一滴的滲透,以其受高度約束的性觀念,以及繼承猶太認為性行為應只為生殖目的的信念為根據,逐漸編織出嚴密而複雜的教義規範,深深影響了當代法律。
歐洲最早將男同性戀定罪的法律全書之一是《西哥德法典》。法典中所收錄的西哥德法律,訂定違反所謂自然法的犯罪者(性悖軌法)將被驅逐和處以閹割。「閹割」一刑適用於所有「違反自然法」的「性罪」,包括男同性行為、肛交(無論異性或同性)、人和動物的性交。女同性戀的性愛只有在使用假陽具輔助時才被認定為「雞姦」。
七世紀,西哥德國王(642年-653年)下令,同性行為一律判處割刑。訂法之殘酷嚴峻,在哥德法律是前所未聞的,僅有猶太割禮可以相比擬。在閹割後,罪犯會被轉交當地主教,接著遭驅逐流放。如果罪犯已婚,婚姻即被宣告無效,嫁妝交還女方,剩餘財產則分予其繼承人。
西元693年,國王命令主教重新審議同性戀議題;於是在同年的第十六屆托雷多會議,高級教士「燃動著對上帝的激情」,表示「許多男人」已經受到「雞姦之惡」的腐蝕。
穆斯林統治
安達魯斯文明除了穆拉比特和穆瓦希德王朝的統治時期之外,對於性皆十分寬容,和他們北鄰的基督教政權形成強烈對比。然而事實上,古蘭經中明文嚴禁同性戀,違者甚至必須處以死刑,但無論是伊比利半島或其餘伊斯蘭世界的當代穆斯林社會,都沒有遵循這項規定。根據一名馬立克派神學家(Ibn Abi Zayd)所創修的伊斯蘭律法綱要(Risala fi-l-Fiqh)記載,經彼此同意下而共臥的成年男子,得處以石刑之死罪。
偉大領袖如阿卜杜-拉赫曼三世、哈甘二世、希沙姆二世和穆塔米德都有少年情人。為確保後代的延續,哈甘二世甚至必須由假扮成男孩的女孩進行引誘。這種習俗在當時的貴族和上流社會也十分普遍。
中世紀基督教政權
失地收復運動重新為西班牙社會引入基督教道德觀,但直到天主教君主統治之前,對同性戀仍保有相對的寬容程度,特別是在富裕階層。當12世紀的伊斯蘭神職人員批判基督教的雞姦風潮時,基督教文化以穆斯林使用基督教囚犯做為性奴為例證,反將南方的穆斯林視為軟弱和衰頹的政權。最有名的例子是殉道者聖佩拉約,他因抵抗阿卜杜-拉赫曼三世的求愛而被處死。
近代
十四世紀起,歐洲對同性戀者展開第一次大規模迫害和屠殺,大城市如威尼斯、佛羅倫斯、雷根斯堡、奧格斯堡及巴塞爾,無一倖免。政府透過匿名檢舉等手段,並行酷刑逼供,常使人凌遲致死。卡斯提爾直到1495年首度對雞姦行為執行死刑。
1497年,天主教君主頒布國事詔書,加強、進一步牢綁雞姦相關法令,嚴禁相對放縱的情愛關係。此時,同性戀相關罪行已提升至異端邪說、叛國罪的等級;官方鬆綁了證據條件,實行有系統的嚴刑逼供,即使對象是神職人員或貴族也無例外。
西班牙異端裁判
同性性行為在現代以前以「雞姦」為人所知。在西班牙,雞姦將處以閹割或石刑,屬死刑範疇。
在亞拉岡境內,自1524年教皇克勉七世頒布教皇訓令後,由宗教裁判所負責審理。在卡斯提爾,除非涉及異端,雞姦行為並不會受到審判。薩拉戈薩裁判所則以審罪嚴峻著稱:1571年至1579年間,超過100人因雞姦行為被告,其中至少36人遭處決;1570年至1630年間總計受理534件審案、執行102件死刑。然而,這還不包含世俗權威所動用的私刑。
現代
薩帕特羅政府
2004年西班牙普選,偏右翼的人民黨失利,由何塞·路易斯·羅德里格斯·薩帕特羅所領導的工人社會黨取得政權。薩帕特羅政府上任後隨即展開改革,其中包括承諾合法化西班牙的同性婚姻。
2005年7月2日,西班牙議會對同性婚姻合法化提案進行表決,眾議院以187票支持(以工人社會黨、巴斯克民族主義黨、加泰羅尼亞左翼共和黨、加那利聯盟、左翼黨等為主)、147票反對(以人民黨和加泰羅尼亞民主聯盟為主)、4票棄權通過法案。根據社會學研究中心的民調,西班牙有66%的人口支持通過該法律。人民黨隨後向憲法法庭提出上訴,現為決議中。在國會以外,同性婚姻的反對勢力主要來自於天主教會與其相關組織,如西班牙家庭論壇。同性婚姻的合法化同時代表其與異性婚姻相關權利的平等化,包括可合法共同領養及繼子女領養。
接納程度
現今,西班牙社會對同性戀和雙性戀具有很高的接受度,在大型和中型城市更是熱情。不過,在鄉村和部分社會層級,仍存在著一定程度的歧視。2006年12月的歐洲晴雨表調查顯示,66%的受訪西班牙人支持同性婚姻,而43%接受同性伴侶擁有收養子女的權利;歐盟的平均值則分別是44%和33%。
概要
同志文化
文學
20世紀初,西班牙文壇對同志題材仍相當避諱,當時的作家如哈辛托·貝納文特等如非忽視同性戀議題,便是選擇以極為隱晦的筆法展現。同志文學主要出自外國作家筆下,例如智利奧古斯托·哈爾馬(Augusto d'Halmar)的《杜斯托神父的激情與死亡》,從正面角度描寫同志族群。
許多作家也選擇隱遁入詩歌中。此文學運動下的男女同性戀詩人對西班牙文學產生了極深遠的影響:他們深塾於奧斯卡·王爾德、安德烈·紀德(主要為他的著作《田園牧人》)和馬塞爾·普魯斯特等歐洲同志文學巨匠,名例包括費德里戈·加西亞·洛爾卡、艾米略·普拉多斯、路易斯·塞爾努達、阿萊克桑德雷·梅洛和曼努埃爾·艾托拉吉瑞。
電影
在佛朗哥的極權統治下,受到審查制度限制,西班牙的同志電影藝術發展極為艱難。首部呈現出廣義同性戀相關情節的電影是《Diferente》,由路易斯·馬利亞·德爾加多執導,手法十分抽象。直到1977年,電影中甚少有同志情節;即使有,也是將之視為嘲弄對象。
西班牙民主轉型期間,影壇終於出現了非醜化同性戀者的電影,如伊馬諾爾·烏里維的《米克爾之死》以及溫圖拉·龐斯的《奧甘亞,間歇的肖像》等。這段時期的電影中,創作者實驗性的捕捉各種男同性戀者的面貌:除了原來男同志陰柔的刻板印象外,跨性別、陽剛、英俊和異裝皇后皆走入鏡頭,西班牙電影的同志元素一時轉為多元璀璨。同性戀也擺脫龍套、被寫為劇情重點,塑造出同性情感的脆弱,並著墨於它的內在掙扎與不容見於社會。
1985年,以佩德羅·阿莫多瓦的《慾望法則》為首,開啟了以其他非同性戀的同志族群為主題的風潮。阿莫多瓦無疑是西班牙最知名的同志人士。他在劇情中自然織入同志元素的高超手法,使他的電影作品聞名中外、風靡全球。除了阿莫多瓦,溫圖拉·龐斯和埃洛伊·德拉·伊格萊西亞是兩位較常在電影作品中加入同志劇情的導演。2004年9月,著名電影導演、編劇亞歷桑德羅·阿曼巴也公開出櫃。
女同性戀的電影作品不多,較為知名的作品有喜劇片《媽媽愛女人》等。
參見
西班牙同性婚姻
歐洲LGBT權益
註釋
參考資料
Spain | 44,099 |
https://stackoverflow.com/questions/72564307 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | Monica, OneCricketeer, P...., https://stackoverflow.com/users/19272430, https://stackoverflow.com/users/2308683, https://stackoverflow.com/users/6309601 | English | Spoken | 90 | 170 | can't copy a file from local machine to a pod
i'm trying to copy a file from local machine to a HADOOP POD with kubectl :
kubectl cp /data/titles.csv -c namenode hdfs-namnode-0:/newfile/titles.csv
i get always this error :
tar: /newfile: Cannot open : No such file or directory
And newfile is already existing :
can you do which tar inside your container and let us know the output ?
@P.... i get /bin/tar
The error is saying that /newfile path doesn't exist in the container. Maybe you should try hdfs-namnode-0:/tmp/titles.csv
| 10,058 |
https://stackoverflow.com/questions/66573537 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | EdStevens, Littlefoot, cmomah, https://stackoverflow.com/users/3881206, https://stackoverflow.com/users/5732537, https://stackoverflow.com/users/9097906 | English | Spoken | 447 | 928 | Oracle SQL to display results from dividing one variable with another
I need to calculate the YTD weekly average for the GROSS_AMOUNT
In the below script, the first part of the code gets the number of weeks. The second part of the code gets the YTD sum for that same time period
How do I write the SQL so I can retrieve the actual value of YtdTotal/TotalWeeks?
SELECT YtdTotal/TotalWeeks FROM DUAL; does not work
-- STORES NUMBER OF WEEKS SINCE BEGINING OF YEAR INTO THE VARIABLE, TotalWeeks
DECLARE
TotalWeeks NUMBER;
BEGIN
SELECT to_number(to_char(sysdate, 'WW')) - to_number(to_char(trunc(sysdate, 'year'),'WW'))
INTO TotalWeeks
FROM DUAL
-- (retrieves number of weeks since beginning of year)
END
-- STORES THE SUM OF GROSS)AMOUNT FOR THE WEEKS CALCULATED ABOVE - INTO THE
DECLARE
VARIABLE, YtdTotal
BEGIN
SELECT SUM(GROSS_AMOUNT)
INTO YtdTotal
FROM PARENTS
WHERE process_date BETWEEN
(next_day(TRUNC(sysdate, 'year'),'SUN'))
AND
(next_day(TRUNC(sysdate),'SAT')-7);
END;
Why are you applying to_date to sysdate? to_date converts a string to a DATE (data type) , and sysdate is a DATE. Also your code will be mucn easier for us to read if instead of a screen shot, you actually copy and paste the text, formatting the pasted text as "code". Also, it will help if you provide the DDL for the tables and INSERTs to create representative data. https://stackoverflow.com/help/minimal-reproducible-example
Thanks for your feedback. I have corrected the to_date issue and have replaced the screenshot with the code format.
All I really need to know is the right syntax for retrieving the value of YtdTotal DIVIDE BY TotalWeeks. These are the variables that I am passing the calculations to
Don't use two separate anonymous PL/SQL blocks - combine them into one!
If you want to return the result, then - instead of an anonymous PL/SQL block - create a function.
CREATE OR REPLACE FUNCTION f_test
return NUMBER
IS
totalweeks NUMBER;
ytdtotal NUMBER;
result NUMBER;
BEGIN
-- STORES NUMBER OF WEEKS SINCE BEGINING OF YEAR INTO THE VARIABLE, TotalWeeks
SELECT TO_NUMBER (TO_CHAR (SYSDATE, 'WW'))
- TO_NUMBER (TO_CHAR (TRUNC (SYSDATE, 'year'), 'WW'))
INTO totalweeks
FROM DUAL;
-- (retrieves number of weeks since beginning of year)
-- STORES THE SUM OF GROSS)AMOUNT FOR THE WEEKS CALCULATED ABOVE - INTO THE
SELECT SUM (gross_amount)
INTO ytdtotal
FROM parents
WHERE process_date BETWEEN (NEXT_DAY (TRUNC (SYSDATE, 'year'), 'SUN'))
AND (NEXT_DAY (TRUNC (SYSDATE), 'SAT') - 7);
-- the final result
result := ytdtogal / totalweeks;
RETURN result;
END;
/
Use it as
select f_test from dual;
The query executed successfully, thank you. But I'm not sure how to retrieve the actual value from the "result" variable. I tried SELECT RESULT FROM DUAL, and that did not work
It would be a function, then. I edited the answer, have a look.
| 39,475 |
https://ca.wikipedia.org/wiki/Alessandro%20Romano | Wikipedia | Open Web | CC-By-SA | 2,023 | Alessandro Romano | https://ca.wikipedia.org/w/index.php?title=Alessandro Romano&action=history | Catalan | Spoken | 108 | 253 | Alessandro Romano (Roma vers el 1530 - Castelleone, 1592) fou un compositor, cantant i virtuós de la viola d'arc. Durant molt temps se l'ha confós amb alguns músics del mateix període, incloent al cantant papal Alexandro Merlo.
Fou deixeble de Palestrina. El 1560 fou nomenat cantor de la Capella Pontifícia. Va ser el primer mestre de música de l'Accademia Filarmonica di Verona (1552-3 i 1556-7) abans d'esdevenir un monjo benedictí Olivetana amb el nom de Giulio Cesare (1571-1592).
Se li deuen: Canzoni alla napolitana (1572-1575), Motets (1577); i Madrigals (1579).
Bibliografia
Enciclopèdia Espasa. Volum núm. 34, pàg. 963 ()
Compositors italians del Renaixement
Madrigalistes italians
Compositors de Roma | 20,072 |
https://lt.wikipedia.org/wiki/Zyboliai | Wikipedia | Open Web | CC-By-SA | 2,023 | Zyboliai | https://lt.wikipedia.org/w/index.php?title=Zyboliai&action=history | Lithuanian | Spoken | 9 | 38 | Zyboliais vadinami kaimai Rokiškio rajone:
Obelių seniūnijoje;
Rokiškio seniūnijoje. | 9,434 |
https://math.stackexchange.com/questions/344657 | StackExchange | Open Web | CC-By-SA | 2,013 | Stack Exchange | Barkot Ayalew, Jubayer Matin, https://math.stackexchange.com/users/1277223, https://math.stackexchange.com/users/1277224, https://math.stackexchange.com/users/43946, vonbrand | English | Spoken | 225 | 285 | How to calculate avaerage of the average
I am having data of 10 schools, each school is having different no of sections. Each section students attended different no of computer classes. How to calculate the average no of computer classes attended by 10 school students.
I tried to calcluated the overall average in following steps.
First i calculated average of each school by taking the sum of no of computer classes taken in the school divided by no of sections.
in second step, i added all the averages and divided the sum by no of schools(i.e.10). is it correct method. please suggest if anyother method available to solve this problem.
You should probably multiply each average by the number of students, add them up and deivide by the number of students. If you think about it, this is the total number of classes divided by the total number of students, i.e., the overall average.
In general, the average of averages is not the average. This was discussed before: Is the average of the averages equal to the average of all the numbers originally averaged?
The correct method is to undo the averaging over schools, as vonbrand suggested: find the total number of classes taken by the students of each school. Add those numbers together, and divide by the sum of total enrollments of the schools.
| 131 |
https://de.wikipedia.org/wiki/Liste%20der%20Monuments%20historiques%20in%20Saint-Thibault%20%28Aube%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Liste der Monuments historiques in Saint-Thibault (Aube) | https://de.wikipedia.org/w/index.php?title=Liste der Monuments historiques in Saint-Thibault (Aube)&action=history | German | Spoken | 29 | 67 | Die Liste der Monuments historiques in Saint-Thibault führt die Monuments historiques in der französischen Gemeinde Saint-Thibault auf.
Liste der Immobilien
|}
Liste der Objekte
|}
Weblinks
Saintthibault
Saintthibault
! | 40,745 |
https://stackoverflow.com/questions/36812305 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | Stefan Haustein, https://stackoverflow.com/users/1401879, https://stackoverflow.com/users/3119031, sssemil | English | Spoken | 949 | 2,079 | Separate atoms from given chemical formula programmatically
I'm trying to solve this - https://www.e-olymp.com/en/problems/7549 but I can't pass all tests (passed only 1/4). I was testing my code with these inputs:
(AlC2)3Na4
3Al+6C+4Na
Gh(G2H3(H1A45)2)5(Bn6Mn3)5
450A+30Bn+10G+Gh+25H+15Mn
(Na1000)10Na02
10002Na
So, looks like it works but it does not work. Any hint would be great.
Here is problem itself:
The chemical formula of a molecule M describes its atomic make-up. Chemical formulas obey the following grammar:
M := G | M G
G := S | S C
S := A | '(' M ')'
C := T | N E
E := D | D E
T := '2' | ... | '9'
N := '1' | ... | '9'
D := '0' | .. | '9'
A := U | U L | U L L
U := 'A' | .. | 'Z'
L := 'a' | .. | 'z'
The count C represents a multiplier for the subgroup S that precedes it. For example, H2O has two H (hydrogen) and one O (oxygen) atoms, and (AlC2)3Na4 contains 3 Al (aluminum), 6 C (carbon) and 4 Na (sodium) atoms.
Input
Contains multiple test cases. For each test case, there will be one line, containing a valid chemical formula. Each line will have no more than 100 characters.
Output
For each line there will be one line of output which is the atomic decomposition of the chemical in the form of a sum as shown in the sample output. The atoms are listed in lexicographical order, and a count of 1 is implied and not explicitly written. There are no blank spaces in the output. All of the counts in the correct output will be representable in 32-bit signed integers.
And this is my code (it might looks disgusting but anyway):
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
//Gh(G2H3(H1A45)2)5(Bn6Mn3)5
public class Main {
static Scanner mIn;
static PrintWriter mOut;
public static void main(String[] args) {
mIn = new Scanner(System.in);
mOut = new PrintWriter(System.out);
String line = mIn.nextLine();
ArrayList<Atom> atoms = new ArrayList<>();
ArrayList<Integer> startBr = new ArrayList<>();
for (int i = 0; i < line.length(); i++) {
if (line.charAt(i) == '(') {
//starting
startBr.add(atoms.size());
} else if (line.charAt(i) == ')') {
//ending
int n = 1;
if (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
n = line.charAt(i + 1) - '0';
i++;
while (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
n *= 10;
n += line.charAt(i + 1) - '0';
i++;
}
}
for (int j = startBr.get(startBr.size() - 1); j < atoms.size(); j++) {
atoms.get(j).n *= n;
}
startBr.remove(startBr.size() - 1);
} else if (Character.isUpperCase(line.charAt(i))) {
Atom atom = new Atom();
atom.name = String.valueOf(line.charAt(i));
if (line.length() > i + 1 && isCont(line.charAt(i + 1))) {
atom.name += String.valueOf(line.charAt(i + 1));
i++;
if (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
atom.n = line.charAt(i + 1) - '0';
i++;
while (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
atom.n *= 10;
atom.n += line.charAt(i + 1) - '0';
i++;
}
}
}
if (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
atom.n = Integer.parseInt(String.valueOf(line.charAt(i + 1)));
i++;
while (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
atom.n *= 10;
atom.n += line.charAt(i + 1) - '0';
i++;
}
}
atoms.add(atom);
}
}
for (int i = 0; i < atoms.size(); i++) {
for (int j = i + 1; j < atoms.size(); j++) {
if (atoms.get(i).name.equals(atoms.get(j).name)) {
atoms.get(i).n += atoms.get(j).n;
atoms.get(j).n = -1;
}
}
}
for (int i = 0; i < atoms.size(); i++) {
if (atoms.get(i).n < 1) {
atoms.remove(i);
}
}
Collections.sort(atoms, ALPHABETICAL_ORDER);
for (int i = 0; i < atoms.size(); i++) {
p(atoms.get(i).toString());
if (i != atoms.size() - 1) {
p("+");
}
}
}
private static Comparator<Atom> ALPHABETICAL_ORDER = new Comparator<Atom>() {
public int compare(Atom atom1, Atom atom2) {
return atom1.name.compareTo(atom2.name);
}
};
private static boolean isCont(char c) {
return c >= 'a' && c <= 'z';
}
private static boolean isNum(char c) {
return c >= '0' && c <= '9';
}
private static void p(Object obj) {
mOut.print(obj);
mOut.flush();
}
private static class Atom {
public String name;
public int n = 1;
public String toString() {
if (n == 1) {
return name;
}
return n + name;
}
}
}
What's an example input and output where it doesn't work?
I gave 2 tests as example and they both work. There are different tests on e-olymp but I can't see them. Problem is that my code passes only 1/4 tests.
Have you tried Na123 or O1234 as input? Both seem to be permitted by the grammar?
BTW: Some of the methods could be much shorter...
private static boolean isCont(char c) {
return c >= 'a' && c <= 'z';
}
private static isNum(char c) {
return c >= '0' && c <= '9';
}
For converting a single digit character c to the corresponding value, you could use Character.getNumericalValue(c) -- or just (c - '0'). The Character class javadoc probably contains more interesting hints for your use case...
P.S.
I don't really understand why you don't use the same number parsing code after conditionally adding the cont letter....
Let me throw in a code fragment you might find useful:
while (line.length() > i + 1 && isNum(line.charAt(i + 1))) {
atom.n = 10 * atom.n + (line.charAt(++i) - '0');
}
Thanks for your answer. So, I've edited it and now it's good with (Na1000)10Na02 which gives
10002Na but still fails 3/4 tests.
I didn't spot any other issue... I'd try to generate more complex examples until you find one that fails, and then try to debug,,,
| 47,512 |
https://ms.wikipedia.org/wiki/Liborina | Wikipedia | Open Web | CC-By-SA | 2,023 | Liborina | https://ms.wikipedia.org/w/index.php?title=Liborina&action=history | Malay | Spoken | 17 | 44 | Liborina merupakan sebuah bandar dan komuniti yang terletak di wilayah Antioquia, Colombia.
Kawasan perbandaran di Jabatan Antioquia | 10,051 |
https://tex.stackexchange.com/questions/250258 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | Adam Maxwell, Speldosa, cfr, https://tex.stackexchange.com/users/3555, https://tex.stackexchange.com/users/39222, https://tex.stackexchange.com/users/61839 | English | Spoken | 401 | 575 | Export bib file only containing certain fields from BibDesk
I have a .bib file that I want to shrink down so that it only contains all the entries but only a subset of the original parameters. Furthermore, I would like to do this by specifying which parameters to include and not which ones to remove (the reason being that I have no control over the naming of the extra parameters that might get included in my original file).
(In my specific case, I would like to keep the parameters Author, Journal, Pages, Title, Volume, Number, Year, and Doi.)
Can I achieve this somehow? I don't really care what tool I would have to use.
I've been looking into using BibDesk for this. More specifically, using templates. However, the information I've found about this so far has been sparse and incomprehensible at best and outright faulty at worst (or maybe it's just me who can't read instructions).
sed or (g)awk? (I assume you are not using Windows given the reference to BibDesk and so will have these.)
Presumably biber can do this?
You should be able to do this with BibDesk templates. If you don't want the required/optional fields as specified in btxdoc, I'd start with this example, but replace the requiredFields and optionalFields with blocks like this for each field that you want to keep:
<$fields.Author?>
Author = <$fields.Author.bibTeXString/>,
<?$fields.Author?>
If that doesn't work, post back here or (better) the BibDesk mailing list. It's been years since I did anything with the template system, so I can't give you a full example off the top of my head.
Thanks for pointing me in the right direction. After a lot of digging around, I managed to create an output that I was satisfied with. However, it really feels like the manual for BibDesk needs a thorough overhaul by someone who isn't a nerdy programmer :)
Unfortunately, the guys who wrote the code for BibDesk (of which I am one) also wrote the manual, because no one else could or would. It is open-source, so contributions would be welcome!
One tool I've used is BibtexParser. You can use it in a Python script that takes the .bib file and outputs another one with the fields you want. I've used it for something similar myself: https://github.com/twsh/Convertbibliography
This isn't a Bibdesk specific solution, of course. But I take it that that doesn't matter to you.
| 11,043 |
https://th.wikipedia.org/wiki/%E0%B9%80%E0%B8%AD%E0%B8%9A%E0%B8%B5%E0%B9%80%E0%B8%AD%E0%B8%AA-%E0%B8%8B%E0%B8%B5%E0%B8%9A%E0%B8%B5%E0%B9%80%E0%B8%AD%E0%B9%87%E0%B8%99 | Wikipedia | Open Web | CC-By-SA | 2,023 | เอบีเอส-ซีบีเอ็น | https://th.wikipedia.org/w/index.php?title=เอบีเอส-ซีบีเอ็น&action=history | Thai | Spoken | 204 | 2,680 | เอบีเอส-ซีบีเอ็น คอร์ปอเรชั่น () ชื่อทางการค้า เอบีเอส-ซีบีเอ็น () เป็นกลุ่มสื่อของฟิลิปปินส์ที่มีสำนักงานใหญ่อยู่ในเกซอนซิตี้ บริษัทก่อตั้งขึ้นเมื่อวันที่ 13 มิถุนายน พ.ศ. 2489 ในชื่อบอลิโนว์อีเลคทริคคอร์ปอเรชั่น () ก่อตั้งขึ้นจากการควบรวมกิจการของ อัลโตบรอคคาสติงซิสเทม () และคโรนิเคิลบรอคคาสติงเน็ตเวิร์ค ()
ช่องหลักของบริษัทพร้อมกับสถานีโทรทัศน์และวิทยุอื่นๆในฟิลิปปินส์ถูกปิดในวันที่ 5 พฤษภาคม พ.ศ. 2563 เมื่อใบอนุญาตหมดอายุ
ช่องโทรทัศน์
ทั่วประเทศฟิลิปปินส์
ปัจจุบัน
เอทูซี (เป็นเจ้าของร่วมกับโซอี้บรอคคาสติงเน็ตเวิร์ค)
เอบีเอส-ซีบีเอ็น นิวส์ แชนแนล
ซีเนโม!
ซีนีม่าวัน
จี๊ปนีย์ทีวี
คาปามีลยาแชนแนล
โนเลดจ์แชนแนล
เมโทรแชนแนล
มิกซ์
พาย (เจ้าของร่วมกับบีมทีวี)
เทเลราดโย เซอร์บิสโย (เป็นเจ้าของร่วมกับไพรม์มีเดียโฮลดิงส์)
อดีต
เอบีเอส-ซีบีเอ็น
เอบีเอส-ซีบีเอ็น รีจิโอแนล แชนแนล
เอบีเอส-ซีบีเอ็น สปอตส์ แอนด์ แอ็กชัน
เอเชียโนเวล่า แชนแนล
บอลส์
ซิเกทีวี
ดีซีเอ็ม เทเลราดโย / เทเลราดโย
ฮีโร่
ไลฟ์สไตล์เน็ตเวิร์ค
ลีกา
แม็กซ์
มูฟวี่เซ็นทรัล
โอช้อปปิ้ง
สตูดิโอ ทเวนตี้ทรี
แท็ก
เวลเวต
เย้!
นอกประเทศฟิลิปปินส์
ปัจจุบัน
เอเอ็นซี โกลบอล
ซีเนโม! โกลบอล
ซีนีม่าวัน โกลบอล
มิกซ์ โกลบอล
เดอะ ฟิลิปิโน แชนแนล
อดีต
เอบีเอส-ซีบีเอ็น สปอตส์ แอนด์ แอ็กชัน อินเตอร์เนชั่นแนล
โบร
คาปามีลยาแชนแนล (อินเตอร์เนชั่นแนล)
ไลฟ์สไตล์เน็ตเวิร์ค (สหรัฐอเมริกา)
ปินอยเซ็นทรัลทีวี
สถานีวิทยุ
ดีดับเบิลยูพีเอ็ม (เป็นเจ้าของร่วมกับไพรม์มีเดียโฮลดิงส์)
เอมโออาร์ เอ็นเตอร์เทนเม้นท์
มิกซ์วิทยุ
อินเทอร์เน็ต
เอบีเอส-ซีบีเอ็น.คอม
เอบีเอส-ซีบีเอ็นนิวส์.คอม
ฟิลิปิโนออนดีมานด์
ไอวอนท์ทีเอฟซี
คาปามีลยาออนไลน์ไลฟ์
เอมโออาร์ทีวี
บริษัทย่อย
เอบีเอส-ซีบีเอ็น คอนเวอร์เจนซ์
เอบีเอส-ซีบีเอ็น ทีวี พลัส
เอบีเอส-ซีบีเอ็น ทีวี พลัส โก (ยกเลิก)
เอบีเอส-ซีบีเอ็นโมบาย (ปิด)
เอบีเอส-ซีบีเอ็น ดิจิทัล มีเดีย
เอบีเอส-ซีบีเอ็น ฟาวน์เดชัน
เอบีเอส-ซีบีเอ็น โกลเบิล
เอบีเอส-ซีบีเอ็น อินเตอร์เนชั่นแนล
เอบีเอส-ซีบีเอ็น พับบลิชชิง
เอบีเอส-ซีบีเอ็น ธีมพาร์กแอนด์รีสอร์ต
เอบีเอส-ซีบีเอ็น สตูดิโอ เอกซ์พีเรียนซ์ (ปิด)
คิดส์ซาเนีย มะนิลา (ปิด)
เอซีเจ โอ ช้อปปิ้ง คอร์ปอเรชั่น (ปิด)
ครีเอทีฟโปรแกรมส
ดรีมสเคป เอ็นเตอร์เทนเม้นท์
มีเดียเซอร์บิสโย คอร์ปอเรชั่น (ร่วมทุนกับไพรม์มีเดียโฮลดิงส์)
เพลย์อินโนเวชั่นส
โร้ดรันเนอร์เน็ตเวิร์ค
สาริมานกนิวส์เน็ตเวิร์ค
สกายเคเบิล
เดสตินี่เคเบิล (ปิด)
สกายไดเรค (ปิด)
สตาร์ครีเอทีฟส
สตาร์ซีเนม่า
แบล็คชีพ
สตาร์โฮมวิดีโอ
สตาร์เมจิก
สตาร์มิวสิค
หน่วยงาน
เอบีเอส-ซีบีเอ็น เอ็นเตอร์เทนเมนท์
เอบีเอส-ซีบีเอ็น ฟิล์ม อาร์ชิฟส
เอบีเอส-ซีบีเอ็น ไลเซนซิ่ง
เอบีเอส-ซีบีเอ็น นิวส์ แอนด์ เคอร์เรนท์ แอฟแฟร์ส
เอบีเอส-ซีบีเอ็น รีจิโอแนล
เอบีเอส-ซีบีเอ็น สปอตส์
กลุ่มช่องเคเบิลและสื่อสิ่งพิมพ์
กลุ่มบริหารงานสื่อสารสร้างสรรค์
มะนิลา วิทยุ ดิวิชั่น
สตาร์ เอ็นเตอร์เทนเม้นท์ กรุ๊ป
อ้างอิง
แหล่งข้อมูลอื่น
สถานีโทรทัศน์ในประเทศฟิลิปปินส์
กลุ่มบริษัท
บริษัทการบันเทิง
บริษัทด้านสื่อ
บริษัทของฟิลิปปินส์
บริษัทที่ก่อตั้งในปี พ.ศ. 2489 | 45,513 |
https://cy.wikipedia.org/wiki/Conroe%2C%20Texas | Wikipedia | Open Web | CC-By-SA | 2,023 | Conroe, Texas | https://cy.wikipedia.org/w/index.php?title=Conroe, Texas&action=history | Welsh | Spoken | 29 | 75 | Dinas yn , yn nhalaith Texas, yw .
Poblogaeth ac arwynebedd
Pobl nodedig
Ceir nifer o bobl nodedig a anwyd yn Conroe, gan gynnwys:
Cyfeiriadau
Dinasoedd Montgomery County, Texas | 44,413 |
https://askubuntu.com/questions/1309700 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | BingoDingo, Levente, https://askubuntu.com/users/1157519, https://askubuntu.com/users/1171788 | English | Spoken | 315 | 423 | Is this normal? When booting from live usb install, initram error and stdin invalid argument
Im really struggling to install a system that boots properly once installed.
During live usb booting i get this:
Errors on bootup
My live usb booting starts with initramfs failure error then stdin invalid argument just before checking system integrity, it shows up twice. See picture for detail. Help is much appreciated.
I read somewhere that very fast hardware can cause issues. Is this the case here? I have new generation ryzen 64gb 3600mhz ram and using an ssd
Once i install from this live usb, i have graphics corruption upon loading of fresh install, i have to boot in recovery mode and then install nvidia drivers which seems to fix the problem of corrupt graphics. However after a while the booting doesnt happen successfully and i get an error to do with "you must load kernel first".and hd2 gpt not found.
Is my SSD dead perhaps?
Im thinking my fresh system install doesn't work due to the earlier mentioned errors with live usb...
More details to follow...
Cannot upload second picture due to not having 10 reputation!
I also had the "initramfs unpacking failed" thing both on the 20.04.1 USB live image and afterwards on the installed OS too. (On the installed OS it's an easy fix). I also had to do like at least four attempts on a complete formatting + install until it finally booted. (At the time I thought that I made complications for myself with legacy boot vs the EFI partition, and even ended up reinstalling grub.) I'm on this forum a bit longer than 1 month, and have seen a few threads since with "fresh install does not boot".
"Is my SSD dead perhaps?" You can use the live USB to run fsck on the unmounted / partition of the SSD, to find out.
| 19,022 |
https://ne.wikipedia.org/wiki/%E0%A4%A6%20%E0%A4%85%E0%A4%A8%E0%A5%8D%E0%A4%A1%E0%A4%B0%E0%A4%97%E0%A5%8D%E0%A4%B0%E0%A4%BE%E0%A4%89%E0%A4%A8%E0%A5%8D%E0%A4%A1%20%28%E0%A4%8F%E0%A4%A8%E0%A4%BF%E0%A4%AE%E0%A4%B0%E0%A5%8D%E0%A4%AB%E0%A5%8D%E0%A4%B8%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | द अन्डरग्राउन्ड (एनिमर्फ्स) | https://ne.wikipedia.org/w/index.php?title=द अन्डरग्राउन्ड (एनिमर्फ्स)&action=history | Nepali | Spoken | 18 | 118 | द अन्डरग्राउन्ड अमेरिकन लेखिका क्याथरिन एन एप्पलगेटद्वारा लिखित किताब हो ।
सन्दर्भ सूची
पुस्तकहरू
क्याथरिन एन एप्पलगेटका कृतिहरू | 18,468 |
https://fr.wikipedia.org/wiki/Pauline%20Heinz | Wikipedia | Open Web | CC-By-SA | 2,023 | Pauline Heinz | https://fr.wikipedia.org/w/index.php?title=Pauline Heinz&action=history | French | Spoken | 70 | 128 | Pauline Heinz née le mai 2001 en Allemagne, est une joueuse de hockey sur gazon allemande. Elle évolue au poste de défenseure au Rüsselsheimer RK et avec l'équipe nationale allemande.
Elle a participé aux Jeux olympiques d'été de 2020.
Carrière
Jeux olympiques
Top 8 : 2020
Références
Liens externes
Joueuse allemande de hockey sur gazon
Naissance en mai 2001
Joueuse de hockey sur gazon aux Jeux olympiques d'été de 2020 | 36,062 |
https://stackoverflow.com/questions/45774185 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | AndyG, Jesper Juhl, SSM, https://stackoverflow.com/users/27678, https://stackoverflow.com/users/5910058, https://stackoverflow.com/users/775806, https://stackoverflow.com/users/7767735, https://stackoverflow.com/users/8488493, learner, n. m. could be an AI | English | Spoken | 483 | 771 | Unable to write integer to a string
Below is the code for converting integer to string,I am trying to not use C++ inbuilt functions for that but my code is not producing any output.
int main(){
int a;
string b;
cin>>a;
while(a){
b+=(a%10);
a/=10;
}
cout<<b;
return 0;
}
Input-
789
Expected Output-
987
but I am not getting any answer.
P.S- I have used all the required header-files in the code.
I have used all the required header-files in the code. Then quite why the did you feel compelled to cut them off before posting your code and to type a notice to this effect? Just show it whole with the headers.
you need to convert a%10 to string as well in order to concatenate it with string b. Since a%10 would be a single digit, so converting it to a char and then adding it to string b would also work. For doing this, you could simply add character '0' on the rhs of b+=(a%10).
See http://en.cppreference.com/w/cpp/string/basic_string/to_string
@n.m. I have not included header files because somewhere in stack overflow documentation ,it is written that only the minimal code is required to get the work done.And I included the P.S because to refrain some some users to add that I forgot to add header files,I know ,this is stupid but I tried to cover all the corner cases
"Minimal" doesn't mean "you should remove the headers", it means you should you should come up with minimal code that still exhibits the problem. Removing headers prevents code from doing anything, so please don't do that. Read about [mcve] for more info.
You cannot add an int to a string (or rather, you shouldn't in this case). You need to_string to convert the int to a string so that the += operator acts as concatenation:
#include <iostream>
#include <string>
using namespace std;
int main(){
int a;
string b;
cin>>a;
while(a){
b+=std::to_string(a%10);
a/=10;
}
cout<<b;
return 0;
}
Demo
What was happening?
std::string has a operator+= that can allow for quick concatenation. You can concatenate another string or a character. Which version of concatenation is chosen via overload. When you tried string += int the char overload was selected (int converts to char) so random junk was appended to your string instead of what you intended.
@n.m. Upvoted. I will leave this answer as-is because it's overall safer for future visitors that may not understand the significance of a%10 in making that work.
does using '0' with it ,type cast the whole of the statement into a string
@learner: You're still using an integer, but adding '0' to the result will guarantee that you get a value that is equivalent to the ASCII value for a digit between 0 and 9 (inclusive). The result is again converted to a char as before, except this time it's not a "junk" value, but exactly what you need.
| 2,402 |
https://math.stackexchange.com/questions/4099275 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | English | Spoken | 279 | 1,015 | Finding Local Inverse of Transcendental Function
Disclaimer: This is a homework problem for my graduate Applied Complex Variables course. The book being used is "Applied and Computational Complex Analysis: Volume 1" by Peter Henrici.
Problem:
Let $a,b,c$ be complex numbers, $a\neq b,c\neq 0$, and let
\begin{align*}
w=f(z):=\frac{1}{c}(e^{az}-e^{bz}).
\end{align*}
Show that the inverse function near $w=0$ is represented by
\begin{align*}
z=f^{[-1]}(w)=\frac{1}{d}\sum_{n=1}^\infty \frac{(-1)^{n-1}c^n}{n!}\left(\frac{nb}{d}+1\right)_{n-1}w^n,
\end{align*}
where $d:=a-b$. Derive as special cases the representations for the inverses of the functions
\begin{align*}
w=\sin z,\quad w=e^z-1,\quad w=e^{\alpha z}\sin \beta z,
\end{align*}
and, as the limiting case $a=b+c$, $c\to 0$, $w=ze^{bz}$. [To compute residues use formal integration by parts; see Problem $1.8.6$.]
Attempted Solution: Since $e^z$ is analytic at zero it follows that $\frac{1}{c}(e^{az}-e^{bz})$ is analytic and has a power series representation near $z=0$. Representing $f(z)$ by its power series it follows:
$$w=f(z)=\frac{1}{c}(e^{az}-e^{bz})=\frac{1}{c}\sum_{n=1}^\infty\frac{a^n-b^n}{n!}z^n=F.$$
Applying Lagrange Inversion to $H:=[F]_1^\frac{1}{n}Z(B_\frac{1}{n}\circ Q)$ where $$Q:=\sum_{n=1}^\infty\frac{a^{n+1}-b^{n+1}}{(n+1)!(a-b)}z^n$$ we have the following:
$$z=H^{[-1]}(w)=\sum_{m=1}^\infty\frac{C^m}{m(a-b)^m}\text{res}[Z^{-m}(B_{-m}\circ Q)]z^m.$$
The residue is then the $(m-1)$st coefficient of $B_{-m}\circ Q$ which can be calculated by J.C.P. Miller which gives
$$[B_{-m}\circ Q]_0=1, \quad [B_{-m}\circ Q]_{m-1}=\frac{1}{m-1}\sum_{n=1}^{m-1}[(-m+1)k-(m-1)]\frac{a^{k+1}-b^{k+1}}{(k+1)!(a-b)}[B_{-m}\circ Q]_{m-1-k}.$$
Some simplification can be done to the second expression to get
$$[B_{-m}\circ Q]_{m-1}=-\sum_{n=1}^{m-1}\frac{a^{k+1}-b^{k+1}}{k!(a-b)}[B_{-m}\circ Q]_{m-1-k}.$$
However, I am uncertain as to where to go from here. The question suggests using the identity $$\text{res}(M'N)=-\text{res}(N'M),$$ where $M$ and $N$ are formal Laurent series, and formal integration by parts to calculate the residue. It is possible to try and find $F^{[-1]}$ directly, though it would be a far more difficult calculation. Thank you in advance for any insight you may be willing to provide.
Update: I have reduced the problem to showing the following:
$$\text{res}[d^{-n}Z^{-n}(B_{-n}\circ Q)]=\binom{\frac{nb}{d}+1}{n-1}$$ This was done by analyzing the desired result and form of $z$.
| 49,157 | |
https://stackoverflow.com/questions/26943287 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | badjr, https://stackoverflow.com/users/1461484 | English | Spoken | 315 | 640 | Java, output continually being output on same line
The problem that I am having with this program is that when a user has entered in the camera brand name followed by the number of pixels, the program starts put putting both the brand name and pixel request on one line. I simply want the program to output and input the same throughout the program!
This is probably a simply problem; however, it is confusing me.
This is the class file:
public class DigitalCamera {
public String brand;
public int megaPixels;
public int price;
DigitalCamera( String receivedBrand, int pixelsReceived) {
brand = receivedBrand;
if (pixelsReceived >= 10)
megaPixels = 10;
if (megaPixels <= 6)
price = 99;
else
price = 129;
}
public void returnDigitalCameraDetails() {
System.out.println("You ordered a " + brand + " camera with " + megaPixels + " megapixels at a cost of $" + price);
}
}
This is the main file:
import java.util.*;
public class TestDigitalCamera {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String cameraName;
int pixelsForCamera;
int x = 1;
while (x <= 5) {
System.out.println("Enter in brand of the camera: ");
cameraName = scan.nextLine();
System.out.println("Enter in the number of pixels: ");
pixelsForCamera = scan.nextInt();
DigitalCamera camera(x) = new DigitalCamera(cameraName, pixelsForCamera);
camera(x).returnDigitalCameraDetails();
System.out.println();
x++;
}
What do you mean by you "want the program to output and input the same throughout the program"? What output are you getting and what is your desired output?
Change this:
cameraName = scan.nextLine();
by:
cameraName = scan.next();
Try this code for your main method:
public static void main(String[] args) {
String cameraName;
int pixelsForCamera;
int x = 1;
while (x <= 5) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter in brand of the camera: ");
cameraName = scan.nextLine();
System.out.println("Enter in the number of pixels: ");
pixelsForCamera = scan.nextInt();
DigitalCamera camera = new DigitalCamera(cameraName, pixelsForCamera);
camera.returnDigitalCameraDetails();
System.out.println();
x++;
}
}
| 12,868 |
https://ce.wikipedia.org/wiki/%D0%91%D0%B0%D1%85%D3%80%D1%87%D0%B5%D0%B4%D0%B6%D0%B8%D0%BA%20%28%D0%90%D1%80%D0%B0%D0%BA%D0%BB%D0%B8%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | БахӀчеджик (Аракли) | https://ce.wikipedia.org/w/index.php?title=БахӀчеджик (Аракли)&action=history | Chechen | Spoken | 40 | 172 | БахӀчеджик () — Туркойчоьнан Ӏаьржа хӀордан регионан Трабзон провинцин (ил) Араклинан кӀоштара эвла/микрокӀошт ().
Географи
Истори
Бахархой
Билгалдахарш
Хьажоргаш
Трабзон провинцин нах беха меттигаш
Трабзон провинцин микрокӀошташ
Араклинан микрокӀошташ
Араклинан кӀоштан нах беха меттигаш
Туркойчоьнан микрокӀошташ
Туркойчоьнан нах беха меттигаш | 11,573 |
https://dba.stackexchange.com/questions/146070 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | Brent Ozar, Gulrez Khan, Tom V, https://dba.stackexchange.com/users/39384, https://dba.stackexchange.com/users/426, https://dba.stackexchange.com/users/88788 | Alemannic | Spoken | 596 | 1,422 | Performance issue with composite primary key or not on Transactional Replication with AlwaysOn Subscribers?
I configure identity column with composite primary key on Transactional Replication scenario to maintain unique row value.
CREATE TABLE [dbo].[AD_CLIENT_DETAIL_MST](
[CLIENT_ID] [bigint] IDENTITY(1,1) NOT NULL,
[SERVER_ID] [char](1) NOT NULL CONSTRAINT [DF_AD_CLIENT_DETAIL_MST_SERVER_ID] DEFAULT ('A'),
[C_NAME] [varchar](300) NOT NULL,
[CLIENT_TITLE] [varchar](10) NULL,
[C_FIRST_NAME] [varchar](100) NOT NULL,
[C_MIDDLE_NAME] [varchar](100) NULL,
[C_LAST_NAME] [varchar](100) NULL,
[C_DOB] [date] NULL,
[RESELLER_ID] [bigint] NOT NULL,
[RESELLER_NAME] [varchar](300) NULL,
[CITY] [varchar](50) NULL,
[STATE] [varchar](50) NULL,
[COUNTRY] [varchar](50) NULL,
[COMPANY_NAME] [varchar](500) NULL,
[COMPANY_LOGO_PATH] [nvarchar](max) NULL,
[COM_ADD1] [varchar](300) NULL,
[COM_ADD2] [varchar](300) NULL,
[BANK_NAME] [varchar](50) NULL,
[BANK_ACCOUNT_NO] [varchar](50) NULL,
[PAN_NO] [varchar](20) NULL,
[TIN_NO] [varchar](20) NULL,
[BANNER] [varchar](50) NULL,
[YOCC_NO] [varchar](15) NOT NULL,
[PRIMARY_NO] [varchar](15) NOT NULL,
[SECONDARY_NO] [varchar](15) NULL,
[ALLOWED_CHANNEL] [int] NOT NULL,
[ACTIVE_OPERATOR] [int] NOT NULL,
[CALL_ROUTING_TYPE] [bigint] NOT NULL,
[CALL_ROUTING_PATTERN] [bigint] NOT NULL CONSTRAINT [DF_AD_CLIENT_DETAIL_MST_CALL_ROUTING_PATTERN] DEFAULT ((0)),
[LIST_STATUS] [bigint] NOT NULL,
[SMS_PROVIDER_ID] [bigint] NOT NULL,
[EMAIL_PROVIDER_ID] [bigint] NULL,
[IS_BLOCK] [bit] NOT NULL,
[REG_DATE] [datetime] NOT NULL,
[TOTAL_USER] [int] NULL,
[TOTAL_ADMIN] [int] NULL,
[EXP_DATE] [datetime] NULL,
[CHANNEL_COUNTER] [int] NULL,
CONSTRAINT [PK_AD_CLIENT_DETAIL_MST] PRIMARY KEY CLUSTERED
(
[CLIENT_ID] ASC,
[SERVER_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
So, when i define two primary key then i will give some slow query performance or not ?
What do you mean by "define two primary key" and which queries do you think would be slowed down?
I Define Composite Primary Key because of my scenario is Transactional Replication with AlwaysOn Subscriber and i have multiple Publisher which is synch data to AlwaysOn Subscribers.To avoid conflict issue of identity column at subscriber box ,i created composite primary key.
Performance not only depends on the query, but also the kind of data you store in the table.
Let's zoom out and talk about how you choose a clustering key for a table. Generally, you want the clustering keys to be:
Static - non-changing
Unique
Narrow - as few fields as possible, with as small datatypes as practical
Ever-increasing - which gives you a hotspot at the end of the table, which would sound bad but is usually good in small (sub-terabyte) database designs
Here, you've already got a single field that satisfies all of those requests: CLIENT_ID, which you defined as an identity field. You could just start by using that field alone - adding SERVER_ID doesn't really buy you anything.
However, I'm a little suspicious of the table design because SERVER_ID is only a CHAR(1). That gives you a limited number of servers to work with per CLIENT_ID. I don't know what you're trying to model, but generally an ID wouldn't be a single character.
I am configuring transactional Replication with AlwaysOn subscriber.currently we have only two publisher(in future max server is 8-9) this is the reason i am using server_id char(1).suggest me another option to maintain identity column.
Also my some of master table is read only mode at publisher side.and this table is write mode at AlwaysOn subscriber box.
Publisher box 1 and 2 is also subscribe master table from AlwaysOn primary box as publisher.
I Define Composite Primary Key because of my scenario is Transactional Replication with AlwaysOn Subscriber and i have multiple Publisher which is synch data to AlwaysOn Subscribers.To avoid conflict issue of identity column at subscriber box ,i created composite primary key.
You'll want to pick up a book on replication. There's lots of techniques using identity seeds - for example, start one server at positive 1, and the other server at negative one.
| 42,319 |
https://stackoverflow.com/questions/22672675 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Shayan Pourvatan, https://stackoverflow.com/users/2580975 | English | Spoken | 142 | 330 | How to change color of text in ExpandableListView when is only pressed?
In ExpandableListView I have custom parent row (LinearLayout) which contains row data (in TextView with id=data) andwhen is pressed (state before expanded) I change color of row.
How to change color of text when is pressed ?
I can in adapter set when is expanded and when is not pressed, but I cannot fetch when is only pressed.
create one selector for color and set to text of TextView
if you don't get my meant you can see http://stackoverflow.com/questions/1219312/android-selector-text-color
You can set a selector as background of your LinearLayout :
Save this in /drawable/list_selector.xml :
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/holo_blue_bright" android:state_pressed="true"/>
<item android:drawable="@android:color/holo_blue_light" android:state_selected="true"/>
<item android:drawable="@android:color/holo_blue_dark" android:state_activated="true"/>
</selector>
And set it as background. Note that you can of course change the color as much as you want ;)
| 1,219 |
https://stackoverflow.com/questions/11055075 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | gcochard, https://stackoverflow.com/users/1355166 | English | Spoken | 214 | 391 | Partial Match not working
I have three Strings a,b,c below and I am trying to get String exp to have a partial match with String b, but every time I run the code I get no match.
String a = "ID = '5' && name='abc' || level='5'";
String b = "ID = '6' && name='def' || level='6' && year='2012'";
String exp = "ID = '6' && name='def' || level='6'";
My Code:
Pattern p = Pattern.compile(b);
Matcher m = p.matcher(exp);
if(m.matches()){
System.out.println("Perfect Match");
}
else if(m.hitEnd()){
System.out.println("Partial Match");
}
else{
System.out.println("No Match");
}
Even when I remove && year='2012', it gives me no match.
Are you sure you know what a regular expression is?
@TimCooper To be fair, Pattern and Matcher make no mention of regular expressions. He would have to read the documentation to find that out.
You shouldn't be compiling b into a Pattern, you should be compiling exp. This will allow you to search through b for exp.
The way you have it now searches for b within exp, which will never find a match since exp is a subset of b.
If you just want a partial match then you don't need Regular Expressions.
Use this:
if (b.contains(exp))
And to check if two strings are equal you can use:
if (b.contentEquals(exp))
| 4,509 |
https://hyw.wikipedia.org/wiki/%D5%88%D6%82%D5%AD%D5%BF%D5%A1%D5%A3%D5%B6%D5%A1%D6%81%D5%B8%D6%82%D5%A9%D5%A5%D5%A1%D5%B6%20%D4%B5%D6%80%D5%A3%D5%A5%D6%80 | Wikipedia | Open Web | CC-By-SA | 2,023 | Ուխտագնացութեան Երգեր | https://hyw.wikipedia.org/w/index.php?title=Ուխտագնացութեան Երգեր&action=history | Western Armenian | Spoken | 207 | 1,219 | Ուխտագնացութեան երգեր, հայկական Ժողովրդական երաժշտութեան մեջ ընդհանուր առումով՝ ժողովրդական նոյնանուն ծեսի տարբեր պահերը արծարծող քնարական երգերու ամբողջութիւնը, որ կը կազմէ ծիսական ժանրի մէկ բաժինը։ Կ'երգէն սովորական քնարական բնոյթի եղանակներով։
Մասնաւոր առումով՝ զանազան ուխտատեղերու նկարագրութեան եւ գովքի երգերու ամբողջութիւնը, կը կազմէ վիպական ժանրի մէկ բաժինը։ Այդ բաժինին մէջ գլխաւոր տեղը կը գրաւեն «մուրազատու» «Մշո սուլթան» Սուրբ Կարապետ վանքին նուիրուած երգերը (կը կոչուին նաեւ «Սուրբ Կարապետի երգեր»), որոնցմով կարտացոլուի ազատ եւ բարեկեցիկ կեանքի համար աշխատաւոր ժողովուրդի դարաւոր երազանքը։ Սրանց մեղեդիական մարմնաւորումը երկտեսակ է․ հանդարտ-պատմողական բնոյթի կարճաշունչ եղանակով, որուն տարբերակուելով շարունակ կը կրկնուի (պարզ մեղեդիացուած արտասանութիւն), կամ տուն-տուն կառուցուած, վիպական բնոյթի անհատականացուած եղանակով, սկզբի պատմողական-նկարագրական մասին մէջ՝ ասերգային ոճի գերակշռութեամբ, կրկնակային մասին մէջ՝ լայնաշունչ երգային։
Առաջին տեսակը կը շարունակուի հայկական հնագոյն փոքրածաւալ վիպերգերի (օրինակ, «Կարոս խաչ») մեղեդիական ոճը, երկրորդը կը ներկայացնէ «Սասնա ծռեր» վեպի եղանակաւոր երգատեսակներուն զարգացումը (նման յայտնի «Մոկաց Միրզա» երգ-բալլադին)։
Ուխտագնացութեան երգերուն, մասնաւորապէս Ս․ Կարապետի երգերուն, բանաստեղծական տեքստերը բազմիցս կը հրատարակուին (Ա.Սեդրակեանի «Քնար մշեցուոց եւ վանեցուոց», 1874, էջ 6 - 9)։ Եղանակները կը հայտնաբերուին Կոմիտասը։ Կան նաեւ հատուկ ուխտագնացութեան պարեր, ինչպես Կոմիտասի գրառած ու մշակած հանդիսաւոր «Մշո Շորորը»։
Ուխտագնացութեան ան երգերը հայ գեղջկական եւ հին-գուսանական երգաստեղծութեան լավագոյն կը նմուշներուին։ Անոնց լաւատեսական բովանդակութիւնը ոգեշնչող աղբիւր կը դարնայ Բարսեղ Կանաչեանի՝ ժողովրդական խոսքերով գրուած «Նանոր» խմբերգային երաժշտա-դրամատիկական ընդարձակ պատկերուն համար։
Երաժշտութիւն | 13,892 |
https://nn.wikipedia.org/wiki/Wisbech | Wikipedia | Open Web | CC-By-SA | 2,023 | Wisbech | https://nn.wikipedia.org/w/index.php?title=Wisbech&action=history | Norwegian Nynorsk | Spoken | 45 | 102 | Wisbech er ein marknadsby i grevskapet Cambridgeshire i England. Han har kring 20 000 innbyggjarar og ligg i Fenland-området ved elva Nene. Det går to bruer over elva i byen.
Kjelder
Denne artikkelen bygger på «Wisbech» frå , den 26. juli 2011.
Byar i Cambridgeshire | 40,290 |
https://vi.wikipedia.org/wiki/Cyrtopogon%20fumipennis | Wikipedia | Open Web | CC-By-SA | 2,023 | Cyrtopogon fumipennis | https://vi.wikipedia.org/w/index.php?title=Cyrtopogon fumipennis&action=history | Vietnamese | Spoken | 33 | 73 | Cyrtopogon fumipennis là một loài ruồi trong họ Asilidae. Cyrtopogon fumipennis được Wilcox & Martin miêu tả năm 1936. Loài này phân bố ở vùng Tân Bắc giới.
Chú thích
Tham khảo
Cyrtopogon | 7,909 |
https://de.wikipedia.org/wiki/Gutshof%20Friedrichsgrund | Wikipedia | Open Web | CC-By-SA | 2,023 | Gutshof Friedrichsgrund | https://de.wikipedia.org/w/index.php?title=Gutshof Friedrichsgrund&action=history | German | Spoken | 304 | 634 | Der Gutshof Friedrichsgrund, auch Schloss Friedrichsgrund genannt, ist ein Gutshof in der Ortschaft Friedrichsgrund, die zur Stadt Bad Wünnenberg im Kreis Paderborn gehört.
Geschichte
Schloss Friedrichsgrund ist das Herrenhaus eines der Vorwerke der Staatsdomäne Dalheim, die bis zur Säkularisation 1803 ein Klostergut des Klosters Dalheim war. Die Vorwerke wurden ab der zweiten Hälfte des 18. Jahrhunderts von den Grafen von Westphalen eingerichtet und dienten als Nebenhof der Dalheimer Gutsanlage. Verwaltungssitz war der nordöstlich gelegene Haupthof im ehemaligen Kloster Dalheim.
Zu der benachbarten Einrichtungen der Dalheimer Gutsanlage gehörten das ca. 1,1 Kilometer westlich gelegene, 1788 gegründete Vorwerk Kircheilern, dessen Wüstung heute als Kulturdenkmal unter Schutz gestellt ist. Etwa 750 Meter östlich wurde 1816 bis 1822 als weiterer Abspliss der Gutsanlage Dalheim das Vorwerk Ost-Eilern beim heutigen Elisenhof errichtet, das heute ebenfalls als Wüstung unter Kulturdenkmalschutz gestellt ist. Das 1820 gegründete Vorwerk Friedrichsgrund eines Dalheimer Domänen-Pächters ist im Gegensatz zu den benachbarten Vorwerken bis heute erhalten.
Friedrichsgrund wurde zusammen mit dem benachbarten Gut Eilern 1950 von Graf Friedrich Carl von Westphalen im Rahmen der Bodenreform der Siedlungsgesellschaft Deutsche Bauernsiedlung gegen eine Entschädigung von 357.000 DM überlassen. Es erfolgte eine Neuansiedlung mit Landwirten, die in den 1930er Jahren nach Schlesien gezogen waren und infolge der Kriegsauswirkungen 1945 nach Westdeutschland flohen. Im Jahr 2002 feierte die Neusiedlung Eilern-Friedrichsgrund ihr 50-jähriges Jubiläum mit der Aufstellung eines Gedenksteines.
In dem Gutshaus Friedrichsgrund richtete der Kreis Büren eine neue ein- bis zweiklassige Schule ein, eine 0,54 Hektar großes Gelände nördlich des Gutshaus wurde für 10.000 DM zu einem Spiel- und Sportplatz umgestaltet. Diese Schule wurde zum Kinder- und Jugendhof Friedrichsgrund umgestaltet.
Literatur
Der Gutshof in Friedrichsgrund, Begleitbroschüre zum Sintfeld-Höhenweg, S. 20
Weblinks
Schloss Friedrichsgrund auf burgen-und-schloesser.net
Die Bodenreformsiedlungen Mitte des 20. Jahrhunderts u. a. anhand des Beispiels Friedrichgrunds (PDF-Datei; 2,74 MB)
OASE Friedrichsgrund
Bauwerk in Bad Wünnenberg
Friedrichsgrund
Friedrichsgrund
Westphalen (Adelsgeschlecht) | 40,122 |
https://stackoverflow.com/questions/48264880 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | D555, https://stackoverflow.com/users/1533709 | English | Spoken | 146 | 375 | Angular - Unexpected value MatDialog imported by the module AppModule
I am trying to integrate Angular Material in Angular but getting following error. The program is compiled successfully but getting this issue in browser.
Uncaught Error: Unexpected value 'MatDialog' imported by the module 'AppModule'. Please add a @NgModule annotation.
at syntaxError (compiler.js:485)
at eval (compiler.js:15226)
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata (compiler.js:15201)
at JitCompiler._loadModules (compiler.js:34385)
at JitCompiler._compileModuleAndComponents (compiler.js:34346)
at JitCompiler.compileModuleAsync (compiler.js:34240)
at CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:239)
at PlatformRef.bootstrapModule (core.js:5551)
at eval (main.ts:11)
@yurzui Tried, now it gives property open does not exists on type MatDialogModule
@yurzui Tried, now it gives new error: compiler.js:485 Uncaught Error: Template parse errors: 'md-dialog-content' is not a known element
@yurzui Thanks It worked
You should import MatDialogModule instead.
@NgModule({
imports: [
...,
MatDialogModule
]
...
})
export class AppModule {}
Also don't forget that angular material has moved from md to mat in selectors.
| 28,768 |
https://tr.wikipedia.org/wiki/Alan%20Burgess%20%28kriket%C3%A7i%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Alan Burgess (kriketçi) | https://tr.wikipedia.org/w/index.php?title=Alan Burgess (kriketçi)&action=history | Turkish | Spoken | 118 | 335 | Alan Thomas Burgess (1 Mayıs 1920, Christchurch - 5 Ocak 2021, Rangiora, Yeni Zelanda), Yeni Zelandalı profesyonel kriketçi.
Yaşamı
Burgess 1 Mayıs 1920'de Christchurch, Yeni Zelanda'da doğdu. II. Dünya Savaşı'na tankçı olarak katıldı. Aktif spor kariyerinde; Canterbury kriket takımında 1940'tan 1952 yılına kadar birinci sınıf kriket oyuncusu olarak yer aldı.
1945-46 ve 1951-52 yılları arasında Canterbury kriket takımı altında çıktığı dokuz maçta en yüksek skoru 1950-51'de Auckland kriket takımına karşı oynanan karşılaşmada 42 sayı ile elde etmiştir.
Son zamanları ve ölümü
Mayıs 2020'de 100. yaş gününü kutlayan.Yeni Zelandalı kriketçi Alan Burgess 5 Ocak 2021'de Rangiora, Yeni Zelanda'da 100 yaşında vefat etti.
Kaynakça
Dış bağlantılar
Alan Burgess at ESPNcricinfo
1920 doğumlular
2021 yılında ölenler
Yeni Zelandalı kriketçiler
Christchurch doğumlular | 30,590 |
https://vi.wikipedia.org/wiki/Asplenium%20bifrons | Wikipedia | Open Web | CC-By-SA | 2,023 | Asplenium bifrons | https://vi.wikipedia.org/w/index.php?title=Asplenium bifrons&action=history | Vietnamese | Spoken | 78 | 176 | Asplenium bifrons là một loài dương xỉ thuộc họ Aspleniaceae. Đây là loài đặc hữu của Ecuador. Môi trường sống tự nhiên của chúng là vùng núi ẩm nhiệt đới hoặc cận nhiệt đới. Chúng hiện đang bị đe dọa vì mất môi trường sống.
Nguồn
Navarrete, H. & Pitman, N. 2003. Asplenium bifrons. 2006 IUCN Red List of Threatened Species. Truy cập 20 tháng 8 năm 2007.
Chú thích
Tham khảo
bifrons
Thực vật đặc hữu Ecuador | 7,876 |
https://ru.wikipedia.org/wiki/%D0%92%D0%BE%D1%80%D0%BE%D1%88%D0%B8%D0%BB%D0%BE%D0%B2%D0%BE%20%28%D0%9C%D0%BE%D1%81%D0%BA%D0%BE%D0%B2%D1%81%D0%BA%D0%B0%D1%8F%20%D0%BE%D0%B1%D0%BB%D0%B0%D1%81%D1%82%D1%8C%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Ворошилово (Московская область) | https://ru.wikipedia.org/w/index.php?title=Ворошилово (Московская область)&action=history | Russian | Spoken | 88 | 246 | Ворошилово — посёлок сельского типа в Можайском районе Московской области, входит в состав сельского поселения Бородинское. Численность постоянного населения по Всероссийской переписи 2010 года — 8 человек. До 2006 года посёлок входил в состав Бородинского сельского округа.
Фактически, посёлок — территория Спасо-Бородинского монастыря, высота центра над уровнем моря 223 м. Посёлок появился после закрытия монастыря в 1929 году, в 1992 году монастырь возрождён, но, административно, посёлок продолжает существовать.
Примечания
Ссылки
Официальный сайт сельского поселения Бородинское
Карта Можайского района
Населённые пункты Можайского района
Объекты, названные в честь Климента Ворошилова | 18,427 |
https://stackoverflow.com/questions/11115897 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Dinesh, https://stackoverflow.com/users/1269086, https://stackoverflow.com/users/1389080, user1389080 | English | Spoken | 206 | 306 | How to record screens navigation in android?
I am developing an application which captures screenshots and records the screens as video, without rooting the device.
I tried the ASL Demo which is given in the following link
http://code.google.com/p/android-screenshot-library/
It's working only to take screenshots. How can I record the screens in android?
Thanks in advance.
Yes, If we do any work or perform any activity, the total activity need to be record and store it in sdcard.
Hi, Please help me. I am waiting for good result.
ok you are screen shot any screen like i.e, home,menu and other screens!
Yes. Is it possible to take screenshot without run native method?
it's not possible for non-rooted devices and you can screen shot in your application frame by frame after join the frames convert to video!
ok. But asl library is working in non-rooted device. Here need to run native "run.bat" file through command prompt. Thereafter possible to take screenshot of anyscreens and all the screens can be stored in sdcard. Now i need to record that screens while taking screenshot and play it as video.
video recording not possible non-rooted device. screen capture possible for you application like talking tom cat app to video screen recording!
| 6,602 |
https://fr.wikipedia.org/wiki/Le%20Mannequin%20d%27osier | Wikipedia | Open Web | CC-By-SA | 2,023 | Le Mannequin d'osier | https://fr.wikipedia.org/w/index.php?title=Le Mannequin d'osier&action=history | French | Spoken | 368 | 555 | Le mannequin d'osier est un roman de l'écrivain français Anatole France publié en 1897. Il constitue le deuxième volume de la tétralogie romanesque de l’Histoire contemporaine et fait suite à L’Orme du mail. L'action se déroule à l'époque contemporaine à la publication du roman.
Résumé
La vie privée de M. Bergeret connaît un grand bouleversement lorsqu'il découvre que sa femme l'a trompé avec son meilleur élève, M. Roux. En conformité avec son caractère, M. Bergeret décide alors de ne plus adresser la parole à sa femme. Il la soumet ainsi à une torture morale lente mais irrésistible qui porte ses fruits, car son épouse décide de quitter le domicile conjugal à la fin du roman. Cependant M. Bergeret souffre lui aussi, principalement dans son orgueil. Il cherche sa consolation dans les livres et les idées, ce qui a des conséquences dans ses pensées et sa conversation où il tient des propos amers sur la vie, qui n'est que souffrance, et sur ses contemporains qu'il compare à des chimpanzés.
Analyse
Parallèlement à ces deux sujets, le livre continue la peinture humoristique de la société bourgeoise de cette fin de , peinture que l'Orme du mail avait initiée. Pour ce faire Anatole France met en jeu des personnages secondaires auxquels il prête des propos reflétant les préoccupations de l'époque. Ces personnages sont présentés sous leurs aspects les plus ridicules.
Parmi les thèmes abordés, il y a d'abord le contexte historique de la guerre entre Turcs et Grecs, guerre qui fait rage et qui se soldera par des massacres du côté grec, à la suite de l'abandon des occidentaux. On discute également de l'armée et du pouvoir des tribunaux militaires, des efforts d'armement des nations, des conditions carcérales, de la peine de mort, de la physiognomonie (science en vogue au voulant mettre en rapport les traits du visage avec le comportement), de l'existence des écoles privées religieuses, du clergé et de son pouvoir, de l'anticléricalisme, de l'idée qu'on se fait de Dieu, de la corruption des dirigeants et des élites. Enfin, en toile de fond le souvenir de la défaite de 1870 est toujours présent.
Liens externes
Roman d'Anatole France
Roman français paru en 1897
Œuvre littéraire se déroulant en France | 4,099 |
GnToRGXR2Uo_1 | Youtube-Commons | Open Web | CC-By | null | Everyday Grammar: Talking about Art, Part 3 | None | English | Spoken | 62 | 77 | This is an excellent description of a piece of art. That said, we have a few suggestions to make it better. We suggest changing the introduction. Introductory phrases, especially that begin with I and G words, can be tricky. It is sometimes a good idea to avoid them. You could replace your introduction with something like, my favorite piece of art is....
| 6,225 |
https://stackoverflow.com/questions/71726629 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | English | Spoken | 534 | 1,466 | Close Dropdown Menu when clicking outside
The dropdown menu should open when the button is clicked.
And if you click outside the dropdown it should close again.
I tried this by adding an event listener to the body when the dropdown menu is active and then checking if the click happened outside the dropdown.
How can I write the following code without timeout function and make the dropdown close when clicked outside and not inside?
<div class="dropdown dropdown__open">
Open Dropdown
<div class="dropdown__window">
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
</div>
</div>
.dropdown {
position: relative;
cursor: pointer;
user-select: none;
&__window {
position: absolute;
background: $background-alt;
width: 100%;
max-width: 260px;
top: 45px;
z-index: 12;
overflow: hidden;
display: none;
visibility: hidden;
&--active {
display: block;
visibility: visible;
}
> * {
width: 100%;
display: block;
color: $white;
white-space: nowrap;
&:hover {
background: $background;
color: currentColor;
}
}
}
}
let dropdownBtn = document.querySelectorAll('.dropdown__open')
dropdownBtn.forEach((el) => {
let dropdownWindow = el.querySelector('.dropdown__window')
el.addEventListener('click', function () {
dropdownWindow.classList.toggle('dropdown__window--active')
window.setTimeout(function () {
if (dropdownWindow.classList.contains('dropdown__window--active')) {
let clickListener = document.body.addEventListener(
'click',
function (event) {
if (event.target.classList != 'dropdown__link') {
dropdownWindow.classList.remove('dropdown__window--active')
// Buggy clickListener.removeEventListener()
}
}
)
}
}, 1000)
})
})
OR
https://codepen.io/Salala2/pen/RwxjOzW
You can use onBlur(). But in order to do that you need to add tabindex="0" to the invoking element i.e the element which is invoking dropdown to display.
const dropdown = document.querySelector('.dropdown');
const dropdownWindow = document.querySelector('.dropdown__window')
dropdown.addEventListener('click', (event) => {
dropdownWindow.classList.toggle('dropdown__window--active');
});
dropdown.addEventListener('blur', (event) => {
dropdownWindow.classList.remove('dropdown__window--active');
});
.dropdown {
position: relative;
cursor: pointer;
user-select: none;
max-width: 260px;
}
.dropdown__window {
position: absolute;
background: #ccc;
box-shadow: 0 10px 40px #1d2021;
width: 100%;
max-width: 260px;
top: 45px;
z-index: 12;
overflow: hidden;
display: none;
visibility: hidden;
}
.dropdown__window--active {
display: block;
visibility: visible;
}
.dropdown__window>* {
font-size: 14px;
cursor: pointer;
display: block;
padding: 1rem 0 1rem 1rem;
font-weight: 400;
text-align: left;
line-height: 1.42857143;
color: #fff;
white-space: nowrap;
}
<div class="dropdown dropdown__open" tabindex="0">
Open Dropdown
<div class="dropdown__window">
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
<a class="dropdown__link">Link Text</a>
</div>
</div>
I was searching for a solution for this problem and got to this post.
I have found a solution that might be usefull for someone else as well.
In my case, i am using JSX where I only render the dropdown if a boolean is true, "opened" and my input field has a reference called inputRef.
The solution:
window.addEventListener("click", (evt)=>{
const eventPath = evt.composedPath();
this.opened = eventPath.includes(this.inputRef);
});
The event composed path will return the array list of elements that are targets of the click event, if my input field is part of that list, I keep the menu open, if not, it will not be rendered at all.
Keep in mind that if you are using vanilla JS you will need to query select your input element and create its instance like in the comments above.
More about event composed path at https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
You can use the window.onclick. And if you don't want your dropdown to close when each of the dropdown items is clicked, you can specify that as a condition too.
const dropDownButton = document.querySelector('.dropdown__open')
const dropDownWindow = document.querySelector('.dropdown__window')
dropDownButton.addEventListener('click',
()=> dropDownWindow.classList.toggle('dropdown__window--active'))
window.onclick = function(e){
if (!e.target.matches('.dropdown__open') &&
dropDownWindow.classList.contains('dropdown__window--active')){
dropDownWindow.classList.remove('dropdown__window--active')
}
}
| 33,547 | |
https://en.wikipedia.org/wiki/Ki%20Hyun-seo | Wikipedia | Open Web | CC-By-SA | 2,023 | Ki Hyun-seo | https://en.wikipedia.org/w/index.php?title=Ki Hyun-seo&action=history | English | Spoken | 52 | 97 | Ki Hyun-Seo (; born May 6, 1984) is a South Korean football player.
Ki previously played for Gyeongnam FC in the K-League.
References
1984 births
Living people
South Korean men's footballers
Ulsan Hyundai Mipo Dockyard FC players
K League 1 players
Korea National League players
Gyeongnam FC players
Men's association football midfielders | 12,157 |
https://sh.wikipedia.org/wiki/Santa%20Fe%20Libertadores%2C%20El%20Marqu%C3%A9s | Wikipedia | Open Web | CC-By-SA | 2,023 | Santa Fe Libertadores, El Marqués | https://sh.wikipedia.org/w/index.php?title=Santa Fe Libertadores, El Marqués&action=history | Serbo-Croatian | Spoken | 59 | 154 | Santa Fe Libertadores je naselje u Meksiku, u saveznoj državi Querétaro, u opštini El Marqués.
Prema proceni iz 2014. godine u naselju je živelo 603 stanovnika. Naselje se nalazi na nadmorskoj visini od 1904 m.
Vidite još
Meksiko
Administrativna podjela Meksika
Popis gradova u Meksiku
Reference
Literatura
Vanjske veze
Naselja u opštini El Marqués, Keretaro
Wikiprojekat geografija/Naselja u Meksiku | 5,473 |
https://stackoverflow.com/questions/6788953 | StackExchange | Open Web | CC-By-SA | 2,011 | Stack Exchange | Ashu Yadav, Jeff Axelrod, Kontraktor Renovasi Rumah, Rasheed Abid, Servicios Legales, https://stackoverflow.com/users/14848001, https://stackoverflow.com/users/14848002, https://stackoverflow.com/users/14848003, https://stackoverflow.com/users/14857010, https://stackoverflow.com/users/21089482, https://stackoverflow.com/users/403455, https://stackoverflow.com/users/515205, spaaarky21, قاسم العودات | English | Spoken | 381 | 652 | Android JUnit4 testing
I want to run some JUnit4 tests. The code relies on some Android libraries(Android XML parser), but does not create any activites and so on. When I try to run tests I got that an Android class that I need was not found. Is there any way to run JUnit4 tests with Android code, not to test activity but to test code with some libraries.
Possible duplicate: http://stackoverflow.com/questions/2172152/cant-run-junit-4-test-case-in-eclipse/
There is no way (that I'm aware of) to use JUnit4 on Android. It does support JUnit3 though, if that's an option for you?
Alternatively, you could use Robolectric and run your tests on your development machine (where you'll be able to use whichever unit test framework you like). Whether this will work for you depends on exactly what you're testing, but it might be worth a go?
I had the same problem and tried to adapt JUnit4 to Android's existing TestRunner - without success. Therefore I created a new project called JUnit4Android. It's a TestRunner application library for JUnit4 and JUnit3 tests and test suites. So you can run your existing JUnit4 tests with it. Please find more information on GitHub:
https://github.com/dthommes/JUnit4Android/wiki
For anyone reading this now, I would also recommend looking into AndroidJUnit4. It brings JUnit 4 and DBUnit, among others, to Android. https://github.com/esmasui/AndroidJUnit4
It might be little bit late, but there's finally an official update from Google about junit4:
based on Android-test-kit project and some other sources it's clear that:
The AndroidJUnitRunner is a new unbundled test runner for Android, which is part of the
Android Support Test Library and can be downloaded via the Android
Support Repository. The new runner contains all improvements of
GoogleInstrumentationTestRunner and adds more features:
- JUnit4 support
- Instrumentation Registry for accessing Instrumentation, Context and Bundle Arguments
- Test Filters @SdkSupress and @RequiresDevice
- Test timeouts
- Sharding of tests
- RunListener support to hook into the test run lifecycle
- Activity monitoring mechanism ActivityLifecycleMonitorRegistry
Actually, it's already presented in Support Repository. If You go to
%ANDROID_HOME%\extras\android\m2repository\com\android\support\test\testing-support-lib\
it's possible to find testing-support-lib in there (aar, jars etc.) which allows to use JUnit4. Even more, it contains espresso library same location which is handy for UI testing. Seems Android sites and support lib official references will be updated soon with that info.
| 23,243 |
https://sv.wikipedia.org/wiki/Poecilochroa%20taeguensis | Wikipedia | Open Web | CC-By-SA | 2,023 | Poecilochroa taeguensis | https://sv.wikipedia.org/w/index.php?title=Poecilochroa taeguensis&action=history | Swedish | Spoken | 32 | 82 | Poecilochroa taeguensis är en spindelart som beskrevs av Paik 1992. Poecilochroa taeguensis ingår i släktet Poecilochroa och familjen plattbuksspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Plattbuksspindlar
taeguensis | 3,799 |
https://stackoverflow.com/questions/65674582 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | Hedgy, https://stackoverflow.com/users/11780944 | English | Spoken | 165 | 395 | Calling python function without form tag
I would like to use logout list item in my navbar to use as action flask logout function. Didnt find a way either with < li> nor < a> in documentation, is it possible?
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="{{ url_for('home') }}">Home</a></li>
<li class="active"><a href="{{ url_for('food') }}">New Food Item</a></li>
<li class="active"><a href="{{ url_for('view') }}">Check date</a></li>
<li class="active"><a href="{{ url_for('set_up') }}">Calorie setup</a></li>
<li class="active"><a href="{{ url_for('index') }} action="/logout">Logout</a></li>
</ul>
</div>
@app.route("/logout", methods=["GET","POST"])
def logout():
logout_user()
return render_template("login.html")
couldn't you just set it as the url_for instead of the action?
An action attribute on an li element doesn't make sense. You can use a link as in this answer:
<li class="active"><a href="{{ url_for('logout') }}">Logout</a></li>
Your href was pointing to the index, your action is pointing to logout, and you're rendering the login template in your Flask route, so you'd need to decide which you want: render the login template or redirect to the index after hitting logout.
| 5,008 |
https://id.wikipedia.org/wiki/Matkot | Wikipedia | Open Web | CC-By-SA | 2,023 | Matkot | https://id.wikipedia.org/w/index.php?title=Matkot&action=history | Indonesian | Spoken | 109 | 247 | Matkot ( lit. "raket") adalah permainan bola Padel yang populer di Israel mirip dengan tenis pantai, sering disebut oleh orang Israel sebagai olahraga pantai nasional mereka.
Matkot telah dimainkan di pantai Mandatori Palestina sejak 1920-an. Dokumentasi awal dari permainan ini termasuk pemandangan pantai Tel Aviv tahun 1932 oleh seniman Israel, Nahum Gutman yang menunjukkan dua pemuda memegang dayung bulat dan memukul bola bolak-balik di pantai.
Tujuan dari permainan ini adalah untuk memukul bola karet kecil dengan raket kayu sebanyak mungkin tanpa menjatuhkannya. Dua atau lebih pemain memukul bola bolak-balik menggunakan dayung. Olahraga ini dinamai raket, matka; asal kata ini tidak jelas.
Referensi
Pranala luar
How To Play Matkot
Olahraga | 4,481 |
https://fr.wikipedia.org/wiki/Benjamin%20Schmideg | Wikipedia | Open Web | CC-By-SA | 2,023 | Benjamin Schmideg | https://fr.wikipedia.org/w/index.php?title=Benjamin Schmideg&action=history | French | Spoken | 35 | 69 | Benjamin Schmideg est un acteur australien, né le dans l'état de Victoria, en Australie.
Il a joué dans de nombreuses séries télévisées.
Liens externes
Acteur australien
Naissance en juin 1986
Naissance dans l'État de Victoria | 49,505 |
https://war.wikipedia.org/wiki/Odynerus%20wellmanoides | Wikipedia | Open Web | CC-By-SA | 2,023 | Odynerus wellmanoides | https://war.wikipedia.org/w/index.php?title=Odynerus wellmanoides&action=history | Waray | Spoken | 34 | 68 | An Odynerus wellmanoides in uska species han Hymenoptera nga ginhulagway ni Giordani Soika. An Odynerus wellmanoides in nahilalakip ha genus nga Odynerus, ngan familia nga Eumenidae. Waray hini subspecies nga nakalista.
Mga kasarigan
Odynerus | 39,001 |
https://ceb.wikipedia.org/wiki/Buttu%20Rea%20%28bukid%2C%20lat%20-3%2C03%2C%20long%20119%2C59%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Buttu Rea (bukid, lat -3,03, long 119,59) | https://ceb.wikipedia.org/w/index.php?title=Buttu Rea (bukid, lat -3,03, long 119,59)&action=history | Cebuano | Spoken | 210 | 338 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Buttu Rea.
Bukid ang Buttu Rea sa Indonesya. Nahimutang ni sa lalawigan sa Provinsi Sulawesi Selatan, sa sentro nga bahin sa nasod, km sa sidlakan sa Jakarta ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Buttu Rea, o ka metros sa ibabaw sa naglibot nga tereyn. Mga ka kilometro ang gilapdon sa tiilan niini.
Ang yuta palibot sa Buttu Rea kabukiran sa kasadpan, apan sa sidlakan nga kini mao ang kabungtoran. Kinahabogang dapit sa palibot ang Buttu Remborembo, ka metros ni kahaboga ibabaw sa dagat, km sa sidlakan sa Buttu Rea. Dunay mga ka tawo kada kilometro kwadrado sa palibot sa Buttu Rea medyo gamay nga populasyon.. Sa rehiyon palibot sa Buttu Rea, kabukiran talagsaon komon.
Hapit nalukop sa lasang ang palibot sa Buttu Rea. Ang klima tropikal nga kasalupan. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Oktubre, sa °C, ug ang kinabugnawan Mayo, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Abril, sa milimetro nga ulan, ug ang kinaugahan Septiyembre, sa milimetro.
Saysay
Ang mga gi basihan niini
Kabukiran sa Provinsi Sulawesi Selatan
Kabukiran sa Indonesya nga mas taas kay sa 500 metros ibabaw sa dagat nga lebel | 37,631 |
https://fr.wikipedia.org/wiki/Sher-Gil%20%28crat%C3%A8re%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Sher-Gil (cratère) | https://fr.wikipedia.org/w/index.php?title=Sher-Gil (cratère)&action=history | French | Spoken | 65 | 129 | Sher-Gil est un cratère d'impact présent sur la surface de Mercure.
Le cratère fut ainsi nommé par l'Union astronomique internationale en 2008 en hommage à la peintre indienne (née en Hongrie) Amrita Sher-Gil.
Son diamètre est de 76,56 km. Il se situe dans le quadrangle de Neruda (quadrangle H-13) de Mercure.
Notes et références
Article connexe
Liste des cratères de Mercure
Cratère d'impact sur Mercure | 5,621 |
https://ceb.wikipedia.org/wiki/W%C4%81d%C4%AB%20%E2%80%98Ar%C4%81r | Wikipedia | Open Web | CC-By-SA | 2,023 | Wādī ‘Arār | https://ceb.wikipedia.org/w/index.php?title=Wādī ‘Arār&action=history | Cebuano | Spoken | 99 | 176 | Wadi ang Wādī ‘Arār sa Yemen. Nahimutang ni sa distrito sa Rudum ug lalawigan sa Shabwah, sa sentro nga bahin sa nasod, km sa sidlakan sa Sanaa ang ulohan sa nasod. Wādī ‘Arār nidagayday paingon ngadto sa Gulf of Aden.
Ang klima uga. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Agosto, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Pebrero, sa milimetro nga ulan, ug ang kinaugahan Hunyo, sa milimetro.
Ang mga gi basihan niini
Mga suba nidagayday paingon ngadto sa Gulf of Aden
Mga suba sa Shabwah | 43,169 |
https://sv.wikipedia.org/wiki/Harpactea%20gennargentu | Wikipedia | Open Web | CC-By-SA | 2,023 | Harpactea gennargentu | https://sv.wikipedia.org/w/index.php?title=Harpactea gennargentu&action=history | Swedish | Spoken | 31 | 76 | Harpactea gennargentu är en spindelart som beskrevs av Jörg Wunderlich 1995. Harpactea gennargentu ingår i släktet Harpactea och familjen ringögonspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Ringögonspindlar
gennargentu | 3,394 |
https://stackoverflow.com/questions/2400424 | StackExchange | Open Web | CC-By-SA | 2,010 | Stack Exchange | Aaron Digulla, Aditya Mudigonda, Austin, Flops, chaozhan, dillysu, garedd, https://stackoverflow.com/users/14484323, https://stackoverflow.com/users/287108, https://stackoverflow.com/users/34088, https://stackoverflow.com/users/4883658, https://stackoverflow.com/users/4883659, https://stackoverflow.com/users/4883660, https://stackoverflow.com/users/4883748, https://stackoverflow.com/users/4884056, https://stackoverflow.com/users/4884064, https://stackoverflow.com/users/4885126, https://stackoverflow.com/users/4885154, quazxsw, user287108, user4883659, user4883660 | English | Spoken | 392 | 641 | Implementing traceback on i386
I am currently porting our code from an alpha (Tru64) to an i386 processor (Linux) in C.
Everything has gone pretty smoothly up until I looked into porting our
exception handling routine. Currently we have a parent process which
spawns lots of sub processes, and when one of these sub-processes
fatal's (unfielded) I have routines to catch the process.
I am currently struggling to find the best method of implementing a traceback routine which can list the function addresses in the error log, currently my routine just prints the the signal which caused the exception and the exception qualifier code.
Any help would be greatly received, ideally I would write error handling for all processors, however at this stage I only really care about i386, and x86_64.
Thanks
Mark
The glibc functions backtrace() and backtrace_symbols(), from execinfo.h, might be of use.
You might look at http://tlug.up.ac.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV. It covers the functionality you need. However you must link against libgdb and libdl, compile with -rdynamic (includes more symbols in the executable), and forgo the use of some optimizations.
There are two GNU (non-POSIX) functions that can help you - backtrace() and backtrace_symbols() - first returns array of function addresses and second resolves addresses to names. Unfortunately names of static functions cannot be resolved.
To get it working you need to compile your binary with -rdynamic flag.
Unfortunately, there isn't a "best" method since the layout of the stack can vary depending on the CPU, the OS and the compiler used to compile your code. But this article may help.
Note that you must implement this in the child process; the parent process just gets a signal that something is wrong; you don't get a copy of the child stack.
Sorry for the confusion but the error handling was misunderstood and it does indeed get caught in the child process.
Also please note I am using the GNU compiler (gcc).
In that case, the article should answer all your questions. Note that you must compile with -fno-omit-frame-pointer (otherwise %ESP won't contain valid data).
If a comment, you state you are using gcc. This http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Return-Address.html#Return-Address could be useful.
If you're fine with only getting proper backtraces when running through valgrind, then this might be an option for you:
VALGRIND_PRINTF_BACKTRACE(format, ...):
It will give you the backtrace for all functions, including static ones.
| 27,847 |
https://stackoverflow.com/questions/70846810 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | Moulitharan M, Nikhil S, https://stackoverflow.com/users/10843200, https://stackoverflow.com/users/6285600 | English | Spoken | 165 | 361 | ERROR: subquery must return only one column width many SELECT
Multi SELECT in PostgreSQL return this poroblem :(
SELECT date::date,
(
SELECT concat_ws(' ', user_cards.last_name, user_cards.first_name, user_cards.father_name),
(SELECT MIN(start_time) FROM calls_moizvonki WHERE user_account = user_cards.email AND answer_time::date=date AND answered=1) AS start_day,
(SELECT COUNT(*) FROM calls_moizvonki WHERE user_account = user_cards.email AND answer_time::date=date AND answered=1) AS calls,
(SELECT AVG(duration) FROM calls_moizvonki WHERE user_account = user_cards.email AND answer_time::date=date AND answered=1 AND duration>10) AS duration
FROM user_cards
)
FROM generate_series(
'2022-01-20%'::date,
'2022-01-24'::date,
'1 day'::interval
) date;
ERROR: subquery must return only one column width many
this is because, the subquery within the select statement is returning more than one column
Please [edit] your question (by clicking on the [edit] link below it) and add some sample data and the expected output based on that data as formatted text. See here for some tips on how to create nice looking text tables. ([edit] your question - do not put code or additional information in comments)
Hint: use a correlated query!!!
| 25,280 |
jaO5fqac7aA_1 | Youtube-Commons | Open Web | CC-By | null | Dr Puja | Chondromyxoid Fibroma- A Case Presentation #sonobuzz | None | English | Spoken | 771 | 1,015 | Good evening everyone. I am Dr. Pooja, JR2 from Naira Medical College and Hospital, Sassaram. Today I am going to present a case on chondromixoid fibromas. Introduction. Chondromixoid fibromas are extremely rare, benign, cartilaginous neoplasm that account for less than 1% of all bone tumors, most commonly diagnosed before 30 years of age, mostly during second and third decades. There is no sex predilection in case of CMF. Now coming to my case, an eight-year-old male came with the complaint of pain and swelling in later aspect of distal one-third of right leg which was present for five months and was progressive in nature. Exid was performed and these are the radiological findings, multi-loculated eucent lesion which was eccentrically located in the meta-diaphysis of distal left tibia having narrow zone of transition and thin slerotic rim was noted. This was the lesion having narrow zone of transition and thin slerotic rim was noted. Next CT was performed. Here we can see moderately sized lesion of size approximately 3 into 1.5 centimeter which is multi-loculated radiolucent lesion is eccentrically located in the meta-diaphysis of the distal left tibia having narrow zone of transition and thin slerotic rim likely benign neoplasm. Next MRI was performed and a cortical based lesion of size 3 into 1.5 into 4 centimeter was noted with erosion of lateral cortex involving the distal tibial metaphysis and diaphysis not involving the growth plate which appeared hypo intense on T1. The lesion appeared hyper intense on T2 with her hypo intense rim this was the hypo intense rim which correspond to slerotic border and this represent the benign nature of the lesion. There is no surrounding edema hemorrhage necrosis or fluid level noted within the lesion and no significant extra oscis soft tissue involvement was seen. Next the lesion appeared hyper intense on T2 and ster. Post-contrast study showed heterogeneous enhancement in the lesion. Now coming to differential diagnosis the diagnosis was made benign neoplastic lesion of the bone and most likely differential diagnosis diagnosis made was chondromixoid fibroma and non ossifying fibroma. Then USG guided FNAC was performed on the patient and the smear confirmed it as chondromixoid fibroma this is the FNAC report of the patient. Coming to discussion most chondromixoid fibromas are located in the metafysal region of the long bones approximately in 60% of cases and may extend to the epifysal line. The classical site is the upper one-third of the tibia which accounts for 25% of all cases with the small tubular bone of the foot the distal femur and the pelvis or sacrum being other relatively common locations. These are the typical sites and these are less typical sites. Radiological features of chondromixoid fibroma mostly tibia is involved in 50% of cases and the lesion is metafysal it is a geographical reason which is eccentric oval or rod it causes endosteal scalloping it is expensile have soap bubble appearance and rarely calcification can be seen in matrix in few cases. Now coming to MR findings on T1 weighted image it is iso intense to skeletal muscle and internal hyper intense pokai can be seen in 37% of cases on T2 weighted imaging two patterns can be seen first may have peripheral band of intermediate signal with central hyper intensity second diffusely and homogeneously hyper intense on T1 weighted contrast there is peripheral nodular enhancement which correspond to peripheral band of intermediate signal on T2 MR another contrast enhancement can be seen in the form of diffuse enhancement. Now coming to DD of chondromixoid fibroma it includes aneurysmal bone cyst giant cell tumor. Giant cell tumor is well defined and have non-cellerotic margin in most cases non ossifying fibroma and chondroblastoma which occurs in younger age group and metaphyseal fibrous defect. This is the case of aneurysmal bone cyst in a patient which is sharply defined leucine bone lesion with thin wall cavities and on MR we can see fluid fluid level which is characteristic of aneurysmal bone cyst. Next DD is giant cell tumor this is the APN lateral x-ray of the knee which demonstrate leucine lesion located eccentrically within the distal lateral femur abelting the articulate surface and later it was confirmed as giant cell tumor pathologically also on MR a well-defined lesion in the distal metaphysis and was seen which extent which was which extend to the epiphysis of the right femur and was hypo intense on T1 and hyper intense on T2 and ster and was and show enhancement on post-contrast study there was small cystic lesion small cystic lesion within the lesion which was also demonstrated on T2 weighted images. | 15,508 |
https://stackoverflow.com/questions/44959054 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Mirko , https://stackoverflow.com/users/4859704 | English | Spoken | 363 | 1,082 | How to do aggregate query with accumulators using mongodb driver in java
I'm quite new in MongoDB and its interaction with java.
I'm using this driver
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.4.2</version>
</dependency>
and I want to perform this aggregation query:
db.getCollection('COLLECTION').aggregate(
[
{"$match":{"val.elem.0001":{"$exists":true}}},
{"$project":{"FIELD_PATH":"$val.elem.0001"}},
{$group:{_id:{"FIELD":{"$literal":"0001"}},
"PATH":{"$addToSet":"$FIELD_PATH"}}}
]
);
The java code I've written is the following (however I'm not sure if I use correctly the addToSet method):
AggregateIterable<Document> output = collection.aggregate(Arrays.asList(
new Document("$match", new Document("val.elem.0001",new Document("$exists",true))),
new Document("$project", new Document("FIELD_PATH","$val.elem.0001")),
new Document("$group", new Document("_id",new Document("FIELD", new Document("$literal", "0001"))
.append("PATH", Accumulators.addToSet("$PATH", "$FIELD_PATH"))))));
It is correct? Because I can't print the result on screen if I add the "append" part. The error that returns is
Can't find a codec for class com.mongodb.client.model.BsonField
So, to resume and make more readable and comprehensive what I've asked:
Is the java representation of the query correct?
If so, why I'm not able to print or access the result of the query?
Thanks in advance, if you need more informations, I'm ready to provide them.
Yous usage of api is incorrect.
Change your aggregation to below ( stick with Document for expressions)
AggregateIterable<Document> output = collection.aggregate(Arrays.asList(
new Document("$match", new Document("val.elem.0001",new Document("$exists",true))),
new Document("$project", new Document("FIELD_PATH","$val.elem.0001")),
new Document("$group", new Document("_id",new Document("FIELD", new Document("$literal", "0001"))).append("PATH", new Document("$addToSet", "$FIELD_PATH")))));
BsonField is a helper class primarily built to provide data holder for Accumulators which return key and Bson value pair. So it is not meant to be used as value type. When use with helper methods, it is converted into Document and serialized using document codec.
You can rework your aggregation to use helper methods (Filters, Projections Accumulators & Aggregates)
AggregateIterable<Document> output = collection.aggregate(Arrays.asList(
Aggregates.match(Filters.exists("val.elem.0001")),
Aggregates.project(Projections.computed("FIELD_PATH","$val.elem.0001")),
Aggregates.group( new Document("FIELD", new Document("$literal", "0001")), Accumulators.addToSet("PATH", "$FIELD_PATH"))));
You can further reduce the aggregation by using static imports.
import static com.mongodb.client.model.Accumulators.addToSet;
import static com.mongodb.client.model.Aggregates.group;
import static com.mongodb.client.model.Aggregates.match;
import static com.mongodb.client.model.Aggregates.project;
import static com.mongodb.client.model.Projections.computed;
import static java.util.Arrays.*;
AggregateIterable<Document> output = collection.aggregate(asList(
match(Filters.exists("val.elem.0001")),
project(computed("FIELD_PATH","$val.elem.0001")),
group( new Document("FIELD", new Document("$literal", "0001")), addToSet("PATH", "$FIELD_PATH"))));
For more information
http://mongodb.github.io/mongo-java-driver/3.4/driver/tutorials/aggregation/
The first aggregation you've written does not work, beacause fails in the interpretation of $addToSet. However the others are perfect, so thanks a lot for helping me! I will use this approach when using aggregators.
| 49,310 |
https://stackoverflow.com/questions/64799452 | StackExchange | Open Web | CC-By-SA | 2,020 | Stack Exchange | Cole Kaplan, Dean, https://stackoverflow.com/users/14623961, https://stackoverflow.com/users/9870211 | English | Spoken | 551 | 1,052 | Is there a way to reference another cell in a range while iterating through a FOR EACH loop in VBA?
I'm trying to construct a program that takes a spreadsheet with many different structured blocks of cells, searches for an empty one of these blocks and shifts all the following blocks down to fill the empty space without disturbing the order. I created a range of non-contiguous cells that each represent one of these blocks, I'm attempting to iterate through the cells of this range with a For Each loop while also referencing and checking the next cell in the range to ensure that the empty block is not at the end of the values within the range. To call this 'nextCell' in the range, I used an index variable that increments at the end of each For loop. The issue that I'm running into is that in the non-contiguous range, calling ran.Cells(i) is indexing out of the range moving to the cells directly below the current cell rather than moving to the next cell in the range. Is there any better way to do this effectively? Also I'm fairly new to VBA so I apologize for any messy code. Thanks in advance.
Public Sub ShiftCells()
Dim ran As Range, cell As Range, nextCell As Range
Dim sht1 As Worksheet
Dim i As Long
Set sht1 = Worksheets("Flight Board - Page 1")
Set ran = sht1.Range("C3,G3,K3,O3,S3,W3,AA3,AE3,C13,G13,K13,O13,S13,W13,AA13,AE13,C23,G23,K23,O23,S23,W23,AA23,AE23,C33,G33,K33,O33,S33,W33,AA33,AE33")
i = 2
For Each cell In ran
Set nextCell = ran.Cells(i)
'if cell is empty while next cell is not empty select and copy current cell
If cell.Value = Empty And nextCell.Value <> Empty Then
Range(nextCell, nextCell.Offset(7, 0)).Copy
cell.PasteSpecial
Range(cell, cell.Offset(7, 0)).ClearContents
Else
End If
'increment index
i = i + 1
Next cell
End Sub
Why do you need to do this with For Each? You can use a mix of For Next loops and it will be easier to reference 'out-of-range'..
As Dean mentioned, it would be easier to use nested For Next loops.
Judging from the Results, I don't think your code is doing what you want it to do.
Markers
Results
Test
Public Function wsFlightBoardPage1() As Worksheet
Set wsFlightBoardPage1 = ThisWorkbook.Worksheets("Flight Board - Page 1")
End Function
Public Sub ShiftCells()
Dim c As Long
Dim r As Long
Dim Count As Long
Dim Target As Range, Source As Range
With wsFlightBoardPage1
For r = 3 To 33 Step 10
For c = 3 To 31 Step 4
Set Target = .Cells(r, c)
Set Source = Target.Offset(1).Resize(7)
If Len(Target.Value) = 0 And Len(Source.Cells(1, 1).Value) > 0 Then
Source.Copy Destination:=Target
Target.Resize(7).ClearContents
End If
Next
Next
End With
End Sub
Public Sub AddMarkers()
Dim c As Long
Dim r As Long
Dim Count As Long
Dim Target As Range, Source As Range
With wsFlightBoardPage1
For r = 3 To 33 Step 10
For c = 3 To 31 Step 4
Set Target = .Cells(r, c)
Set Source = Target.Offset(1).Resize(7)
Target.Interior.Color = vbGreen
Source.Interior.Color = vbYellow
Source.Value = 1
Next
Next
End With
End Sub
For the low low price of $0, you can download RubberDuck and take advantage of it's many great features such as code formatting. After you get the Duck, you should watch this series: WiseOwlTutorials VBA.
This is definitely much closer to the implementation I was going for. Thank you
| 37,453 |
https://en.wikipedia.org/wiki/Metro%20Women%27s%20Athletics%20Association | Wikipedia | Open Web | CC-By-SA | 2,023 | Metro Women's Athletics Association | https://en.wikipedia.org/w/index.php?title=Metro Women's Athletics Association&action=history | English | Spoken | 65 | 94 | The Metro Women's Athletics Association (MWAA) is a high school athletic conference comprising private all-female Catholic high schools located in the St. Louis, Missouri metro area.
Members
Barat Academy and Whitfield School participate in sports as independent schools, but compete against the schools of the MWAA in some sports.
References
Missouri high school athletic conferences
High school sports conferences and leagues in the United States | 25,854 |
https://id.wikipedia.org/wiki/Sejahtera%2C%20Sukadana%2C%20Kayong%20Utara | Wikipedia | Open Web | CC-By-SA | 2,023 | Sejahtera, Sukadana, Kayong Utara | https://id.wikipedia.org/w/index.php?title=Sejahtera, Sukadana, Kayong Utara&action=history | Indonesian | Spoken | 11 | 32 | Sejahtera adalah desa di kecamatan Sukadana, Kayong Utara, Kalimantan Barat, Indonesia. | 23,214 |
https://be-x-old.wikipedia.org/wiki/%D0%9F%D0%BE%D0%BF%D1%96%D1%88%D0%BA%D1%96%20%28%D0%93%D0%B5%D1%80%D0%B2%D1%8F%D1%86%D0%BA%D1%96%20%D1%81%D0%B5%D0%BB%D1%8C%D1%81%D0%B0%D0%B2%D0%B5%D1%82%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Попішкі (Гервяцкі сельсавет) | https://be-x-old.wikipedia.org/w/index.php?title=Попішкі (Гервяцкі сельсавет)&action=history | Belarusian (Taraškievica) | Spoken | 28 | 115 | По́пішкі — вёска ў Гервяцкім сельсавеце Астравецкага раёну Гарадзенскай вобласьці.
Насельніцтва
1999 год — 22 чалавекі
2010 год — 10 чалавек
Крыніцы
Катэгорыя:Гервяцкі сельсавет
Катэгорыя:Населеныя пункты Астравецкага раёну | 45,032 |
https://stackoverflow.com/questions/76095916 | StackExchange | Open Web | CC-By-SA | 2,023 | Stack Exchange | R.Ramirez, https://stackoverflow.com/users/6689495 | English | Spoken | 324 | 800 | How to call function in a widget from a Floating Action Button Flutter?
is quite simple
The background of the managed by a widget called HomeBackground. So there I just want to some properties from the Floating action Button.
Here is de Background:
class _IconsBackground extends StatefulWidget {
final bool isLoading;
final IconData firstIcon;
const _IconsBackground({required this.firstIcon, required this.isLoading});
@override
State<_IconsBackground> createState() => _IconsBackgroundState();
}
class _IconsBackgroundState extends State<_IconsBackground> {
bool isDarkMode = false;
Color iconsColor = AppTheme.primary;
List<Color> background = [
const Color.fromARGB(255, 234, 231, 231),
Colors.grey
];
swtichTheme() {
isDarkMode = !isDarkMode;
if (isDarkMode) {
iconsColor = Colors.white;
background = const [
Color.fromARGB(255, 64, 64, 64),
Color.fromARGB(255, 0, 0, 0)
];
} else {
iconsColor = AppTheme.primary;
background = [const Color.fromARGB(255, 234, 231, 231), Colors.grey];
}
setState(() {});
}
@override
Widget build(BuildContext context) {
return Container( // more things
So the switchTheme() method should be called from the floating action Button in the Home Screen:
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final BlogsProvider provider = Provider.of<BlogsProvider>(context);
return Scaffold(
appBar: const BlogAppBar(),
floatingActionButton: const **_UserActionsButton()**,
body: **HomeBackground**(
firstIcon: Icons.chat,
isLoading: false,
child: RefreshIndicator(
onRefresh: () async {
provider.getBlogs();
},
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Column(
children: _loadBlogs(provider),
),
),
)));
}
List<BlogCard> _loadBlogs(BlogsProvider provider) {
List<Blog> blogsSorted = provider.blogs;
blogsSorted.sort((a, b) => a.created.compareTo(b.created));
return blogsSorted.reversed.toList().map((e) => BlogCard(blog: e)).toList();
}
}
How can I solve this?
There are two simple ways to do it:
Set a StatefulWidget higher up in the tree, for example in your HomeScreen, and then pass the method to change the theme and the current theme to the FloatingActionButton. Additionally, send the current theme to the Background widget.
You are already using the Provider package, create an additional provider for the theme and store the current theme and the method to change it within that provider.
Great teacher, the 2 option was the best approach and the solution. Thanks!
| 7,165 |
https://stackoverflow.com/questions/19156487 | StackExchange | Open Web | CC-By-SA | 2,013 | Stack Exchange | 97ldave, Mmmh mmh, Patrick Evans, andyb, https://stackoverflow.com/users/1238244, https://stackoverflow.com/users/1582182, https://stackoverflow.com/users/483032, https://stackoverflow.com/users/560593, https://stackoverflow.com/users/637889, lharby | English | Spoken | 193 | 636 | jquery effect does not want to work in google chrome. what's wrong?
I'm trying to make a fadeIn() and slideDown() in jquery, but it does not want to work in chrome. Here's the code
$(function (){
$('#wrap h1').hide().slideDown(3000)
$('.circles_1 img').hide().delay(3000).fadeIn(5000)
})
and here's the html code of it :
<section id="circles">
<figure class="circles_1"><a href="photoshop.html">image 1<img src="images/photoshop.png"/></a></figure>
<figure class="circles_1"><a href="illustrator.html">image 2<img src="images/illustrator.png"/></a></figure>
<figure class="circles_1"><a href="indesign.html">image 3<img src="images/indesign.png"/></a></figure>
<figure class="circles_1"><a href="websites.html">image 4<img src="images/websites.png"/></a></figure>
</section>
is this not what you want: http://jsfiddle.net/EakzN/ Seems to work when you comment out first line of jQuery. There is no id "wrap" in your HTML provided.
your first animation is trying to hide and show the element at the same time
Ditto, this is kind of working for me: http://jsfiddle.net/lharby/Qpr79/
missing semi-colons too
@AurélienOoms semi-colons are optional in most situations - see http://stackoverflow.com/questions/2846283/what-are-the-rules-for-javascripts-automatic-semicolon-insertion-asi
Tested in JSFiddle and seems working fine, make sure you have JQuery Library link included.
Import jquery
< script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" >
and then try to load the function after the Dom is ready:
$( document ).ready(function() {
$('#wrap h1').hide().slideDown(3000)**;**
$('.circles_1 img').hide().delay(3000).fadeIn(5000)**;**
});
And dont forget the ;
Cheers.
Semi-colons are optional in most situations - see http://stackoverflow.com/questions/2846283/what-are-the-rules-for-javascripts-automatic-semicolon-insertion-asi
| 44,991 |
https://sv.wikipedia.org/wiki/Desa%20Sirnajaya%20%28administrativ%20by%20i%20Indonesien%2C%20lat%20-7%2C04%2C%20long%20107%2C30%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Desa Sirnajaya (administrativ by i Indonesien, lat -7,04, long 107,30) | https://sv.wikipedia.org/w/index.php?title=Desa Sirnajaya (administrativ by i Indonesien, lat -7,04, long 107,30)&action=history | Swedish | Spoken | 78 | 174 | Desa Sirnajaya är en administrativ by i Indonesien. Den ligger i provinsen Jawa Barat, i den västra delen av landet, km sydost om huvudstaden Jakarta.
Tropiskt regnskogsklimat råder i trakten. Årsmedeltemperaturen i trakten är °C. Den varmaste månaden är oktober, då medeltemperaturen är °C, och den kallaste är januari, med °C. Genomsnittlig årsnederbörd är millimeter. Den regnigaste månaden är december, med i genomsnitt mm nederbörd, och den torraste är september, med mm nederbörd.
Källor
Indelningar i Jawa Barat | 21,373 |
https://az.wikipedia.org/wiki/Bahad%C4%B1r%20%C5%9Fah%20Q%C3%BCc%C9%99rati | Wikipedia | Open Web | CC-By-SA | 2,023 | Bahadır şah Qücərati | https://az.wikipedia.org/w/index.php?title=Bahadır şah Qücərati&action=history | Azerbaijani | Spoken | 800 | 2,866 | Sultan Qütbəddin Bahadır şah Qücərati (? -13.2.1537) — Qücərat sultanlığının hökmdarı.
Həyatı
Mahmud Bəgranın nəvəsi, II Müzəffər şahın oğludur. II Müzəffər şah arvadının basqısı ilə böyük oğlu İskəndəri vəliəhd elan edincə Bahadır şah gizlincə Qücəratdan qaçaraq öncə Dunqarpurda Udai Sinqhə, sonra da Çitorda Məvar hakiminə sığındı. Onlardan yardım görəməyincə daha güclü olduğunu duyduğu Dehli Sultanı İbrahim şah Ludinin yanına getdi. Ancaq bu sırada Ludi ölkəsi də Sultan Babur təhlükəsinə məruz qalmışdı. Panipat səhrasında ikən bu dəfə gizlincə Babura müraciət etdi. Babur savaş sonrası uyğun bir zamanda onunla görüşə biləcəyini bildirdi. Bahadır, Panipat savaşından öncə bilinməyən bəzi səbəblərlə Ludi qərargahından ayrıldı və Qücərat tərəfı getdi (1526). Bu sırada II Müzəffər şah öldü və yerinə İskəndər sultan elan edildi. Səltənətinin başlanğıcında xalq üzərində basqı quran və vəzirləri də hər zaman xor görən İskəndər bir saray zərbəsiylə ortadan qaldırıldı. İskəndərin kiçik yaşdakı qardaşı Mahmud vəzir İmadülmülk Xoşqədəmin yardımı ilə hökmdar elan edildi. Qısa zamanda sarayın bütün nəzarəti İmadülmülkün əlinə keçdi. Bu durumdan məmnun olmayan digər əmirlər Bahadır ilə təmasa keçərək onu Qücərata dəvət etdilər. Bahadır İmadülmülkü yenərək ortadan qaldırdı və 1526-cı ildə Qiyasəddin ünvanı ilə hökmdar oldu. Əhmədabadda dövlət işlərini yoluna qoyduqdan sonra siyasi məsələlərlə ilgiləndi. Portuqaliya, Baburlu, Xalac, Nizamşah, Xandeş və hətta çox uzaqlardaki Benqal sultanlığı ilə Osmanlılar yanında elçilik yoluyla təmaslarda oldu.
Daha sonra mərkəzi Mandu olan Xalac sultanlığı ilə mücadələyə girişti. Malvanın önəmli bir bölümünü asanlıqla Qücərat torpaqlarına qatdı. Ayrıca Xalac Sultanı II Mahmud şah da oğullarıyla birlikdə əsir alındı və hamısı yolda öldürüldü (17 mart 1531). Bahadır şah Malvanın zəbtından sonra Hindu şəhərlərinə qarşı hərəkətə keçdi. Hindistanda böyük bir qüvvə olan Racputlara qarşı savaşdı. Rəisləri Silhadi 25 yanvar 1532-ci ildə İmadülmülk Məlikci ibn Təvəkkül adlı komandan tərəfindən əsir alındı. Qücərat -Dehli yolu üzərindəki Çitor da Bahadırın hücumunana uğradı. Racaları 1534-cü ildə Loichada məğlub edildi. Ancak bu sırada Bahadır, Baburlu və portuqaliyalılarla də ilgilənmək məcburiyyətində qaldığından Əhmədabada döndü.
Vindhya sıra dağlarının cənubunda, Tuğlukluların zəifləməsi üzərinə bağımsızlıqlarını elan etmiş bəzi müsəlman dövlətlər də Malva hadisəsindən sonra Qücərata qarşı cəbhə almışdılar. Bahadır şah, Handeş Faruki və Bürhan Nizamşahilərinə qarşı yeni bir səfərə çıxdı. Nizamşahilərin əlindəki Əhmədnaqar ilə Hindistanın ən önəmli şəhərlərindən və qalalarından olan Dövlətabadı asanca zəbt etdi. Bu savaş sırasında yardımını gördüğü Bərar Sultanı Əlaəddin İmadşah iaşə işlərini gərəkdiyi kimi düzənləyəmədiyindən orduda aclık baş göstərdi. Bahadır şah bu təhlükəli durum üzərinə Burhan Nizamşah ilə barış bağlamaq məcburiyyətində qaldı və bunu saxlamaq üçün də əlindəki qənimət malı filləri ona qaytardı.
Malva və Çitor taraflarında ikən Hümayun şah, Bahadırın harəkətlərini yaxından təqip edirdi. Fəqət gözlənilməyən bir zamanda Muhamməd Zaman Mirzə adlı bir bəyin Qücərata sığınması Baburluları hərəkətə keçirdi. Sultan Hümayun, Bahadırdan Hüseyn Bayqara ailəsinə mənsub Masumə Sultan Bəyimin əri Məhəmməd Zamanı təslim etməsini istədi. Bu təklif qəbul edilməyincə də Baburlu ordusu Çitor tərəfə yürüdü. Bu sırada Bahadır şah Çitor qalası önlərində mühasirə ilə məşğul idi. Sultan Hümayun Çitor mühasirəsinin bitməsini gözlədi. Çitoru ələ keçirən Bahadır şah Baburlu qüvvələrinin üstünlüyü qarşısında sürətlə iç qısımlara çəkilmək məcburiyyətində qaldı (1534). Sultan Hümayun da Çampanir, Mandasor və Mandunu ələ keçirdi, paytaxt Əhmədabadı mühasirə etdi. Bahadır şah durumun ciddiliğini görərək sürətlə sahilə doğru qaçdı və portuqaliyalılardan yardım istədi. Daha sonra da Sultan Hümayunun çıxan qarışıqlıqları yatırmaq üzərə Qücəratdan ayrılmasından faydalanarak torpaqlarını geri almağı bacardı.
Portuqaliya-Qücərat münasəbətləri 1534-cü ildə çox inkişaf etdi. Hümayunun önündən kaçan Bahadır Portuqaliya baş valisindən yardım istəmək məcburiyyətində qaldı və bunun qarşılığında Diu civarında bir qala tikmələrinə izin verdi (1535). Diu, Bəsrə və Qırmızı dənizi Hindistana bağlayan önəmli bir ticarət limanı idi. Ancaq Bahadır şah, Sultan Hümayun təhlükəsi keçdikdən sonra portuqaliyalılara qarşı daha sərt bir siyasət təqib etməyə başladı. 1536-cı ildə Diunun gələcəyini görüşmək üzərə buraya gəldi. 15 noyabrda portuqaliyalıları şübhəyə düşürmədən onları ziyarət edəcəyini bildirdi. Portuqaliya valisi Nuno da Cunhanı Diuya dəvət etdi. Diuya gələn Portuqaliya valisi xəstəliyini bəhanə edərək görüşməyə gitmək istəmədi. Bahadır şah isə durumu anlamadı və onu ziyarətə getdi. Vali ilə görüşdüyü sırada əleyhinə bir hiylə hazırlandığını sezərək həmən ayrıldı. Quruya çıxmağa hazırlanırkən Manuel adlı bir portuqaliyalının hücumunana uğrayaraq yaralandı və dənizdə boğuldu (13 fevral 1537).
Bahadır Şah Portuqaliyalilərə karşı güçlü bir müslüman dəvlətin dəstəğinə ihtiyaç duyuyordu. Bu maksatla Osmanlı sarayına dəğərli hədiyələrlə bir əlçilik həyəti yollayarak (1536) yardım taləp ətmiş, ayrıca 300 sandık dolusu hazinəsini də əmniyət altına almak gayəsiylə Məkkəyə göndərmək istəmişti. Bu həyət o sırada Ədirnədə bulunan Kanuni Sultan Süləyman ilə görüştü. Kanuninin əmriylə Mısır Bəylərbəyi Hadım Süləyman Paşa 22 Haziran 1538də yətmiş altı parça gəmidən oluşan bir donanmayla Süvəyştən yola çıktı və 4 Əylül 1538də Diuya vardı; ancak yəni Qücərat sultanı III. Mahmuddan yətərli dəstək görmədiği için Diuyu kısa bir sürə kuşattıktan sonra gəri dönmək zorunda kaldı.
Cəsur, cömərt və çok gayrətli bir hükümdar olan Bahadır Şah zamanında ülkə ən gəniş sınırlarına ulaşmıştır. Ölümündən sonra iktidar mücadələsi başlamış və Qücərat tahtı ciddi sarsıntılara uğramıştır. Hüsam Han onun hayatı hakkında Tarih-i Bahadurhi adlı bir əsər kaləmə almıştır.
Həmçinin bax
Qücərat sultanlığı
İstinadlar
Hindistan hökmdarları
Hindistan tarixi
Qücərat sultanları | 37,672 |
https://stackoverflow.com/questions/26949387 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Alfredo Nuñez F., Rahul, https://stackoverflow.com/users/4254810, https://stackoverflow.com/users/567435 | Yoruba | Spoken | 151 | 259 | Join 2 fields from the same table in a row
i have this:
id Level module permissions
------------------------------------------------
15 level 15 module 1 edit, add, delete
15 level 15 module 2 add, report
I want to have the result like this one:
id Level module permissions module permissions
---------------------------------------------------------------------------
15 level 15 module 1 edit, add, delete module 2 add, report
how can i do it?
SELECT id, level,
'module 1' as module1, max(case when module = 'module 1' then permissions end) as permissions1,
'module 2' as module2, max(case when module = 'module 2' then permissions end) as permissions2
from your_table
group by id, level
Here's a working fiddle to prove that it works cool http://sqlfiddle.com/#!2/6e4b0/1
thanks for answer, but i forgot to say if i have modules dynamic, how can i do that, i mean more columns with more modules but i don't know how many modules i'm gonna have
| 34,017 |
https://stackoverflow.com/questions/13768220 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Gareth Latty, Rohit Jain, Xymostech, https://stackoverflow.com/users/1679863, https://stackoverflow.com/users/1848830, https://stackoverflow.com/users/57318, https://stackoverflow.com/users/722121, kevin dappah | English | Spoken | 378 | 631 | Changing str to int in Python
I am new to python. I am trying to make a small elavator program.
The code:
import time
elavator = True
# 0 is B floor // basement
elavatorFloors = [0,1,2,3,4,5]
while elavator == True:
getLevel = input ("Which floor would you like to visit? ( 1 - 5) ")
time.sleep(2)
print "you're now at floor, " +int.getLevel
I get this error: AttributeError: type object 'int' has no attribute 'getLevel'
Aside from changing the str to int, am I using any bad technique? I really want to improve my programming thinking and code writing. Thank you :)
Use int(getLevel). And why are you not asking for level 0?
You're using input, so getLevel will already be an integer. That said, you should probably use raw_input and cast to an integer explicitly.
@Xymostech While the OP is using 2.x, it's worth noting that what you said only applies to older versions of Python. In 3.x, input() does not evaluate the string.
int() is a type, so to instantiate it, you need to do int(getLevel), not int.getLevel.
Check the docs for examples and more.
Also note that getLevel is an odd name for the variable, as it implies it is a function that gives the level. A better name would be just level.
It's also worth noting that input() evaluates the input as Python code (In Python 2.x, in 3.x it acts as raw_input() does in older versions), so getLevel will already be a number, although I would recommend using raw_input() instead, and keeping your conversion from a string to an integer, as it won't allow arbitrary execution of code, which is much better.
Thank you. it works, but more importantly I get it with your explanation. I have to practice to become fluent. I appreciate the advice also regarding level vs getLevel :)
Here is the sample code modified:
import time
elevator = "false"
# 0 is B floor // basement
elavatorFloors = [0,1,2,3,4,5]
getLevel = input("Which floor would you like to visit? ( 1 - 5) ")
for x in elavatorFloors:
if x == getLevel:
time.sleep(getLevel)
print "you're now at floor, " + str(getLevel)
elevator = "true"
pass
else:
pass
if (elevator == "false"):
print "There is no floor: " + str(getLevel)
| 49,945 |
https://arz.wikipedia.org/wiki/%D9%83%D8%A7%D8%B1%D9%84%20%D9%84%D8%A7%D8%B1%D8%B3%D9%86%20%28%D9%84%D8%A7%D8%B9%D8%A8%20%D8%AC%D9%85%D8%A8%D8%A7%D8%B2%20%D9%81%D9%86%D9%89%20%D9%85%D9%86%20%D8%AF%D9%86%D9%85%D8%A7%D8%B1%D9%83%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | كارل لارسن (لاعب جمباز فنى من دنمارك) | https://arz.wikipedia.org/w/index.php?title=كارل لارسن (لاعب جمباز فنى من دنمارك)&action=history | Egyptian Arabic | Spoken | 46 | 126 | كارل لارسن كان لاعب جمباز فنى من دنمارك.
حياته
كارل لارسن من مواليد يوم 3 يونيه سنة 1886 فى دنمارك.
المشاركات
شارك فى:
اوليمبياد صيف 1912
وفاته
كارل لارسن مات فى 4 ديسمبر سنة 1962.
لينكات
مصادر
لاعب جمباز فنى من دنمارك
وفيات 1962
مواليد 1886 | 16,945 |
https://stackoverflow.com/questions/69122615 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | CuteShaun, David, Lefty, VLAZ, https://stackoverflow.com/users/11239542, https://stackoverflow.com/users/3689450, https://stackoverflow.com/users/4601803, https://stackoverflow.com/users/8258932 | English | Spoken | 323 | 530 | Javascript variable setting values, trying to understand meaning
Can someone please explain the below code for me?
Is the line setting multiple variables at the same time? If so, what is are they?
If it is setting multiple variables, I would have expected all the items to be X=Y, but instead I get random variables within the line, like reevVal, mmareev, amareev, fvVal.
Any help is greatly appreciated.
var balance = $(".input-balance"), value = $(".balance-value"), reevVal, mmaVal = $(".mma-val span"), mmareev, amaVal = $(".ama-val span"), amareev, triggerPlus = "false", triggerMinus ="false", fvVal;
Multiple variable definition, the vars witout value will be setted as undefined
Is there an easy way to namespace all the variables? for example Helper.Slider.balance, Helper.Slider.value, or do I need to define each separately?
Need more explanation, from you code I understand only that you define 10 variables comma separated, some with value, some empty (with undefined value)
@Lefty Create an object?
Listen to @VLAZ and create an object with 10 different properties, it will be more convenient to you
var x = 0, y, z = 1
is equivalent to
var x = 0;
var y; // undefined
var z = 1
There's also the similar, but different, comma operator that lets you "group" up multiple expressions into a single expression. The value of the last sub-expression is returned, but all sub-expressions are evaluated:
let x = (5, doSix(), 7); // x = 7
x = 8, doNine(), 10; // 10
Note the parens are necessary in the 1st line above to make it clear it's a single declaration and not a list of declarations like in the 1st example. The parens aren't necessary in the 2nd line, since there's not let|var|const so it's not a declaration, but an assignment.
In practice, it's most common in for loops where you're constrained to a single expression:
for (let i = 0, j = 10; i < j; i++, j--)
console.log(i, j);
| 32,884 |
https://ar.wikipedia.org/wiki/%D9%82%D8%B1%D8%A7%D8%B1%20%D9%85%D8%AC%D9%84%D8%B3%20%D8%A7%D9%84%D8%A3%D9%85%D9%86%20%D8%A7%D9%84%D8%AA%D8%A7%D8%A8%D8%B9%20%D9%84%D9%84%D8%A3%D9%85%D9%85%20%D8%A7%D9%84%D9%85%D8%AA%D8%AD%D8%AF%D8%A9%20%D8%B1%D9%82%D9%85%201964 | Wikipedia | Open Web | CC-By-SA | 2,023 | قرار مجلس الأمن التابع للأمم المتحدة رقم 1964 | https://ar.wikipedia.org/w/index.php?title=قرار مجلس الأمن التابع للأمم المتحدة رقم 1964&action=history | Arabic | Spoken | 331 | 952 | قرار مجلس الأمن التابع للأمم المتحدة رقم 1964، الذي اتخذ بالإجماع في 22 ديسمبر 2010، بعد أن ذكر بالقرارات السابقة بشأن الوضع في الصومال، أذن المجلس باستمرار ولاية بعثة الاتحاد الأفريقي في الصومال حتى 30 سبتمبر 2011 وزاد حجمها من 8000 إلى 12000 فرد.
وقال مجلس الأمن إن الزيادة تهدف إلى حماية الحكومة والسكان المدنيين من متمردي حركة الشباب وجماعات أخرى. وطلبت الدول الأفريقية ما مجموعه 20 ألف جندي، لكن مجلس الأمن شعر أن هذا العدد كان مفرطًا.
القرار
ملاحظات
وفي ديباجة القرار، أكد المجلس من جديد دعمه لعملية جيبوتي للسلام ودور الحكومة الاتحادية الانتقالية. وذكر أنه يتعين على الأطراف في الصومال نبذ العنف والتعاون من أجل إحلال السلام والاستقرار في البلاد. وأثنى المجلس على دور بعثة الاتحاد الأفريقي في الصومال ومساهمات بوروندي وأوغندا في القوة وكرر تأكيد أهمية أداء الخدمات الأمنية بشكل كامل في الصومال.
في غضون ذلك، كان هناك قلق بشأن الوضع الإنساني في البلاد والهجمات على العاملين في مجال المساعدات الإنسانية؛ وأدينت جميع أعمال العنف وانتهاكات حقوق الإنسان ضد السكان المدنيين والعاملين في مجال الإغاثة. علاوة على ذلك، تم الإعراب عن القلق من تراجع التمويل الإنساني للصومال وحث المجلس الدول على المساهمة.
أعمال
بموجب الفصل السابع من ميثاق الأمم المتحدة، تم تفويض الدول الأعضاء في الاتحاد الأفريقي بمواصلة مهمتها في الصومال حتى 30 سبتمبر 2011، وزيادة حجم بعثة الاتحاد الأفريقي في الصومال إلى 12000 فرد، بعد أن كان 8000 فرد. وصدرت تعليمات للأمين العام بان كي مون لتقديم الخدمات اللوجستية للعملية. وأشار إلى نيته في القرار 1863 (2008) النظر في إمكانية إنشاء بعثة حفظ سلام تابعة للأمم المتحدة في الصومال.
ودعا القرار إلى ضمان سلامة العاملين في المجال الإنساني؛ إنهاء العنف وانتهاكات حقوق الإنسان ضد السكان؛ ورحب بالجهود التي يبذلها ضباط ووكالات الأمم المتحدة لزيادة وجود الأمم المتحدة في الصومال.
انظر أيضًا
قائمة قرارات مجلس الأمن التابع للأمم المتحدة 1901 إلى 2000 (2009-2011)
الحرب الأهلية الصومالية
الحرب الأهلية الصومالية (2009 إلى الوقت الحاضر)
مراجع
روابط خارجية
الصومال في 2010
أحداث ديسمبر 2010
قرارات مجلس الأمن التابع للأمم المتحدة بشأن الصومال
قرارات مجلس الأمن التابع للأمم المتحدة عام 2010 | 25,803 |
https://serverfault.com/questions/434739 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Brent Pabst, Olaf, Pesta Fiesta, RandomGuy, Spammer, breakingbattlegrounds, https://serverfault.com/users/42617, https://serverfault.com/users/60573, https://serverfault.com/users/988967, https://serverfault.com/users/988968, https://serverfault.com/users/988969, https://serverfault.com/users/989139, https://serverfault.com/users/989146, realzeusey | English | Spoken | 347 | 454 | Can installing URL Rewrite 2.0 on production IIS 7.5 have a negative impact?
We have a Windows 2008 R2 server with IIS 7.5 and a lot of customer websites. Being no sys-admin but a developer, I hate to touch that wonderfully running system.
However, I'd like to update the IIS plugin URL Rewrite to version 2.0 via Web Platform Installer.
I do not want to do anything that might compromise the server, hence the question: can I expect it to work with at least a 99% chance? I did not find any bug reports or reviews on the web, so I'd like to hear an expert on that.
An educated guess will do.
I have never had a problem with updating it. However, all precautions should be taken when doing so. Below are a few:
Take a backup, a full backup and system restore point, backup your customer files too (btw, you should already be doing this anyway)
Schedule a maintenance period, let your customers know the server may be offline for a few minutes late at night one night.
A restart may be required, at the very least IIS might need to be reset.
Often, any update or install to IIS will require the web server to reset or restart the box in general. Check the release notes for the new version, many times they list this in there.
Other than those things, have at it. URL Rewrite is pretty stable, just review the release notes prior to installation.
Thanks Brent, that feels good. Of course we are backing up our files, but still a crash will be an annoyance. If someone had written "well, the update occasionally kills the IIS integrity", I'd reconsider running the update at all. So, good to know you never had a problem.
I should add, you need to check if any of your sites have rewrite rules in place, make sure they are compatible or need to be changed to work with the latest version.
Thanks again. I already updated the tools and did exactly that. Everything went like charm.
| 32,638 |
https://ceb.wikipedia.org/wiki/Storm%20Creek%20%28suba%20sa%20Tinipong%20Bansa%2C%20Montana%2C%20Mineral%20County%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Storm Creek (suba sa Tinipong Bansa, Montana, Mineral County) | https://ceb.wikipedia.org/w/index.php?title=Storm Creek (suba sa Tinipong Bansa, Montana, Mineral County)&action=history | Cebuano | Spoken | 76 | 108 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Storm Creek.
Suba ang Storm Creek sa Tinipong Bansa. Nahimutang ni sa kondado sa Mineral County ug estado sa Montana, sa sentro nga bahin sa nasod, km sa kasadpan sa Washington, D.C. Ang Storm Creek mao ang bahin sa tubig-saluran sa Columbia River ang ulohan sa nasod.
Ang mga gi basihan niini
Columbia River (suba sa Tinipong Bansa) tubig-saluran
Mga suba sa Montana (estado) | 32,969 |
https://ru.wikipedia.org/wiki/%D0%A1%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D0%BE%20%28%D0%9C%D0%B0%D1%80%D0%B8%D0%B9%20%D0%AD%D0%BB%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Сосново (Марий Эл) | https://ru.wikipedia.org/w/index.php?title=Сосново (Марий Эл)&action=history | Russian | Spoken | 109 | 337 | Сосново (ранее — Сосновка, ) — деревня в Медведевском районе Марий Эл Российской Федерации. Входит в состав Сенькинского сельского поселения.
Численность населения — человек ( год).
География
Деревня Сосново располагается в 2 км на северо-запад от деревни Сенькино на федеральной автомобильной дороге «Вятка».
История
Впервые деревня упоминается в списках селений Царевококшайского уезда в 1763 году как Янгозино тож. Деревня основана крестьянами — выходцами из деревни Тарханово (ныне — район города Йошкар-Олы), которые создали хутор в глухом лесу, на берегу реки Ошлы.
Население
Национальный состав на 1 января 2014 г.:
Описание
Жители деревни проживают в индивидуальных домах. Деревня газифицирована. Улично-дорожная сеть имеет щебневое покрытие.
Примечания
Литература
Населённые пункты Медведевского района | 47,905 |
https://blender.stackexchange.com/questions/143157 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | Mohamad Zeina, https://blender.stackexchange.com/users/2214, https://blender.stackexchange.com/users/23021, vklidu | Dutch | Spoken | 441 | 1,670 | Copy scene node tree to other scenes
I have a Blender file wih many scenes and I want to copy the node tree of one of them to the other scenes. From Blender interface it is a very simple task, in python I have tried using
bpy.ops.node.clipboard_copy()
and
bpy.ops.node.clipboard_paste()
with no success.
Is there any other method I can use?
Here is my code:
import sys
import bpy
def deleteNodeTree(scene, override):
scene.node_tree.nodes.clear()
def copyNodeTree(scene, override):
bpy.ops.node.select_all(override, action = 'DESELECT')
bpy.ops.node.select_all(override, action = 'SELECT')
bpy.ops.node.clipboard_copy(override)
def pasteNodeTree(scene, override):
bpy.ops.node.select_all(override, action = 'DESELECT')
bpy.ops.node.select_all(override, action = 'SELECT')
bpy.ops.node.clipboard_paste(override)
def getOverride(type, regionType):
Override = False
for window in bpy.context.window_manager.windows:
for area in window.screen.areas:
if(area.type == type):
Override = {"window": window, "screen": window.screen, "area": area, "scene" : bpy.context.scene}
break
if(not Override):
bpy.context.window_manager.windows[0].screen.areas[0].type = type
Override = {"window": bpy.context.window_manager.windows[0], "screen": bpy.context.window_manager.windows[0].screen, "area": bpy.context.window_manager.windows[0].screen.areas[0], "scene" : bpy.context.scene, "region" : bpy.context.region}
if(regionType):
for region in Override["area"].regions:
if(region.type == regionType):
Override["region"] = region
return Override
if len(sys.argv) < 6:
raise Exception("Usage: blender -b blend_file --python script.py
target_scene_name")
blend_file = sys.argv[2]
target_scene_name = sys.argv[5]
bpy.ops.wm.open_mainfile( filepath = blend_file )
#Copia su tutte le scene le impostazioni dei nodi di output prese dalla scena selezionata (target_scene_name)
bpy.context.screen.scene = bpy.data.scenes[target_scene_name]
override = getOverride('NODE_EDITOR', False)
copyNodeTree( bpy.context.screen.scene, override)
for scene in bpy.data.scenes:
if scene.name != target_scene_name:
bpy.context.screen.scene = bpy.data.scenes[scene.name]
scene = bpy.context.screen.scene
print("Deleting output options from scene: " +
bpy.context.screen.scene.name)
deleteNodeTree(scene, override)
print("Pasting output options to scene: " +
bpy.context.screen.scene.name)
pasteNodeTree(scene, override)
bpy.ops.wm.save_as_mainfile(filepath = blend_file, compress=False)
Did you ever find a solution to this? Trying to do something very similar
I don't have scripting knowledge, so sorry if it is too naive, but since you can we or place nodetree via node group, wouldn't be this a way?
I have managed to do it via the
bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1) hack.
import bpy
class TEST_OT_poll():
@classmethod
def poll(cls, context):
if context.space_data.type == 'NODE_EDITOR' and context.space_data.tree_type == 'CompositorNodeTree':
return True
else:
return False
class COPY_SCENE_NODE_TREE_OT_copy_to_others(bpy.types.Operator, TEST_OT_poll):
bl_idname = "node.csnt_test_temp"
bl_label = "TEMPT TEST"
bl_description = ""
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
initial_scene = bpy.context.scene
scenes = bpy.data.scenes.values()
scenes.remove(initial_scene)
bpy.ops.node.select_all(action='SELECT')
bpy.ops.node.clipboard_copy()
for scene in scenes:
print(scene)
bpy.context.window.scene = scene
bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1)
bpy.context.scene.node_tree.nodes.clear()
bpy.ops.node.clipboard_paste()
bpy.ops.node.select_all(action='DESELECT')
bpy.context.window.scene = initial_scene
bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1)
bpy.ops.node.select_all(action='DESELECT')
return {'FINISHED'}
class COPY_SCENE_NODE_TREE_PT_panel(bpy.types.Panel):
bl_idname = "COPY_SCENE_NODE_PT_panel"
bl_label = "Copy scene node tree"
bl_space_type = 'NODE_EDITOR'
bl_region_type = "UI"
bl_category = "Tool"
@classmethod
def poll(cls, context):
if context.space_data.tree_type == 'CompositorNodeTree':
return True
else:
return False
def draw(self, context):
layout = self.layout
column = layout.column()
column.operator("node.csnt_test_temp", text = "Copy And Paste")
classes = (
COPY_SCENE_NODE_TREE_PT_panel,
COPY_SCENE_NODE_TREE_OT_copy_to_others,
)
def register():
for c in classes:
bpy.utils.register_class(c)
def unregister():
for c in classes:
bpy.utils.unregister_class(c)
if __name__ == "__main__":
register()
| 18,652 |
https://ceb.wikipedia.org/wiki/Alysidiopsis%20lignicola | Wikipedia | Open Web | CC-By-SA | 2,023 | Alysidiopsis lignicola | https://ceb.wikipedia.org/w/index.php?title=Alysidiopsis lignicola&action=history | Cebuano | Spoken | 53 | 114 | Kaliwatan sa uhong ang Alysidiopsis lignicola. sakop sa ka-ulo nga Ascomycota, ug Una ning gihulagway ni Mercado, Figueras ug Julio Mena ni adtong 1996. Ang Alysidiopsis lignicola sakop sa kahenera nga Alysidiopsis, ka-ulo nga Ascomycota, ug kaginharian nga abungawg-uhong. Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Abungawg-uhong
Alysidiopsis | 46,622 |
https://stackoverflow.com/questions/52340131 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | Sphinx, Temani Afif, b3n10, https://stackoverflow.com/users/5665870, https://stackoverflow.com/users/6353682, https://stackoverflow.com/users/8620333 | English | Spoken | 282 | 683 | VueJS - rotate before displaying element
I'm trying to display a line in different directions. Both vertical and horizontal directions work as expected. But for diagonal direction I need to rotate it first before it is displayed. Problem is it displays the line vertically then rotates to 135deg. I understand the element needs to be displayed before it can be rotated. So how can I make this work?
Here is a working demo
HTML:
<div id="app">
<button @click="toggle">Toggle</button>
<span>Direction: {{ direction }}</span>
<transition name="line-transition">
<div v-if="direction"
class="line"
:class="direction">
</div>
</transition>
</div>
VueJS
new Vue({
el: "#app",
data: {
direction: null
},
methods: {
toggle: function(){
const arr = [ 'vertical', 'horizontal', 'diagonal']
/* random select */
this.direction = arr[Math.floor(Math.random() * arr.length)]
/* hide line before toggling direction */
setTimeout(() => {
this.direction = null
}, 1000)
}
}
})
CSS:
.line.vertical {
width: 10px;
height: 100px;
}
.line.horizontal {
width: 100px;
height: 10px;
}
.line.diagonal {
transform: rotate(135deg);
width: 10px;
height: 100px;
}
.line-transition-enter-active,
.line-transition-leave-active {
animation: slidein 1s;
}
@keyframes slidein {
from {
transform: scaleX(0) scaleY(0);
}
to {
transform: scaleX(1) scaleY(1);
}
}
And idea is to use a pseudo element to create the diagonal line so you avoid the conflit between using tranform on the animated element:
.line.diagonal {
width:100px;
height:100px;
background:transparent;
}
.line.diagonal:before {
content:"";
top:0;
left: calc(50% - 5px);
position:absolute;
transform: rotate(135deg);
border-radius: inherit;
background: blue;
width: 10px;
height: 100px;
}
Full code:
https://jsfiddle.net/m4g198r2/28/
smart solution by pure css...+1
hmm, it seems to move from it's position while stretching. Can it stay in place while it's being shown?
@bEn it's because the element is not centred, check the update ... you need to adjust left property
| 20,898 |
https://stackoverflow.com/questions/64824706 | StackExchange | Open Web | CC-By-SA | 2,020 | Stack Exchange | Dark Byte, https://stackoverflow.com/users/12833797 | Danish | Spoken | 245 | 635 | Object.Array.map is undefined ReactJS component MERN Stack
my component:
import React, { useEffect, useState } from 'react'
import './viewAcc.css'
import HttpService from '../../services/http-service'
const http = new HttpService()
function ViewAcc({match}){
useEffect(()=>{
getAcc()
}, [])
const [acc, setAcc] = useState({})
const getAcc = async()=>{
const data = await http.getAcc(match.params.id)
setAcc(data[0])
}
return(
<div style={{display: "block"}} className="container">
<div className="row">
<div className="col-8" style={{alignItems:"center", marginBottom:"40px"}}>
<h3><b>Name: {"\u00a0\u00a0"}</b> {acc.name}</h3>
<div style={{display:"flex", alignItems:"center"}}>
<h3><b>Phone Nos: </b></h3>
{acc.ph_nos.map(i =>
<p key={i}>{i}</p>
)}
</div>
</div>
<div className="col-sm">
<input></input>
</div>
</div>
</div>
)
}
export default ViewAcc
While I was writing this code and npm was auto refreshing, both the name and phone numbers were displayed (this means that the data is being fetched) but when I went back to the main page and clicked on my dynamic router link,
TypeError: acc.ph_nos is undefined Error is displayed.
When I remove the acc.ph_nos.map part, the name is displayed with no errors. How can I resolve this?
You can make the ph_nos property an empty array first:
const [acc, setAcc] = useState({ph_nos: []})
Or, even better, separate out the phone numbers into a separate state variable:
const [phoneNumbers, setPhoneNumbers] = useState([]);
// ...
const getAcc = () => {
http.getAcc(match.params.id).then(data => setPhoneNumbers(data[0].ph_nos));
};
and then reference the phoneNumbers array instead of ph_nos when rendering.
You can also simplify
useEffect(()=>{
getAcc()
}, [])
to
useEffect(getAcc);
Thanks a lot. This works but can you please exaplain why my method didn't work? Just trying to learn, I'm a beginner.
| 9,185 |
https://de.wikipedia.org/wiki/Forstwirtschaftliches%20Testbetriebsnetz%20der%20Schweiz | Wikipedia | Open Web | CC-By-SA | 2,023 | Forstwirtschaftliches Testbetriebsnetz der Schweiz | https://de.wikipedia.org/w/index.php?title=Forstwirtschaftliches Testbetriebsnetz der Schweiz&action=history | German | Spoken | 527 | 1,292 | Das «Forstwirtschaftliche Testbetriebsnetz» (TBN) der Schweiz ist eine freiwillige Beobachtungsstichprobe, welche 160 öffentliche Forstbetriebe aus den Forstzonen Jura, Mittelland, Voralpen und Alpen (inkl. Alpensüdseite) umfasst. Ziel der Erhebung ist es, die wirtschaftliche Situation der Forstbetriebe detailliert abzubilden und darauf aufbauend Schlussfolgerungen für die Gesamtbranche zu ziehen. In der aktuellen Konzeption liefert das TBN betriebswirtschaftliche Kennziffern nach Forstzonen und auf der Ebene Schweiz. Ergänzend dazu erstellen einige Kantone eigene Auswertungen, die sie für Verdichtungen auf kantonaler Ebene nutzen. Die Ergebnisse des TBN fliessen zudem in die Forstwirtschaftliche Gesamtrechnung (FGR) des Bundesamtes für Statistik (BFS) ein.Betrieben wird die Beobachtungsstichprobe von WaldSchweiz im Auftrag der Bundesämter für Umwelt (BAFU) sowie Statistik (BFS). Die wissenschaftliche Betreuung, Datenauswertung und Interpretation erfolgt durch die Berner Fachhochschule – Hochschule für Agrar-, Forst- und Lebensmittelwissenschaften (BFH-HAFL).
Entstehungsgeschichte
Das TBN in seiner heutigen Form geht auf das Jahr 1995 zurück und wurde durch die Bundesämter für Umwelt (BAFU) und Statistik (BFS) initiiert. In der ursprünglichen Konstellation umfasste das TBN 150 Forstbetriebe. Im Jahr 2006 wurde die TBN-Stichprobe um 50 auf 200 Forstbetriebe erhöht. Seit 2016 umfasst die Beobachtungsstichprobe 160 Forstbetriebe.
Datenerhebung und Auswertung
Zentrales Instrument zur Erhebung der forstökonomischen Daten ist die sogenannte «ForstBAR», eine speziell für die Schweizer Forstwirtschaft entwickelte Software zur Kosten- und Leistungsrechnung (Vollkostenrechnung). Mit der ForstBAR lassen sich Arbeitsstunden, Erlöse und Kosten der Hauptproduktbereiche (Geschäftsfelder) erfassen und auswerten.
Die einheitliche Erfassung der Betriebszahlen sowie die Betreuung durch Experten von WaldSchweiz oder kantonaler BAR-Betreuer gewährleisten eine hohe Qualität und Vergleichbarkeit der Zahlen unter den TBN-Betrieben.
In der ForstBAR werden die vier Kostenträgerbereiche (Hauptproduktbereiche) «Waldbewirtschaftung», «Dienstleistungen», «Sachgüter» und «Investitionen» unterschieden, diese werden weiter in Kostenträger unterteilt:
Waldbewirtschaftung: Vorrangfunktionen Wirtschafts-, Schutz-, Erholungs-, Natur- und Landschaftswald.
Dienstleistungen: Forstdiensttätigkeiten, Betreuung fremder Waldungen, Holzhandelsbetrieb, Dienstleistungen für Dritte, Dienstleistungen für eigene Trägerschaft, Lehrtätigkeit für Dritte, Waldschulen, Vorträge, Führungen, übrige Dienstleistungen.
Sachgüter: Energie-Stückholzproduktion, Hackschnitzelproduktion, Holzverarbeitung, Pflanzgarten, Christbäume und Deckäste, Kiesgrube / Steinbruch, übrige Sachgüter.
Investitionen: Betriebspläne, Erschliessungsanlagen, Schutzbauten, Aufforstung und Wiederaufforstung, Verbauungen, Gebäude, Rücke- und Transportmaschinen, Aufarbeitungsmaschinen, übrige Investitionen.
Im betrieblichen Wertschöpfungsprozess werden die anfallenden direkten und indirekten Kosten sowie die Erlöse systematisch den Kostenträgern zugeordnet. Die einzelbetrieblichen Daten werden anschliessend verdichtet und aggregierte Durchschnittswerte gebildet.
Durch eine regionale Auswertung nach den Forstzonen Jura, Mittelland, Voralpen und Alpen wird den unterschiedlichen Wuchs- und Holzproduktionsbedingungen Rechnung getragen. Im aktuellen Auswertungsjahr 2019 sind 43 Betriebe der Forstzone Jura, 47 dem Mittelland, 25 den Voralpen und 45 den Alpen zugeordnet. Aufgrund der geringen Anzahl TBN-Betriebe auf der Alpensüdseite werden diese der Forstzone Alpen zugeteilt.
ha = Hektar (10000 m2)
Ergebnisse und weiterführende Informationen
Eine detailliertere Darstellung der Kosten- und Leistungssituation der TBN-Betriebe sowie eine umfassende Interpretation der Ergebnisse der Jahre 2008–2019 können den TBN-Publikationen entnommen werden. Die Ergebnisse 2019 und eine Vielzahl an Kennzahlen sind online in der Statistikdatenbank «STAT-TAB» des Bundesamtes für Statistik verfügbar:
TBN-Publikationen
Folgende Publikationen sind auf der Webseite Bundesamt für Umwelt BAFU abrufbar:
Forstwirtschaftliches Testbetriebsnetz der Schweiz: Ergebnisse der Jahre 2017–2019
Forstwirtschaftliches Testbetriebsnetz der Schweiz: Ergebnisse der Jahre 2014–2016
Forstwirtschaftliches Testbetriebsnetz der Schweiz: Ergebnisse der Jahre 2011–2013
Forstwirtschaftliches Testbetriebsnetz der Schweiz: Ergebnisse der Jahre 2008–2010
Detaillierte Ergebnisse TBN
STAT-TAB – Interaktive Tabellen
Verwandte Themen
Schweizerische Forststatistik (FS)
Forstwirtschaftliche Gesamtrechnung (FGR)
Weblinks
Ergebnisse Forstwirtschaftliches Testbetriebsnetz der Schweiz
Einzelnachweise
Wirtschaft (Schweiz) | 29,445 |
https://stackoverflow.com/questions/4175290 | StackExchange | Open Web | CC-By-SA | 2,010 | Stack Exchange | Gene Rusman, Jos Chayane Castillo Contreras, Lê Thành Được, Max Ackerman, N. Taylor, Naveen Chikkala, https://stackoverflow.com/users/295525, https://stackoverflow.com/users/8791970, https://stackoverflow.com/users/8791971, https://stackoverflow.com/users/8792017, https://stackoverflow.com/users/8792151, https://stackoverflow.com/users/8816784, https://stackoverflow.com/users/8816785, lbedogni | English | Spoken | 206 | 310 | Start/Stop JVM
Possible Duplicate:
Are there any Java VMs which can save their state to a file and then reload that state?
Is there a way to stop the JVM, save its states in the hard disk and then resume the execution from the same point it was stopped? Something like the hibernation of windows, linux, etc?
Possible duplicate: http://stackoverflow.com/q/424341/295525
When it's running on a Unix, you can certainly suspend it by e.g. hitting "^Z" on the command line you started it from, or sending it a SIGSTOP signal. This doesn't quite do what you want. It's not written directly to disk (though it may be swapped out). It won't survive a system restart. Unlike an image file, you can't copy or restore it.
There are also a variety of hacks that let some image based systems (smalltalk, emacs, etc.) "unexec()" themselves and save a copy on a disk. These will break any network connections or open files. Most approaches also require the cooperation of the program being saved, especially to gracefully handle the connections to the outside world being severed.
Finally, you could run the JVM in a VM, and suspend the VM. There, at least, connections to files inside the VM will be saved.
| 37,018 |
https://hu.wikipedia.org/wiki/Caianello | Wikipedia | Open Web | CC-By-SA | 2,023 | Caianello | https://hu.wikipedia.org/w/index.php?title=Caianello&action=history | Hungarian | Spoken | 106 | 317 | Caianello község (comune) Olaszország Campania régiójában, Caserta megyében.
Fekvése
A megye központi részén fekszik, Nápolytól 50 km-re északnyugatrara valamint Caserta városától 35 km-re északnyugati irányban. Határai: Marzano Appio, Roccamonfina, Teano és Vairano Patenora.
Története
A település eredete az ókorra vezethető vissza. A Via Latina egyik állomása helyén alakult ki. A mai település alapítására vonatkozóan nincsenek pontos adatok. A következő századokban nemesi birtok volt. A 19. század elején, amikor a Nápolyi Királyságban felszámolták a feudalizmust Teano része lett. 1859-ben vált önálló községgé.
Népessége
A népesség számának alakulása:
Főbb látnivalói
Santi Vincenzo e Anastasio-templom
Santo Stefano-templom
San Michele Arcangelo-templom
Jegyzetek
Források
Comuni-Italiani
Italy World Club
Caserta megye települései | 20,958 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.