qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
La onomatopeya japonesa シーン ("shiin") se usa mucho en el ámbito del cómic para expresar el silencio absoluto, y suele ir acompañada de algún dibujo descriptivo de la escena a representar. Tener una onomatopeya para el silencio no deja de ser contradictorio, pero si lo pensamos la onomatopeya del silencio no es más que ...
Se pueden usar onomatopeyas (que no dejan de ser sonidos) para clarificar acciones que no tienen sonido, y que de otra manera no podrían comunicarse de forma verbal (o incluso escrita, si quieres representar el hecho sin explicarlo en sí mismo, como en una viñeta de cómic). Por ejemplo, una bombilla hace ruido al ence...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
La onomatopeya japonesa シーン ("shiin") se usa mucho en el ámbito del cómic para expresar el silencio absoluto, y suele ir acompañada de algún dibujo descriptivo de la escena a representar. Tener una onomatopeya para el silencio no deja de ser contradictorio, pero si lo pensamos la onomatopeya del silencio no es más que ...
These words (including onomatopeia) make up a class of words known as *ideophones* (["ideófonos"](https://books.google.co.uk/books?id=RI1dAAAAMAAJ&pg=PA4036&lpg=PA4036&dq=ide%C3%B3fono)). Indo-European languages in general (including Spanish) are notably pauce in such words.1 However, the following paper seems to class...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
La onomatopeya japonesa シーン ("shiin") se usa mucho en el ámbito del cómic para expresar el silencio absoluto, y suele ir acompañada de algún dibujo descriptivo de la escena a representar. Tener una onomatopeya para el silencio no deja de ser contradictorio, pero si lo pensamos la onomatopeya del silencio no es más que ...
Se ocurren éstas Titilar - Definitivamente no implica sonido porque se refiere a un cuerpo luminoso. Tiritar - Se puede hacer sonido al tiritar pero no es indispensable. Bamboleo - Indica movimiento. Tris - Como se explica en [esta respuesta](https://spanish.stackexchange.com/a/30641/12572), aunque se basa en un so...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
Se pueden usar onomatopeyas (que no dejan de ser sonidos) para clarificar acciones que no tienen sonido, y que de otra manera no podrían comunicarse de forma verbal (o incluso escrita, si quieres representar el hecho sin explicarlo en sí mismo, como en una viñeta de cómic). Por ejemplo, una bombilla hace ruido al ence...
Se ocurren éstas Titilar - Definitivamente no implica sonido porque se refiere a un cuerpo luminoso. Tiritar - Se puede hacer sonido al tiritar pero no es indispensable. Bamboleo - Indica movimiento. Tris - Como se explica en [esta respuesta](https://spanish.stackexchange.com/a/30641/12572), aunque se basa en un so...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
No creo que existan las onomatopeyas para acciones sin sonido, después de todo, es la onomatopeya la representación de una acción a través de su sonido. Y si existiera una del silencio, serían los puntos suspensivos (...), que nos indican que es un silencio intencional y no incidental, muy comúnmente utilizado para i...
These words (including onomatopeia) make up a class of words known as *ideophones* (["ideófonos"](https://books.google.co.uk/books?id=RI1dAAAAMAAJ&pg=PA4036&lpg=PA4036&dq=ide%C3%B3fono)). Indo-European languages in general (including Spanish) are notably pauce in such words.1 However, the following paper seems to class...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
No creo que existan las onomatopeyas para acciones sin sonido, después de todo, es la onomatopeya la representación de una acción a través de su sonido. Y si existiera una del silencio, serían los puntos suspensivos (...), que nos indican que es un silencio intencional y no incidental, muy comúnmente utilizado para i...
Se ocurren éstas Titilar - Definitivamente no implica sonido porque se refiere a un cuerpo luminoso. Tiritar - Se puede hacer sonido al tiritar pero no es indispensable. Bamboleo - Indica movimiento. Tris - Como se explica en [esta respuesta](https://spanish.stackexchange.com/a/30641/12572), aunque se basa en un so...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
Se pueden usar onomatopeyas (que no dejan de ser sonidos) para clarificar acciones que no tienen sonido, y que de otra manera no podrían comunicarse de forma verbal (o incluso escrita, si quieres representar el hecho sin explicarlo en sí mismo, como en una viñeta de cómic). Por ejemplo, una bombilla hace ruido al ence...
These words (including onomatopeia) make up a class of words known as *ideophones* (["ideófonos"](https://books.google.co.uk/books?id=RI1dAAAAMAAJ&pg=PA4036&lpg=PA4036&dq=ide%C3%B3fono)). Indo-European languages in general (including Spanish) are notably pauce in such words.1 However, the following paper seems to class...
30,315
Según una definición, en español "la onomatopeya es una imitación lingüística de una palabra que se asemeja con el sonido que representa", por eso el encomillado en el título. Pero, hay otra definición que dice: > > Onomatopeya es una palabra que proviene del latín tardío onomatopoeia, aunque su origen se remonta a...
2019/05/01
[ "https://spanish.stackexchange.com/questions/30315", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/13101/" ]
La onomatopeya japonesa シーン ("shiin") se usa mucho en el ámbito del cómic para expresar el silencio absoluto, y suele ir acompañada de algún dibujo descriptivo de la escena a representar. Tener una onomatopeya para el silencio no deja de ser contradictorio, pero si lo pensamos la onomatopeya del silencio no es más que ...
No creo que existan las onomatopeyas para acciones sin sonido, después de todo, es la onomatopeya la representación de una acción a través de su sonido. Y si existiera una del silencio, serían los puntos suspensivos (...), que nos indican que es un silencio intencional y no incidental, muy comúnmente utilizado para i...
1,561,090
I'm looking for an executable file that I can run, leave open however long I would like, then close at will. Does such a program exist? I looked at the great answers provided on this question: [Is there a Windows exe that does nothing?](https://superuser.com/questions/381103/is-there-a-windows-exe-that-does-nothing). T...
2020/06/16
[ "https://superuser.com/questions/1561090", "https://superuser.com", "https://superuser.com/users/789128/" ]
If you actually want to make a program to do this, it is *super* easy. Just download and install [Visual Studio Express](https://visualstudio.microsoft.com/vs/express/). Create a Windows Form application and click build. Thats it. Alternatively, you can write a VBScript script with the following code in Notepad or the...
You can use a temporary batch file for doing this: ``` @echo off :: If you want the batch file Ctrl C resistant, than add /NoBreak switch at next line before >nul timeout /t %1 >nul exit /b 0 ``` Save it as wait.bat and Now you can call it like: ``` start wait.bat number_of_seconds ```
16,789
I've been reading these: * [Fast Reduction from RSA to SAT](https://cstheory.stackexchange.com/questions/6755/fast-reduction-from-rsa-to-sat) * [CNF Generator for Factoring Problems](http://cgi.cs.indiana.edu/~sabry/cnf.html) (Also have C code implementation) I don't understand how the reduction from [FACT](https://e...
2013/11/07
[ "https://cs.stackexchange.com/questions/16789", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/10572/" ]
> > I don't understand how the reduction from FACT to 3-SAT works. Are there any simple articles in which I can read about it? > > > Most of the reading material assumes several steps of knowledge. * First, you should read about how logic circuits (logic gates) work. * Optionally learn or use a simple multiplicat...
there are several ways to conceptualize this, esp using the psychological concept of [chunking](http://en.wikipedia.org/wiki/Chunking_%28psychology%29) which is rougly equivalent to the use of ["abstraction(s)"](http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29) in CS. what part is hard to understand? the...
17,260,878
I have a variable is named: `myvariable` that has some elements (id, name, etc) in my controller, I calculate some elements of this variable and return it: `return View(myvariable)`. I have another function in my controller: ``` public void drawnFromDb(id) { myclass myvariable; if (id == "1") { myvar...
2013/06/23
[ "https://Stackoverflow.com/questions/17260878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1254996/" ]
Just return a JsonResult from the controller action, not void: ``` public ActionResult drawnFromDb(id) { myclass myvariable; if (id == "1") { myvariable.text = "hello"; } else { myvariable.text = "world"; } return Json(myvariable); } ``` and in your success callback you can a...
Return myVariable from the controller as a json: ``` var javaScriptSerializer = new JavaScriptSerializer(); var jsonObject = javaScriptSerializer.Serialize(myVariable); return jsonObject; ``` Now, you could use it in the ajax function: ``` function mydrawnFromDb(id) { $.ajax({ type: ...
67,803,569
I've got a macro which successfully takes a table with 44 columns and reduces it down to to 12. It splits the top section (where our supplier has sent no stock and the cell in the total column would show a 0) and sticks it at the top of the worksheet, and it inserts checkboxes (to an extent). I tried really hard to ma...
2021/06/02
[ "https://Stackoverflow.com/questions/67803569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5453261/" ]
the problem is that `readln()` returns the user input *including* the line terminating new-line character (`\n`, `\r\n` or `\r` or potentially even more exotic ones) and the std.conv `to` function throws when it finds unexpected whitespace. You could simply take a slice excluding the last byte, however when the input e...
<https://dlang.org/phobos/std_array.html#.replace> Import `std.string` and use `readln().replace("\n", "");` instead of just `readln()`. That error really isn’t that mysterious.
19,354,815
I am using newrelic to test my project performance.But the result is that springServlet.Service() consums most time in jersey rest service.I do not konw why. What is in springServlet.service(). ``` Slowest components Count Duration % SpringServlet.service() 1 5,300 ms 98% ActivityResource$$EnhancerByCGLIB$$...
2013/10/14
[ "https://Stackoverflow.com/questions/19354815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875376/" ]
You can do this : ( in order to get realy good estimation) ``` var g = JSON.stringify(myBigNestedarray).replace(/[\[\]\,\"]/g,''); //stringify and remove all "stringification" extra data alert(g.length); //this will be your length. ``` For example : have alook at this nested array : `var g=[1,2,3,['a','b',['-','+'...
You can use the [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob "Blob Object") to get the arrays size in bytes when it's converted in to a string. Examples: ```js const myArray = [{test: 1234, foo: false, bar: true}]; console.info(new Blob([JSON.stringify(myArray)]).size); // 38 ```
19,354,815
I am using newrelic to test my project performance.But the result is that springServlet.Service() consums most time in jersey rest service.I do not konw why. What is in springServlet.service(). ``` Slowest components Count Duration % SpringServlet.service() 1 5,300 ms 98% ActivityResource$$EnhancerByCGLIB$$...
2013/10/14
[ "https://Stackoverflow.com/questions/19354815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875376/" ]
First you have to convert the array to the string representation used to transmit the data to the server. The size of the array does not matter since it will be that string that will be transmitted. Depending on the way you serialize that array, the size difference can be very significant. Possible options to serializ...
You can use the [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob "Blob Object") to get the arrays size in bytes when it's converted in to a string. Examples: ```js const myArray = [{test: 1234, foo: false, bar: true}]; console.info(new Blob([JSON.stringify(myArray)]).size); // 38 ```
111,753
That's it. How can I know how many i386, arm64, armhf, ppc64el and amd64 packages exit available in repos?
2012/03/10
[ "https://askubuntu.com/questions/111753", "https://askubuntu.com", "https://askubuntu.com/users/49971/" ]
The easiest method is via Launchpad: * <https://launchpad.net/ubuntu/trusty/i386> * <https://launchpad.net/ubuntu/trusty/amd64> * <https://launchpad.net/ubuntu/trusty/armhf> * <https://launchpad.net/ubuntu/trusty/arm64> * <https://launchpad.net/ubuntu/trusty/ppc64el> You can always replace "trusty" with the release ...
From a bit of poking in `/var/lib/apt/lists`: ``` [jk@pecola ~]$ for f in /var/lib/apt/lists/*binary-*_Packages; do echo -n $(basename "$f")": "; grep '^Package:' "$f" | wc -l ; done apt:9999_ubuntu_dists_precise_main_binary-amd64_Packages: 8204 apt:9999_ubuntu_dists_precise_main_binary-i386_Packages: 8221 apt:9999_u...
407,786
I have * a Mac Mini (2011) with HDMI and Thunderbolt * a laptop with DisplayPort and VGA * a DisplayPort To HDMI Cable I want a setup where I am able to easily switch between Mac and Windows, both with dual monitors. At work I use a DisplayPort to HDMI cable and a VGA cable for dual monitors on my PC. On a side no...
2012/04/02
[ "https://superuser.com/questions/407786", "https://superuser.com", "https://superuser.com/users/18555/" ]
You will need a Dual monitor KVM like [this one](http://www.kvmgalore.com/shopping/product_info.php?products_id=42797). You will then need to normalize the connector types: For [HDMI to DVI](http://rads.stackoverflow.com/amzn/click/B000FUVNX8), for [Thunderbolt to DVI](http://rads.stackoverflow.com/amzn/click/B005UABJ...
You would need some kind of HDMI switch like [THIS](http://rads.stackoverflow.com/amzn/click/B0015YWKYY) in order to be able to connect two or more HDMI inputs, and have them connect to a single HDMI output. Most computer monitors that have VGA and HDMI inputs also have a switch built into them so that if you were to ...
38,909,314
How I can take any given webpage and make everything look tinted a certain color. Basically, if you take google and tint it orange, it should look something like this: [![Example of what correctly tinted webpage would look like](https://i.stack.imgur.com/2drMx.png)](https://i.stack.imgur.com/2drMx.png) The way that I ...
2016/08/12
[ "https://Stackoverflow.com/questions/38909314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3716864/" ]
You need a few more css styles: ``` position: fixed; /* keeps the screen covered durning scroll */ z-index: 100000; /* puts it on top of everything */ top: 0; left: 0; opacity: .3; /* so we can see through it */ pointer-events: none; /* so we can click through it */ ``` [![enter image description here](https://i.sta...
You need `z-index` in your case, since some of its elements have their `z-index` specified. Mine works great with, ``` .oranged { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: orange; opacity: 0.4; z-index: 1000; } <div class="oranged"> </div> ```...
1,467,195
> > A swimming pool is fitted with $3$ pipes of uniform rate of flow.The first $2$ pipes operating simultaneously can fill the pool in half the time that the third pipe alone takes to fill the tank.The second pipe,to fill the pool,takes $12$ hrs more than the first pipe working alone and $8$ hrs more than the third pi...
2015/10/06
[ "https://math.stackexchange.com/questions/1467195", "https://math.stackexchange.com", "https://math.stackexchange.com/users/264278/" ]
Let $a, b, c$ be the flow rates of the 1st, 2nd and 3rd pipes respectively. Let $t\_i$ be the time taken for the $i$-th pipe to fill. Let $t\_1=T$. From information given, $t\_2=T+12, t\_3=T+4$. Volume of tank is given by flow rate $\times$ time taken, i.e. $$\begin{align} at\_1=bt\_2=ct\_3&=(a+b)\frac {t\_3}...
From the second equation (a) must be wrong. Now the third equation must be $1/A+1/B=2/C$, so answer (c) is the right one.
43,370,059
I don't have admin access to the top-level of my company's OneLogin system. However, if I tell our IT people to create a particular type of "SAML Test Connector", they will do it and will give me admin access for just that application. Then I can set it up as I wish. What I am after is SP-initiated SSO, with the resul...
2017/04/12
[ "https://Stackoverflow.com/questions/43370059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/98689/" ]
That only defines the default state of the button, not the hover state. You can either create a custom control template (you can see an example [here](https://stackoverflow.com/a/42394219/358596)), or go the easy way of changing colors with [Lightweight styling](https://learn.microsoft.com/en-us/windows/uwp/controls-a...
The best alternative would be to create Buttons like UI using Frame and Label. In this case, the background color will remain the same. Example: ``` <Frame Padding="8" WidthRequest="100" HasShadow="False" BorderColor="Gray" HorizontalOptions="Center"> <Label Text="Button" HorizontalOptions="Center" Ver...
20,284,787
For some reason my DevStorage account has stopped working. I get a `400 Bad Request` error on every request to DevStorage (both Blob and Table). I can browse DevStorage with Azure Storage Explorer, though. This is really strange, because I'm not aware of changing anything to the environment. I have re-installed Azure...
2013/11/29
[ "https://Stackoverflow.com/questions/20284787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1746803/" ]
Did you by any chance install the latest version of Storage Client library (3.0.0.0) which was released yesterday? That could be one reason why your code stopped working because the latest version of library doesn't work with storage emulator (Scroll down to the bottom of this post: <http://blogs.msdn.com/b/windowsazur...
I had the same problem with Azure Storage Emulator 3.0.0 which came from Azure SDK 2.3 on VS 2013 update 2. To solve the problem I started the Web Platform Installer and searched for Storage Emulator then ran the Azure SDK 2.3 (VS2013) and it installed Storage Emulator 3.2.0.0 which fixes the problem. ![enter image d...
669,555
I am a high school student and I have a confusion related to optics {image formation via spherical mirrors) in all my books they say to find location of image its convenient to use the following rays" 1. incident on pole 2. parallel to principal axis 3. passing through focus 4. passing through center of curvature but...
2021/10/03
[ "https://physics.stackexchange.com/questions/669555", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/273556/" ]
The part of the cycle where the red arrow is pointing is the 'ignition'. That's when the new fuel/air mixture taken into the engine is ignited and provides the energy input. So the heat comes from the ignition of the new fuel.
The diagram in the figure does not really represent the version of the Otto Cycle in an IC engine. It "simulates" this using what they call in the literature the "standard air Otto cycle." (Fundamentals of Engineering Thermodynamics, Moran et al; Introduction to Chemical Engineering Thermodynamics, Smith and Van Ness)....
58,788,235
I'm using a Java 8 servlet as a Cloud Pub/Sub push endpoint. On my push endpoint I have a long-running blocking operation, that sometimes runs for over a minute. After the operation is done, I return a `200` response, acking the message. If I return a `500` server error, the message is retried, which is expected. No...
2019/11/10
[ "https://Stackoverflow.com/questions/58788235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10618056/" ]
For push subscriptions, Cloud Pub/Sub does not send a negative acknowledgment (sometimes known as a nack). If your webhook does not return a success code within the acknowledgment deadline, Cloud Pub/Sub retries delivery until the message expires after the subscription's message retention period. You can configure a de...
Yes. It is expected. Pubsub guarantee at-least one time delivery until you acknowledge the message. You can add delay in Push subscription by adding setting in Subsccription. ``` Go To subscription -> Edit ->Acknowledgement deadline -> set values from 10 Seconds to 600 Seconds(10 Minutes). ``` [![enter image...
43,852
Why couldn't one combine rules from languages for sentences with the same intended meaning? So that I could, for example, write Finnish with the same comma rules as in English? Rather, one must subscribe to the rules of a particular language.
2022/02/09
[ "https://linguistics.stackexchange.com/questions/43852", "https://linguistics.stackexchange.com", "https://linguistics.stackexchange.com/users/11088/" ]
You can if you want; nothing is stopping you. But if you're writing in Finnish, it's presumably because you want Finnish-speaking people to understand you, and Finnish-speaking people are used to the rules of Finnish, not English. So if you want to be best understood, you should stick to the rules and customs of Finni...
We can - it's all just a tradition... In fact, most of "western" world uses the same punctuation and capitalization rules (minus some minor differences). Note how in both English and Finnish you start the sentences with a capital letter, end them with a dot (or a question or an exclamation mark); words are divided by s...
43,852
Why couldn't one combine rules from languages for sentences with the same intended meaning? So that I could, for example, write Finnish with the same comma rules as in English? Rather, one must subscribe to the rules of a particular language.
2022/02/09
[ "https://linguistics.stackexchange.com/questions/43852", "https://linguistics.stackexchange.com", "https://linguistics.stackexchange.com/users/11088/" ]
You can if you want; nothing is stopping you. But if you're writing in Finnish, it's presumably because you want Finnish-speaking people to understand you, and Finnish-speaking people are used to the rules of Finnish, not English. So if you want to be best understood, you should stick to the rules and customs of Finni...
Why can't Australians drive on the right side of the road, and Americans drive on the left? Why can't soccer players pick up the ball? Why can't orchestral musicians choose which key they want to play? Just like all of these, language is cooperative. Sometimes a choice may be largely arbitrary, but it still matters th...
266,853
I have two stores with id 1 and 2. Am trying to add product programmatically using below code `$params = array( 'form_key' => $this->_formkey->getFormKey(), 'product' => $productId, //product Id 'qty' => $qty //quantity of product ); $this->_cart->addProduct($product_coll, $params); $this->_cart->save();` ...
2019/03/21
[ "https://magento.stackexchange.com/questions/266853", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/63813/" ]
I crate a Admin Grid using Ui-Component. You want all Data you have create a Custom Export Button that export your all data. edit in your Ui-Component file where Admin Grid Show **[vendor\_name] \ [module\_name] \view\adminhtml\ui\_component** Add this code to add Button into Admin Grid ***Ui-ComponentFIleName.xm...
> > **Try This** > > > **app/code/VendoreName/CustomDataImport/etc** **db\_schema.xml** ``` <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"> <table name="custom_...
35,767,855
I'm having trouble setting the encoding on the response. Tried: * $app->contentType('text/html; charset=utf-8'); * header("Content-Type: application/json"); * $app->response()->header('Content-Type', 'application/json;charset=utf-8'); I'm stuck... :-/ **EDIT** I've downloaded the `Slim/slim-skeleton` via Composer...
2016/03/03
[ "https://Stackoverflow.com/questions/35767855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315200/" ]
You want to take the array of actions, and **reduce** it to a single Promise value. ``` const actions = [ {action: 'wait'}, {action: 'screenshot'} ]; const allDone = actions.reduce((promise, item) => promise.then(Worker[item.action]), Promise.resolve()); allDone.then(() => console.log("All done!")); ``` Thi...
I think you got a little confused about chaining promises. You need to do the next action in the `.then(...)` of the promise of the previous action. ``` var chain = Worker.open(); JSON.forEach(function (vl) { chain = chain.then(function () { //You need to return to promise from Worker[vl.action]() to corr...
22,491,109
I am in the process of writing a WPF application that hosts 10+ usercontrols I have written. What I would like to do is modify the code from "Wonko the Sane"'s answer in this post [Is there a way to show a splash screen for WPF application?](https://stackoverflow.com/questions/3914213/is-there-a-way-to-show-a-splash-s...
2014/03/18
[ "https://Stackoverflow.com/questions/22491109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032193/" ]
Use `String.format(format, args...)`. `String` documentation: <http://docs.oracle.com/javase/6/docs/api/java/lang/String.html> More about format syntax: <http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax>
[`String.format(String format, Object... args)`](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format%28java.lang.String,%20java.lang.Object...%29) is likely what you're after. (Assuming the scores are ints) ``` String.format("%-10s%-10s%4d%4d%4d%6.2f", fname, lname, score1, score2, score3, ((double)...
22,491,109
I am in the process of writing a WPF application that hosts 10+ usercontrols I have written. What I would like to do is modify the code from "Wonko the Sane"'s answer in this post [Is there a way to show a splash screen for WPF application?](https://stackoverflow.com/questions/3914213/is-there-a-way-to-show-a-splash-s...
2014/03/18
[ "https://Stackoverflow.com/questions/22491109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032193/" ]
Use `String.format(format, args...)`. `String` documentation: <http://docs.oracle.com/javase/6/docs/api/java/lang/String.html> More about format syntax: <http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax>
You probably want the `format` method of the `PrintWriter` class - you don't need to explicitly format this into a `String` before you print it. ``` outFile.format( format-string, fname, lname, score1, score2, score3); ``` Check the Javadocs for [PrintWriter](http://docs.oracle.com/javase/7/docs/api/java/io/PrintWri...
22,491,109
I am in the process of writing a WPF application that hosts 10+ usercontrols I have written. What I would like to do is modify the code from "Wonko the Sane"'s answer in this post [Is there a way to show a splash screen for WPF application?](https://stackoverflow.com/questions/3914213/is-there-a-way-to-show-a-splash-s...
2014/03/18
[ "https://Stackoverflow.com/questions/22491109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032193/" ]
[`String.format(String format, Object... args)`](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format%28java.lang.String,%20java.lang.Object...%29) is likely what you're after. (Assuming the scores are ints) ``` String.format("%-10s%-10s%4d%4d%4d%6.2f", fname, lname, score1, score2, score3, ((double)...
You probably want the `format` method of the `PrintWriter` class - you don't need to explicitly format this into a `String` before you print it. ``` outFile.format( format-string, fname, lname, score1, score2, score3); ``` Check the Javadocs for [PrintWriter](http://docs.oracle.com/javase/7/docs/api/java/io/PrintWri...
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Perhaps try replacing spaces with `%20`?
I use: ``` $link = trim($link); $link = str_replace ( ' ', '%20', $link); ```
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
For me just to put the name with spaces between **""** worked. Example ``` curl --upload-file "001- name - lastName.pdf" https://transfer.sh/ernesto ``` Notice the use of "" in "001- name - lastName.pdf"
**On Windows**, you can use notepad++ 1. Write the text in the file and open it in notepad++. 2. Select an empty string in the text and then click on search. 3. Search box will appear, Now click on replace tab. 4. Select the Extended check box in the Search Mode option. 5. Click replace [![enter image description here...
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
I use: ``` $link = trim($link); $link = str_replace ( ' ', '%20', $link); ```
For me just to put the name with spaces between **""** worked. Example ``` curl --upload-file "001- name - lastName.pdf" https://transfer.sh/ernesto ``` Notice the use of "" in "001- name - lastName.pdf"
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
For me just to put the name with spaces between **""** worked. Example ``` curl --upload-file "001- name - lastName.pdf" https://transfer.sh/ernesto ``` Notice the use of "" in "001- name - lastName.pdf"
Use the `str_replace();` function. Replace your `" "` with `"%20"`
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Just use str\_replace. ``` echo str_replace ( ' ', '%20', 'http://images.fastcompany.com/upload/Screen shot 2011-04-28 at 8.13.21 PM.png' ); ```
I use: ``` $link = trim($link); $link = str_replace ( ' ', '%20', $link); ```
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Use the `str_replace();` function. Replace your `" "` with `"%20"`
**On Windows**, you can use notepad++ 1. Write the text in the file and open it in notepad++. 2. Select an empty string in the text and then click on search. 3. Search box will appear, Now click on replace tab. 4. Select the Extended check box in the Search Mode option. 5. Click replace [![enter image description here...
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
I use: ``` $link = trim($link); $link = str_replace ( ' ', '%20', $link); ```
Use the `str_replace();` function. Replace your `" "` with `"%20"`
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Just use str\_replace. ``` echo str_replace ( ' ', '%20', 'http://images.fastcompany.com/upload/Screen shot 2011-04-28 at 8.13.21 PM.png' ); ```
Use the `str_replace();` function. Replace your `" "` with `"%20"`
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Perhaps try replacing spaces with `%20`?
Use the `str_replace();` function. Replace your `" "` with `"%20"`
5,931,858
.NET 4, I have ``` public class Humi { public int huKey { get; set; } public string huVal { get; set; } } ``` And in another class is this code in a method: ``` IEnumerable<Humi> someHumi = new List<Humi>(); //This is actually ISingleResult that comes from a LinqToSql-fronted sproc but I don't think is relevant for...
2011/05/09
[ "https://Stackoverflow.com/questions/5931858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
Perhaps try replacing spaces with `%20`?
**On Windows**, you can use notepad++ 1. Write the text in the file and open it in notepad++. 2. Select an empty string in the text and then click on search. 3. Search box will appear, Now click on replace tab. 4. Select the Extended check box in the Search Mode option. 5. Click replace [![enter image description here...
36,524
I can't appreciate the red phrase. Pls see the question in the title. Why can't farmers simply sell their wheat ahead of time to buyers who are capable of storing this wheat, rather than inducing speculators to long the farmers' short positions? Why do farmers need $\color{red}{\text{short hedge}}$? Zvi Bodie, Alex Ka...
2020/05/08
[ "https://economics.stackexchange.com/questions/36524", "https://economics.stackexchange.com", "https://economics.stackexchange.com/users/-1/" ]
*"Why can't farmers simply sell their wheat ahead of time to buyers who are capable of storing this wheat..."* "...sell their wheat ahead of time..." is precisely what a futures contract does. To imply that it is necessarily speculators on the other side is misleading. On a futures exchange, trading is anonymous and...
The cannot sell the wheat ahead of time since they cannot be sure what the yield on their crop will be. That is, they have no idea whether they can fulfil the contract. With the futures position, they can close it at a gain or loss that can be covered with cash, and it is independent of their crop yield.
19,688,806
Totally new to iOS OpenGL ES 2.0. I'm trying to precisely identify the boundaries of my screen (iPad) by drawing a simple rectangle. From what I have found, it looks to me like the dimensions of an iPad screen are 768 x 1024. However, my screen is not being covered correctly (note that I am drawing in landscape mode if...
2013/10/30
[ "https://Stackoverflow.com/questions/19688806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1024973/" ]
According to <http://www.asp.net/identity/overview/migrations/migrating-an-existing-website-from-sql-membership-to-aspnet-identity> : > > The passwords of the users of the application are encrypted and stored in the database. The crypto algorithm used in SQL membership is different from the one in the new Identity sy...
It is stated in the following link: <http://kevin-junghans.blogspot.com/2014/02/migrating-existing-website-from.html> ``` public class SimplePasswordHasher : IPasswordHasher { public string HashPassword(string password) { return Crypto.HashPassword(password); } public PasswordVerificati...
15,534,462
For my grails project, I have an in-memory h2 database for most of my classes, but just added a persistent database for all User-related classes. On startup, the app executes several threads. After adding the second datasource, I'm getting HibernateExceptions. Specifically, ``` Illegal attempt to associate a collecti...
2013/03/20
[ "https://Stackoverflow.com/questions/15534462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/749763/" ]
The Bold problem is caused by CSS inheritance. In your css file remove rdd blog-item span{} and it will work. nicEdit does not save the contents automatically in the textarea. At form submission you therefore have to run: nicEditors.findEditor('comment').saveContent(); to save it
You can [bind events](http://wiki.nicedit.com/w/page/518/Editor%20Events) on the editor and save it's contents when that event is fired. When I run this code on your example page, it works for me (your server doesn't pickup the nicEditor HTML tags though): ``` var commentNicEditor = new nicEditor().panelInstance('com...
12,186,719
I have a long string. I'd like to take this long string, search for any occurrences of words that appear between quotes (i.e., "string"), and insert a string before the word (i.e., "x"), and a string after the word (i.e., "y"). Any solutions would be most appreciated! Thanks! I see that I could use the following to g...
2012/08/29
[ "https://Stackoverflow.com/questions/12186719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1354417/" ]
I will refer you to this page: [Shortcuts in Objective-C to concatenate NSStrings](https://stackoverflow.com/questions/510269/how-do-i-concatenate-strings-in-objective-c) The page talks about adding strings together by using two NSMutable strings and adding one to both, which seems to be the preferable of the two it g...
Try this: ``` NSString *original=@"The quick 'brown fox' The quick 'brown fox' "; NSString *target=[original stringByReplacingOccurrencesOfString:@"'brown fox'" withString:@"<b>brown fox</b>"]; ```
73,184,405
how can I do a layout like this? [![enter image description here](https://i.stack.imgur.com/rrISu.png)](https://i.stack.imgur.com/rrISu.png) > > basically, > > I have 2 containers in `flexbox`: > > > * first one with text `"33"` > * the second one is a grid container: > + the first one in the grid is `"EUR"` ...
2022/07/31
[ "https://Stackoverflow.com/questions/73184405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19485937/" ]
Here is a replication of your desired result from the screenshot. This solution uses `flex` properties to position the elements. It makes sense to group the "EUR" and the ".49" from the price into their own div and give it a `flex-column`. ```css @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@...
Font size isn't the height. `font-size * line-height == height` I simply added `line-height: 1` to your `.price-container` ```css @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display...
59,820,156
I am trying to calculate trying to calculate the difference in mean values between two groups across multiple numeric variables. For instance, if I had the following data: ``` Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 ...
2020/01/20
[ "https://Stackoverflow.com/questions/59820156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12746690/" ]
There are many possible ways to do this and structure the output like you want it. One option is to re-structure the data frame to long/wide and bring it to columnar form, and then simply subtract the columns you want, i.e. ``` library(dplyr) iris1 %>% group_by(Species) %>% summarise_all(list(mean)) %>% pivot_l...
With `purrr` (which is part of the `tidyverse`, like `dplyr`), if you always substract the same groups, you could write this: ``` library(tidyverse) iris %>% select(-Species) %>% map_df(~{ mean(.x[iris$Species=="setosa"])-mean(.x[iris$Species=="versicolor"]) }) ``` From the iris dataset, you remove the S...
59,820,156
I am trying to calculate trying to calculate the difference in mean values between two groups across multiple numeric variables. For instance, if I had the following data: ``` Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 ...
2020/01/20
[ "https://Stackoverflow.com/questions/59820156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12746690/" ]
Here's a way to do it with `dplyr`: ``` iris %>% filter(Species %in% c("versicolor", "setosa")) %>% group_by(Species) %>% summarise_all(mean) %>% summarise_at(-1, diff) # A tibble: 1 x 4 Sepal.Length Sepal.Width Petal.Length Petal.Width <dbl> <dbl> <dbl> <dbl> 1 0.930 ...
With `purrr` (which is part of the `tidyverse`, like `dplyr`), if you always substract the same groups, you could write this: ``` library(tidyverse) iris %>% select(-Species) %>% map_df(~{ mean(.x[iris$Species=="setosa"])-mean(.x[iris$Species=="versicolor"]) }) ``` From the iris dataset, you remove the S...
543,373
So here is what I have so far: $[a]\_n$ is a unit iff $(a,n) = 1$. Otherwise, $(a,n) = d$ with $d \neq 1$. Let $n = dq$, then $[q]\_n \neq [0]\_n$, where $1\leq q<n$. So this is where I'm stuck. Where do I go from here? The book does a proof of this but I don't quite understand the way they explain it. The book I'm...
2013/10/28
[ "https://math.stackexchange.com/questions/543373", "https://math.stackexchange.com", "https://math.stackexchange.com/users/95267/" ]
$A\setminus B=B\oplus(A\cup B)=A\oplus(A\cap B)$
Let $x \in A$ be a predicate and $x \in B$ be a predicate and form the table $$ \begin{vmatrix} x\in A & x \in B & x \in A - B \\ 0 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{vmatrix} $$ Let the variable $y$ take the place of $x \in A$, and $z$ the place of $x \in B$. Then the predicate $p = x \in A - B$ ...
56,461,626
I have a `Memory<byte>` that holds binary data for an XML element. I want to read the XML element into an `XElement` object, but this seems easier than at first sight. When using a `byte[]`, I would do something like this: ``` public static XElement GetXElementFromByteArray(byte[] buffer) { using var stream = new Me...
2019/06/05
[ "https://Stackoverflow.com/questions/56461626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/956435/" ]
You can use spread operator. ``` allSports.push(...teamSports,...individualSports); ``` ### Working snippet ```js var teamSports = ['soccer', 'baseball', 'hockey', 'American football']; var individualSports = ['weight lifting', 'track & field', 'boxing', 'wrestling'] var allSports = []; allSports.push(...teamS...
The Array.push() accepts multiple parameters therefore you should use the [spread](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) operator when you want to merge arrays. Like so: ```js var teamSports = ['soccer', 'baseball', 'hockey', 'American football']; var individualSp...
53,841,365
I've tried `<a-videosphere>` and `<a-video>` and they are great. But if i use a "normal" video, it is incredibly stretched with `a-videosphere` and just flat with `a-video`. But is there a way for the video to be curved around the user ? Just like if the user was inside a cylinder : similar to `a-curvedimage` but fo...
2018/12/18
[ "https://Stackoverflow.com/questions/53841365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696660/" ]
You can display a video as a texture on any geometry by using the `src` attribute: ``` <a-box src="#video"></a-box> <a-curvedimage src="#video"></a-curvedimage> <a-torus-knot src="#video"></a-torus-knot> ``` remixed example glitch [here](https://glitch.com/%7Eaframe-vid-on-primitives). --- If you're asking if you ...
I encountered the same issue with `a-curvedimage` and the `src` attribute, and solved it by using the generic `a-entity` element instead, recreating the open-ended, double-sided cylinder of the `a-curvedimage` element. Example for a 1280x720 video: ``` <a-scene> <a-assets> <video id="myvideo" preload="auto" src...
55,920,471
I tried to execute a Spring project, but always returns an error, I don't know if the problem is the version of Spring Boot. I have two projects: * IntegrationCore (spring boot project); * IntegrationModel (only for models); The project IntegrationCore contains the references of project IntegrationModel (Build Path ...
2019/04/30
[ "https://Stackoverflow.com/questions/55920471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11432140/" ]
In case of keycloak, it does not invalidate the previously issued access token. You can validate this by viewing the sessions tab: [![enter image description here](https://i.stack.imgur.com/6bBSc.png)](https://i.stack.imgur.com/6bBSc.png) In my case, I logged in with administrator\_user from 2 different browsers and ...
This behavior is perfectly normal. Access tokens lasts till the expiration time which is set in the token. Access tokens are short lived and refresh tokens lives longer. It does not matter - You can generate as many access tokens you want through the refresh token. All the tokens will work till their ttl is reached.
18,759,957
I am working with a big dataframe, that looks like this one ``` X V1 V2 V3 1 IOJRE.no.m-1 10 2 0 2 IOJRE.no.m-2 10 7 0 3 OHIJR.no.m-4 5 5 1 4 OHIJR.no.m-6 5 6 1 5 OHIJR.no.m-3 3 3 1 6 OHIJR.no.m-1 2 3 1 7 ABCDE.no.m-1 5 6 0 8 ABCDE.no.m-5 1 4 0 > dput(mydata) structure(list(X = stru...
2013/09/12
[ "https://Stackoverflow.com/questions/18759957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1826552/" ]
The behavior you are experiencing is normal. In the current state of your code there is only one show attribute and all your blocks are bound to this attribute. Modifying the value from false to true will result in refreshing all your blocks. Show attribute being set to true everything will be expanded. What you need ...
Building on top of Nics answer, this is slightly more simple: ``` <ul ng-repeat="vote in votes" ng-click="expand = !expand"> <li class="created">{{vote.created|date}}</li> <li class="ip">{{vote.ip}}</li> <li ng-show="expand> <ul> <li ng-repeat="file in vote.folder"> ```
69,297,526
I create web quiz with each question and option element dynamically generated according to an array. Below is my script: ``` function showQuestion(){ for(let i = 0; i < QuesPartA.length; i++){ $(".questionBox").append('<div class="Question">Number '+ parseInt(i+1) +'</div>'); $(".questionBox").app...
2021/09/23
[ "https://Stackoverflow.com/questions/69297526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16794689/" ]
I think it's a bug. It's currently been fixed here but they haven't released it yet: * <https://reviews.llvm.org/D99840> * <https://reviews.llvm.org/D106349>
i think there is problem with your file you can't use `BraceWrapping` if `BreakBeforeBraces` is not `Custom`
45,661,014
I am trying to add a column in my table which maps some values in another column to the new column. (Population is another column that I have) This is what I have been using: ``` UPDATE my_table SET popmatch2 CASE WHEN popmatch IN ('MFNR', 'GQNR', 'EWNR', 'MHNR', 'OUTONR', 'OUTADVNR') THEN pop...
2017/08/13
[ "https://Stackoverflow.com/questions/45661014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7596636/" ]
The major problems with your current syntax is that you need to *assign* the `popmatach2` column to something. In this instance, assigning to a `CASE` expression might make sense. A `CASE` expression has to return a single value, not group of values, and each `WHEN` condition should return a single value. ``` UPDATE m...
This is the correct syntax: ``` update my_table set popmatch2 = (case when popmatch in ('MFNR', 'GQNR', 'EWNR', 'MHNR') then 'GENERAL' when popmatch in ('OUTONR', 'OUTADVNR') then 'ENDEMIC' else 'POPULATION' -- I'...
13,710,435
Suppose you have an instance of the boolean satisfiability where the formula in given in CNF. Furthermore, each clause contains only positive literals or negative literals. For example: ``` (a || b) && (!a || !c || !d) && (b || d) ``` Does such a boolean formula have a special name? Is there a faster way to test sat...
2012/12/04
[ "https://Stackoverflow.com/questions/13710435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062447/" ]
The class of CNFs such that every clause is either positive or negative, that is, there are no clauses containing positive and negative literals at the same time, has been called "monotone CNFs" for example by Hans Kleine Buening in his book on propositional logic. A recent paper on monotone CNFs is <https://arxiv.org/...
It is called the [Boolean satisfiability problem](http://en.wikipedia.org/wiki/Boolean_satisfiability_problem) or simply SAT. Although there exists polynomial solutions for special cases (see [2SAT](http://en.wikipedia.org/wiki/2SAT)), the general problem is NP-complete (meaning that there is no so-called-fast solution...
396,493
I'm using Centos7 virtual machine as development enviroment, actually, to host my local server and project files. All development is done on windows 10 with virtual machine attached as network storage. Now, the problem is that it reports huge disk usage on it, when inspecting one file (any file) that is <1MB, it says ...
2017/10/06
[ "https://unix.stackexchange.com/questions/396493", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/254389/" ]
Looks like you're using an `NTFS` volume under Linux. If that's the case, please don't do that. Format the volume either with `ext4` or `xfs` on the CentOS side, and mount the driva via `NFS` or `Samba` to the Windows. NTFS is not well-supported under CentOS. `NTFS` is not a primary filesystem for Linux in general, an...
Do not use dynamically allocated virtual disks that may couse of unexpected disk performance issues. Use fixed size virtual disks to best performance. Try to convert your disks.
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
I think you want this as your onchange event: ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ``` When you call `val()` without a parameter, it *fetches* the value of the element. If you call it *with* a parameter like `val('some value');`, it sets the...
If you can, avoid inline event definition on html: ``` <select name="search_school" id="search_school"> ... </select> <input type="hidden" name="school_name" id="school_name" /> ``` --- ``` $(document).ready(function () { $('#search_school').change(function () { $('#school_name').val($(this).val()); ...
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
I think you want this as your onchange event: ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ``` When you call `val()` without a parameter, it *fetches* the value of the element. If you call it *with* a parameter like `val('some value');`, it sets the...
You want something like this, I think: ``` $("#search_school").change(function(){ $(this).val($("#search_school option:selected").text()); }); ```
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
I think you want this as your onchange event: ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ``` When you call `val()` without a parameter, it *fetches* the value of the element. If you call it *with* a parameter like `val('some value');`, it sets the...
To set the selected value to your hidden control you should : ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ```
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
I think you want this as your onchange event: ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ``` When you call `val()` without a parameter, it *fetches* the value of the element. If you call it *with* a parameter like `val('some value');`, it sets the...
``` <script type="text/javascript"> $(document).ready(function() { $("#search_school").change( function () { $('#school_name').attr('value', $("#search_school").val()); } ); }); </script> ```
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
If you can, avoid inline event definition on html: ``` <select name="search_school" id="search_school"> ... </select> <input type="hidden" name="school_name" id="school_name" /> ``` --- ``` $(document).ready(function () { $('#search_school').change(function () { $('#school_name').val($(this).val()); ...
You want something like this, I think: ``` $("#search_school").change(function(){ $(this).val($("#search_school option:selected").text()); }); ```
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
If you can, avoid inline event definition on html: ``` <select name="search_school" id="search_school"> ... </select> <input type="hidden" name="school_name" id="school_name" /> ``` --- ``` $(document).ready(function () { $('#search_school').change(function () { $('#school_name').val($(this).val()); ...
To set the selected value to your hidden control you should : ``` <select name="search_school" id="search_school" onchange="$('#school_name').val($('#search_school').val())"> ```
1,323,886
When i select some data from my option i need the value to be showed when "onchange" the select... can someone help me ? ``` <select name="search_school" id="search_school" onchange="$('#search_school').val() = $('#school_name').val()"> ``` I want the selected option value to be showed in the hidden input ``` <inp...
2009/08/24
[ "https://Stackoverflow.com/questions/1323886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146629/" ]
If you can, avoid inline event definition on html: ``` <select name="search_school" id="search_school"> ... </select> <input type="hidden" name="school_name" id="school_name" /> ``` --- ``` $(document).ready(function () { $('#search_school').change(function () { $('#school_name').val($(this).val()); ...
``` <script type="text/javascript"> $(document).ready(function() { $("#search_school").change( function () { $('#school_name').attr('value', $("#search_school").val()); } ); }); </script> ```
737,138
It's clear to me what the interpretation is when we have something like: $$\exists x (\forall y \Phi(x, y))$$ or even how to interpret the formula when x or y are not variables in the expression $\Phi$, but when these are used in a seemingly contradictory fashion, what is the meaning of these expressions: $$\exists ...
2014/04/02
[ "https://math.stackexchange.com/questions/737138", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139896/" ]
One usually takes these to be well-formed formulas. Let us take, for example, $\exists x\forall x \Phi(x)$. When we *interpret* this sentence, we examine $\forall x \Phi(x)$ for all **free** occurrences of $x$ in $\forall x\Phi(x)$. There are no such free occurrences, so $\exists x\forall x\Phi(x)$ is true in a struct...
The "reason way" is (so to say) a "formal" one. See Stephen Cole Kleene, *Mathematical Logic* (1967), page 127 : if $x$ is **not** free in $A$, then > > $\vdash \forall x A \equiv A$ and $\vdash \exists x A \equiv A$. > > > We will prove the first one : $\forall x A \vdash A$ --- by $\forall$-elim $\vdash \for...
41,605,801
I'm finding different behavior from within and outside of a docker image for authenticating a google service account. Outside. Succeeds. ``` C:\Users\Ben\AppData\Local\Google\Cloud SDK>gcloud auth activate-service-account 773889352370-compute@developer.gserviceaccount.com --key-file C:/Users/Ben/Dropbox/Google/Meerka...
2017/01/12
[ "https://Stackoverflow.com/questions/41605801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2984051/" ]
This is probably due to a clock skew of the docker VM. I debugged the activate-service-account function of the google SDK and got the following error message: ``` There was a problem refreshing your current auth tokens: invalid_grant: Invalid JWT: Token must be a short-lived token and in a reasonable timeframe Pleas...
Have you attempted to put the credential in the image from the beginning? Is that a similar outcome? On the other hand, have you tried using `--key-file /tmp/MeerkatReader-d77c0d6aa04f.json`? Since it appears you're putting the json file in `/tmp`. You might also consider checking the network configuration inside th...
40,242,465
I want to checkout all files with a certain file name. The path to them looks like this: Assets/stickers/\*/icon.png where \* is a bunch of different directories (i.e. one of the files is Assets/stickers/a/icon.png another is Assets/stickers/b/icon.png). How can I write a command that will pull all the files with that ...
2016/10/25
[ "https://Stackoverflow.com/questions/40242465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2417339/" ]
I tried the following commands in my repo referring to [the manual](https://git-scm.com/docs/gitglossary#def_pathspec) but no one worked: ``` git checkout <commit> dir/*/foo.txt git checkout <commit> dir/**/foo.txt git checkout <commit> ':(glob)dir/*/foo.txt' git checkout <commit> ':(glob)dir/**/foo.txt' git checkout ...
Try this ``` git reset --mixed 4702e729f24fc71816835bf9b818ed43f5f5213f Assets/stickers/*/icon.png ```
20,319,853
I am using pyton 3.2 I have the following dictionary: ``` a = {"fruits":["apple","mangoes","grapes"],"colour":["apple","orange","grapes"],"number":["1","2","3"]} ``` I need to iterate over this list of dictionary and I want to create a new dictionary b in which values in fruits is the same value in colours: ``` b ...
2013/12/02
[ "https://Stackoverflow.com/questions/20319853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044013/" ]
> > Support for a true debug build. Developers no longer need to add the > android:debuggable attribute to the tag in the manifest > — the build tools add the attribute automatically. In Eclipse/ADT, all > incremental builds are assumed to be debug builds, so the tools insert > android:debuggable="true". When expo...
Have you tried to have this in androidmanifest.xml: ``` <application android:debuggable="true" . . .> </application> ```
20,319,853
I am using pyton 3.2 I have the following dictionary: ``` a = {"fruits":["apple","mangoes","grapes"],"colour":["apple","orange","grapes"],"number":["1","2","3"]} ``` I need to iterate over this list of dictionary and I want to create a new dictionary b in which values in fruits is the same value in colours: ``` b ...
2013/12/02
[ "https://Stackoverflow.com/questions/20319853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044013/" ]
Using Android Studio 0.3.7: First make sure you have into you `<application>` entry of the `AndroidManifest.xml` the following entry `android:debuggable="false"` Then go to the **Build** menu option, and choose "**Generate Signed APK**". Create a key store or use an existing one, click "Next", change destination if d...
Have you tried to have this in androidmanifest.xml: ``` <application android:debuggable="true" . . .> </application> ```
330,496
I've been working with my OpenVPN server for a while, and I have a rather interesting problem. I need to redirect **all** client traffic through the tunnel **except** for a couple IP's that need to be resolvable locally. The way I'm doing this is pushing these routes from the server: Server 'PUSH' directives --------...
2011/08/31
[ "https://superuser.com/questions/330496", "https://superuser.com", "https://superuser.com/users/27539/" ]
It appears as if after doing some more research, based on grawity's answer that more specific routes will take precedence, after the server's PUSH i can simply do a ``` --route [ip to bypass] 255.255.255.0 net_gateway ``` net\_gateway as defined in the 'route' directive in the openvpn man page will resolve to the p...
Simply add another route, and it will take precedence over less-specific ones: `172.16.*` translates to `172.16.0.0` with netmask `255.255.0.0`: ``` route add 172.16.0.0 mask 255.255.0.0 if *index* ``` where *index* is the index of your LAN network interface as shown by `route print`. For example, `0x3` or similar...
4,274,215
My goal is to create a system wherein I can provide the string name of an class at run time and have it return an instance of that class in turn. Searching stackoverflow, I came across an example that seems to do exactly what I am trying to accomplish, although I am currently unable to have it compile properly. The fol...
2010/11/25
[ "https://Stackoverflow.com/questions/4274215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519707/" ]
It's been a long time since this question was posted, but since there's no answer and I stumbled here too, I figured I'd add one. I copied the same factory code you did (from the StackOverflow answer [here](https://stackoverflow.com/questions/582331/is-there-a-way-to-instantiate-objects-from-a-string-holding-their-clas...
I added empty bodies to the `LevelObject` class constructor and destructor: ``` LevelObject(void) { } ~LevelObject(void) { } ``` Then declared the static `map` member variable of the `BaeFactory` class: ``` BaseFactory::map_type* BaseFactory::map; ``` and the code compiled without errors in both GCC and Visual St...
61,679,390
As the jenkins user, my `sqlite_version` is `3.7.17` ``` bash-4.2$ python3.8 Python 3.8.2 (default, May 8 2020, 12:44:28) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.sqlite_version '3.7.17' ``` as my root us...
2020/05/08
[ "https://Stackoverflow.com/questions/61679390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2118666/" ]
Following works for me on CentOS 7.7: --- **Install Python Dependencies**: ``` sudo yum -y groupinstall 'Development Tools' sudo yum -y install openssl-devel bzip2-devel libffi-devel ``` --- **SQLite source install**: ``` wget https://sqlite.org/2020/sqlite-autoconf-3310100.tar.gz tar -xf sqlite-autoconf-3310100...
Did you check the `PYTHONPATH` and/or `LD_LIBRARY_PATH` for both `root` and `jenkins` ? ### About *Python path* (`PYTHONPATH`) You can use [`sys.path`](https://docs.python.org/3/library/sys.html#sys.path) to print the effective `PYTHONPATH` for each environment. If you see a difference, you are probably using 2 diffe...
350,128
I am trying to type some text to the side of a cases environment. Below is my MWE. I seem to have two issues: Extra space between the numbers of the enumerated list and the contents of said list and the brackets not being large enough. My first attempt (which used the cases environment exclusively) resulted in errors. ...
2017/01/24
[ "https://tex.stackexchange.com/questions/350128", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11167/" ]
To avoid having a gap between the enumeration numerals and the associated formulas, use an inline math environment instead of a display math environment. To get the correct sizing of the right-hand curly braces, I suggest you use a `drcases*` environment, which is provided by the `mathtools` package. (The "r" in "rcas...
Here are some options using an `array` and/or [`empheq`](http://ctan.org/pkg/empheq): [![enter image description here](https://i.stack.imgur.com/Q8NT0.png)](https://i.stack.imgur.com/Q8NT0.png) ``` \documentclass{article} \usepackage{amsfonts}% ...for \mathbb \usepackage{empheq}% Load mathtools, which loads amsmath ...
350,128
I am trying to type some text to the side of a cases environment. Below is my MWE. I seem to have two issues: Extra space between the numbers of the enumerated list and the contents of said list and the brackets not being large enough. My first attempt (which used the cases environment exclusively) resulted in errors. ...
2017/01/24
[ "https://tex.stackexchange.com/questions/350128", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11167/" ]
To avoid having a gap between the enumeration numerals and the associated formulas, use an inline math environment instead of a display math environment. To get the correct sizing of the right-hand curly braces, I suggest you use a `drcases*` environment, which is provided by the `mathtools` package. (The "r" in "rcas...
Based on what Mico typed and has here, I have come up with the following, which is what I was looking for. ``` \documentclass{article} \usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry} \usepackage{mathtools,amsfonts} \begin{document} Prove that: \begin{enumerate} \item \qquad $\...
350,128
I am trying to type some text to the side of a cases environment. Below is my MWE. I seem to have two issues: Extra space between the numbers of the enumerated list and the contents of said list and the brackets not being large enough. My first attempt (which used the cases environment exclusively) resulted in errors. ...
2017/01/24
[ "https://tex.stackexchange.com/questions/350128", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11167/" ]
Here are some options using an `array` and/or [`empheq`](http://ctan.org/pkg/empheq): [![enter image description here](https://i.stack.imgur.com/Q8NT0.png)](https://i.stack.imgur.com/Q8NT0.png) ``` \documentclass{article} \usepackage{amsfonts}% ...for \mathbb \usepackage{empheq}% Load mathtools, which loads amsmath ...
Based on what Mico typed and has here, I have come up with the following, which is what I was looking for. ``` \documentclass{article} \usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry} \usepackage{mathtools,amsfonts} \begin{document} Prove that: \begin{enumerate} \item \qquad $\...
5,847,290
I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire H...
2011/05/01
[ "https://Stackoverflow.com/questions/5847290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385264/" ]
See the PhoneGap mail list [thread](https://groups.google.com/forum/#!topic/phonegap/FiALy94hwTE). Also, two stackoverflow threads [here](https://stackoverflow.com/questions/4860021/android-problem-with-debugging-javascript-in-webview) and [here](https://stackoverflow.com/questions/5538516/javascript-console-log-on-htc...
Try this filter: adb logcat PhoneGapLog:V \*:S It will only show console.log and phonegap specific output.
5,847,290
I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire H...
2011/05/01
[ "https://Stackoverflow.com/questions/5847290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385264/" ]
Another workaround is to use console.log() [jsconsole.com](http://jsconsole.com/remote-debugging.html)
Try this filter: adb logcat PhoneGapLog:V \*:S It will only show console.log and phonegap specific output.
5,847,290
I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire H...
2011/05/01
[ "https://Stackoverflow.com/questions/5847290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385264/" ]
I've found that console.error gets higher priority than console.log , and appears in the adb logcat output for both emulator devices and real devices connected via USB.
Try this filter: adb logcat PhoneGapLog:V \*:S It will only show console.log and phonegap specific output.
5,847,290
I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire H...
2011/05/01
[ "https://Stackoverflow.com/questions/5847290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385264/" ]
See the PhoneGap mail list [thread](https://groups.google.com/forum/#!topic/phonegap/FiALy94hwTE). Also, two stackoverflow threads [here](https://stackoverflow.com/questions/4860021/android-problem-with-debugging-javascript-in-webview) and [here](https://stackoverflow.com/questions/5538516/javascript-console-log-on-htc...
I've found that console.error gets higher priority than console.log , and appears in the adb logcat output for both emulator devices and real devices connected via USB.
5,847,290
I am developing PhoneGap webapp where I use some javascript, and sometimes I need to see console.log() output. I can easily see it when running in Chrome, it also works fine, when running this app in Android emulator - output of console.log() shows up in Eclipse LogCat window. But when I run this app on my HTC Desire H...
2011/05/01
[ "https://Stackoverflow.com/questions/5847290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385264/" ]
Another workaround is to use console.log() [jsconsole.com](http://jsconsole.com/remote-debugging.html)
I've found that console.error gets higher priority than console.log , and appears in the adb logcat output for both emulator devices and real devices connected via USB.
58,094,554
I have N random variables (X1,...,XN) each of which is distributed over a specific marginal (normal, log-normal, Poisson...) and I want to generate a sample of p joint realizations of these variables Xi, given that the variables are correlated with a given Copula, using Python 3. I know that R is a better option but i ...
2019/09/25
[ "https://Stackoverflow.com/questions/58094554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6439222/" ]
The following code implements the Clayton and AMH copulas. Page 4 of [this paper](https://cran.r-project.org/web/packages/copula/vignettes/nacopula-pkg.pdf) shows how other kinds of copulas can be implemented. ``` import random import math import scipy.stats as st def clayton(theta, n): v=random.gammavariate(1/the...
Please check this page ["Create a composed distribution"](https://openturns.github.io/openturns/latest/auto_probabilistic_modeling/distributions/plot_composed_distribution.html#sphx-glr-auto-probabilistic-modeling-distributions-plot-composed-distribution-py). I think this is what you're looking for For example, if you...
23,038,674
I want to preface that yes, this is a homework question. We are told to create two buttons that increment their own individual counters. The counter part is done in another class not shown here. I first create a new `JFrame` and two buttons with their own text. ``` JFrame frame = new JFrame(); JButton button1 = new ...
2014/04/13
[ "https://Stackoverflow.com/questions/23038674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1913389/" ]
You should avoid use of `setBounds(...)` and null layout as this makes for very inflexible GUI's that while they might look good on one platform look terrible on most other platforms or screen resolutions and that are very difficult to update and maintain. Instead if you want one JButton on top of the other and that t...
``` frame.add(button1); frame.add(button2); ``` JFrame has `BroderLayout` as default and `add()` methods adds the component in the CENTER by default. i.e you are adding two buttons at the same location. Use overloaded `add()` method along with location for e.g.: ``` frame.add(button1,BorderLayout.NORTH); ``` Or yo...
23,038,674
I want to preface that yes, this is a homework question. We are told to create two buttons that increment their own individual counters. The counter part is done in another class not shown here. I first create a new `JFrame` and two buttons with their own text. ``` JFrame frame = new JFrame(); JButton button1 = new ...
2014/04/13
[ "https://Stackoverflow.com/questions/23038674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1913389/" ]
You should avoid use of `setBounds(...)` and null layout as this makes for very inflexible GUI's that while they might look good on one platform look terrible on most other platforms or screen resolutions and that are very difficult to update and maintain. Instead if you want one JButton on top of the other and that t...
The default layout manager for a JFrame is BorderLayout, and a component is by default added to BorderLayout.CENTER if none is specified. Since they are both being added to the center one is covering up the other. You either need to specify the location on the frame for one of them or use a different layout manager. A...
23,038,674
I want to preface that yes, this is a homework question. We are told to create two buttons that increment their own individual counters. The counter part is done in another class not shown here. I first create a new `JFrame` and two buttons with their own text. ``` JFrame frame = new JFrame(); JButton button1 = new ...
2014/04/13
[ "https://Stackoverflow.com/questions/23038674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1913389/" ]
You should avoid use of `setBounds(...)` and null layout as this makes for very inflexible GUI's that while they might look good on one platform look terrible on most other platforms or screen resolutions and that are very difficult to update and maintain. Instead if you want one JButton on top of the other and that t...
See you have two buttons namely `Button1` and `Button 2` so if you are using setbound property then use using absolute positioning to place controls over the frame like this way. ``` JFrame frame = new JFrame(); Container Pane = getContentPane(); Pane.setLayout(null); JButton button1 = new JButton("Click me!"); JButt...
23,038,674
I want to preface that yes, this is a homework question. We are told to create two buttons that increment their own individual counters. The counter part is done in another class not shown here. I first create a new `JFrame` and two buttons with their own text. ``` JFrame frame = new JFrame(); JButton button1 = new ...
2014/04/13
[ "https://Stackoverflow.com/questions/23038674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1913389/" ]
``` frame.add(button1); frame.add(button2); ``` JFrame has `BroderLayout` as default and `add()` methods adds the component in the CENTER by default. i.e you are adding two buttons at the same location. Use overloaded `add()` method along with location for e.g.: ``` frame.add(button1,BorderLayout.NORTH); ``` Or yo...
The default layout manager for a JFrame is BorderLayout, and a component is by default added to BorderLayout.CENTER if none is specified. Since they are both being added to the center one is covering up the other. You either need to specify the location on the frame for one of them or use a different layout manager. A...
23,038,674
I want to preface that yes, this is a homework question. We are told to create two buttons that increment their own individual counters. The counter part is done in another class not shown here. I first create a new `JFrame` and two buttons with their own text. ``` JFrame frame = new JFrame(); JButton button1 = new ...
2014/04/13
[ "https://Stackoverflow.com/questions/23038674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1913389/" ]
See you have two buttons namely `Button1` and `Button 2` so if you are using setbound property then use using absolute positioning to place controls over the frame like this way. ``` JFrame frame = new JFrame(); Container Pane = getContentPane(); Pane.setLayout(null); JButton button1 = new JButton("Click me!"); JButt...
The default layout manager for a JFrame is BorderLayout, and a component is by default added to BorderLayout.CENTER if none is specified. Since they are both being added to the center one is covering up the other. You either need to specify the location on the frame for one of them or use a different layout manager. A...
342,693
I am working on a complex analysis exercice. I need to find the Laurent series of the function: $$f(z) = \frac{e^z}{z + 1}$$ about $z = −1$. I know that the result is $$\sum\_{n=-1}^{\infty}\frac{(z+1)^n}{e\cdot(n+1)!}$$ for $|z+1| > 0$, but I cannot see how one can get this result.
2013/03/27
[ "https://math.stackexchange.com/questions/342693", "https://math.stackexchange.com", "https://math.stackexchange.com/users/68716/" ]
You can develop the Laurent series (which is in fact a Taylor series) of $e^z$ about $z=-1$: $$e^z = \sum\_{n=0}^\infty \frac{e^{-1}}{n!}(z+1)^n = \sum\_{n=0}^\infty \frac{1}{e\cdot n!}(z+1)^n$$ because $\frac{d^n}{dz^n}e^z=e^z$. Now just divide: $$\frac{e^z}{z+1} = \sum\_{n=0}^\infty \frac{1}{e\cdot n!}(z+1)^{n-1} ...
Put $z+1=:t\ $; in other words: Consider the auxiliary function $$g(t):=f(-1+t)={e^{-1+t}\over t}={1\over e\ t}\sum\_{k\geq0}^\infty{t^k\over k!} ={1\over e}\left({1\over t}+1+{t\over 2}+{t^2\over 6}+{t^3\over24}+\ldots\right)\ .$$ It follows that $$f(z)=g(z+1)={1\over e}\left({1\over z+1}+1+{z+1\over 2}+{(z+1)^2\over ...
62,746,757
Upon calling `std::contional<bool, T1, T2>` both the types T1 and T2 get instantiated as soon as its called, irrespective of the value of the bool, does there exist an implementation (or some pointers to implement it) where only the relevant type is instantiated. Following code for example is impossible to write using...
2020/07/05
[ "https://Stackoverflow.com/questions/62746757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5327962/" ]
You can use `if constexpr` to lazily instantiate templates while keeping familiar code structure: ``` // C++20: std::type_identity template<typename T> struct type_t { using type = T; }; template <int N, typename pairList> struct get { static auto choose_type() { if constexpr (N == pairList::i) { ...
I usually use template specialization to avoid this sort of problem ``` // bool is false -> recursion template <int N, typename pairList, bool = N == pairList::i> struct get : public get<N, typename pairList::tail> { }; // bool is true -> stop recursion and type is selected template <int N, typename pairList> struct...
32,474,345
My usecase is I have list of Restaurants objects with attributes as city, type, rating and I want to print the list by highest rating for given combination of (city, type). As I created this example to mess with java stream, please reply how it can be achieved using streams: ``` import java.util.List; import java.util...
2015/09/09
[ "https://Stackoverflow.com/questions/32474345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4292867/" ]
The code snippet below should produce the result you are after: ``` List<Optional<Restaurant>> resultList = mymap.values() .stream() .flatMap(map -> map.values().stream()) ...
I haven't worked with Java 8 yet but my guess is ``` mylist.stream().sorted(new Comparator<Restaurant>() { public int compare(Restaurant r1, Restaurant r2) { // impl here how your restaurant should be compared // (by rating or smth. else) } }).collect(groupingBy( .../ al the rest stuff here/ ...
32,474,345
My usecase is I have list of Restaurants objects with attributes as city, type, rating and I want to print the list by highest rating for given combination of (city, type). As I created this example to mess with java stream, please reply how it can be achieved using streams: ``` import java.util.List; import java.util...
2015/09/09
[ "https://Stackoverflow.com/questions/32474345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4292867/" ]
First, you can create composite key to get rid of nested maps. The `Arrays.asList(r.getCity(), r.getType())` is what you need. Next, `groupingBy` is not well suitable in your case, as you should handle those nasty optionals. Instead use `toMap` collector with custom merging function: ``` Map<List<String>, Restaurant> ...
I haven't worked with Java 8 yet but my guess is ``` mylist.stream().sorted(new Comparator<Restaurant>() { public int compare(Restaurant r1, Restaurant r2) { // impl here how your restaurant should be compared // (by rating or smth. else) } }).collect(groupingBy( .../ al the rest stuff here/ ...
32,474,345
My usecase is I have list of Restaurants objects with attributes as city, type, rating and I want to print the list by highest rating for given combination of (city, type). As I created this example to mess with java stream, please reply how it can be achieved using streams: ``` import java.util.List; import java.util...
2015/09/09
[ "https://Stackoverflow.com/questions/32474345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4292867/" ]
The code snippet below should produce the result you are after: ``` List<Optional<Restaurant>> resultList = mymap.values() .stream() .flatMap(map -> map.values().stream()) ...
using Java 8 stream API: ``` List<Restaurant> sortedList = mylist.stream() .sorted((restaurant1, restaurant2) -> Long.compare(restaurant1.getRating(), restaurant2.getRating())) .collect(Collectors.toList()); ```
32,474,345
My usecase is I have list of Restaurants objects with attributes as city, type, rating and I want to print the list by highest rating for given combination of (city, type). As I created this example to mess with java stream, please reply how it can be achieved using streams: ``` import java.util.List; import java.util...
2015/09/09
[ "https://Stackoverflow.com/questions/32474345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4292867/" ]
First, you can create composite key to get rid of nested maps. The `Arrays.asList(r.getCity(), r.getType())` is what you need. Next, `groupingBy` is not well suitable in your case, as you should handle those nasty optionals. Instead use `toMap` collector with custom merging function: ``` Map<List<String>, Restaurant> ...
using Java 8 stream API: ``` List<Restaurant> sortedList = mylist.stream() .sorted((restaurant1, restaurant2) -> Long.compare(restaurant1.getRating(), restaurant2.getRating())) .collect(Collectors.toList()); ```
32,474,345
My usecase is I have list of Restaurants objects with attributes as city, type, rating and I want to print the list by highest rating for given combination of (city, type). As I created this example to mess with java stream, please reply how it can be achieved using streams: ``` import java.util.List; import java.util...
2015/09/09
[ "https://Stackoverflow.com/questions/32474345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4292867/" ]
First, you can create composite key to get rid of nested maps. The `Arrays.asList(r.getCity(), r.getType())` is what you need. Next, `groupingBy` is not well suitable in your case, as you should handle those nasty optionals. Instead use `toMap` collector with custom merging function: ``` Map<List<String>, Restaurant> ...
The code snippet below should produce the result you are after: ``` List<Optional<Restaurant>> resultList = mymap.values() .stream() .flatMap(map -> map.values().stream()) ...
33,790,084
I am using Apache-JMeter for **distributed performance testing**. The master & slave communicate via `Java RMI`. It works fine so far. I do not see any issues. But in some forums/blog, I see people use **SSH Tunneling/Port forwarding** for communication between master & slave. I tried to google to find the advantages ...
2015/11/18
[ "https://Stackoverflow.com/questions/33790084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4081949/" ]
The standard arrangement is based on RMI and works fine if all the systems are in the same network. If you need to put the systems on different networks, the you have to set up some kind of VPN between them and in that case SSH tunneling can do the trick.
You're comparing apples and oranges. RMI is an application protocol and API. SSH tunneling is a system utility. They're not interchangeable or comparable.
33,790,084
I am using Apache-JMeter for **distributed performance testing**. The master & slave communicate via `Java RMI`. It works fine so far. I do not see any issues. But in some forums/blog, I see people use **SSH Tunneling/Port forwarding** for communication between master & slave. I tried to google to find the advantages ...
2015/11/18
[ "https://Stackoverflow.com/questions/33790084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4081949/" ]
It makes sense only in case when jmeter master and slave cannot communicate directly and connection needs to be done via hopoff node or in secure environments where only one SSH port is open and you need to establish connectivity.
You're comparing apples and oranges. RMI is an application protocol and API. SSH tunneling is a system utility. They're not interchangeable or comparable.
38,837
I've been kind of interested in the mechanics (er, electronics) of computer systems lately and after a bunch of research and looking at my computer's properties, I've come across something strange. Most people say faster RAM means, well, faster RAM. Sounds logical right? But after looking at my computer I noticed that...
2009/09/10
[ "https://superuser.com/questions/38837", "https://superuser.com", "https://superuser.com/users/-1/" ]
> > So my question is: Is this in fact > true that I can actually improve the > performance of my system if a program > I run is accessing the memory in a > truly random fashion (as opposed to > sequential read/writes) by under > clocking the RAM and selecting a > tighter timing or have I made an error > somew...
This pretty much goes over it <http://www.pcstats.com/articleview.cfm?articleID=873>
38,837
I've been kind of interested in the mechanics (er, electronics) of computer systems lately and after a bunch of research and looking at my computer's properties, I've come across something strange. Most people say faster RAM means, well, faster RAM. Sounds logical right? But after looking at my computer I noticed that...
2009/09/10
[ "https://superuser.com/questions/38837", "https://superuser.com", "https://superuser.com/users/-1/" ]
Typically, you'd gain more benefit by higher MHz vs. lower CAS timings. In a general case, even though your CAS timings may be increased to 5-5-5-15 from 4-4-4-12, for example, the extra 133MHz of clock speed gained will allow the memory to go through those CAS cycles in **less** time, thereby being "faster" in terms o...
This pretty much goes over it <http://www.pcstats.com/articleview.cfm?articleID=873>
38,837
I've been kind of interested in the mechanics (er, electronics) of computer systems lately and after a bunch of research and looking at my computer's properties, I've come across something strange. Most people say faster RAM means, well, faster RAM. Sounds logical right? But after looking at my computer I noticed that...
2009/09/10
[ "https://superuser.com/questions/38837", "https://superuser.com", "https://superuser.com/users/-1/" ]
You can use the performance index described here: <http://www.anandtech.com/show/7364/memory-scaling-on-haswell/10> I am not sure how it applies to low speed rams, but in your case: ``` 333/5 = 66.6 266/4 = 66.5 200/3 = 66.7 ``` So in theory it does not matter which settings you choose.
This pretty much goes over it <http://www.pcstats.com/articleview.cfm?articleID=873>
38,837
I've been kind of interested in the mechanics (er, electronics) of computer systems lately and after a bunch of research and looking at my computer's properties, I've come across something strange. Most people say faster RAM means, well, faster RAM. Sounds logical right? But after looking at my computer I noticed that...
2009/09/10
[ "https://superuser.com/questions/38837", "https://superuser.com", "https://superuser.com/users/-1/" ]
Typically, you'd gain more benefit by higher MHz vs. lower CAS timings. In a general case, even though your CAS timings may be increased to 5-5-5-15 from 4-4-4-12, for example, the extra 133MHz of clock speed gained will allow the memory to go through those CAS cycles in **less** time, thereby being "faster" in terms o...
> > So my question is: Is this in fact > true that I can actually improve the > performance of my system if a program > I run is accessing the memory in a > truly random fashion (as opposed to > sequential read/writes) by under > clocking the RAM and selecting a > tighter timing or have I made an error > somew...
38,837
I've been kind of interested in the mechanics (er, electronics) of computer systems lately and after a bunch of research and looking at my computer's properties, I've come across something strange. Most people say faster RAM means, well, faster RAM. Sounds logical right? But after looking at my computer I noticed that...
2009/09/10
[ "https://superuser.com/questions/38837", "https://superuser.com", "https://superuser.com/users/-1/" ]
Typically, you'd gain more benefit by higher MHz vs. lower CAS timings. In a general case, even though your CAS timings may be increased to 5-5-5-15 from 4-4-4-12, for example, the extra 133MHz of clock speed gained will allow the memory to go through those CAS cycles in **less** time, thereby being "faster" in terms o...
You can use the performance index described here: <http://www.anandtech.com/show/7364/memory-scaling-on-haswell/10> I am not sure how it applies to low speed rams, but in your case: ``` 333/5 = 66.6 266/4 = 66.5 200/3 = 66.7 ``` So in theory it does not matter which settings you choose.
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
[SharpDevelop](http://www.icsharpcode.net/OpenSource/SD/) and Visual Studio will both work. You can also use the Windows version of [MonoDevelop](http://www.monodevelop.com/).
I would recommend [#develop](http://www.icsharpcode.net/OpenSource/SD/) or check out the status of porting [MonoDevelop](http://www.monodevelop.com/MonoDevelopWin32) (A fork of #develop) back to Windows.
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
[SharpDevelop](http://www.icsharpcode.net/OpenSource/SD/) and Visual Studio will both work. You can also use the Windows version of [MonoDevelop](http://www.monodevelop.com/).
SharpDevelop comes to mind... I've found this quick howto for setting up a development environment with it and Mono and windows: <http://yacoding.blogspot.com/2006/04/howto-mono-sharpdevelop-and-firebird.html>