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://pt.stackoverflow.com/questions/353107
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Eduardo Vargas, Matheus Rodriguez, Pedro, Woss, https://pt.stackoverflow.com/users/130094, https://pt.stackoverflow.com/users/5878, https://pt.stackoverflow.com/users/77865, https://pt.stackoverflow.com/users/78981
|
Portuguese
|
Spoken
| 119
| 299
|
Verificar status http no angular
Tenho o seguinte código, preciso verificar o status que o servidor retorna para o WebApp, tenho o seguinte código:
this.http.post (this.url,json)
.subscribe (
res => {
console.log(res);
},
(err: any) => {
console.log('raw error =>', err);
}
);}
Qual a versão do Angular? As mais recentes ( >6) tem um uso diferente pra pegar o status do retorno
Talvez isso lhe interesse: HttpClient - Getting error details
Faz assim:
this.http.post (this.url,json, {observe: 'response'})
.subscribe (
res => {
console.log(res);
console.log(res.status);
},
(err: any) => {
console.log('raw error =>', err);
}
);}
esta dando erro na parte {observe: 'response'}, por que?
Tenta no contructor(http:HttpClient)
Muito obrigado amigo. Deu certo.
Marca a resposta como certa! Valeu!
| 38,633
|
https://dba.stackexchange.com/questions/247238
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,019
|
Stack Exchange
|
ChadH, Rick James, https://dba.stackexchange.com/users/1876, https://dba.stackexchange.com/users/189396
|
English
|
Spoken
| 281
| 491
|
Backed up MySql folder… upgraded to newer version and cant seem to recover data
I copied the entire MySql folder mysql-8.0.13-macos10.14-x86_64 and installed a newer version mysql-8.0.17-macos10.14-x86_64.
I should have researched but thought the installer would handle moving the data over (I only backed up as a precaution).
After installing my older MySQL folder only has 'data' and 'keyring' and the new the obvious. My backed up folder seems to have everything the old MySQL did before the new install.
Is there a way to get the older data?
I've tried copying the data folder to the new install folder, data & keyring.
I'm on Mac. upgraded from MySQL 8.0.13 to 8.0.17
Old MySQL Directory:
/usr/local/mysql-8.0.13-macos10.14-x86_64/
Now after installing the update:
/usr/local/mysql-8.0.17-macos10.14-x86_64/
Within a major version (8.0), you should always be able to upgrade-in-place. But be sure to run mysql_upgrade. If you changed directories, that is another matter.
Hey, Rick. Thanks for the response. Not sure what you mean by changing directories. The installer installed in a directory with the mysql version number. Do you know if I can run mysql_upgrade after my situation?
Update your Question to show the old and new data directory paths. There is probably a way to do the install and point it to the old directory.
At this point, it is probably simplest to use mysqldump to dump the old data and load it into the new path.
I cant seem to run the old mysql binaries. the only files in the old mysql folder is the 'data' and 'keyring'
What is in those directores?
Just updated my question above.
@ChadH - Run du on each so we can see the tree structure under them.
| 29,064
|
https://als.wikipedia.org/wiki/Baisweil
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Baisweil
|
https://als.wikipedia.org/w/index.php?title=Baisweil&action=history
|
Alemannic
|
Spoken
| 128
| 359
|
Baisbl (amtlich Baisweil) isch a Gmoand im Landkrais Oschtallgai in Bayern.
Geografi
Baisbl leit nordweschtlich vo Kaufbeire am Wörthbach. Vo dr Gmarkung sin 55,5 % Landwirtschaftsfleche, 27,7 % Wald, 12,4 % Sidlungsfleche un 4,4 % sunschtige Fleche.
Gmoandsdail
Zua Baisbl gheret d Pfarrderfer Baisweil und Lauchdorf und dr Weiler Großried.
Gschicht
Baisbl isch zum erschte Mol gnennt worda im Johr 1130 als Beizwile.
Eiwohner
Dr Ausländeraadail isch 2011 bei 0,2 % gleage.
Religion
95,1 % vo dr Eiwohner sind im Johr 1987 remisch-katholisch gwesa, 3,5 % evangelisch.
Verwaltung
Baisbl hot mit dr Gmoanda Äggadal und Frieseried a Verwaltungsgmoaschaft vereibart. Dr Birgermaischter vo Baisbl isch dr Stefan Seitz.
Wahla
Ergebnis vo dr Landdagswahla seit 1986:
Dialekt
Dr Dialekt vo Baisbl ghert zum Oschtschwäbisch.
Weblink
www.baisweil.de
Fuaßnota
Ort (Landkrais Oschtallgai)
| 29,872
|
https://stackoverflow.com/questions/10351055
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,012
|
Stack Exchange
|
1atera1usz, Diane Grevler, Kaz, Luca Torchetti, Mars, Muhammad Farhan, N sbp, Svante, Tam Johnston, Yellaboina Nagendra Babu, https://stackoverflow.com/users/1250772, https://stackoverflow.com/users/1361067, https://stackoverflow.com/users/1455243, https://stackoverflow.com/users/23772078, https://stackoverflow.com/users/23772079, https://stackoverflow.com/users/23772080, https://stackoverflow.com/users/23773215, https://stackoverflow.com/users/23773427, https://stackoverflow.com/users/23774157, https://stackoverflow.com/users/23776292, https://stackoverflow.com/users/23780420, https://stackoverflow.com/users/31615, sam 99, Махаббат Толебаева
|
English
|
Spoken
| 683
| 1,083
|
How to print blank character in the Lisp format function?
I hope there's someone to help me with this, because I can't find any useful answer, and I'm new with Lisp.
What I'm trying to do is to test a value of one element and to print something if its 1, otherwise to print blank character.
This works when all of the list arguments have the value 1:
(defun print-lst (list)
(format t "~%~a ~a ~a~%"
(if (= (nth 0 list) '1)
'¦)
(if (= (nth 1 list) '1)
'P)
(if (= (nth 2 list) '1)
'¦)))
so the output is ¦ P ¦. But, if the second element in list is 0, it prints NIL on that place ¦ NIL ¦ and I want it to print a space instead ¦ ¦(not just to skip that character¦¦, it is important to there is a blank character in that position in output line if the tested value is not 1).
Is there any way to return a blank character if the condition (if (= (nth 1 list) '1) 'P) is not fulfilled or is there any other way to perform this?
I hope I explained that nicely. Thank you.
You can use (first list), (second list) and (third list) instead of nth. There is no need to quote atoms like 1 which evaluate to themselves already. Also, perhaps, don't use numeric equality unless you really need it! (= (third list) 1) is true not only if (third list) contains 1, but also if it contains the floating point value 1.0. Moreover, if if (third list) contains a non number, it blows up with an error condition. Is that what you want?
@Kaz:I am aware of all that. This is something just for a school project, it wont happen that the list arguments contain floating point or non numerical values, only integers 1 or 0.
If takes three arguments: condition, then-form, else-form; the else-form is optional. Besides, I would use literal character syntax for literal characters.
(if (= (nth 0 list) 1)
#\P
#\Space)
Documentation:
Special form if
Character syntax
Character names
Thanks, that helped. I was aware of a fact that if statement takes 3 arguments, I just didn't know how to make that space character, but looks like it was pretty easy (I'm newbie with Lisp).
If you want to make full use of the power of format, you can use a combination of format conditionals and format GOTO.
Like this:
[1]> (format nil "~@{~:[<nothing>~;~:*~A~]~^ ~}" 1 2 nil 4 nil 6)
"1 2 <nothing> 4 <nothing> 6"
In your case, this should work:
(format t "~&~@{~:[ ~;~:*~A~]~^ ~}"
...)
This works by doing the following:
~& inserts a newline unless we're already at the beginning of a line.
~@{...~} processes the arguments iteratively.
~:[...~;...~] chooses between the nil and non-nil case.
~:* unconsumes the argument that was consumed by ~:[...~].
~A outputs the item being processed.
~^ escapes from the loop on the last iteration (so as not to output an excessive space after the last item).
This is cool. :)
I use this function for the first time, and now I see it has plenty of options, it's very powerful. :)
Wow. Just what I was looking for. There's no way I would have figured that out on my own. Thanks.
Format is a beast waiting to devour the unwary.
That said, it looks like you may want to use some of its higher level directives here. Check out the Formatted Output section of the Lisp Hyperspec, and the format chapter of PCL (specifically, look at the section that deals with conditional formatting).
Useful links, I sure will check them out. Thank you.
Counter question:
Do you really need output values that are identifiers ('something) or would also string literals work ("something")?
If the first is true: I suppose it is not possible to use space as an identifier.
If the second is true: use "|", "P" and " " as output values
@BojanZdravkovic: By the way, you do not need to quote literal forms, as they evaluate to themselves.
| 18,128
|
https://stackoverflow.com/questions/73753109
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,022
|
Stack Exchange
|
James Foster, John Pfersich, Leandro Caniglia, https://stackoverflow.com/users/202969, https://stackoverflow.com/users/4081336, https://stackoverflow.com/users/5561176
|
English
|
Spoken
| 807
| 1,694
|
How does rounded function work in Smalltalk?
How do I round a decimal by thousandths(3 decimal places) in Smalltalk.
Code:
rounded
"Answer an Integer nearest to receiver"
^(self + (self sign * 0.5)) truncated
Caller:
cbPrintPercentageString
^AbtpercentageConverter new
primObjectToPrint: self
Callee:
primObjectToPrint: anInput
**^(super primObjectToPrint: anInput*100), '%'**
Input1:
anInput: 0.014545 (Datatype: Float)
Output: 1.455% (String returned by callee)
Explanation: 0.014545*100=1.4545, 1.4545 is rounded to 3 decimal places, which gives output 1.455%
Input2:
anInput: **0.018045** (DataType: float)
Output: **1.804%** (String)
Explanation: 0.018045*100=1.8045, when 1.8045 is rounded to 3 decimals, I'm expecting 1.805%, but UI displays 1.804%.
Please note that round(1.8045,3) and the like are not Smalltalk code. So these have no apparent relation with the rounded Smalltalk method at the top of your question.
Divide by 1000, round, then multiply by 1000?
What language are you writing in? Not any Smalltalk I recognize. And it might also help to specify which dialect you’re using.
Since you are dealing with floating point, be aware that the algorithm which will give you a correctly rounded result is not as trivial as one may think.
Also, depending on the Smalltalk dialect and its version, there is no guaranty that:
conversion from ASCII decimal to binary Float is correctly rounded
conversion from binary Float to ASCII decimal is correctly rounded
At least, in a recent Squeak or Pharo image the two operations above will be correctly rounded. All the explanation below is therefore built in Squeak 5.x or 6.x.
The first problem encountered is that the binary Float cannot represent exactly the two decimal quantities 0.014545 and 0.018045.
In Squeak, those two expressions are false:
(Fraction readFrom: '0.014545' readStream) isAnExactFloat.
(Fraction readFrom: '0.018045' readStream) isAnExactFloat.
In Squeak, those two inequalities are true, which may give a clue about the rounding direction used when rounding the decimal quantities to the nearest (representable) Float:
(Float readFrom: '0.014545' readStream) > (Fraction readFrom: '0.014545' readStream).
(Float readFrom: '0.018045' readStream) < (Fraction readFrom: '0.018045' readStream).
In Squeak, a Float print as the shortest decimal representation that would convert back to the same Float (round trip conversion), not the exact decimal value carried by the Float, so you cannot trust what you see.
The exact values are given by:
(0.014545 asTrueFraction printShowingMaxDecimalPlaces: Float precision - Float emin - 1)
-> '0.01454500000000000063671290462252727593295276165008544921875'
(0.018045 asTrueFraction printShowingMaxDecimalPlaces: Float precision - Float emin - 1)
-> '0.018044999999999998541166945642544305883347988128662109375'
Moreover, a multiplication by 100 may change the rounding... This is because the exact result may not necessarily be representable as a Float:
In Squeak, those two expressions evaluate to false:
((Float readFrom: '0.014545' readStream) asTrueFraction * 100) isAnExactFloat.
((Float readFrom: '0.018045' readStream) asTrueFraction * 100) isAnExactFloat.
This means that there will be another rounding to nearest representable Float. Luckily here, the multiplication did preserve the two inequalities that we introduced above:
(Float readFrom: '0.014545' readStream) * 100 > (Fraction readFrom: '1.4545' readStream).
(Float readFrom: '0.018045' readStream) * 100 < (Fraction readFrom: '1.8045' readStream).
But it's not necessarily the case:
((014545 to: 018045 by: 10) detect: [:x | (x/1000000) asFloat < (x/1000000) and: [(x/1000000) asFloat * 100 > (x/1000000 * 100)]])
-> 14575
You see that the multiplication by 100 changes the apparent rounding direction:
(Float readFrom: '0.014575') < (Fraction readFrom: '0.014575').
(Float readFrom: '0.014575') * 100 > (Fraction readFrom: '1.4575').
(0.014575 asTrueFraction printShowingMaxDecimalPlaces: Float precision - Float emin - 1)
-> '0.01457499999999999941435735451022992492653429508209228515625'
((0.014575*100) asTrueFraction printShowingMaxDecimalPlaces: Float precision - Float emin - 1)
-> '1.457500000000000017763568394002504646778106689453125'
So you cannot rely on a multiplication by 100 either...
Moreover, you did not tell how you rounded to 3 decimals...
The rounding operation shown in introduction is not exact either, there are tricky edge cases introduced by floating point.
For example we have:
0.5 predecessor < 0.5.
We thus expect 0.5 predecessor rounded = 0, which is fortunately true in Squeak.
But we have:
(0.5 predecessor + 0.5) truncated = 1.
Not (always) a correct implementation of rounded...
If your Smalltalk dialect provide some kind of decimal instead of Float (Squeak and Pharo have ScaledDecimal), I would advise to stick to those decimals.
For example you can write:
((0.014545s * 100) printShowingDecimalPlaces: 3) , '%'.
((0.018045s * 100) printShowingDecimalPlaces: 3) , '%'.
If you really want to implement the operation for Float, you can try to convert the Float to a Fraction as early as possible, so as to stick to exact arithmetic and not introduce additional rounding:
^(self asTrueFraction * 100 printShowingDecimalPlaces: 3) , '%'
In which case, you'll get '1.804%', which is fair...
Above implementation is not particularly fast, but it's simple enough.
And if you want something really tricky, you may try:
"re-interpret self printed representation as a Fraction.
This may alter the exact value and rounding"
^((Fraction readFromString: self printString) * 100 printShowingDecimalPlaces: 3) , '%'
In other dialects that may contain spurious inexactly rounded operations, implementing the algorithm correctly for Float might be hard!
| 43,212
|
l6sWdU6FWfM_1
|
Youtube-Commons
|
Open Web
|
CC-By
| null |
Mutant and curli-producing E. coli enhance the disease phenotype in a hSOD1-G93A mous... | RTCL.TV
|
None
|
English
|
Spoken
| 136
| 181
|
The gut microbiome has been found to be associated with a myotrophic lateral sclerosis, ALS. Gut microbes such as E. coli have been shown to cause changes in the gut microbiota composition, leading to increased levels of certain bacteria and decreased levels of others. This imbalance may lead to the development of ALS by altering the immune system and causing inflammation in the brain and spine. Additionally, E. coli produces proteins, which are functional bacterial amyloids. Long-term exposure to curli producing E. coli was found to accelerate the progression of ALS in mice. Furthermore, this study suggests that gut micro-mediated changes in the immune system and inflammatory processes in the brain and spine could be responsible for the development of ALS. This article was authored by Zimbal Keralawala, Joseph D. McMillan, Rika A. Singul and others..
| 29,197
|
https://stackoverflow.com/questions/23663517
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,014
|
Stack Exchange
|
Thomas Jungblut, https://stackoverflow.com/users/2516301, https://stackoverflow.com/users/540873, vefthym
|
English
|
Spoken
| 213
| 624
|
hadoop distributed file system wordcount example
public class WordCount {
public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> {
private final static IntWritable one = new IntWritable(1);
private Text word = new Text();
public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {
String line = value.toString();
StringTokenizer tokenizer = new StringTokenizer(line);
while (tokenizer.hasMoreTokens()) {
word.set(tokenizer.nextToken());
output.collect(word, one);
}
}
}
public static class Reduce extends MapReduceBase implements Reducer<Text, IntWritable, Text, IntWritable> {
public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {
int sum = 0;
while (values.hasNext()) {
sum += values.next().get();
}
output.collect(key, new IntWritable(sum));
}
}
public static void main(String[] args) throws Exception {
JobConf conf = new JobConf(WordCount.class);
conf.setJobName("wordcount");
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(IntWritable.class);
conf.setMapperClass(Map.class);
conf.setCombinerClass(Reduce.class);
conf.setReducerClass(Reduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.setInputPaths(conf, new Path(args[0]));
FileOutputFormat.setOutputPath(conf, new Path(args[1]));
JobClient.runJob(conf);
}
}
Error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at org.myorg.WordCount.main(WordCount.java:64)
i am noob in hadoop plz help me
Please grab a book about Java first, this isn't a Hadoop problem at all.
What command did you use to run this program...?
It means you haven't run your program with any commandline arguments, if you would check args.length you would see it is zero, so run the command with an input/ and an output/ specification..
| 3,145
|
https://pt.wikipedia.org/wiki/Combinado%20n%C3%B3rdico%20nos%20Jogos%20Ol%C3%ADmpicos%20de%20Inverno%20de%202022%20-%20Equipes
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Combinado nórdico nos Jogos Olímpicos de Inverno de 2022 - Equipes
|
https://pt.wikipedia.org/w/index.php?title=Combinado nórdico nos Jogos Olímpicos de Inverno de 2022 - Equipes&action=history
|
Portuguese
|
Spoken
| 62
| 135
|
A competição por equipes do combinado nórdico nos Jogos Olímpicos de Inverno de 2022 ocorreu em 17 de fevereiro no Centro Nórdico Kuyangshu e Centro de Biatlo, localizado em Zhangjiakou.
Medalhistas
Resultados
Salto de esqui
A competição de saltos define a ordem de largada das equipes no cross-country.
Cross-country
As equipes largaram de forma escalonada e cada atleta percorreu 10 quilômetros.
Equipes
| 7,459
|
https://sv.wikipedia.org/wiki/Oncothericles%20burtti
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Oncothericles burtti
|
https://sv.wikipedia.org/w/index.php?title=Oncothericles burtti&action=history
|
Swedish
|
Spoken
| 31
| 64
|
Oncothericles burtti är en insektsart som beskrevs av Marius Descamps 1977. Oncothericles burtti ingår i släktet Oncothericles och familjen Thericleidae. Inga underarter finns listade i Catalogue of Life.
Källor
Hopprätvingar
burtti
| 22,674
|
https://en.wikipedia.org/wiki/Zhuxi%20County
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Zhuxi County
|
https://en.wikipedia.org/w/index.php?title=Zhuxi County&action=history
|
English
|
Spoken
| 407
| 612
|
Zhuxi County () is a county in the northwest of Hubei province, People's Republic of China, bordering Shaanxi to the west and Chongqing to the southwest. It is under the administration of the prefecture-level city of Shiyan. The county spans an area of , and has a population of 315,259 as of 2010.
Toponymy
The name Zhuxi County is named for the Zhuxi River, whose name () was derived from the large amounts of bamboo forests which bordered both sides of the river.
History
The area of present-day Zhuxi County once belong to the Chu State. Part of the remains of the , which possibly date back to the 3rd century BCE.
Zhuxi County was established in 1476 under the reign of the Chenghua Emperor.
In 1914, it was placed under the jurisdiction of . In 1932, the Republic of China introduced , and the county was assigned to the 11th Administrative Inspectorate of Hubei Province. In 1936, it was re-assigned to the 8th Administrative Inspectorate of Hubei Province.
In 1949, under the People's Republic of China, Zhuxi County was assigned to , which was renamed to Yunyang Prefecture the following year.
The county was moved to in 1952, but was moved back to Yunyang Prefecture in 1965.
In 1994, Zhuxi County was placed under the prefecture-level city of Shiyan, where it remains today.
In 2010, was upgraded from a township to a town. In 2013, and were upgraded from townships to towns.
Geography
The county's geography is fairly mountainous, with its highest point reaching approximately in height. The county's main rivers are the Zhuxi River and the Huiwan River, which both flow into the larger Han River.
Climate
Zhuxi County experiences an average annual temperature of , and an average annual precipitation of .
Administrative divisions
Zhuxi County is divided into eleven towns, four townships, and eight other township-level divisions.
Its eleven towns are , , , , , , , , , , and .
Its four townships are , , , and .
Its other township level divisions are Longwaya Tea Farm (), Guoying Zhuxi Comprehensive Farm (), Stock Seed Farm (), Fishing Stock Farm (), Zhongxu Field (), Wangjiashan Tea Farm (), Biaohu Tree Farm (), and Shuangzhu Tree Farm ().
Economy
Zhuxi County has sizable deposits of coal, limestone, and marble. The county is also home to the most Taxus chinensis production of a county in China.
References
Counties of Hubei
Shiyan
| 9,001
|
https://tt.wikipedia.org/wiki/%D0%AF%D0%B7%D0%BE%D0%B2%D0%BD%D0%B8%D0%BA
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Язовник
|
https://tt.wikipedia.org/w/index.php?title=Язовник&action=history
|
Tatar
|
Spoken
| 173
| 562
|
Язовник () — Сербиянең Мачва округы җирлегендә () урнашкан торак пункт.
Географиясе
Балкан ярымутравының төньяк өлешендә, диңгез дәрәҗәсе өстеннән биеклектә урнашкан.
Климаты
Биредә кышлар кыска һәм карлы, җәйләр җылы. Иң салкын ай – гыйнвар, иң җылы ай – июль. Урта температура - 11 °C. Уртача еллык явым-төшем саны – 896 мм.
Демография
Искәрмәләр
Әдәбият
Никифоров К. В. Сербия на Балканах. XX век. — Москва: Индрик, 2012. — 176 с. — ISBN 978-5-91674-209-1.
Поспелов Е. М. Географические названия мира. Топонимический словарь / отв. ред. Р. А. Агеева. — 2-е изд., стереотип. — М.: Русские словари, Астрель, АСТ, 2002. — 512 с. — 3000 экз. — ISBN 5-17-001389-2.
Љубоја, Бранко. Организација власти у локалној самоуправи у Републици Србији. — Београд: Стална конференција градова и општина — Савез градова и општина Србије, 2013. — 57 с. — ISBN 978-86-88459-08-2.
Ђурић В., Танасковић Д., Вукмировић Д., Лађевић П. Етноконфесионални и језички мозаик Србије. — Београд: Републички завод за статистику, 2014. — 209 с. — ISBN 978-86-6161-126-1.
Мачва округы торак пунктлары
Сербия торак пунктлары
Әлифба буенча торак пунктлар
| 38,794
|
https://stackoverflow.com/questions/30524536
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,015
|
Stack Exchange
|
https://stackoverflow.com/users/2252830, pskink
|
English
|
Spoken
| 98
| 243
|
Android: define color using the hue, saturation and brightness
I want to calculate color value from the three SeekBar.
I have three seek bar as below:
1. Hue SeekBar (0-255)
2. Saturation SeekBar (0-255)
3. Brightness SeekBar (0-255)
These seek bar have minimum value as 0 and maximum value as 255.
Depending on the change in the seek bar, i want to Define and Calculate the value of the color, it will change as user change the progress bar.
How to archive this?
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/android/support/v7/graphics/ColorUtils.java
Try using java's Color.HSBtoRGB() method
EDIT
also android's color has a similar method:
http://developer.android.com/reference/android/graphics/Color.html#HSVToColor(float[])
| 22,057
|
https://de.wikipedia.org/wiki/Sandesh%20Shandilya
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Sandesh Shandilya
|
https://de.wikipedia.org/w/index.php?title=Sandesh Shandilya&action=history
|
German
|
Spoken
| 218
| 457
|
Sandesh Shandilya (* 8. April 1979 in Mumbai, Maharashtra) ist ein indischer Sänger, Musiker und Filmkomponist.
Karriere
Shandilya begann 2001, Filmmusik zu produzieren u. a. für In guten wie in schweren Tagen, Chameli, Uuf Kya Jadoo Mohabbat Hai und Socha Na Tha. Im gleichen Jahr gewann er mit seinem Musikalbum Piya Basanti den International Viewers’ Choice Award bei MTV Video Music Awards 2001.
Diskographie
Filmographie
2001: In guten wie in schweren Tagen – Regie: Karan Johar
2002: Agni Varsha – Regie: Arjun Sajnani
2003: Chameli – Regie: Ananat Balani, Suhdir Mishra
2004: Uff Kya Jadoo Mohabbat Hai – Regie: Manoj J. Bhatia
2005: Socha Na Tha – Regie: Imtiaz Ali
2006: Iqraar by Chance – Regie: K. Ravi Shankar
2007: Jab We Met – Als ich Dich traf – Regie: Imtiaz Ali
2008: Meerabai Not Out – Regie: Chandrakant Kulkarni
2009: Do Paise Ki Dhoop, Chaar Aane Ki Baarish – Regie: Deepti Naval
2010: Road to Sangam – Regie: Amit Rai
2011: Yamla Pagla Deewana – Regie: Samir Karnik
2012: Chaar Din Ki Chandni – Regie: Samir Karnik
2014: Kya Dilli Kya Lahore – Regie: Vijay Raaz
2015: Manjhi – The Mountain Man – Regie: Ketan Mehta
2016: Chalk n Duster – Regie: Jayant Gilatar
2017: Vodka Diaries – Regie: Kushal Srivastava
Weblinks
Filmkomponist
Inder
Geboren 1979
Mann
| 42,988
|
https://ceb.wikipedia.org/wiki/Mount%20Lindesay%20%28bukid%20sa%20Ostralya%2C%20State%20of%20New%20South%20Wales%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Mount Lindesay (bukid sa Ostralya, State of New South Wales)
|
https://ceb.wikipedia.org/w/index.php?title=Mount Lindesay (bukid sa Ostralya, State of New South Wales)&action=history
|
Cebuano
|
Spoken
| 224
| 355
|
Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Mount Lindesay.
Bukid ang Mount Lindesay sa Ostralya. Nahimutang ni sa rehiyon sa Gwydir ug estado sa State of New South Wales, sa sidlakang bahin sa nasod, km sa amihanan sa Canberra ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Mount Lindesay, o ka metros sa ibabaw sa naglibot nga tereyn. Mga ka kilometro ang gilapdon sa tiilan niini. Mount Lindesay mao ang bahin sa Nandewar Range.
Ang yuta palibot sa Mount Lindesay kasagaran kabungtoran, apan sa habagatan nga kini mao ang kabukiran. Kinahabogang dapit sa palibot ang Mount Kaputar, ka metros ni kahaboga ibabaw sa dagat, km sa habagatan sa Mount Lindesay. Kunhod pa sa 2 ka tawo kada kilometro kwadrado sa palibot sa Mount Lindesay.. Sa rehiyon palibot sa Mount Lindesay, kabukiran talagsaon komon.
Hapit nalukop sa lasang ang palibot sa Mount Lindesay. Ang klima umogon ug subtropikal. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Enero, sa °C, ug ang kinabugnawan Hulyo, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Enero, sa milimetro nga ulan, ug ang kinaugahan Oktubre, sa milimetro.
Saysay
Ang mga gi basihan niini
Nandewar Range
Kabukiran sa State of New South Wales
Kabukiran sa Ostralya nga mas taas kay sa 1000 metros ibabaw sa dagat nga lebel
| 49,093
|
https://ha.wikipedia.org/wiki/Ambaliya%20da%20Wal%C6%99iyar%20Dronka%20ta%201994
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Ambaliya da Walƙiyar Dronka ta 1994
|
https://ha.wikipedia.org/w/index.php?title=Ambaliya da Walƙiyar Dronka ta 1994&action=history
|
Hausa
|
Spoken
| 510
| 1,143
|
A ranar 2 ga watan Nuwamban shekarar 1994 ne wata walƙiya ta ƙona tankunan man dizal guda uku na rundunar sojojin ƙasar Masar a kusa da ƙauyen Dronka na lardin Asyut na ƙasar Masar . Walƙiyar wani ɓangare ne na wata mummunar guguwa da ta haifar da ambaliyar ruwa da kuma ɓarna mai yawa a wasu larduna huɗu na ƙasar Masar ta sama da ta yi sanadiyar mutuwar ɗaruruwan mutane sannan dubban mutane suka rasa matsugunai a ɗaya daga cikin bala'o'i mafi muni a biranen ƙasar Masar . Ambaliyar da ta yi ƙamari da walkiya ta sa man fetur ya yoyo daga tankunan ruwa kuma ya shiga ƙauye. Sama da gidaje 200 ne suka lalace sannan mutane 469 suka mutu.
Ambaliyar ruwa da yajin aiki
A ranar 2 ga watan Nuwambar 1994, tsawa ta sa'o'i biyar ta haifar da ambaliya da ta shafi ƙauyuka 124 a cikin larduna huɗu na Asyut, Sohag, Qena da Luxor .
Kusa da ƙauyen Dronka, Asyut, ambaliyar wani kwarin hamada ta Yamma ya zo daidai da wata walƙiya da ta faɗo mai tsawon girma a kusa da Dronka, wanda ke kusa da haɗaɗɗen tankunan mai guda takwas wanda Babban Kamfanin Man Fetur na Masar ke kula da shi a matsayin babban tanadi ga Sojojin ƙasar Masar. An yi tazarar tankunan a kusa da ban da uku daga cikinsu wuta. Kimanin tan na mai da ya kwarara daga tankunan; babu wata katanga ko wani katanga na biyu da zai ɗauke man, wanda ya gauraye da ambaliya da wani layin dogo da ke kusa ya hana shi. Layin ya ruguje, kuma ruwan da mai da wuta ya wanke cikin Dronka, ƙauyen mutane 10,000.
Illoli
Rahotannin da aka samu daga ambaliya a ƙananan hukumomin huɗu sun nuna cewa kusan mutane 600 ne suka mutu, sannan gidaje 11,148 suka lalace sannan wasu 11,085 suka lalace, lamarin da ya sa mutane 110,660 suka rasa gidajensu. 23,531 feddans (Kimanin 12,000 HA) na ƙasar noma sun lalace, kuma duka lalacewa ya wuce dala miliyan 140.
Wani rahoton ma'aikatar lafiya da yawan jama'a ta ƙasar Masar ya bayyana cewa an gano gawarwakin mutane 469 daga ƙauyen Dronka kaɗai, kuma hukumar kula da yanayi ta duniya (WMO) ta ɗauki wannan adadi a matsayin adadin wadanda suka mutu. Fiye da gidaje 200 a Dronka sun lalace kuma mazauna ƙauyen da kewaye 20,000 sun gudu zuwa Assiut. Ɗaya daga cikin tankunan ya ci gaba da cin wuta har cikin dare yayin da masu kashe gobara suka yanke shawarar cewa ya fi kyau a bar ta ta ƙone; akwai fargabar ƙona wasu tankunan mai biyar da suka tsira. Gwamnan Assiut ta kafa dokar ta-ɓaci sakamakon guguwa da walkiya.
Hukumar ta WMO ta danganta adadin mutuwar mutane 469 da yamutsin walƙiya kuma ta lura da cewa bala'in shi ne mafi girma daga adadin mace-mace sakamakon walƙiyar walƙiya da aka yi rikodi (daga 1873). Mafi yawan adadin waɗanda suka mutu kai tsaye sakamakon wata tsawa ɗaya ta haifar shi ne mutane 21 da suka mutu yayin da suke fakewa a wata bukka a ƙasar Zimbabwe a shekarar 1975.
Manazarta
| 45,386
|
https://lt.wikipedia.org/wiki/Vinetu%20%28filmas%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Vinetu (filmas)
|
https://lt.wikipedia.org/w/index.php?title=Vinetu (filmas)&action=history
|
Lithuanian
|
Spoken
| 273
| 751
|
Vinetu () – 1963 m. sukurtas vesternas pagal vokiečių rašytojo Karlo Majaus trilogijos apie apačių vadą Vinetu pirmąją dalį. Filmas taip pat žinomas kaip Apačių auksas.
Pagrindiniai aktoriai
Aktorius – vaidmuo
Lex Barker – Čarlis / Old Šeterhendas
Pierre Brice – Vinetu
Mario Adorf – Frederikas Santeris
Marie Versini – Nčo-či, Vinetu sesuo
Mavid Popovic – Inču-čuna, Vinetu tėvas
Hrvoje Svob – Kleki-petra
Gojko Mitic
Turinys
Laukiniuose Vakaruose tiesiamas geležinkelis, kurio darbams vadovauja Frederikas Santeris. Norėdamas pasipelnyti, jis imasi tiesti bėgius per apačių žemes, taip trumpindamas kelią. Atvykęs patikrinti darbus geodezininkas Čarlis (Old Šeterhendas) netrunka išsiaiškinti tiesą ir, padedamas naujojo draugo Semo Haukinso, pareikalauja nutraukti darbus, kol nekilo karas su indėnais.
Netrukus stovykloje pasirodo ir apačių vado Inču-čunos sūnus Vinetu su savo mokytoju Kleki-petra. Old Šeterhendas pažada per 10 dienų pasišalinti iš apačių žemių, tačiau pasirodę Santerio vyrai su jiems padedančiais kiovų genties indėnais nužudo Kleki-petrą, o Vinetu paima į nelaisvę. Old Šeterhendas padeda jam pabėgti ir netrukus apačiai užpuola stovyklą. Old Šeterhendas su draugais patenka į nelaisvę, tačiu sugeba išlaikyti jam skirtą išbandymą ir tampa kraujo broliais su Vinetu. Šio sesuo Nčo-či jį įsimyli ir ketina vykti į Sent Luisą, kur galėtų mokytis ir taptų Old Šeterhendo žmona. Inču-čuna su Nčo-Či ir Vinetu vyksta į kalnus, kad paimtų ten slepiamo aukso, tačiau po užpuolimo likęs gyvas Santeris seka juos ir užpuola. Old Šeterhendas ir Semas Haukinsas skuba į pagalbą, tačiau pavėluoja ir Inču-čuna su Nčo-či žūna, o Vinetu tampa apačių vadu.
Apdovanojimai
„Golden Screen“ apdovanojimas (1964 m.)
„Bambi Awards“ – Geriausias užsienio aktorius (Pierre Brice) (2 vieta) (1964 m.)
1963 filmai
Italijos filmai
Jugoslavijos filmai
Vakarų Vokietijos filmai
Vesternai
Filmai apie indėnus
| 22,747
|
https://stackoverflow.com/questions/24651785
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,014
|
Stack Exchange
|
Barmar, Jens, Jothi Kannan, Sadikhasan, VMai, https://stackoverflow.com/users/1491895, https://stackoverflow.com/users/2053516, https://stackoverflow.com/users/2893413, https://stackoverflow.com/users/3501730, https://stackoverflow.com/users/3636601
|
English
|
Spoken
| 420
| 770
|
MySQL check whether current date time is between 2 fields date and time
In MySQL how we can check the current date and time is between the 2 fields which are stored with the start date time and end date time, i have tried like below, but it doesn't return any record and the code is below
SELECT *
FROM tbl_user_rig_rentals
WHERE (NOW( ) BETWEEN amount_paid_date AND mining_end_date)
where amount_paid_date is 2014-07-09 12:53:26 and mining_end_date is 2014-07-09 03:30:26
What is return by SELECT NOW( ) put in question.
Are both fields date fields?
@VMai Show the correction in an answer.
I think 2014-07-09 16:26:43 equvivalent 2014-07-09 04:26:43 so does not satisfied condition
Yes both are datetime
ok in case the mining_end_date is greater than current time,?? if we check with the greater than current time also not working
now amount_paid_date is 2014-07-09 16:53:26 and mining_end_date is 2014-07-09 20:30:26, the query doesn't make any sense
@JothiKannan add for debugging the current time to your statement, i.e. SELECT NOW() as mytime, * FROM tbl_user_rig_rentals WHERE (NOW( ) BETWEEN amount_paid_date AND mining_end_date);
I think you check you will check morning time with evening time where
amount_paid_date is 2014-07-09 12:53:26 <-- This is morning time
and
mining_end_date is 2014-07-09 16:40:26 <-- Change here and check it with evening time
SELECT *
FROM tbl_user_rig_rentals
WHERE (NOW( ) BETWEEN amount_paid_date AND mining_end_date)
@JothiKannan change mining_end_date value as i mentioned temporary and check what happen?
now it is working so the problem is about the morning time and evening time, how can can achieve the result the time is however ??
Now what you want to do just tell me?
i want to check whether the current datetime is between those fields datetime
@JothiKannan I think you better ask a new question with an exact explanation of your problem. You said in an answer to Jens, that you use both columns use the DATETIME datatype. Values in this column are indepedent of the representation. One problem could be that your insert into those columns is not right.
Yes @VMai is right jothiKannan ask as new question with proper explaination
You get no results because the lower limit
amount_paid_date (2014-07-09 12:53:26)
is greater than the upper limit
mining_end_date (2014-07-09 03:30:26)
There's no value that can satisfy this condition.
BETWEEN isn't as smart as its name makes it sound, unfortunately.
a BETWEEN b AND c means this:
a >= b AND a <= c
Unless c is greater than or equal to b, BETWEEN can never come up true.
| 10,659
|
https://id.wikipedia.org/wiki/Negara%20Batin%2C%20Jabung%2C%20Lampung%20Timur
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Negara Batin, Jabung, Lampung Timur
|
https://id.wikipedia.org/w/index.php?title=Negara Batin, Jabung, Lampung Timur&action=history
|
Indonesian
|
Spoken
| 177
| 400
|
Negara Batin adalah sebuah desa yang berada di wilayah Kecamatan Jabung, Kabupaten Lampung Timur, Provinsi Lampung, Indonesia.
Desa ini terletak tepat disebelah barat desa Jabung. Masyarakat yang tinggal kebanyakan adalah suku lampung, kemudian ada juga suku lain yang menempati daerah ini, diantaranya suku Bali, Jawa & Sunda. Mata pencaharian masyarakat setempat adalah sebagai petani & karyawan/buruh disebuah perusahaan ternak sapi potong.
Bentuk permukaan tanahnya cukup unik untuk wilayah bagian barat, karena tanahnya yang hitam textur dan didominasi oleh batu keriting yang terhampar luas. Jenis batu yang ada di desa ini pun sulit ditemui di daerah lain.
Akses untuk mencapai desa ini adalah dengan menggunakan mobil atau motor, hanya saja jalannya rusak parah dan kurang mendapat perhatian dari pemerintah.
memang isu yang berkembang di masyarakat luas adalah bahwa desa ini adalah kawasan hitam, karena tingkat kriminalitas yang terbilang tinggi. hal tersebut terjadi karena di jalan bagian barat (menuju desa bungkuk) dan bagian selatan (menuju desa/kkecamatan Jabung) adalah wilayah perkebunan & sepi penduduk ditambah lagi kondisi jalan aspal yang sudah berlubang, jadi hal ini dimanfaatkan oleh para pelaku kriminal.
| 45,796
|
https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D1%80%D0%B0%2C%20%D0%AD%D1%80%D0%B4%D0%B6%D0%B0%D0%BD
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Кара, Эрджан
|
https://ru.wikipedia.org/w/index.php?title=Кара, Эрджан&action=history
|
Russian
|
Spoken
| 662
| 1,823
|
Эрджа́н Кара́ (; , Вена) — австрийский футболист, центральный нападающий клуба «Самсунспор» и сборной Австрии.
Карьера
Клубная карьера
Кара прошёл через молодёжную систему клуба «Слован-Хюттельдорфер». Дебютировал за первую команду «Слована» в Венской городской лиге, четвёртом дивизионе, в возрасте 15 лет 13 ноября 2011 года в матча против «Нуссдорфера», выйдя на замену на 60-й минуте вместо Бурака Озбека. В своём дебютном сезоне 2011/12 провёл десять матчей в чемпионате и ещё один — в Кубке Вены, но ни разу не забил. Свой первый гол в составе «Слована» забил 25 мая 2013 года в матче против «Поста», отличившись единственный раз в 28 матчах сезона 2012/13. В сезоне 2013/14 забил 32 гола в 27 матчах Оберлиги, пятого дивизиона.
Летом 2014 года Кара перешёл в «Аустрию Вена II», любительский состав «Аустрии Вена», выступавший в Региональной лиге «Восток». За «Аустрию Вена II» дебютировал 14 августа 2014 года в матче против «Нойберга», выйдя на замену на 86-й минуте вместо Марко Квашины. Свой первый гол за «Аустрию Вена II» забил 10 апреля 2015 года в матче против «Амштеттена». Всего в сезоне 2014/15 провёл 16 матчей, забив один гол. В сезоне 2015/16 сыграл четыре матча, не забил ни разу.
Летом 2016 года Кара вернулся в Венскую городскую лигу, перейдя в клуб «Карабах». Сезон 2016/17 закончил в качестве лучшего бомбардира Венской городской лиги, забив 35 голов в 30 матчах, и благодаря чему «Карабах» выиграл титул чемпиона городской лиги и вышел в Региональную лигу «Восток». В сезоне 2017/18 сыграл 29 матчей и забил 26 голов, став лучшим бомбардиром Региональной лиги «Восток». В сезоне 2018/19 за клуб, переименованный в «Мауэрверк», провёл 28 матчей и забил 22 гола, став лучшим бомбардиром в третий раз подряд.
10 июля 2019 года Кара подписал контракт с клубом Второй лиги «Хорн». Дебютировал в составе «Хорна» 20 июля 2019 года в матче первого раунда Кубка Австрии 2019/20 против «Трайскирхена», забив дважды. Во Второй лиге дебютировал 26 июля 2019 года в матче стартового тура сезона 2019/20 против «Аустрии Вена II», забив ещё два гола. Всего за «Хорн» во Второй лиге сыграл 16 матчей и забил 13 голов.
27 января 2020 года Кара перешёл в клуб Бундеслиги «Рапид Вена», подписав контракт до лета 2022 года. Дебютировал в Бундеслиге 23 февраля 2020 года в матче против «Хартберга», забив гол, сравнявший счёт, в компенсированное время после выхода на замену на 81-й минуте вместо Кристофа Кнасмюлльнера. Всего во второй половине сезона 2019/20 забил три гола в девяти матчах. В сезоне 2020/21 принял участие во всех 32 матчах и забил 15 голов, став четвёртым лучшим бомбардиром лиги и лучшим бомбардиром своей команды. К зимнему перерыву сезона 2021/22 забил девять голов в 17 матчах.
27 января 2022 года Кара перешёл в клуб MLS «Орландо Сити», подписав трёхлетний контракт по правилу назначенного игрока до конца сезона 2024 с опциями продления на сезоны 2025 и 2026. В североамериканской лиге дебютировал 27 февраля 2022 года в матче стартового тура сезона 2022 против «Клёб де Фут Монреаль», заменив на 69-й минуте Бенджи Мишеля. 9 апреля 2022 года в матче против «Чикаго Файр» забил свой первый гол в MLS.
2 сентября 2023 года Кара перешёл в клуб турецкой Суперлиги «Самсунспор», подписав трёхлетний контракт.
Международная карьера
Родившийся в Австрии, Кара имеет турецкое происхождение и также имел право представлять Турцию на международном уровне. В январе 2021 года Кара заявил на пресс-конференции, что, хотя он знал, что Турция следит за ним, и хотел бы рассмотреть возможность выступления за эту страну, с ним связывались только австрийские официальные лица. В марте 2021 года Франко Фода впервые вызвал Кару в сборную Австрии. Он дебютировал в сборной 31 марта 2021 года, выйдя на замену на 74-й минуте вместо Ксавера Шлагера в отборочном матче чемпионата мира 2022 против Дании. В апреле 2021 года тренер сборной Турции Шенол Гюнеш признался, что упустил национальный дебют Кары, так как не смог поехать в Австрию, чтобы лично посмотреть на него, из-за пандемии COVID-19.
Достижения
«Орландо Сити»
Обладатель Открытого кубка США: 2022
Примечания
Ссылки
Футболисты Австрии
Игроки сборной Австрии по футболу
Игроки ФК «Мауэрверк»
Игроки ФК «Хорн»
Игроки ФК «Рапид» Вена
Игроки ФК «Орландо Сити»
| 40,215
|
https://fr.wikipedia.org/wiki/Grotte%20d%27Orda
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Grotte d'Orda
|
https://fr.wikipedia.org/w/index.php?title=Grotte d'Orda&action=history
|
French
|
Spoken
| 371
| 627
|
La grotte d'Orda (en ) est une grotte située près d'Orda dans le kraï de Perm en Russie.
Cette grotte de gypse de l'Oural est longue d'environ dont 4,8 kilomètres sous l'eau. Cela en fait une des plus grandes et longues grottes souterraines immergées de gypse connue au monde, et même la plus longue de Russie. De plus, la partie noyée de cette caverne est dotée du plus grand siphon, reconnue par la Communauté des États indépendants pour une longueur de 935 mètres.
Géographie et contexte géologique
La grotte d'Orda (Ordinskaya en russe) est située à 130 km au sud-est de la ville de Perm, à la périphérie du village éponyme. Son entrée se trouve dans la montagne de Kazakovskaya, dans le Kraï de Perm.
Description du lieu
Cette caverne possède un large panel de lacs souterrains, qui servent de boyau extérieur aux parties inondées. Elle est aussi dotée de nombreux minéraux tels que le calcaire qui fait d'elle un souterrain que l'on peut caractériser de karstique. La température ambiante est d'environ -40 °C en surface, -23 °C sous terre et 5 °C sous l'eau, et les excursions sous-marines ne sont donc conseillées qu'aux plongeurs expérimentés.
Historique (histoire et découverte)
La grotte d'Orda étant découverte en 1969, elle aurait été visitée la première fois par le spéléologue russe Andrey Samovolnikov. Ce fut depuis cette année-là qu'une étude topographique de la partie inondée avait été clairement établie.
En outre, une exposition sur la grotte d'Orda a été inaugurée le au musée historique du village.
Autre
Cette cavité a fait naître une légende toute particulière : le mythe de la Dame de la grotte. Ce dernier raconte qu'un esprit, qui incarnerait la beauté, surveillerait les plongeurs qui s'introduiraient dans la grotte connue pour être son repaire, et les autoriserait à passer à condition qu'ils n'aient pas de mauvaises intentions visant la grotte.
De plus, ladite Dame est interprétée par Natalia Avseenko ancienne championne de plongée. Elle s'est portée volontaire pour la modélisation d'un projet de tournage en 2011. Elle fut photographiée par le russe Viktor Lyagushkin à une profondeur de 17 mètres dans la partie inondée.
Voir aussi
Page wikipedia de : Natalia Avseenko.
Notes et références
Grotte en Russie
Kraï de Perm
| 25,914
|
https://zh.wikipedia.org/wiki/%E7%89%9B%E8%8E%8A%E4%BC%8D%E6%B0%8F%E8%9E%BA
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
牛莊伍氏螺
|
https://zh.wikipedia.org/w/index.php?title=牛莊伍氏螺&action=history
|
Chinese
|
Spoken
| 4
| 88
|
牛莊伍氏螺(學名:)是
伍氏螺屬(學名:)目前的唯一物種 。舊屬觿螺科,今屬盖螺科擬釘螺亞科之下的Pachydrobiini族。
參考文獻
| 28,552
|
https://ja.wikipedia.org/wiki/%E6%A0%B8%E5%8C%96%E5%AD%A6
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
核化学
|
https://ja.wikipedia.org/w/index.php?title=核化学&action=history
|
Japanese
|
Spoken
| 12
| 613
|
核化学(かくかがく、英語:nuclear chemistry)は原子核の改変を扱う化学の分野。原義は原子核反応で生成する人工放射性元素に関する無機化学である。核物理学と密接に関連する分野であって、研究領域を厳密に区分することは困難であり、時代や地域によりその内容は必ずしも一定していない。具体的には、発足当時はプルトニウムのようにトン単位で生成する核種が学問の中心にあったが、近年発見される新規人工放射性元素は半減期がmsec以下であり、且つ1つ2つと数えるほどしか生成しないため、原子核物理学、あるいは放射化学のことを指している場合が多い。
研究内容
原子核に対して、中性子を吸収させるか、他の核種を核融合させると別の核種に転換される。前者は電荷を持たないので比較的容易に核に吸収させることが可能であるが、後者は電荷の障壁を越えるためにエネルギーが必要な一方、余剰なエネルギーは核を不安定化させて、更なる核分裂の要因となるので、精密な入射エネルギーのコントロールが必要である。
転換された核種が陽子過剰あるいは中性子過剰が進むと不安定核となりアルファ崩壊、ベータ崩壊や核分裂を引き起こす。一方、核子数の魔法数(マジックナンバー)が知られており、特定の数の場合ではエネルギー準位の閉殻構造をとるので原子核が安定化すると考えられている。
参考文献
関連項目
原子核物理学
放射化学
外部リンク
原子核物理学
化学の分野
| 22,133
|
https://en.wikipedia.org/wiki/Monoclonal%20B-cell%20lymphocytosis
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Monoclonal B-cell lymphocytosis
|
https://en.wikipedia.org/w/index.php?title=Monoclonal B-cell lymphocytosis&action=history
|
English
|
Spoken
| 3,152
| 5,064
|
Monoclonal B-cell lymphocytosis (MBL) is an asymptomatic condition in which individuals have increased blood levels of particular subtypes of monoclonal lymphocytes (i.e. an aberrant and potentially malignant group of lymphocytes produced by a single ancestral cell). This increase must persist for at least 3 months. The lymphocyte subtypes are B-cells that share certain features with the abnormal clones of lymphocytes that circulate in chronic lymphocytic leukemia/small lymphocyte lymphoma (CLL/SLL) or, less frequently, other types of B-cell malignancies. Some individuals with these circulating B-cells develop CLL/SLL or the lymphoma types indicated by their circulating monoclonal B-cells. Hence, MBL is a premalignant disorder
In 2017, the World Health Organization (WHO) reclassified MBL as a distinct entity in which individuals have: 1) an excessive number of circulating monoclonal B-cells; 2) lack evidence of lymphadenopathy, organomegaly, or other tissue involvements caused by these cells; 3) no features of any other B cell lymphoproliferative disease such as one of the B-cell lymphomas; and 4) evidence that these cells have either a CLL/SLL, atypical CLL/SLL, or non-CLL/SLL phenotype based on these cells' expression of certain marker proteins. A fourth MBL phenotype, monoclonal B-cell lymphocytosis-marginal zone (i.e. MBL-MZ) appears to be emerging as a distinct form of non-CLL/SLL MBL.
MBL consist of two groups: low-count MBL has blood B-cell counts <0.5x9 cells/liter (i.e. 0.5x9/L) whereas high-count MBL has blood B-cell counts ≥0.5x9/L but <5x109/L. While low-count MBL does not progress to a malignant disease, high-count MBL does so at a rate of 1-2% per year. MLP-MZ is an exception to this rule in that it s usually associated with B-cell counts >3x109/L and all cases, regardless of B cell counts, have a somewhat higher risk of progressing to a malignant stage.
The incidence of all MBL phenotypes increases with age and is strikingly high in the elderly. Below age 40, MBL's incidence is <1% of the general population in most countries but above this age it is found in ~10% of all individuals. The disorder's incidence in individuals >90 may be as high as 75%. Age along with B-cell blood counts, MBL phenotype, and certain genomic abnormalities in the monoclonal B cells are critical considerations in evaluating the clinical implications of MBL and its need for management.
MBL phenotypes
MBL falls into three phenotypes that are distinguished based on the cell surface marker proteins which they express viz., the CLL/SLL, atypical CLL/SLL, and non-CLL/SLL phenotypes. These markers are: CD5, CD19, CD20, CD23, and immunoglobulins (Ig) (either Ig light chains or complete Ig, i.e. light chains bound to Ig heavy chains. Distinguishing between these phenotypes is important because they progress to different lymphocyte malignancies. The following table gives the markers for the three MBL phenotypes with (+) indicating the expression (either dim, moderate, or bright depending or the intensity of their expression), (−) indicating the absence of expression, and na indicating not applicable as determined using fluorescent probes that bind the marker proteins. Detection of fluorescent probe binding by the cells requires the use of flow cytometry preferably employing 6 to 8 different fluorescent probes that bind to different markers on 5 million cells from the patient's blood. The table also includes the percentage of MLB cases with the phenotype and the malignancies to which they progress.
Monoclonal B-cell lymphocytosis of the marginal zone
Cases of non-CLL/SLL MBL in which the monoclonal B cells do not express CD5, CD23, CD10, or CD103 but strongly express CD79B and light chain Ig have been tentatively designated as having monoclonal B-cell lymphocytosis of the marginal zone (i.e. CBL-MZ). This term is used because normal marginal zone B-cell lymphocytes express these markers. Individuals with CBL-MZ commonly present with: B-cell blood counts that are extremely high (>4.0x109; range 3.0x109/L to 37.1x109/L);, represent a large percentage of cases that would otherwise be designated as non-CLL/SLL MLB; often have an IgM monoclonal gammopathy, i.e. high blood levels of a monoclonal IgM antibody; and in addition to the IgM gammopathy, other features that are seen in Waldenström's macroglobulinemia and IgM monoclonal gammopathy of undetermined significance. These individuals are more likely than those with other types of MBL to have their disorder progress to a malignancy. These malignancies appear to have been primarily marginal zone B-cell lymphomas of the splenic marginal zone B-cell, splenic lymphoma/leukemia unclassifiable, hairy cell leukemia, and possibly Waldenström's macroglobulinemia. MBL-MZ requires further studies to evaluate its frequencies, rate of progression to malignancy, and treatment.
Pathophysiology
Genome abnormalities
Most studies on the genomic abnormalities in MBL did not distinguish between the disorder's phenotypes. However, familial studies have found that hereditary factors can contributor to the development of specifically CLL/SLL MLB. Of all the hematologic malignancies, CLL/SLL is the most likely to afflict multiple family members with estimates of familial CLL/SLL ranging from 6 to 10% of all CLL/SLL cases. About 18% of first-degree relatives of individuals with familial CLL/SLL and ~16% of the close relatives of patients with non-hereditary CLL/SLL have CLL/SLL MBL. These associations strongly suggest that inheritable genomic abnormalities contribute to the development of CLL/SLL MLB and, possibly, the progression of this disorder to CLL/SLL.
Chromosome abnormalities, single nucleotide polymorphisms (SNPs, i.e. substitutions of a single nucleotide in a DNA sequence at a specific position in the genome) and gene mutations, while each occurs in <15% of cases, are present in CLL/SLL MBL and to some extent are similar to those found in CLL/SLL. For example, position 21.33 to 22.2 on the long (i.e. "q" ) arm of chromosome 13 is a potential susceptibility locus for familial CLL/SLL. This locus has been identified not only in individuals with familial CLL/SLL but also in their blood relatives who have CLL/SLL MBL. More than 20 SNPs are confirmed risk factors for the development of CLL/SLL; at least 6 of these are also risk factors for CLL/SLL MBL. Finally, the following studies were done on individuals defined as having MBL but din not give its phenotype. Here, these patients are presumed to have the CLL/SLL MBL phenotype. Individuals with low-count and high-count MBL shared with CLL/SLL patients many genomic abnormalities including: deletions of the long arm (i.e. "q" arm) of chromosomes 11 and 13; deletion of the short arm (i.e. "p" arm) of chromosome 17; trisomy of chromosome 12; and mutations in NOTCH1, BIRC3, SF3B1, MYD88, ATM, and TP53 genes. In general, the presence and frequency of the mutations in high count MBL were closer than the low count MLB in resembling those in CLL/SLL. All three groups had mutations in the IGH@ region of chromosome 14. This region contains the complex gene that encodes the VDJ region of the heavy chain component of antibodies. Among these mutations, IVGH4-59/61 is most often mutated in low-count MBL while IGHV1-69, IGH2-5, IGHV3-23, IGH23-33, IGHV3-48, and IGHV4-34 are most often mutated in high-count MBL and CLL/SLL. Finally, genetic abnormalities such as the deletion of the q arm in chromosome 13 found in low count MBL are more commonly associated with a favorable prognosis in CLL/SLL while those found in high count MBL, e.g. deletions in the q arm of chromosome 11 or p arm of chromosome 17 are commonly associated with unfavorable prognoses in CLL/SLL.
Individuals with MBL-MZ have monoclonal B cell cells that bear complex and distinctive genomic abnormalities, such as deletions and translocations involving chromosome 7, presence of an isochromosome 17, and, rarely, mutations in the NOTCH2 and KLF2 genes. Some of these genomic abnormalities are similar to those found in splenic marginal zone lymphomas and some of the MBL-MZ patients that bore these abnormalities developed this lymphoma. The genetic abnormalities in atypical and non-CLL/SLL MBL have not been well-defined.
The cited studies suggest that there is a step-wise accumulation of genomic abnormalities that lead to CLL/SLL MBL and MBL-MZ and then to overt malignancy. It presumed that similar accumulations led to the development of atypical and non-Cll/SLL MLB and than to their respective malignancies. However, given the number and diversity of these abnormalities, it is unclear which are critical determinants of these disorders. A recent model based on laboratory studies of normal CD19+ B cell, monoclonal CLL/SLL MBL cells, and CLL/SLL malignant cells found that their accumulation of genomic abnormalities may be caused by progressively increasing: 1) double strand breaks in DNA, 2) activation of non-homologous end joining error-prone DNA repair mechanisms, and 3) consequential accumulation of genomic abnormalities which promote the clonal development, survival, proliferation, and ultimately malignancy of the involved B cells.
Infectious diseases
Studies have identified MBL in ~30% of patients infected with the hepatitis C virus, found increased risks of CLL/SLL-MLB in patients with pneumonia, and decreased risk of CLL/CSS MBL in patients who have been vaccinated for influenza or pneumonia. Herpes Zoster and various upper respiratory tract infections are also considered to be risk factors for developing CLL/SLL MBL. It seems possible that the pathogens involved in these diseases provide antigens that stimulate the development of MBL although further studies are required to explore this hypothesis further.
Blood transfusion
One study diagnosed MBL in 0.14% of blood donors and suggested a possibility that MBL is transmitted through blood transfusions. This concern as well as the concern of transmitting CLL/SLL in transfusions of blood from patients with CLL/SLL has been voiced elsewhere. However, a study conducted in Sweden and Denmark on 7,413 recipients of blood from 796 donors diagnosed with CLL/SLL found no evidence of CLL/SLL clustering among recipients of blood from these donors. It therefore appears that CLL/SLL and, by implication, CLL/SLL MBL have little or no ability to be transmitted by blood transfusions, at least when the donors and recipients are unrelated.
Bone marrow transplantation
Rare cases of MBL have been reported to develop in individuals who receive a, autologous stem cell bone marrow transplant from donors who have MBL. Currently, the risk of this development is unclear and requires further study. In those special cases where related donors are used for transplantation, it may be useful to screen these donors for MBL.
Diagnosis
Blood B-cell counts
Individuals with MBL usually present with unexplained increases in blood lymphocyte counts (i.e. lymphocytosis). The most common causes for lymphocytosis are viral infections, autoimmune diseases (particularly connective tissue diseases), hypersensitivity reactions, acute stress reactions, and prior splenectomy. Unlike many individuals with lymphocytosis due to the latter disorders, individuals with MBL are asymptomatic, may have a family history of CLL/SLL, are usually >40 years old, and may have a history of serious infections (high-count MBL is ~3-fold more likely than age-matched healthy controls to have a history of serious infections and infection-related hospitalizations). The diagnosis of MBL in these patients depends on finding 0.5-5x109 monoclonal B cells that express the makers characteristic of CLL/SLL MLB, atypical CLL/SLL MLB, non-CLL/SLL MLB, or MLB-MZ. However, individuals with CBL-MZ commonly present with B-cell blood counts that are extremely high (>4.0x109; range 3.0x109/L to 37.1x109/L); and may have an IgM monoclonal gammopathy.
Bone marrow involvement
Most individuals with MBL have at presentation an abnormal infiltrate of monoclonal B-cells in their bone marrow as determined by biopsy. These B cells represent a median value of ~20% of all nucleated cells in the marrow. Regardless of the percentage of these cells, the presence of monoclonal B cells in bone marrow does not appear to influence the malignant progression of MBL and is not part of the criteria used to diagnose the disorder.
Nodal MBL
MBL patients may present with asymptomatic lymphadenopathy (i.e. lymph nodes that are enlarged or abnormal in consistency). In one study, ~42% of MBL patients had enlarged lymph nodes as detected by CT scans. Nonetheless, these patients' rate of progression to malignant disease does not differ from that for MBL patients that had normal CT scans. However, patients who have grossly enlarged (i.e. >1.5 centimeters) (cm) lymph nodes on physical examination do have a greater risk of progression. It has been recommended that patients with ≥1 lymph node larger than 1.5 cm be diagnosed as having Cll/SLL, that patients with lymph nodes ≤1.5 cm in size be diagnoses as having normal MBL, and that CT scans should not be used in diagnosing or staging MBL.
MBL with autoimmune cytopenia
Rare patients with MBL may present with the autoimmune disease-induced cytopenias of hemolytic anemia (reduced circulating red blood cell numbers) or thrombocytopenic purpura (reduced circulating platelet numbers). In the past, cases of CLL/SLL MBL associated with an autoimmune disease were diagnosed as CLL/SLL. However, patients with these autoimmune disorders who have very small B cell clones either never develop a lymphocyte malignancy or, rarely, do so and only after many years. Consequently, it is now widely recognized that such cases, when associated with very small numbers of monoclonal B-cells, are best diagnosed as CLL/SLL MBL with autoimmune cytopenia rather than CLL/SLL.
Tissue-based MBL
Monoclonal CLL/SLL phenotype B cells have been found using sensitive flow cytometry methods in various tissues. They have been identified as infiltrates in 1.9% of liver biopsies and 0.4% of prostate tissues obtained at prostatectomy. While the significance of these lesions is unknown, the presence of extensive infiltrations that replace normal tissue is more consistent with a diagnose of CLL/SLL than CLL/SLL MBL.
Differential diagnosis
The key factor that distinguishes low-count CLL/SLL-MLB, high-count CLL/SLL-MLB, and CLL/SLL is the number of circulating monoclonal B cells, as described above. However, the other MLB phenotypes may progress to and/or be mimicked by various monoclonal B-cell lymphocyte malignancies. The key cell markers and other points that help distinguish the following MBL phenotypes from these malignancies include the following (refer to Table for comparisons to non-malignant predecessor cells):
Atypical CLL/SLL-MBL
Mantle cell lymphoma: The monoclonal B-cells in this aggressive lymphoma are CD5+ in most cases, CD10−, CD23−, CD43+, CD103−, complete Ig+, and express cyclin D1; these cells have translocations between chromosomes 11 and 14 in >95% of cases and in many cases overexpress the SOX11 transcription factor gene. Testing for the chromosome 11, 14 translocation has been recommended for all cases of atypical and non-CLL/SLL MBL.
Follicular lymphoma: The monoclonal B-cells in this indolent lymphoma are CD5−, CD10+/−, CD19+, CD20+, CD23+/−, CD103−, CD200− and complete Ig+. These cells often exhibit translocations between chromosomes 14 and 18.
non-CLL/SLL-ML
Splenic marginal zone lymphoma: The monoclonal B-cells in this indolent lymphoma are CD5+/−, CD10−, CD19+, CD23−, CD43−, CD103−, and do not express cyclin D1. These cells may bear deletion in the "q" arm of chromosome 7 (30% of cases), and mutations in NOTCH2 (10-25% of cases), KLF2 (10-40% of cases), and, rarely, MYD88 genes. The monoclonal cells are also CD200− and are complete Ig+. Patients with this lymphoma commonly have an enlarged spleen.
Splenic B-cell lymphoma/leukemia unclassifiable: The rare reports on this lymphoma find the monoclonal B cells to be CD19+, CD20+ (bright, CD23+, CD11+, CD25−, CD103−, CD72+, and annexin A1−. These cells, similar to the monoclonal cells in Hairy cell leukemia, may have the V600E mutation in the BRAF gene. Patients with this lymphoma commonly have enlarged spleens.
MBL-MZ
Splenic marginal zone lymphoma and splenic B-cell lymphoma/leukemia: see above descriptions.
Waldenström's macroglobulinemia: The monoclonal B-cells in this indolent lymphoma are CD5− (in most cases), CD10−, CD19+, CD23−, CD43−/+, CD103−, cyclin D1+, Cd200−, and globulin + (dim). The cells contain the L265P mutation in the MYD88 (>90% of cases) and a mutation in the CXCR4 gene (30% of cases). Patients with this lymphoma commonly have an IgM gammaopathy, i.e. high blood levels of an IgM monoclonal protein.
Hairy cell leukemia: The monoclonal B-cells in this usually indolent CLL/SLL-like leukemia have a distinctive morphology and are CD5−, CD10−, CD19+, CD20+ (bright), CD23−, CD103+, CD200+, and complete Ig+.
In situ lymphoid neoplasia
In situ lymphoid neoplasia (ISLN), a lymphocyte disorder newly categorized by the World Health Organization (2016,) has several features in common with MLB. Like MBL, it is an asymptomatic, premalignant disorder of B-cells that is associated with the circulation of these cells and may progress to follicular lymphoma, mantle cell lymphoma, or CLL/SLL. ISLN differs from MBL in that its neoplastic B-cells accumulate in the follicles of lymphoid tissue, usually circulate in very low numbers, and bear distinctive genetic abnormalities that differ from those in MBL. ISNL is diagnosed based on, and requiring, the finding of these neoplastic B-cells in lymphoid follicles.
Treatment
Low-count MBL is an indolent disorder that in virtually all individuals does not progress to a malignant phase. Overall survival in low count MBL does not differ from that found in age-matched healthy individuals. MBL-MZ is an exception to this rule: this disorder generally presents with high monoclonal B-cell counts and regardless of the level of these counts may progress to a malignant phase at a greater than that found in other forms of MBL.
Depending on its phenotype (see above Table), high-count MBL progresses to CLL/SLL, mantel cell lymphoma, follicular lymphoma, splenic marginal zone lymphoma, or splenic lymphoma/leukemia unclassifiable at a rate of 1-2% per year whereas MBL-MZ progresses to a marginal zone B-cell lymphoma, Waldenström's macroglobulinemia, or Hairy cell leukemia at a ~3% per year. Factors predisposing to this progression in CLL/SLL MBL include the expression of CD38 cell-surface glycoprotein on the monoclonal B-cells, deletion of the short arm of chromosome 17 in these cells, high serum levels of beta-2 macroglobulin, and circulating B cell levels >10x109/L. There is relatively little information on the features promoting the progression of atypical CLL/SLL MBL, non-CLL/SLL MBL, and MBL-MZ to their respective lymphomas.
Individuals with high-count MBL (studies based primarily on the CLL/SLL phenotype) are at an increased risk for developing: 1) cancers of the breast, lung, and gastrointestinal tract in up to 13% of all cases; 2) autoimmune hemolytic anemia and immune thrombocytopenic purpura; 3) unexplained kidney disease as manifested by chronic kidney disease and/or the nephrotic syndrome; and 4) serious infections. While earlier studies suggested that only very high-count MBL (i.e. >10x109 B-cells/L) was associated with a decrease in survival, more recent studies indicate that high-count MBL (i.e. (i.e. >0.5x109 B-cells/L) do show a shorter overall survival. In addition to having very high numbers of B-cells, high-count CLL/SLL MLB patients whose monoclonal B cell clone lacks mutions in IGVH genes (see above section on genome abnormalities) or whose |β2 macroglobulin is elevated have a shorten survival. However, the shortened survival times in high-count CLL/SLL MBL does not appear due to its progression to CLL/SLL. Rather, this shortened survival appears due to the disorders' susceptibility to serious infections, other types of cancers, immune cytopenias, and renal disease.
Recommended treatments for patients with high-count MBL and MBL-MZ include yearly follow-up evaluations to test for the malignant progression of their disorder and for the development of other forms of cancer, infections, immune cytopenias, and renal disease. It may also be beneficial to ensure that high-count MLB patients are up to date on vaccinations including those for influenza, pneumococcal pneumonia, and tetanus before they become more severely immunocompromised by the progression of their disorder. In all cases live vaccines should be avoided in these individuals.
See also
In situ lymphoid neoplasia
References
Lymphocytic disorders
| 40,095
|
https://sv.wikipedia.org/wiki/Chorebus%20tshukoticus
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Chorebus tshukoticus
|
https://sv.wikipedia.org/w/index.php?title=Chorebus tshukoticus&action=history
|
Swedish
|
Spoken
| 32
| 68
|
Chorebus tshukoticus är en stekelart som beskrevs av Vladimir Ivanovich Tobias 1998. Chorebus tshukoticus ingår i släktet Chorebus och familjen bracksteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Bracksteklar
tshukoticus
| 38,033
|
https://stackoverflow.com/questions/62505208
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,020
|
Stack Exchange
|
Andrej Kesely, JFerro, https://stackoverflow.com/users/10035985, https://stackoverflow.com/users/290085, https://stackoverflow.com/users/407651, https://stackoverflow.com/users/7168098, kjhughes, mzjn
|
English
|
Spoken
| 533
| 1,110
|
Parsing an XML file with invalid xml:id values (starting with a number)
Provided I have a XML as follows:
Notice that the attributes xml:id are strings STARTING BY NUMBERS
<node1>
<text xml:id='7865ft6zh67'>
<div chapter='0'>
<div id='theNode'>
<p xml:id="40">
A House that has:
<p xml:id="45">- a window;</p>
<p xml:id="46">- a door</p>
<p xml:id="46">- a door</p>
its a beuatiful house
</p>
</div>
</div>
</text>
</node1>
I would like to locate text title and get all the text from the first p tag appearing inside the text title book node
A first approach can be done using the answers here:
lxml xpath expression for selecting all text under a given child node including his children (my own question)
But in this new XML (compared to the mentioned question) the xml:id s start with a number and as pointed in one of that answers the following error occurs when using the code:
xml:id : attribute value 7865ft6zh67 is not an NCName, line 3, column 31
How can I still parse the XML with that "XML non compliance xml:id"?
So far the only solution that I can think of is passing the xml to string, and adding a letter at the beginning of every of those xml:ids" like:
newXML = '...hange><change xml:id="6f58f74883d55b...'
newXML_repared = newXML.replace('xml:id="','xml:id="XXid')
newXML_repared
from lxml import etree
XML_tree = etree.fromstring(newXML_repared,parser=parser)
but when doing so I get:
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
Any suggestion?
note: I noticed that the string itself starts by:
<?xml version="1.0" encoding="UTF-8"?>
<teiCorpus subtype="simple" ...etc
In the lxml tutorial is possible to read:
This requires, however, that unicode strings do not specify a conflicting encoding themselves and thus lie about their real encoding:
(https://lxml.de/parsing.html)
But I still dont know how to solve the problem then
Thanks.
Preferably not using BS because the whole rest of the team uses lxml, nobody in the team uses BS and the idea is sticking to one library.
And apparently "BeautifulSoup, by itself, does not support XPath expressions.". we need xpath because the xmls we work with are extremely complicated and nested. But thanks for your answer
With bs4 you can use CSS selectors + bs4's own api.
Where does the bad XML come from? This should be fixed by whatever/whoever created it.
One option is found in the link to the docs you provided (https://lxml.de/parsing.html).
Specifically the "recover" option listed in parser options.
Example...
from lxml import etree
XML_content = """
<node1>
<text xml:id='7865ft6zh67' title="book">
<div chapter='0'>
<div id='theNode'>
<p xml:id="40">
A House that has:
<p xml:id="45">- a window;</p>
<p xml:id="46">- a door</p>
<p xml:id="46">- a door</p>
its a beuatiful house
</p>
</div>
</div>
</text>
</node1>
"""
parser = etree.XMLParser(recover=True)
XML_tree = etree.fromstring(XML_content, parser=parser)
text = XML_tree.xpath('normalize-space(//text[@title="book"]/div/div/p)')
# text = XML_tree.xpath('string(//text[@title="book"]/div/div/p)')
print(text)
Note: I added title="book" so the XPath from my other answer in your related question still worked.
lxml's recover=True can be useful for cleaning up "bad" XML, but readers should be reminded that problems such as starting ids with digits violate the rules of well-formedness, and so really should be fixed at the source. Otherwise, every consumer of the "XML" has to suffer these problems, defeating the benefits of using standards.
| 46,546
|
https://sv.wikipedia.org/wiki/Ravensara%20montana
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Ravensara montana
|
https://sv.wikipedia.org/w/index.php?title=Ravensara montana&action=history
|
Swedish
|
Spoken
| 33
| 67
|
Ravensara montana är en lagerväxtart som beskrevs av André Joseph Guillaume Henri Kostermans. Ravensara montana ingår i släktet Ravensara och familjen lagerväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Lagerväxter
montana
| 43,904
|
https://pcm.wikipedia.org/wiki/Emmanuel%20Uduaghan
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Emmanuel Uduaghan
|
https://pcm.wikipedia.org/w/index.php?title=Emmanuel Uduaghan&action=history
|
Nigerian Pidgin
|
Spoken
| 77
| 138
|
Emmanuel Uduaghan (dem bon am October 22, 1954) na Naija politishian wey don ritaya an e still bi doktor. As plenti pipul sabi am as Dr. Emmanuel Ewetan Uduaghan. E na Govno of Delta Stet fom 2007 go rish 2015. Bifor e bikom Govno, e bin serve as di Komishona for Health, Delta Stet an di Seketari to di Stet Govament.
Pipul wey dem bon for 1954
Tori About Pipu Life
Tori abaut pipul life
Naija pipul
| 17,894
|
https://en.wikipedia.org/wiki/I%27ll%20Be%20There%20%28The%20Neales%20song%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
I'll Be There (The Neales song)
|
https://en.wikipedia.org/w/index.php?title=I'll Be There (The Neales song)&action=history
|
English
|
Spoken
| 252
| 328
|
"I'll Be There" is a song by Britain's Got Talent series 9 finalists The Neales. It was released as their debut single on 10 June 2016, with all profits going to charity. The single peaked at number 22 on the UK Singles Chart.
Background and production
The Neales - made up of father Laurie Neale and his three sons James, Dan and Phil - reached the Britain's Got Talent final in 2015, where they sang a cover of the Cat Stevens song "Father and Son". After competing in the talent show, they penned the charity single "I'll Be There" to raise money for the National Charity Partnership. The single was released ahead of Father's Day in 2016, and was made available to buy in around 750 Tesco stores across the UK, in a personalised sleeve. The group went on a tour of Tesco stores to promote the single.
Group member Phil had worked for Tesco since 2014, and his father Laurie had suffered a heart attack 10 years before their appearance on Britain's Got Talent. Their experiences gave them the inspiration to write the song and raise money to help people who were recovering from heart conditions.
Chart performance
"I'll Be There" entered the UK charts on the week ending 22 June 2016 at its peak of number 22. It spent a second week in the top 40, falling to number 31 the following week.
Charts
References
External links
I'll Be There music video on YouTube
2016 songs
2016 singles
Charity singles
| 46,112
|
https://cooking.stackexchange.com/questions/93117
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Ess Kay, https://cooking.stackexchange.com/users/4638, https://cooking.stackexchange.com/users/69382, rumtscho
|
English
|
Spoken
| 125
| 174
|
How to prevent milk overflow from pan?
Note - To avoid duplication, I have referred the related question.
Many a time, it happens that I put milk on the stove and forget about it while doing other work. So, milk always boils over. What can be done to prevent the milk overflowing the pan?
related: https://cooking.stackexchange.com/q/5207/69382
Hi, to prevent a duplicate, it's not enough to say that you have seen the other question. You have to make it clear why you are asking something different than it. In this case, I see no diffrence in what is being asked, and it seems that the people who answer also don't see a difference - all answers would fit both questions. So I am closing and merging.
| 10,820
|
https://es.wikipedia.org/wiki/Ksour%20Essef
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Ksour Essef
|
https://es.wikipedia.org/w/index.php?title=Ksour Essef&action=history
|
Spanish
|
Spoken
| 417
| 691
|
Ksour Essef es una ciudad de la gobernación de Manouba en Túnez. En abril de 2014 tenía una población censada de .
Se encuentra ubicada al norte del país, cerca la costa del golfo de Túnez (mar Mediterráneo), de la capital del país, la ciudad de Túnez, y del río Meyerda. Ksour Essef es conocido como el lugar de nacimiento del poeta Youssef Rzouga.
Etimología
Según la tradición oral, el lugar estaba ocupado por un sistema de fortificaciones romanas en ruinas, que sirvieron como refugio para los gavilanes (sâf), de donde recibió el nombre de «Castillo de los Gavilanes». Esta leyenda no es del todo mentira, ya que un texto atestigua que la aristocracia de Mahdia, ubicada a doce kilómetros de Ksour Essef, estaba acostumbrada a cazar gavilanes en la región de Salakta y sus alrededores.
Geografía
Ksour Essef está dividida en muchos suburbios, incluyendo El Baabouss, El Tafalla, Bab El Ksar y la ciudad Mallaji. Hay varias playas cerca del pueblo de Salakta.
Historia
La creación de la ciudad coincidió con la llegada de los Banu Hilal en 1050. Tras la destrucción de la ciudad de Salakta y la llegada de los árabes, la mayoría de los habitantes púnicos, griegos y romanos se convirtieron al Islam.
Una de las piezas más hermosas del Museo Nacional del Bardo es una coraza de bronce que se encontró en un sepulcro local, descubierto en 1910. Es una importación de Italia fechable alrededor del año 300 a. C. El difunto había sido enterrado en un sarcófago de madera de ciprés que tenía restos del ocre utilizado en el funeral, al igual que los huesos. Este ataúd es similar al que se encontró en Gigthis con las siguientes dimensiones: 84 cm de alto, 180 cm de largo y 68 cm de ancho.
Economía
La economía de Ksour Essef está basada en la agricultura, la pesca, el comercio y la emigración. De hecho, los migrantes participan directamente en su desarrollo económico e invierten en él, especialmente en la construcción de viviendas y el establecimiento del comercio y de la industria. Asimismo, los viernes hay un mercado en el centro de la ciudad.
En esta región, además, parte de la población también vive del producto de la aceituna y últimamente se ha beneficiado del suministro de electricidad y agua en la zensfine, que son grupos de casas familiares que han cultivado aceitunas en conjunto durante muchas generaciones.
Verr también
Lista de ciudades en Túnez
Referencias
Enlaces externos
Localidades de Túnez
Municipios de Túnez
| 23,709
|
https://sv.wikipedia.org/wiki/H%C3%A4llums%20landskommun
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Hällums landskommun
|
https://sv.wikipedia.org/w/index.php?title=Hällums landskommun&action=history
|
Swedish
|
Spoken
| 63
| 149
|
Hällums landskommun var en tidigare kommun i dåvarande Skaraborgs län.
Administrativ historik
Kommunen inrättades i Hällums socken i Barne härad i Västergötland när 1862 års kommunalförordningar trädde i kraft. .
Vid kommunreformen 1952 uppgick landskommunen i Ryda landskommun som 1967 uppgick i Vara köping som 1971 ombildades till Vara kommun.
Källor
Sveriges kommuner 1863-1951
Tidigare kommuner i Skaraborgs län
Indelningar i Vara kommun
| 11,182
|
https://stackoverflow.com/questions/42769794
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,017
|
Stack Exchange
|
Juwdohr, https://stackoverflow.com/users/6277151, https://stackoverflow.com/users/7197908, tony19
|
English
|
Spoken
| 211
| 361
|
Can I import an HTML file through another HTML import file?
I have 4 files lets say a.html, b.html, c.html, and d.html. I want b.html needs to have c.html, and d.html imported. a.html needs b.html. Can I import using <link rel='import' href='/path/to/b.html'> in a.html, then in b.html have the following:
<link rel='import' href='/path/to/c.html>
<link rel='import' href='/path/to/d.html>
Yes, you can. Here's a demo for that exact scenario.
@tony19 I am using Native Web Components no Polymer.
@Juwdohr Ok. The HTML imports feature is provided by Web Components, not Polymer. I used Polymer only for its syntactic sugar in creating components.
Including an HTML template is similar to the way we include a stylesheet, we use the tag. But instead of using rel=stylesheet, we add the link tag with rel=import. As an example, here I will include a template named template.html (I’ve added a few lines of dummy content to it).<link rel="import" href="template.html">
Now if you see the Web page through the Chrome DevTools under the Network tab, you can see that the browser (Chrome) loads the template.html.
Keep in mind that the content in the file that is imported is not instantly appended to the main HTML file. When you see the main HTML file, you will see nothing at the moment.
| 33,953
|
https://ceb.wikipedia.org/wiki/Dothiorella%20barringtoniae
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Dothiorella barringtoniae
|
https://ceb.wikipedia.org/w/index.php?title=Dothiorella barringtoniae&action=history
|
Cebuano
|
Spoken
| 62
| 124
|
Kaliwatan sa uhong ang Dothiorella barringtoniae. sakop sa ka-ulo nga Ascomycota, ug Una ning gihulagway ni Mordecai Cubitt Cooke ug George Edward Massee, ug gihatagan sa eksakto nga ngalan ni Franz PetrakugHans Sydow ni adtong 1927. Ang Dothiorella barringtoniae sakop sa kahenera nga Dothiorella, ug kabanay nga Botryosphaeriaceae. Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Abungawg-uhong
Dothiorella
| 32,982
|
https://en.wikipedia.org/wiki/Internet%20in%20Turkey
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Internet in Turkey
|
https://en.wikipedia.org/w/index.php?title=Internet in Turkey&action=history
|
English
|
Spoken
| 564
| 801
|
The Internet in Turkey has been available to the public since 1993, although experimentation at Ege University started in 1987. The first available connections were dial-up. Cable Internet has been available since 1998 and ADSL since 2001. Turkey has 70 million active Internet users as of 2022.
Currently Türk Telekom's TTNET ADSL2+ service is the most widely used Internet service in Turkey, offering speeds from 8 Mbit/s to 24 Mbit/s. TTNET offers VDSL2 service with speeds at 25 Mbit/s to 100 Mbit/s as well. Alternative broadband companies, while mostly still using TTNET infrastructure, such as SmileADSL and TurkNet are also available. Superonline is offering fibre broadband in limited areas in 19 cities, though the company is enlarging at a healthy pace. They currently offer up to 1000 Mbit/s speeds. Furthermore, relatively wide but not universal coverage of cable Internet is maintained by Kablonet, offering speeds from 10 Mbit/s to 100 Mbit/s.
TTNET's monopoly and perceived excessive pricing have received numerous criticisms from users over the years.
The penetration and the usage of credit cards are very high in Turkey. However development of alternative payment systems will be helpful both by facilitating the shopping of the consumers owning credit cards and by familiarizing non-credit card holders with the e-commerce. In 2019 it was reported that the Internet users of Turkey had reached to 69,107,183 (12th highest number of internet users worldwide) - amounting to 88% of Turkish households having internet access. Wi-Fi in Turkey is free in all areas and easily accessible to all the citizens. Hotels, hostel, railway stations, airports have free access to internet and Wi-Fi.
Turkey implements protectionist policies to stimulate the local internet technology industry and enforce data retention: In 2016 payment gateway PayPal was forced to cease most of its operations in the country. In January 2017 the government unveiled plans to build a domestic web search engine and webmail service.
Internet Entrepreneurship in Turkey, also called "Digital Bosphorus" has reached several exits in last years. The biggest three of them have been Yemeksepeti, Gittigidiyor and Markafoni. According to Sina Afra, the potential of the Turkish Internet market is bigger than in many other European countries.
Internet in Turkey holds a 'Not Free' ranking in Freedom House's index. Turkish government has constantly blocked websites like Facebook, Twitter, YouTube and as of May 2017, Wikipedia was inaccessible According to Twitter's transparency report, Turkey leads in social media censorship. till 15 January 2020; Wikipedia opened to access after the Constitutional Court of Turkey ruled that the block of Wikipedia violated human rights and ordered it to be lifted on 26 December 2019.
Censorship
According to the EngelliWeb Report of the Freedom of Expression Association (İfade Özgürlüğü Derneği) entitled Fahrenheit 5651: The Scorching Effect of Censorship, by the end of 2020, Turkey had blocked access to more than 467.000 websites. 409.000 orders issued by 764 different institutions, including criminal judgeships of peace and other authorized public institutions.
See also
Censorship in Turkey
Internet regulation in Turkey
List of countries by number of Internet users Turkey, 15th
Languages used on the Internet
List of countries by number of broadband Internet subscriptions Turkey, 15th
List of countries by number of Internet hosts Turkey, 16th
List of countries by Internet connection speeds Turkey, 63rd & 43rd
List of countries by IPv4 address allocation Turkey, 24th
Carna botnet Turkey, 19th
Web Index Turkey, 38th
References
External links
| 26,332
|
https://arz.wikipedia.org/wiki/%D8%AC%D8%B1%D8%B0%20%D8%A7%D9%84%D9%85%D8%A7%D8%A1%20%D8%A7%D9%84%D8%A8%D8%B1%D9%8A%D8%B7%D8%A7%D9%86%D9%89%20%D8%A7%D9%84%D8%AC%D8%AF%D9%8A%D8%AF
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
جرذ الماء البريطانى الجديد
|
https://arz.wikipedia.org/w/index.php?title=جرذ الماء البريطانى الجديد&action=history
|
Egyptian Arabic
|
Spoken
| 23
| 74
|
جرذ الماء البريطانى الجديد ( الاسم العلمى: Hydromys neobritannicus ) هوا نوع من الثدييات بيتبع هيدروميس.
لينكات
مصادر
كائن
نوع من الثدييات
هيدروميس
| 16,650
|
https://ban.wikipedia.org/wiki/Jajar%2C%20Laweyan%2C%20Surakarta
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Jajar, Laweyan, Surakarta
|
https://ban.wikipedia.org/w/index.php?title=Jajar, Laweyan, Surakarta&action=history
|
Balinese
|
Spoken
| 50
| 153
|
Jajar (aksara Bali: ᬚᬚᬃ) inggih punika silih tunggil kelurahan ring wewidangan Kecamatan Laweyan, Kota Surakarta, propinsi Jawa Tengah.
Pustaka
Pranala jaba
Situs Resmi Provinsi Jawa Tengah
Badan Pusat Statistik Kota Surakarta
Situs Resmi Kota Surakarta
Prodeskel Binapemdes Kemendagri
cutetan: URL dados kauahin/ilang. Yening URL nenten aktip, ngiring kaapus saking lis.
| 779
|
https://stackoverflow.com/questions/7910636
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,011
|
Stack Exchange
|
CODY MARTEL, Chuck Walbourn, EA1oo, FailedDev, Michael Price, Nguyễn Quốc Đạt, Nicholas Vaughn, fotlancuwo, https://stackoverflow.com/users/1013949, https://stackoverflow.com/users/17583415, https://stackoverflow.com/users/17583416, https://stackoverflow.com/users/17583417, https://stackoverflow.com/users/17583841, https://stackoverflow.com/users/17589893, https://stackoverflow.com/users/18378813, https://stackoverflow.com/users/18378814, https://stackoverflow.com/users/3780494, https://stackoverflow.com/users/748175, https://stackoverflow.com/users/880096, https://stackoverflow.com/users/985032, p0qsrfh929, qdii, user17589893, Назар Підвірний
|
English
|
Spoken
| 593
| 925
|
d3dx11.h missing?
So I've reinstalled directx11 a couple times and even went to the Microsoft website and got the SDK pack that has all the direct x cabinet files in it. Anyone have any idea why i keep getting this error then? I know why it is saying it but more looking for the solution to it.
1>c:\users\vaughn\documents\visual studio
2010\projects\myfirstapp\myfirstapp\main.cpp(5): fatal error C1083:
Cannot open include file: 'd3dx11.h': No such file or directory
Did you add the necessary folder into your include directories?
That's what you need to do in VS 2010 (it looks a bit different in VS 2008 and earlier):
Go to your project's properties | Configuration Properties | VC++ Directories. Edit line called Include Directories by adding path to DirectX header files. As for June 2010 SDK it may be something like:
32 bit Win: C:\Program Files\Microsoft DirectX SDK (June 2010)\Include
64 bit Win: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
Next you are most likely to get a linker's error (missing .lib files). Just go to your project's properties | Configuration Properties | VC++ Directories again, but this time edit Library Directories and add to one of the following paths:
32 bit Win: C:\Program Files\Microsoft DirectX SDK (June 2010)\Lib\x86
64 bit Win: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
If you installed other version of SDK or installed it to non-default directory change given paths accordingly. Also make sure you added d3d11.lib (and maybe d3dx11.lib as well) to Linker | Additional Dependencies.
General rule is that any time you #include <> files your IDE needs to know where to find them. VC++ Directories is one way of doing that in Visual Studio. But sole inclusion of headers is (in most cases) not enough - you need to tell your linker where to look for precompiled binaries described by those headers. That what you do by adding the second path to Library Directories.
Okay I'm going to go give this a try. I thought I did this because that is what the assignments instructions told me to do but I'll double check everything.
Thanks for the help, turns out I was missing the VC++ directories and the linker libraries for Direct X11.
What about using environment variable %DXSDK_DIR%/Include ?
You have to make sure you get the latest DirectX SDK. It has the header files. If all you got were cabinet files, you got the wrong SDK.
I downloaded that and it still tells me that it is unable to find it? If I comment out the line requesting access to the file it works but then it makes me also comment out the d3dx10.h file as well and it loads fine.
Can you search your system for d3dx*.h to see where the correct header files were installed to?
It didn't pop up even after reinstalling like 4 times.
In my case, for DX12, I was missing d3dx12.h
See this MSDN page.
In case the page moves, the relevant line appears to be
"d3dx12.h is available separately from the Direct3D 12 headers. You can download d3dx12.h by navigating into any of the source files for the Direct3D 12 projects at GitHub/Microsoft/DirectX-Graphics-Samples"
The DirectX SDK is legacy, and D3DX9, D3DX10, and D3DX11 are deprecated. For a list of replacements, see Living without D3DX. D3DX12 is not part of the Windows SDK or the DirectX SDK. It's intended to just be copied into your project, it is provided on GitHub under the MIT license. It is also included in various DirectX 12 VS templates including these.
Note blob link is now here
| 49,428
|
https://en.wikipedia.org/wiki/Brian%20Miller%20%28Australian%20politician%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Brian Miller (Australian politician)
|
https://en.wikipedia.org/w/index.php?title=Brian Miller (Australian politician)&action=history
|
English
|
Spoken
| 119
| 162
|
Brian Kirkwall Miller (30 January 1921 – 6 June 2014) was an Australian politician. Born in Queenstown, he was elected to the Tasmanian Legislative Council in 1957 as the Labor member for Newdegate. He held various ministerial portfolios and led the Government in the Council from 1972 to 1982. In 1986 he resigned from the Council to contest the House of Assembly election, but he was unsuccessful.
In the 1994 Queen's Birthday Honours Miller was made a Member of the Order of Australia for "service to the Tasmanian Parliament and to the community".
References
1921 births
2014 deaths
Members of the Tasmanian Legislative Council
Australian Labor Party members of the Parliament of Tasmania
Members of the Order of Australia
| 50,824
|
https://stackoverflow.com/questions/19347877
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,013
|
Stack Exchange
|
Lior Pollak, Ram S, https://stackoverflow.com/users/3016538, https://stackoverflow.com/users/397210, https://stackoverflow.com/users/938227, https://stackoverflow.com/users/959631, levigroker, user959631
|
English
|
Spoken
| 463
| 987
|
iPhone iOS7 system sound (ringer and alert) volume control
This question appears to be asked and answered many times but with no specific or accurate answer. Hence I will reframe the question for iOS7 and hope for some help.
I need to use AudioServicesPlaySystemSound to play sounds as timing is critical and this is only way to play simultaneous sound effect accurately with variable timing (try every other option).
This works well but I would like to adjust the volume. The only way it appears to be able to do this is with the buttons although some say use MPVolumeView (only works for music), some say use MPMusicPlayerController (but this also only works for music and is now depreciated), and others just say it cannot be done - which is looking more likely.
However, with iOS7 there is a slide control in settings>sounds for the ringer alert volume. Is there any way I can subclass, replicate, or access this slide control to change this volume from within the app?
I think I saw this in Waze app. I'll look through.
Take a look at this- http://stackoverflow.com/questions/10286744/how-to-change-device-volume-on-ios-not-music-volume
@Paul Pivec If you find an answer, please share it as I am also looking for the same. I can't believe Apple have so stupid restrictions...
Apple recommends using MPVolumeView, so I came up with this:
Add volumeSlider property:
@property (nonatomic, strong) UISlider *volumeSlider;
Init MPVolumeView and add somewhere to your view (can be hidden, without frame, or empty because of showsRouteButton = NO and showsVolumeSlider = NO):
MPVolumeView *volumeView = [MPVolumeView new];
volumeView.showsRouteButton = NO;
volumeView.showsVolumeSlider = NO;
[self.view addSubview:volumeView];
Find and save reference to UISlider:
__weak __typeof(self)weakSelf = self;
[[volumeView subviews] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:[UISlider class]]) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf.volumeSlider = obj;
*stop = YES;
}
}];
Add target action for UIControlEventValueChanged:
[self.volumeSlider addTarget:self action:@selector(handleVolumeChanged:) forControlEvents:UIControlEventValueChanged];
And then update your custom control when the volume has been changed (i.e. by the hardware volume controls):
- (void)handleVolumeChanged:(id)sender
{
NSLog(@"%s - %f", __PRETTY_FUNCTION__, self.volumeSlider.value);
self.myCustomVolumeSliderView.value = self.volumeSlider.value;
}
and also other way around:
- (IBAction)myCustomVolumeSliderViewValueChanged:(id)sender {
NSLog(@"set volume to: %f", self.myCustomVolumeSliderView.value);
self.volumeSlider.value = self.myCustomVolumeSliderView.value;
}
NOTE: Make sure that setting the self.volumeSlider.value doesn't loop back to setting self.myCustomVolumeSliderView.value.
Hope this helps someone (and that Apple doesn't remove MPVolumeSlider from MPVolumeView).
This appears to change the system volume, not the ringer/alert volume, as was asked by the OP.
I think you want to control your volume through program
- (void)setVolume:(float)Level
{
OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);
if (errorMsg) {
NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
}
}
use this code to set volume level passing from your code by which button you want to control.
if this is not through programming : please refer this link http://stackoverflow.com/questions/10855874/audioservicesplaysystemsound-volume
| 38,308
|
JSMkXgEhFDM_2
|
Youtube-Commons
|
Open Web
|
CC-By
| null |
A Force of Nature! - This Week in Science Podcast (TWIS) - Episode 568
|
None
|
English
|
Spoken
| 1,160
| 1,644
|
They have the teeth going both ways. Then you have garyls, which are the weird... They have like a really tight nose. Yeah, the long-skinned, tight nose. Yes, exactly. So they have garyls. And then caimans are... They just look kind of like tiny crocodiles. Yeah, they're cute. And then there's a... This is a scientific term. Crap-ton of crocodiles. Okay. Speaking of scientific... Yeah, I know. That's what I did. You know what you did, because I was like... I think it came out of my mouth. I was so about to comment on it, and I was like... I didn't do it on purpose. A little bit in shock. I was like, oh, she doesn't know what she just said. What did she say? It came out of my mouth. Oh, I talked about how the male... Was it when you said that it keeps them from coming? Yes. Yeah. Okay, I heard that. Because I was... And maybe it's just me, because both of you carried on just with like... I'm a professionalism. And I'm like... No, you can tell. You just can't stop. You're only going to be heard by anybody who's not the two of you locked in on the subject completely differently. That was not intentional at all? Yeah. Oh, hum. And then I was also like vaguely like... Maybe she did just mean that, and it's just like we're having an adult conversation, and I just didn't realize that I'm coming into this with though this was a family show, and we're just going to roll out any... You know, adult-ish comments, just though like, yeah, this is... We were all adults here. Why wouldn't we talk like this? I didn't know what to do. I was actually... I had like a mental shutdown. Take place. I just couldn't talk. I'm like, I don't know what's going on. Sometimes when you're not scripted... It's a live show, people. It's a live show. Just remember it's a live show. Just trying to say, C-O-M-I-N-G. Yeah. Yep. I got it. I get it, but yep, we get it. We get it. Everybody else got something completely different. That's the thing. Oh, my goodness. So I am staying at somebody's house, and they just got back, and so I feel I'm going to go hang out with them and have a glass of wine so that I can be like, thanks for letting me stay at your house. You're really awesome. Thanks for letting me use your Wi-Fi and do this show and ignore you in a closed room for an hour and a half. Right now? What? Are you in the city? I am. Oh, you're so close. I'm so close. I almost feel you. Shh. Hello, California. What do you at least say hello when you're there tomorrow? Oh, yeah, totally. And if you need, if Jason can't meet you down in front, I can walk you to where he is if you need that. OK. Yeah, he gave me, sent me some map to get to the back. I don't know. He's like, this is the back way to get to where I work. I'm like, OK. VIP? VIP. Going to the zoo with the VIP. Getting places. There's so many. Yay. I'm sorry. I'm sorry when I rap. Every once in a while, it's terrible. I do it and I'm sorry. From the big bang to the ladies advances, we got more science news than Chinese zoos got pandas. That's right. Dave, I think you should put that in Urban Dictionary. Which? Blarism. Accidental porn statement. Porn statement. Yeah. We're not so accidental spider porn. Yeah, it's not so. It's never accidental spider porn. When it comes to Blair, it's always on purpose. Yeah. I like how saying VIP Kiki reminded me that Jessica kept putting your name when he's Kiki, he kept putting it in quotes. What? Wait, what? Kiki. She's like, Kiki. Parentheses. Kiersten. I was like, Jesus, I don't know. Wait, who is doing this? So apparently this guy who's the head of the wellness and conservation department at the zoo is an old friend of mine. We were in grad school. Yeah, old friend of mine. We traveled together. We were in grad school, fellow co-lab mates. He sent him a formal media request, and he saw Kiki's name in the body of my proposal below, and he was like, actually, I know who that is. Kiki. Parentheses. Kiersten. Parentheses. Kiersten. He's amazing. That's awesome. Nice. That's awesome. Can't wait to see him. That's going to be great. It's going to be great. Oh, if you guys need a drinking game, may I recommend watching Eurovision 2016. And when they do, like, before every performer goes on, they do, like, this little, this country is amazing. And this performer in countries, they don't tell you what country it is till the end of the little video collage that they do. And so it's really fun to try and figure out what country the different performers come from. And if you get it, you make everybody else drink. Oh, that's awesome. It's a very fun game. That one's got more subtlety than mine. My drinking game is to watch Leaving Las Vegas and drink whenever they drink. I've just ended up in the hospital. And then... It's a night-ender. It's an early evening. And then you're done. Yeah. All right. All right. Okay. I'm going to go. You guys can hang out if you want. Blair, if you could share the, the strengths is put in, I guess, into the chat room. Oh, okay. YouTube video, which is a promo jingle that mentions every deadly Aussie animal. I definitely think we should play this. If you're watching... No. Well, I'm going to go. I'm not going to hit... Do you guys have a stop broadcast button? Yeah. I've got two of them. One is closing the window. Have a stop broadcast button, Justin. Do you have one that says stop broadcast? No. Actually, I guess I don't. We might go away. Yeah. We'll go away. I think it gives us a little bit of time before we go away, though. So we'll try. And if we pop out... Good night, everybody. Good night, Minions. Thanks for hanging out. Passwords to the Zazzle Store. I still need to do that, because you know what? I forgot what it was. That was my... That's why I haven't gotten it to you. Tony Steele sent me the original graphics from the... Oh, nice. Happy Trails, where we're all stagecoach. It's like, Oh, cool. Nice, too. Nice. He said, he said we could do that. Yeah. He did. Oh, that's sweet of him. Okay. Nice of him. Yeah. Wow. That's very, very sweet of him to say that we could do that. Background out, so it would be easier to put on things.
| 26,456
|
https://ceb.wikipedia.org/wiki/Yankee%20Hollow%20%28walog%20sa%20Tinipong%20Bansa%2C%20Tennessee%2C%20Giles%20County%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Yankee Hollow (walog sa Tinipong Bansa, Tennessee, Giles County)
|
https://ceb.wikipedia.org/w/index.php?title=Yankee Hollow (walog sa Tinipong Bansa, Tennessee, Giles County)&action=history
|
Cebuano
|
Spoken
| 100
| 172
|
Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Yankee Hollow.
Walog ang Yankee Hollow sa Tinipong Bansa. Ang Yankee Hollow nahimutang sa kondado sa Giles County ug estado sa Tennessee, sa habagatan-sidlakang bahin sa nasod, km sa kasadpan sa ulohang dakbayan Washington, D.C.
Ang klima umogon ug subtropikal. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Agosto, sa °C, ug ang kinabugnawan Pebrero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Enero, sa milimetro nga ulan, ug ang kinaugahan Nobiyembre, sa milimetro.
Ang mga gi basihan niini
Mga walog sa Tennessee (estado)
| 41,436
|
https://azb.wikipedia.org/wiki/%DA%86%DB%8C%D9%85%D8%A7%D9%84%D8%AF%D8%A7%D8%B1%DB%8C
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
چیمالداری
|
https://azb.wikipedia.org/w/index.php?title=چیمالداری&action=history
|
South Azerbaijani
|
Spoken
| 16
| 91
|
چیمالداری(اینگیلیسجه:Cheemaldari) هیندوستان اؤلکهسینین تلانقانا ایالتینده بیر کند دیر. بۇ کنده تلوقو دیلی دانیشیلیر.
قایناقلار
هیندوستان کندلری
| 46,562
|
https://interpersonal.stackexchange.com/questions/20947
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,019
|
Stack Exchange
|
AsheraH, Flater, J Cover, Lost Soul, Upper_Case, dhein, https://interpersonal.stackexchange.com/users/1665, https://interpersonal.stackexchange.com/users/23648, https://interpersonal.stackexchange.com/users/32, https://interpersonal.stackexchange.com/users/3765, https://interpersonal.stackexchange.com/users/4188, https://interpersonal.stackexchange.com/users/5377
|
English
|
Spoken
| 1,720
| 2,077
|
How do I tell a friend that's trying to start another long distance relationship that it isn't a very good idea without hurting our friendship?
Context
My friend (f) is trying to start another long distance relationship with a second person in our extended group of friends (I am neither of these people). The first relationship (w/ Person 1) had been going on for a month when the new one seems to have started and still seems to be going well. The new one (w/ Person 2) she is trying to develop is with one of that person's IRL friends who knows about the first relationship. I sense that most of the people involved will get hurt when this eventually comes out, and I would like to avoid that. The issue comes in that I am not sure how to approach her about this, since this is a personal topic. I am worried that being too direct about this could be seen as being rude or judgemental and damage our friendship, but I see a problem brewing here and would like to try to intervene before things go south.
Some Notes and Background
This group of people is a mix of a few sets of IRL friends and a few other people
The IRL friend in question and I both live in the US while Persons 1 and 2 live in Australia. I don't see there being much of a cultural issue here.
We are all older high school students, but not exactly social butterflies.
She seems conflicted over the whole thing, but still seems to be pursuing both relationships
I haven't tried/done anything yet and the approaches I have thought of seem likely to offend her, but I could be wrong and a direct statement may be the best idea. I am not sure how I would do that from a cold open though.
I have a few other IRL friends in this group, but it is only those two in their IRL group
We mainly interact through a Discord server that I own, with the information on my friend's relationships coming from a locked channel that only me, my IRL friend in question, one of my very good IRL friends, and another internet friend having access to. Neither Person 1 or 2 have access or will ever likely gain access.
The best outcome for me would be to keep all of these people as friends, but my IRL friend is my highest priority, with Person 1 being second since I have personally known him for longer. Any response that would negatively impact my relationship with my very good IRL friend would be a no-go, but I could possibly get him on board with a solution to this.
I am not seeking a relationship with my IRL friend, I just want this situation to be resolved well.
I am very worried that if I simply say that I think this is a bad idea, she would be upset with me. This assumption could be incorrect though, I am not sure
Finally...
My Question
How do I tell this friend that this may not be a particularly good idea in such a way that I am able to get my point across without damaging our friendship? No action may be the best option, but I would like your input.
Hey J Cover. Interesting question. But the notes and information you are giving are more of the nature of who is connected to what extend in this network, and it is still very confusing (at least FMPOV). You mention kicking people as part of the solution, how would kicking someone from a discord server help you telling you friend how you think about this? Since you are asking us for how best to tell your friend, could you try to focus a bit more on what actually is the hurdle with telling her? As right now it reads more like you are trying to convince us and want us to help convincing her.
Thank you for your input! The kicking and some other discord stuff has been removed as it seemed to just add confusion. I have also added more about the fact that I am worried about how my friend will react to my suggestion that this is a bad idea/should be stopped, it mostly consists of my worries that my suggestion may be seen as rude and damage our friendship. I think I improved the tone with those changes, but I am not the best judge. If you have more input, please tell me, I am not very good at this yet lol.
For clarification the friend of you in question, is a real life friend of you? Do I get that right?
"the approaches I have thought of seem likely to offend her, but I could be wrong and a direct statement may be the best idea." Why don't you just share with us what you ahve considered? That would give us way more background info in how to help you with your specific plan. Except for that this post seems fine for me now.
Depending on your friend and your relationship with her, broaching the topic may inevitably lead to a dent or break in the friendship regardless of the tone you use. Are you prepared for such an eventuality? If not, it may be better to stay out of it altogether.
The question title asserts that she getting into a long distance relationship isn't a good idea. I tried looking for why so, but couldn't find that in the body of the question. Would you mind describing why you think it's not likely to be good for her? And also, why you think it's your responsibility to warn her?
Do you have reason to believe their first ldr is not aware of and okay with the second one?
@Lost Soul the friend in question would be in 2 long distance romantic relationships at the same time, which I am pretty sure would not go well
But is the problem that your friend is pursuing another long-distance relationship, or that she's pursuing two relationships at once? And is the intention of your friend and Person 2 that Person 1 be kept in the dark about all of this?
I’ve learned that telling people I disagree about something is always going to carry the chance of upsetting them. It’s just going to be a risk; whether or not it’s worth it is up to you and your considerations.
If you do decide to tell them, and feel they’re open enough, they’ll listen to your concerns. They might disagree with it, but trust and bonds are formed with mutual respect and comfort in being able to have civil disagreements.
It’s very important you word your argument in a helpful, non-accusatory format. You want your friend to know you understand their feelings and want to help them... not blame them.
So in your particular case you could phrase something like:
I feel that X and Y (person) might discover they’re both in a relationship with you. This might really upset them and I don’t want to see you strain over a large argument/problem. It might be worth it to consider choosing one person over another so you don’t have to deal with that later.
Use your own observations and feelings. Don’t direct attention to them specifically, but the situation itself.
As to whether or not your concerns will be realized— for me, people have responded in one of two ways when it comes to an argument on how they’re managing a relationship:
They’re too wrapped up in their own feelings to really listen (often redirecting the conversation); ending up having to realize when it’s too late
They’ll genuinely listen to my concerns and provide additional feedback and help us both consider different options. They’ll make a decision based on how they feel after further thought.
Realize that emotions can be overwhelming and every bit of logic in the world can’t do much to convince someone to change their mind. Try and be there for your friend as best you can and make sure they know you’re on their side. They’ll appreciate that you care about them enough by displaying your genuine concern.
You disagree with something your friend is going to do and you would like to warn her that she is probably making a bad decision.
First, I would recommend to not be so blunt. People don't like when someone else is disagreeing with them, even more when the disagreement is about their life (and does not or has very little impact on the other person).
What I would suggest to do instead is to ask questions. Here, you want to make sure that your friend have think things through before taking the decision. So asking question about the points you worry about will help make sure of that.
For example, you can ask her:
Aren't you afraid that X will happen?
Where X is something you worry will happen.
However, before asking that, you will need to bring up the topic in a neutral way. If you sound judgmental or if your questions sound judgmental, then your friend will "close herself" and this will only bring bad feelings (when someone talks to me and I feel judged, I tend to want to do more of what the other person is badly judging me about).
Once you have start the conversation and ask your first question/worry, check how your friend seem to respond to the conversation. If she seems annoyed, I would suggest dropping the subject. If someone don't want to talk about something, trying to push more is very likely to end up in a "just mind your own business, would you". I know that my mother does that a lot to my big sister, and she is never happy with that.
If your friend is responding well to the conversation, you can start asking more questions. However, make sure to don't ask too much in a row or your friend might start to feel like she is a suspect being interrogated (my mother does that, it's annoying).
Hopefully, when the conversation is over, your friend will have plenty to think about and you less to worry about.
| 11,504
|
https://stackoverflow.com/questions/35397110
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,016
|
Stack Exchange
|
Joshua Ohana, Webberig, https://stackoverflow.com/users/1301428, https://stackoverflow.com/users/1425397, https://stackoverflow.com/users/3935218, user1301428
|
English
|
Spoken
| 529
| 890
|
Border and background inside of padding margin, with Bootstrap columns
I have repeating rows/columns setup with Bootstrap's grid system. I want to create padding between these elements, but have their border and background reside inside of that padding. I have tried using margin but that jacks with Bootstrap's grid layout on the column level.
The below is a very trimmed down version of what I'm working with, which illustrates the point. I would like to modify this so that the blue border hugs the white inner box, and you don't see any red (in my case it would show up behind text). I need to achieve this without modifying the essential html layout of what's there already, so relying just on CSS.
To clarify what I'm going after... I want to add padding between the rows & columns. If I just straight add padding to the outer div (as exists below) the border and background color extend outside of that padding. I want the border and the background color to exist within the boundaries of the padding I add.
I have tried using a variety of box-sizing settings to no avail, as well as all manner of padding/margin I could think of.
JSFiddle: https://jsfiddle.net/2v94yg2s/
HTML
<div class="container-fluid">
<div class="grid-data row">
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
<div class="col-md-4"><div></div></div>
</div>
</div>
CSS
.grid-data {
padding: 15px;
}
.grid-data > div {
padding: 15px;
height: 50px;
border: 1px solid blue;
background-color: red;
}
.grid-data > div > div {
background-color: white;
height: 100%;
width: 100%;
}
Wait, so you want the blue border to cover the red part? What's the point of having the red background then? Can you please clarify?
@user1301428 I added a clarification paragraph
Have you tried using box-sizing: border-box;? That would make the border appear inside the div rather than outside them (the default)
Ended up wrapping the repeat's contents inside another div, and only keeping the padding on the outer.
What you basically want is change the grid's "gutter".
If you want this to change globally in your website, the easy solution is to change the @grid-gutter-width variable in Bootstrap's "variables.less" file and rebuild your CSS.
If you want this for one specific feature, I'd recommend not using your grid for this. Generating an alternate grid with increased gutter is probably a bit of overkill, so you could roll your own CSS. Flexbox can be very useful and successful if you're not trying to mix it in the Bootstrap grid.
Thanks for the reply @Webberig, due to a whole slew of nonsense (I am working a huge app that another developer built, tackling just a few pages and dealing with a bunch of stuff all over the place), I cannot do that. There must be a way to dictate the border and background to go inside of the padding without resorting to such drastic measures, and without having to modify the html structure.
Just add an extra class to the containing element and you can override all default grid styles. No need to restructure but it's a maintenance nightmare.
Writing your own CSS for a multiple-column component is hardly drastic...
| 37,999
|
https://mni.wikipedia.org/wiki/%EA%AF%8E%20%EA%AF%82%EA%AF%A9%EA%AF%87%EA%AF%95%20%EA%AF%83%EA%AF%90%EA%AF%9D%EA%AF%97%20%EA%AF%80%EA%AF%A6%EA%AF%92%EA%AF%A6%EA%AF%85%20%EA%AF%8C%EA%AF%A8%EA%AF%9D%EA%AF%95%EA%AF%A4%20%EA%AF%91%EA%AF%A3%EA%AF%A2
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
ꯎ ꯂꯩꯇꯕ ꯃꯐꯝꯗ ꯀꯦꯒꯦꯅ ꯌꯨꯝꯕꯤ ꯑꯣꯢ
|
https://mni.wikipedia.org/w/index.php?title=ꯎ ꯂꯩꯇꯕ ꯃꯐꯝꯗ ꯀꯦꯒꯦꯅ ꯌꯨꯝꯕꯤ ꯑꯣꯢ&action=history
|
Manipuri
|
Spoken
| 33
| 393
|
ꯎ ꯂꯩꯇꯕ ꯃꯐꯝꯗ ꯀꯦꯒꯦꯅ ꯌꯨꯝꯕꯤ ꯑꯣꯢ ꯄꯥꯎꯔꯧ ꯑꯁꯤ ꯃꯃꯥꯡꯉꯩ ꯃꯩꯍꯧꯔꯣꯜꯗꯒꯤ ꯍꯧꯅ ꯀꯪꯂꯩꯄꯥꯛꯀꯤ ꯃꯤꯇꯩ ꯀꯥꯡꯂꯨꯞ (ꯃꯩꯇꯩ ꯀꯥꯡꯂꯨꯞ)ꯀꯤ ꯂꯥꯢꯒꯨꯝꯂꯕ ꯏꯄꯥ-ꯏꯄꯨ ꯑꯍꯜ-ꯂꯃꯟꯁꯤꯡꯅ ꯁꯛꯅ ꯁꯣꯟꯅꯕꯤꯔꯝꯕ ꯄꯥꯎꯔꯧ ꯄꯥꯎꯇꯥꯛ ꯑꯃꯅꯤ ꯫
ꯅꯨꯡꯒꯤ ꯋꯥꯍꯟꯊꯣꯛ
ꯁꯟꯗꯣꯛꯅ ꯇꯥꯛꯄ
ꯃꯇꯦꯡ ꯂꯧꯔꯛꯐꯝ
ꯃꯤꯇꯩ ꯄꯥꯎꯔꯧꯁꯤꯡ
| 19,921
|
https://pl.wikipedia.org/wiki/Elfik%20czarny
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Elfik czarny
|
https://pl.wikipedia.org/w/index.php?title=Elfik czarny&action=history
|
Polish
|
Spoken
| 138
| 363
|
Elfik czarny (Coeligena prunellei) – gatunek kolibra rodzaju Coeligena. Występuje w Kolumbijskich Andach.
Morfologia
Mierzy 11 cm, jest przeważnie czarny z białą obrożą na przejściu między szyją a klatką. Na gardle ma niebiesko-zieloną plamę a na skrzydle jest niebieski. Samica jest trochę ciemniejsza od samca.
Ekologia
Zamieszkuje zbocza Andów na wysokości od 1675 do 2500 m n.p.m. Jak każdy koliber jest bardzo energiczny, dlatego dziennie odwiedza ok. 2200 kwiatów dziennie. Żywi się nektarem z kwiatów takich gatunków jak na przykład Psammisia falcata. By uzupełnić niedobór białka' zjada też komary.
Status
Ptak ten ma ograniczony obszar lęgowy więc jest możliwość wyginięcia. Liczebność dorosłych osobników szacuje się na 2,500-9,999 i cały czas maleje. Głównymi zagrożeniami jest wylesianie w celach rolniczych lub w celach osiedlenia ludzi.
Przypisy
Gatunki narażone
Ptaki Ameryki Południowej
Kolibrowate
Gatunki i podgatunki zwierząt nazwane w 1843 roku
| 5,460
|
https://tg.wikipedia.org/wiki/%D0%9A%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%B0%D0%BD%20%D0%9B%D0%BE%D0%BF%D0%B5%D1%81
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Кристиан Лопес
|
https://tg.wikipedia.org/w/index.php?title=Кристиан Лопес&action=history
|
Tajik
|
Spoken
| 70
| 295
|
Кристиан Лопес Сантамария (; 27 апрели 1989, Кревилент, Испания) — футболбози испанӣ, .
Зиндагинома
Маснади бошгоҳӣ
Мунтахаби миллӣ
Эзоҳ
Пайвандҳо
Зодагони 27 апрел
Зодагони соли 1989
Ҳуҷумкунандагони футбол
Футболбозони Испания
Бозингарони БФ Alicante
Бозингарони БФ Реал Мадрид Кастила
Бозингарони БФ Валенсия Кф Местала
Бозингарони БФ Атлетико Балеарес
Бозингарони БФ Худдерсфилд Тоун
Бозингарони БФ Шрюсбури Тоун
Бозингарони БФ Нортгэмптон Тоун
Бозингарони БФ Бургос
Бозингарони БФ КФР Клуж
Бозингарони БФ РК ЛЕН
| 26,022
|
https://eu.wikipedia.org/wiki/Arthroleptis%20sylvaticus
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Arthroleptis sylvaticus
|
https://eu.wikipedia.org/w/index.php?title=Arthroleptis sylvaticus&action=history
|
Basque
|
Spoken
| 21
| 78
|
Arthroleptis sylvaticus Arthroleptis generoko animalia da. Anfibioen barruko Arthroleptidae familian sailkatuta dago, Anura ordenan.
Erreferentziak
Ikus, gainera
Arthroleptidae
Kanpo estekak
Arthroleptidae
| 1,780
|
https://zh-min-nan.wikipedia.org/wiki/Sarchahan
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Sarchahan
|
https://zh-min-nan.wikipedia.org/w/index.php?title=Sarchahan&action=history
|
Min Nan Chinese
|
Spoken
| 45
| 154
|
Sarchahan (Pho-su-gí: ) sī chi̍t ê tī Iran Islam Kiōng-hô-kok Hormozgan Séng Hajjiabad Kūn Tiong-iong Koān Siyahu Hiong ê chng-thâu. Tī 2006 nî phó͘-cha ê sî-chūn, chit-ê chng-thâu ū ê lâng tòa, chóng-kiōng ū hō͘ jîn-ke.
Chham-oa̍t
Iran ê chng-thâu
Chham-khó
Hajjiabad Kūn ê chng-thâu
| 37,449
|
https://en.wikipedia.org/wiki/Bihar%20and%20Orissa%20Province
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Bihar and Orissa Province
|
https://en.wikipedia.org/w/index.php?title=Bihar and Orissa Province&action=history
|
English
|
Spoken
| 581
| 902
|
Bihar and Orissa was a province of British India, which included the present-day Indian states of Bihar, Jharkhand, and Odisha. The territories were conquered by the British in the 18th and 19th centuries, and were governed by the then Indian Civil Service of the Bengal Presidency, the largest administrative subdivision in British India.
On 22 March 1912, both Bihar and Orissa divisions were separated from the Bengal Presidency as Bihar and Orissa Province. On 1 April 1936, the province was partitioned into Bihar and the Orissa Province.
History
In 1756, Bihar and Orissa were part of the Mughal Empire, with Bihar being part of the Bengal Subah and Orissa being its own Subah.
The Treaty of Allahabad was signed on 16 August 1765, between the Mughal Emperor Shah Alam II, son of the late Emperor Alamgir II, and Robert, Lord Clive, of the East India Company, as a result of the Battle of Buxar of 22 October 1764. The Treaty marks the political and constitutional involvement and the beginning of British rule in India. Based on the terms of the agreement, Alam granted the East India Company Diwani rights, or the right to collect taxes on behalf of the Emperor from the eastern province of Bengal-Bihar-Orissa.
Bihar and Orissa was separated from Bengal on 22 March 1912, with Patna as capital. A number of princely states, including the Orissa Tributary States, were under the authority of the provincial governor.
Dyarchy (1921–1937)
The Montagu–Chelmsford Reforms enacted through the Government of India Act 1919 expanded the Bihar & Orissa Legislative Council from 43 to 103 members. The Legislative Council now consisted of 2 ex-officio Executive Councillors, 25 nominated members (12 official, 13 non-official) and 76 elected members (48 Non-Muslim, 18 Muslim, 1 European, 3 Commerce & Industry, 5 Landholders and 1 University constituencies). The reforms also introduced the principle of dyarchy, whereby certain responsibilities such as agriculture, health, education, and local government, were transferred to elected ministers.
Division
On 1 April 1936, the province was divided into Bihar Province (which included present-day Bihar and Jharkhand states) and Orissa Province, and the Odia speaking princely states placed under the authority of the Eastern States Agency.
Governors of Bihar and Orissa
From 1912 to 1920, the province had a lieutenant governor heading the provincial government. This post was upgraded to governor in 1920, when Satyendra Prasanna Sinha, 1st Baron Sinha was appointed to fill it.
Lieutenant governors
1 April 1912 – 19 November 1915 Sir Charles Stuart Bayley (b. 1854 – d. 1935)
19 Nov 1915 – 5 April 1918 Sir Edward Albert Gait (1st term) (b. 1863 – d. 1950)
5 April 1918 – 12 July 1918 Sir Edward Vere Levinge (acting) (b. 1867 – d. 1954)
12 Jul 1918 – 29 December 1920 Sir Edward Albert Gait (2nd term) (s.a.)
Governors
29 Dec 1920 – 29 November 1921 Satyendra Prasanna Sinha, 1st Baron Sinha (b. 1864 – d. 1928)
29 Nov 1921 – 12 April 1922 Havilland Le Mesurier (acting) (b. 1866 – d. 1931)
12 Apr 1922 – 7 April 1927 Sir Henry Wheeler (b. 1870 – d. 1950)
7 April 1927 – 7 April 1932 Sir Hugh Lansdowne Stephenson (b. 1871 – d. 1950)
7 April 1932 – 1 April 1936 Sir James David Sifton (b. 1878 – d. 1952)
See also
Eastern States Agency
References
External links
History of Bihar
Provinces of British India
History of Odisha
History of Jharkhand
Bengal Presidency
1912 establishments in India
1936 disestablishments in India
| 7,678
|
https://nl.wikipedia.org/wiki/North%20and%20Middle%20Littleton
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
North and Middle Littleton
|
https://nl.wikipedia.org/w/index.php?title=North and Middle Littleton&action=history
|
Dutch
|
Spoken
| 25
| 45
|
North and Middle Littleton is een civil parish in het bestuurlijke gebied Wychavon, in het Engelse graafschap Worcestershire met 931 inwoners.
Civil parish in Worcestershire
| 36,154
|
https://nl.wikipedia.org/wiki/Bandsteltkluut
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Bandsteltkluut
|
https://nl.wikipedia.org/w/index.php?title=Bandsteltkluut&action=history
|
Dutch
|
Spoken
| 53
| 130
|
De bandsteltkluut (Cladorhynchus leucocephalus) is een vogel uit de familie Recurvirostridae (kluten).
Verspreiding en leefgebied
Deze soort is endemisch in zuidelijk en zuidwestelijk Australië. De bandsteltkluut bewoont zoutmeren in het binnenland of aan de kust waar hij zich voedt met kleine kreeftachtigen.
Externe link
Avibase
Kluten
Endemisch dier uit Australië
IUCN-status niet bedreigd
| 3,117
|
https://stackoverflow.com/questions/16753730
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,013
|
Stack Exchange
|
Ivan, John La Rooy, PSS, deufeufeu, https://stackoverflow.com/users/1219006, https://stackoverflow.com/users/174728, https://stackoverflow.com/users/2075565, https://stackoverflow.com/users/2139986, https://stackoverflow.com/users/41655, https://stackoverflow.com/users/594658, jamylak, millimoose
|
English
|
Spoken
| 640
| 1,205
|
Deleting parts of a big string given a list of indexes
Looks like a simple question, but having a string (huge, coming from a big file),
how to remove parts of the string between a pair of indexes (actually a list of pairs of indexes)
For example removeByIndex("Text aaa bbb", [(0,1), (5, 9)]) would return
ext bbb
The indexes are not overlapping.
It has to be efficient since the content is relatively big (up to a few hundreds of megs)
SUMMARY: so in any case solution seems to involve creating a new string and manually going over the index pair list, and adding the indexes that are not in the list.
Give an example, show some code.
is it a legit string(ASCII/UNICODE) or a string of bytes?
If the data is really big, use a more appropriate data structure, like one that text editors use. (A rope for instance.)
The plural of index is indices
@gnibbler And the plural of "octopus" is "octopodes" if you're being etymologically pedantic, but "indexes" is an accepted usage just like "octopuses" is, as most dictionaries should tell you.
Supposing that your pair (start,end) is not inclusive on end, I'll do this
(I've embedded a scalable test case so you can run some performance tests) :
N = 100000
s = ''.join([ chr(c % 26 + ord('a')) for c in range(N) ])
l = [ (26*i,26*i+3) for i in range(N//26) ]
l.sort(lambda x, y : cmp(x[0], y[0]))
ns = []
i = 0
for (start,end) in l:
ns.append(s[i:start])
i = end
ns.append(s[end:])
s = ''.join(ns)
With N = 100 000 000 (the order of your strings), this script runs under 30s. It's slow but might be bearable. Of course, the right data structure is a rope for this particular problem. So if you need to do lot of runs, you should probably either drop Python or use an appropriate data structure in Python.
It is that slow because your program is O(N^2) see: http://www.skymind.com/~ocrow/python_string/ To fix it make ns = [] and at the end ''.join(ns)
In fact, in this case, it doesn't change much. The limiting factor is both the slicing and the concatenation. Improving concatenation does not make up for the slow slicing.
Yeah involves a bit too much playing with the indexes (keeping the track in the i variable), but seems to be necessary
"If you need to do a lot of runs, you should probably drop Python" - or, you know, use ropes in Python. It's a data structure, they're rarely specific to a language. (Although it might still be a good idea to implement said data structure as a C extension.)
You're right. In my mind, I was targeting max efficiency for this issue. But I guess rope in Python would be OK too. I'll modify my answer.
Don't worry about performance until you've shown that it's a bottleneck
s = s[:i] + s[j:]
If that's not fast enough you can't use Python - or C. You'll have to choose a better datastructure
Beware, by doing this you break indexes. So the pairs to remove will be invalid after the first deletion.
@deufeufeu, There's no need to rebuild the string over and over. The pairs of indices should be sorted so you can use a generator expression and "".join()
from itertools import izip
def grouped(iterable, n):
return izip(*[iter(iterable)]*n)
big_str="12345893483104921420948124"
indexes = [2,4,5,7]
# if needed, indexes = sorted(indexes)
indexes.insert(0, 0)
indexes.append(len(big_str))
sm_str=""
for a,b in grouped(indexes,2):
sm_str=sm_str+big_str[a:b]
How fast do you need it to be, try:
In [9]: import string
In [10]: import random
In [11]: huge=''.join(random.choice(string.lowercase) for x in range(10000))
In [12]: len(huge)
Out[12]: 10000
In [13]: not_sohuge=huge[0:5000]+huge[6000:]
In [14]: len(not_sohuge)
Out[14]: 9000
Some timings:
$ python -m timeit -s 'import random; import string; huge="".join(random.choice(string.lowercase) for x in range(10000))' 'not_sohuge=huge[0:5000]+huge[6000:]'
100000 loops, best of 3: 2.96 usec per loop
| 1,048
|
https://ru.wikipedia.org/wiki/%D0%9A%D0%B2%D0%B0%D0%BD%D0%B7%D0%B0%20%28%D1%80%D0%B5%D0%BA%D0%B0%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Кванза (река)
|
https://ru.wikipedia.org/w/index.php?title=Кванза (река)&action=history
|
Russian
|
Spoken
| 89
| 251
|
Ква́нза — река в Анголе. Впадает в Атлантический океан к югу от столицы страны, Луанды. Длина — 965 км, площадь бассейна — 152 570 км². Основное направление течения — северо-запад.
Река является источником электроэнергии для Анголы. На реке в 2007 году в районе Маланже построена ГЭС. Гидроэлектростанция также обеспечивает подачу воды для орошения плантаций сахарного тростника и других культур в нижней части долины Кванза. Низовья реки судоходны на протяжении 240 км. В честь реки названа национальная валюта Анголы — Кванза.
Примечания
Реки, впадающие в Атлантический океан (Африка)
Реки Анголы
| 29,951
|
https://stackoverflow.com/questions/72005390
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,022
|
Stack Exchange
|
Salsa Steve, Yilmaz, https://stackoverflow.com/users/10262805, https://stackoverflow.com/users/10687191
|
English
|
Spoken
| 164
| 346
|
How to compare in terms of ether with chai?
I have tried comparing a couple ways. I really wanted to compare in ETH terms. I have tried using formatEther but it returns a string. How can I compare this easily in terms of ETH?
const ownerBal = await ethers.provider.getBalance(accounts[0].address);
expect(BigNumber.from(ownerBal)).to.be.closeTo(
BigNumber.from(1000),
BigNumber.from(1)
);
What are you testing? The purpose of testing is to apply some operation and see the operation behaves as expected or not
I was testing my withdraw method in my nft contract. I didnt understand why ether was returns as a big number or a string. Both were usable by the expect function unless i wanted to work in wei. @Yilmaz
I ended up parsing the float from the string. To then round it and compare it as a number.
async function formatBalance(
address: string,
fractionDigits: number
): Promise<number> {
const bn = await ethers.provider.getBalance(address);
const bal = formatEther(bn);
return parseFloat(parseFloat(bal).toFixed(fractionDigits));
}
const contractBalNew = await formatBalance(contractA.address, 2);
expect(contractBalNew).to.be.equal(0);
expect(contractBalNew).to.be.within(10003, 10004);
| 48,949
|
https://en.wikipedia.org/wiki/R%C3%ADo%20Limpio
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Río Limpio
|
https://en.wikipedia.org/w/index.php?title=Río Limpio&action=history
|
English
|
Spoken
| 23
| 46
|
Río Limpio is a town in the Elías Piña province of the Dominican Republic.
Sources
– World-Gazetteer.com
Populated places in Elías Piña Province
| 3,349
|
https://no.wikipedia.org/wiki/Fuglafjellet
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Fuglafjellet
|
https://no.wikipedia.org/w/index.php?title=Fuglafjellet&action=history
|
Norwegian
|
Spoken
| 49
| 118
|
Fuglafjellet er et fjell nordøst for Kvamskogen i Kvam kommune, Hordaland. Fjellet er det høyeste fjellet i området mellom Bergsdalen og Kvamskogen, og toppen er også det høyeste punkt i Kvam kommune.
Fotnoter
Referanser
Eksterne lenker
UT.no, Turbeskrivelse med kart og bilde
Fjell i Kvam
Fjell over 1000 meter
| 40,174
|
https://serverfault.com/questions/735735
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,015
|
Stack Exchange
|
Anthony Griggs, https://serverfault.com/users/256639, https://serverfault.com/users/321769, yagmoth555
|
English
|
Spoken
| 1,199
| 2,074
|
Server 2012 R2 Installed AD DC and Lost Internet Access
I am a developer and new to set up and server config... so please forgive my full lack of understanding. I am using a 1&1 Cloud Server with Server 2012 R2 Standard and am trying to set it as an AD DC for a new forest.
My lack of understanding comes into play with 1&1's Hosted Private Network and how it should relate to setting the Static IP on the AD DC. I've created the Hosted Private Network and added the servers to the Hosted Private Network that I want to be within the forest... as soon as I add the AD DC role to the DC Server internet Access cuts out.
I'm going round and round and not finding any documented step by step examples of setting this up with 1&1 so any help would be GREATLY appreciated!
Windows IP Configuration
Host Name . . . . . . . . . . . . : IDMS-ADDC
Primary Dns Suffix . . . . . . . : foobar.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : foobar.com
Ethernet adapter Ethernet1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-50-56-06-02-41
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::c539:5d2c:557c:86a9%25(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 419450966
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-D4-C9-AA-00-50-56-1A-23-14
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet0:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
Physical Address. . . . . . . . . : 00-50-56-1A-23-14
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::3c37:372b:29a8:3909%12(Preferred)
IPv4 Address. . . . . . . . . . . : 70.xx.xx.xx(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Lease Obtained. . . . . . . . . . : Thursday, November 12, 2015 6:05:43 PM
Lease Expires . . . . . . . . . . : Friday, November 13, 2015 6:05:43 AM
Default Gateway . . . . . . . . . : 10.255.255.1
DHCP Server . . . . . . . . . . . : 70.xx.xx.xx
DHCPv6 IAID . . . . . . . . . . . : 302010454
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-D4-C9-AA-00-50-56-1A-23-14
DNS Servers . . . . . . . . . . . : ::1
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{611C9B6D-B30A-4538-AF1A-88AAD48ED141}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter 6TO4 Adapter:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft 6to4 Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2002:4623:c945::4623:c945(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 385875968
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-D4-C9-AA-00-50-56-1A-23-14
DNS Servers . . . . . . . . . . . : ::1
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.{7B88D73C-D6EA-451F-85E0-E001058D9133}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Please see that example to give you an idea on how to create the VPN, it's well illustrated;
https://support.software.dell.com/kb/sw10572
nb; This example use a sonicwall & azure.
For the Internet cut off, I suspect a DNS's configuration error. Check the server DNS forwarder.
To configure a DNS server to use forwarders using the Windows interface
Open DNS Manager.
In the console tree, click the applicable DNS server.
Where?
DNS/Applicable DNS server
On the Action menu, click Properties.
On the Forwarders tab, under DNS domain, click a domain name.
Under Selected domain's forwarder IP address list, type the IP address of a forwarder, and then click Add.
Thank you very much for replying! I misphrased the "VPN" it is actually a hosted private network... would this be handled any differently?
@AnthonyGriggs Hi, no, as your network have to talk there anyhow in both direction. The methodology can be a vpn, even if the term change. (to connect to the hosted private network, you would use a vpn or something else is what I mean). Please give us an ipconfig /all from that hosted server and one from a computer in your lan (update your question). That will give us an idea
I've added the ipconfig/all... please forgive the formatting... for some reason it didn't format right. Also note that I've set my hosted network address at: 192.168.0.0 and subnet of: 255.255.255.0
@AnthonyGriggs Thanks. The DC got 2 NIC ? One on the internet and one in the LAN as I see it ? Multi-homing a DC is a bad practice at first. I start to doubt any connection is secured to the hoster. It's a bad thing
Thank you very much for your help... We got it rolling with your help. Sorry not enough cred on ServerFalult to upvote.
| 42,858
|
https://fi.wikipedia.org/wiki/Peter%20James%20Cullinane
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Peter James Cullinane
|
https://fi.wikipedia.org/w/index.php?title=Peter James Cullinane&action=history
|
Finnish
|
Spoken
| 64
| 180
|
Peter James Cullinane (s. 29. marraskuuta 1936 Dannevirke) on uusiseelantilainen roomalaiskatolinen piispa. Hänet vihki papiksi Wellingtonin arkkihiippakuntaan Giuseppe Siri 13. joulukuuta 1961. Hänet nimitettiin Palmerston Northin hiippakunnan johtoon 6. maaliskuuta 1980, ja hänet konsekroi 23. huhtikuuta Thomas Stafford Williams, jota avustivat Owen Noel Snedden ja Edward Russell Gaines.
Cullinane jäi eläkkeelle 22. helmikuuta 2012.
Lähteet
Uusiseelantilaiset papit
Katoliset piispat
Vuonna 1936 syntyneet
Elävät henkilöt
| 6,733
|
https://stackoverflow.com/questions/43574342
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,017
|
Stack Exchange
|
AL., https://stackoverflow.com/users/4625829
|
English
|
Spoken
| 486
| 1,079
|
Firebase token is null when I run the app for the first time
I'm trying to retrieve a firebase token, but when I ran the app for the first time, the firebase token was null. I don't know why. When I ran the app for the second time I got the token. I saw another post with a similar question but I didn't understand it.
This is my code :
public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService {
private static final String LOGTAG = "android-fcm";
@Override
public void onTokenRefresh() {
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
storeTokenInPref(refreshedToken);
}
private void storeTokenInPref(String token) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = preferences.edit();
editor.putString("regId", token);
editor.apply();
}
I have a fragment where you can get the token of preferences, and then I want to compare if token is inside the database.
public class Profile extends Fragment implements MainActivity.OnBackPressedListener{
private View view;
private SharedPreferences preferences;
private String token;
private static final String LOGTAG = "android-fcm";
public Profile(){}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.profile, container, false);
((MainActivity) getActivity()).setOnBackPressedListener(this);
preferences = PreferenceManager.getDefaultSharedPreferences(getContext());
displayFirebaseToken();
return view;
}
private void displayFirebaseToken() {
token = preferences.getString("regId", null);
Log.e(LOGTAG, "Firebase reg id: " + token);
if (!TextUtils.isEmpty(token)) {
SQLiteHelper database = new SQLiteHelper(getActivity(), "DB", null, 1);
List<Beacon> beaconList = database.getAllBeacons();
String classroom = "";
for (int i = 0; i < beaconList.size(); i++) {
if (beaconList.get(i).getId().equals(token)) {
classroom = beaconList.get(i).getClassroom();
break;
}
}
classroomTextView.setText(classroom);
}else {
System.out.println("Firebase token is not received yet!");
}
}
It is possible to receive a null token when calling getToken() (see the docs).
So it is highly possible that the token is still being generated the first time you run your app. In your post, you already have onTokenRefresh() implemented. Could you verify if it is called after calling getToken() for sometime? If it does, then this should just be the intended behavior.
This happens because onTokenRefresh() and storeTokenInPref() have not been called yet by the time that you are trying to use the value in displayFirebaseToken(). You need to wait with using the token until it is available. In general there is no hard rule how long that will take, as it depends on factors like network connectivity.
Try This
private void displayFirebaseToken() {
token = preferences.getString("regId", null);
if(token==null)
token = FirebaseInstanceId.getInstance().getToken();
Log.e(LOGTAG, "Firebase reg id: " + token);
if (!TextUtils.isEmpty(token)) {
SQLiteHelper database = new SQLiteHelper(getActivity(), "DB", null, 1);
List<Beacon> beaconList = database.getAllBeacons();
String classroom = "";
for (int i = 0; i < beaconList.size(); i++) {
if (beaconList.get(i).getId().equals(token)) {
classroom = beaconList.get(i).getClassroom();
break;
}
}
classroomTextView.setText(classroom);
}else {
System.out.println("Firebase token is not received yet!");
}
Since you are trying to get saved the device token by method onTokenRefresh() which is not called till the token will be refreshed you need to get it manually using `
FirebaseInstanceId.getInstance().getToken();
by using this snippet of code you can get your device token any where in your app
`
| 33,280
|
https://stackoverflow.com/questions/77751994
|
StackExchange
|
Open Web
|
CC-By-SA
| null |
Stack Exchange
|
Linda Lawton - DaImTo, Ron Rosenfeld, Yrll, https://stackoverflow.com/users/1841839, https://stackoverflow.com/users/18422887, https://stackoverflow.com/users/2872922
|
English
|
Spoken
| 250
| 322
|
Quota limit for google API distance matrix & Excel VBA queries
i'm using excel with VBA and the google API distance matrix to calculate distances between two locations each time for a long list of locations.
I use a google API with activated billing account associated to the API.
I use serviceweb in excel to retrieve the distance from google.
The formula in excel works fine but only for three queries, after I need to wait for a minute to resend three more.
In the quota page of google I see this:
enter image description here
But it's not possible to extend the quota even though I have billing account associated.
is there something I'm doing wrong ? I would like to use the formula on several hundreds of lines containing the locations (each time to get distance between two different locations).
Thanks a lot for your help !!
I cannot change the quotas in google.
I looked at the quotas under the section "Premium plan Javascript API elements" and "Premium plan web service elements" and they would be perfect as the limit is super high but I can't get those to work..
For a related problem with quotas, I found the Google help personnel to be extremely helpful. I believe this was via chat.
You have to apply for quote increases
Welcome to Stack Overflow! As mentioned in the comments above, you need to file a support case for issues like this. Here's a link on how to: https://developers.google.com/maps/support#contact-maps-support
| 766
|
https://ceb.wikipedia.org/wiki/Lac%20au%20Vent%20%28lanaw%20sa%20Abitibi-T%C3%A9miscamingue%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Lac au Vent (lanaw sa Abitibi-Témiscamingue)
|
https://ceb.wikipedia.org/w/index.php?title=Lac au Vent (lanaw sa Abitibi-Témiscamingue)&action=history
|
Cebuano
|
Spoken
| 156
| 244
|
Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Lac au Vent.
Lanaw ang Lac au Vent sa Kanada. Nahimutang ni sa kondado sa Abitibi-Témiscamingue ug lalawigan sa Québec, sa habagatan-sidlakang bahin sa nasod, km sa amihanan-kasadpan sa Ottawa ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Lac au Vent. Lac au Vent nga nahimutang sa mga lanaw sa Lac aux Sables Lac Froid, ug Lac Morand. Ang kinahabogang dapit sa palibot dunay gihabogon nga ka metro ug km sa sidlakan sa Lac au Vent. Hapit nalukop sa lasang nga sagolsagol ang palibot sa Lac au Vent.
Ang klima hemiboreal. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hulyo, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Agosto, sa milimetro nga ulan, ug ang kinaugahan Pebrero, sa milimetro.
Saysay
Ang mga gi basihan niini
Mga lanaw sa Québec (lalawigan)
| 11,833
|
https://stackoverflow.com/questions/74634860
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,022
|
Stack Exchange
|
Ankit0395, Darren, Marko E, https://stackoverflow.com/users/13084517, https://stackoverflow.com/users/2833275, https://stackoverflow.com/users/8343484, https://stackoverflow.com/users/9337568, jipot
|
Danish
|
Spoken
| 364
| 660
|
MissingSecurityHeader error for S3 bucket ACL
I have the following s3 bucket defined:
module "bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "3.1.0"
bucket = local.test-bucket-name
acl = null
grant = [{
type = "CanonicalUser"
permission = "FULL_CONTROL"
id = data.aws_canonical_user_id.current.id
}, {
type = "CanonicalUser"
permission = "FULL_CONTROL"
id = data.aws_cloudfront_log_delivery_canonical_user_id.cloudfront.id
}
]
object_ownership = "BucketOwnerPreferred"
}
But when I try to terraform apply this, I get the error:
Error: error updating S3 bucket ACL (logs,private): MissingSecurityHeader: Your request was missing a required header status code: 400
This error message is not very specific. Am I missing some type of header?
Based on the module code, I think acl = null has to be actually acl = "null": https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/blob/master/main.tf#L44.
@MarkoE - really good idea I thought that would fix it but alas still getting the same cryptic error :(
have you tried leaving out the variable since you don't need it ?
I hit this when updating the AWS provider from 4.x to 5.3.0 where some buckets previously had an ACL of private and it was wanting to set them to null, like the previous answer.
However, the issue for me was just transitive - running terraform apply a second time came back No changes. Your infrastructure matches the configuration. I didn't need to modify any ACLs manually.
A bug report has been opened with the AWS provider to avoid the need to do terraform apply a second time. See here: https://github.com/hashicorp/terraform-provider-aws/issues/31633
I came across the same issue.
I was trying to update an ACL on a bucket which had previously had private set as the ACL and then modifying my terraform code to match manually created entries on the ACL that someone had done via the GUI.
To get it working for me, I removed one of the ACL entries from the S3 bucket manually of which I was trying to add to the bucket and then re-ran the terraform and it worked without an error
I see the same error in cloudtrail also.
Its like you cant set private acl to null without adding an ACL entry
Thanks this helped me as well, but is there a long term solution to this?
| 12,823
|
https://en.wikipedia.org/wiki/Sugar%20%28Robin%20Schulz%20song%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Sugar (Robin Schulz song)
|
https://en.wikipedia.org/w/index.php?title=Sugar (Robin Schulz song)&action=history
|
English
|
Spoken
| 435
| 636
|
"Sugar" is a song by German DJ and record producer Robin Schulz. It features the vocals from Canadian singer Francesco Yates. The song was released in Germany on 17 July 2015 as the second single from his second studio album of the same name. It interpolates Baby Bash's 2003 single "Suga Suga".
Music video
The music video for this song was released onto YouTube on 24 July 2015 and runs for a total length of three minutes and forty-two seconds. Yates is seen in the video along with a rogue police officer, Officer Finkleman (played by comedian Nathan Barnatt), who gyrates and grooves to the tune of the song while driving. Schulz also appears on a billboard for a concert. In the end, references are made to the music video of Baby Bash's "Suga Suga" when the police officer dresses in the clothes that match those of Baby Bash in that video: a green T-shirt over a white T-shirt, baggy jeans, a chain and a white beanie. At the end of the video, his car meets an accident and tumbles upside down, albeit still leaving the officer dancing as additional police cars arrive at the scene.
Chart performance
The song has become Schulz's most successful song from the album. "Sugar" was a hit in many European countries, peaking atop the singles chart of seven countries including Austria, Germany and Switzerland, where it became his third chart-topper single in all these countries following 2014's singles "Waves" and "Prayer in C". It also attained to peak at number one in the Czech Republic, Hungary, Poland, and Slovenia. In the United Kingdom, "Sugar" outperformed the album's lead single "Headlights" charting in the top 40 at number 21 and was certified double platinum by the British Phonographic Industry (BPI).
In the United States, the song also became a hit, charting on the Billboard Hot 100 chart at number 44, where it became his third highest-charting single after "Waves" at number 14, and "Prayer in C" at number 23, in 2014. "Sugar" is the only song from the album to chart on the Billboard Hot 100, and was certified platinum by the Recording Industry Association of America (RIAA). The song was certified gold in Austria, platinum in the US, and double platinum in Australia, Germany, and Switzerland, and five-times platinum in Italy.
Track listing
Charts
Weekly charts
Year-end charts
Certifications
Release history
References
2015 songs
2015 singles
Number-one singles in Austria
Number-one singles in Germany
Number-one singles in Switzerland
Tropical house songs
Songs written by Happy Perez
Songs written by Robin Schulz
Robin Schulz songs
Songs written by Jürgen Dohr
| 18,697
|
https://te.wikipedia.org/wiki/%E0%B0%AC%E0%B0%A6%E0%B1%8D%E0%B0%B2%E0%B0%BE
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
బద్లా
|
https://te.wikipedia.org/w/index.php?title=బద్లా&action=history
|
Telugu
|
Spoken
| 72
| 500
|
బద్లా 2019లో విడుదలైన హిందీ సినిమా. రెడ్ చిల్లీస్ ఎంటర్టైన్మెంట్, అజూర్ ఎంటర్టైన్మెంట్ బ్యానర్లపై గౌరీఖాన్, సునీర్ ఖేతెర్పాల్, అక్షీపూరీ నిర్మించిన ఈ సినిమాకి సుజాయ్ ఘోష్ దర్శకత్వం వహించాడు. తాప్సీ పన్ను, అమితాబ్ బచ్చన్, అమ్రితా సింగ్, మానవ కౌల్ ప్రధాన పాత్రల్లో నటించిన ఈ సినిమా ట్రైలర్ను
ఫిబ్రవరి 12న విడుదల చేసి, సినిమాను మార్చి 8న విడుదల చేశారు.
నటీనటులు
తాప్సీ పన్ను
అమ్రితా సింగ్
టోనీ ల్యూక్
మానవ కౌల్
తన్వీర్ ఘని
డెన్జిల్ స్మిత్
ఆంటోనియో ఆకీల్
షోమ్ మఖిజ
ఎలెనా ఫెర్నాండెస్
మూలాలు
బయటి లింకులు
2019 తెలుగు సినిమాలు
2019 సినిమాలు
| 18,279
|
https://war.wikipedia.org/wiki/Verrucaria%20fusconigrescens
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Verrucaria fusconigrescens
|
https://war.wikipedia.org/w/index.php?title=Verrucaria fusconigrescens&action=history
|
Waray
|
Spoken
| 45
| 90
|
An Verrucaria fusconigrescens in uska species han Fungi in nahilalakip ha divisio nga Ascomycota, ngan nga ginhulagway ni William Nylander. An Verrucaria fusconigrescens in nahilalakip ha genus nga Verrucaria, ngan familia nga Verrucariaceae. Waray hini subspecies nga nakalista.
Mga kasarigan
Mga sumpay ha gawas
Verrucaria
| 46,083
|
https://war.wikipedia.org/wiki/Eremothecella
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Eremothecella
|
https://war.wikipedia.org/w/index.php?title=Eremothecella&action=history
|
Waray
|
Spoken
| 30
| 67
|
An Eremothecella in uska genus han Fungi. An Eremothecella in nahilalakip ha familia nga Arthoniaceae.
An kladograma hini sumala ha Catalogue of Life:
Mga kasarigan
Mga sumpay ha gawas
Eremothecella
| 10,500
|
https://stackoverflow.com/questions/33750284
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,015
|
Stack Exchange
|
Shahzad Barkati, https://stackoverflow.com/users/3445324
|
English
|
Spoken
| 149
| 427
|
Websql Database insert data into one table not another?
Hello Friend I Face a Strange Problem. I developing the PHP Desktop Application,
And I am using the websql Database.When I submitted the Data into users table
Data Submitted Successfully.But When I submitted to another Table Data is not
Submitted.table Structure is same.I don't Know what to do for this?
Please help. Here is my code...
<?php
session_start();
//$WindowUser = getenv('username');
//$myPDO = new PDO("sqlite:C:/Users/".$WindowUser."/Desktop/barber_shop/webcache/databases/http_127.0.0.1_51915/2");
include("../sqlitePhpDatabase/sqlitePhpDatabase.php");
$store_name = $_POST['store_name'];
$street = $_POST['street'];
$status = $_POST['status'];
$location_id = $_POST['location_id'];
$sth = $myPDO->exec("INSERT INTO bs_stores(store_name,street, status,location_id)VALUES('store_name','$street','$status','$location_id')");
//$sth = $myPDO->exec("INSERT INTO bs_locations(city)VALUES('rere')");
if(isset($sth) && !empty($sth))
{
echo "done";
}
else
{
echo "data is not submiting";
} ?>
please show your code.
Try this code for copy all data :-
INSERT INTO tab1 SELECT * FROM tab2;
or this for copy selected data:-
INSERT INTO tab1
SELECT col1,
col2,
col3,
NULL
FROM tab2
| 10,554
|
https://ru.wikipedia.org/wiki/%D0%93%D0%BE%D0%B2%D0%BE%D1%80%D0%BE%D0%B2%2C%20%D0%98%D0%B3%D0%BE%D1%80%D1%8C%20%D0%92%D0%B0%D1%81%D0%B8%D0%BB%D1%8C%D0%B5%D0%B2%D0%B8%D1%87
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Говоров, Игорь Васильевич
|
https://ru.wikipedia.org/w/index.php?title=Говоров, Игорь Васильевич&action=history
|
Russian
|
Spoken
| 453
| 1,396
|
И́горь Васи́льевич Го́воров (10 сентября 1972, Каратау, Джамбульская область, Казахская ССР — 30 апреля 2012, Санкт-Петербург) — российский и педагог, доктор исторических наук (2004), профессор, профессор Санкт-Петербургского университета МВД России, полковник полиции.
Биография
Родился в 1972 г. в г. Каратау (Казахстан) в семье молодых специалистов, направленных туда после окончания вуза. В 1989 г. окончил среднюю школу № 2 г. Петрозаводска и поступил
на исторический факультет Петрозаводского государственного университета, который с отличием закончил в 1994 г.
Дальнейшая служебная и научная карьера И. В. Говорова была связана с органами внутренних дел МВД России, вузами Санкт-Петербурга. С 1994 г. — на службе в центральном аппарате МВД Республики Карелия. Затем поступил и в 1998 г. окончил адъюнктуру Санкт-Петербургской академии МВД России. В 1998 г. защитил диссертацию на соискание ученой степени кандидата исторических наук «Репатриация на Северо-Западе РСФСР 1944—1949 гг.» С августа 1998 г. И. В. Говоров работал на кафедре истории (впоследствии — истории государства и права) Санкт-Петербургского университета МВД России.
В 2004 г. защитил диссертацию на соискание ученой степени доктора исторических наук «Государство и преступность в советской России (1945—1953 гг.)».
30 апреля 2012 г. по пути на работу был смертельно травмирован автомобилем. Похоронен на кладбище с. Рыкань Новоусманского района Воронежской области.
Основные труды
Говоров И. В. Разгул преступности в послевоенном Ленинграде и области // Вопросы истории. 2003. № 4. С. 139—144.
Говоров И. В. Преступность и борьба с ней в послевоенном Ленинграде (1945—1955): опыт исторического анализа. — СПб.: Изд-во С.-Петерб. ун-та, 2004. 501 с.
Говоров И. В., Кокуев С. Б. Теневая экономика и борьба с ней в Ленинграде в 1930—1940-х гг. // Вопросы истории. 2008. № 12. С. 24—35.
Говоров И. В. «Продажны все!» Коррупционный скандал в руководстве Санкт-Петербургской полиции // История Петербурга. 2010. № 4. С. 59—66.
Говоров И. В. «Товарищ взятка»: взяточничество в жизни послевоенного Ленинграда // Новейшая история России: время, события, люди: Сб. статей и воспоминаний (к 75-летию почетного профессора СПбГУ Г. Л. Соболева) / под ред. М. В. Ходякова. СПб.: Фора-принт, 2010. С. 349—361.
Говоров И. В. «Товарищ взятка»: Взяточничество в жизни послевоенного Ленинграда (1945—1953) // Москва: Научная цифровая библиотека PORTALUS.RU. Дата обновления: 18 октября 2010. URL: https://portalus.ru/modules/rushistory/rus_readme.php?subaction=showfull&id=1287427871&archive=1398261453&start_from=&ucat=& (дата обращения: 18.07.2021).
Говоров И. В. Коррупция в условиях послевоенного сталинизма (на материалах Ленинграда и Ленинградской области) // Новейшая история России. 2011. № 1. 66—81.
Говоров И. В. Проблема коррупции в российской полиции на рубеже XIX—XX вв. // Новейшая история России. 2011. № 2. С. 122—140.
Говоров И. В. Государство и преступность в сталинской России. 1945—1953 гг.: на материалах послевоенного Ленинграда. — М.: Олма : Торговый дом «Абрис», 2019. 559 с.
Литература
Памяти Игоря Васильевича Говорова (10.09.1972—30.04.2012) // Новейшая история России. 2012. № 3. С. 280—283.
Савицкий И. Памяти Игоря Васильевича Говорова // Петрозаводский университет. 2012. 14 сентября. № 28 (2258). С. 6.
Краеведы Санкт-Петербурга
| 25,964
|
https://cy.wikipedia.org/wiki/Calino%20Polygame
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Calino Polygame
|
https://cy.wikipedia.org/w/index.php?title=Calino Polygame&action=history
|
Welsh
|
Spoken
| 179
| 391
|
Ffilm fud (heb sain) gan y cyfarwyddwr Jean Durand yw Calino Polygame a gyhoeddwyd yn 1911. Fe'i cynhyrchwyd yn Ffrainc. Sgwennwyd y sgript yn wreiddiol yn Ffrangeg.
Y prif actor yn y ffilm hon yw Gaston Modot. Cafodd ei ffilmio mewn du a gwyn. Gan fod y ffilm wedi ei chyhoeddi dros 95 mlynedd yn ôl, mae yn y parth cyhoeddus.
Fel y nodwyd, cyhoeddwyd y ffilm yn 1911. Ffilm fwyaf poblogaidd y flwyddyn honno oedd Uffern Dante (L'Inferno’), sef ffilm o’r Eidal gan Giuseppe de Liguoro a Francesco Bertolini.
Cyfarwyddwr
Ganwyd y cyfarwyddwr ffilm Jean Durand ar 15 Rhagfyr 1882 ym Mharis a bu farw yn yr un ardal ar 4 Gorffennaf 1981. Roedd yn fwyaf cynhyrchiol yn 1908 ond ni ellir dweud fod y gwaith wedi cyrraedd enwogrwydd byd-eang.
Derbyniad
Gweler hefyd
Cyhoeddodd Jean Durand nifer o ffilmiau gan gynnwys y canlynol:
Cyfeiriadau
Ffilmiau gan gyfarwyddwyr ffilm gwrywaidd
Ffilmiau du a gwyn
Ffilmiau du a gwyn o Ffrainc
Ffilmiau mud o Ffrainc
Ffilmiau o Ffrainc
Ffilmiau mud
Ffilmiau 1911
Ffilmiau gyda llai na 10 o actorion lleisiol
| 38,377
|
https://en.wikipedia.org/wiki/Denys%20Hawthorne
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Denys Hawthorne
|
https://en.wikipedia.org/w/index.php?title=Denys Hawthorne&action=history
|
English
|
Spoken
| 462
| 681
|
Denys Vernon Hawthorne (9 August 1932 – 16 October 2009) was an actor from Northern Ireland who was known for his work in theatre, film, television and radio.
Life
Denys Hawthorne was born into an upper middle-class Protestant family in Portadown, County Armagh in 1932; his father had a linen business. He studied law at Queen's University Belfast, and afterwards joined the Ulster Group Theatre; other actors in the company included Patrick Magee, James Ellis, Stephen Boyd and Colin Blakely. The company produced modern classics, and plays by new Irish writers including Joseph Tomelty and Brian Friel.
He moved to London. He was a success as the Old Man in The Chairs by Eugène Ionesco, at the Royal Court Theatre (1957), and also in 1960 playing Stephen Dedalus in Bloomsday, a dramatization of James Joyce's Ulysses, at the Unity Theatre. He joined the BBC radio drama repertory company, where during his career he was much in demand. He read poetry on the radio, particularly of Louis MacNeice's poetry after his death in 1963. In 1972 he became producer of BBC Northern Ireland radio drama, holding the position for 18 months.
On TV, Hawthorne appeared in Dr. Finlay's Casebook and 46 episodes of the series Within These Walls (1974–1978). He appeared as Mr Starling, the first-ever headteacher, in Grange Hill (1978), the Doctor Who adventure Terror of the Vervoids (1986), in Capital City (1989–1990), in the BBC drama Dangerfield (1995) and in the Father Ted episode Tentacles of Doom (1996).
In 1981 he appeared in Chekhov's The Seagull at the Dublin Theatre Festival, and in that year he toured with the Irish Theatre Company's production of The Scythe and the Sunset by Denis Johnston. He was with the Royal Shakespeare Company at the Barbican Centre in 1992 and 1993, appearing in Romeo and Juliet and as King Duncan in Macbeth.
He appeared in the film The Russia House (1990) and in the film In the Name of the Father (1993). He played Mr Woodhouse in the film Emma (1996).
Among several official recognitions, Denys Hawthorne was awarded a Society of Authors' prize for his dramatization of Jennifer Johnston's novel How Many Miles to Babylon?
In 1970 he married Rita Christina, becoming stepfather to her three children. His career ended after suffering a stroke which affected his memory. He died at his home in Hove, East Sussex in 2009, and was survived by his wife and stepchildren.
Filmography
References
External links
1932 births
2009 deaths
Alumni of Queen's University Belfast
People from Portadown
20th-century male actors from Northern Ireland
Male film actors from Northern Ireland
Male radio actors from Northern Ireland
Male stage actors from Northern Ireland
Male television actors from Northern Ireland
Protestants from Northern Ireland
Actors from County Armagh
People from Hove
| 19,973
|
https://stackoverflow.com/questions/56682246
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,019
|
Stack Exchange
|
Banana Boat, Smbat Poghosyan, https://stackoverflow.com/users/11431007, https://stackoverflow.com/users/11647415
|
English
|
Spoken
| 84
| 148
|
Can you import a bitbucket project using the GitLab API?
I am looking for a way to directly import a project from bitbucket using the Python GitLab API. I know that this can be done for Github projects (https://docs.gitlab.com/ee/api/import.html), however I can't seem to find a way to do this for bitbucket. Any help would be greatly appreciated.
Please read this https://docs.gitlab.com/ee/user/project/import/bitbucket.html
@SmbatPogosyan Thanks, I have read that but I need to be able to do this using the Gitlab API not the UI
| 45,970
|
https://stackoverflow.com/questions/50143375
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Quentin, https://stackoverflow.com/users/19068, https://stackoverflow.com/users/462006, scrappedcola
|
English
|
Spoken
| 258
| 636
|
document.getElementsByClassName("changecolor").style.backgroundColor not working
I'm at a loss at why this particulur function won't work, I've tried different things, asked friends, googled but I'm just not sure why it simply wont work.
I have a function that creates a random color, and a function that changes the backgroundcolor to that randomly generated color on a button press.
this works fine:
function randomColors() {
return '#' + Math.floor(Math.random() * 16777215).toString(16);
}
function randomize() {
document.body.style.backgroundColor = randomColors();
}
randomize();
it still works fine when I use
document.getElementById("change").style.backgroundColor = randomColors();
However I want to change the backgroundcolor of the body, and 2 buttons at once so I'm using
function randomColors() {
return '#' + Math.floor(Math.random() * 16777215).toString(16);
}
function randomize() {
document.getElementsByClassName("changecolor").style.backgroundColor = randomColors();
}
randomize();
And the colors of the body and buttons simply won't change. the elements do have the class changecolor.
function randomColors() {
return '#' + Math.floor(Math.random() * 16777215).toString(16);
}
function randomize() {
document.getElementsByClassName("changecolor").style.backgroundColor = randomColors();
}
randomize();
<a class="twittershare" href="https://twitter.com/intent/tweet?text=Hello%20world" target="_blank"><button class="btn btn-primary changecolor"><i class="fa fa-twitter-square"></i></button></a>
EDIT, thanks to the comments guiding me towards the fix. Following code made it work for me:
function randomColors() {
return '#' + Math.floor(Math.random() * 16777215).toString(16);
}
function randomize() {
let rcolor = document.getElementsByClassName("changecolor");
let randomc = randomColors();
for(let i = 0; i < rcolor.length; i++) {
rcolor[i].style.backgroundColor = randomc;
}
}
randomize();
The clue is in the name. Elements. Plural.
note the plural form of "Elements" in the document.getElementsByClassName. You are getting an array-like structure not a single element and as such you need to loop over the collection.
| 11,132
|
https://en.wikipedia.org/wiki/Neary
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Neary
|
https://en.wikipedia.org/w/index.php?title=Neary&action=history
|
English
|
Spoken
| 166
| 309
|
Neary is a surname. Notable people with this surname include:
Aaron Neary (born 1992), American American football player
Alcott Neary (1892–1941), American American football and basketball player and coach
Aoife Neary (born 1985), Irish camogie player
Frank Neary (1921–2004), English football player
J. Peter Neary (1950-2021), Irish economist
Jo Neary, British comedian, writer and actress
John Neary, American engineer
Liz Neary (born 1951), Irish sportsperson
Lynn Neary, American radio journalist
Martin Neary (born 1940), English organist and choral conductor
Michael Neary (bishop) (born 1946), Irish Catholic prelate
Michael Neary (surgeon), Irish struck-off doctor
Mike Neary (born 1948), Canadian rower
Paddy Neary (born 1956), Irish hurler and referee
Pamela Neary, American politician
Patricia Neary (born 1942), American ballerina
Patrick Neary (regulator)
Patrick Neary (born 1963), American Catholic bishop elect
Paul Neary (born 1949), British comic book artist
Shay Neary, American fashion model
Shea Neary (born 1968), British boxer
Stephen M. Neary, American military officer
Steve Neary (1925–1996), Canadian politician
Tony Neary (born 1948), English rugby union player
| 16,187
|
https://space.stackexchange.com/questions/46446
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,020
|
Stack Exchange
|
BruceWayne, GremlinWranger, Harry Stranger, Organic Marble, https://space.stackexchange.com/users/12756, https://space.stackexchange.com/users/26356, https://space.stackexchange.com/users/37673, https://space.stackexchange.com/users/6944
|
English
|
Spoken
| 411
| 662
|
Can you help me identify this vehicle outside the VAB?
I found this photo of a house being transported off of Kennedy Space Center property sometime in the 1960s/early 1970s. We managed to track down where the house was moved from/to, but one thing that has stuck with me is what is the vehicle that is towing the house?
I've tried reverse image searching, but just got many pictures of armoured vehicles.
Thanks in advance :)
(Where was the house being moved from/to?)
I don't know it's exact original position, but somewhere near Roberts Road (https://www.google.com/maps/@28.5419362,-80.6659214,4104m/data=!3m1!1e3) and is now out near Scotsmoor :)
It looks like a motor scraper. Probably an Allis Chalmers 260E or similar.
Contractor magazine
Thank you! That must be it. It looks much more ominous in bnw :D
You're welcome. The odd thing is, if it's towing the house, it's being driven in reverse. I don't actually see a connection (chain/cable) between the house and the scraper though.
@HarryStranger to me, the context threw me off. I've seen these construction vehicles a zillion times. But having the VAB in the background, and that it's pulling a house, made me try and think if NASA modified something for the Shuttle and the house pulling was just a PR stunt to show it's capability. Good question!
@BruceWayne I'm not sure it's towing the house. It's probably just parked there.
@OrganicMarble - ...oh. I misread that photo a few ways then didn't I? ...I will show myself out :P
@BruceWayne I'm not sure! But it seems the scraper is backwards for towing. The OP thought it was towing it.
@bruceWayne If they had the scrapers for road construction it would be a not unreasonable device to tow with, they would be setup for massive low speed torque and cause less damage to asphalt than a tracked vehicle. Scrapers were probably present regardless of the actual tow just for leveling the path the house moved along.
@BruceWayne from the site I found the image "Roy Roberts home passing the Vertical Assembly Building of the Kennedy Space Center while being moved from the Orsino town site in the 1960's." https://www.ghosttowns.com/states/fl/orsino.html
@OrganicMarble it's a shame there's only the one image, but from context I assumed it was being towed by that vehicle
@HarryStranger I totally get it. the angle makes it looks like some strange machine with a blacked-out windshield and a slanted hood - but it's really the back of the pan.
| 15,189
|
https://ja.wikipedia.org/wiki/%E5%A6%99%E9%AB%98%E5%B8%82%E7%AB%8B%E5%A6%99%E9%AB%98%E9%AB%98%E5%8E%9F%E5%B0%8F%E5%AD%A6%E6%A0%A1
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
妙高市立妙高高原小学校
|
https://ja.wikipedia.org/w/index.php?title=妙高市立妙高高原小学校&action=history
|
Japanese
|
Spoken
| 32
| 441
|
妙高市立妙高高原小学校(みょうこうしりつ みょうこうこうげんしょうがっこう)は、新潟県妙高市田切にある公立小学校。
沿革
略歴
2023年4月、妙高市立妙高高原北小学校と妙高市立妙高高原南小学校が統合して、開校した。
年表
2023年4月1日 - 妙高高原北小学校と妙高高原南小学校との統合により開校。
学区
妙高市
大字二俣、大字田切、大字田口、大字蔵々、大字兼俣、大字毛祝坂、大字赤倉、大字関川、大字関山(行政区 赤倉温泉区)、大字杉野沢
進学先の中学校
妙高市立妙高高原中学校(妙高市関川)
関係者
出身者
HIKAKIN(YouTuber、ヒューマンビートボクサー)- 妙高高原南小学校出身
SEIKIN(YouTuber、シンガーソングライター)- 同上
Masuo(YouTuber)- 同上
脚注
関連項目
新潟県小学校一覧
外部リンク
妙高市立妙高高原小学校
妙高市立妙高高原北小学校
新潟県の公立小学校
みようこうこうけんしようかつこう
学校記事
| 16,306
|
https://meta.superuser.com/questions/11704
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,016
|
Stack Exchange
|
John_Sheares, Journeyman Geek, Raystafarian, fixer1234, https://meta.superuser.com/users/10165, https://meta.superuser.com/users/116196, https://meta.superuser.com/users/33938, https://meta.superuser.com/users/364367
|
English
|
Spoken
| 89
| 169
|
Let's expel [native]
native is undefined and has 12 questions, pretty much each about something different. Does anyone object to nuking this tag?
Man, that title could have gone in a much darker direction..
Seems like the classic meta tag. It should go. I've started trickle editing them.
Annd gone
Time for more coffee? http://superuser.com/questions/232235/howto-boot-directly-into-a-virtualbox-image :-)
._. This is not the groggy mod you are looking for. Move along.
Ok, THAT was wierd. It deleted native again. Blew away the tags, manually changed it to virtualbox. What the whaaaaaat?
| 44,139
|
https://stackoverflow.com/questions/58371584
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,019
|
Stack Exchange
|
Dharman, Shahin, https://stackoverflow.com/users/1839439, https://stackoverflow.com/users/5638658
|
English
|
Spoken
| 365
| 963
|
display selected options in multi select dropdown list using ajax and codeigniter
I need to display selected options (already saved options from db) in multi select dropdown list using ajax.
The response from ajax is like this
{"skill":[{"skill":"css"},{"skill":"Laravel"}]}
I need to display these values as selected in dropdown list.
my javascript ajax function
$.ajax({
url: "<?php echo base_url(); ?>recruiter/fetch_user_skill",
method: "POST",
data: {userid: user_id},
success: function (response) {
var JSONObject = JSON.parse(response);
alert(response);
}
});
php script
model
function fetch_users_skill($user)
{
$query = $this->db->query("SELECT `skill` FROM `user_skills` WHERE user_id='$user'");
if($query->num_rows()>0) {
foreach($query ->result() as $row)
{
$data[] = $row;
}
return $data;
}
}
controller
public function fetch_user_skill()
{
$user_id = $_POST['userid'];
$this->load->model('recruiter_model');
$data["skill"] = $this->recruiter_model->fetch_users_skill($user_id);
echo json_encode($data);
}
view
<select class="form-control" id="skill" name="skills[]" multiple="multiple" name="skills" style="width: 600px !important;">
<option value="">--Select Name---</option>
<?php
if ($skills->num_rows() > 0) {
foreach ($skills->result() as $skills_row) {
?>
<option value="<?php echo $skills_row->skill; ?>"><?php echo $skills_row->skill; ?></option>
<?php
}
}
?>
</select>
How can I set these values as selected from js.
Thanks in advance.
Your code is vulnerable to SQL injection. You should use prepared statements.
@Dharman I think codeigniter automatically prevents sql injection by sanitising input
You don't use codeigniter. You use mysqli, and you insert the input into the SQL directly which makes it vulnerable.
you can use this code:
$.ajax({
url: "<?php echo base_url(); ?>recruiter/fetch_user_skill",
method: "POST",
data: {userid: user_id},
success: function (response) {
var JSONObject = JSON.parse(response);
Array.prototype.forEach.call(JSONObject.skill, function(v){
$('#skill option[value=' + v.skill + ']').attr('selected', 'selected');
});
}
});
Thank you. When I click on the select box, list of options shows and the selected options highlighted. But I need to display selected options on loading the control without clicking it. is there anyway?
you can put the code inside $(document).ready(function(){ //code goes here.. })
Thats not possible, because the select box comes on a modal window from a button click. on that button click userid passes to the script and fetch skills of that user and populates it into the dropbox
Use this
$.ajax({
url: "<?php echo base_url(); ?>recruiter/fetch_user_skill",
method: "POST",
data: {userid: user_id},
success: function (response) {
var JSONObject = JSON.parse(response);
JsonObject.skill.forEach(function(sk){
$('#skill option[value=' + sk.skill + ']')
.prop('selected', true);
})
}
});
| 2,856
|
https://tr.wikipedia.org/wiki/12.%20arrondissement%20%28Paris%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
12. arrondissement (Paris)
|
https://tr.wikipedia.org/w/index.php?title=12. arrondissement (Paris)&action=history
|
Turkish
|
Spoken
| 78
| 240
|
12. arrondissement (), Fransa'nın başkenti Paris'in 20 arrondissementinden biridir. Arrondissement, Rive Droite'ın doğusunda yer almaktadır. Yüzölçümü 6,38 km² olan arrondissementin nüfusu Ocak 2019 tarihi itibarı ile 139.297'dir.
12. arrondissement, Reuilly olarak da bilinmektedir. Arrondissement, Vincennes Ormanı, Coulée verte René-Dumont, Vincennes Şatosu, Bastille Opera Binası, Paris Zooloji Parkı, Sanatlar Viyadüğü ve Picpus Mezarlığı gibi Paris'in başlıca ve tanınmış turistik mekanlarından bazılarına ev sahipliği yapmaktadır.
12. arrondissement, Bel-Air, Picpus, Bercy ve Quinze-Vingts olmak üzere dört mahalleye ayrılmaktadır.
Kaynakça
Dış bağlantılar
| 15,598
|
https://ru.stackoverflow.com/questions/863898
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Air, ThisMan, https://ru.stackoverflow.com/users/179186, https://ru.stackoverflow.com/users/211549, https://ru.stackoverflow.com/users/287128, https://ru.stackoverflow.com/users/302696, Денис Лебедев, Опан
|
Russian
|
Spoken
| 168
| 486
|
Скрипт записи mp3 из браузера,на js
Приведите пожалуйста пример скрипта, который силами js записывает mp3 файл при нажатие на кнопку в браузере пользователя
куда записывает? откуда записывает?
Возможный дубликат вопроса: Как реализовать сохранение фрагмента радио потока с сайта?
ThisMan Записать в браузере пользователя mp3 после выслать аяксом на сервер, что - то тип голосового сообщения в вк
Air пример приведенный там не работает, возможно гдет накосячил
Библиотека Recorderjs Вам в помощь. С помощью неё можно записать звук с компьютера в формате WAV, а для конвертации в МП3 используют ещё другую библиотеку -lame.js. Я её найду чуть позже.
не работает в файре, ток в гугле вроде...
Да, я забыл предупредить. В index.html даже где-то выводится, что требуется Google Chrome
никак нельзя еще другие клиенты присобачить?
Только что я пробовал в Опере-54, тоже работает.
Даже ради интереса установил Firefox. Да, пожалуй, он выдаёт ошибку TypeError: navigator.getUserMedia is not a function. И запрос разрешенния использовать микрофон не появляется. Т. е., не поддерживает работу с микшером звука, получается.
ну та ладно....
https://p5js.org/examples/sound-record-save-audio.html
| 42,706
|
https://stackoverflow.com/questions/15877078
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,013
|
Stack Exchange
|
English
|
Spoken
| 89
| 145
|
How to Remove JSF 1.2 from websphere 7.0?
Is there any we can remove the JSF 1.2 libs from the websphere 7? I tried searching JSF libs in the Websphere server installation directory but could not find them.
Please help
JSF 1.2 is part of Java EE 5. WebSphere is Jave EE 5 compliant so I doubt that you can remove parts of the Jave EE logic.
You can use JSF 2 though. Just make sure you load your application libaries with JSF 2 first. Check https://stackoverflow.com/a/2211960/1022141 as well.
| 48,000
|
|
iBCbBhm0Y0g_1
|
Youtube-Commons
|
Open Web
|
CC-By
| null |
Welcome to Think101x - Run 3!
|
None
|
English
|
Spoken
| 185
| 241
|
I'd like to welcome you to Think 101, the science of everyday thinking. This is the third time we've offered the course. In the first run of the course, we've had, since the first run of the course, we've had about 300,000 people in role. And we've interviewed some of the best people in the world, from Danny Kahneman, a Nobel Prize winner, to the Mythbusters, Elizabeth Loftus, Susan Blackmore. And you're going to hear some of these conversations that we've had with some really incredible people about the science of everyday thinking. So we're going to talk about things about the illusions of thinking, how to think more rationally, some of the tools for thought, and how to improve your everyday decision making. I hope you enjoy the course as much as we enjoyed putting it together. Since we offered this course back in 2014, we've since put together a podcast. So if you enjoy the content within this course, I encourage you to subscribe to the podcast as well. It's called Think 101 Conversations. So enjoy that as well, and enjoy the course..
| 20,323
|
https://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%BA%D8%B0%20%D8%B3%D9%86%DA%AF
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
کاغذ سنگ
|
https://fa.wikipedia.org/w/index.php?title=کاغذ سنگ&action=history
|
Persian
|
Spoken
| 381
| 1,121
|
کاغذ سنگ (که با اسمهای دیگری همچون کاغذ معدنی، کاغذ سنگ مرمر، کاغذ معدنی غنی شده نیز شناخته میشود) محصولی شبیه کاغذ است که ماده اصلی تشکیل دهنده آن کربنات کلسیم در امتزاج با پلی اتیلن پرچگال HDPE میباشد. این محصول در نوشتار و لوازم و التحریر، یادداشت، پوستر، کتاب، مجله، ساک دستی و بسیاری از کاربردهای دیگر استفاده میگردد.کاغذ سنگ را امیرعلی قربانعلی نیا اهورا کرد
پیشینه کاغذ سنگی
فرایند ساخت کاغذ سنگ در ابتدا توسط شرکت تایوانی Lung Meng Tech Co. در دهه ۱۹۹۰ میلادی توسعه یافت. کاغذ سنگ تا کنون در ۴۰ کشور جهان ثبت اختراع گردیدهاست که در آنها با نامهایی همچون MIST™ Paper, Parax Paper™، Terraskin™، ViaStone™، Kampier™، EmanaGreen™، Rockstock™ و Pixz Printing™ به بازار عرضه گردیدهاست.
ویژگیها
ضدآب بودن و مقاومت در برابر پارگی از خصوصیات بارز این مدل کاغذ بهشمار میآید. همچنین این کاغذ بار الکتریسیته ساکن را به خود نگرفته و بدون اسید است بدین معنا که PH آن خنثی است. در برابر روغن و حشرات نیز مقاوم است. به دلیل بافت شبیه لاتکس، در برابر پارگی مقاوم است. بافت کاغذ سنگدانه دار نیست.
چگالی کاغذ سنگ مقداری بین ۱٫۰ و ۱٫۶ را داراست که از این لحاظ برابر یا تا حدودی بیشتر از کاغذ معمولی است و بافت آن تا حدودی شباهت به سطح پوسته تخم مرغ آبپز شده دارد. میتوان کاغذ سنگ را از لحاظ بازیافت با پلاستیک از درجه ۲ بازیافت نمود یا مجدداً به کاغذ سنگ بازسازی نمود. کاغذ سنگ از لحاظ بازیافت زیست تخریب پذیر نیست با این حال در شرایط بازیافت تجاری و تحت اثر نوردهی تجزیه پذیر خواهد بود.
دانه دار نبودن بافت کاغذ سنگ باعث شده که سطح آن نسبت به سطح کاغذ معمولی نرمتر و مسطح تر باشد و نیازی به خدمات تکمیلی چاپ مثل روکش سلفون یا لامینت نداشته باشد. این کاغذ به آسانی و بدون ایجاد دود سمی میسوزد. منبع اصلی مواد اولیه آن پسماند معادن یا سنگ بریهای سنگ مرمر است که آسیاب شده و به پودر سنگ تبدیل میگردد. در تولید کاغذ سنگ از آب، اسید، سفید کنندهها یا سفید کنندههای نوری استفاده نمیگردد. کاغذ سنگ میتواند در دستگاههای Inkjet یا دستگاههای با مرکب جامد همچون افست، لترپرس و فلکسو استفاده گردد با این حال در پرینترهای لیزری حرارت بالا به خوبی جوابگو نیست. bts
منابع
کاغذ
مواد
ویکیسازی رباتیک
| 50,623
|
https://ceb.wikipedia.org/wiki/Riu%20de%20Quirra
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Riu de Quirra
|
https://ceb.wikipedia.org/w/index.php?title=Riu de Quirra&action=history
|
Cebuano
|
Spoken
| 39
| 66
|
Suba ang Riu de Quirra sa Italya. Nahimutang ni sa rehiyon sa Sardegna, sa habagatan-kasadpang bahin sa nasod, km sa habagatan-kasadpan sa Rome ang ulohan sa nasod.
Ang mga gi basihan niini
Mga suba sa Sardegna (rehiyon sa Italya)
| 36,423
|
https://ms.wikipedia.org/wiki/Kusalar%2C%20Khoda%20Afarin
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Kusalar, Khoda Afarin
|
https://ms.wikipedia.org/w/index.php?title=Kusalar, Khoda Afarin&action=history
|
Malay
|
Spoken
| 14
| 37
|
Kusalar, Khoda Afarin merupakan sebuah kawasan yang terletak di Iran.
Rujukan
Kawasan di Iran
| 5,160
|
https://stackoverflow.com/questions/819534
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,009
|
Stack Exchange
|
Jo Erik, Wayerle, https://stackoverflow.com/users/1581813, https://stackoverflow.com/users/1581814, https://stackoverflow.com/users/1581815, https://stackoverflow.com/users/1581847, https://stackoverflow.com/users/1582165, https://stackoverflow.com/users/1582199, https://stackoverflow.com/users/96684, jafan, jambalaio, user1581813, user1581815, user1582165
|
English
|
Spoken
| 316
| 643
|
Linq to Sql, how to check if a given table/class is in the changeset of the DataContext
I'm parsing a XML-file using LinqToXSD. I'm using Linq to SQL to insert the elements in the XML in corresponding tables in a database.
I'm inserting many different tables/elements in the DataContext using
DB.<tables>.InsertOnSubmit(table);
where tables could be any of about 75 different tables.
The XML is full of duplicates, and I would like to check if a given element in the XML already is added to the changeset of the DataContext.
Is there a generic way of doing this? The way i'm doing it now involves writing code for each of the different tables, which makes me think I could extract a method in some way or other and write this code just once.
To parse the XML i have a method for each element in the xml, which corresponds to a table in the database. The next two methods each handle xml-elements of different types.
private static tbl_trackname ParseTrackName(TRACKNAMEType tRACKNAMEType)
{
tbl_trackname tableTrackName = new tbl_trackname();
tableTrackName.code = tRACKNAMEType.code;
tableTrackName.text = tRACKNAMEType.text;
DB.tbl_tracknames.InsertOnSubmit(tableTrackName);
return tableTrackName;
}
private static tbl_track ParseTrack(TRACKType tRACKType)
{
tbl_track tableTrack = new tbl_track();
tableTrack.trackID = int.Parse(tRACKType.trackid);
tableTrack.tbl_organisation = ParseOrganisation(tRACKType.organisation);
tableTrack.tbl_trackname = ParseTrackName(tRACKType.trackname);
tableTrack.tbl_nation = ParseNation(tRACKType.country);
DB.tbl_tracks.InsertOnSubmit(tableTrack);
return tableTrack;
}
the first method inserts rows in a table named tbl_trackname, the second inserts rows in a table named tbl_track.
The missing code here is the code that checks the Datacontext if a track, or trackname is already inserted in the Datacontext. I should also check if its already in the database, but thats just a line of code so I can live with doing that for every ParseXXX() method.
Well, you could probably do something with dataContext.GetChangeSet().Inserts.OfType<Foo>()? maybe something with Any or Contains on the end?
Can you give more of an example?
I have edited the original question and addes some more information.
| 876
|
https://stackoverflow.com/questions/62516644
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,020
|
Stack Exchange
|
Lain, Rostislav Maizlin, https://stackoverflow.com/users/11527425, https://stackoverflow.com/users/13207500, https://stackoverflow.com/users/4728913, soliver
|
English
|
Spoken
| 186
| 393
|
How to submit form by parent div
This is my first question on stackoverflow! I hope that I am explaining clearly what my question is.
My question is:
How can I submit a form with js by the parent div.
I know I can submit a form like this:
document.getElementById("myForm").submit();
But I don't want to select the form by it's own id but by the id of the parent div.
I want something like this:
<div id="demo">
<form>
<input type="text">
</form>
</div>
<script>
document. get form in div with id demo .submit();
</script>
document.querySelector('#demo form').submit();
Try this:
document.querySelector('#demo form').submit();
I messed up. Thanks to the comments.
It is form and not input. Also it is querySelector() and not querySelectorAll().
Thanks a lot Jonas! Worked for me!
<div id="demo" style="background: #ddd; padding: 50px;">
<form id="form">
<input type="text">
</form>
</div>
<script>
var parent = document.getElementById("demo"),
form = document.getElementById("form");
parent.addEventListener("click", function(){
form.submit();
});
</script>
You can use selectors and querySelector method for access to DOM nodes:
document.querySelector('#demo form').submit();
@Dropout Thank you!
You can take parent div and find all his children and pick needed
let test = document.querySelector('#demo')
test.children[0].submit()
| 6,793
|
https://stackoverflow.com/questions/60828302
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,020
|
Stack Exchange
|
El_Vanja, https://stackoverflow.com/users/4205384, https://stackoverflow.com/users/6656268, https://stackoverflow.com/users/787008, mHouses, mcuenez
|
English
|
Spoken
| 456
| 1,021
|
Checkbox label is not shown when using form_div_layout in Symfony 4
I'm converting a Symfony 2.8 application to Symfony 4.4. I've updated libraries, components, controllers, forms, etc, so now I haven't deprecations, but I've found a strange problem: nearly all the forms we use in this application are rendered using the bootstrap_3_horizontal_layout theme, without problems. But in a couple of forms we use, to get more control about the rendered interface, the form_div_layout theme. The problem is that when we're using this theme, the label, the text at the side of the checkboxes, doesn't shown. If we just disable the {% form_theme form 'form_div_layout.html.twig' %} order, the labels are shown correctly.
Here is the code we use to render the checkboxes:
<div class='row'>
<div class='col-md-3'>
{{ form_label(form.user.roles) }}
</div>
<div class='col-md-9'>
{{ form_errors(form.user.roles) }}
{% for child in form.user.roles %}
{{- form_widget(child) -}}
{{- form_label(child) -}}
<br />
{% endfor %}
</div>
</div>
And this is a small snippet of the generated code:
<input type="checkbox" id="form_user_roles_0" name="form[user][roles][]" value="ROLE_INTRANET" checked="checked" /><br />
<input type="checkbox" id="form_user_roles_1" name="form[user][roles][]" value="ROLE_EXTRANET" checked="checked" /><br />
<input type="checkbox" id="form_user_roles_2" name="form[user][roles][]" value="ROLE_INTRANET_ADMIN" /><br />
And this is the same snippet, but disabling the form_theme option (so, using bootstrap_3_horizontal_layout:
<div class="checkbox"><label for="form_user_roles_0"><input type="checkbox" id="form_user_roles_0" name="form[user][roles][]" value="ROLE_INTRANET" checked="checked" /> Access to the intranet</label></div><br />
<div class="checkbox"><label for="form_user_roles_1"><input type="checkbox" id="form_user_roles_1" name="form[user][roles][]" value="ROLE_EXTRANET" checked="checked" /> Access to the extranet</label></div><br />
<div class="checkbox"><label for="form_user_roles_2"><input type="checkbox" id="form_user_roles_2" name="form[user][roles][]" value="ROLE_INTRANET_ADMIN" /> Intranet Administrator</label></div><br />
What are we doing wrong? How can we print/show/display the labels using the form_div_layout?
could you please post a screenshot of how the checkboxes look? also bootstrap doesn't seem to have a custom style for checkboxes
@midrizi if you look at the two snippets of generated HTML you can see that in the first case (form_div_layout) there is no label nor text generated for the checkboxes, but in the second case there is (Access to the intranet, in the first line).
have you tried modifying form_div_layout.html.twig?
@midrizi no, bexause is a standard component from Symfony. If there is no other way to solve this problem, I'll override it, but it's never a good idea to modify anything from the vendors folder
On their website, they say that you can modify anything in that file and make it the way you want just make sure you duplicate it. reference, also seems like version 4 is not maintained anymore.
Have you tried debugging form_div_layout to see why it fails to print the label? If you find the piece of code that's the culprit, maybe you can try and search the solution for that specific issue. @midrizi OP's using 4.4, which is still maintained.
May I ask you to share how the form is built, so we can reproduce this?
| 8,983
|
https://id.wikipedia.org/wiki/Maki%20Goto
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Maki Goto
|
https://id.wikipedia.org/w/index.php?title=Maki Goto&action=history
|
Indonesian
|
Spoken
| 238
| 524
|
adalah seorang penyanyi, pembuat lirik, dan mantan aktris Jepang. Lahir dan dibesarkan di Edogawa, Tokyo, Goto memulai karier musiknya pada 1999 saat ia bergbung dengan Morning Musume sebagai satu-satunya anggota generasi ketiga. Singel pertamanya dengan grup tersebut, "Love Machine", menempati peringkat teratas pada tangga singel Oricon dan terjual sejuta salinan. Goto menjadi vokalis utama dari grup tersebut sampai ia lulus dari grup tersebut pada 2002. Saat masih menjadi anggota Morning Musume, Goto merilis singel solo debutnya, "Ai no Bakayarō", pada 2001, yang menempati urutan teratas tangga lagu Oricon. Pada 2003, ia merilis album debutnya, Makking Gold 1, yang melakukan debut pada peringkat empat di tangga album Oricon.
Pada 2007, dalam konser G-Emotion II: How to Use Sexy, Goto mengumumkan bahwa ia lulus dari Hello! Project. Pada 2008, Goto menandatangani kontrak dengan sub-label Avex Group Rhythm Zone dan kembali ke ranah musik di A-nation '08. Pada 2009, dengan nama panggung Sweet Black feat. Maki Goto, ia merilis album mini debutnya Sweet Black. Goto dipindahkan ke Avex Trax pada 2010 dan merilis album mini keduanya, One, yang menandai resminya ia kembali sebagai penyanyi.
Referensi
Pranala luar
Blog Sweet Black Girls
Entri jdorama.com, Entri IMDb
J!-ENT's Dennis A. Amith interviews Maki Goto (English Interview – 10/13/09)
Anggota Def.Diva
Penyanyi solo Hello! Project
Penyanyi pop perempuan Jepang
Idola Jepang
Mantan anggota Hello! Project
Anggota Morning Musume
Anggota Petitmoni
Aktris dari Tokyo
Musisi dari Tokyo
Pemeran perempuan Jepang
Pemeran perempuan Jepang abad ke-21
| 28,521
|
https://stackoverflow.com/questions/48537840
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Harshit, Pijotrek, https://stackoverflow.com/users/1640490, https://stackoverflow.com/users/3447603, https://stackoverflow.com/users/3890632, https://stackoverflow.com/users/4725592, khelwood, nano_nano
|
English
|
Spoken
| 711
| 1,214
|
method return type based on the condition
I have a method which does various database oprations using spring Jpa.
public Employee find(int empId) {
Employee emp = employeeDao.findOne(empId):
if(emp == null)
return "Records doesnot exists for this Id";
else
return emp;
}
In the above code, there can be various string messages exists for sharing the cause of the error. Since the return type can only be one, so I cannot return both string and Employee object as they are of different types.
I also don't want to use object as return type. What could be the recommended way to use in this type of situation.
I would return null or Optional and move the message to another layer.
How is someone calling find supposed to make use of the return value if they can't tell what type it is going to be? They would end up having to assign it to an Object variable anyway.
@khelwood, it would either return the object with data or null. Using objects as return type could be dangerous as per various suggestions.
Thanks for all your answers. +1 for help.
Having error message details inside your entities is a BIG NO. Don't do that.
Use Exceptions wisely.
public Employee find(int empId) {
Employee emp = employeeDao.findOne(empId):
if(emp == null){
throw new EntityNotFoundException("Employee does not exists for this Id");
} else if (emp !=null && emp.getDetails() ==null){
throw new EntityNotFoundException("Employee Records does not exists for this Id");
} else return emp;
}
This is how typical DAO methods do.
If you are constrained to not to use exceptions, have a generic Object which shuttles.
public class GenericEntityResponse {
public Entity response;
public List<Entity> responses;
public String errorMessage;
//other common things
}
Use this as a response to all your DAO methods. But I suggest the first way.
Thanks for the solution and the explanation.
Throw an exception with the appropiate message if Employee doesn't exist
@StefanBeike Imho, exception doesn't make a use-case invalid
Thanks for the response. @Stefan , return null will not specify the error message on why error encountered.
You could return Optional<Employee> from your DAO method and then in service, if Optional is not present, throw Exception with message of your choice.
Example:
Employee employee = employeDAO.findById(employeeId).orElseThrow(() -> new EmployeeNotFoundException("Employee not present in the DB"));
You don't want to return a String when the Employee is not found. What would the caller of the method do with that String?
Throw an exception instead:
public Employee find(int empId) throws Exception
{
Employee emp = employeeDao.findOne(empId):
if(emp == null) {
throw new Exception("Records doesnot exists for this Id");
}
return emp;
}
You might want to use some custom sub-class of Exception.
You can throw different Exception types for different reasons, or the same Exception type with different messages.
Actually it is a rest service where after getting the error string from the mentioned method I am passing the same to the User interface as json.
@HarshitShrivastava create a custom exception class that extends RuntimeException and annotate it with @ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "No user with such ID") and throw that exception
You can use any of the following ways:
Option 1:
Throw exception (e.g. EntityNotFoundException) with your message incase its null
public Employee find(int empId) {
Employee emp = employeeDao.findOne(empId):
if(emp == null)
throw new EntityNotFoundException("Records doesn't exists for this Id");
else
return emp;
}
Option 2:
Return the null and handle the message part in the caller function.
public Employee find(int empId) {
return employeeDao.findOne(empId):
}
public String callerMethod(){
String msg = "Record Exist";
if(Objects.isNull(find(3))){
msg = "Records doesn't exists for this Id";
}
return msg;
}
OPTION 3: (Close to your requirement)
Create an new EmployeeResponse Class consisting of Employee and ErrorMessage.
@Data
public class EmployeeResponse{
private Employee employee;
private String error;
}
public EmployeeResponse find(int empId) {
EmployeeResponse response = new EmployeeResponse
Employee emp = employeeDao.findOne(empId):
if(emp == null)
response.setError("Records doesn't exists for this Id");
else
response.setEmployee(emp);
return emp;
}
PS - Ideal approach is Option 1 or 2.
I think you should not check for nulls because Spring JPA has defined this return type and leave it to consuming classes to handle this.
Moreover if your handling this at DAO layer then its not a good design practice.
| 34,855
|
https://arz.wikipedia.org/wiki/VIPERS%20402137760%20%28%D9%85%D8%AC%D8%B1%D9%87%29
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
VIPERS 402137760 (مجره)
|
https://arz.wikipedia.org/w/index.php?title=VIPERS 402137760 (مجره)&action=history
|
Egyptian Arabic
|
Spoken
| 159
| 446
|
VIPERS 402137760 هى مجره بتتبع كوكبة الدلو.
معلومات المجره
الانزياح الأحمر: 0.581.
السرعه الشعاعيه: 128461.
المطلع المستقيم: 330.990632.
الميل: 1.382781.
مصطلحات تعريفيه
الكوكبه هيا مجموعه من النجوم اللى بتكون شكل أو صوره و هيا مجال الكره السماويه اللى المجره جزء منها.
الانزياح الاحمر هو زيادة طول الموجه الكهرومغناطيسيه اللى جايه لينا من المجره بسبب سرعه ابتعادها عننا. ده بيستخدم فى حسابات الفلك.
السرعه الشعاعيه هيا سرعه الجرم الفضائى فى اتجاه الراصد و بتنقاس بالانزياح الاحمر.
المطلع المستقيم هوا الزاويه المحصوره بين الدايره الساعيه لجرم سماوى و الدايره الساعيه لنقطة الاعتدال الربيعى. المطلع المستقيم ممكن يتقاس بقوس دايره الاستواء السماويه من نقطه الاعتدال الربيعى لحد نقطه تقاطع الدايره الساعيه لجرم سماوى مع دايره الاستواء السماويه.
الميل هوا المكافئ الفلكى لخط العرض و بيتقس بقيمة الزاويه بين أى جسم سماوى و خط الاستوا السماوى. لو كان النجم شمال خط الاستوا السماوى تكون قيمة بعده بالموجب (+) و لو النجم جنوب خط الاستوا السماوى تكون قيمة بعده بالسالب (-).
مصادر
مجرات
فضاء
| 28,011
|
https://english.stackexchange.com/questions/466356
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
Hot Licks, Lambie, Lawrence, https://english.stackexchange.com/users/100179, https://english.stackexchange.com/users/142322, https://english.stackexchange.com/users/70861
|
English
|
Spoken
| 276
| 384
|
Meaning of "snowy detail"
In an app's description, I found the following sentence:
The game has a frozen wasteland that is full of beautiful scenes. You
will want to replay it many times to ensure that you don't miss a single
snowy detail.
The M-W dictionary mentions the following meanings of the word "detail":
1 : extended treatment of or attention to particular items
2 : a part of a whole a : a small and subordinate part : PARTICULAR
also : a reproduction of such a part of a work of art
b : a part considered or requiring to be considered separately from
the whole
c : the small elements that collectively constitute a work of art
d photography : the small elements of an image corresponding to those
of the subject
3a : selection of a person or group for a particular task (as in
military service)
b(1) : the person or group selected
(2) : the task to be performed
However, I do not find any of the above-mentioned meanings relevant to the phrase "snowy detail".
In this context, snowy detail = details related to the snow scene.
Yep, it can be interpreted quite literally.
(2.c. is probably the best definition of "detail" for this case.)
Details in pictures are details in pictures. Scenes can be of snow, of water, of land or anything at all. And all those scenes have adjectives.
Definition 2c is particularly appropriate in this case. The article is recommending that you replay the app so you have more chances to see all of the details.
Snowy here is just an adjective being used to describe the details.
| 7,389
|
https://stackoverflow.com/questions/16700906
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,013
|
Stack Exchange
|
English
|
Spoken
| 118
| 174
|
Microsoft Dynamics GP 10.0: Where is the "business object"/stored procedure documentation?
I've been looking at, among other things, the "eConnect Programmer's Guide Release 10.0" for Microsoft Dynamics GP.
There are stored procedures (termed "Business Objects") referred to in this document that I can call to get/modify data in the Dynamics database....but curiously, the document doesn't actually tell me the names of them, what their parameters are, or what they do.
I've been poking around various places online and haven't been able to locate this documentation. Can anyone help?
thanks
The documentation for the business objects is contained in the Software Development Kit (SDK) for Microsoft Dynamics GP 10. You can download it from Customer Source or Partner Source.
| 1,667
|
|
https://no.wikipedia.org/wiki/Emir%20Muratovi%C4%87
|
Wikipedia
|
Open Web
|
CC-By-SA
| 2,023
|
Emir Muratović
|
https://no.wikipedia.org/w/index.php?title=Emir Muratović&action=history
|
Norwegian
|
Spoken
| 55
| 126
|
Emir Muratović (født 6. november 1996) er en svømmer.
Han tok en 42.-plass for landet sitt på 50 meter fri under Sommer-OL 2020 i Tokyo og kvalifiserte seg derfor ikke til semifinalene på øvelsen.
Referanser
Eksterne lenker
Deltakere for Bosnia-Hercegovina under Sommer-OL 2020
Svømmere under Sommer-OL 2020
Deltakere for Bosnia-Hercegovina under EM i svømmesport 2018
| 33,361
|
https://fitness.stackexchange.com/questions/37583
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,018
|
Stack Exchange
|
BKE, Dark Hippo, NL628, https://fitness.stackexchange.com/users/20219, https://fitness.stackexchange.com/users/27359, https://fitness.stackexchange.com/users/5752
|
English
|
Spoken
| 426
| 583
|
Can I get taller at 17?
I am a 17 year old (turned 17 this feb) teenage boy who is only 5'5" ish tall.. Well to be honest I think it's a little bit over 5'4.5".. But I tell everyone that I'm 5'6".
As you might have guessed, I'm very insecure about my height! Even some girls are taller than me! :( I am still a virgin cause not a single girl likes me as a partner for me being short... They only friendzone me :'(
So do I have any more hope? Can still get taller? I'd even be happy with 5'7"!!
I'm voting to close this question as off-topic because it is about height insecurity, not physical fitness.
Ah @BKE I didn't realize that as a thing on Physical Fitness SE sorry about that. I'm new here. Should I delete my answer?
Possible duplicate of How to Increase height naturally? Are those ads gimmicks?
@NL628 No, don't delete your answer, even if the question doesn't fit, it doesn't change the validity of your answer
Of course you still have a chance!
As way of example, one of my friends who is in college was 5 foot 4 at age 19, right when he started college. At age 23, right as he was graduating, I went to visit him, and he's 5' 11''!!
Don't worry about your height. I do not want to be offensive or anything, but if you are really focused on girls, and want a long term relationship, you should be with a girl who cares about you as a person, not just your height.
Try not to be to depressed. You as a 17 year old male have not stopped growing. Think about it this way. I have seen older men in their 50's grow 1-3 inches taller just from doing yoga. If you increase your height by just 1.5 inches, you'll reach 5'6'' which is a good height! You still have a long way to go, and there's no need to be insecure.
If you truly are extremely depressed, try seeing a doctor or a therapist. Suicide is definitely not the way to go.
It is reasonable to grow up to another couple inches at this stage. Even into college, while not common, it is also not uncommon to have some growth (needing to hem pants for instance).
Don't get so stressed about it. Go out for wrestling and boxing as they work for people of all size. And the confidence of learning combative sports is helpful for shorter men.
| 3,500
|
https://stackoverflow.com/questions/12283661
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,012
|
Stack Exchange
|
Gordon Linoff, Martin Smith, Simon, https://stackoverflow.com/users/1144035, https://stackoverflow.com/users/1453411, https://stackoverflow.com/users/391626, https://stackoverflow.com/users/73226, podiluska
|
English
|
Spoken
| 448
| 724
|
Running Totals again. No over clause, no cursor, but increasing order
I am still having trouble creating an running total based on the increasing order of the value. Row id has no real meaning, it is just the PK. My server doesn't support OVER.
Row Value
1 3
2 7
3 1
4 2
Result:
Row Value
3 1
4 3
1 6
2 13
I have tried self and cross joins where I specify that the value of the second amount(the one being summed up) is less than the current value of the first. I have also tried doing this with the having clause but that always threw an error when I tried it that way. Can someone explain why it would be wrong to use it in that manner and how I should be doing it?
It would help if you told us what your server is, rather than what it doesn't support.
Here is one way to do a running total:
select row, value,
(select sum(value) from t t2 where t2.value <= t.value) as runningTotal
from t
The self-join with inequality (aka triangular join) is one of the worst-performing ways to get running totals, but given the restrictions imposed by the question it looks like the only remaining choice.
@Simon . . . Yes, I too believe that all database vendors should support the full range of window/analytic functions.
If your platform supports recursive queries(IIRC you should omit the RECURSIVE keyword for microsoft stuff). Because the CTE needs to estimate the begin/end of a "chain", unfortunately, the tuples need to be ordered in some way (I use the "row" field; an internal tuple-id would be perfect for this purpose):
WITH RECURSIVE sums AS (
-- Terminal part
SELECT d0.row
, d0.value AS value
, d0.value AS runsum
FROM data d0
WHERE NOT EXISTS (
SELECT * FROM data nx
WHERE nx.row < d0.row
)
UNION
-- Recursive part
SELECT t1.row AS row
, t1.value AS value
, t0.runsum + t1.value AS runsum
FROM data t1
, sums t0
WHERE t1.row > t0.row
AND NOT EXISTS (
SELECT * FROM data nx
WHERE nx.row > t0.row
AND nx.row < t1.row
)
)
SELECT * FROM sums
;
RESULT:
row | value | runsum
-----+-------+--------
1 | 3 | 3
2 | 7 | 10
3 | 1 | 11
4 | 2 | 13
(4 rows)
you can use the with rollup command if you have sql server 2008.
select sum(value) from t t2 where t2.value <= t.value with rollup
with rollup is not a new (2008) feature and doesn't do running totals either. It is used in conjunction with GROUP BY to give sub totals.
| 49,470
|
https://stackoverflow.com/questions/40323471
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,016
|
Stack Exchange
|
codeMagic, https://stackoverflow.com/users/1380752
|
Zulu
|
Spoken
| 188
| 797
|
How to RadioButton get selected
I have an API and there is a value of broadcast and the options are public, private, logged in and unlisted. I want a radiobutton to be selected itself as public if broadcast is public.
This is my XML code:
<TextView
android:textColor="#060606"
android:layout_marginTop="10dp"
android:textSize="15sp"
android:text="Broadcast Options"
android:id="@+id/broadcast_head"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioGroup
android:orientation="vertical"
android:id="@+id/radio_group_broadcast"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:textSize="16sp"
android:text="Public"
android:id="@+id/radio_button_public"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:textSize="16sp"
android:text="Private"
android:id="@+id/radio_button_private"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:textSize="16sp"
android:text="Unlisted"
android:id="@+id/radio_button_unlisted"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:textSize="16sp"
android:text="Logged Only"
android:id="@+id/radio_button_logged_only"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RadioGroup>
</TextView>
and this is my Java code;
I don't know whether this code is correct or not.
rbPub = (RadioButton)findViewById(R.id.radio_button_public);
rbPri = (RadioButton)findViewById(R.id.radio_button_private);
rbUnl = (RadioButton)findViewById(R.id.radio_button_unlisted);
rbOnl = (RadioButton)findViewById(R.id.radio_button_logged_only);
radioGroup1 = (RadioGroup) findViewById(R.id.radio_group_broadcast);
VideoDetail videoDetailBroadcast = null; //this is the problem, can't fix(null)
if (videoDetailBroadcast.isPublic()) {
rbPub.setChecked(true);
}
else if (videoDetailBroadcast.isPrivate()) {
rbPri.setChecked(true);
}
else if (videoDetailBroadcast.isUnlisted()) {
rbUnl.setChecked(true);
}
else if (videoDetailBroadcast.isLoggedOnly()) {
rbOnl.setChecked(true);
}
Is there a BroadcastReceiver set up somewhere? What is VideoDetail and how/where do you expect the value to change?
You should should initialize videoDetailBroadcast that way : VideoDetail videoDetailBroadcast = new VideoDetail()
| 22,859
|
https://stackoverflow.com/questions/14053271
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,012
|
Stack Exchange
|
Dan Bracuk, Leigh, https://stackoverflow.com/users/104223, https://stackoverflow.com/users/1427444, https://stackoverflow.com/users/1832636, https://stackoverflow.com/users/67531, orandov, vamps
|
English
|
Spoken
| 1,038
| 2,003
|
Coldfusion : how to update multiple record with one ID
This is actually continue from here.
Say a teacher wanted to update the student's skill. The process goes like this:
Select student's name.
View Student's profile.
Click UPDATE link. The UPDATE page shows a list of skills with checkboxes.
The teacher can check or uncheck the student's skills. Then clicks submit.
E.g:
+------+------------------------+
Draw | <checkbox checked >
+------+------------------------+
Read | <checkbox>
+------+------------------------+
Dance | <checkbox checked >
+------+------------------------+
So here's the problem;
How can I update multiple submission with one ID? (compare the submission value with the one in database)
How can I add (INSERT INTO) when the skillid does not exist in table studentskill?
table skill
+---------+------------+
| skillid | skillname |
+---------+------------+
| 1 | draw |
+---------+------------+
| 2 | read |
+---------+------------+
| 3 | dance |
+---------+------------+
table studentskill
+----------+----------|
|studentid | skillid |
+----------+----------+
| 001 | 1 |
| 001 | 2 |
| 002 | 1 |
| 002 | 2 |
| 002 | 3 |
+----------+----------+
Don't you also have to delete a skill if it was unchecked?
@orandov : there is a skill_flag column in studentskill table. if the teacher wants to unchecked the check box, it will update to 0. (by default, the skill_flag value will be 1 when teacher submit the student's skill)
I agree with Leigh's answer. I would just add (and this addition was too long for a comment) the following:
1) Avoid deleting all records and then re-adding them. Someday you may decide you want extra data in that table and you will lose it whenever this code runs if you delete all of the skills. It is easy enough to add the WHERE clause correctly, so you may as well do it.
2) I would recommend using a "WHERE NOT EXISTS" rather than an OUTER JOIN to ensure that the records don't already exist in the student skills table. The OUTER JOIN might perform a little better, but the WHERE NOT EXISTS should perform good enough in this situation and will be much clearer.
After all, you said "when the skillid does not exist in table studentskill" and "WHERE NOT EXISTS" reads very much like that.
<cftransaction>
<cfquery ...>
DELETE
FROM StudentSkill
WHERE studentID = <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
<cfif listLen(form.skillId)>
AND skillId NOT IN (<cfqueryparam value="#form.skillId#" cfsqltype="cf_sql_integer" list="true">)
</cfif>
</cfquery>
<cfquery ...>
INSERT INTO StudentSkill ( studentId, skillId )
SELECT <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
, skillId
FROM Skill
WHERE skillId IN (<cfqueryparam value="#form.skillId#" cfsqltype="cf_sql_integer" list="true">)
AND NOT EXISTS
(
SELECT 1
FROM StudentSkill
WHERE studentID = <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
AND skillID = Skill.skillID
)
</cfquery>
</cftransaction>
As noted earlier, wrapping the whole thing in cftransaction will ensure that either the entite set of changes happen or none at all.
Yep, not exists is another option and I would agree it is more intuitive. In may even be a little less expensive than an outer join. But you would have to check the actual query plan.
@vamps - Also, I see from later comments the studentSkill table may contain additional data beyond student and skill id's. If that is the case, Steve is right. You definitely want to go with the second option.
Yes @leigh, i did realize that and i was going to update the answer until i read steve bryant answer which is more correct. thanks, both of you.
Update:
It turns out the StudentSkill contains additional columns (beyond StudentID and SkillID). Steve Bryant's answer is a better choice for that scenario.
One common approach is to DELETE all existing skills for the selected student first. Then INSERT the new skills. Pros: It is a little more straightforward than the second approach Cons: Does a delete every time, even if nothing is changed.
<!--- change cfsqltypes if needed --->
<cfquery ...>
DELETE FROM StudentSkill
WHERE studentID = <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
</cfquery>
<cfquery ...>
INSERT INTO studenSkill ( studenId, skillId )
SELECT <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
, skillId
FROM skill
WHERE skillId IN
(
<cfqueryparam value="#form.skillId#" cfsqltype="cf_sql_integer" list="true">
)
</cfquery>
Another approach is to DELETE only skills that were unchecked/removed. Then use an OUTER JOIN to INSERT skills that were newly added. Anything else is considered unchanged.
<cfquery ...>
DELETE FROM StudentSkill
WHERE studentID = <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
<cfif listLen(form.skillId)>
AND skillId NOT IN
(
<cfqueryparam value="#form.skillId#" cfsqltype="cf_sql_integer" list="true">
)
</cfif>
</cfquery>
<cfquery ...>
INSERT INTO StudentSkill ( studenId, skillId )
SELECT <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
, s.skillId
FROM Skill s LEFT JOIN StudentSkill stu
ON s.skillID = stu.skillID
AND stu.studentID = <cfqueryparam value="#form.studentId#" cfsqltype="cf_sql_integer">
WHERE s.skillId IN
(
<cfqueryparam value="#form.skillId#" cfsqltype="cf_sql_integer" list="true">
)
AND stu.skillID IS NULL
</cfquery>
Note: Be sure to wrap both queries in a cftransaction so they are treated as a single unit.
:thanks for the heads up. this is the first time i heard about cftransaction.
Anytime you have "related queries" that modify the database, you want to use a transaction. It ensures all of the queries succeed or they all fail. So you never leave things in an inconsistent state. This is an old article, but the first section provides a good description of why transactions are needed using the classic bank transfer example.
SQL Server 2008 supports Table Valued Parameters but I don't know if that is support in ColdFusion.
See this answer: Passing a Table Valued parameter to a stored procedure.
In that answer there is a link of how to pass a list as XML to a stored procedure. In the stored procedure you would load the XML list to a temp table and insert and delete records by joining on the temp table.
The ColdFusion part to this scenario would be to create the xml string that gets sent to the stored procedure. CF has sufficient functionality for this.
@leigh provided a good answer but another approach may be to display your "selected" options as links rather than check boxes. The link would prompt you to confirm the removal of the option and refresh the page.
Then your check box handling would only be for the addition of new records (which it sounds like your already doing). This would help prevent people from accidentally checking the wrong box and having the skill deleted.
| 45,011
|
https://stackoverflow.com/questions/23779579
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,014
|
Stack Exchange
|
Confusion, Fellow Stranger, Neil Slater, https://stackoverflow.com/users/1417223, https://stackoverflow.com/users/16784, https://stackoverflow.com/users/2001031
|
English
|
Spoken
| 600
| 923
|
Possible to identify instance variables if we don't know about their existence beforehand?
I have an instance variable set in the controller with a certain attribute, e.g.
@post.errors
Is there any method to check in the view without knowing about @post (or any other instance variable):
a) Is there any instance variable available?
b) If the above is true, does it have the attribute errors set?
Update
If the above questions are returning true, then return the instance variable.
I want to confirm existence of @post (or any other possible instance variable). But not in the controller - in the view. To clarify: the view will not know about any instance variable at all, so it wants to check - "Is there any instance variables available at all?"
The nature of this question leads me to ask: what is the problem you are actually trying to solve? Do you want to reuse the same view for different controllers, where different instance variables will be set? If so, or something like it, then there is a better solution than solving the immediate technical problem presented here.
@Confusion: Agreed. For example raising exceptions is usually a better mechanism than setting error flags and then needing to search for and check them.
I have a problem in a Rails app where I need to render validation error messages in a place in the templates where it would be cumbersome to statically register all possible instance variable. I created a question about that specific problem here: http://stackoverflow.com/questions/23778275/validation-error-messages-outside-yield But I wanted to learn the more general view on this problem, hence the question on this page.
If you want to reuse the same view for multiple controllers, you can e.g. pass the currently relevant entity (@post or @user or ...) as a 'local' variable using render 'template', locals: {instance: @post} in one controller and render 'template', locals: {instance: @user} in another. You can then access that entity as 'instance' in your template
This would be one way to check if any instance variable in the current scope has a true value for errors
error_somewhere = instance_variables.any? do |var_symbol|
var_value = instance_variable_get( var_symbol )
var_value.respond_to?( :errors ) ? var_value.errors : false
end
You may need to modify the third line depending on what data you are expecting from the errors method in general (not clear from your question).
You may also want to modify this further to identify the error-ing variable (you could use a map and a compact or perhaps write to a hash)
For example, the following will construct a hash of variable names and their values, but only populated with instance variables that have an errors method that returns a true value:
these_have_errors = Hash[
instance_variables.map do |var_symbol|
var_value = instance_variable_get( var_symbol )
if var_value.respond_to?( :errors ) && var_value.errors
[ var_symbol, var_value ]
else
nil
end
end.compact
]
If run inside your controller, or if you add controller. before the instance_variables* methods, you should get a result like:
{ :@post => (value of @post) }
when @post exists and has a true return value from @post.errors.
The important methods here that give you the introspection to do the task:
instance_variables
instance_variable_get
respond_to?
Great! But how would I return the object so I can work with the instance variable, instead of only true?
In your view, you can do
controller.instance_variables
This will return an Array of all the instance varibles of you controller class.
Please note that this will include variables that Rails has initialized like
:@_routes, :@_action_has_layout, :@_headers, along with what you have initialized in your action
You can use try object
@post.try(:errors)
| 47,325
|
https://stackoverflow.com/questions/60008257
|
StackExchange
|
Open Web
|
CC-By-SA
| 2,020
|
Stack Exchange
|
Tanner, https://stackoverflow.com/users/7375929
|
English
|
Spoken
| 270
| 497
|
VueJs - Focus to element in an imported component
I'm new to VueJs so trying to get to grips with how everything works and comes to together. Basically I have two vue files. I'm importing one of the files into the other.
In the main file I'd like to focus to an input element in the imported component but I can't seem to work out how to do this?
So in my main file I've imported the component and have this code:
In the SelfScan.vue file I have a basic input element. I have some focus code within this file which works fine.
So I was hoping to do something similar like this:
this.$refs.selfscan.barcode.focus();
However "selfscan" is undefined.
Please can you help me to understand what I'm doing wrong here?
Thanks!
Please post your code. It's impossible for anyone to know what's wrong in your code without seeing it.
For you set focus in any element in Vue.js, you need to use ref attribute. Is correct.
But the property this.$refs is available only local component scope. In other words, if you need to set focus by other component, you need a global event. There is other ways you do this, but the global event is more simple.
The code will be that way:
<template>
<div>
<button type="button" @click="focusChildInput">Focus to Input</button>
<child />
</div>
</template>
<script>
import child from './child.vue';
export default {
name: 'app',
components: { child },
methods: {
focusChildInput() {
this.$root.$emit('focusChildInput');
},
},
};
</script>
<template>
<div>
<input type="text" ref="childInput" />
</div>
</template>
<script>
export default {
name: 'child',
mounted() {
this.$root.$on('focusChildInput', () => this.$refs.childInput.focus());
},
};
</script>
| 45,980
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.