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://stackoverflow.com/questions/58139504 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | A.K, Andrew Giangrant, Nate, Olivier Refalo, https://stackoverflow.com/users/11109465, https://stackoverflow.com/users/148146, https://stackoverflow.com/users/258689, https://stackoverflow.com/users/8360386 | English | Spoken | 599 | 1,028 | Auto Reload of gateway for schema changes in federated service apollo GraphQL
In Apollo Federation, I am facing this problem:
The gateway needs to be restarted every time we make a change in the schema of any federated service in service list.
I understand that every time a gateway starts and it collects all the schema and aggregates the data graph. But is there a way this can be handled automatically without restarting the Gateway as it will down all other unaffected GraphQL Federated services also
Apollo GraphQL , @apollo/gateway
There is an experimental poll interval you can use:
const gateway = new ApolloGateway({
serviceList: [
{ name: "products", url: "http://localhost:4002" },
{ name: "inventory", url: "http://localhost:4001" },
{ name: "accounts", url: "http://localhost:4000" }
],
debug: true,
experimental_pollInterval:3000
})
the code above will pull every 3 seconds
i tried this , but the problem is that this isnt advisable in production environment and even apollo says the same . :(
Note that you are adding requirements to your original question. There is no better OOB solution at this point. Sincerely
I don't know other ways to automatically reload the gateway other than polling.
I made a reusable docker image and i will keep updating it if new ways to reload the service emerge. For now you can use the POLL_INTERVAL env var to periodically check for changes.
Here is an example using docker-compose:
version: '3'
services:
a:
build: ./a # one service implementing federation
b:
build: ./b
gateway:
image: xmorse/apollo-federation-gateway
ports:
- 8000:80
environment:
CACHE_MAX_AGE: '5' # seconds
POLL_INTERVAL: '30' # seconds
URL_0: "http://a"
URL_1: "http://b"
Thanks for idea's :)
You can use express to refresh your gateway's schema. ApolloGateway has a load() function that go out to fetch the schemas from implementing services. This HTTP call could potentially be part of a deployment process if something automatic is needed. I wouldn't go with polling or something too automatic. Once the implementing services are deployed, the schema is not going to change until it's updated and deployed again.
import { ApolloGateway } from '@apollo/gateway';
import { ApolloServer } from 'apollo-server-express';
import express from 'express';
const gateway = new ApolloGateway({ ...config });
const server = new ApolloServer({ gateway, subscriptions: false });
const app = express();
app.post('/refreshGateway', (request, response) => {
gateway.load();
response.sendStatus(200);
});
server.applyMiddleware({ app, path: '/' });
app.listen();
Update: The load() function now checks for the phase === 'initialized' before reloading the schema. A work around might be to use gateway.loadDynamic(false) or possibly change gateway.state.phase = 'initialized';. I'd recommend loadDyamic() because change state might cause issues down the road. I have not tested either of those solutions since I'm not working with Apollo Federation at the time of this update.
This is a great solution, but is it documented anywhere? The Gateway docs at https://www.apollographql.com/docs/federation/api/apollo-gateway/ don't mention load.
@Nate They have removed the documentation around load if it ever existed. I saw this in some apollo-gateway code and thought it was appropriate for this use case.
And… it no longer works. This was a great solution but in recent versions it reports "Error: ApolloGateway.load called in surprising state loaded". It seems they want to push you to use their Managed Federation service.
That's a bummer. I suppose, the original solution should be taken with a grain of salt as it was undocumented (probably for that reason). You can give gateway.loadDynamic(false) a try. You might be able to hack the Apollo phase state to be 'initialized' too. The only other solution that comes to mind is using another schema system, which seems overly complicated to get working with Apollo Gateway.
| 24,429 |
https://fi.wikipedia.org/wiki/Aikuislukio | Wikipedia | Open Web | CC-By-SA | 2,023 | Aikuislukio | https://fi.wikipedia.org/w/index.php?title=Aikuislukio&action=history | Finnish | Spoken | 122 | 421 | Aikuislukio on oppilaitos, joka antaa lukion tai peruskoulun oppimääriin kuuluvaa opetusta erityisesti aikuisille.
Aikuislukion oppimäärään kuuluu vähintään 44 kurssia. Alle 18-vuotiaana lukion aloittaneen on suoritettava 48 kurssia. Tavallisessa lukiossa kursseja vaaditaan vähintään 75. Aikuislukiossa voi opiskella myös esimerkiksi vain yhtä ainetta, korottaa valmiin yo-tutkinnon arvosanoja tai täydentää tutkintoa. Tällaisista tutkintoon johtamattomista opinnoista peritään yleensä maksu.
Aikuislukion opiskelijan tulee pääsääntöisesti olla vähintään 18-vuotias, mutta lukion rehtori voi erityisistä syistä hyväksyä nuoremmankin opiskelijan. Kaksois- ja kolmoistutkintojen syventävät kurssit joudutaan yleensä käymään aikuislukiolla, koska kyseiseen koulutusmuotoon kuuluvat vain pakolliset 44 (tai 48) kurssia.
Koska aikuislukion oppitunnit pidetään usein illalla, kutsutaan aikuislukiota myös iltalukioksi.
Aikuislukiot Suomessa
Lista aikuislukioista, joista on Wikipedia-artikkeli:
Tampereen aikuislukio
Helsingin aikuislukio
Espoon aikuislukio
Oulun aikuislukio
Sotungin etälukio
Aiheesta muualla
Opetushallituksen aikuislukiosivusto
Lukio | 47,399 |
https://es.wikipedia.org/wiki/Frente%20Amplio%20%28Brasil%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Frente Amplio (Brasil) | https://es.wikipedia.org/w/index.php?title=Frente Amplio (Brasil)&action=history | Spanish | Spoken | 814 | 1,486 | {| class="navbox" align="right" style="margin: 0 0 1em 1em; width:20%; text-align:center"
! style="text-align:center; background:#ccf; font-size:110%;"|Este artículo es parte de una serieDictadura militar en Brasil1964–1985
|-
! align=center bgcolor="ccccff" | Perspectiva cronológica
|-
| Golpe Militar de 1964 • Años de plomo • Desaparecidos políticos en Brasil • Apertura política
|-
! align=center bgcolor="ccccff"| Actos Institucionales
|-
| AI-1 • AI-2 • AI-3 • AI-4 • AI-5 • AI-6 • AI-7 • AI-8 • AI-9 • AI-10 • AI-11 • AI-12 • AI-13 • AI-14 • AI-15 • AI-16 • AI-17
|-
! align=center bgcolor="ccccff"| Eventos
|-
| Comício da Central • Marcha da Família com Deus pela Liberdade • Marcha de la Victoria
|-
! align=center bgcolor="ccccff"| Movimientos de la oposición
|-
| Diretas Já • Frente Ampla • Luta armada de esquerda no Brasil • Novembrada • Pressão social
|-
! align=center bgcolor="ccccff"| Operaciones militares
|-
| Atentado do Riocentro • Caso Para-Sar • Operação Brother Sam • Operação Popeye
|-
! align=center bgcolor="ccccff"| Tópicos relacionados
|-
| Constitución brasileña de 1967 • Instituto de Pesquisas e Estudos Sociais • Milagro económico • Pacote de Abril
|-
|align="center" |
|}
El Frente Amplio fue un grupo político auspiciado por Carlos Lacerda y sus antiguos adversarios, Juscelino Kubitschek y João Goulart, contra el Régimen Militar de Brasil, creado a partir del año 1966.
Creación
Las conversaciones entre Carlos Lacerda y Juscelino Kubitschek, exiliado en Lisboa, fueron mediadas por Renato Archer, diputado del MDB, y antes del PSD; las conversaciones con Goulart, fueron auspiciadas por Doutel de Andrade, del MDB, y antes del PTB.
Los militares más radicales amenazaron con retirar el apoyo a Lacerda si este insistía en las conversaciones con los llamados enemigos del régimen. A pesar de todo, el 28 de octubre de 1966, el Frente Amplio fue lanzado con un manifiesto, firmado solamente por Lacerda y publicado en su antiguo periódico, Tribuna da Imprensa. El manifiesto planteaba elecciones directas, reforma partidaria, desarrollo económico y adopción de una política exterior soberana. El manifiesto tuvo buena aceptación por parte del Movimiento Democrático Brasileño (MDB).
Declaración de Lisboa
El día 19 de noviembre de 1966, Lacerda y Juscelino Kubitschek emitieron la Declaración de Lisboa, donde afirmaban la intención de trabajar juntos en un frente amplio de oposición. Se comprometieron con la orientación política del manifiesto de 28 de octubre y llamaron al pueblo a participar en la formación de un gran partido popular. Lacerda pasó entonces a buscar la comprensión del expresidente Goulart y de los sectores más a la izquierda del MDB, la llamada "corriente ideológica", cercana al Partido Comunista de Brasil (PCB), ilegal. El PCB se dividió en dos: un grupo -minoritario- era favorable al acuerdo; el otro, creía que Lacerda sería el único beneficiado, ya que Juscelino Kubitschek y João Goulart estaban exiliados.
Ya en 1967, a través de los ministros Magalhães Pinto y Hélio Beltrão, pasaron a intentar convencer a Lacerda de abandonar sus posiciones y colaborar con el gobierno. Con el rechazo de Lacerda y sus críticas públicas al gobierno, en agosto el ministro de Justicia Luís Antônio de la Gamma e Silva prohibió la presencia de Lacerda en la televisión.
El 1 de septiembre, se decidió que el Frente Amplio sería dirigido solamente por parlamentarios y elementos conectados a la Iglesia y que serían enviados emisarios para movilizar la opinión pública en torno a los ideales del Frente Amplio. El día 2 de septiembre, sin embargo, de los 133 parlamentarios de la oposición partidarios del Frente Amplio, 120 rechazaron colaborar por desconfiar de las intenciones de Lacerda, que parecía solo estar preocupado por su candidatura a la presidencia.
Nota conjunta
El día 24 de septiembre Lacerda viajó hacia Uruguay y el día 25 se encontró y divulgó nota conjunta con Goulart, defendiendo el Frente Amplio. En el encuentro estuvo presente Renato Archer, como representante de Juscelino Kubitschek. El acuerdo con Goulart irritó a los militares, que decidieron retirar el apoyo a Lacerda. También irritó a Brizola, exiliado en Uruguay, que emitió una nota condenando vehementemente la actitud de João Goulart. Lacerda declaró entonces: "Hoy está comprobado que Jango no es un hombre del Partido Comunista ni yo de Estados Unidos". El acuerdo también tuvo oposición de la familia de Getúlio Vargas.
El Frente Amplio''' comenzó a aproximarse al movimiento estudiantil y sindical, enfatizando la lucha contra la política salarial. Promovió comicios en Andrés el Apóstol, en diciembre, que se convirtieron en la mayor manifestación obrera de Brasil hasta entonces, y en Maringá, en abril de 1968, reuniendo a más de 15.000 personas, con apoyo del movimiento estudiantil.
Prohibición
El 5 de abril de 1968, el Frente Amplio fue definitivamente proscrito a través del decreto (Portaría) n.º 177 del Ministerio de Justicia. Posteriormente, tras la publicación del AI-5, Carlos Lacerda tuvo sus derechos políticos suspendidos durante 10 años, desde el 31 de diciembre de 1968.
Referencias
Dictadura de Brasil 1964-1985 | 27,044 |
https://ro.wikipedia.org/wiki/Mal%C3%AEnivka%2C%20Bilohirsk | Wikipedia | Open Web | CC-By-SA | 2,023 | Malînivka, Bilohirsk | https://ro.wikipedia.org/w/index.php?title=Malînivka, Bilohirsk&action=history | Romanian | Spoken | 48 | 143 | Malînivka (în ) este un sat în comuna Vasîlivka din raionul Bilohirsk, Republica Autonomă Crimeea, Ucraina.
Demografie
Conform recensământului din 2001, majoritatea populației localității Malînivka era vorbitoare de rusă (%), existând în minoritate și vorbitori de ucraineană (%).
Note
Maliînivka, Vasiîlivka
Maliînivka, Vasiîlivka, Bilohirsk
Maliînivka, Vasiîlivka, Bilohirsk, Crimeea | 26,180 |
https://stackoverflow.com/questions/22645561 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | MjonesGEO, https://stackoverflow.com/users/3470340 | English | Spoken | 148 | 246 | Removing the same character from the middle of a string in Field Calculator
This is the String I have in one column; CO060020N0650W0. I need it to say 2N65W.
The second character is '5', sometimes it's '7'. I want to remove just that character from field calculator. How do I only remove the second character using python?
I can start by doing !PLSS![5:] and chop it down to 20N0650W0. I need to be able to get the inside zeros too without using a replace.
You can slice and add the string in the field calculator using the Python parser:
!column![6:7] + !column![8:9] + !column![10:12] + !column![13:14]
That works perfectly! I was adding them together several different times. I was using just !Column![:2] + !Column![4:] and then adjusting the number each time to meet my need. The format you have is much more efficient and uses less characters. Thanks!
| 36,792 |
https://id.wikipedia.org/wiki/Brissago-Valtravaglia | Wikipedia | Open Web | CC-By-SA | 2,023 | Brissago-Valtravaglia | https://id.wikipedia.org/w/index.php?title=Brissago-Valtravaglia&action=history | Indonesian | Spoken | 28 | 76 | Brissago-Valtravaglia adalah kota yang terletak di Provinsi Varese, Italia. Brissago-Valtravaglia memiliki luas sebesar 6.3 km². Kota ini memiliki penduduk sebesar 1193 jiwa. Kota ini memiliki kode pos 21030. | 20,172 |
https://stackoverflow.com/questions/26905144 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Tahir Malik, https://stackoverflow.com/users/1906076, https://stackoverflow.com/users/676675, mark | English | Spoken | 620 | 926 | Upload in Alfresco Repository
I'm new to Alfresco. What i'm trying to do is to upload a file through REST API in a folder that i have created using Alfresco Web Administration Interface. I have a few problems:
1) I can see a set of folders, but how are them managed by Alfresco? As far as i know, those folders doesn't really exists physically, they are virtual. How does Alfresco manage the folders structure and files?
2) I have seen many examples on the _REST API use to upload a file. Anyway, the destination is set by something like this
workspace://SpacesStore/aae3b33fd-23d4-4091-ae64-44a8e332091341
I can't understand: What exactly is a SpaceStore? And, does the last-part-code refers to a specific folder? How can i get those codes relative to the folder i see in the Alfresco Web Admin Interface?
For 1) you will have to read http://wiki.alfresco.com/. 2) This is a NodeRef that identifies each node. Do you have a specific problem using the REST API?
Yes, i have no idea on how to get the NodeRef of a folder i'm viewing in the web admin interface
Are you using Share?
Yes i'm using share. Can you please suggest me the most relevant chapter on wiki regarding repository?
Get a training, these are basic stuff you need to know prior to developing.
1) I can see a set of folders, but how are them managed by Alfresco?
As far as i know, those folders doesn't really exists physically, they
are virtual. How does Alfresco manage the folders structure and files?
Alfresco is an implementation of the Java Content Repository (JCR), this means that all the contents are managed using a logic structure similar to a graph of nodes. Storing and manipolating content must be done using the repository API, that's why you don't see anything at a storage level.
Each content in Alfresco is a node connected to at least another node: the parent.
The storage of Alfresco is based on two components:
File system for storing binaries and search indexes
Database for storing the backup of metadata and associations
The way how Alfresco stores contents is not important for you because you typically want to access using the Alfresco API. You can create your own logic structure in the repository using any type of folders tree and content associations.
2) I have seen many examples on the _REST API use to upload a file.
Anyway, the destination is set by something like this
workspace://SpacesStore/aae3b33fd-23d4-4091-ae64-44a8e332091341 I
can't understand: What exactly is a SpaceStore? And, does the
last-part-code refers to a specific folder?
A repository typically consists of a set of JCR workspaces, the SpacesStore is one of the workspaces in Alfresco and it is the logic partition of contents in their latest version.
Alfresco also contains other workspaces:
userStore: contains person nodes
archiveStore: contains removed nodes
version2Store: contains the version history of nodes
How can i get those codes relative to the folder i see in the Alfresco
Web Admin Interface?
That code is the node reference that is the unique identifier for each node in the repository and as you can see it consists of three parts:
workspace: the store protocol
SpacesStore: the store identifier
uuid: the UUID related to the node
The store reference consists of the store protocol appended with the store identifier and it is the identifier of the workspace where the node lives. The UUID specify the content inside the workspace.
These node references are the ID for nodes and you can see all these informations using the Node Browser inside the Alfresco Explorer | Administration Console trying to navigate your repository starting from the Company Home.
Hope this helps.
potevi scriverlo in italiano, ma grazie mille :D
| 1,871 |
https://stackoverflow.com/questions/2410323 | StackExchange | Open Web | CC-By-SA | 2,010 | Stack Exchange | Alireza Jafari Fard, Blankman, Farhan Janjua, G. Cotrell, Nikhil Singh, drewdrewthis, https://stackoverflow.com/users/39677, https://stackoverflow.com/users/4905239, https://stackoverflow.com/users/4905240, https://stackoverflow.com/users/4905241, https://stackoverflow.com/users/4905270, https://stackoverflow.com/users/4905302, https://stackoverflow.com/users/70393, karim79 | English | Spoken | 95 | 175 | does javascript/jquery have an event model that you can create?
Does jquery/javascript have any event model that you can attach to your objects?
Basically I want an object to have an event, and I want other objects to be able to subscribe to these events?
Take a look at these:
Custom events in jQuery?
Custom jQuery event
and here:
http://www.reynoldsftw.com/2009/04/custom-events-in-jquery-open-doors-to-complex-behaviors/
do you think YUI has a better way to do these things? more efficient?
@Blankman - I honestly wouldn't know, as I have never used YUI.
You can use the bind function for custom events.
| 4,447 |
https://war.wikipedia.org/wiki/Pterocheilus%20trachysomus | Wikipedia | Open Web | CC-By-SA | 2,023 | Pterocheilus trachysomus | https://war.wikipedia.org/w/index.php?title=Pterocheilus trachysomus&action=history | Waray | Spoken | 37 | 70 | An Pterocheilus trachysomus in uska species han Hymenoptera nga ginhulagway ni Richard Mitchell Bohart hadton 1940. An Pterocheilus trachysomus in nahilalakip ha genus nga Pterocheilus, ngan familia nga Eumenidae. Waray hini subspecies nga nakalista.
Mga kasarigan
Pterocheilus | 12,688 |
https://stackoverflow.com/questions/51559439 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | English | Spoken | 425 | 973 | Why error object does not have status code and statusMessage?
Here is the scenario:
The service class is generated from the swagger editor and is imported in my Angular project.
There are different endpoints and for the sake of this question, I am posting below one of the main endpoints.
public getCompanies(pageNumber: string, pageSize: string, sortOrder: string, observe?: 'body', reportProgress?: boolean): Observable<Array<Company>>;
public getCompanies(pageNumber: string, pageSize: string, sortOrder: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Company>>>;
public getCompanies(pageNumber: string, pageSize: string, sortOrder: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Company>>>;
public getCompanies(pageNumber: string, pageSize: string, sortOrder: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
if (pageNumber === null || pageNumber === undefined) {
throw new Error('Required parameter pageNumber was null or undefined when calling getCompanies.');
}
if (pageSize === null || pageSize === undefined) {
throw new Error('Required parameter pageSize was null or undefined when calling getCompanies.');
}
if (sortOrder === null || sortOrder === undefined) {
throw new Error('Required parameter sortOrder was null or undefined when calling getCompanies.');
}
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
if (pageNumber !== undefined) {
queryParameters = queryParameters.set('pageNumber', <any>pageNumber);
}
if (pageSize !== undefined) {
queryParameters = queryParameters.set('pageSize', <any>pageSize);
}
if (sortOrder !== undefined) {
queryParameters = queryParameters.set('sortOrder', <any>sortOrder);
}
let headers = this.defaultHeaders;
// authentication (oauth) required
if (this.configuration.accessToken) {
let accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
let httpHeaderAccepts: string[] = [
'application/json'
];
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
// to determine the Content-Type header
let consumes: string[] = [
'*/*'
];
return this.httpClient.get<Array<Company>>(`${this.basePath}/companies`,
{
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
Kindly note that the above code is auto-generated and cannot be modified. The above service is subscribed like below,
this._myservice.getCompanies( page, size, sortOrder ).subscribe(
(response) => {
console.log("Success");
},
(error) => {
console.log("Error: " + error.status);
}
);
Here just for the testing purpose, I am using the console to see the status messages. I have tested one case where the server returns 401 Unauthorised. The error.status always contains 0.
In browser network window I see that the error code is 401 but in angular it always has status code 0 and statusText "Unknown Error". Why is this happening?
It may be due to the fact that ErrorResponse object doesn't have "status" property (at least when generating code with swagger code-gen 2.3.1). Did you try accessing error.code or error.message?
| 48,423 | |
https://stackoverflow.com/questions/26104146 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Carl Witthoft, Roland, Wicelo, https://stackoverflow.com/users/1412059, https://stackoverflow.com/users/2426586, https://stackoverflow.com/users/884372 | English | Spoken | 227 | 405 | How to accelerate (parallelize ?) text files into dataframe conversion?
I have hundreds of .csv in a folder that I would like to convert into a dataframe in R. I can do this with this code :
file_list <- list.files()
dataset = NULL
for (file in file_list){
temp_dataset <-read.table(file, header=TRUE, sep=" ")
temp_dataset$symbol <- unlist(strsplit(file,split=".",fixed=T))[1]
dataset<-rbind(dataset, temp_dataset)
rm(temp_dataset)
print(file)
}
But the bigger the dataframe gets the slower new files are added and it rapidly becomes consequent. My entire folder is only 300mb so it's still manageable by R. Is there a way to accelerate the process ?
You are commiting the cardinal sin of growing an object in a loop. Do something like this instead: dataset <- lapply(file_list, function(file) <...>); dataset <- do.call(rbind, dataset) Using package data.table could make this even faster.
@Roland : is there a way to print files that are currently processed into the list by lapply ? Some text files are ill formated and make the expression throw an error, I would like to know which ones are bad.
Use trycatch , or if you know what sort of formatting problems exist, just check for that specific condition, e.g. if(length(temp_dataset$symbol ==0 ) do_something . Parallelization almost certainly won't help, as you'll blow a ton of time piping each temp_dataset back to the main process.
@Wicelo Just add message(file) to the function body.
| 41,879 |
https://stackoverflow.com/questions/23533164 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Amir Popovich, Ben, El Sande, Robert Harvey, Running Rabbit, Sriram Sakthivel, https://stackoverflow.com/users/102937, https://stackoverflow.com/users/1715579, https://stackoverflow.com/users/2530848, https://stackoverflow.com/users/3073006, https://stackoverflow.com/users/3213034, https://stackoverflow.com/users/3594959, https://stackoverflow.com/users/991120, p.s.w.g | English | Spoken | 287 | 493 | How to get 4 digits from the middle a string in C#
I have a string variable like test10015, i want to get just the 4 digits 1001,
what is the best way to do it?
i"m working in asp.net c#
All the answers proposed so far assume the digits will be in a certain position within the string, and would break if the string was instead something like "a1234b". Please provide more a specific explanation on exactly what kinds of inputs you expect and what output you would like. Also, please show us what you've tried so far.
Thank you, but my digits are in a certain position.
try this. it will work for you:
string s = "test10015";
string newstring = s.Substring(s.Length - 5, 4);
Console.WriteLine(newstring);
With Linq:
var expected = str.Skip(4).Take(4);
Without Linq:
var expected = str.Substring(4,4);
@RobertHarvey As an alternative, not really required.
string input = "test10015";
string result = input.Substring(4, 4);
This is wrong. The first parameter is the position in the original string, which you've set as the first character.
Select the first four digits in your string:
string str = "test10015";
string strNum = new string(str.Where(c => char.IsDigit(c)).Take(4).ToArray());
@RobertHarvey well do you have a solution that isn't Linq?
Absolutely. Substring()
Well then instead of criticizing everyone else, it maybe more productive if you provided your own solution.
Or a regular expression. (just for the sake of argument)
substring is good for this spec. case.. I guess he wanted something more generic..but that's just a guess..
You can use String.Substring Method (Int32, Int32). You can subtract 5 from from the length to start from your required index. Make sure the format of string remains the same.
string res = str.Substring(str.Length-5, 4);
| 38,068 |
https://sv.wikipedia.org/wiki/Hybridsn%C3%B6b%C3%A4r | Wikipedia | Open Web | CC-By-SA | 2,023 | Hybridsnöbär | https://sv.wikipedia.org/w/index.php?title=Hybridsnöbär&action=history | Swedish | Spoken | 67 | 173 | Hybridsnöbär (Symphoricarpos microphyllus) är en kaprifolväxtart som beskrevs av Carl Sigismund Kunth. I den svenska databasen Dyntaxa används istället namnet Symphoricarpos × chenaultii. Enligt Catalogue of Life ingår Hybridsnöbär i släktet snöbärssläktet och familjen kaprifolväxter, men enligt Dyntaxa är tillhörigheten istället släktet snöbärssläktet och familjen kaprifolväxter. Arten förekommer tillfälligt i Sverige, men reproducerar sig inte. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Snöbärssläktet | 1,721 |
https://askubuntu.com/questions/503851 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | English | Spoken | 112 | 229 | No Sound In Ubuntu Studio 14.04.1
When playing video and audio files, or on Youtube, there is not sound output.
Any solution?
The problem was causes by the Volume Control configuration. The wrong audio profile was selected.
To clarify:
In the System settings sound pane, on the output tab, I have multiple outputs. (Digital, and analogue and Headphones).
I had the wrong one selected, and changed it so it now works.
Try with installing the sound card driver:
sudo apt-get install build-essential linux-headers-`uname -r` alsa-base alsa-firmware-loaders alsa-oss alsa-source alsa-tools alsa-tools-gui alsa-utils alsamixergui
If already installed, then Reinstall the driver package:
sudo apt-get --purge autoremove linux-headers-`uname -r` && sudo apt-get install linux-headers-`uname -r`
| 6,414 | |
HJuYzTfcHDM_1 | Youtube-Commons | Open Web | CC-By | null | Dr Andrew Goodall, Chief Executive NHS Wales thanks staff | None | English | Spoken | 389 | 469 | Dw i Andrew Goodall, prifwethweddwr, agig Cymru. I'm Andrew Goodall, the NHS Wales Chief Executive. As the National Health Service celebrates its 70th anniversary, I wanted to take this opportunity to say thank you. Like many of you, I'm attending events to celebrate the 70 years of success and achievement of the NHS, and it has been a pleasure to meet some of you at the national and local celebrations. We are all touched by the NHS during our lives at both our happiest and our most difficult moments. Yet I am always impressed with your dedication, professionalism and selflessness when I meet you, and I have witnessed this at some of the most pressurised times of the year. I know that this respect is shared by the people of Wales who look to you at their times of need. The caring professional workforce that we all recognise as supporting better health and outcomes for the people of Wales, has been a constant since the birth of the service in 1948. I have personally worked in the NHS for 27 years, and I've always been proud to be part of that workforce. I was pleased that in a previous Chief Executive role, I was responsible for the opening of a new hospital in Ebervale, as Butti and Arun Bevan, named after the founding father of the NHS. My only surprise was that this was the first hospital named after him. As we take a moment to reflect on the achievements and the momentous changes in the service over the last seven decades, it's important that we take time to focus on the values and principles that drive us forward to deliver for the population. I want you to know that you are vital to the NHS, and as we look to the future, you have a great responsibility to ensure the great legacy that we have inherited is passed on with care and ambition to future generations. Having seen your professionalism throughout my career, I have every confidence that you are ready to respond to the challenges of our time. It is a privilege to be the Chief Executive of NHS Wales in its 70th anniversary year, and as we celebrate your NHS, our NHS, I want you to know that I am very proud of all your contributions. | 21,270 |
https://en.wikipedia.org/wiki/Yellow%20Card%20Man | Wikipedia | Open Web | CC-By-SA | 2,023 | Yellow Card Man | https://en.wikipedia.org/w/index.php?title=Yellow Card Man&action=history | English | Spoken | 939 | 1,308 | "Yellow Card Man" is a science fiction novelette published in 2006 by Paolo Bacigalupi. It was nominated for the 2007 Hugo Award for Best Novelette. The story serves as a prologue for Bacigalupi's novel, The Windup Girl.
Plot summary
The story follows Tranh, the once wealthy head of the multi-national "Three Prosperities" trading company, now a refugee suffering from PTSD, who is forced to eke out a living in the slums of a future Bangkok.
Genetically engineered plant pathogens have destroyed much of the world's crops, and Western biotech companies are busy selling disease-resistant seeds to third-world countries, while also re-engineering the pathogens to destroy the new plants after a few years, so that the companies can re-engineer the seeds to be resistant to the new diseases and thus repeat the cycle.
Prejudice and ethnic tension have boiled over in Malaysia, resulting in the Malays slaughtering the other ethnic groups. Tranh barely escaped the mobs, having seen his family hacked to death by machetes and his successful business looted and burned. He has made his way to Bangkok and has been granted refugee status—a "yellow card". Most refugees are despised and are relegated to scrounging for the lowest day-laborer work.
Ma, a former employee whom Tranh had fired for stealing, had left Malaysia for Bangkok well before the massacres, and thanks to having been in place before the flood of refugees, was able to find well-paying work.
The story opens with Tranh waking up late and rushing to get to a company he has heard will be hiring new employees. On his way, he encounters Ma. Tranh notices that Ma is wearing Tranh's old Rolex watch, which Tranh had been forced to sell for a pittance in order to survive. Ma, seeing that Tranh has noticed the watch, mocks Tranh for having fallen so far, and taunts Tranh for having once told him that individuals "make our own luck", that success is solely a result of earning it and that luck plays no part.
Finally arriving at the factory, Tranh finds that the rumor of job openings is true, but there is already a line of hundreds of refugees waiting ahead of Tranh for the interviews. Tranh talks with some friends in line, discussing how all of them are highly educated and formerly successful men—physics professors, heads of corporate legal departments, or like Tranh the former head of a multinational trading company—and so are all far overqualified for the three jobs as low-level managers. The seething frustration of other yellow-cards is directed at Tranh for "cutting in line" even though it obviously does not matter, so he leaves. Needless to say, the jobs are filled by the first few interviewees, long before the remaining hundreds of refugees are interviewed.
That evening, Tranh sees Ma again at a restaurant, and Ma invites him to eat and to talk. Ma thanks Tranh for having fired him, since it saved his life by forcing him to leave Malaysia long before the massacres. Ma explains to Tranh that he bought the watch because he recognized it and wanted it as a memento mori—a reminder that if a successful major company like "Three Prosperities" could fall, so could he. Ma tells Tranh that thanks to his work, he has finally gained Thai citizenship and will no longer be a yellow-card refugee. Tranh begs Ma for any sort of job, but Ma tells him it is impossible, that line work at his factory is not open to crippled refugees when legal Thai workers are available, and that Tranh's business experience does not qualify him for the sorts of scientific research for which a work permit could be obtained.
The next day, Tranh is injured while unloading a cart of potatoes, when a - a genetically engineered elephant - goes on the rampage; his knee is destroyed, leaving him badly crippled. At that, he is fortunate, for one of his friends is killed by the animal. Tranh gets the supervisor to pay him double, both his own wages and the dead friend's, as compensation; he wastes the money on a last bottle of whiskey and hobbles off to await starvation and death.
However, while drunk and laying against a building late that night, Tranh sees Ma leave a brothel with his business manager, who departs in a pedicab. As Ma begins to walk home, Thai police accost him for being out after curfew, and when Ma attempts to explain that he is a Thai citizen, the police, hearing his Malay-Chinese accent, beat him and rob him for failing to grovel his respect.
Ma, badly beaten, begs Tranh to help him get home. Instead, Tranh murders Ma, smashing his whiskey bottle and slashing Ma's throat with the broken glass. He then robs Ma of his papers and money and takes a rickshaw to the factory where Ma worked. Although it is late at night, he knows there will be a job opening in the morning, and he wants to be the first in line to apply.
Notes
Bacigalupi changed the name of the character from "Tranh" in the short story to "Hock Seng" in the novel, stating that his conception of the character had changed.
In the recent Stephen King novel, 11/22/63, a character is called the Yellow Card Man, and is later found having slashed his own throat with a broken whiskey bottle.
References
External links
Windup Stories downloadable eBook sample from the publisher, Nightshade Books, containing "Yellow Card Man" and "The Calorie Man", another short story in the same future history.
Science fiction short stories
2006 short stories
Works originally published in Asimov's Science Fiction | 23,115 |
https://en.wikipedia.org/wiki/Prescott%2C%20Arkansas | Wikipedia | Open Web | CC-By-SA | 2,023 | Prescott, Arkansas | https://en.wikipedia.org/w/index.php?title=Prescott, Arkansas&action=history | English | Spoken | 1,735 | 2,694 | Prescott is a city and the county seat of Nevada County, Arkansas, United States. The community had a population of 3,296 at the 2010 census. Prescott is part of the Hope Micropolitan Statistical Area.
Located 100 miles southwest of Little Rock, Prescott was developed on the Prairie D'Âne, named by French colonists before the United States acquired this area. The prairie consisted of approximately 25–30 square miles of rolling open land, surrounded by forest. The area had been a well-known crossroads prior to construction of the Cairo & Fulton Railroad. To the west lies the city of Washington, to the east lies the city of Camden, while to the south lies the Red River, with Shreveport, Texarkana, and Dallas beyond.
As of 2014, Prescott and Nevada County had sixteen properties listed on the National Register of Historic Places. Elkin's Ferry Battleground and the Prairie D'Ane Battlefield are further recognized as National Historic Landmarks within a National Historic Landmark District.
History
The city of Prescott was not platted until 1873 during Reconstruction. It was to be a station stop for the Cairo & Fulton Railroad then under construction. The railroad was constructed parallel to the Southwest Trail through northern Nevada County. Prescott was incorporated on October 6, 1874.
The original town site consisted of 48 blocks, 24 on each side of the railroad. The streets were platted in a grid pattern from the railroad line. Streets running east–west use the railroad as a dividing line between their eastern and western halves, and streets running north–south use Main Street as a dividing line between their northern and southern halves.
Prescott grew quickly because the railroad provided a reliable way to transport local products to larger markets. The first post office opened in November 1873, and the first newspaper, The Banner, was established in 1875. The Nevada County seat was moved to Prescott in 1877, which contributed to the town's commercial importance. It became a center of law and government in the county. By the late 1890s, Prescott had its own telephone system and water and light plant.
The timber industry became important to the region's early economy when in 1890, James H. Bemis & Benjamin Whitaker built the Ozan Lumber Company plant in Prescott. That same year, Dr. R. L. Powers began constructing the Prescott & Northwestern Railroad. It transported lumber, peaches, cotton and other products. It also provided passenger service, connecting adjacent communities to the Missouri Pacific Railroad Depot in Prescott.
Historians have speculated on the naming of Prescott: whether it was named after William Hickling Prescott, of Salem, Massachusetts, who was a friend of Cairo & Fulton Railroad officials Thomas Allen and Henry Marquand, or where it was named after the County Surveyor, W. H. Prescott.
Geography
Prescott is located at (33.802614, -93.381884) on south-southwest section of Prairie D'Âne. The large open prairie was named by French colonists and is located in the Arkansas Timberlands region of the Ark-La-Tex. Prescott is situated in the Gulf Coastal Plain, near the Little Missouri River. This waterway provides Prescott with drinking water and recreational opportunities.
According to the United States Census Bureau, the city has a total area of , of which is land and 0.15% is water.
Climate
The climate in Prescott is characterized by hot, humid summers and generally mild to cool winters. According to the Köppen Climate Classification system, Prescott has a humid subtropical climate, abbreviated "Cfa" on climate maps.
Demographics
2020 census
As of the 2020 United States census, there were 3,101 people, 1,212 households, and 804 families residing in the city.
2000 census
As of the census of 2000, there were 3,686 people, 1,421 households, and 912 families residing in the city. The population density was . There were 1,643 housing units at an average density of . The racial makeup of the city was 53.31% White, 44.49% Black or African American, 0.38% Native American, 0.08% Asian, 1.17% from other races, and 0.57% from two or more races. 1.76% of the population were Hispanic or Latino of any race.
There were 1,421 households, out of which 32.1% had children under the age of 18 living with them, 41.6% were married couples living together, 19.5% had a female householder with no husband present, and 35.8% were non-families. 33.6% of all households were made up of individuals, and 18.4% had someone living alone who was 65 years of age or older. The average household size was 2.39 and the average family size was 3.05.
In the city, the population was spread out, with 25.7% under the age of 18, 8.5% from 18 to 24, 26.7% from 25 to 44, 20.3% from 45 to 64, and 18.7% who were 65 years of age or older. The median age was 37 years. For every 100 females, there were 85.7 males. For every 100 females age 18 and over, there were 79.5 males.
The median income for a household in the city was $21,612, and the median income for a family was $28,665. Males had a median income of $27,384 versus $17,289 for females. The per capita income for the city was $11,515. About 27.5% of families and 32.5% of the population were below the poverty line, including 38.7% of those under age 18 and 39.6% of those age 65 or over.
Arts and culture
Annual events
The Fall Festival and Trade Days showcases games, activities and numerous entertainment and sports events. These include a 5K run/walk, arts & crafts booths, a BQ cook-off, balloon liftoff, beauty pageant, bunco tournament, co-ed softball tournament, dessert contest, dunking booth, face painting, food vendors, a great pumpkin treasure hunt, pet costume contest, pie eating contest, sidewalk sales, and the Tyson/Calvin Brown basketball tournament.
Libraries
The Prescott/Nevada County Library was completed on November 4, 2003. It is located in downtown Prescott, and is administered by the Southwest Arkansas Regional Library System.
Museums
Nevada County Depot & Museum - The depot building was designed by Missouri Pacific Railroad architect E. M. Tucker, who also designed railway stations in Little Rock and Texarkana. It was constructed in 1912 and houses permanent exhibits on the Civil War Battles, Railroads, and general history of Prescott and Nevada County. The museum also houses an area archive that is open to researchers.
Education
Public Schools
Prescott's public school system was founded in 1877. Public education for elementary and secondary school students is provided by the Prescott School District, which leads to graduation from Prescott High School. As of the 2015–2016 school year, the district serves more than 1,000 students and employs more than 175 faculty and staff.
Prescott School District includes the following three school facilities:
Prescott High School, serving students in grades 9 through 12.
Prescott Junior High School, serving students in grades 5 and 8.
Prescott Elementary School, serving students in prekindergarten through grade 4.
Transportation
Air
Kizer Field, (4F7) on the eastern edge of the city.
Rail
Missouri Pacific Railroad
Prescott & Northwestern Railroad
Highways
Interstate 30
U.S. Highway 67
U.S. Highway 371
Arkansas
Highway 332
Arkansas Highway 24
Arkansas Highway 19
Media
Print
Hope-Prescott
Radio
1370 AM KTPA – "The talk of South Arkansas."
Social Media-News
SWARK.Today (Southwest Arkansas), Hope-Prescott
Notable people
Kirby Allan (Pittman), born 1928, in Prescott, record producer.
Frederick W. Allsopp - author. Allsopp Park, in Little Rock, was named in his honor.
Grady Gammage - (born 1892, Prescott) - Arizonan educator, president of Northern Arizona University and Arizona State University. Gammage Auditorium in Tempe, Arizona was named in his honor.
Walt Goldsby - MLB outfielder, St. Louis Browns, Washington Nationals, Richmond Virginians, Baltimore Orioles.
Oren Harris - US Representative and United States District Court judge.
Jerry Louis Latin - (born 1953, Prescott) - NFL running back, St. Louis Cardinals and St. Louis Rams.
Ira E. McMillian - (born 1908, Prescott) - U.S. Navy Rear Admiral and Navy Cross recipient.
Thomas Chipman McRae - Arkansas Representative, Governor, US Representative, US Congress.
Jim Moore (baseball) - (born 1903, Prescott) - MLB pitcher, Cleveland Indians and Chicago White Sox.
John C. Munn - (born 1906, Prescott) - Assistant Commandant of the Marine Corps.
Anita Pointer - entertainer, The Pointer Sisters.
Charles Randolph Prim - (born 1896, Prescott) - NLB pitcher, Kansas City Monarchs.
Floyd Robinson - (born 1936, Prescott) - MLB outfielder, Chicago White Sox, Cincinnati Reds, Oakland Athletics, and Boston Red Sox.
Mike Ross (politician) - Arkansas Senate, US Representative and Democratic nominee for governor in 2014. (Arkansas's 4th congressional district)
Ulysses "Slow Kid" Thompson - (born 1888, Prescott) - Vaudeville entertainer and promoter.
John Shackelford - NLB outfielder, Cleveland Browns, Harrisburg Giants, Chicago American Giants, and Birmingham Black Barons.
Paul Silas - (born 1943, Prescott) - NBA player and head coach.
Chuck Tompkins - (born 1889, Prescott) - MLB pitcher, Cincinnati Reds.
Daniel Eugene "Danny" Walters - (born 1960, Prescott) - NFL cornerback, San Diego Chargers.
Points of interest
Carolina Methodist Church - (Private) A one-story wood frame rectangular ecclesiastical building that is an excellent example of early vernacular Greek Revival style architecture.
De Ann Cemetery - Final resting place for early settlers of Prescott and Nevada County.
Elkin's Ferry Battleground - National Historic Landmark of the Civil War.
Moscow Methodist Church and Cemetery - (Private) Original area of local settlement and commerce prior to construction of the Cairo and Fulton Railroad.
Historic Washington State Park - Located 25 miles southwest of Prescott, the park offers visitors guided tours which interpret the history of this pioneer settlement, originally located on the Southwest Trail. The park hosts Civil War reenactments, the annual Jonquil Festival, and a Christmas Festival.
Prairie D'Ane Battlefield - National Historic Landmark of the Civil War.
Prescott Commercial Historic District - Downtown Area of unique Architecture and Commerce.
Prescott Raceway – Offers 1/4-mile drag racing.
Sterling Square Park – Includes brick sidewalks with memorial pavers, benches, and a fountain. A mural illustrates historic scenes from the area.
White Oak Lake State Park and Poison Springs Battleground State Park - Located 22 miles east of Prescott, the parks include campsites, pavilions, picnic sites, trails, playgrounds, and a visitor center with exhibits and interactive programs. The parks are an interpretation gateway to the Camden Expedition, and the Red River Campaign.
References
External links
Prescott Arkansas Web Page
National Register of Historic Places listings in Nevada County, Arkansas
Cities in Nevada County, Arkansas
Cities in Arkansas
County seats in Arkansas
Hope micropolitan area
Populated places established in 1873
1873 establishments in Arkansas | 46,707 |
https://stackoverflow.com/questions/54016407 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | English | Spoken | 172 | 401 | Conditional EXEC dbo statement. Force error if exists, else succeed
I'm trying to write a script that will exit as an error when there are currently SQL agent jobs running. I would also like it to succeed (exit 0) if there are no jobs running.
Something like below.
IF
EXEC msdb.dbo.sp_help_job @execution_status=1
THEN
RAISE ERROR
ELSE
COMPILE SUCCESS
The following code will help you. You may need to change the code for your required action.
First, you need to create a Stored Procedure:
CREATE PROCEDURE YourProc
AS
BEGIN
DECLARE @ErrMsg NVARCHAR(MAX), @ErrSeverity INT
SET XACT_ABORT OFF
BEGIN TRY
IF EXISTS (
SELECT *
FROM msdb.dbo.sysjobs_view job
INNER JOIN msdb.dbo.sysjobactivity activity
ON job.job_id = activity.job_id
WHERE activity.run_Requested_date IS NOT NULL
AND activity.stop_execution_date IS NULL)
BEGIN
SELECT @ErrMsg = 'There is a Job already running',
@ErrSeverity = 1;
RAISERROR (@ErrMsg, @ErrSeverity, 1);
END
ELSE
PRINT 'No Jobs running'
END TRY
BEGIN CATCH
SELECT @ErrMsg = ERROR_MESSAGE(),
@ErrSeverity = ERROR_SEVERITY();
RAISERROR (@ErrMsg, @ErrSeverity, 1);
END CATCH
END
Then, you can call your procedure:
EXEC YourProc
| 21,093 | |
https://te.wikipedia.org/wiki/%E0%B0%97%E0%B1%82%E0%B0%A8%E0%B0%B2%E0%B0%82%E0%B0%95 | Wikipedia | Open Web | CC-By-SA | 2,023 | గూనలంక | https://te.wikipedia.org/w/index.php?title=గూనలంక&action=history | Telugu | Spoken | 513 | 3,252 | గూనలంక, అల్లూరి సీతారామరాజు జిల్లా, గూడెం కొత్తవీధి మండలానికి చెందిన గ్రామం. ఇది మండల కేంద్రమైన గూడెం కొత్తవీధి నుండి 10 కి. మీ. దూరం లోను, సమీప పట్టణమైన అనకాపల్లి నుండి 100 కి. మీ. దూరంలోనూ ఉంది. 2011 భారత జనగణన గణాంకాల ప్రకారం ఈ గ్రామం 24 ఇళ్లతో, 75 జనాభాతో 0 హెక్టార్లలో విస్తరించి ఉంది. గ్రామంలో మగవారి సంఖ్య 68, ఆడవారి సంఖ్య 7. షెడ్యూల్డ్ కులాల సంఖ్య 0 కాగా షెడ్యూల్డ్ తెగల సంఖ్య 75. గ్రామం యొక్క జనగణన లొకేషన్ కోడ్ 585520.పిన్ కోడ్: 531133.
2022 లో చేసిన జిల్లాల పునర్వ్యవస్థీకరణకు ముందు ఈ గ్రామం విశాఖపట్నం జిల్లాలో, ఇదే మండలంలో ఉండేది.
విద్యా సౌకర్యాలు
గ్రామంలో ప్రభుత్వ ప్రాథమిక పాఠశాల ఒకటి, ప్రైవేటు ప్రాథమికోన్నత పాఠశాల ఒకటి, ప్రైవేటు మాధ్యమిక పాఠశాల ఒకటి ఉన్నాయి. సమీప బాలబడి చింతపల్లిలో ఉంది.సమీప జూనియర్ కళాశాల గూడెం కొత్తవీధిలోను, ప్రభుత్వ ఆర్ట్స్ / సైన్స్ డిగ్రీ కళాశాల చింతపల్లిలోనూ ఉన్నాయి. సమీప వైద్య కళాశాల, మేనేజిమెంటు కళాశాల విశాఖపట్నంలోను, పాలీటెక్నిక్ పాడేరులోనూ ఉన్నాయి. సమీప వృత్తి విద్యా శిక్షణ పాఠశాల చింతపల్లిలోను, అనియత విద్యా కేంద్రం అనకాపల్లిలోను, దివ్యాంగుల ప్రత్యేక పాఠశాల విశాఖపట్నం లోనూ ఉన్నాయి.
వైద్య సౌకర్యం
ప్రభుత్వ వైద్య సౌకర్యం
ఒక సంచార వైద్య శాలలో డాక్టర్లు లేరు. ముగ్గురు పారామెడికల్ సిబ్బంది ఉన్నారు. సమీప సామాజిక ఆరోగ్య కేంద్రం, ప్రాథమిక ఆరోగ్య కేంద్రం, ప్రాథమిక ఆరోగ్య ఉప కేంద్రం గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. పశు వైద్యశాల గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉంది. మాతా శిశు సంరక్షణ కేంద్రం, టి. బి వైద్యశాల గ్రామం నుండి 10 కి.మీ. కంటే ఎక్కువ దూరంలో ఉన్నాయి. అలోపతి ఆసుపత్రి, ప్రత్యామ్నాయ ఔషధ ఆసుపత్రి, డిస్పెన్సరీ, కుటుంబ సంక్షేమ కేంద్రం గ్రామం నుండి 10 కి.మీ. కంటే ఎక్కువ దూరంలో ఉన్నాయి.
ప్రైవేటు వైద్య సౌకర్యం
తాగు నీరు
తాగునీటి కోసం చేతిపంపులు, బోరుబావులు, కాలువలు, చెరువులు వంటి సౌకర్యాలేమీ లేవు.
పారిశుధ్యం
గ్రామంలో మురుగునీటి పారుదల వ్యవస్థ లేదు. మురుగునీటిని శుద్ధి ప్లాంట్లోకి పంపిస్తున్నారు. గ్రామంలో సంపూర్ణ పారిశుధ్య పథకం అమలవుతోంది. సామాజికమరుగుదొడ్డి సౌకర్యం లేదు. ఇంటింటికీ తిరిగి వ్యర్థాలను సేకరించే వ్యవస్థ లేదు. సామాజిక బయోగ్యాస్ ఉత్పాదక వ్యవస్థ లేదు. చెత్తను వీధుల పక్కనే పారబోస్తారు.
సమాచార, రవాణా సౌకర్యాలు
సబ్ పోస్టాఫీసు సౌకర్యం గ్రామానికి 5 కి.మీ. లోపు దూరంలో ఉంది. పోస్టాఫీసు సౌకర్యం, పోస్ట్ అండ్ టెలిగ్రాఫ్ ఆఫీసు గ్రామం నుండి 10 కి.మీ.కి పైబడిన దూరంలో ఉన్నాయి. పబ్లిక్ ఫోన్ ఆఫీసు, మొబైల్ ఫోన్ గ్రామానికి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. లాండ్ లైన్ టెలిఫోన్, ఇంటర్నెట్ కెఫె / సామాన్య సేవా కేంద్రం, ప్రైవేటు కొరియర్ గ్రామం నుండి 10 కి.మీ.కి పైబడిన దూరంలో ఉన్నాయి. ప్రభుత్వ రవాణా సంస్థ బస్సు సౌకర్యం, ప్రైవేటు బస్సు సౌకర్యం, ఆటో సౌకర్యం, ట్రాక్టరు సౌకర్యం మొదలైనవి గ్రామానికి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. రైల్వే స్టేషన్ గ్రామం నుండి 10 కి.మీ.కి పైబడిన దూరంలో ఉంది. జిల్లా రహదారి గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉంది. జాతీయ రహదారి, రాష్ట్ర రహదారి, ప్రధాన జిల్లా రహదారి గ్రామం నుండి 10 కి.మీ.కి పైబడిన దూరంలో ఉన్నాయి.
గ్రామంలో కంకర రోడ్లు ఉన్నాయి.
మార్కెటింగు, బ్యాంకింగు
గ్రామంలో స్వయం సహాయక బృందం ఉంది. సహకార బ్యాంకు గ్రామం నుండి 5 కి.మీ. లోపు దూరంలో ఉంది. ఏటీఎమ్, వాణిజ్య బ్యాంకు, వ్యవసాయ పరపతి సంఘం గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. పౌర సరఫరాల వ్యవస్థ దుకాణం, రోజువారీ మార్కెట్, వారం వారం సంత, వ్యవసాయ మార్కెటింగ్ సొసైటీ గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి.
ఆరోగ్యం, పోషణ, వినోద సౌకర్యాలు
గ్రామంలో సమీకృత బాలల అభివృద్ధి పథకం, ఇతర పోషకాహార కేంద్రాలు ఉన్నాయి. గ్రామంలో వార్తాపత్రిక పంపిణీ జరుగుతుంది. ఉన్నాయి. అంగన్ వాడీ కేంద్రం, ఆశా కార్యకర్త గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. సినిమా హాలు, గ్రంథాలయం, పబ్లిక్ రీడింగ్ రూం, అసెంబ్లీ పోలింగ్ స్టేషన్, జనన మరణాల నమోదు కార్యాలయం గ్రామం నుండి 5 నుండి 10 కి.మీ. దూరంలో ఉన్నాయి. ఆటల మైదానం గ్రామం నుండి 10 కి.మీ.కి పైబడిన దూరంలో ఉంది.
విద్యుత్తు
గ్రామంలో గృహావసరాల నిమిత్తం విద్యుత్ సరఫరా వ్యవస్థ ఉంది.
భూమి వినియోగం
గునలంకలో భూ వినియోగం కింది విధంగా ఉంది:
ఉత్పత్తి
గునలంకలో ఈ కింది వస్తువులు ఉత్పత్తి అవుతున్నాయి.
ప్రధాన పంటలు
వరి, కాఫీ, బీన్స్
మూలాలు | 41,353 |
https://stackoverflow.com/questions/22577419 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Jerry, Toto, https://stackoverflow.com/users/1578604, https://stackoverflow.com/users/3449464, https://stackoverflow.com/users/372239, user3449464 | Norwegian Nynorsk | Spoken | 186 | 739 | preg_match & regex to find something
I want to use preg_match & regex to find all video qualitys.So I want to search 128, 500, 750, 1000, 1500 pixel qualitys. I need return all qualitys in array. How can I do it?
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=350000
128/prog_index.m3u8?key=49bfee85b05d117a2906368428094e94
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=750000
500/prog_index.m3u8?key=49bfee85b05d117a2906368428094e94
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000000
750/prog_index.m3u8?key=49bfee85b05d117a2906368428094e94
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1250000
1000/prog_index.m3u8?key=49bfee85b05d117a2906368428094e94
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1750000
1500/prog_index.m3u8?key=49bfee85b05d117a2906368428094e94
Any attempts yet? And it doesn't look like you need a regex to do something like that.
preg_match_all('/(.*?)\/prog_index.m3u8/mis', $url, $C); print_r($C);
I found:
preg_match_all('/(.*?)\/prog_index.m3u8/', $url, $C); print_r($C[1]);
@user3449464: And what is the result of your attempt? It's seem fine for me.
Well, now you got it :) Escape the period though. Better be safe than sorry!
@M42 The flags made things a bit... excessive.
You could use explode instead.
$pixel_arr = array();
foreach(explode(PHP_EOL,$str) as $v)
{
if(strpos($v,'/')!==false)
{
$v=explode('/',$v);
$pixel_arr[]=array_shift($v);
}
}
print_r($pixel_arr);
OUTPUT :
Array
(
[0] => 128
[1] => 500
[2] => 750
[3] => 1000
[4] => 1500
)
Demo
You can do it with regexp, if you want to:
preg_match_all( '/([0-9]+)\//', $str, $matches );
print_r( $matches[1] );
But, really, explode will be much faster.
How about:
preg_match_all('/^\d+/m', $str, $m);
| 12,041 |
https://war.wikipedia.org/wiki/Omicron%20deminutum | Wikipedia | Open Web | CC-By-SA | 2,023 | Omicron deminutum | https://war.wikipedia.org/w/index.php?title=Omicron deminutum&action=history | Waray | Spoken | 36 | 65 | An Omicron deminutum in uska species han Hymenoptera nga ginhulagway ni Giordani Soika hadton 1978. An Omicron deminutum in nahilalakip ha genus nga Omicron, ngan familia nga Eumenidae. Waray hini subspecies nga nakalista.
Mga kasarigan
Omicron | 42,698 |
https://math.stackexchange.com/questions/2200175 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Clement C., Sha Vuklia, User8128, https://math.stackexchange.com/users/307205, https://math.stackexchange.com/users/405827, https://math.stackexchange.com/users/75808 | English | Spoken | 379 | 878 | Show that the operator norm can be defined in terms of a minimum
Let $A$ be a bounded linear map. The operator norm is defined as follows:
\begin{aligned}
\Vert A\Vert&=\inf\{\alpha\in\mathbb R:\Vert Av\Vert\leq\alpha\Vert v\Vert\text{for all }v\in V\}\\
&=\min\{\alpha\in\mathbb R:\Vert Av\Vert\leq\alpha\Vert v\Vert\text{for all }v\in V\}.
\end{aligned}
I've tried to show that $\inf=\min$ by using contradiction, but I did not succeed:
Assume the infimum of this set is $m$, and this it can't be replaced by the minimum. That means that for each $v\in V:\Vert Av\Vert<m\Vert v\Vert$. I can't say that there exists $\epsilon>0$ such that $\Vert Av\Vert\leq m\Vert v\Vert-\epsilon$, because for all I know we have that $A$ gets arbitrarily close to $m$.
So how can I show that this infimum is in fact a minimum?
EDIT
I would like to use that a compact subset of a vector space is closed and bounded, because then I know that the linear map, which is continuous, will attain a minimum on the unit sphere. However, I will ask this specific question in a different post.
I think you're starting off the wrong foot: saying that $m$ is not a minimum is the negation of "$\lVert Av\rVert \leq m\lVert v\rVert$ for all $v\in V$," not what you wrote.
Is $V$ assumed to be finite dimensional?
I'm not sure about the context of your question, but I think it must be something like this :
The set $A$:
$\{ \enspace \alpha\in\mathbb R: \enspace \forall \enspace v\in V , \enspace \Vert Av\Vert\leq\alpha\Vert v\Vert \enspace \}\\
$
Has this as its complement ${\overline{A}}$:
$\{ \enspace \alpha\in\mathbb R: \enspace \exists \enspace v\in V , \enspace \Vert Av\Vert\gt\alpha\Vert v\Vert \enspace \}\\
$
Set ${\overline{A}}$ cannot contain its own boundary ( if : $\Vert Av\Vert\gt\alpha\Vert v\Vert$ , then we can find small enough $\epsilon$ with $\Vert Av\Vert\gt(\alpha+\epsilon)\Vert v\Vert$ ). Therefore ${\overline{A}}$ is open and $A$ must be closed . It follows that $\inf{A}=\min{A}$
Wow, I think that's it! Thanks a lot:)
Let $(\alpha_n)$ be a minimizing sequence in $X_A:=\{\alpha\in\mathbb R\,:\,\|Av\|\le\alpha\|v\|\text{ for all }v\in V\}$, that is, $\alpha_n\in X_A$ and $\alpha_n\to\|A\|$ as $n\to\infty$. Fix $v\in V$. We have $\|Av\|\le\alpha_n\|v\|$ for each $n$. Letting $n\to\infty$, we find $\|Av\|\le\|A\|\|v\|$. Since $v$ was arbitrary, it follows that $\|A\|\in X_A$, that is the infimum is attained inside the set, so it is a minimum.
| 32,231 |
https://cs.wikipedia.org/wiki/Foucaultovo%20kyvadlo | Wikipedia | Open Web | CC-By-SA | 2,023 | Foucaultovo kyvadlo | https://cs.wikipedia.org/w/index.php?title=Foucaultovo kyvadlo&action=history | Czech | Spoken | 692 | 1,757 | Foucaultovo kyvadlo, pojmenované po francouzském fyzikovi J. B. Léonu Foucaultovi, představuje důležitý experiment potvrzující otáčení planety Země kolem své osy.
Historie experimentu
Původní pokus byl proveden v roce 1851 v pařížském Pantheónu, kde bylo v kupoli zavěšeno závaží o hmotnosti 28 kilogramů na 68 metrů dlouhém laně. Doba kmitu kyvadla byla 16 sekund. Na závaží kyvadla byl hrot, kterým se do písku na podlaze zakresloval pohyb kyvadla. Pozorovatelé tak mohli vidět, jak se postupně mění rovina kyvu.
V roce 1851 bylo všeobecně známo, že se Země otáčí. Bylo také pozorováno zploštění Země na pólech. Foucaultovo kyvadlo však bylo prvním jasně viditelným důkazem a způsobilo tak velkou senzaci jak v odborných kruzích, tak u široké veřejnosti.
Na obou pólech Země se rovina kyvu nemění vzhledem k okolním hvězdám, zatímco Země se jednou za den zcela otočí. Vzhledem k Zemi se tedy rovina kyvu na severním nebo jižním pólu jednou za den zcela otočí po směru nebo proti směru hodinových ručiček. Pokud bychom Foucaultovo kyvadlo zavěsili na rovníku, rovina kyvu zůstane vzhledem k Zemi nezměněna. V ostatních zeměpisných šířkách se rovina kyvu vzhledem k Zemi sice otáčí, ale pomaleji, než na pólech.
Zeměpisná šířka je definována jako kladná a záporná (severní a jižní). Například rovina kyvu kyvadla na 30 ° jižní šířky při pohledu shora rotuje vzhledem k Zemi o 180 ° denně po směru hodinových ručiček.
Za účelem demonstrace zemské rotace bez komplikací, které přináší závislost na zeměpisné šířce, uvedl Foucault v roce 1852 gyroskop. Jeho rotor sleduje přímo hvězdy. Osa rotace se tak vrací do stejné polohy vzhledem k Zemi, a to bez ohledu na zeměpisnou šířku (není tedy ovlivněna sinusovým faktorem).
Foucaultovo kyvadlo je konstrukčně velmi náročné, protože i malá nepřesnost může způsobit další odchylky roviny kyvu, které pak převládnou nad vlivem zemské rotace. Kritické je také samotné spuštění kyvadla. To se provádí přepálením lanka, které drží kyvadlo ve výchozí poloze, čímž se zabrání nechtěným pohybům kyvadla do stran. Odpor vzduchu kyvadlo brzdí, proto jsou kyvadla v muzeích často elektromagneticky nebo jinak poháněna, případně opakovaně spouštěna.
Celý experiment byl uspořádán právě proto, aby dokázal existenci tohoto jevu, který Foucault teoreticky odvodil na základě předpokladů o vlivu Coriolisovy síly. Tato síla způsobuje vychylování kyvadla proti směru hodinových ručiček. Tento jev je důsledkem toho, že zvolená soustava (tedy otáčející se Země) není soustavou inerciální. Ve skutečnosti se totiž neotáčí kyvadlo, neboť kyvadlo si pouze zachovává rovinu kyvu, ale planeta Země se otáčí pod ním.
Exponáty v Česku
Foucaultovo kyvadlo je v různých velikostech a provedeních umístěno také v některých institucích a objektech v České republice:
Nejstarší model sestavený fyzikem a astronomem Františkem Nábělkem s 22,35 metrů dlouhým lankem je umístěn v Květné zahradě v Kroměříži
Desetimetrové kyvadlo se nachází ve Hvězdárně a planetáriu v Hradci Králové.
Jeden z exponátů, který v roce 2012 prošel rekonstrukcí, se nachází v budově České spořitelny v Hodoníně, kde je kyvadlo o délce 20,1 metrů zavěšeno uprostřed proskleného točitého schodiště a je volně přístupné v otevíracích hodinách České spořitelny.
V Praze je kyvadlo umístěno:
na 21 metrů dlouhém laně v budově ČVUT na Karlově náměstí
v rekonstruované vodárenské věži na Letné
na Matematicko-fyzikální fakultě Univerzity Karlovy v budově F Ke Karlovu 5 je od roku 2016 v zadním schodišti umístěno Foucaultovo kyvadlo nalezené v historických sbírkách Kabinetu výuky obecné fyziky MFF UK. To visí na ocelovém laně o délce 21,3 m, a má hmotnost 18 kg.
Další Foucaultovo kyvadlo se nachází na Gymnáziu Brno, Křenová a je zavěšeno ve výšce zhruba 15 metrů.
Na Přírodovědecké fakultě Univerzity Palackého v Olomouci je Foucaultovo kyvadlo o hmotnosti 37 kg na textilním laně o délce 25,5 metrů, které je trvale udržováno v pohybu pomocí elektromagnetu. Průchody kyvadla rovnovážnou polohou jsou sledovány laserovými závorami a elektromagnet je pak na základě těchto měření ovládán Arduinem.
V roce 2020 bylo Foucaultovo kyvadlo instalováno ve vestibulu Gymnázia Dr. Josefa Pekaře v Mladé Boleslavi.
Galerie
Reference
Související články
Kyvadlo
Léon Foucault
Umberto Eco – autor knihy Foucaultovo kyvadlo (Il pendolo di Foucault)
Externí odkazy
Co má společného Foucaultovo kyvadlo s počasím? na Astronomie.cz
Online kamera kyvadla na univerzitě v Heidelbergu
Online kamera kyvadla na univerzitě v Miskolci, Maďarsko
Online kamera kyvadla na univerzitě v Osnabrücku
Kyvadla | 6,108 |
https://war.wikipedia.org/wiki/Echinopla%20crenulata | Wikipedia | Open Web | CC-By-SA | 2,023 | Echinopla crenulata | https://war.wikipedia.org/w/index.php?title=Echinopla crenulata&action=history | Waray | Spoken | 36 | 69 | An Echinopla crenulata in uska species han Formicidae nga ginhulagway ni Horace Donisthorpe hadton 1941. An Echinopla crenulata in nahilalakip ha genus nga Echinopla, ngan familia nga formicidae. Waray hini subspecies nga nakalista.
Mga kasarigan
Echinopla | 29,259 |
https://stackoverflow.com/questions/12908762 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Dutch | Spoken | 173 | 785 | How to prevent exception when updating the gridview?
I have a gridview and the content data inside gridview is called from a stored procedure,but whenever i want to update the gridview row content an Exception appears.
The update code is as below:
protected void Grid_Updating(object sender, GridViewUpdateEventArgs e)
{
SqlCommand cmd = DataProvider.GenerateCommand("Update_HowzeEducation_SP", CommandType.StoredProcedure);
cmd.Connection.Open();
cmd.Parameters.Add("@FieldName", SqlDbType.NVarChar).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].Controls[0]).Text;
cmd.Parameters.Add("@DegreeId", SqlDbType.Int).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
cmd.Parameters.Add("@SchoolName", SqlDbType.NVarChar).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].Controls[0]).Text;
cmd.Parameters.Add("@StudyCityDescribtion", SqlDbType.NVarChar).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[4].Controls[0]).Text;
cmd.Parameters.Add("@Average", SqlDbType.Decimal).Value = decimal.Parse(((TextBox)GridView1.Rows[e.RowIndex].Cells[5].Controls[0]).Text, CultureInfo.InvariantCulture);
cmd.Parameters.Add("@FinishLevelDate", SqlDbType.Date).Value = Convert.ToDateTime(((TextBox)GridView1.Rows[e.RowIndex].Cells[6].Controls[0]).Text.Trim());
cmd.Parameters.Add("@ThesisTitle", SqlDbType.NVarChar).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[7].Controls[0]).Text;
cmd.Parameters.Add("@Describtion", SqlDbType.NVarChar).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[8].Controls[0]).Text;
cmd.Parameters.Add("@HowzeEducationId", SqlDbType.Int).Value = GlobalVariables.HowzeEducationId;
cmd.ExecuteNonQuery();
}
And the exception is :
Failed to convert parameter value from a String to a Int32.
This message comes up in the last line of the code.
I will be thankfull for any usefull help.
The error says it all: You are trying to put a string into an int.
See this line:
cmd.Parameters.Add("@DegreeId", SqlDbType.Int).Value = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
Could be done as follows
cmd.Parameters.AddWithValue("@DegreeId",Convert.ToInt32(((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text);
If you have bound the data using a DataSourceID, the NewValues collection would come handy
cmd.Parameters.AddWithValue("@DegreeId",e.NewValues["DegreeId"]);
| 6,667 | |
https://wuu.wikipedia.org/wiki/315%E5%B9%B4 | Wikipedia | Open Web | CC-By-SA | 2,023 | 315年 | https://wuu.wikipedia.org/w/index.php?title=315年&action=history | Wu Chinese | Spoken | 11 | 349 |
大事记
广州刺史陶侃讨平王机。
拓跋部领袖拓跋猗卢被西晋封为代王,为代国前身。
武昌太守陶侃协同甘卓进击杜韬,杜韬不得已请降于丞相司马睿,杜韬受降后,晋军仍然进行猛烈个攻击,杜韬再起兵叛变,司马睿派征南将军王敦、荆州刺史陶侃率领大军,围攻杜韬,杜韬突围,死在途中。
氐王杨难敌兄弟被前赵刘曜打败,逃奔葭萌,派儿子来成汉作人质。陇西贼人个统帅陈安又依附了成汉。
前赵刘曜击败刘琨,但因要攻打长安回兵。
出生
逝世
杜韬,在西晋末年在湘州被当地流民推举为变民首领叛乱。
5年
1 | 43,730 |
https://ceb.wikipedia.org/wiki/Ceuthosporella%20sambuci | Wikipedia | Open Web | CC-By-SA | 2,023 | Ceuthosporella sambuci | https://ceb.wikipedia.org/w/index.php?title=Ceuthosporella sambuci&action=history | Cebuano | Spoken | 52 | 115 | Kaliwatan sa uhong ang Ceuthosporella sambuci. sakop sa ka-ulo nga Ascomycota, ug Una ning gihulagway ni Franz Xaver von Höhnel ni adtong 1929. Ang Ceuthosporella sambuci sakop sa kahenera nga Ceuthosporella, ka-ulo nga Ascomycota, ug kaginharian nga abungawg-uhong. Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Abungawg-uhong
Ceuthosporella | 6,570 |
https://stackoverflow.com/questions/10253431 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | George Pastakas, Love Sidon, Santa Saitbot, Shravan, Siyamak Yousefi, Wise Tech, fajrianto burhan, https://stackoverflow.com/users/23526413, https://stackoverflow.com/users/23526414, https://stackoverflow.com/users/23526415, https://stackoverflow.com/users/23526678, https://stackoverflow.com/users/23526840, https://stackoverflow.com/users/23527079, https://stackoverflow.com/users/23527231 | Somali | Spoken | 338 | 817 | How to OR a local bool with a viewmodel bool and bind to visibility property
I have the following XAML in a usercontrol that loads a series of gauge usercontrols:
<ItemsControl ItemsSource="{Binding InstanceViper.Gauges}" Grid.Row="7" Grid.ColumnSpan="4">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Name="GaugePanel" VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal">
</WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:Gauge DataContext="{Binding}" AlwaysShowGauge="False"></local:Gauge>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
I am passing in a flag that determines if the gauge should be displayed always or only when in alarm. Now in gauge xaml I want to do something like the following to determine if it should be displayed:
<Border Name="MainBorder" Visibility="{Binding (ShowAlarm || AlwaysShowGauge) ,Converter={StaticResource BooleanToVisibilityConverter}}">
Problem is that the ShowAlarm property is from the gauge viewmodel and AlwaysShowGauge is a local property being passed in in the data template. The ShowAlarm is dynamic but AlwaysShowGauge won't change once set. How can I accomplish this?
Its hard to tell where your border comes from, and where the one of the bindings come from. But you can control the Binding flow, that's not a problem. The main problem is how do you multi trigger, below is just a start. Once you see how you can multi trigger, then, you can play with the binding, either control the flow from one view model or view properties, or play with paths from different sources, to do that is you might have to put the following sample in the DataTemplate and use SourceName and TargetName.. But again, it's hard to tell where the border is.
<converters:OrMultiConverter x:Key="Or" />
<Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
<Setter Property="Visibility" Value="Hidden" />
<Style.Triggers>
MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Value="True">
<Condition.Binding>
<MultiBinding Converter="{StaticResource Or}">
<Binding Path="ShowAlarm"/>
<Binding Path="AlwaysShowGaug"/>
</MultiBinding>
</Condition.Binding>
</Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Visibility" Value="Visible"/>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
public class OrMultiConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if (values.Any(value => value == null || value == DependencyProperty.UnsetValue))
return false;
var boolValues = values.Cast<bool>();
var result = boolValues.Any(b => b);
return result;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
| 13,899 |
https://stackoverflow.com/questions/75258027 | StackExchange | Open Web | CC-By-SA | 2,023 | Stack Exchange | English | Spoken | 82 | 126 | I got this error "Error running command (re-run needed): RPC response error -32002:..."
Solana NFT Uploading Error
I tried changing the solana creator wallet address and SOL treasury address but still it doesn't work.
Error resolved
What I did to resolve the error? I deposited sol token from sol faucet https://solfaucet.com/ under devnet network and then performed the "sugar upload" command at the command prompt. The error was gone and the 28 nft assets were successfully uploaded and ready for deployment. =)
| 28,833 | |
https://ceb.wikipedia.org/wiki/Hume%20%28awtor%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Hume (awtor) | https://ceb.wikipedia.org/w/index.php?title=Hume (awtor)&action=history | Cebuano | Spoken | 21 | 44 | Si Hume nga ang hamubong pangalan niini nag tudlo kang:
Allan Octavian Hume
Edward P. Hume
Hardrada Harold Hume
Mga awtor | 44,416 |
https://ceb.wikipedia.org/wiki/West%20Fork%20Alder%20Creek%20%28suba%20sa%20Tinipong%20Bansa%2C%20Montana%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | West Fork Alder Creek (suba sa Tinipong Bansa, Montana) | https://ceb.wikipedia.org/w/index.php?title=West Fork Alder Creek (suba sa Tinipong Bansa, Montana)&action=history | Cebuano | Spoken | 82 | 121 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang West Fork Alder Creek.
Suba ang West Fork Alder Creek sa Tinipong Bansa. Nahimutang ni sa kondado sa Granite County ug estado sa Montana, sa sentro nga bahin sa nasod, km sa kasadpan sa Washington, D.C. Ang West Fork Alder Creek mao ang bahin sa tubig-saluran sa Columbia River ang ulohan sa nasod.
Ang mga gi basihan niini
Columbia River (suba sa Tinipong Bansa) tubig-saluran
Mga suba sa Montana (estado) | 43,353 |
https://math.stackexchange.com/questions/4097750 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | Vivaan Daga, https://math.stackexchange.com/users/187663, https://math.stackexchange.com/users/741848, https://math.stackexchange.com/users/789929, mathcounterexamples.net, questmath | English | Spoken | 415 | 894 | $f'(a) <0$ is enough to say that $f$ has a local maximum in $a$
Let's say we have a function $f:[a,b] \to \mathbb{R}$ which has a local maximum at $a$ and $f$ is derivatible in $a$. I want to prove that
$f'(a)\leq 0$
$f'(a) <0$ is enough to say that $f$ has a local maximum in $a$.
For the first one I have this:
Because $f$ has a local maximum in $a$, there exist a $\delta >0$ so that for every $x \in [a,b]$ with $|x-a| <\delta$, $f(a) \geq f(x)$.
We can see that for every $x \in [a,b]$ , $x \geq a$. I thought I could conclude out of this that $f'(a)\leq 0$
For the second one I'm stuck. I want to use the middle value theorem of lagrange on [a,x] for $x \in [a,b]$ randomly. But I can't really seem to prove it.
If $f^\prime(a) \lt 0$, then it exists $\delta \gt 0$ such that
$$\frac{f(a+h)-f(a)}{h} \lt k$$ for $h \in [0,\delta)$ where $k = \frac{f^\prime(a)}{2} \lt 0.$
Therefore for $h \in [0, \delta)$
$$f(a+h) \lt f(a) +kh \lt f(a)$$ because $k \lt 0$. Proving that $a$ is a local maximum.
I don't get it 100% why f(a+h)>f(a) gives that f has a local maximu.
@questmath there was a typo in my inequality that I fixed.
yes same question then for f(a+h)<f(a) , what makes it say that there is an local maximum?
This is the very definition of a local maximum: $f(a)$ is larger than $f(a+h)$ for $0 \le h \lt \delta$.
Assume that $f’(a)<0$ so $\lim_{h\to 0} ( f(a+h)-f(a) ) / h<0$ so $$(f(a+h)-f(a))/h$$
will eventually be less than $0$( for all $h$ in an interval $(a,a+h)$)
) .
So that would mean that $f(a)>f(a+h)$ implying that $f(a)$ is a local max on $(a,a+h)$
Note that $h$ will be positive since $a$ is a boundary point of the domain of the function .
I don't get how you have f(a+h)-f(a)/h?
That’s the derivative(quotient)
Isn't it $lim_{h \to 0} \frac{f(a+h)-f(a)}{h}$
Yes but if that is negative then the quotient will also be eventually negative
Yes but you still only derivate f(a)/h ?
I don’t understand the derivative of $f(x)$ at $a$ is $f(a+h)-f(a)/h$ as $h$ goes to $0$
That's not true, like I already said, lim of $\frac{f(a+h)-f(a)}{h}$, or did you mean to write the $h$ under f(a+h)-f(a) instead of only under f(a)?
@questmath Yes I have make it clearer
Alright I'm sorry then :)
@questmath is the argument clear now ?
| 10,986 |
https://stackoverflow.com/questions/39247023 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | English | Spoken | 401 | 1,007 | Generate dates between two dates in a dataframe
Below are the input and output. I want to transform a data frame from Input format to Output Format.
I have written a piece of code for now. it does the job. but I think it's very inefficient. are there any better packages or functions that can handle this?
mycode:
#create a output data frame to be apended later
output = data.frame(id1 = character(0), id2 = character(0), dates = character(0))
# for loop to get all possible combiation of dates
for (i in c(1:nrow(input))) {
end = as.Date('2016-07-18')
len = as.numeric(end-input$min_date[i])
output = rbind(output, as.data.frame(cbind(
pid = rep(input$id1[i],len),
cid = rep(input$id2[i],len),
dates = as.character(seq(input$min_date[i], end, by='day'))
)
)
)
}
Input:
+------+--------+------------+------------+
| id1 | id2 | min_date | max_date |
+------+--------+------------+------------+
| 3575 | 155443 | 2012-06-18 | 2016-07-18 |
| 3575 | 155450 | 2012-06-12 | 2016-07-18 |
+------+--------+------------+------------+
output:
+------+--------+------------+
| id1 | id2 | dates |
+------+--------+------------+
| 3575 | 155443 | 2012-06-18 |
| 3575 | 155443 | 2012-06-19 |
| 3575 | 155443 | 2012-06-20 |
| 3575 | 155443 | .. |
| 3575 | 155443 | … |
| 3575 | 155443 | 2016-07-18 |
| | | |
| 3575 | 155450 | 2012-06-12 |
| 3575 | 155450 | 2012-06-13 |
| 3575 | 155450 | 2012-06-14 |
| 3575 | 155450 | … |
| 3575 | 155450 | … |
| 3575 | 155450 | 2016-07-18 |
+------+--------+------------+
Assuming that the 'min_date/max_date' columns are Date class, we use Map to get the sequence of each 'min_date' with the corresponding 'max_date' in a list, replicate the sequence of rows of 'df1' with the number of rows of the list elements, create a data.frame by expanding the dataset based on 'i1' and get create 'dates' by concatenating the 'lst' elements.
lst <- Map(function(x, y) seq(x,y, by = "1 day"), df1$min_date, df1$max_date)
i1 <- rep(1:nrow(df1), lengths(lst))
data.frame(df1[i1,-3], dates = do.call("c", lst))
Or if we are using dplyr
library(dplyr)
df1 %>%
rowwise() %>%
do(data.frame(.[1:2], date = seq(.$min_date, .$max_date, by = "1 day")))
Or using data.table, we can do this in a single line of code
library(data.table)
setDT(df1)[,.(date = seq(min_date, max_date, by = "1 day")) ,.(id1, id2)]
You can use dplyr and splitstackshape packages,
library(dplyr)
library(splitstackshape)
df %>%
group_by(id1, id2) %>%
mutate(dates = paste(seq(as.Date(min_date),as.Date(max_date),by = 1), collapse = ',')) %>%
select(-c(min_date, max_date)) %>%
cSplit('dates', ',', 'long')
| 8,714 | |
https://stackoverflow.com/questions/68247501 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | Harald Gliebe, Talha Dar, https://stackoverflow.com/users/14306339, https://stackoverflow.com/users/1563130 | English | Spoken | 143 | 221 | Uncaught ReferenceError: Quill is not defined
I downloaded a project from github. It had alot of bugs however I fixed almost all of them and now the app is running fine on my AWS server.
You can view the entire project at https://github.com/Moswag/job-hub
When I try to access the app through browser, the browser just keeps on loading and when I check console, it logs
Uncaught ReferenceError: Quill is not defined
at (index):378
Which leads to me to :
var quill = new Quill('#editor', {
theme: 'snow'
});
I can see in the logs, no errors are showing up
I am more of a server side guy and I am not sure what exactly is the frontend issue here.
Attaching screenshots for better understanding.
Any sort of help will be appreciated.
How is the quill editor loaded?
how do I find this out?
| 15,848 |
https://math.stackexchange.com/questions/4101137 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | Gea5th, PCeltide, https://math.stackexchange.com/users/624787, https://math.stackexchange.com/users/705915 | English | Spoken | 478 | 1,009 | Interior, closure, accumulation ponts, compactness and conection of subsets in some topologies.
I'm having some difficulties at the very start of the concepts of general topology.
For $\tau_1$ = co-countable topology, $\tau_2 = \{\emptyset,\mathbb{R}\}\cup\{(a,+\infty), a \in \mathbb{R}\}$, $\tau_3 = \{\emptyset\}\cup\{A\subset\mathbb{R} : 0 \in A\}$, define the interior, closure, accumulation points and if they are connected and compact for the following sets:
a) $\mathbb{Q}$
b) $(1,2]$
c) $C=\{0\}\cup\{\frac{1}{n}:n\in\mathbb{N}\}$
For $\tau_1$, I think that:
$int(\mathbb{Q}) = \emptyset, cl(\mathbb{Q})=\mathbb{Q}, \mathbb{Q}' = \emptyset$
And that's all that I could think, I'm really struggling with that.
Please be a little more specific in what you will like help in! Some work will very appreciated!
Help to define the things I've listed for that list of sets, I'll add my thoughts.
For $\tau_1$: note that $\Bbb Q$ is countable, so closed, and indeed cannot contain any co-countable subset so its interior is empty. $\Bbb Q$ is also discrete so indeed $\Bbb Q'=\emptyset$, so far so good.
$(1,2]$ is not countable so is not contained in any proper closed subset, so $\operatorname{cl}((1,2]) = \Bbb R$ and also it doesn't contain any co-countable set because the complement is uncountable hence the interior is $\emptyset$; being dense of course $(1,2]' = \Bbb R$ too.
$C$ is countable and discrete and the same ideas that work for $\Bbb Q$ work for it too: so empty interior, $C'=\emptyset$ and closure just $C$.
For $\tau_2$ (the upper topology) we have that the closure of any set without upper bound is $\Bbb R$ so this holds for $\Bbb Q$. The largest proper closed set (which are of the form $(-\infty, a]$ containing $B$ is $(-\infty,2]$ so that is its closure, and the largest one containing $C$ is $(-\infty,1]$, so that's its closure. None of the three sets contain an upper set $(a,+\infty)$ so there interior are all $\emptyset$. Its clear that all points of $\Bbb R$ that are $\le 1$ are limit points of $C$, so $C'=(-\infty,1]$, its closure. $\Bbb Q'=\Bbb R$ here too and we too have that $(1,2]' = (-\infty,2]$.
For $\tau_3$ (the included point topology wrt $0$) we have that $0 \in \Bbb Q$ so $\operatorname{int}(\Bbb Q) = \Bbb Q$ and $\operatorname{int}((1,2])=\emptyset$ as no non-empty open set can be contained in $(1,2]$ as $0 \notin (1,2]$ but also $\operatorname{int}(C)=C$ as $0 \in C$ and so $C$ is open. If $0 \in D$ then $\operatorname{cl}(D)=\Bbb R$ for $\tau_3$ so this holds for $\Bbb Q$ and $C$ both. If $0 \notin D$, then $\operatorname{cl}(D) = D$ as then the complement of $D$ is open. Also, if $0 \in D$ then $D'=\Bbb R\setminus \{0\}$ as easily follows from the definition. If $0 \notin D$, then $D'=\emptyset$ (any point $x$ has a neighbourhood $\{x,0\}$ that then can intersect $D$ only in $x$ if at all). This settles all derived sets.
I'll leave connectedness and compactness to the interested reader.
Thanks a lot!!!!
| 1,112 |
https://de.wikipedia.org/wiki/Freaky | Wikipedia | Open Web | CC-By-SA | 2,023 | Freaky | https://de.wikipedia.org/w/index.php?title=Freaky&action=history | German | Spoken | 26 | 75 | Freaky steht für:
Freaky (Fernsehserie), neuseeländische Fernsehserie (2003)
Freaky (Film), US-amerikanischer Spielfilm von Christopher Landon (2020)
Freaky (Lied), Popsong von Senhit (2020)
Siehe auch:
Freak
Freaks | 3,124 |
https://en.wikipedia.org/wiki/Yubi%20lakpi | Wikipedia | Open Web | CC-By-SA | 2,023 | Yubi lakpi | https://en.wikipedia.org/w/index.php?title=Yubi lakpi&action=history | English | Spoken | 777 | 1,111 | Yubi lakpi is a seven-a-side traditional football game played in Manipur, India, using a coconut, which has some notable similarities to rugby. Despite these similarities, the name is not related to the game of rugby or Rugby School in England, it is in fact of Meitei origin, and means literally "coconut snatching". Emma Levine, an English writer on little known Asian sports, speculates:
"Perhaps this was the root of modern rugby? Most Manipuris are quite adamant that the modern world 'stole' the idea from them and made it into rugby... this game, which has been around for centuries, is so similar to rugby, which evolved a great deal later, that it must be more than a coincidence."
However, traditional football games can be found in many parts of the world, e.g. marn grook in Australia, cuju in China and calcio Fiorentino in Italy and Levine provides no documentary or material evidence of its antiquity.
Mythological and religious associations
The game is traditionally associated with autochthonous forms of Hinduism. It is said to have started as a ceremonial re-enactment of the celestial snatching of the pot of nectar after the Samundra Manthan.
An official game is held on the occasion of the Yaoshang Festival of Shri Shri Govindajee at palace ground and with Royal presence.
Some games take place at the Bijoy Govinda Temple Ground.
Laws and dress
Unlike rugby it is an individual sport, not a team one. Before the start of the game, players rub their bodies with mustard oil and water to make slippery to catch each other. A coconut properly soaked with oil is place in front of the chief guest of the function, known as the "King", who does not take part in the game itself. Before the start the coconut is placed in front of the seat of the "King".
Other features of the game include:
Dress - players are generally barefoot, and wear shorts (a kisi/langot), but not shirts.
Umpire - The umpire is a senior jatra, who starts the game, and stops fouls.
Pitch - usually approximately 45 metres long, by eighteen wide, without grass. One side of the pitch forms the central portion of the goal line. It is frequently played on rough, dried mud. Alternatively it can be played on turf.
Scoring - a player has to approach the goal from the front with his oiled coconut and pass the goal line. The coconut is later offered to the "King".
Carrying - players are not allowed to hold the coconut against their chest, but have to carry it under their arm.
Fouling and tackling - Players are not allowed to kick or punch opponents, or to tackle players who do not have the coconut.
Each side has 7 players in a field that is about 45 x 18 metres in area. One end of the field has a rectangular box 4.5 x 3 metres. One side of which forms the central portion of the goal line. To score a goal a player has to approach the goal from the front with his oiled coconut and pass the goal line. The coconut serves the purpose of a ball and is offered to the king or the judges who sit just beyond the goal line. However, in ancient times the teams were not equally matched but the players, with the coconut had to tackle all the rest of the players.
Royal Associations
According to Levine, the game used to have martial associations, and tested prowess:
"The ultimate goal of yubi lakpi... is to present the coconut to the King, or the head of the tribe (as in the original game of buzkashi, where the goat was offered to the King after the match). In modern times, a 'King' is selected to receive the offering."For this reason, it is a game of individuals where each player is vying to win the coconut and get the reward. In the original games, the King would watch the players to see who was the most skilful, and possessed qualities for the battlefield (as with mukna kanjei [a Manipuri game similar to hockey] and polo) Each player therefore wishes to impress."Nowadays the "King" (or "Chief Guest") is often a Village chief, teacher, or official.
See also
Lelo burti
Medieval football
Rugby union in India
Rugby union in Bangladesh
References
Levine, Emma. A Game of Polo with a Headless Goat'' ()
External links
Exotic Sports Dictionary
Yubi Lakpi (Manipuri Rugby)
Indigenous Games of Manipur
MOA effects rugby unification
Traditional Games & Sports
Indigenous games of Manipur
Traditional football
Rugby union in India
Meitei culture
Traditional sports of India
Sports originating in India
History of rugby union | 24,141 |
https://stackoverflow.com/questions/18108819 | StackExchange | Open Web | CC-By-SA | 2,013 | Stack Exchange | English | Spoken | 135 | 174 | Merge Sort and Queue
Im working on a review sheet pretty much got everything except not sure about these two. any help please?
Q what is the benefit of using a queue to do merge sort?
Q suppose in mergesort we replace the queue with a stack
(i.e. push instead of enqueue, pop in place of dequeue).
explain what effect this replacement will have.
With queues things automatically are added to the end of the list; thus, when you get to the lowest level of mergesort's recursion (individual elements), your sorted array can just enqueue the largest of these elements into a new list. Using a stack should reverse your list since all elements added will be put at the front, so you'd have to essentially search for the smallest element instead of the largest.
| 18,789 | |
https://pl.wikipedia.org/wiki/Skory | Wikipedia | Open Web | CC-By-SA | 2,023 | Skory | https://pl.wikipedia.org/w/index.php?title=Skory&action=history | Polish | Spoken | 152 | 390 | Skory (; ) – wieś na Białorusi, w obwodzie mińskim, w rejonie miadzielskim, w sielsowiecie Narocz.
Historia
W czasach zaborów wieś w granicach Imperium Rosyjskiego.
W dwudziestoleciu międzywojennym wieś leżała w Polsce, w województwie wileńskim, w powiecie duniłowickim (od 1926 postawskim), w gminie Miadzioł.
Według Powszechnego Spisu Ludności z 1921 roku zamieszkiwało tu 69 osób, 5 było wyznania rzymskokatolickiego a 64 prawosławnego. Jednocześnie 5 mieszkańców zadeklarowało polską a 64 białoruską przynależność narodową. Było tu 10 budynków mieszkalnych. W 1931 w 25 domach zamieszkiwało 137 osób.
Wierni należeli do parafii rzymskokatolickiej i prawosławnej w m. Miadzioł. Miejscowość podlegała pod Sąd Grodzki w Miadziole i Okręgowy w Wilnie; właściwy urząd pocztowy mieścił się w Miadziole.
Po agresji ZSRR na Polskę w 1939 roku wieś znalazła się w granicach BSRR. W latach 1941–1944 była pod okupacją niemiecką. Następnie leżała w BSRR. Od 1991 roku w Republice Białorusi.
Uwagi
Przypisy
Linki zewnętrzne
Wsie w rejonie miadzielskim | 35,786 |
https://ceb.wikipedia.org/wiki/Trapper%20Mountain%20%28bukid%20sa%20Tinipong%20Bansa%2C%20Montana%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Trapper Mountain (bukid sa Tinipong Bansa, Montana) | https://ceb.wikipedia.org/w/index.php?title=Trapper Mountain (bukid sa Tinipong Bansa, Montana)&action=history | Cebuano | Spoken | 232 | 365 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Trapper Mountain.
Bukid ang Trapper Mountain sa Tinipong Bansa. Ang Trapper Mountain nahimutang sa kondado sa Powell County ug estado sa Montana, sa sentro nga bahin sa nasod, km sa kasadpan sa ulohang dakbayan Washington, D.C. metros ibabaw sa dagat kahaboga ang nahimutangan sa Trapper Mountain, o ka metros sa ibabaw sa naglibot nga tereyn. Mga ka kilometro ang gilapdon sa tiilan niini.
Ang yuta palibot sa Trapper Mountain kay kabungtoran sa amihang-sidlakan, apan sa habagatang-kasadpan nga kini mao ang patag. Kinahabogang dapit sa palibot ang Black Mountain, ka metros ni kahaboga ibabaw sa dagat, km sa amihanan-sidlakan sa Trapper Mountain. Kunhod pa sa 2 ka tawo kada kilometro kwadrado sa palibot sa Trapper Mountain. Ang kinadul-ang mas dakong lungsod mao ang Lincoln, km sa sidlakan sa Trapper Mountain. Hapit nalukop sa lasang nga dagomkahoy ang palibot sa Trapper Mountain. Sa rehiyon palibot sa Trapper Mountain, mga kanal, ug mga kapanguhaan talagsaon komon.
Ang klima hemiboreal. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Hulyo, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Hunyo, sa milimetro nga ulan, ug ang kinaugahan Hulyo, sa milimetro.
Saysay
Ang mga gi basihan niini
Kabukiran sa Montana (estado)
Kabukiran sa Tinipong Bansa nga mas taas kay sa 1000 metros ibabaw sa dagat nga lebel | 50,349 |
https://ja.stackoverflow.com/questions/41363 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | htb, https://ja.stackoverflow.com/users/20098, https://ja.stackoverflow.com/users/2238, user20098 | Japanese (Japanese script) | Spoken | 123 | 1,210 | cin.ignore()の使い方と<istream>に関して
C++を利用して「英語で名前をコンソールから入力し、英語のイニシャルを出力するプログラム」を作成しています。
下記のように作成してうまくいったのですが以下の2点、お伺いできますと幸いです。
cin.ignore()の使い方を教えていただけると幸いです。。
(どういった使い方をして引数には何を指定すべきなのでしょうか)
<istream>はどういったライブラリなのでしょうか。
今回のプログラムで<istream>と<iomanip>は必要でしょうか。
上記の解答をグーグル等で検索してみたのですがよくわからなかったので教えてくださいますと幸いです。
#include < iostream >
#include < string >
#include <istream>
//#include < iomanip >
using namespace std;
int main(void) {
char firstInitial;
char lastInitial;
cout<< "Enter your first and last name:";
firstInitial = cin.get();
cin.ignore(256 , ' ');
lastInitial=cin.get();
cout << firstInitial<<lastInitial;
return 0;
}
実行結果
Enter your first and last name :Harry Truman
HT
マルチポスト https://teratail.com/questions/111495
A1. https://cpprefjp.github.io/reference/istream/basic_istream/ignore.html
要するに「文字数」または「特定文字が現れるまで(その特定文字の最初の1回を含む)」読み飛ばすわけです。
提示例では 256 文字を、またはスペースが現れるまで、読み飛ばす(そのスペースの1つ目も読み飛ばし対象)ということになります。試しに 256 でなくて 2 くらいを指定すると違いがわかるでしょう。あるいは Harry Truman と入力してもいいでしょう(区切りスペースとして2個入力する)。
A2. https://cpprefjp.github.io/reference/istream.html
<istream> は「ストリーム入力」を行うための機能を使うという意味ですね。
この例では cin つまり標準入力ストリームを使っているため必要です(が次の回答を参照)
A3. https://cpprefjp.github.io/reference/iostream.html
<iostream> を指定すると(リンク先にて書いてあるとおり) <ios> <streambuf> <istream> <ostream> を全て #include したことになります。良く使う機能を一括で指定できて便利だが、不要な機能も同時にコンパイル対象になるかもしれないということです。提示例では先に #include <iostream> しているので、改めての #include <istream> は不要。
https://cpprefjp.github.io/reference/iomanip.html
マニピュレータを使う(フォーマット付き入出力をしたい)ときには <iomanip> が必要です。提示例ではフォーマット付き入出力をしていないので無くても動きます。
https://cpprefjp.github.io/reference/ostream.html
endl なんかもマニピュレータですが、使用頻度の違いにより <iomanip> でなく <ostream> にて定義されています。
c++ のこの辺の関数とかクラスとかは最初のうちは関係がわかりにくいかもしれません。
istream を探しているのにヒットするのは basic_istream ばかりとか。
理解が進むと「実は同じもの」なのだと納得できる時が来ます。
A3についてですが、<iostream>が<istream>をインクルードするよう規定されたのはC++11のようなので、C++98の場合、両方記述することに意味はあるようです。(参照 http://en.cppreference.com/w/cpp/header/iostream )
| 45,415 |
https://stackoverflow.com/questions/34364068 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | Trevor, https://stackoverflow.com/users/2444082 | English | Spoken | 799 | 2,303 | How do I embed a .js video with html?
I'm using DNN and trying to embed a video from an external site. I had a working code before, but didn't save it because it was 1 line and thought it would be basic enough for me to remember. The vendor has given us this code:
<a href="#" onclick="return(false);"
rel="videoGUID=13cd1ac61aba5s4e92SbecaR0a18bbe36111&"
style="display:block;width:1280px;height:740px"
id="13cd1ac61aba5s4e92SbecaR0a18bbe36111" width="1280"
height="740">Foundation Birthday Updated
</a>
<script type="text/javascript" src="http://360.sorensonmedia.com/13cd1ac61aba5s4e92SbecaR0a18bbe36111/embedv2.js"></script>
I'm trying to embed this in an HTML module. Again, this was working before. the <script> tag gets stripped in the HTML module. I believe I just used the .js link and put it in an object or iframe tag to get it to embed. Any ideas?
Quicktime or installation of other video plug-ins isn't an option.
Those viewing, have made edit to formatting so code and tagged words become visible. Waiting for review to approve edit.
If you simply visit the url http://360.sorensonmedia.com/13cd1ac61aba5s4e92SbecaR0a18bbe36111/embedv2.js in chrome you will see the following page (of course, with Flash enabled, the applet will play.
This is because whoever set up the server at Sorenson Media is serving javascript files with the mime-type of text/html. When insert it in the src attribute of a script tag, the browser will infer that it is javascript despite that.
However, when it is visited as a webpage the web browser obeys the mime-type and attempts to display it. However, this isn't an HTML document! Chrome guesses that it should be like this:
<head></head><body>var embedCode = "<object style="outline:none;" width="100%" height="100%" type="application/x-shockwave-flash" data="http://static.cdn.360.sorensonmedia.com/1/flash/flowplayer-3.2.2.swf" id="videoPlayer_api" title="Adobe Flash Player">";
embedCode += "<param name="movie" value="http://static.cdn.360.sorensonmedia.com/1/flash/flowplayer-3.2.2.swf">";
embedCode += "<param value="transparent" name="wmode">";
embedCode += "<param value="true" name="allowfullscreen">";
embedCode += "<param value="always" name="allowscriptaccess">";
embedCode += "<param value="high" name="quality">";
embedCode += "<param value="false" name="cachebusting">";
embedCode += "<param value="#000000" name="bgcolor">";
embedCode += "<param value="config=";
embedCode += "{"play":{"replayLabel":"","opacity":0},"playlist":[{"url":"http://cdnimages.sorensonmedia.com/a6d2ad22-a413-4443-8cff-8dc210da7fcd/d18…quot;13cd1ac61aba5s4e92SbecaR0a18bbe36111","autoPlay":false, "fileVersionId":"5d231001b55b0945a5xaf4dd54cfe2999567","captionUrl":""},{"url":"http://cdnimages.sorensonmedia.com/a6d2ad22-a413-4443-8cff-8dc210da7fcd/d18…screen":{"bottom":10},"onLoad":""}";
embedCode += "" name="flashvars">";
embedCode += "</object>";
var VideoEmbed = function (publishing_id, embed_code) {
this.publishing_id = publishing_id;
this.embed_code = embed_code;
this.container = document.getElementById(this.publishing_id);
/**
* Determines the installed (and enabled) version of flash.
* @returns [major, minor]
*/
function get_flash_version() {
var fo, ver,
RE = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/;
try {
ver = navigator.plugins["Shockwave Flash"].description.slice(16);
} catch(e) {
try {
fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
ver = fo && fo.GetVariable("$version");
} catch(err) {
try {
fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
ver = fo && fo.GetVariable("$version");
} catch(err2) { }
}
}
ver = RE.exec(ver);
return ver ? [ver[1], ver[3]] : [0, 0];
}
/**
* Inserts a flash embed code in a provided DOM element.
*/
function insert_embed_code() {
// embed the video
try {
this.container.innerHTML = this.embed_code;
} catch (err) {}
// for embedding video in WinXP Firefox
if (navigator.appVersion.indexOf("Windows") != -1) {
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
this.container.addEventListener("mousedown", function(event) {
event.preventDefault();
return false;
}, false);
}
}
}
/**
* Inserts a prompt instructing user to install flash in a provided DOM
* element.
*/
function prompt_to_install_flash() {
// set href attribute of <a> container and remove onclick handler
try {
this.container.setAttribute('href', 'http://www.adobe.com/go/getflash');
this.container.removeAttribute('onclick');
this.container.onclick = null; // for IE7
} catch (err) { }
// display message to install flash
this.container.innerHTML = '' +
'<p style="text-align: center; ' +
'margin: 1.5em 3em; ' +
'padding: 1em; ' +
'border: 1px solid #ccc; ' +
'border-radius: 6px; ' +
'background-color: #ddd; ' +
'color: #3494d1; ' +
'text-shadow: none;">' +
'To view this video, please install the latest version of Flash.' +
'<br><br>' +
'<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" '="" +="" 'style="outline: none; border: 0 none;">' +
'</p>';
}
/**
* If a user has flash installed, this embeds a video. Otherwise, it
* instructs the user to install flash.
*/
this.display = function() {
// determine flash version
var flash_version = get_flash_version.call(this);
// TODO: allow for specifying version as argument
if (flash_version[0] > 10 || flash_version[0] == 10 && flash_version[1] >= 1) {
insert_embed_code.call(this);
}
// appropriate flash version not installed
else {
prompt_to_install_flash.call(this);
}
}
};
var embed = new VideoEmbed("13cd1ac61aba5s4e92SbecaR0a18bbe36111", embedCode);
embed.display();
</a></body>
This guess sort of works, but as you can see there is a lot of gunk displayed that shouldn't be.
In addition, this is relying on the server being misconfigured and the browser making just the right guesses when interpreting javascript as html. DON'T USE IT!
If you read the javascript code, you will see that most of it is just a fallback for if Flash isn't available. You might be able to hack together an html version without the fallbacks, but it will be easily broken if Sorenson Media gets their act together.
Your best option if to figure out how to include javascript in this HTML module.
Ended up with a pretty simple solution. I put the HTML module into "basic text editor" and the render mode set to "raw. This keeps the <script> tag. No the solution I previously had, but it works.
| 37,949 |
https://ceb.wikipedia.org/wiki/S%C3%B8rby | Wikipedia | Open Web | CC-By-SA | 2,023 | Sørby | https://ceb.wikipedia.org/w/index.php?title=Sørby&action=history | Cebuano | Spoken | 27 | 55 | Sørby mao ang usa ka barangay nga nahimutang sa nasud Norway.
Tan-awa usab sa
Listahan sa mga barangay sa Norway
Pakisayran
Listahan sa mga barangay sa Norway | 15,995 |
https://ko.wikipedia.org/wiki/%EC%9D%B4%EC%A7%91%ED%8A%B8%EC%9D%98%20%EC%B4%9D%EB%A6%AC | Wikipedia | Open Web | CC-By-SA | 2,023 | 이집트의 총리 | https://ko.wikipedia.org/w/index.php?title=이집트의 총리&action=history | Korean | Spoken | 14 | 63 | 이집트의 총리()는 이집트의 내각 수반이다. 현재의 총리는 2018년 6월 14일에 취임한 무스타파 마드 불리이다. | 39,394 |
https://stackoverflow.com/questions/11928803 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Chris, Darrel Miller, Filip W, Sam, https://stackoverflow.com/users/1437642, https://stackoverflow.com/users/34942, https://stackoverflow.com/users/412567, https://stackoverflow.com/users/6819 | English | Spoken | 466 | 694 | Why is HttpRequestMessage so limited?
I'm working on my first ASP.NET Web API project and I've got a custom authorization attribute working. What I want to do is set up the attribute so that if the request is local (i.e. debugging), the authorization check is bypassed.
In all other ASP.NET MVC versions, I could check Request.IsLocal (or even Request.UserHostAddress) to see if the request was coming from the local machine, but System.Web.Http.AuthorizeAttribute only exposes the HttpRequestMessage object, which apparently has none of this information, and seems to be missing a few other things from the Request object also.
What's the deal with the whole new set of (apparently limited) classes for use with web API, and perhaps more directly, how can I get the callee's host address in my Authorize attribute?
It is limited because those properties are not part of the HTTP spec, and therefore not within scope. The problem with HttpWebRequest/HttpWebResponse is they became giant buckets for everything. No separation of concerns at all.
Perhaps this wasn't available in 2013... use this: requestMessage.GetRequestContext().IsLocal
There are a couple of different examples of grabbing the request information you want here or here e.g.
public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext)
{
var context = actionContext.Request.Properties["MS_HttpContext"] as System.Web.HttpContextBase;
bool isLocal = context.Request.IsLocal;
If this is truly just for debuging then it may be safer using a conditional statement like this around any debug only code - especially in a security context...
#if DEBUG
//
#endif
As to why... I imagine this is at least in part to allow for easier unit testing and mocking, the HTTP Context is an ASP.NET System.Web construct... WebApi is designed to be capable as running as self hosted code independent of ASP.NET.
+1 for the last comment. Indeed Web API is a generic solution and ASP.NET on IIS is just one of the 3 contexts in which it can be running (web hosted, self hosted, in memory hosted)
It has been possible to host ASP.NET itself in a console or service app for a long time. I'm not sure that's the most significant reason for such a change, but maybe the newer offering solves some problems with the old method that I am unaware of. Getting the address of the client seems like such a basic common requirement that it's just shocking MS didn't build in a simple method to do it directly.
I ran into this same issue when developing multiple middleware components, or supporting others who made the unfortunate, IIS-binding decision to use HttpContext, or rely on it, whether directly through HttpContext or via MS_HttpContext (which isn't an option in self-host). I wrote a small shim library to solve this problem by giving you back an HttpContext that works in both situations. You can find it on github and NuGet
Install-Package HttpContextShim
| 39,017 |
https://ceb.wikipedia.org/wiki/K%C5%ABh-e%20Yazd%C5%AB%20%28bukid%2C%20lat%2036%2C02%2C%20long%2056%2C05%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Kūh-e Yazdū (bukid, lat 36,02, long 56,05) | https://ceb.wikipedia.org/w/index.php?title=Kūh-e Yazdū (bukid, lat 36,02, long 56,05)&action=history | Cebuano | Spoken | 214 | 415 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Kūh-e Yazdū.
Bukid ang Kūh-e Yazdū (Pinulongang Persiyano: كوهِ يَزدو) sa Iran. Nahimutang ni sa lalawigan sa Ostān-e Semnān, sa amihanan-sidlakang bahin sa nasod, km sa sidlakan sa Tehrān ang ulohan sa nasod. metros ibabaw sa dagat kahaboga ang nahimutangan sa Kūh-e Yazdū.
Ang yuta palibot sa Kūh-e Yazdū kabungtoran sa habagatang-sidlakan, apan sa amihang-kasadpan nga kini mao ang patag. Kinahabogang dapit sa palibot ang Kūh-e Yazdū, ka metros ni kahaboga ibabaw sa dagat, km sa habagatan sa Kūh-e Yazdū. Dunay mga ka tawo kada kilometro kwadrado Hapit nalukop sa desiyerto ug kamingawan ang palibot sa Kūh-e Yazdū may kaayo gamay nga populasyon. Ang kinadul-ang mas dakong lungsod mao ang Khānkhowdī, km sa kasadpan sa Kūh-e Yazdū. Sa palibot sa Kūh-e Yazdū. Sa rehiyon palibot sa Kūh-e Yazdū, kabukiran, ug mga patag talagsaon komon.
Ang klima bugnaw nga ugahon. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Agosto, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Marso, sa milimetro nga ulan, ug ang kinaugahan Hulyo, sa milimetro.
Saysay
Ang mga gi basihan niini
Kabukiran sa Ostān-e Semnān
Kabukiran sa Iran nga mas taas kay sa 1000 metros ibabaw sa dagat nga lebel | 34,817 |
https://es.wikipedia.org/wiki/Trip%20at%20Knight | Wikipedia | Open Web | CC-By-SA | 2,023 | Trip at Knight | https://es.wikipedia.org/w/index.php?title=Trip at Knight&action=history | Spanish | Spoken | 322 | 546 | Trip at Knight es el cuarto álbum de estudio del rapero estadounidense Trippie Redd, fue lanzado el 20 de agosto de 2021 a través de TenThousand Projects y Caroline International. El álbum cuenta con apariciones especiales de SoFaygo, Drake, Lil Uzi Vert, Playboi Carti, Ski Mask the Slump God, Lil Durk, Polo G, Babyface Ray, Sada Baby, Icewear Vezzo y los raperos Juice WRLD y XXXTentacion. El álbum fue lanzado en menos de una semana antes de su próxima gira.
Antecedentes
Meses antes del lanzamiento de su tercer álbum de estudio Pegasus (2020), Trippie adelantó un nuevo proyecto en el que estaba trabajando, llamado "Life's a Trip at Knight", la secuela de su primer álbum de estudio Life's a Trip (2018). Luego compartió fragmentos de tres canciones que se informó que están en el próximo proyecto en su página de Instagram, y compartió algunos detalles sobre el próximo proyecto, explicando cómo se relacionará con Life's a Trip, solo por la portada del álbum.
En noviembre de 2020, Trippie compartió en su historia de Instagram que este álbum no contendría más características que su artista y amigo de toda la vida, Chris King, quien había aparecido anteriormente en proyectos anteriores de Redd. Deseaba que este álbum fuera "crudo y sin cortes" y que demostrara que puede darlo todo.
En febrero de 2021, en una entrevista, Redd proporcionó una actualización sobre cómo sería el próximo proyecto. Él compartió, "mi nuevo Trip At Knight, estoy dejando caer toda mierda de rabia. La mayor parte [es] mierda de rabia. Me encanta la música de rabia. Vamos a enfurecernos y hacer algo de "Dark Knight Dummo". mencionando algunos de los artistas destacados en el álbum para incluir a The Kid Laroi, Polo G y Lil Tjay. La lista de canciones del álbum se anunció el 11 de agosto de 2021, con 18 pistas.
Lista de canciones
Referencias
Álbumes de 2021
Álbumes de Trippie Redd
Álbumes en inglés | 43,449 |
https://it.wikipedia.org/wiki/An%C4%B1l%20%C3%87elik | Wikipedia | Open Web | CC-By-SA | 2,023 | Anıl Çelik | https://it.wikipedia.org/w/index.php?title=Anıl Çelik&action=history | Italian | Spoken | 697 | 1,337 |
Biografia
Anıl Çelik è nato il 1º gennaio 1988 ad Ankara (Turchia), fin da piccolo ha mostrato un'inclinazione per la recitazione. Oltre ad essere un attore, è anche un produttore cinematografico e lavora presso l'agenzia di talenti Tumay Ozokur.
Carriera
Anıl Çelik ha intrapreso i suoi studi di recitazione presso la Beykent University. Nel 2006 ha fatto la sua prima apparizione sul piccolo schermo nella serie Selena nel ruolo di Ceyhun. Nello stesso anno ha interpretato il ruolo di Ege nella serie Arka Sokaklar. Sempre nel 2006 ha interpretato il ruolo di Emrah nella serie Ölümsüz kahramanlar. L'anno successivo, nel 2007, ha interpretato il ruolo di Mehmet nel film televisivo Gelinin binbasiya agidi. Nel 2008 ha recitato nella serie Kollama.
Nel 2008 ha interpretato il ruolo di Selim nella serie Sevgili düsmanim. Sempre nel 2008 ha interpretato il ruolo di Murat nella serie Kendi okulumuza dogru. L'anno successivo, nel 2009, ha interpretato il ruolo di Kerem nella serie Unutulmaz. Nel 2011 ha interpretato il ruolo di Emre nella serie Seni Bana Yazmislar. Nel 2011 e nel 2012 ha interpretato il ruolo di Metin nella serie Al Yazmalim. Nel 2012 ha recitato nella serie Yamak Ahmet con il ruolo di Emin.
Nel 2012 ha prodotto il film Lal Gece diretto da Reis Çelik. L'anno successivo, nel 2013 ha recitato nella serie Salih kusu. Nel 2014 ha interpretato il ruolo di Paytak Cezmi nella serie Kertenkele. L'anno successivo, nel 2015, ha interpretato il ruolo di Erdem nella serie Çilek Kokusu. Nel 2016 ha interpretato il ruolo di Yasar nella serie Hayat Sevince Güzel.
Nel 2016 ha recitato nel film Seytan Tüyü diretto da Murat Senoy. Nel 2018 ha recitato nel film televisivo Ask Masali. Nel 2019 ha recitato nel film Ölü Yatirim diretto da Neslihan Yildiz.
Nel 2018 e nel 2019 è entrato a far parte del cast della serie DayDreamer - Le ali del sogno (Erkenci Kuş), nel ruolo di Cengiz "CeyCey" Özdemir. Successivamente nel 2020 è entrato a far parte della serie Mr. Wrong - Lezioni d'amore (Bay Yanlış), nel ruolo di Emre "Pablo" Eren. Nel 2021 ha interpretato il ruolo di Ali nella serie Baht Zamani. Nel 2021 e nel 2022 ha ricoperto il ruolo di Hizir Mutlu nella serie Evlilik Hakkinda Her Sey. Nel 2022 ha interpretato il ruolo di Mete nella serie Senden Daha Güzel. Nello stesso anno ha recitato nei film Kuzenler Firarda 2 diretto da Kamil Cetin e in Ah Belinda diretto da Hakan Bonomo.
Filmografia
Attore
Cinema
Seytan Tüyü, regia di Murat Senoy (2016)
Ölü Yatirim, regia di Neslihan Yildiz (2019)
Kuzenler Firarda 2, regia di Kamil Cetin (2022)
Ah Belinda, regia di Hakan Bonomo (2022)
Televisione
Selena – serie TV (2006) – Ceyhun
Arka Sokaklar – serie TV (2006) – Ege
Ölümsüz kahramanlar – serie TV (2006) – Emrah
Gelinin binbasiya agidi – film TV (2007) – Mehmet
Kollama – serie TV (2008)
Sevgili düsmanim – serie TV (2008) – Selim
Kendi okulumuza dogru – serie TV (2008) – Murat
Unutulmaz – serie TV (2009) – Kerem
Seni Bana Yazmislar – serie TV (2011) – Emre
Al Yazmalim – serie TV (2011-2012) – Metin
Yamak Ahmet – serie TV (2012) – Emin
Salih kusu – serie TV (2013)
Kertenkele – serie TV (2014) – Paytak Cezmi
Çilek Kokusu – serie TV (2015) – Erdem
Hayat Sevince Güzel – serie TV (2016) – Yasar
Ask Masali – film TV (2018)
DayDreamer - Le ali del sogno (Erkenci Kuş) – serie TV (2018-2019) – Cengiz "CeyCey" Özdemir
Mr. Wrong - Lezioni d'amore (Bay Yanlış) – serie TV (2020) – Emre "Pablo" Eren
Baht Oyunu – serie TV (2021) – Ali
Evlilik Hakkinda Her Sey – serie TV (2021-2022) – Hizir Mutlu
Senden Daha Güzel – serie TV (2022) – Mete
Produttore
Cinema
Lal Gece, regia di Reis Çelik (2012)
Doppiatori italiani
Nelle versioni in italiano dei suoi film e delle sue serie TV, Anıl Çelik è stato doppiato da:
Davide Albano in DayDreamer - Le ali del sogno, in Mr. Wrong - Lezioni d'amore
Riconoscimenti
Pantene Golden Butterfly Awards
2018: Candidatura come Miglior attore in una commedia romantica per la serie DayDreamer - Le ali del sogno (Erkenci Kuş)
Note
Collegamenti esterni | 32,148 |
https://fr.wikipedia.org/wiki/Lanxi | Wikipedia | Open Web | CC-By-SA | 2,023 | Lanxi | https://fr.wikipedia.org/w/index.php?title=Lanxi&action=history | French | Spoken | 93 | 198 | Lanxi (兰溪 ; pinyin : Lánxī) est une ville de la province du Zhejiang en Chine. C'est une ville-district placée sous la juridiction administrative de la ville-préfecture de Jinhua.
Démographie
La population du district était de en 1999.
Culture
Cette municipalité comporte le Jardin du grain de moutarde (芥子园, Jièzǐ yuán), célèbre pour le Jièzǐyuán huàzhuàn (芥子園畫譜/芥子园画, Précis de peinture du jardin de moutarde), ouvrage de référence de la peinture chinoise.
Notes et références
Voir aussi
Lien externe
Site gouvernemental
Ville dans la province du Zhejiang
Subdivision administrative dans la province du Zhejiang | 3,080 |
https://scifi.stackexchange.com/questions/132533 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | DJClayworth, Lightness Races in Orbit, Major Stackings, Marshall Tigerus, Michael Richardson, Often Right, Praxis, Sareesataka, Thomas, Valorum, https://scifi.stackexchange.com/users/1167, https://scifi.stackexchange.com/users/20774, https://scifi.stackexchange.com/users/22917, https://scifi.stackexchange.com/users/38245, https://scifi.stackexchange.com/users/40294, https://scifi.stackexchange.com/users/4356, https://scifi.stackexchange.com/users/456, https://scifi.stackexchange.com/users/5184, https://scifi.stackexchange.com/users/52904, https://scifi.stackexchange.com/users/66809, https://scifi.stackexchange.com/users/67649, phantom42 | English | Spoken | 653 | 955 | Should the name "Enterprise" have been retired?
Obviously "Enterprise" is pretty much synonymous with "Star Trek", so new shows and movies will continue to have an Enterprise.
However, in-universe, how many times does a ship of a given name need to be blown up before it would be considered unlucky? Alternately, hasn't at least one of the previous Enterprises been destroyed in such a manner as to merit an honorary retirement of the name?
Is there an in-universe reason that Starfleet didn't retire the name "Enterprise" after its predecessors suffered less than ideal fates?
Starfleet seem to have a tradition of honouring ships that get blowed up, especially when it's in valorous service; http://memory-alpha.wikia.com/wiki/USS_Sao_Paulo
This seems to be unanswerable? Even in universe it'd probably be a big debate.
Note that there have been more real-life Enterprises than Star Trek ones.
we do not close questions just because they don't/may not have a canon answer.
I have hopefully refined the question to allow for factual answers.
@MichaelRichardson: Yeah I think that's better
Naming new warships after lost warships is a long standing naval tradition. It gives crews pride and a sense of history and it confuses the enemy because they can't be sure if certain vessel really sank since radio traffic would still reference the suspect vessels by name or number.
@LightnessRacesinOrbit - Given that we have at least two in-universe descriptions of why ships are subsequently named (e.g. after vessels that have been destroyed) I'm reasonably certain this should be reopened.
This question should definitely be re-opened; it is asking for an in-universe reason why the name wasn't retired given its bad luck. Whether the answer can be answered in canon is beside the point - it is a perfectly reasonable question given the scope of this site. You have my vote to RO
With the new series, will the ship be called Enterprise? It's supposed to take place 30 years before TNG. The ship couldn't be called Enterprise-C...that was Rachel Garrett's ship.
Being destroyed repeatedly is not the same as bad luck: most of these destructions are sacrifices and heroic acts: Kirk sacrificing the ship to save Spock, the Enterprise-C sacrificing itself to aid the Klingons, the Enterprise-D trying to save Veridian III,...
It doesn't work like that in real life. The Royal Navy has had three aircraft carriers called "Ark Royal", despite the first being sunk.
Simply put:No. The Enterprise had a storied history in Humanity, even pre-First Contact. They kept honoring the ship's long history by creating a new one whenever there was a new generation of ships. It's almost always been the flagship of Starfleet, and is known by several species outside of the Federation.
Also, can you think of a ship that wasn't destroyed that wasn't rebuilt later on in history? An example of a ship being re-commissioned would be the Missouri. It became a museum for the attack on Pearl Harbor, then in 2010 a submarine was commissioned with the same name. Also, the USS Wasp was sunk in WW2, and later on another ship was commissioned the Wasp.
Out of universe: Keeping the name Enterprise helps make it familiar with fans, and to show off the progression of technology of the federation.
While the USS Enterprise (CV-6) survived WW2, the USS Hornet (CV-8) was sunk and quickly replaced 8 months later with the USS Hornet (CV-12). Other carriers quickly replaced with a new namesake were the USS Wasp (as you mentioned, CV-7 replaced with CV-18), USS Yorktown (CV-5 replaced with CV-10), and USS Lexington (CV-2 replaced with CV-16). This caused much confusion for the Japanese, who thought they had sunk various carriers to find a new one with the same name.
Additionally it was mentioned in the films itself that the A Enterprise got its name in honor of the doings of the (non A) Enterprise. It was to honor kirk and thus all later crews
| 1,533 |
https://ceb.wikipedia.org/wiki/Oligonychus%20vitis | Wikipedia | Open Web | CC-By-SA | 2,023 | Oligonychus vitis | https://ceb.wikipedia.org/w/index.php?title=Oligonychus vitis&action=history | Cebuano | Spoken | 67 | 154 | Kaliwatan sa murag-kaka ang Oligonychus vitis. Una ning gihulagway ni Zaher ug Shehata ni adtong 1965. Ang Oligonychus vitis sakop sa kahenera nga Oligonychus, ug kabanay nga Tetranychidae.
Kini nga matang hayop na sabwag sa:
Indya
Habagatang Aprika
Ehipto
Tśile
Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Murag-kaka
Murag-kaka sa Habagatang Aprika
Murag-kaka sa Ehipto
Murag-kaka sa Tśile
Oligonychus
Murag-kaka sa Indiya | 17,394 |
https://stackoverflow.com/questions/61409755 | StackExchange | Open Web | CC-By-SA | 2,020 | Stack Exchange | Dan M., Infinity_Matrix, https://stackoverflow.com/users/3601057, https://stackoverflow.com/users/4114447 | English | Spoken | 372 | 629 | CMake <cmath> header errors on Mac
I updated my MacOS to 10.15.4, and Xcode to 11.4.1. I had a CMake project compiling and working perfectly fine before this update.
Now I get errors in the cmath header regarding namespace definitions:
Note: this is the screenshot of the standard cmath header file. It is not my code.
I created a command line tool project with C++ on Xcode and included cmath and had it compile successfully. Therefore there is some issue with the CMake generated Xcode project.
I am using C++14. Nothing has changed in my CMakeLists.txt. It was compiling without issue before. I cleared the cache and rebuilt the project - still no luck.
I am using CMake 3.17.1, and have reinstalled Xcode, and the command line tools as well. No luck at all. Frustrating to see an update break my project.
Edit: I found the issue: the following lines are the cause of the compilation error:
find_package(PCL 1.8 REQUIRED COMPONENTS common io visualization filters registration)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
Removing these lines from my CMakeLists.txt fixes the issue for some reason. My PCL install was installed via brew and is the latest version.
What happens if you include <math.h>?
@DanM. Tried that too. Included <math.h> in my source files before cmath and still the same error.
does <math.h> work on its own? Without cmath? Does this also happen for some simple barebones project (basically only main.cpp with includes and int main())?
@DanM. Ok, simple CMake project works... So I decided to compare and after some trial and error with adding dependencies to the barebones cmake project - it turns out including the point cloud library causes this error.
I suggest you raising this issue on brew/PCL (at least they are better suited to diagnose it). I hope pcl doesn't contain a math.h header (or does it? That'd explain the weirdness) ;P. In the meantime, I doubt it'd help (although you never know), but I've noticed that you use old style include_/link) etc. I suggest you switch to target-based alternatives instead, i.e. target_{include|link}_directories and target_compile_definitions.
@DanM.Will do. Thank you very much for the suggestion and help.
Don't forget to post an answer if you figure out the root cause and the proper solution.
| 22,984 |
https://ce.wikipedia.org/wiki/%D0%A1%D1%80%D0%B5%D0%B7%D0%BD%D0%B5%D0%B2%D0%BE%20%28%D0%A8%D0%B8%D0%BB%D0%BE%D0%B2%D0%B0%D0%BD%20%D0%BA%D3%80%D0%BE%D1%88%D1%82%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Срезнево (Шилован кӀошт) | https://ce.wikipedia.org/w/index.php?title=Срезнево (Шилован кӀошт)&action=history | Chechen | Spoken | 129 | 474 | Срезнево () — Российн Федерацин Рязанан областан Шилован кӀоштара эвла.
Бахархойн дукхалла
Климат
Кхузахь климат барамера континенталан йу, йовхачу аьхкенца а, барамера шийлачу Ӏаьнца а. ГӀоронаш йоцу муьран йукъара бохалла 130-149 де ду. Кхузахь сих-сиха тӀехьара бӀаьстен а, хьалхара гуьйренан а гӀоролаш хуьлу. Эвла лаьтта тоьушйолчу йочанийн зонехь. Йочанийн шеран барам кхузахь 500 мм кхоччуш бу. ДогӀнаш аьхкенан заманехь стигал къекъаш чӀогӀа догӀу, наггахь къора а тухуш. ХӀоьттина лайн чкъор хуьлу ноябрь чекхболуш – декабрь болалуш, деша март чекхболуш – апрель болалуш. Ло лаьтта денош - 135-145 шарахь. Климатан хьолаш дика ду йуьртабахамна. Йуьззина кхочу йовхо а, тӀуналла а гуьйренан йалташна, бӀаьстенан йалташна, техникин а, докъаран культурашна.
Сахьтан аса
Кхузахь сахьт Москохца нийса лелаш ду. Сахьтан аса йу UTC+3.
Билгалдахарш
Хьажоргаш
Шилован кӀоштан индексаш
Шилован кӀоштан нах беха меттигаш | 8,050 |
https://math.stackexchange.com/questions/1241213 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | English | Spoken | 151 | 565 | Contour integration
Consider the real-valued function
$$u(t) = \frac{1}{13-12\cos(t)}$$
By converting it to a contour integral along the unit circle in $\mathbb{C}$, evaluate
$$\int_0^{2\pi} u(t)\;dt$$
I have attempted so solve this and have found the residue to be $-\frac{1}{5}$ and therefore the integral to be $$\frac{2\pi}{5}$$
could someone confirm if this is correct?
It looks like your work is correct.
I get,
$$ \int_0^{2\pi} u(t)\; dt = \int_0^{2\pi} \frac{ie^{it}}{ie^{it} \left(13-12\frac{e^{it} + e^{-it}}{2}\right)}\; dt$$
$$ = \frac{1}{i} \oint_C \frac{dz}{-6z^2+13z-6},$$
where $C$ is the unit circle. From the quadratic equation, I find that $-6z^2+13z-6 = 0$ for $z = \frac{3}{2}, \frac{2}{3}$, so by the Residue Theorem,
$$ \int_0^{2\pi} u(t)\; dt = \frac{1}{i} 2\pi i \operatorname{Res}\left(\frac{1}{-6z^2+13z-6}, z=\frac{2}{3}\right).$$
Since $\frac{1}{-6z^2+13z-6}$ has a simple pole at $z=\frac{2}{3}$, we have,
$$\operatorname{Res}\left(\frac{1}{-6z^2+13z-6}, z=\frac{2}{3}\right) = \lim_{z\to\frac{2}{3}} \left(z-\frac{2}{3}\right) \frac{1}{-6z^2+13z-6} = \lim_{z\to\frac{2}{3}} \frac{1}{-6(z-\frac{3}{2})} = \frac{1}{5}$$
And so putting it all together,
$$ \int_0^{2\pi} u(t)\; dt = \frac{2\pi}{5}$$
as you also calculated.
| 49,664 | |
https://da.wikipedia.org/wiki/Junior-VM%20i%20ishockey%202015 | Wikipedia | Open Web | CC-By-SA | 2,023 | Junior-VM i ishockey 2015 | https://da.wikipedia.org/w/index.php?title=Junior-VM i ishockey 2015&action=history | Danish | Spoken | 496 | 1,024 | Juniorverdensmesterskabet i ishockey 2015 var det 38. junior-VM i ishockey. Mesterskabet havde deltagelse af 39 hold og afvikles i form af seks niveauopdelte turneringer i løbet af december 2014 og januar 2015. Mesterskabet for de bedste 10 hold afvikledes i Toronto og Montreal, Canada i perioden 26. december 2014 - 5. januar 2015.
Topdivisionen
I topdivisionen spiller 10 hold om det egentlige verdensmesterskab.
Hold
Turneringen har deltagelse af de ni bedste hold fra junior-VM 2014 og vinderen af 1. division gruppe A ved junior-VM 2014.
Arenaer
Turneringen afvikles i to arenaer i Helsinki, Finland.
Air Canada Centre, der normalt er hjemmebane for NHL-holdet Toronto Maple Leafs, og som har plads til 18.800 tilskuere.
Centre Bell, der er hjemmebane for Montreal Canadiens, og hvis tilskuerkapacitet er 21.273.
Format
Holdene spiller først en indledende runde, hvor de 10 hold er inddelt i to grupper med fem hold i hver. I hver gruppe spiller holdene en enkeltturnering alle-mod-alle, og de fire bedste hold i hver gruppe går videre til kvartfinalerne. De to hold, der slutter på femtepladserne i de to indledende grupper, går videre til nedrykningskampen, hvor de to hold spiller bedst af tre kampe. Vinderen af nedrykningsserien sikrer sig endnu et år i den bedste division, mens taberen bliver rykket ned i 1. division gruppe A.
Resultater
Indledende runde
Gruppe A
Gruppe B
Nedrykningskampe
Slutspil
Kvartfinaler
Kvartfinaler
Bronzekamp
Finale
Samlet rangering
Medaljevindere
Statistik
1. division gruppe A
1. division gruppe A er andet niveau i junior-VM-hierarkiet. Turneringen bliver spillet i , i perioden - 20 og har deltagelse af seks hold, der spiller en enkeltturnering alle-mod-alle. Holdene spiller om én oprykningsplads til topdivisionen og om at undgå én nedrykningsplads til 1. division gruppe B.
1. division gruppe B
1. division gruppe B er tredje niveau i junior-VM-hierarkiet. Turneringen bliver spillet i , i perioden - 20 og har deltagelse af seks hold, der spiller en enkeltturnering alle-mod-alle. Holdene spiller om én oprykningsplads til 1. division gruppe A og om at undgå én nedrykningsplads til 2. division gruppe A.
2. division gruppe A
2. division gruppe A er fjerde niveau i junior-VM-hierarkiet. Turneringen bliver spillet i , i perioden - 20 og har deltagelse af seks hold, der spiller en enkeltturnering alle-mod-alle. Holdene spiller om én oprykningsplads til 1. division gruppe B og om at undgå én nedrykningsplads til 2. division gruppe B.
2. division gruppe B
2. division gruppe B er femte niveau i junior-VM-hierarkiet. Turneringen bliver spillet i , i perioden - 20 og har deltagelse af seks hold, der spiller en enkeltturnering alle-mod-alle. Holdene spiller om én oprykningsplads til 2. division gruppe A og om at undgå én nedrykningsplads til 3. division.
3. division
3. division er sjette niveau i junior-VM-hierarkiet. Turneringen bliver spillet i , i perioden - 20 og har deltagelse af seks hold, der spiller en enkeltturnering alle-mod-alle. Holdene spiller om én oprykningsplads til 2. division gruppe B.
Kilder
IIHF - 2015 World Junior Championship
Noter
2015
Ishockey i 2014
Ishockey i 2015 | 36,574 |
https://ru.wikipedia.org/wiki/%D0%A2%D1%83%D1%80%D1%8B%D1%88 | Wikipedia | Open Web | CC-By-SA | 2,023 | Турыш | https://ru.wikipedia.org/w/index.php?title=Турыш&action=history | Russian | Spoken | 21 | 65 | Турыш:
Турыш — река в России, протекает в Пермском крае, Свердловской области.
Турыш — село в Бейнеуском районе Мангистауской области Казахстана. | 20,905 |
https://stackoverflow.com/questions/46624952 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Bo Persson, https://stackoverflow.com/users/597607, https://stackoverflow.com/users/7860670, user7860670 | English | Spoken | 332 | 472 | C++ Why this doesn't cause redecleration error?
#include <iostream>
using namespace std;
namespace extra
{ int i; }//Declared an integer i here
void i()
{
using namespace extra;
int i; //We called namespace extra at above then we declared another i
i=9;
cout<<i;
}
int main()
{
enum letter{i,j};
class i{letter j;};
::i();
return 0;
}
As I explained with the comments above we first declare an integer i at namespace extra then after calling it we declare another integer i then give it a value 9. My question is why this doesnt cause a redecleration error? Also at code line
i=9;
which i value gets the value 9 ? The one inside the namespace or the one inside the void i() function ?
NOTE: Please excuse my poor English.
using namespace extra; doesn't bring everything in from the namespace, it means "when looking for a name also look in that namespace". But as you have a local declaration of i, there is no need to look any further.
This is actually a good question, but not in the sense that it can receive a reasonable answer. C++ indeed has weird rules regarding identifies with the same name and shadowing. But it just happen to be designed this way. At least it is not as crazy as for example javascript can be.
It's the local one. As a rule of thumb, it is always the "closest" definition that is used.
struct A {};
int A = 0;
A b; // not ok, because A is the variable.
There is no error because there is no name i that denotes a variable in the global scope, or in the function.
A using directive just tells the compiler that if it can't find an appropriate name in the current context, it should also look in that namespace as well. In your case, the compiler didn't need to go into extra to look for a i, because it already found one in the function i.
| 16,864 |
https://bs.wikipedia.org/wiki/IC%202705 | Wikipedia | Open Web | CC-By-SA | 2,023 | IC 2705 | https://bs.wikipedia.org/w/index.php?title=IC 2705&action=history | Bosnian | Spoken | 90 | 247 | IC 2705 je zvijezda i nalazi se u sazviježđu Lav. Prvo otkriće je napravio Charles Joseph Etienne Wolf 27. marta 1906. godine.
Najbliži NGC/IC objekti
Sljedeći spisak sadrži deset najbližih NGC/IC objekata.
Također pogledajte
Novi opći katalog
Spisak IC objekata
Spisak galaksija
Bilješke
Bazirano na euklidsku udaljenost.
Reference
Literatura
Vanjski linkovi
IC 2705
IC 2705 na Aladin pregledaču
IC katalog
Interaktivni NGC Online Katalog
Astronomska baza podataka SIMBAD
IC katalog na Messier45.com
NGC/IC projekt
NGC2000 na NASA sajtu
IC na The Night Sky Atlas sajtu
IC objekti
Lav (sazviježđe)
Zvijezde | 37,898 |
https://stackoverflow.com/questions/21705859 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | BlackVegetable, Zyga, das_j, https://stackoverflow.com/users/1432545, https://stackoverflow.com/users/1521258, https://stackoverflow.com/users/758446 | English | Spoken | 392 | 1,081 | Throwable.printStackTrace() with log4j
I have an application that uses below code to output the stack trace for exceptions a lot, but when I run it on the server it doesn't log anything in log4j files.
Normally I would have used logger.error("msg...", e), but I can't change the code so Im stuck with printStackTrace() methods.
Is there any way to configure log4j to include those in the logs? I understand they go to System.err rather than System.out so can I redirect that somehow using log4j config (i.e. without changing the code)?
Any ideas much appreciated.
try {
...
} catch (Exception e) {
e.printStackTrace();
}
This answer may be of use to you: http://stackoverflow.com/a/507549/758446
@BlackVegetable okay, i'm going to remove this :)
Borrowing from the example provided by Black Vegetable, see if this helps move you in the direction you want to go:
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import org.apache.log4j.Logger;
public class TestSystemErrCapture {
private static final Logger log = Logger.getLogger(TestSystemErrCapture.class);
public static void main(String[] args) {
// First, redirect STDERR
System.setErr(new PrintStream(new OutputStream() {
private StringBuilder message = new StringBuilder();
@Override
public void write(int b) throws IOException {
if (b == '\n') {
log.error(message);
message.setLength(0);
} else {
message.append((char)b);
}
}
}));
// Now test to make sure output is redirected
TestThirdPartyClass t3pc = new TestThirdPartyClass();
t3pc.doIt();
}
public static class TestThirdPartyClass {
public void doIt() {
try {
throw new RuntimeException("Evil");
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
log4j.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration PUBLIC
"-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="Console"
class="org.apache.log4j.ConsoleAppender">
<!-- Only allow INFO+ in the Console. Use other logs for DEBUG-
<param name="Threshold" value="INFO"/>-->
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{MM/dd/yyyy HH:mm:ss}: %l%n%-5p - %m%n"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="Console"/>
</root>
</log4j:configuration>
The following output is produced (I ran this in Eclipse):
02/11/2014 10:26:53: TestSystemErrCapture$1.write(TestSystemErrCapture.java:18)
ERROR - java.lang.RuntimeException: Evil
02/11/2014 10:26:53: TestSystemErrCapture$1.write(TestSystemErrCapture.java:18)
ERROR - at TestSystemErrCapture$TestThirdPartyClass.doIt(TestSystemErrCapture.java:33)
02/11/2014 10:26:53: TestSystemErrCapture$1.write(TestSystemErrCapture.java:18)
ERROR - at TestSystemErrCapture.main(TestSystemErrCapture.java:27)
The output is a little funky, and maybe not exactly what you want for your application, but I think it should get you started.
HTH
--jsp
This is what I had in mind. +1
Thanks for this. The problem is I cant change the code within the application so I was trying to see if there is any way that I can do it with log4j configuration only.
| 27,458 |
https://vi.wikipedia.org/wiki/Gordonia%20penangensis | Wikipedia | Open Web | CC-By-SA | 2,023 | Gordonia penangensis | https://vi.wikipedia.org/w/index.php?title=Gordonia penangensis&action=history | Vietnamese | Spoken | 63 | 131 | Gordonia penangensis là một loài thực vật thuộc họ Theaceae. Loài này có ở Malaysia và Singapore. Chúng hiện đang bị đe dọa vì mất môi trường sống.
Chú thích
Tham khảo
Chua, L.S.L. 1998. Gordonia penangensis. 2006 IUCN Red List of Threatened Species. Truy cập 21 tháng 8 năm 2007.
Gordonia
Thực vật Malaysia
Thực vật Singapore
Thực vật dễ tổn thương | 41,043 |
https://en.wikipedia.org/wiki/The%20Burning%20Season%20%281993%20film%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | The Burning Season (1993 film) | https://en.wikipedia.org/w/index.php?title=The Burning Season (1993 film)&action=history | English | Spoken | 70 | 111 | The Burning Season is a 1993 Canadian film directed by Harvey Crossland. The film stars Akesh Gill, Jasminder K. Rattan, Om Puri and Dale Azzard. The plot concerns a young Indo-Canadian wife and mother who runs away to India in pursuit of her lover.
References
External links
1993 films
Films about Indian Canadians
Canadian drama films
1993 drama films
Films set in Vancouver
Films shot in Vancouver
1990s Canadian films | 2,471 |
https://ceb.wikipedia.org/wiki/Desa%20Priyoso | Wikipedia | Open Web | CC-By-SA | 2,023 | Desa Priyoso | https://ceb.wikipedia.org/w/index.php?title=Desa Priyoso&action=history | Cebuano | Spoken | 113 | 196 | Administratibo nga balangay ang Desa Priyoso sa Indonesya. Nahimutang ni sa administratibo nga balangay sa Desa Priyoso, lalawigan sa Jawa Timur, sa kasadpang bahin sa nasod, km sa sidlakan sa Jakarta ang ulohan sa nasod.
Hapit nalukop sa kalapokan ug kapitaan ang palibot sa Desa Priyoso. Dunay mga ka tawo kada kilometro kwadrado sa palibot sa Desa Priyoso may kaayo hilabihan populasyon. Ang klima habagat. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Oktubre, 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 Agosto, sa milimetro.
Ang mga gi basihan niini
Mga subdibisyon sa Jawa Timur | 39,606 |
https://stackoverflow.com/questions/6807565 | StackExchange | Open Web | CC-By-SA | 2,011 | Stack Exchange | Abel Rodríguez, Carlos Sala Samper, Muawia Fazil, Osushe, Wroclai, https://stackoverflow.com/users/14892892, https://stackoverflow.com/users/14892893, https://stackoverflow.com/users/14892894, https://stackoverflow.com/users/14893027, https://stackoverflow.com/users/14893102, https://stackoverflow.com/users/14926891, https://stackoverflow.com/users/426429, max99, user14892894 | English | Spoken | 322 | 644 | Android: passing object from activy to view
My activity load data from res.raw
To give those datas to the view, I've added a param to the view construtor
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.loadLibrary("engine-2d");
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );
if (_engine == null)
{
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
byte[] scene;
int scene_size = 0;
try {
InputStream ins = getResources().openRawResource(R.raw.package_test);
scene_size = ins.available();
scene = new byte[scene_size];
ins.read(scene);
ins.close();
} catch (IOException e) {
// Should never happen!
throw new RuntimeException(e);
}
_engine = new PlsEngine2D(scene, scene_size, width, height);
}
setContentView(new PlsSurface2D(this, _engine));
}
@Override
public void onDestroy() {
super.onDestroy();
_engine.DestroyEngine();
}
I don't know why but when I press the home button (the instance of my program is still in memory)
and then I launch the application again, it crash.
In fact, PlsEngine2D use ndk to call C function that make malloc.
I do not exactly know where is the problem but I wonder if the malloc pointer are still correct !
Or may be this is my view!
I give the _engine object to it.
I wonder if when the view wake up it have the _engine param object again !
Is there another way to give my _engine object to the view ?
Does the view can take the the _engine value to the activity ?
Could you post some code in your question please? I am not sure I am getting the whole picture.
Anyway, when you start an activity that is still in memory, the activity's following methods are called in the following order: onRestart(), onStart() and onResume().
Check this link for details
onResume() is called when the activity is still in the memory. It is not created again, since in onResume() you dont call setContentView() again.
One important point to add about this - onResume() is called directly after onCreate(), even if the application isn't in memory.
| 32,330 |
https://war.wikipedia.org/wiki/Polistes%20takasagonus | Wikipedia | Open Web | CC-By-SA | 2,023 | Polistes takasagonus | https://war.wikipedia.org/w/index.php?title=Polistes takasagonus&action=history | Waray | Spoken | 36 | 63 | An Polistes takasagonus in uska species han Hymenoptera nga ginhulagway ni Jinhaku Sonan hadton 1943. An Polistes takasagonus in nahilalakip ha genus nga Polistes, ngan familia nga Vespidae. Waray hini subspecies nga nakalista.
Mga kasarigan
Polistes | 24,992 |
https://af.wikipedia.org/wiki/Westfield%20Corporation | Wikipedia | Open Web | CC-By-SA | 2,023 | Westfield Corporation | https://af.wikipedia.org/w/index.php?title=Westfield Corporation&action=history | Afrikaans | Spoken | 147 | 307 | Westfield Corporation is 'n Australiese onderneming wat vanuit sy hoofkwartier in Sydney winkelsentrums in die Verenigde Koninkryk en die Verenigde State bestuur. Dit is in 2014 gevorm toe die oorspronklike Westfield Group sy belange in Noord-Amerika en Wes-Europa van sy bedrywighede in Australië en Nieu-Seeland geskei en twee onafhanklike ondernemings vir respektiewelik die Noordelike en Suidelike Halfrond gevestig het. Winkelsentrums in die twee laasgenoemde lande word tans deur die eweneens nuutgestigte Scentre Group bestuur.
Op 12 Desember 2017 het Westfield Corporation 'n oorname-aanbod deur die Franse onderneming Unibail-Rodamco ter waarde van A$32,8 miljard aanvaar - met uitsondering van Westfield Labs, die onderneming se tegnologie- en ontwerpafdeling wat sy setel in die Kaliforniese winkelsentrum Westfield San Francisco Centre het. Ontleders wys daarop dat die oorname met strategiese oorwegings te doen het nadat die Amerikaanse aanlynreus Amazon.com, Inc. laat in 2017 'n Australiese filiaal gevestig het.
Verwysings
Australiese maatskappye | 41,192 |
https://lld.wikipedia.org/wiki/Kyadigera | Wikipedia | Open Web | CC-By-SA | 2,023 | Kyadigera | https://lld.wikipedia.org/w/index.php?title=Kyadigera&action=history | Ladin | Spoken | 30 | 77 | Kyadigera ie n luech te l'India tl stat federel Karnataka.Kyadigera ie tl Devadurga dl raion Raichur. Tl 2011 ovel na populazion de .
Storia
Geografia
Referënzes
Karnataka
Luech te l'India | 43,262 |
https://en.wikipedia.org/wiki/Ibn%20Khaqan | Wikipedia | Open Web | CC-By-SA | 2,023 | Ibn Khaqan | https://en.wikipedia.org/w/index.php?title=Ibn Khaqan&action=history | English | Spoken | 100 | 232 | Ibn Khaqan is an Arabic nasab that indicates descent from a person named "Khaqan". Most often, this indicates descent from a Turkic ruling house (khaqan is a medieval Turkic royal title):
Ahmad ibn Muzahim ibn Khaqan, Abbasid military governor of Egypt in 868
al-Fath ibn Khaqan (killed 861), Abbasid writer and official, friend and chief adviser of Caliph al-Mutawakkil
Muzahim ibn Khaqan (died 868), Abbasid military commander, governor of Egypt in 867–868
Ubayd Allah ibn Yahya ibn Khaqan (died 877), Abbasid official, vizier in 851–861 and 870–877
al-Fath ibn Khaqan (al-Andalus) (died 1134), Andalusi writer
See also
Khaqani (disambiguation)
Patronymics | 38,457 |
https://nl.wikipedia.org/wiki/Metarctia%20flora | Wikipedia | Open Web | CC-By-SA | 2,023 | Metarctia flora | https://nl.wikipedia.org/w/index.php?title=Metarctia flora&action=history | Dutch | Spoken | 43 | 88 | Metarctia flora is een vlinder uit de familie spinneruilen (Erebidae), onderfamilie beervlinders (Arctiinae). De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1957 door Sergius Kiriakoff.
Deze nachtvlinder komt voor in tropisch Afrika.
Metarctia
Dier uit het Afrotropisch gebied | 20,316 |
https://vi.wikipedia.org/wiki/Stenopogon%20elizabethae | Wikipedia | Open Web | CC-By-SA | 2,023 | Stenopogon elizabethae | https://vi.wikipedia.org/w/index.php?title=Stenopogon elizabethae&action=history | Vietnamese | Spoken | 35 | 77 | Stenopogon elizabethae là một loài ruồi trong họ Asilidae. Stenopogon elizabethae được Martin miêu tả năm 1968. Loài này phân bố ở vùng Tân nhiệt đới và Tân Bắc giới.
Chú thích
Tham khảo
Stenopogon | 12,809 |
https://sv.wikipedia.org/wiki/Dictyna%20xizangensis | Wikipedia | Open Web | CC-By-SA | 2,023 | Dictyna xizangensis | https://sv.wikipedia.org/w/index.php?title=Dictyna xizangensis&action=history | Swedish | Spoken | 32 | 70 | Dictyna xizangensis är en spindelart som beskrevs av Hu och Li 1987. Dictyna xizangensis ingår i släktet Dictyna och familjen kardarspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Kardarspindlar
xizangensis | 4,123 |
https://nl.wikipedia.org/wiki/Kanton%20Issy-les-Moulineaux-Est | Wikipedia | Open Web | CC-By-SA | 2,023 | Kanton Issy-les-Moulineaux-Est | https://nl.wikipedia.org/w/index.php?title=Kanton Issy-les-Moulineaux-Est&action=history | Dutch | Spoken | 51 | 140 | Kanton Issy-les-Moulineaux-Est is een voormalig kanton van het Franse departement Hauts-de-Seine. Kanton Issy-les-Moulineaux-Est maakte deel uit van het arrondissement Boulogne-Billancourt en telt 25.399 inwoners (1999).Het werd opgeheven bij decreet van 24 februari 2014, met uitwerking in maart 2015.
Gemeenten
Het kanton Issy-les-Moulineaux-Est omvatte enkel een deel van de gemeente Issy-les-Moulineaux.
Issy-les-Moulineaux-Est | 38,195 |
https://stackoverflow.com/questions/11062252 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Thomas, https://stackoverflow.com/users/14637, https://stackoverflow.com/users/624593, iforce2d | English | Spoken | 330 | 439 | How to detect collision but do not collide in box2d?
How to detect if body collides other body but do not react on this collision.
By default i - detect collision and bodies collide.
If i set fixtureDef filter - bodies do not collide but i can not detect collision.
Help please!
If the fixture never needs to collide with anything you could make it a sensor. If you need it to collide with some things but not others you could do contact->SetEnabled(false) in the PreSolve of the collision listener, depending on what it collided with.
Addendum: instead of using PreSolve, you can also use collision masks and/or collision groups to control what the fixture should and should not collide with.
He still wants to detect when a collision occurs, he just doesn't want any collision response. Changing the collision mask will prevent collision detection completely.
True. This needs to be combined with sensor fixtures.
What you want here is a sensor fixture on a body. From the box2d manual:
Sometimes game logic needs to know when two fixtures overlap yet there should be no collision response. This is done by using sensors. A sensor is a fixture that detects collision but does not produce a response.
You can flag any fixture as being a sensor. Sensors may be static or dynamic. Remember that you may have multiple fixtures per body and you can have any mix of sensors and solid fixtures.
Sensors do not generate contact points. There are two ways to get the state of a sensor:
b2Contact::IsTouching
b2ContactListener::BeginContact and EndContact
You can set a fixture as a sensor and then write it into your contact listener. If a fixture has its sensor flag set to true, it will provide collision data without physically simulating the collision (ie will allow you to test for overlap between it any any other colliding fixture.)
This is a helpful tutorial on how to get started using sensors Ray Wenderlich sensor tutorial
| 22,501 |
https://arz.wikipedia.org/wiki/%D9%87%D9%86%D8%B1%D9%89%20%D8%A8%D9%8A%D8%B1%D8%AC | Wikipedia | Open Web | CC-By-SA | 2,023 | هنرى بيرج | https://arz.wikipedia.org/w/index.php?title=هنرى بيرج&action=history | Egyptian Arabic | Spoken | 47 | 137 | هنرى بيرج كان دبلوماسى من امريكا.
حياته
هنرى بيرج من مواليد يوم 29 اغسطس سنة 1811 فى نيو يورك.
الدراسه
درس فى جامعة كولومبيا.
وفاته
هنرى بيرج مات فى 12 مارس سنة 1888.
لينكات برانيه
مصادر
دبلوماسى من امريكا
وفيات 1888
مواليد 1811
دارسين فى جامعة كولومبيا | 45,501 |
https://nl.wikipedia.org/wiki/Karang%20Ringin%20II | Wikipedia | Open Web | CC-By-SA | 2,023 | Karang Ringin II | https://nl.wikipedia.org/w/index.php?title=Karang Ringin II&action=history | Dutch | Spoken | 27 | 66 | Karang Ringin II is een bestuurslaag in het regentschap Musi Banyuasin van de provincie Zuid-Sumatra, Indonesië. Karang Ringin II telt 1436 inwoners (volkstelling 2010).
Plaats in Zuid-Sumatra | 45,857 |
https://de.wikipedia.org/wiki/Adolf%20Emmelmann%20Karosserie-Fabrik | Wikipedia | Open Web | CC-By-SA | 2,023 | Adolf Emmelmann Karosserie-Fabrik | https://de.wikipedia.org/w/index.php?title=Adolf Emmelmann Karosserie-Fabrik&action=history | German | Spoken | 636 | 1,394 | Die Adolf Emmelmann Karosserie-Fabrik war ein in Hannover ansässiges Karosseriebauunternehmen, das hauptsächlich durch seine Aufbauten auf Büssing-Fahrgestellen für Omnibusse bekannt wurde. Sitz des Unternehmens war an der Sutelstraße im Stadtteil Bothfeld.
Geschichte
Das Unternehmen wurde zur Zeit der Gründerjahre des Deutschen Kaiserreichs 1896 von dem Stellmacher Emil Emmelmann (* 4. September 1868 in Wollersleben, † 17. Oktober 1935 in Hannover) gegründet. Anfangs wurden nur Kutschen, später auch Aufbauten für Lastkraftwagen produziert.
Nach dem Ersten Weltkrieg und der Deutschen Hyperinflation in der Weimarer Republik übernahm Emmelmanns Sohn Adolf (* 24. Dezember 1899 in Isernhagen; † 19. November 1986 in Hannover) 1928 die Geschäfte. Der Gründer der späteren Adolf Emmelmann Betriebs GmbH & Co. KG stellte Anfang der 1930er Jahre die Produktion auf Karosserien für Reiseomnibusse um, die auf Fahrgestellen von Büssing, Hansa-Lloyd, Krupp und Daimler-Benz aufgebaut wurden.
Während der Zeit des Nationalsozialismus und des Zweiten Weltkriegs wurden Anhänger, Schlitten und ähnliches produziert. Nach dem Krieg und der Beseitigung der Bombenschäden, die der Betrieb während der Luftangriffe auf Hannover erlitten hatte, erhöhten sich Produktion und Umsatz langsam wieder.
Anfang der 1950er Jahre begann eine enge Zusammenarbeit mit der Firma Büssing, die danach beinahe sämtliche Fahrgestelle für die Karosserien von Emmelmann lieferte. In den Wirtschaftswunderjahren verließ bereits 1956 der eintausendste Büssing-Emmelmann-Bus die Werkshallen. Bald erzielten die Produkte dieser Kooperation auch Erfolge bei Wettbewerben in Nizza und Montreux. Gebaut wurden Stadtbusse – auch als Gelenk- beziehungsweise Oberleitungsbus – sowie Überlandbusse und Reisebusse. Gelenkbusse wurden ab 1955 unter Verwendung von Fahrgestellen mit Unterflurmotor von Büssing und Nachläufern der Firma Schenk gebaut. Bis Ende 1956 wurden 18 Meter lange, vierachsige Gelenkbusse, von 1957 bis 1964 16,5 Meter lange, dreiachsige und ab 1965 wieder bis 18 Meter lange, dreiachsige Gelenkbusse gebaut.
Von 1953 bis 1958 wurde die Umstellung von der Fahrgestellbauweise zur sogenannten Verbundbauweise vollzogen. Bei den Reisebussen wurde 1958 ein „Stufenhochdecker“ von Emmelmann vorgestellt, der unter dem höher positionierten mittleren und hinteren Teil zusätzlichen Platz für Reisegepäck bot. Ab 1961 wurden die (großen) Büssing-Reisebusse von Emmelmann fertiggestellt (Senator bzw. Präfekt 15, aber auch Senator 12 und 14, Konsul 11 und Präfekt 13). Im Januar 1966 erhöhte die Adolf Emmelmann Karosseriefabrik GmbH das Stammkapital auf 2,2 Millionen D-Mark, wovon Büssing eine Stammeinlage von 600.000 DM zum Nennwert übernommen und eingezahlt hat. Das Design wurde immer wieder dem Zeitgeschmack angepasst und weiter entwickelt, zuletzt grundlegend 1969 mit geraden Linien und rechteckigen Scheinwerfern. Nachdem im Jahr 1971 die Büssing-Automobilwerke, die mit 27 % an dem ansonsten in Familienbesitz befindlichen Kapital des Karosseriebauunternehmens beteiligt war, von der MAN übernommen worden war, sah die Zukunft für die Büssing-Emmelmann-Busse zunächst gut aus. Doch rund drei Jahre später konzentrierte die MAN 1974 ihr neues Omnibus-Programm auf den ehemaligen Büssing-Standort in Salzgitter-Watenstedt. Für den Karosseriebauer Emmelmann, der am Standort Hannover zuletzt ausschließlich für Büssing gearbeitet hatte, bedeutete dies 1975 das Aus.
2001 trat der studierte Fahrzeugbauer und spätere hannöversche CDU-Ratsherr, Jens-Michael Emmelmann (* 1976 in Hannover), zunächst als Prokurist, 2008 dann als geschäftsführender Gesellschafter in die Adolf Emmelmann GmbH & Co. KG ein, 2008 bis heute (Stand: Dezember 2015) auch als geschäftsführender Gesellschafter der Michael Emmelmann GmbH & Co. KG.
Adolf-Emmelmann-Straße
Im hannoverschen Stadtteil Bothfeld ehrt die 2002 angelegte Adolf-Emmelmann-Straße, die die Sutelstraße mit der Straße Im Heidkampe verbindet, den 1986 verstorbenen Unternehmer. Das ehemalige Betriebsgelände wurde 2003 mit einem Einkaufspark überbaut.
Galerie
Literatur
Handbuch öffentlicher Verkehrsbetriebe. Verband Öffentlicher Verkehrsbetriebe, 1952
Eckhard Fischer: Die Firma Büssing. Archiv der Stadt Hannover, 2010
Klaus Mlynek, Waldemar R. Röhrbein: Stadtlexikon Hannover: Von den Anfängen bis in die Gegenwart. Schlütersche, 2010, ISBN 3-8426-8207-7
Weblinks
Büssing-Busse mit Aufbauten der Fa. Adolf Emmelmann Karosseriefabrik GmbH auf Drehscheibe-Online.de, abgerufen am 23. Dezember 2015
Neuer 10-m-Reisebus von Büssing. In: Omnibusrevue, März 1969; abgerufen am 23. Dezember 2015
Einzelnachweise
Ehemaliger Karosseriehersteller
Ehemaliger Omnibushersteller (Deutschland)
Ehemaliger Oberleitungsbushersteller
Ehemaliger Lkw-Hersteller (Deutschland)
Ehemaliges Unternehmen (Hannover)
Gegründet 1896
Bothfeld (Hannover)
Produzierendes Unternehmen (Hannover) | 20,343 |
https://nap.wikipedia.org/wiki/Cernusco%20sul%20Naviglio | Wikipedia | Open Web | CC-By-SA | 2,023 | Cernusco sul Naviglio | https://nap.wikipedia.org/w/index.php?title=Cernusco sul Naviglio&action=history | Neapolitan | Spoken | 27 | 70 | Cernusco sul Naviglio è nu comune 'e 28687 'e abitante d''a pruvincia 'e Milano.
giugrafia
Comune d''a pruvincia 'e Milano
Comune d''a reggione Lummardìa
Comune 'e l'Italia | 11,522 |
https://de.wikipedia.org/wiki/Oaksterdam%20University | Wikipedia | Open Web | CC-By-SA | 2,023 | Oaksterdam University | https://de.wikipedia.org/w/index.php?title=Oaksterdam University&action=history | German | Spoken | 102 | 198 | Oaksterdam University ist die erste Cannabis-Universität der Welt in Oaksterdam, Oakland, Kalifornien, Vereinigte Staaten.
Sie wurde 2007 gegründet und hat sich die wissenschaftliche Untersuchung von Cannabis als Arzneimittel zum Ziel gesetzt. Der Sitz der Universität ist an Oaklands Broadway, Ecke 19th Street und sie hat Zweigstellen in Los Angeles, Sebastopol (Kalifornien) und im Bundesstaat Michigan. Präsident ist der Marihuana-Aktivist Steve Lee.
Weblinks
Offizielle Website der Oaksterdam University
Kiffen gegen die Schmerzen. Artikel über den Legalisierungskampf von Cannabisprodukten in Kalifornien und die Oaksterdam University bei Die Zeit online.
Universität in Kalifornien
Organisation (Oakland)
Hanf in den Vereinigten Staaten
Cannabis als Arzneimittel
Gegründet 2007 | 13,466 |
https://math.stackexchange.com/questions/2201948 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Eric Wofsey, Matematleta, Yuxi Han, https://math.stackexchange.com/users/138929, https://math.stackexchange.com/users/287889, https://math.stackexchange.com/users/86856 | English | Spoken | 608 | 1,092 | What is the topology on a vector space generated by a family of seminorms?
I have a question about topological vector spaces. I'm getting so confused about what we mean by saying a topology generated by a family of seminorms.
At first, I thought it just means the initial topology generated by the family of seminorm functions. But then, I read about this sample, Example 2.
Let X be a set, then $\mathbb{C}^X = \{ f: X \to \mathbb{C} \}$ is a complex vector space. To each $x \in X$, consider $\| \cdot \|_x : \mathbb{C}^X \rightarrow \mathbb{R}$, ${\| f \|}_x = | f(x) |$. This is a seminorm on $\mathbb{C}^X$. The topology generated by this set of seminorms as $x$ varies over $X$ is the product topology on $\mathbb{C}$.
Why is this the same topology as the product topology on $\mathbb{C}^X$? If this is true, the property of initial topology would imply $f_n$ converges to $f$ in $\mathbb{C}^X$ iff $|f_n(x)|$ converges to $| f(x)|$, for all $x\in X$. However, the property of the product topology would imply $f_n$ converges to $f$ in $\mathbb{C}^X$ iff $f_n(x)$ converges to $f(x)$, for all $x\in X$. Consequently, $f_n(x)$ converges to $f(x)$, for all $x\in X$ iff $|f_n(x)|$ converges to $| f(x)|$, for all $x\in X$, which I think is not true.
Why do I get a contradiction here?
Thanks in advance for any help!
$f\to g$ in this topology $\Leftrightarrow \left | f-g \right |_x\to 0$ and this happens $\Leftrightarrow |f(x)-g(x)|\to 0$ for each fixed $x\in X.$ i.e. $f\to g\Leftrightarrow f(x)=\pi_x(f)\to \pi_x(g)=g(x).$ Thus the two topologies are the same.
@ChilangoIncomprendido I think the first iff "$\Leftarrow$" requires the vector addition is continuous in this topology, which might not be true.
The topology generated by a set of seminorms is not just the initial topology they generate. Rather, it is the initial topology that they and all of their translates generate (or equivalently, the initial translation-invariant topology they generate). That is, for all $f$ in the space and each seminorm $p$, we require not just that $p$ is continuous with respect to our topology but also that $g\mapsto p(g-f)$ is continuous. The idea is that for each $f$, we should think of $p(g-f)$ as a way of measuring the distance from $g$ to $f$, and so the set of $g$ such that $p(g-f)$ is small should be a neighborhood of $f$.
So in the example of the product topology, if $f_n$ converges to $f$, that means not just that $|f_n(x)|$ converges to $|f(x)|$ for all $x$, but that for any $f'$, $|f_n(x)-f'(x)|$ converges to $|f(x)-f'(x)|$. Taking $f'=f$, this implies $|f_n(x)-f(x)|$ converges to $0$, so $f_n(x)$ converges to $f(x)$.
More generally, it is typical to describe a topology on a vector space by just describing the neighborhoods of $0$, and then obtaining neighborhoods of other points by translation. That is what's going on here: when you say that a set of seminorms "generates" the topology, that actually just means they generate the neighborhoods of $0$, and neighborhoods of all other points are then obtained by translation.
Thank you so much! So if I understand this correctly, the topology generated by seminorms is the smallest one that makes seminorms continuous and the vector addition continuous? What about the scalar multiplication? It's already continuous when we only make those seminorms continuous?
As I stated it, the topology generated by a set of seminorms is the smallest topology that makes the seminorms continuous and make vector addition continuous separately in each variable. This actually automatically makes vector addition jointly continuous and scalar multiplication continuous; you can prove these using the subadditivity and scaling properties of seminorms.
| 28,498 |
https://stackoverflow.com/questions/10191261 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Buchi, Manisha Parde, Md Burhan, Vineet Chaudhary, Zhang Zenghu, https://stackoverflow.com/users/1338746, https://stackoverflow.com/users/23371806, https://stackoverflow.com/users/23371807, https://stackoverflow.com/users/23371808, https://stackoverflow.com/users/23459671, https://stackoverflow.com/users/23508983, https://stackoverflow.com/users/467969, soukeina, user23508983 | Norwegian Nynorsk | Spoken | 331 | 1,385 | Issue with STOMP on ActiveMQ being used on OSGI (KARAF)
I have installed Karaf (2.2.5) on Ubuntu Linux 10.04.
Installed ActiveMQ as a feature on top of Karaf.
Created a custom broker with stomp connector.
Now when I try to connect to this stomp broker from Java client, I get "java.net.SocketTimeoutException: Read timed out"
The same client works fine if I start ActiveMQ as a stand alone application.
Thanks in Advance
Here's my config:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dios" dataDirectory="${karaf.data}/activemq/dios" useShutdownHook="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<persistenceAdapter>
<kahaDB directory="${karaf.data}/activemq/dios/kahadb"/>
</persistenceAdapter>
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" id="hook" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?trace=true"/>
</transportConnectors>
</broker>
<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://0.0.0.0:61616" />
</bean>
<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="maxConnections" value="8" />
<property name="connectionFactory" ref="activemqConnectionFactory" />
</bean>
<bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
<property name="transactionManager" ref="transactionManager" />
<property name="connectionFactory" ref="activemqConnectionFactory" />
<property name="resourceName" value="activemq.dios" />
</bean>
<osgi:reference id="transactionManager" interface="javax.transaction.TransactionManager" />
<osgi:service ref="pooledConnectionFactory">
<osgi:interfaces>
<value>javax.jms.ConnectionFactory</value>
</osgi:interfaces>
<osgi:service-properties>
<entry key="name" value="dios"/>
</osgi:service-properties>
</osgi:service>
</beans>
Can anyone please help?? I'm stuck here!!
Can you put your broker configuration here? People can't help if they don't understand the issue.
I can't see an obvious problem with your config... Personally, I've stopped using Spring in OSGi because I kept encountering boot-time race conditions. Spring's <osgi:service> uses timeouts, so a delay in booting messes everything up. The following alternative approach has worked very well for me under Karaf 2.2.4:
Add this repo to my etc/org.apache.karaf.features.cfg file: mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features
Add an etc/activemq-broker.xml file written via Blueprint. I started with an example XML from Talend and customized it to my needs.
Declare a dependency on activemq-blueprint in my own features.xml file like so: <feature version="${activemq.version}">activemq-blueprint</feature>
Declare that XML file in my features.xml: <bundle>blueprint:file:etc/activemq-broker.xml</bundle>
I'm not a big fan of Blueprint in general, but it made this configuration really easy for me.
| 11,286 |
https://fr.wikipedia.org/wiki/Abominator | Wikipedia | Open Web | CC-By-SA | 2,023 | Abominator | https://fr.wikipedia.org/w/index.php?title=Abominator&action=history | French | Spoken | 425 | 671 | Abominator est un groupe australien de black metal, originaire de Melbourne. Leurs paroles traitent souvent de la guerre et de la spiritualité. Ils ont été comparés à Angelcorpse et Morbid Angel.
Histoire
Abominator est formé à Melbourne en 1994 par Andrew Undertaker et Chris Volcano (anciennement Deströyer 666) et sort sa première démo, Barbarian War Worship, en , avec six titres. Elle est ensuite rééditée sous forme de split avec le groupe suédois de death metal Mornaland. Fin 1995, Dave Deathsaw (guitares) et Gary Gestapo (basse) sont ajoutés au groupe et donnent de nombreux concerts, y compris avec le groupe culte de black metal Bestial Warlust. Le chanteur de Bestial Warlust, Damon Bloodstorm (basse, chant) rejoint Abominator à cette époque, et Gary Gestapo est renvoyé.
En 1997, ils enregistrent leur prochain album, une autre démo intitulée , et Dave Deathsaw quitte le groupe l'année suivante. Abominator connaît un succès important aux États-Unis et signe un contrat avec Necropolis Records. Ils sortent , et enregistrent un titre pour la compilation de Necropolis, , sorti en 1999. Vers 2000, ils commencent à écrire et à enregistrer leur prochain album, , mais Necropolis décide qu'ils ne souhaitent plus soutenir Abominator et rend leur contrat caduc. Cependant, Abominator réussit à obtenir un contrat avec Osmose Productions peu de temps après, et sort sous Osmose. Après la sortie de cet album, Damon Bloodstorm quitte le groupe.
Début 2001, Max Krieg rejoint le groupe au chant. Ils apparaissent sur le DVD d'Osmose début 2002, et enregistrent leur prochain album, un LP en édition limitée intitulé , qui sort en 2003. La campagne marketing pour cet album est très réussie, et Abominator joue bientôt aux côtés de groupes comme Deströyer 666, Hobbs' Angel of Death et Mayhem, et apparaît sur , un DVD de deux heures et demie présentant des groupes comme Immortal, Dark Tranquillity et Absu. Abominator était également prévu pour jouer au festival Bloodlust 2004, mais Max Krieg quitte le groupe et le pays de manière inattendue, laissant Abominator sans chanteur et les forçant à annuler tous les concerts restants. Ils sortent également chez Osmose en 2004 et changent rapidement de label, signant un contrat de deux albums avec le label Displeased, et sortant en .
Discographie
1995 : (démo)
1997 : (démo)
1997 : (split)
1999 : (album)
2001 : (album)
2003 : (album)
2006 : (album)
2015 : (album)
Notes et références
Liens externes
Groupe australien de thrash metal
Groupe australien de death metal
Groupe musical formé en 1994
Groupe musical des années 1990
Groupe musical de Melbourne | 28,647 |
https://workplace.stackexchange.com/questions/85589 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | David K, Martin Ueding, Masked Man, https://workplace.stackexchange.com/users/16983, https://workplace.stackexchange.com/users/19730, https://workplace.stackexchange.com/users/3192 | English | Spoken | 812 | 988 | Separating personal and institute email addresses after the fact
My question is a bit like How do I handle my personal email address spreading like a virus at work?, however it is more complicated.
I am writing a master thesis at an university. For all my prior studying, I have used my personal email address whenever I contacted my supervisor or other people at the university. For the master thesis, an institute email address has been set up for me. I try to use that for all the communication related to my master thesis. The same pattern happened to me for a side job: I would apply with my personal email and then would get the company email only later on. But then my personal email address had it made into the address books already.
Now I would like to have all the master thesis related emails in the institute email. However, the group I work in knows me from before and they all have my personal email address. Since both email addresses are in their address books, I get emails to both accounts. It also happens that I get CC'ed in emails to people who did not know me before, and those people will then have my personal email first.
Before I had the institute email address, writing to my personal email was the right thing, so nobody did anything wrong in that sense. Then I do not know whether I will get to keep the institute email forever, so I'd like to let my colleges keep my personal email for personal matters.
What would be a good way of inducing this transition?
Mass mailing everyone at the same time will lead to a global change and all those “reply all chains” will get changed. However, it might annoy people. Also I am not exactly sure who has my personal email address.
Every email that goes into my personal inbox will be replied from the institute address. I'll add something like “please send further emails to the institute address“ at the top so gradually everyone can update. This will take a while and probably not reach everyone but improve the situation.
Say/write nothing and just create filter rules. Emails from the institute email addresses to the personal one just get moved to the institute account. I would not have to ask people to change their address books, but the number of email addresses in the filter list will grow over time.
I am leaning toward the second option, perhaps there is something better?
I'm voting to close this question as off-topic because it is about email forwarding, not navigating the workplace.
I'd set up an answer that looks like an automatically generated answer and send to everyone that mails your private mail with institute stuff, with CC to your institute mail adress. If people dont get it, send more. In general, autogenerated messages annoy people and they will seek to avoid annoyance, and behave like you want them to - update their contact information.
Dear Sir/Madam
Your message has been forwarded to
institutemail@institute.mail. The current mail adress is not
applicable for urgent matters, official or work related issues. Please
update your contact information.
Sincerely, YourName
PS: This is an
auto-generated email. Do not reply.
This has the appearance of an automatic mail, so nobody will take offense of the formal and direct language (or, not very much at least) and it will have a good shot at people understanding it. Please disregard or correct eventual spelling errors, english is not my first language and formal english can be a bit tricky. I hope you got the idea at least.
And depending on your email client, you may be able to set it up to actually auto-reply to all emails from a certain domain or list of senders.
This is actually what I did. I set that up as a filter rule with my email provider directly and just replied to all emails from the institute, asking to use my institute email instead. This has worked well. There are a few GitHub repositories which are also set up with my personal account, I just use sorting rules now and that is fine too.
In future a better solution is to make a separate email address for things like this. I have 3 for instance. One for work, one personal, and one I use for pretty much anything else like Stack Exchange etc,.
In your case however, informing people proactively is the best way. This happens, people understand. It's not annoying to tell them you have an email address they need to use. It's just part of communicating these days.
So reply to work related emails using the work address, and let them know this is the one to use. It will take a bit of time, but everyone will start using it.
| 6,360 |
https://am.wikipedia.org/wiki/%E1%8A%A5%E1%8A%95%E1%8C%80%E1%88%AB%20%E1%89%A0%E1%88%9B%E1%8B%A8%E1%89%B5%20%E1%8A%A0%E1%8B%AB%E1%8C%A0%E1%8C%8D%E1%89%A5%E1%88%9D | Wikipedia | Open Web | CC-By-SA | 2,023 | እንጀራ በማየት አያጠግብም | https://am.wikipedia.org/w/index.php?title=እንጀራ በማየት አያጠግብም&action=history | Amharic | Spoken | 9 | 108 | እንጀራ በማየት አያጠግብም የአማርኛ ምሳሌ ነው።
ትርጉሙ
ያልተተረጎመ ምሳሌ | 9,052 |
https://stackoverflow.com/questions/29459057 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | English | Spoken | 254 | 473 | API on subdomain and oauth
I have an api on a subdomain : api.exemple.com written with symfony2 and my main application on exemple.com (SPA - AngularJs).
I would like to allow user to link their facebook account with their local account. I don't know how to proceed in order to authenticate through my app and use third party oauth provider.
Do you have any clue ?
Thank you
On the angular side, start by opening a new window and send your oauth handler a get request:
self.oauthConnect = function(provider)
{
var url = apiPrefix + '/oauth/tokens/'. provider;
oauthWindow = $window.open(url,'_blank', 'height=600, width=600, top=100, left=300, modal=yes');
oauthWindow.focus();
};
Your PHP api site then redirects to the oauth provider site (i.e. facebook). We use a new client window so our SPA keeps running in spite of the redirect. The provider then presents their login screen and redirects with the oauth token information.
Your PHP api site does what it needs to and generates the actual authorization token (hint: use a json web token). The site then returns an html page back to your angular app.
<body>
<script>
window.opener.oauthCallback('<?php echo $oauthToken; ?>');
</script>
</body>
Your angular controller (that opened the window) will then be called with the oauth token.
$window.oauthCallback = function(oauthToken)
{
oauthWindow.close();
oauthWindow = null;
authManager.oauthToken = oauthToken;
self.oauthSubmit();
};
Easy right? Well not really but it works. In my case I turn right around and:
POST /auth/tokens/oauthToken
to get the real application token. That way my oauth service can be used for multiple applications.
| 22,097 | |
https://oc.wikipedia.org/wiki/Plasnes | Wikipedia | Open Web | CC-By-SA | 2,023 | Plasnes | https://oc.wikipedia.org/w/index.php?title=Plasnes&action=history | Occitan | Spoken | 413 | 763 | Plasnes en normand (Plasnes en francés) es una comuna normanda, situada dins lo departament d'Eure e la region de la Nauta Normandia.
Geografia
Plasnes Es una municipalitat situada en lo departament de l'Eure (region d'Anautita-Normandie). Lo vilatge de Plasnes aperten al costat de Bernay-Oèst e al arrondissement de Bernay. Los abitants de Plasnes se trucan los Plasnais e èran al nombre de 610 al recensement de 2007. La superficie es de 16,2 km². Plasnes Pòrta lo còdi Insee 27463 e a associat al còdi postal 27300. Se situa géographiquement a una altitud de 157 mètres aperaquí.
Plasnes est une commune située dans le département de l'Eure (région de Haute-Normandie). Le village de Plasnes appartient au canton de Bernay-Ouest et à l'arrondissement de Bernay. Les habitants de Plasnes s'appellent les Plasnais et étaient au nombre de 610 au recensement de 2007. La superficie est de 16,2 km². Plasnes porte le code Insee 27463 et est associée au code postal 27300. Elle se situe géographiquement à une altitude de 157 mètres environ.
Comunas vesinas
Istòria
Lo nom del pòble, Plasnes, es issu d'una anciana forma Del nom del plàtan, arbre de la rèsta fòrta escassa en la Normandie medievala, lo nom modèrn plàtan es un emprunt savi del al latin. Las rèstas d'una anciana via romaine trucada "La polida via" an #èsser descobèrts. Venguda pel continuament la rota nacionala 13, pòrta de París a Cherbourg. Uèi, per rasons politicas e financièras, se nomena (près de Plasnes) la rota départementale 613.
Banc de la batalha dintre Vauquelin de Ferrières e Hugues de Montfort l'an 1035 e ont totes dos aguèron aucit.
Lo marques de Prega i #far bastir al començament 18ème lo "Pichon Abitatge".
Le nom du village, Plasnes, est issu d'une ancienne forme du nom du platane, arbre du reste fort rare dans la Normandie médiévale, le nom moderne platane est un emprunt savant du au latin. Les restes d'une ancienne voie romaine appelée "La belle voie" ont été décelés. Devenue par la suite la route nationale 13, elle mène de Paris à Cherbourg. Aujourd'hui, pour des raisons politiques et financières, elle se nomme (à proximité de Plasnes) la route départementale 613.
Siège de la bataille entre Vauquelin de Ferrières et Hugues de Montfort en 1035 et où tous deux furent tués.
Le marquis de Prie y fit construire au début 18ème le "Petit Logis".
Administracion
Demografia
Luòcs e monuments
Personalitats ligadas amb la comuna
Véser tanben
Ligams extèrnes
Nòtas
Comuna de Normandia
Comuna d'Eure | 591 |
https://stackoverflow.com/questions/15602654 | StackExchange | Open Web | CC-By-SA | 2,013 | Stack Exchange | Gary Russell, ginz, https://stackoverflow.com/users/1240763, https://stackoverflow.com/users/2204989 | English | Spoken | 419 | 603 | Spring 3.1 - DefaultMessageListenerContainer - How to identify errors in ErrorHandler
Info :: I have a DefaultMessageListener implementation with XA transaction. I have used a MessageListener implementation.
Scenario::
My XA transaction is between a DB and a JMS Q Publish. In case of a "data error" in either of them, I need to "move" the source message to a different Q and continue processing rest of the messages.
Problem::
Now, if my DB transaction fails with a DataIntegrity error (primary key violation) then, the XA transaction rolls back at the Container (and not in the MessageListener implementation). So the original message rolls back to the Q, and the message listener gets stuck with this message indefinitely -receiving and failing processing.
How can I check for some exceptions - and handle them differently in the container so that I can continue with the rest of the messages.
ginz
Well, that's the point of an XA transaction - either everything commits or nothing does.
If you want the database transaction to not have any bearing on the Jms transaction, you need
@Transactional(propagation=Propagation.REQUIRES_NEW)
on some method upstream of the listener. Catch and handle the exception in the listener and the JMS transaction will commit.
In this scenario (unless there are other resources involved), you really don't need XA - but you do need to handle the (small) possibility of duplicate messages - if the DB transaction commits and the JMS transaction does not, for some reason.
See http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html
Thanks Gary. But my question is a bit different. I am happy with the "atomicity" of my XA transaction i.e. both (JMS and DB) actions should either happen or not happen. The question is actually - how to differentiate different exceptions and act accordingly - for e.g. I need to perform different actions for DataIntegrity exceptions - and a different one for DB Resource not available aka transient exceptions. As the errors are only raised / captured in the (DefaultMessageListener)Container - I seem to not have control on the exceptions to take different actions. How do I achieve this ?
Well, you can set the 'norollbackFor' attribute on @Transactional and throw that exception, but you must understand that any DB updates that were successful before the key violation will be committed. A safer solution might be to store a 'bad message' marker (in a new transaction) for the message; then, on delivery, check the JMSRedelivered flag and see if this message is marked as bad in the DB before trying to process it again.
| 39,872 |
https://math.stackexchange.com/questions/4103881 | StackExchange | Open Web | CC-By-SA | 2,021 | Stack Exchange | angryavian, https://math.stackexchange.com/users/43949, https://math.stackexchange.com/users/622547, jmars | English | Spoken | 805 | 1,310 | Hypothesis Testing for Exponential Distribution Mean
I'm having some trouble answering the following question:
Suppose that the lifetime of batteries produced using certain materials is exponentially
distributed with parameter $\lambda$ (density function $f(x) = \lambda e^{− \lambda x}$ and that the average lifetime
of batteries has always been $3$ hours. A manufacturer claims that the average lifetime of
batteries will increase if new materials are used. However, it is expensive to add these
materials in the absence of a significant evidence that indeed the manufacturer’s claim is
true. So, the manufacturer uses new materials for $10$ batteries and calculates the average
lifetime that turns out to be $4.5$ hours
What are the null and alternative hypotheses?
A. $H_0 : \lambda = 3$ vs $H_1 : \lambda > 3$
B. $H_0 : \lambda = 3$ vs $H_1 : \lambda < 3$
C. $H_0 : \lambda = 3$ vs $H_1 : \lambda \neq 3$
D. $H_0 : \lambda = {{1}\over{3}} $ vs $H_1 : \lambda < {{1}\over{3}}$
Is it possible to reject the null hypotheses at the $\alpha = 0.05$ significance
level?
My first thought was that the answer is D since we're dealing with the average lifetime of the batteries, and since the mean of an exponential distribution is $1\over{\lambda}$, the null hypothesis in D makes sense. However, I don't quite understand why I'd be limited to a one-sided alternative hypothesis. The lifetime of the batteries not being equal to three doesn't really lend evidence in either direction.
It's one-sided because the manufacturer wants to show that the new average lifetime is more than 3 hours. A two-sided test would be appropriate if one was interested in whether the new average lifetime is different than 3 hours.
I guess that's why I'm confused that the alternative hypothesis is $\lambda < {1\over{3}}$ rather than $\lambda > {1\over{3}}$. If the latter is what we're trying to establish, why wouldn't that be the alternative hypothesis.
Oh wow, seems I forgot how fractions work. Sorry, thank you
Any clue as to the possibility of rejection the null hypothesis a 0.05 significance?
One hypothesis is that the new batteries will last longer, not just differently. We are looking for a change in a specific direction. If the new batteries are worse than the old ones, there would be no reason to switch. The only reason to switch will be if the new batteries are an improvement. So this is a one-tailed test.
If the default mean is $3 = 1/\lambda$, then $\lambda = 1/3$ is the null hypothesis. If the mean is greater than $3$, then $1/\lambda > 3$ so $\lambda < 1/3$, and that is the alternative hypothesis.
As for deciding about the hypothesis based on the data:
$n = 10, \alpha = 0.05$ and $\bar x = 4.5$, and the distribution is exponential, not normal. However we are taking a sampling distribution, which would eventually converge to a normal distribution regardless of the original distribution for individual values. Since we only have $10$ data, we cannot use a $z$ test and would need a $t$ test.
For an exponential distribution, $1/\lambda^2 = \sigma^2$ so the standard deviation can be estimated as $1/\lambda = 3$ for the null hypothesis. A sample of size $10$ would have a standard error of roughly $3/\sqrt{10}$. The t-score for this particular sample would be $$\frac{\bar x - \mu}{\sigma/\sqrt{n}} = \frac{(4.5-3)}{3/\sqrt{10}} = 1.58$$ and the critical statistic $t_{critical} = 1.833$ based on an upper tail area of $0.05$, $n-1 = 9$ degrees of freedom, and consulting a table of values for the student-t distribution. Since the test statistic is below the critical value, we do not have enough evidence to reject the null hypothesis.
Just for fun and to compare, we can calculate a more exact answer. It turns out that the sum of $n$ independent exponential random variables is a gamma random variable with parameters $n$ and $\lambda$. This distribution is known to have a mean of $n/\lambda$ and a variance of $n/\lambda^2$. To get an average of exponentials, we divide by $n$ to find $1/\lambda$ is still the mean for the sample mean. The variance can be found by dividing the variance by $n^2$, giving $1/(n\lambda^2)$. With the values in the problem, this variance is $9/10$ and the standard deviation is $0.94868$, exactly the same as in the normal approximation.
Now the probability of getting a value at least as extreme as the sample mean by chance if the null hypothesis is true is the $p$-value. To find this, consider that if $\bar x = 4.5$ then $\Sigma x_i = 45$, and we could integrate the gamma density function:
$$\int_{45}^{\infty} \frac{\lambda^n}{\Gamma(n)} x^{n-1}\cdot e^{-\lambda x} dx$$ or $$\int_{45}^{\infty} \frac{(\frac{1}{3})^{10}}{9!} x^{9}\cdot e^{-x/3} dx$$ which when solved gives a $p$-value greater than $0.05$, again leading to the conclusion that we do not reject the null hypothesis.
| 46,575 |
https://wuu.wikipedia.org/wiki/%E6%88%98%E7%A5%9E%EF%BC%882018%E5%B9%B4%E6%B8%B8%E6%88%8F%EF%BC%89 | Wikipedia | Open Web | CC-By-SA | 2,023 | 战神(2018年游戏) | https://wuu.wikipedia.org/w/index.php?title=战神(2018年游戏)&action=history | Wu Chinese | Spoken | 5 | 111 | 《战神》(英语:God of War)是圣塔莫尼卡工作室开发并由索尼互动娱乐发行到PlayStation 4平台上个动作冒险游戏,同时也是继《战神:升天》后个系列第八部作品搭子2010年《战神III》个续作。
2018年电子游戏 | 4,544 |
https://pl.wikipedia.org/wiki/VEU%20Feldkirch | Wikipedia | Open Web | CC-By-SA | 2,023 | VEU Feldkirch | https://pl.wikipedia.org/w/index.php?title=VEU Feldkirch&action=history | Polish | Spoken | 151 | 428 | VEU Feldkirch – austriacki klub hokeja na lodzie z siedzibą w Feldkirch.
Historia
EHC Feldkirch (1932–1935)
WSV Feldkirch (1935–1941)
EHC Feldkirch (1945–1974)
Vorarlberger Eishockey Union Feldkirch (1974–2000)
EC Supergau Feldkirch (2000–2004)
EHC Feldkirch 2000 (2000–2006)
Verein Eishockey Union Feldkirch (2006–2019)
Vorarlberger Eishockey Union Feldkirch (2019–)
Trenerami w klubie byli Bengt-Åke Gustafsson, Tom Coolen, Nik Zupančič, Joni Puurula.
W 2012 klub został przyjęty do rozgrywek Inter-National-League, a po ich zaprzestaniu w 2016 włączony do Alps Hockey League.
Sukcesy
Złoty medal mistrzostw Austrii: 1982, 1983, 1984, 1990, 1994, 1995, 1996, 1997, 1998
Srebrny medal mistrzostw Austrii: 1970, 1986
Złoty medal Nationalligi: 1967, 2002, 2007, 2011
Złoty medal Alpenligi: 1996, 1997, 1998, 1999
Srebrny medal Inter-National-League: 2015
Mistrzostwo austriackiej drugiej klasy rozgrywkowej w ramach Alps Hockey League: 2017, 2018
Puchar Austrii: 2015
Mistrzostwo Europejskiej Hokejowej Ligi: 1998
Superpuchar IIHF: 1998
Zawodnicy
Przypisy
Linki zewnętrzne
Oficjalna strona klubu
Feldkirch
Feldkirch
Kluby hokejowe założone w 1932 | 22,692 |
https://fr.wikipedia.org/wiki/Liste%20des%20ministres%20belges%20des%20Affaires%20%C3%A9trang%C3%A8res | Wikipedia | Open Web | CC-By-SA | 2,023 | Liste des ministres belges des Affaires étrangères | https://fr.wikipedia.org/w/index.php?title=Liste des ministres belges des Affaires étrangères&action=history | French | Spoken | 66 | 104 | Cette page donne la liste des anciens ministres belges chargés des affaires étrangères ; le nom exact de la fonction peut varier à chaque nomination.
La ministre actuelle est Hadja Lahbib, avec le titre de ministre des Affaires étrangères, des Affaires européennes, du Commerce extérieur et des Institutions biculturelles.
Liste des ministres belges des Affaires étrangères (depuis 1831)
Frises chronologiques
Notes et références
Affaires étrangères
Belgique | 4,978 |
https://arz.wikipedia.org/wiki/%D8%AA%D9%88%D9%85%D8%A7%D8%B3%20%D9%88%D9%84%D8%AA%D9%8A%D8%B1 | Wikipedia | Open Web | CC-By-SA | 2,023 | توماس ولتير | https://arz.wikipedia.org/w/index.php?title=توماس ولتير&action=history | Egyptian Arabic | Spoken | 46 | 128 | توماس ولتير لاعب كورة قدم من المانيا.
حياته
توماس ولتير من مواليد يوم 4 اكتوبر 1963 فى هامبورج.
الحياه الرياضيه
بيلعب فى مركز مُدَافِع, و لعب مع فريق منتخب المانيا لكره القدم و فيردر بريمن.
لينكات برانيه
مصادر
لاعبين كوره القدم
لاعبين كوره قدم من المانيا | 18,955 |
https://ba.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BB%D0%BE%D0%BF%D0%BE%D0%B2%D0%BA%D0%B0 | Wikipedia | Open Web | CC-By-SA | 2,023 | Колоповка | https://ba.wikipedia.org/w/index.php?title=Колоповка&action=history | Bashkir | Spoken | 135 | 583 | Колоповка — Рәсәйҙәге йылға. Мәскәү өлкәһе биләмәләрендә аға. Йылға Искона йылғаһының уң ярына тамағынан 56 км өҫтәрәк ҡушыла. Йылға оҙонлоғо 10 км.
Һыу реестры мәғлүмәттәре
Рәсәй дәүләт һыу реестры мәғлүмәте буйынса йылға Ока һыу бассейны округында урынлашҡан, һыу хужалығы участкаһы — Мәскәү йылғаһы Можайск һыуһаҡлағысынан Звенигород ҡалаһына тиклем, Руза (башынан Руза һыуһаҡлағысына тиклем) һәм Озерна (башынан Озернинск һыуһаҡлағысына тиклем) индермәйенсә. Бәләкәй йылға бассейны (йылға эске бассейны) — Ока ҡушылдыҡтары бассейны, Мокша тамағына тиклем, йылға бассейны — Ока.
Һыу ресурстарының федераль агентлығы тарафынан әҙерләнгән Рәсәй Федерацияһы территорияһын һыу хужалығы буйынса районлау геоинформация системаһы мәғлүмәттәре буйынса:
Дәүләт һыу реестрында һыу объектының коды — 09010101312110000023155
Гидрологик өйрәнеү (ГӨ) буйынса коды — 110002315
Бассейн коды — 09.01.01.013
ГӨ буйынса томы — 10
ГӨ буйынса сығарылыш — 0
Иҫкәрмәләр
Һылтанмалар
Рәсәй Федерацияһы тәбиғәт ресурстары һәм экология министрлығы
Мәскәү өлкәһе йылғалары | 26,664 |
https://stackoverflow.com/questions/60611048 | StackExchange | Open Web | CC-By-SA | 2,020 | Stack Exchange | English | Spoken | 135 | 287 | Installing pygraphviz in Windows10 64 bit
I've installed pygraphviz using
conda install -c alubbock pygraphviz
But there was a problem since neato was missing, so I uninstalled the above and did the following.
From the suggestions given here I downloaded graphviz msi and installed in C:\Program Files (x86)\Graphviz2.38 and also installed.
Could someone suggest how to proceed from here?
import pygraphviz as pgv
doesn't work.
So I tried,
pip install pygraphviz
this returns
pygraphviz/graphviz_wrap.c(2987): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
I'm not sure how to install pygraphviz now.
| 44,640 | |
https://politics.stackexchange.com/questions/38211 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | NoDataDumpNoContribution, Reasonably Against Genocide, WS2, https://politics.stackexchange.com/users/3169, https://politics.stackexchange.com/users/6203, https://politics.stackexchange.com/users/6837, https://politics.stackexchange.com/users/7424, https://politics.stackexchange.com/users/8199, https://politics.stackexchange.com/users/8959, indigochild, o.m., origimbo | English | Spoken | 988 | 1,251 | How does a minority motion in the House of Commons take priority over Government business?
It is being reported in the press today that "rebels" opposed to Brexit "have drawn up an amendment that would allow a motion backed by a minority of 300 MPs to take precedence over government business". "This", they say, "would allow backbench MPs to propose plans blocking a no-deal Brexit". (Defiant John Bercow 'set to stay as speaker' by Toby Helms and Michael Savage; Observer 20/1/19).
It is reported slightly differently in the Sunday Times, in a way which leads me to think that a minority of 300 MPs could actually have a vote carried if those MPs belonged to five different parties.
Is it the case that 300 MPs from five parties can simply exercise a right to precedence so far as the Order Paper is concerned (per The Observer)? Or can a vote be carried by a minority of 300 as Tim Shipman in today's Sunday Times seems to be suggesting?
Shipman says in reference to "a group of more than 20 plotters, led by Grieve" that "their plan would need the support of 300 MPs - not even a majority - as long as they came from five different parties. Only 10 Tories would have to approve, making it all but impossible for May's team to thwart the plot". –
Personally I have never before heard of a minority being able to prevail over a majority in the House of Commons in any circumstances.
What would the UK Parliament be if they no only voted on motions of the Government and but also on motions of their own? Probably a lot more powerful.
@Trilarion I agree with you, and support the idea of parliament being in control. However there are those who say the will of the people was expressed in a referendum in June 2016. And it is the duty of parliament to "honour" that vote by taking us out of the EU.
Of course you could say that, but that's not how the democracy in Britain works. Formally, the referendum result was non binding asking a very general question and MPs in Parliament which are also elected are free to vote the way they want. The duty of the Parliament is to do what the rules say what they should do which is doing the best for Britain. Maybe there should be binding referendums like in Switzerland, but that is another issue, I think.
@Trilarion For the record I entirely agree with you. One thing that Aristotle, Plato, Edmund Burke and Margaret Thatcher all agreed about is that you cannot run a country by referendum. I am not one who regards the result of the 2016 vote as valid for all time. However, simply as a matter of practical politics, as well as of fairness I think any government must take account that the UK population is divided roughly 50-50 on the matter. Hence I believe that any deal entered into must reflect this fact and represent a compromise.
The proposal, as reported by the BBC, is to allow backbench MPs to control one day of Parliamentary business a week. This would, of course, require a change to the rules of the House of Commons to be approved by a majority of MPs.
My understanding is that this rule change, if approved, would set a threshold of 300 MPs to put an item on the order paper on that day. Any motions put on the order paper in this way would, of course, require a majority of MPs to pass.
Ah! In that case Tim Shipman in The Sunday Times seems completely to have misunderstood the position. He says, in reference to "a group of more than 20 plotters, led by Grieve" that "their plan would need the support of 300 MPs - not even a majority - as long as they came from five different parties. Only 10 Tories would have to approve, making it all but impossible for May's team to thwart the plot".
@WS2 In this case, thwarting the plot would be preventing the vote. There are strong indications that most MPs dislike the option of no-deal, although things are much less clear as to what (if anything) parliament does support. This isn't exclusively MPs opposed to Brexit, but also those opposed to that flavour of Brexit.
A good democracy respects minority rights.
Part of that is to give the minority a chance to get their issues debated and voted on in parliament, even if they do not have the votes to get it passed. This gives the minority a part in setting the public agenda, and a chance to put every legislator on the spot, voting for or against.
There are many different ways to make this possible. One is a question time, where any issue may be asked even if it isn't voted. Another is to let the opposition form investigative subcommittees. Or the parliament is allowed to set their own agenda in some fair allocation of speaking time.
While it sounds reasonable to give "government business" time in parliament, it isn't reasonable to give it all the time.
I suspect this is downvoted because it doesn't really answer the question.
@immibis, but why is it no answer? The question was why a minority motion could be scheduled before a government motion, and I pointed out that it is entirely reasonable to change the rules so that a minority motion will be heard sometime soon.
Based on the upvoted answer, it seems like a more concrete answer is what people are looking for. "They can do this because of this proposal" rather than "they can do this because a good democracy would do it"
As one of the downvoters, I can say that my reasoning was that the question asks "how" and this answers a more philosophic "why". It's mismatched to the question.
| 28,184 |
https://ro.wikipedia.org/wiki/Anopheles%20nimbus | Wikipedia | Open Web | CC-By-SA | 2,023 | Anopheles nimbus | https://ro.wikipedia.org/w/index.php?title=Anopheles nimbus&action=history | Romanian | Spoken | 31 | 71 | Anopheles nimbus este o specie de țânțari din genul Anopheles, descrisă de Theobald în anul 1902. Conform Catalogue of Life specia Anopheles nimbus nu are subspecii cunoscute.
Referințe
Legături externe
Anopheles | 4,840 |
https://bioinformatics.stackexchange.com/questions/11284 | StackExchange | Open Web | CC-By-SA | 2,020 | Stack Exchange | Bryan Krause, David, canadianer, https://bioinformatics.stackexchange.com/users/1255, https://bioinformatics.stackexchange.com/users/4253, https://bioinformatics.stackexchange.com/users/4933, https://bioinformatics.stackexchange.com/users/7057, user2182857 | English | Spoken | 368 | 571 | How to generate conformations for a ligand for in silico screening?
I have multiple ligands (in pdb format) which I want to try and dock to various proteins.
But for each ligand I have only a single conformation (by which I meant the spatial relationship between it's atoms, not its position relative to the target protein).
How do I generate other possible conformations?
Is there a generally used tool for that?
Still not clear what you mean by “pose”. You need to use standard scientific English on this site. Do you mean structure? If not it shouldn’t be difficult to find a scientific paper that uses the correct term.
Thanks.
I see that these are properly referred to as conformations.
Ok. I assume that your ligands are peptides or proteins that can adopt different conformations. There may be software for doing this, but it will be quite sophisticated. Good luck.
I'm going to migrate this because it's a better fit for Bioinformatics since it's about tools rather than the underlying biology, and I think you're more likely to get a good answer there. I'm only loosely aware of their policies there so you may need to make edits.
@David "Pose" is standard scientific English for macromolecular docking.
@canadianer — I stand corrected, although wonder how many on this list are familiar with the term.
One option I found was Frog2
https://mobyle.rpbs.univ-paris-diderot.fr/cgi-bin/portal.py#forms::Frog2
https://github.com/tuffery/Frog2
From an input of a mol2 or sdf file it creates a plethora of conformers, which can be outputted as a pdb file
Open babel
The most commonly used tool is open-babel (obabel). It seems annoying that you have to specify the number of conformers, but this is because if you get something like retinol, the number of conformers is huge. The command from the documentation is:
obabel startingConformer.mol -O ga_conformers.sdf --conformer --nconf 30
--score rmsd --writeconformers
An alternative argument is --confab which will pick each representative of a RMSD cutoff cluster.
Do note that 2D representations and un-protonated molecules will need extra command line arguments.
RDKit
You can also generate conformers in RDkit, but I think this is beyond your requirements, but I thought it may be good to mention the essential compchem python library.
| 20,958 |
https://nl.wikipedia.org/wiki/Kanton%20Ris-Orangis | Wikipedia | Open Web | CC-By-SA | 2,023 | Kanton Ris-Orangis | https://nl.wikipedia.org/w/index.php?title=Kanton Ris-Orangis&action=history | Dutch | Spoken | 78 | 181 | Kanton Ris-Orangis is een kanton van het Franse departement Essonne. Kanton Ris-Orangis maakt deel uit van de arrondissementen Évry (5) en Palaiseau (1). Het heeft een oppervlakte van 52,32 km² en telt 62.462 inwoners in 2018.
Gemeenten
Het kanton Ris-Orangis omvatte tot 2014 enkel de gemeente Ris-Orangis.
Door de herindeling van de kantons bij decreet van 24 februari 2014, met uitwerking op 22 maart 2015 werden daar de gemeenten:
Bondoufle
Fleury-Mérogis
Le Plessis-Pâté
Vert-le-Grand
Vert-le-Petit
aan toegevoegd.
Ris-Orangis | 42,737 |
https://ru.wikipedia.org/wiki/%D0%92%D0%B5%D0%BB%D0%B8%D0%BA%D0%B0%D1%8F%20%D0%93%D0%BE%D1%80%D1%8F%D0%BD%D0%BA%D0%B0 | Wikipedia | Open Web | CC-By-SA | 2,023 | Великая Горянка | https://ru.wikipedia.org/w/index.php?title=Великая Горянка&action=history | Russian | Spoken | 87 | 267 | Великая Горянка () — село, Великогорянский сельский совет, Кременецкий район, Тернопольская область, Украина.
Код КОАТУУ — 6123481501. Население по переписи 2001 года составляло 454 человека.
Является административным центром Великогорянского сельского совета, в который, кроме того, входят сёла Волица и Малая Горянка.
Географическое положение
Село Великая Горянка находится на берегу реки Горынь. Выше по течению примыкает село Волица, ниже по течению примыкает село Малая Горянка. Рядом проходит автомобильная дорога .
История
1867 год — дата основания.
Объекты социальной сферы
Школа I—II ст.
Достопримечательности
Братская могила советских воинов.
Примечания | 42,238 |
https://fr.wikipedia.org/wiki/Conf%C3%A9d%C3%A9ration%20des%20travailleurs%20Rerum%20Novarum | Wikipedia | Open Web | CC-By-SA | 2,023 | Confédération des travailleurs Rerum Novarum | https://fr.wikipedia.org/w/index.php?title=Confédération des travailleurs Rerum Novarum&action=history | French | Spoken | 75 | 130 | La Confederación de Trabajadores Rerum Novarum (CTRN - Confédération des travailleurs Rerum Novarum) est une confédération syndicale du Costa Rica formée en 1991 par la fusion de trois autres organisations. Elle est affiliée à la CSI et à la CSA.
Voir aussi
Articles connexes
Movimiento solidarista costarricense, syndicat jaune et adversaire de la CTRN
Liens externes
Syndicat au Costa Rica
Confédération syndicale internationale
Confédération syndicale des travailleurs et travailleuses des Amériques
Syndicat fondé en 1991 | 32,897 |
https://zh-classical.wikipedia.org/wiki/%E5%9C%9F%E5%B2%90%E5%B8%82 | Wikipedia | Open Web | CC-By-SA | 2,023 | 土岐市 | https://zh-classical.wikipedia.org/w/index.php?title=土岐市&action=history | Classical Chinese | Spoken | 9 | 161 | 土岐市屬日本岐阜縣。
沿革
昭和卅年,土岐郡:駄知町、土岐津町、下石町、妻木町、泉町、肥田村、鶴里村、曾木村合而成。
地理
東靠瑞浪市,南臨愛知縣豐田市、同瀨戶市,西伴多治見市、可兒市,北接可兒郡御嵩町。
據
它典
土岐市政府
中部地方區劃 | 17,183 |
https://en.wikipedia.org/wiki/Dapeng%20New%20District | Wikipedia | Open Web | CC-By-SA | 2,023 | Dapeng New District | https://en.wikipedia.org/w/index.php?title=Dapeng New District&action=history | English | Spoken | 320 | 677 | Dapeng New District () is an administrative area under the jurisdiction of Longgang District in Shenzhen, Guangdong. It has a land area of , a coastline of and a total population of about 180,000. The district was created on 30December 2011 with its administration center located on 5 Dapeng Street, Zhongshan Road.
Administrative divisions
The jurisdiction of Dapeng New District includes all of the Dapeng Peninsula, formerly divided into the three subdistricts of Dapeng, Kuichong and Nan'ao, with a total of 25 neighborhoods.
Travel
Dapeng New District's coastline features beaches, islands, reefs, sea cliffs, caves, bridges, columns and other maritime landforms. It has been proclaimed the most beautiful coastal scenery in Guangdong, and is known as the Pearl of Shenzhen and Oriental Hawaii. The Nan'ao coastal area is popular with tourists as well as local fishermen while the two islands of Sanmen and Laishi consist of aboriginal scenery. Local scenic attraction Xichong is also located in the district being noted for its undeveloped beach.
Produce
Dapeng is rich in fresh seafood, especially in Dapeng Bay known for its all year round availability of seafood.
Education
Secondary schools ("middle schools"):
Dapeng Overseas Chinese Middle School (大鹏华侨中学) in Dapeng Subdistrict
Kuichong Middle School (葵涌中学) in Kuichong Subdistrict
Nan'ao Middle School (南澳中学) in Nan'ao Subdistrict,
Shenzhen School (High School) Affiliated to Renmin University of China (人大附中深圳学校) in Kuichong Subdistrict
Nine-year schools (elementary and junior high schools):
Shenzhen Yadi School (亚迪学校) in Kuichong Town
Buxin School (布新学校) in Dapeng Sub-district
Xingyu School (星宇学校) in Gaoyuan Community, Kuichong Subdistrict
Shenzhen School Affiliated to Renmin University of China (人大附中深圳学校), Kuichong Subdistrict
Primary schools:
Shenzhen Dapeng Central Primary School (深圳市大鹏新区大鹏中心小学) - Dapeng Subdistrict
Shenzhen Dapeng No. 2 Primary School (深圳市大鹏新区大鹏第二小学) - Dapeng
Kuichong Central Primary School (葵涌中心小学) - Kuichong
Kuichong No. 2 Primary School (葵涌第二小学) - Kuichong Subdistrict
Xichong Primary School (溪涌小学) - Kuichong Subdistrict
Nan'ao Central Primary School (南澳中心小学) - Nan'ao Subdistrict
References
Districts of Shenzhen | 49,070 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.