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
381,520
I am stuck with the simple expression $$ \frac{\cos^2(\theta + \alpha)}{1 - \cos^2(\theta - \alpha)} = \text{const.} $$ where $\theta$ is a variable and $\alpha$ is the number satisfying $$ \alpha = \tan^{-1} (\frac{4}{3})\,. $$ I cannot see it to be immediate, somehow I am missing a particular trigonometric identity. ...
2013/05/04
[ "https://math.stackexchange.com/questions/381520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/22194/" ]
$$ \cos(\theta+\alpha) = \cos\theta\cos\alpha-\sin\theta\sin\alpha. $$ We have $\tan\alpha=\dfrac43$ so if $\mathrm{opp}=4$ and $\mathrm{adj}=3$ then $\mathrm{hyp}=5$ by the Pythagorean theorem, so $\sin\alpha=\dfrac{\mathrm{opp}}{\mathrm{hyp}}= \dfrac45$ and $\cos\alpha=\dfrac35$. Consequently $\cos^2(\theta+\alpha)...
**Hint:** Draw a right angled triangle. You know the sides(How?)
381,520
I am stuck with the simple expression $$ \frac{\cos^2(\theta + \alpha)}{1 - \cos^2(\theta - \alpha)} = \text{const.} $$ where $\theta$ is a variable and $\alpha$ is the number satisfying $$ \alpha = \tan^{-1} (\frac{4}{3})\,. $$ I cannot see it to be immediate, somehow I am missing a particular trigonometric identity. ...
2013/05/04
[ "https://math.stackexchange.com/questions/381520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/22194/" ]
$$ \cos(\theta+\alpha) = \cos\theta\cos\alpha-\sin\theta\sin\alpha. $$ We have $\tan\alpha=\dfrac43$ so if $\mathrm{opp}=4$ and $\mathrm{adj}=3$ then $\mathrm{hyp}=5$ by the Pythagorean theorem, so $\sin\alpha=\dfrac{\mathrm{opp}}{\mathrm{hyp}}= \dfrac45$ and $\cos\alpha=\dfrac35$. Consequently $\cos^2(\theta+\alpha)...
$\tan\alpha=\frac{4}{3}$,then one solution of $\sin\alpha=\frac{4}{5},\cos\alpha=\frac{3}{5}$,the other is $\sin\alpha=-\frac{4}{5},\cos\alpha=-\frac{3}{5}$. If your conclusion is right. The value of left hand does not depend on $\theta$, so we choose free, for easy calculation. I prefer $\theta=0$,the result is $\fra...
381,520
I am stuck with the simple expression $$ \frac{\cos^2(\theta + \alpha)}{1 - \cos^2(\theta - \alpha)} = \text{const.} $$ where $\theta$ is a variable and $\alpha$ is the number satisfying $$ \alpha = \tan^{-1} (\frac{4}{3})\,. $$ I cannot see it to be immediate, somehow I am missing a particular trigonometric identity. ...
2013/05/04
[ "https://math.stackexchange.com/questions/381520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/22194/" ]
**Hint:** Draw a right angled triangle. You know the sides(How?)
$\tan\alpha=\frac{4}{3}$,then one solution of $\sin\alpha=\frac{4}{5},\cos\alpha=\frac{3}{5}$,the other is $\sin\alpha=-\frac{4}{5},\cos\alpha=-\frac{3}{5}$. If your conclusion is right. The value of left hand does not depend on $\theta$, so we choose free, for easy calculation. I prefer $\theta=0$,the result is $\fra...
119,347
I installed (twice) Ubuntu x64 11.10 and it does boot (most of the time, sometimes it gets stuck with this problem [My fresh installation doesn't load. (PulseAudio problem)](https://askubuntu.com/questions/67430/my-fresh-installation-doesnt-load-pulseaudio-problem)) The little startup sound plays, I see a background, ...
2012/04/06
[ "https://askubuntu.com/questions/119347", "https://askubuntu.com", "https://askubuntu.com/users/5915/" ]
I got around it by changing .dmrc Session=ubuntu to Session=gnome-2d I then installed the proprietary driver for my Radeon card and restored Session=ubuntu and it worked after that.
Try yo install am early version, if it works, then upgrade to latest version, also you can try a x86 version
324,965
Like the title says, those buttons look terrible when customers aren't logged in, and the functionality ins't needed, so how can I disable favorites and compare for people who aren't logged in? Thanks
2020/10/22
[ "https://magento.stackexchange.com/questions/324965", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/82392/" ]
We can disable Add to cart and Wishlist for Not Logged in User by "layout\_generate\_blocks\_after" event Create these files in a custom module. > > etc/events.xml > > > ``` <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <...
By default, there is no way to disable wishlist and add to the cart for only not-logged in customers. You can only disable totally wishlist In my case, I was already been struggled to disable add to cart for not logged in but finally, came up with some additional extensions.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For Kotliners: ``` android{ defaultConfig { // ... kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest"){ assets.srcDirs(File(projectDir, "schemas")) } ...
For me it helps, when I add this (I simply forgot it). Maybe it helps someone ``` sourceSets { androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) } ```
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For me it helps, when I add this (I simply forgot it). Maybe it helps someone ``` sourceSets { androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) } ```
I had a similar problem to Zookey. All I was doing wrong was looking for a schema file that didn't exist. I was testing migration 8 to 9, but version 8.json wasn't generated. I had to created my database from version 9.json instead, and test from there.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For me it helps, when I add this (I simply forgot it). Maybe it helps someone ``` sourceSets { androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) } ```
Happens because the json schema for the migration version is not found in schemas folder. For instance, if you are testing migration from version 1 to 2, the file /schemas/\*/1.json **must exist**.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For Kotliners: ``` android{ defaultConfig { // ... kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest"){ assets.srcDirs(File(projectDir, "schemas")) } ...
I had a similar problem to Zookey. All I was doing wrong was looking for a schema file that didn't exist. I was testing migration 8 to 9, but version 8.json wasn't generated. I had to created my database from version 9.json instead, and test from there.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For Kotliners: ``` android{ defaultConfig { // ... kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest"){ assets.srcDirs(File(projectDir, "schemas")) } ...
This solution in Kotlin is: Add the following to `build.gradle(app)`: ``` android { defaultConfig { kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest") { assets.srcDirs(files(projectDir, "schemas")) } } de...
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
For Kotliners: ``` android{ defaultConfig { // ... kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest"){ assets.srcDirs(File(projectDir, "schemas")) } ...
Happens because the json schema for the migration version is not found in schemas folder. For instance, if you are testing migration from version 1 to 2, the file /schemas/\*/1.json **must exist**.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
This solution in Kotlin is: Add the following to `build.gradle(app)`: ``` android { defaultConfig { kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest") { assets.srcDirs(files(projectDir, "schemas")) } } de...
I had a similar problem to Zookey. All I was doing wrong was looking for a schema file that didn't exist. I was testing migration 8 to 9, but version 8.json wasn't generated. I had to created my database from version 9.json instead, and test from there.
51,155,165
I have created migration from 1 to 2 version of my database. I have the app in a few modules like: * app * data * domain I have tried adding this into build.gradle of app and data modules: ``` javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/sch...
2018/07/03
[ "https://Stackoverflow.com/questions/51155165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955836/" ]
This solution in Kotlin is: Add the following to `build.gradle(app)`: ``` android { defaultConfig { kapt { arguments { arg("room.schemaLocation", "$projectDir/schemas") } } } sourceSets { getByName("androidTest") { assets.srcDirs(files(projectDir, "schemas")) } } de...
Happens because the json schema for the migration version is not found in schemas folder. For instance, if you are testing migration from version 1 to 2, the file /schemas/\*/1.json **must exist**.
136,111
After I draw for example a face, I want to move the hair to different layer, and the eyes to another layer, so I can move them forward or backward proportional to another elements of the drawing.
2019/04/03
[ "https://blender.stackexchange.com/questions/136111", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/52180/" ]
In edit mode, you can select strokes and assign them to the layer of your choice with the shortcut M or by going to the Stroke menu -> "Move to layer" [![enter image description here](https://i.stack.imgur.com/832fo.png)](https://i.stack.imgur.com/832fo.png)
This is a workaround of what you asked for, but you can set the visibility of the strokes as dependent by their 3D location (Y axis) and, in edit mode, select and move all the vertices of a stroke to have them appear forward or backward. [![enter image description here](https://i.stack.imgur.com/s2R9e.jpg)](https://i....
68,650,305
I need help on a Group Project my team and i are working on: We've seen a youtube video that presents us with a great project, and we're trying to launch it on our pc in order to understand it more and get a better idea. The project is made with: MongoDB, Express, React, Nodejs, Featuring JWT, Mongoose, Multer, Bcrypt...
2021/08/04
[ "https://Stackoverflow.com/questions/68650305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15942751/" ]
*android:requestLegacyExternalStorage="true"* is not permitted if sdktarget is 30 try to remove this
I had same problem for android apps generated by delphi 10.1 berlin but when my phone upgraded to android 12, suddenly my apps run! The interesting matter was this: I even never recompiled my apps! I think there is some bug in Android 11 and it is now resolved in Android 12!
6,077,370
I want to determine if any variadic class template is the base of another class. Typically I'd use std::is\_base\_of, but I don't think my use case fits, and I'm not sure if there's already something in std or boost to handle this. I want the variadic base class template's parameter pack to come from another variadic c...
2011/05/20
[ "https://Stackoverflow.com/questions/6077370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/376331/" ]
``` template <template<typename...> class A, typename B, typename ArgsC> struct is_variadic_base_of; template <template<typename...> class A, typename B, template<typename...> class C, typename ...ArgsC> struct is_variadic_base_of<A, B, C<ArgsC...>> : std::is_base_of<A<ArgsC...>, B> {}; ``` Hope it helps...
You're nearly there, but try it with a partial specialization: ``` template< template<class...> class A, class B, class C > struct is_variadic_base_of; // partial spec template< template<class...> class A, class B, template<class...> class C, class... ArgsC > struct is_variadic_base_of< A,B,C<ArgsC...> > ...
24,091,447
I am new to PHP so any help on the following would be really appreciated: I am trying to run a query with a WHERE condition, but I only want to apply the where condition if the variable has been set (via a radio button). I basically want to be able to say - if a variable is not set, do not include it in the where con...
2014/06/06
[ "https://Stackoverflow.com/questions/24091447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3711247/" ]
You can do this with an array, but first of all **DO NOT BUILD QUERIES THIS WAY** since you'll be vulnerable to SQL injection. Use [PDO](http://it2.php.net/pdo_mysql) instead. The idea is to have a list of suitable conditions: ``` $conds = [ 'brand', 'category', 'name' ]; $where = [ ]; // Empty array foreach ($cond...
you have to incluide all inside if(){} ``` if(isset($_POST['category']) && isset($_POST['brand'])){ $q = 'SELECT name, category, brand, price, imageurl, purchaselink FROM clothes WHERE category = "'.$_POST['category'].'" AND brand = "'.$_POST['brand'].'"'; } ```
24,091,447
I am new to PHP so any help on the following would be really appreciated: I am trying to run a query with a WHERE condition, but I only want to apply the where condition if the variable has been set (via a radio button). I basically want to be able to say - if a variable is not set, do not include it in the where con...
2014/06/06
[ "https://Stackoverflow.com/questions/24091447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3711247/" ]
You can do this with an array, but first of all **DO NOT BUILD QUERIES THIS WAY** since you'll be vulnerable to SQL injection. Use [PDO](http://it2.php.net/pdo_mysql) instead. The idea is to have a list of suitable conditions: ``` $conds = [ 'brand', 'category', 'name' ]; $where = [ ]; // Empty array foreach ($cond...
I use this technique to make my filters : ``` $q = 'SELECT name, category, brand, price, imageurl, purchaselink FROM clothes WHERE 1=1 '; if(isset($_POST['category'])) $q .= ' AND category ="'.$_POST['category'].'"'; if(isset($_POST['brand'])) $q .= ' AND brand = "'.$_POST['brand'].'"'; // here you can add other fil...
52,260,526
Trying to print pattern like half sphere below i have added actual output and expected output along with my code can anyone help how to do it. Thanks in advance **My code** ``` public class PatternHalfSphere { public static void main(String[] args) { int i,j; for(i = 1;i<=4;i++){ Syst...
2018/09/10
[ "https://Stackoverflow.com/questions/52260526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This answer takes your exact code, and with a few changes arrives at the output you expect. You were close, and you only needed to print a spacer on each line, and also cut one iteration off your second outer `for` loop to avoid printing `*` twice. ``` for (int i=1;i <= 3; i++) { for (int k=3; k >= i; k--) { ...
Firstly, initialize k with the rest of the variables. ``` int i, j, k; ``` Then you should decide which for-loop will be responsible for the single '\*' printed and adjust the other accordingly. For example, if you terminate the first loop 1 step sooner it should fix the gap between the 2 parts. Now I am keeping th...
52,260,526
Trying to print pattern like half sphere below i have added actual output and expected output along with my code can anyone help how to do it. Thanks in advance **My code** ``` public class PatternHalfSphere { public static void main(String[] args) { int i,j; for(i = 1;i<=4;i++){ Syst...
2018/09/10
[ "https://Stackoverflow.com/questions/52260526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Quick and dirty solution ``` public static void main(String[] args) { upperHalf(4); bottomHalf(4); } private static void upperHalf(int size) { for(int row = 0; row<size; row++){ String rowContent = ""; for(int col=0; col<size-row; col++){ rowCon...
Firstly, initialize k with the rest of the variables. ``` int i, j, k; ``` Then you should decide which for-loop will be responsible for the single '\*' printed and adjust the other accordingly. For example, if you terminate the first loop 1 step sooner it should fix the gap between the 2 parts. Now I am keeping th...
45,220,375
Lets say I have a @ViewScoped Bean behind my current page A. Now the user navigates to page B via a normal get request, lets say to www.google.com. When the user clicks the back button of the browser, I would like to restore the @ViewScope of the previous page, so that it appears exactly as it was left. Is that possib...
2017/07/20
[ "https://Stackoverflow.com/questions/45220375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6307355/" ]
use this formula: ``` =IF(B2="Spouse","",IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($C$2:$C$4)/(($C$2:$C$4=C2)*($A$2:$A$4<>A2)),1)),"No Spouse")) ``` [![enter image description here](https://i.stack.imgur.com/awzYM.png)](https://i.stack.imgur.com/awzYM.png) --- As per your new data: ``` =IF(B2="Spouse",IFERROR(INDEX(A:...
Alternate formula for backwards compatibility (in cell D2 and copied down): ``` =IF(OR(COUNTIF(C:C,C2)=1,B2="Child"),"No Spouse",INDEX($A$2:$A$4,MATCH(1,INDEX(($C$2:$C$4=C2)*($A$2:$A$4<>A2),),0))) ```
234,010
Suppose I am in an empty directory. If I now create a Makefile containing nothing but `all: randomFilename` and an empty file called `randomFilename.sh`, then GNU Make will perform `cat randomFilename.sh >randomFilename; chmod a+x randomFilename` when `make` is called. ``` $ echo 'all: randomFilename' > Makefile $ mak...
2015/10/05
[ "https://unix.stackexchange.com/questions/234010", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/42056/" ]
This behaviour is the result of the built-in suffix rules of Make (in this case for legacy versions of the Source Code Control System [[1](https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html)]). The built-in suffix rules can be disabled by specifying an empty `.SUFFIXES` pseudo-target [[2](http:/...
The behavior you describe does not depend on the make program but on the shell. If you have a POSIX shell and if you let every command line in the makefile start with: `set -o noclobber;` existing files will no longer be overwritten with the `>`operator. Note that this still does not affect other programs that migh...
58,412,426
Following the documentation [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/), I could set the threshold for container startup like so: ``` startupProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 30 periodSeconds: 10 ``` Un...
2019/10/16
[ "https://Stackoverflow.com/questions/58412426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3190146/" ]
Yes, `startupProbe` was [introduced with 1.16](https://github.com/kubernetes/enhancements/issues/950) - so you cannot use it with Kubernetes 1.12. I am guessing you are defining a `livenessProbe` - so the easiest way to get around your problem is to remove the `livenessProbe`. Most applications won't need one (some wo...
If you have a probe, you could specify `initialDelaySeconds` and make it some large value that is sufficient for your container to start up. If you didn't care about probes at all, then you could just let it execute a command that will never fail e.g. `whoami` Take what you need from the example below: ``` readiness...
58,412,426
Following the documentation [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/), I could set the threshold for container startup like so: ``` startupProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 30 periodSeconds: 10 ``` Un...
2019/10/16
[ "https://Stackoverflow.com/questions/58412426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3190146/" ]
Yes, `startupProbe` was [introduced with 1.16](https://github.com/kubernetes/enhancements/issues/950) - so you cannot use it with Kubernetes 1.12. I am guessing you are defining a `livenessProbe` - so the easiest way to get around your problem is to remove the `livenessProbe`. Most applications won't need one (some wo...
I know this is not an answer for this question, but can be useful... "startupProbes" comes with k8s 1.16+. If you are suing helm you can surround your block startupProbes with this in your template: ``` {{- if (semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion) }} startupProbe: httpGet: path: /heal...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
Starting with Windows Vista, Microsoft changed that way that Windows installs itself. It now provides a generic image that is copied to the hard drive. This image will then boot and configure itself for whatever hardware it finds. What that means for you is that the likelihood of success from the kind of thing you're...
I have done this. My main computer had an Asus board and a dual core processor. I decided I wanted to use that system as my TV computer and I built a new gaming computer with a gigabyte board and quad core processor. I took the hard drive out of my main computer (it dual boots Ubuntu and Windows 7) and put it in the ne...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
I have done this a few times. Windows now does an absolutely amazing job of handling it compared to any other OS or past Windows version. It has worked every time for me. But that may not be the case for you.
I have done this. My main computer had an Asus board and a dual core processor. I decided I wanted to use that system as my TV computer and I built a new gaming computer with a gigabyte board and quad core processor. I took the hard drive out of my main computer (it dual boots Ubuntu and Windows 7) and put it in the ne...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
One of the biggest problems with reusing Operating Systems is regarding drivers. I am not sure how Windows 7 will handle it, but back in the XP days (last year...) XP would oftentimes have problems with such dramatic switches in hardware as it experiences with a mainboard swap. Sometimes this might crash the computer, ...
I have done this a few times. Windows now does an absolutely amazing job of handling it compared to any other OS or past Windows version. It has worked every time for me. But that may not be the case for you.
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
I have done this a few times. Windows now does an absolutely amazing job of handling it compared to any other OS or past Windows version. It has worked every time for me. But that may not be the case for you.
I agree with what others are saying.. Try it, it's better these days, it may 'just work' and it shouldn't have an effect on your old drive if it doesn't. Aside from that: Windows 7 has system image backup and restore capabilities built-in; which should allow you to back it up to an external target on the old hardware,...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
I have done this a few times. Windows now does an absolutely amazing job of handling it compared to any other OS or past Windows version. It has worked every time for me. But that may not be the case for you.
I've done this multiple times. You may need to reinstall some drivers, and if one of those drivers is for your network card it may be challenging to get new ones unless you have another PC. Besides that it should work fine.
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
One of the biggest problems with reusing Operating Systems is regarding drivers. I am not sure how Windows 7 will handle it, but back in the XP days (last year...) XP would oftentimes have problems with such dramatic switches in hardware as it experiences with a mainboard swap. Sometimes this might crash the computer, ...
I have done this. My main computer had an Asus board and a dual core processor. I decided I wanted to use that system as my TV computer and I built a new gaming computer with a gigabyte board and quad core processor. I took the hard drive out of my main computer (it dual boots Ubuntu and Windows 7) and put it in the ne...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
Starting with Windows Vista, Microsoft changed that way that Windows installs itself. It now provides a generic image that is copied to the hard drive. This image will then boot and configure itself for whatever hardware it finds. What that means for you is that the likelihood of success from the kind of thing you're...
I've done this multiple times. You may need to reinstall some drivers, and if one of those drivers is for your network card it may be challenging to get new ones unless you have another PC. Besides that it should work fine.
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
Starting with Windows Vista, Microsoft changed that way that Windows installs itself. It now provides a generic image that is copied to the hard drive. This image will then boot and configure itself for whatever hardware it finds. What that means for you is that the likelihood of success from the kind of thing you're...
I agree with what others are saying.. Try it, it's better these days, it may 'just work' and it shouldn't have an effect on your old drive if it doesn't. Aside from that: Windows 7 has system image backup and restore capabilities built-in; which should allow you to back it up to an external target on the old hardware,...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
One of the biggest problems with reusing Operating Systems is regarding drivers. I am not sure how Windows 7 will handle it, but back in the XP days (last year...) XP would oftentimes have problems with such dramatic switches in hardware as it experiences with a mainboard swap. Sometimes this might crash the computer, ...
Starting with Windows Vista, Microsoft changed that way that Windows installs itself. It now provides a generic image that is copied to the hard drive. This image will then boot and configure itself for whatever hardware it finds. What that means for you is that the likelihood of success from the kind of thing you're...
172,453
HI, I have a "old" system with Windows 7 installed. Now I have a new mainboard and a processor. Is there a way I can use my "old" hdd instead of reinstalling windows 7 again?
2010/08/05
[ "https://superuser.com/questions/172453", "https://superuser.com", "https://superuser.com/users/11495/" ]
One of the biggest problems with reusing Operating Systems is regarding drivers. I am not sure how Windows 7 will handle it, but back in the XP days (last year...) XP would oftentimes have problems with such dramatic switches in hardware as it experiences with a mainboard swap. Sometimes this might crash the computer, ...
I agree with what others are saying.. Try it, it's better these days, it may 'just work' and it shouldn't have an effect on your old drive if it doesn't. Aside from that: Windows 7 has system image backup and restore capabilities built-in; which should allow you to back it up to an external target on the old hardware,...
58,380,640
I have a Java Kafka application that consumes from a topic. Sometimes it encounters `INVALID_FETCH_SESSION_EPOCH` error. After restarting the app it doesn't start consuming again. When I change the `StreamsConfig.APPLICATION_ID_CONFIG` it starts consuming but obviously not from the same offset. What is the reason that ...
2019/10/14
[ "https://Stackoverflow.com/questions/58380640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1600162/" ]
I could not find any explanation to the MessageBox working on a case and not on the other one. I ended up going to some log solution using FileStream.WriteAsync. Hence everything keeps async and I don't have to use MessageBox anymore.
use `await JoinableTaskFactory.SwitchToMainThreadAsync();` to switch to the main thread `JoinableTaskFactory` is a member of `AsyncPackage`. If it still doesn't work try ``` public static void ShowMessageBox(string title, string text) { Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThrea...
25,185,553
Here's my code: ``` $jsonData = file_get_contents('http://example.com/bin/serp.php?engine=google&phrase=$name'); ``` It doesn't appear to be using `$name` correctly. How would I add that variable into my string like I'm trying to do?
2014/08/07
[ "https://Stackoverflow.com/questions/25185553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3918845/" ]
Change the single quotes to double quotes. PHP variables are *not* interpolated when in single quotes. ``` $jsonData = file_get_contents("http://example.com/bin/serp.php?engine=google&phrase=$name"); ``` You can also use concatenation here: ``` $jsonData = file_get_contents('http://example.com/bin/serp.php?engine=g...
Either change the single quotes around your string to double quotes: ``` "http://example.com/bin/serp.php?engine=google&phrase=$name" ``` Or use string concatenation with the `.` operator: ``` 'http://example.com/bin/serp.php?engine=google&phrase=' . $name ``` Both of these techniques are mentioned on [PHP's Stri...
40,854
I am trying to create a separate thread for my enemy's A\* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this seems to cause jittering in the game every-time the thread is called. I have tried calling just the method and this wo...
2012/10/29
[ "https://gamedev.stackexchange.com/questions/40854", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/18874/" ]
*I don't know why 2 people voted to close this as I think it is a legitimate questions that isn't more localized than XNA and threading* Starting a new thread is relatively expensive and might cause a tiny bit of jittering when you only have 15ms to build a new frame. The best way to overcome this is by using the a th...
What i´ve learnd of threading is that you create one or more thread(s), and run it parrallel with the game, nonstop. and when you need data there procsed, you simply push a job (a function with data) to that thread and it will take care of it, and when it´s done doing that it just keeps running. That way you dont have ...
37,387,463
I'm sending an email in background with a fixed gmail email address (public static final String EMAIL = "abc@gmail.com" and a fixed password (public static final String PASSWORD = "abcd". Now I want to change that. The user should be able to change the email address and send the email with his personal one. Unfortunat...
2016/05/23
[ "https://Stackoverflow.com/questions/37387463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6370436/" ]
If you have a new-enough version of the command-line, use `p4 -E P4EDITOR="custom editor" command...`; The '-E' flag is described in `p4 help undoc`, and is specifically intended for overriding variables like P4EDITOR in this way. Alternately, try setting the environment variable P4CONFIG to something other than ".p4c...
Use P4CONFIG="" to tell Perforce to not look into P4CONFIG files at all.
37,387,463
I'm sending an email in background with a fixed gmail email address (public static final String EMAIL = "abc@gmail.com" and a fixed password (public static final String PASSWORD = "abcd". Now I want to change that. The user should be able to change the email address and send the email with his personal one. Unfortunat...
2016/05/23
[ "https://Stackoverflow.com/questions/37387463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6370436/" ]
Th best approach would be to upgrade the p4 version and do `p4 -E P4EDITOR="custom editor"` as suggested by @Bryan. If upgrading P4 is not an option then copy the the existing .p4config file to a temp file and add `P4EDITOR=custom editor` to the temporary config file. If the `P4EDITOR` is already set, then modify it i...
Use P4CONFIG="" to tell Perforce to not look into P4CONFIG files at all.
31,525,464
I am working to make a dashboard in MS PowerView but having some trouble creating "slicers" for my dashboard. A slicer is basically a filter for the whole dashboard which filters out the whole display based on what is selected. For example, I am working with a survey so if we click on person type 1 under the "person" s...
2015/07/20
[ "https://Stackoverflow.com/questions/31525464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5136511/" ]
You can make a slicer that allows users to choose the measure to be shown in charts on the canvas. But as Rory said, you cannot use it to show/hide graphs. It would just change the measure used in the graphs. [Jason Thomas](http://www.sqljason.com/2012/11/measure-selection-using-slicers-in.html) has a good blog post ...
A slicer is usually an attribute of one of your dimensions. When you filter on that attribute the filter applies also to your fact table. So if you have a dimension with three entries: average, median and mode it would be possible to create one fact table that stacks the average, median and mode values so that when the...
16,401,330
I have to tables (tbla and tblb) with each one col (id): select \* from tbla; ``` ID --- 1 3 5#A select * from tblb; ID --- 2 3 ``` Now I need a full join: ``` select a.id, b.id from tbla a full outer join tblb b on b.id = a.id; ID ID1 -------- 1 3 3 5#A 2 ``` ... but without entries containing a #...
2013/05/06
[ "https://Stackoverflow.com/questions/16401330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/651315/" ]
Because when you do a `full outer join`, columns on either side can end up with a `NULL` value. Explicitly check for NULL: ``` select a.id, b.id from tbla a full outer join tblb b on b.id = a.id where a.id not like '%#%' or a.id is null; ``` (Originally, I had suggested moving the logic to the `on` clause. Alas, th...
When you do outer joins, you have to do your filtering in the from clause. If you do it in the where clause your join effectively becomes an inner join. So change this: ``` full outer join tblb b on b.id = a.id where a.id not like '%#%' ``` to this ``` full outer join tblb b on b.id = a.id and a.id not like '%#%' ...
16,401,330
I have to tables (tbla and tblb) with each one col (id): select \* from tbla; ``` ID --- 1 3 5#A select * from tblb; ID --- 2 3 ``` Now I need a full join: ``` select a.id, b.id from tbla a full outer join tblb b on b.id = a.id; ID ID1 -------- 1 3 3 5#A 2 ``` ... but without entries containing a #...
2013/05/06
[ "https://Stackoverflow.com/questions/16401330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/651315/" ]
Because when you do a `full outer join`, columns on either side can end up with a `NULL` value. Explicitly check for NULL: ``` select a.id, b.id from tbla a full outer join tblb b on b.id = a.id where a.id not like '%#%' or a.id is null; ``` (Originally, I had suggested moving the logic to the `on` clause. Alas, th...
You are doing a full join, but by specifying a.id in the where clause, you filter your result set afterwards. To achieve what you want, you can either move the clause into the join condition: ``` select a.id, b.id from tbla a full outer join tblb b on b.id = a.id and a.id not like '%#%'; ``` Or you can use nvl...
50,813,094
I am trying to make the text appear below the zoomed images but they keep on appearing at the back and the images seem to eat up all the space in the post body. When I try to use `<p></p>` , the text is outside of the text body. I use a Blogger blog and I just copied the code from Krz Szzz codepen: <https://codepen....
2018/06/12
[ "https://Stackoverflow.com/questions/50813094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9929107/" ]
Two minutes ago i had the same problem. Just downgrade react-navigation version to 2.2.0, this fixed my problem.
Upgrading react-navigation-redux-helpers in the package.json to version 2.0.8 solved this issue for me.
50,813,094
I am trying to make the text appear below the zoomed images but they keep on appearing at the back and the images seem to eat up all the space in the post body. When I try to use `<p></p>` , the text is outside of the text body. I use a Blogger blog and I just copied the code from Krz Szzz codepen: <https://codepen....
2018/06/12
[ "https://Stackoverflow.com/questions/50813094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9929107/" ]
Two minutes ago i had the same problem. Just downgrade react-navigation version to 2.2.0, this fixed my problem.
Steps to resolve 1. Upgrading react-navigation-redux-helpers in the package.json to version 2.0.8. 2. Do not pass nav navigation prop down to your appNavigator, as in React-Navigation@latest persist its on state. So instead of doing this `<Provider> <AppNavigation navigation={navigation}/> <Provider>` do this `...
50,813,094
I am trying to make the text appear below the zoomed images but they keep on appearing at the back and the images seem to eat up all the space in the post body. When I try to use `<p></p>` , the text is outside of the text body. I use a Blogger blog and I just copied the code from Krz Szzz codepen: <https://codepen....
2018/06/12
[ "https://Stackoverflow.com/questions/50813094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9929107/" ]
Steps to resolve 1. Upgrading react-navigation-redux-helpers in the package.json to version 2.0.8. 2. Do not pass nav navigation prop down to your appNavigator, as in React-Navigation@latest persist its on state. So instead of doing this `<Provider> <AppNavigation navigation={navigation}/> <Provider>` do this `...
Upgrading react-navigation-redux-helpers in the package.json to version 2.0.8 solved this issue for me.
161,630
I looked for a way to change from HTTP to HTTPS. By mistake I switched my insecure and secure URL in config-web-secure/, and added the word magento to them both. As a result I get a 403 error on my admin panel and website. I tried changing the URL in the PHP but that didn't work.
2017/02/24
[ "https://magento.stackexchange.com/questions/161630", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/50611/" ]
I think you can set your sites secure and unsecure URLs from your database. For that in your database make some changes in `core_config_data` table. In table search `"web/"` from "search" tab in the header (using phpMyAdmin or similar). Edit `web/unsecure/base_url` and `web/secure/base_url` and paste the URL of ...
You can do database changes on core\_config\_data table using magerun command line tool for [Magento 1](https://github.com/netz98/n98-magerun) and for [Magento 2](https://github.com/netz98/n98-magerun2) After you have installed magerun, you should go to webroot and write the following command to get config from core...
53,539,305
Ok soI am sure this is some little obvious thing that I have missed, but I am new to both R and creating shiny apps, but am trying to teach myself both of them. I have a data table of RNA values (>20,000 genes from around 150 donors), and I am trying to create a simple shiny app to take 2 genes from the list, and disp...
2018/11/29
[ "https://Stackoverflow.com/questions/53539305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10100416/" ]
Hi you need to change from standard `aes` to `aes_string` in you ggplot call like this ``` server <- function(input, output) { output$corrPlot <- renderPlot({ ggplot(data = Short_cortex5, aes_string(x=input$gene_X, y=input$gene_Y)) + geom_point() }) } ``` this is because the values of the inputs are ...
All your app is currently doing is plotting the gene NAMEs against each other, hence you are only getting one point. You want to tell R to use the variable that corresponds to that name and plot that. The easiest way is to use `Non-standard evaluation` as follows: ``` require(rlang) output$corrPlot <- renderPlot({ ...
53,539,305
Ok soI am sure this is some little obvious thing that I have missed, but I am new to both R and creating shiny apps, but am trying to teach myself both of them. I have a data table of RNA values (>20,000 genes from around 150 donors), and I am trying to create a simple shiny app to take 2 genes from the list, and disp...
2018/11/29
[ "https://Stackoverflow.com/questions/53539305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10100416/" ]
All your app is currently doing is plotting the gene NAMEs against each other, hence you are only getting one point. You want to tell R to use the variable that corresponds to that name and plot that. The easiest way is to use `Non-standard evaluation` as follows: ``` require(rlang) output$corrPlot <- renderPlot({ ...
You can just use `get` its very generic and not specific to `ggplot` and can be used for other charts and tables you might have ``` output$corrPlot <- renderPlot({ ggplot(data = mtcars, aes(x=get(input$gene_X), y=get(input$gene_Y))) + geom_point() }) ```
53,539,305
Ok soI am sure this is some little obvious thing that I have missed, but I am new to both R and creating shiny apps, but am trying to teach myself both of them. I have a data table of RNA values (>20,000 genes from around 150 donors), and I am trying to create a simple shiny app to take 2 genes from the list, and disp...
2018/11/29
[ "https://Stackoverflow.com/questions/53539305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10100416/" ]
Hi you need to change from standard `aes` to `aes_string` in you ggplot call like this ``` server <- function(input, output) { output$corrPlot <- renderPlot({ ggplot(data = Short_cortex5, aes_string(x=input$gene_X, y=input$gene_Y)) + geom_point() }) } ``` this is because the values of the inputs are ...
You can just use `get` its very generic and not specific to `ggplot` and can be used for other charts and tables you might have ``` output$corrPlot <- renderPlot({ ggplot(data = mtcars, aes(x=get(input$gene_X), y=get(input$gene_Y))) + geom_point() }) ```
73,088,203
I want to detect mouse hovering over visual elements in .NET MAUI ( like buttons ). I cannot find any "onmouseover"/"ismouseover" events for this. How can I implement this.
2022/07/23
[ "https://Stackoverflow.com/questions/73088203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14242695/" ]
Have you tried doing something like this yet: ``` "scripts": { "protocol": "http://", "host": "127.0.0.1", "port": "80", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, ```
Create an .env file in the project root and type ``` PORT=3000 HOST=127.0.0.1 ```
73,088,203
I want to detect mouse hovering over visual elements in .NET MAUI ( like buttons ). I cannot find any "onmouseover"/"ismouseover" events for this. How can I implement this.
2022/07/23
[ "https://Stackoverflow.com/questions/73088203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14242695/" ]
Have you tried doing something like this yet: ``` "scripts": { "protocol": "http://", "host": "127.0.0.1", "port": "80", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, ```
Have you tried this: Click on the Start Menu Icon Type: ``` cmd ``` Right click on: ``` cmd.exe ``` Click on: ``` Run as Administrator ``` A command prompt will appear. In command prompt, type in: ``` notepad "C:\windows\system32\drivers\etc\hosts" ``` In the host file, Go to the line right underneath: `...
73,088,203
I want to detect mouse hovering over visual elements in .NET MAUI ( like buttons ). I cannot find any "onmouseover"/"ismouseover" events for this. How can I implement this.
2022/07/23
[ "https://Stackoverflow.com/questions/73088203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14242695/" ]
Have you tried doing something like this yet: ``` "scripts": { "protocol": "http://", "host": "127.0.0.1", "port": "80", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, ```
Create .env file in project root ```bash PORT=8080 # or other port ``` React app hosted on `localhost:PORT` <https://create-react-app.dev/docs/advanced-configuration>
6,774,055
I have a formula, that returns array. Is it possible to change range occupied for result of this formula? (programmatically)
2011/07/21
[ "https://Stackoverflow.com/questions/6774055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/626528/" ]
no, it's not possible. you have to delete the array and make a new one. from the [microsoft support website](https://support.office.com/en-us/article/Rules-for-changing-array-formulas-8A80C2C1-44C1-42C3-88C1-37A3A7C2D367): *you can't delete cells in an array formula (you'll see a "You cannot change part of an array" e...
Take a look at [this site from Microsoft](http://office.microsoft.com/en-us/excel-help/introducing-array-formulas-in-excel-HA001087290.aspx). Scroll down to the section called "Rules for entering and changing array formulas"
2,030,691
Can I count the number of elements with a specific attribute? For example all the images with the src attribute test.gif
2010/01/08
[ "https://Stackoverflow.com/questions/2030691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201140/" ]
Use the CSS **[attribute selectors](http://docs.jquery.com/Selectors/attributeEquals#attributevalue)** to filter on the attribute ``` $("img[src='test.gif']").length; ``` the **[size()](http://docs.jquery.com/Core/size)** and **[length](http://docs.jquery.com/Core/length)** both returns the number of elements matche...
You want size() so something like: something like: ``` $('img[src="test.gif"]').size(); ```
2,030,691
Can I count the number of elements with a specific attribute? For example all the images with the src attribute test.gif
2010/01/08
[ "https://Stackoverflow.com/questions/2030691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201140/" ]
Use the CSS **[attribute selectors](http://docs.jquery.com/Selectors/attributeEquals#attributevalue)** to filter on the attribute ``` $("img[src='test.gif']").length; ``` the **[size()](http://docs.jquery.com/Core/size)** and **[length](http://docs.jquery.com/Core/length)** both returns the number of elements matche...
if you want to check the presence of the attribute only ``` $('img[src]').length //or .size() ```
2,030,691
Can I count the number of elements with a specific attribute? For example all the images with the src attribute test.gif
2010/01/08
[ "https://Stackoverflow.com/questions/2030691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201140/" ]
if you want to check the presence of the attribute only ``` $('img[src]').length //or .size() ```
You want size() so something like: something like: ``` $('img[src="test.gif"]').size(); ```
8,841,670
Maybe a simple question but i have an activity that retrieves a bitmap(camerashot) from a folder on the sdcard. The activity's custom view extends viewgroup. i'd like to add the bitmap to the view then add that view to the view group then display. eventually there will be multiple views added in this way. what are the ...
2012/01/12
[ "https://Stackoverflow.com/questions/8841670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/532462/" ]
Get the parent view, and then dynamically append views to it. Of course the activity would have to do the preprocessing and also append those views to the view group. Ideally this should be done in an AsyncTask, so that your activity can handle its current function. When the AsyncTask finshes, either use a handler to...
I just needed to change the view to an ImageView and the above code worked. so i think Jox's advice is correct.... Get the parent Viewgroup then dynamically add views to it. if an image then use imageview.
55,405,593
I have a python script for a single URL and I need to run this for multiple URLs from url.txt and grab the output in a single txt file. Here is the python script (minified): ``` import urllib2 from bs4 import BeautifulSoup quote_page = 'https://www.example.com/page/1024' #Rest of the script here print var1 print var2...
2019/03/28
[ "https://Stackoverflow.com/questions/55405593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11259506/" ]
Use `li:not(:last-child)`. ```css body {background:#bbb;} .main-footer li:not(:last-child) a::after { content: " | "; color: white; margin: 0 25%; } ``` ```html <footer class="main-footer"> <ul> <li><a href="#">home</a></li> <li><a href="#">quienes</a></li> <li><a href="#">servicios</a><...
This should do it: ``` .main-footer li:last-of-type a::after { display: none; } ``` You essentially just need to target the `li:last-of-type a`, and hide their psuedo element.
55,405,593
I have a python script for a single URL and I need to run this for multiple URLs from url.txt and grab the output in a single txt file. Here is the python script (minified): ``` import urllib2 from bs4 import BeautifulSoup quote_page = 'https://www.example.com/page/1024' #Rest of the script here print var1 print var2...
2019/03/28
[ "https://Stackoverflow.com/questions/55405593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11259506/" ]
Just add below **CSS** will resolve your issue. Thanks ``` .main-footer li:last-child a::after { display: none; } ``` ```css body {background:#bbb;} .main-footer a::after { content: " | "; color: white; margin: 0 25%; } .main-footer li:last-child a::after { display: none; } ``` ```html <footer c...
This should do it: ``` .main-footer li:last-of-type a::after { display: none; } ``` You essentially just need to target the `li:last-of-type a`, and hide their psuedo element.
55,405,593
I have a python script for a single URL and I need to run this for multiple URLs from url.txt and grab the output in a single txt file. Here is the python script (minified): ``` import urllib2 from bs4 import BeautifulSoup quote_page = 'https://www.example.com/page/1024' #Rest of the script here print var1 print var2...
2019/03/28
[ "https://Stackoverflow.com/questions/55405593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11259506/" ]
Use `li:not(:last-child)`. ```css body {background:#bbb;} .main-footer li:not(:last-child) a::after { content: " | "; color: white; margin: 0 25%; } ``` ```html <footer class="main-footer"> <ul> <li><a href="#">home</a></li> <li><a href="#">quienes</a></li> <li><a href="#">servicios</a><...
This should work: ``` .main-footer li:last-of-type a::after { display: none; } ```
55,405,593
I have a python script for a single URL and I need to run this for multiple URLs from url.txt and grab the output in a single txt file. Here is the python script (minified): ``` import urllib2 from bs4 import BeautifulSoup quote_page = 'https://www.example.com/page/1024' #Rest of the script here print var1 print var2...
2019/03/28
[ "https://Stackoverflow.com/questions/55405593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11259506/" ]
Just add below **CSS** will resolve your issue. Thanks ``` .main-footer li:last-child a::after { display: none; } ``` ```css body {background:#bbb;} .main-footer a::after { content: " | "; color: white; margin: 0 25%; } .main-footer li:last-child a::after { display: none; } ``` ```html <footer c...
This should work: ``` .main-footer li:last-of-type a::after { display: none; } ```
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
Let $S$ be the span of $SO(N)$ . Then it's obvious that if $A \in S$ and $D\_1, D\_2 \in SO(N)$ then $D\_1^{-1} A D\_2 \in S$ . Therefore it's enough to show that $B := diag(1,0,...0) \in S$ . If $N$ is odd and $> 1$ then we can write $$B = \frac{1}{2} (\left[\begin{matrix}1&0\cr0&I\_{N-1}\end{matrix}\right] + \left...
This argument doesn't work for real orthogonal matrices as far as I can see, but it works for unitary matrices in the complex case, and is somewhat related to Robert Bryant's answer for the real case. It has appeared from time to time in the finite group representaton theory literature, though I'm not sure who first di...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
Clearly the span of $SO(n)$ contains the tangent space of $SO(n)$, the antisymmetric matrices. But it also contains the rotations by $\pi$ in any 2-plane, so contains the diagonal matrices with even numbers of $-1$ entries and all other entries $1$. Linear combinations of such easily contain the diagonal matrices. All ...
It is sufficient to prove the statement in the question only for matrices in the form $[1]\_{1\times 1}\oplus [0]\_{k}$, that is the rank-1 projections or $$\begin{pmatrix} 0&\lambda\\ -\lambda&0\end{pmatrix}\oplus[ 0]\_k\qquad (\*)$$ Assuming that the proof for such matrices is straithforward then the proof is complet...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
For $n>2$, the span of the matrices in $\mathrm{SO}(n)$ is the full space $M\_n(\mathbb{R})$ of $n$-by-$n$ matrices with real entries. One proof is using representation theory: If we let $S\subset M\_n(\mathbb{R})$ denote the span of $\mathrm{SO}(n)$, then notice that this span is invariant under the action of $\mathr...
Clearly the span of $SO(n)$ contains the tangent space of $SO(n)$, the antisymmetric matrices. But it also contains the rotations by $\pi$ in any 2-plane, so contains the diagonal matrices with even numbers of $-1$ entries and all other entries $1$. Linear combinations of such easily contain the diagonal matrices. All ...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
For $n>2$, the span of the matrices in $\mathrm{SO}(n)$ is the full space $M\_n(\mathbb{R})$ of $n$-by-$n$ matrices with real entries. One proof is using representation theory: If we let $S\subset M\_n(\mathbb{R})$ denote the span of $\mathrm{SO}(n)$, then notice that this span is invariant under the action of $\mathr...
Let $S$ be the span of $SO(N)$ . Then it's obvious that if $A \in S$ and $D\_1, D\_2 \in SO(N)$ then $D\_1^{-1} A D\_2 \in S$ . Therefore it's enough to show that $B := diag(1,0,...0) \in S$ . If $N$ is odd and $> 1$ then we can write $$B = \frac{1}{2} (\left[\begin{matrix}1&0\cr0&I\_{N-1}\end{matrix}\right] + \left...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
**Elementary proof**. The linear space $E$ spanned by $SO\_n$ is the orthogonal of those matrices $M$ such that $\langle M,Q\rangle:={\rm Tr}(MQ)=0$ for every $Q\in SO\_n$. Let $M=SR$ be a polar decomposition, where $S\in Sym\_n^+$ and $R\in O\_n$. This decomposition is unique with $S\in SPD\_n$ if $M$ is non-singular,...
This argument doesn't work for real orthogonal matrices as far as I can see, but it works for unitary matrices in the complex case, and is somewhat related to Robert Bryant's answer for the real case. It has appeared from time to time in the finite group representaton theory literature, though I'm not sure who first di...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
Let $S$ be the span of $SO(N)$ . Then it's obvious that if $A \in S$ and $D\_1, D\_2 \in SO(N)$ then $D\_1^{-1} A D\_2 \in S$ . Therefore it's enough to show that $B := diag(1,0,...0) \in S$ . If $N$ is odd and $> 1$ then we can write $$B = \frac{1}{2} (\left[\begin{matrix}1&0\cr0&I\_{N-1}\end{matrix}\right] + \left...
It is sufficient to prove the statement in the question only for matrices in the form $[1]\_{1\times 1}\oplus [0]\_{k}$, that is the rank-1 projections or $$\begin{pmatrix} 0&\lambda\\ -\lambda&0\end{pmatrix}\oplus[ 0]\_k\qquad (\*)$$ Assuming that the proof for such matrices is straithforward then the proof is complet...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
**Elementary proof**. The linear space $E$ spanned by $SO\_n$ is the orthogonal of those matrices $M$ such that $\langle M,Q\rangle:={\rm Tr}(MQ)=0$ for every $Q\in SO\_n$. Let $M=SR$ be a polar decomposition, where $S\in Sym\_n^+$ and $R\in O\_n$. This decomposition is unique with $S\in SPD\_n$ if $M$ is non-singular,...
Clearly the span of $SO(n)$ contains the tangent space of $SO(n)$, the antisymmetric matrices. But it also contains the rotations by $\pi$ in any 2-plane, so contains the diagonal matrices with even numbers of $-1$ entries and all other entries $1$. Linear combinations of such easily contain the diagonal matrices. All ...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
Let $S$ be the span of $SO(N)$ . Then it's obvious that if $A \in S$ and $D\_1, D\_2 \in SO(N)$ then $D\_1^{-1} A D\_2 \in S$ . Therefore it's enough to show that $B := diag(1,0,...0) \in S$ . If $N$ is odd and $> 1$ then we can write $$B = \frac{1}{2} (\left[\begin{matrix}1&0\cr0&I\_{N-1}\end{matrix}\right] + \left...
Clearly the span of $SO(n)$ contains the tangent space of $SO(n)$, the antisymmetric matrices. But it also contains the rotations by $\pi$ in any 2-plane, so contains the diagonal matrices with even numbers of $-1$ entries and all other entries $1$. Linear combinations of such easily contain the diagonal matrices. All ...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
**Elementary proof**. The linear space $E$ spanned by $SO\_n$ is the orthogonal of those matrices $M$ such that $\langle M,Q\rangle:={\rm Tr}(MQ)=0$ for every $Q\in SO\_n$. Let $M=SR$ be a polar decomposition, where $S\in Sym\_n^+$ and $R\in O\_n$. This decomposition is unique with $S\in SPD\_n$ if $M$ is non-singular,...
Here is an elementary proof but less elegant than the one indicated by @Robert Bryant. $\newcommand{\bR}{\mathbb{R}}$ $\DeclareMathOperator{\Mat}{Mat}$ $\DeclareMathOperator{\SO}{SO}$ Denote by $\Mat\_n(\bR)$ the vector space of $n\times n$ matrices with real entries. Then $\SO(n)\subset \Mat\_n(\bR)$ and I assume th...
310,316
(Disclaimer : I know very well that $SO(N)$ has a Lie algebra of dimension $N(N-1)/2$ etc. This absolutely not the point of my question.) To make my problem more understandable, I start with the example of $SO(2)$. All $SO(2)$ matrices $M$ can be written as ($\theta\in [0,2\pi[$) $$ M=\begin{pmatrix}\cos\theta & \sin\...
2018/09/11
[ "https://mathoverflow.net/questions/310316", "https://mathoverflow.net", "https://mathoverflow.net/users/125359/" ]
**Elementary proof**. The linear space $E$ spanned by $SO\_n$ is the orthogonal of those matrices $M$ such that $\langle M,Q\rangle:={\rm Tr}(MQ)=0$ for every $Q\in SO\_n$. Let $M=SR$ be a polar decomposition, where $S\in Sym\_n^+$ and $R\in O\_n$. This decomposition is unique with $S\in SPD\_n$ if $M$ is non-singular,...
Let $S$ be the span of $SO(N)$ . Then it's obvious that if $A \in S$ and $D\_1, D\_2 \in SO(N)$ then $D\_1^{-1} A D\_2 \in S$ . Therefore it's enough to show that $B := diag(1,0,...0) \in S$ . If $N$ is odd and $> 1$ then we can write $$B = \frac{1}{2} (\left[\begin{matrix}1&0\cr0&I\_{N-1}\end{matrix}\right] + \left...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Inside `if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { }` For single page variable: ``` String data = mWizardModel.findByKey("Sandwich:Bread").getData().getString(Page.SIMPLE_DATA_KEY); ``` For customized page: ``` String data = mWizardModel.findByKey(THE_KEY).getData().getString(CustomerInfoPage.Y...
Sorry for big delay, but I think that someone will found this info useful. I found a way to get all `ReviewItems` since you can have a lot of branches and you won't be able to use the first answer. I'm pretty sure, that your `mPagerAdapter::getItem` code looked like in example (so it just returned new fragment, instea...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Inside `if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { }` For single page variable: ``` String data = mWizardModel.findByKey("Sandwich:Bread").getData().getString(Page.SIMPLE_DATA_KEY); ``` For customized page: ``` String data = mWizardModel.findByKey(THE_KEY).getData().getString(CustomerInfoPage.Y...
This is my code @Anton\_Shkurenko ``` mNextButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { Object o = mPager.getAdapter().instantiateItem(mPager, mPager.getCurrent...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Inside `if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { }` For single page variable: ``` String data = mWizardModel.findByKey("Sandwich:Bread").getData().getString(Page.SIMPLE_DATA_KEY); ``` For customized page: ``` String data = mWizardModel.findByKey(THE_KEY).getData().getString(CustomerInfoPage.Y...
The best solution is to include this library in your project as module, and implement your own method for getting review items in ReviewFragment. ``` public List<ReviewItem> getReviewItems() { return mCurrentReviewItems; } ``` I am not sure why developer did not add that. It's the most important thing in project...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Inside `if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { }` For single page variable: ``` String data = mWizardModel.findByKey("Sandwich:Bread").getData().getString(Page.SIMPLE_DATA_KEY); ``` For customized page: ``` String data = mWizardModel.findByKey(THE_KEY).getData().getString(CustomerInfoPage.Y...
Anyone still looking for a solution for this issue you can use following code ``` ArrayList<ReviewItem> reviewItems = new ArrayList<ReviewItem>(); for (Page page : mWizardModel.getCurrentPageSequence()) { page.getReviewItems(reviewItems); } ```
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Sorry for big delay, but I think that someone will found this info useful. I found a way to get all `ReviewItems` since you can have a lot of branches and you won't be able to use the first answer. I'm pretty sure, that your `mPagerAdapter::getItem` code looked like in example (so it just returned new fragment, instea...
This is my code @Anton\_Shkurenko ``` mNextButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (mPager.getCurrentItem() == mCurrentPageSequence.size()) { Object o = mPager.getAdapter().instantiateItem(mPager, mPager.getCurrent...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Sorry for big delay, but I think that someone will found this info useful. I found a way to get all `ReviewItems` since you can have a lot of branches and you won't be able to use the first answer. I'm pretty sure, that your `mPagerAdapter::getItem` code looked like in example (so it just returned new fragment, instea...
The best solution is to include this library in your project as module, and implement your own method for getting review items in ReviewFragment. ``` public List<ReviewItem> getReviewItems() { return mCurrentReviewItems; } ``` I am not sure why developer did not add that. It's the most important thing in project...
14,765,510
I am trying to make a wizard using Roman Nurik's library (<https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4>). I am having trouble accessing the collected data from the Review Fragment. I made mCurrentReviewItems public in ReviewFragment and then I tried it like this ``` mNextButton.setOnClickListener(...
2013/02/08
[ "https://Stackoverflow.com/questions/14765510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541188/" ]
Sorry for big delay, but I think that someone will found this info useful. I found a way to get all `ReviewItems` since you can have a lot of branches and you won't be able to use the first answer. I'm pretty sure, that your `mPagerAdapter::getItem` code looked like in example (so it just returned new fragment, instea...
Anyone still looking for a solution for this issue you can use following code ``` ArrayList<ReviewItem> reviewItems = new ArrayList<ReviewItem>(); for (Page page : mWizardModel.getCurrentPageSequence()) { page.getReviewItems(reviewItems); } ```
41,150,430
I'm implementing a ReactJS web application using webpack and I want to start implementing a service worker to handle the network calls, in order to cache files. However, I find it hard to register the service worker javascript file. (I should add that I'm a beginner when it comes to both React and webpack.) If I get i...
2016/12/14
[ "https://Stackoverflow.com/questions/41150430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52355/" ]
To remove the error, change the ``` import ServiceWorkerWebpackPlugin from 'serviceworker-webpack-plugin'; ``` to ``` var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); ``` Also note that the [documentation](https://www.npmjs.com/package/serviceworker-webpack-plugin) has a typo: ``` plugin...
Create a project with create-react-app and then do some changes in package.json for adding service worker in your project. It will guide you how to setup service worker in your project and you don't need to create your own Webpack create-react-app command will do automatically Please visit:<https://github.com/jeffpos...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just adding my code here following this tutorial: <https://www.youtube.com/watch?v=FvArk8-qgCk&index=5&list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9> ``` // Make connection var socket = io.connect('http://localhost:4000'); var timeout // Query DOM var message = document.getElementById('message'), handle = document.get...
Although this already answered and bit old, you might consider something to delay invoking function by user input using debounce function like from lodash: [\_.debounce](https://lodash.com/docs/4.17.15#debounce)
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
You can use timeouts to send "started typing" and "stopped typing" messages, like so: ``` var typing = false; var timeout = undefined; function timeoutFunction(){ typing = false; socket.emit(noLongerTypingMessage); } function onKeyDownNotEnter(){ if(typing == false) { typing = true socket.emit(typingMe...
Just adding my code here following this tutorial: <https://www.youtube.com/watch?v=FvArk8-qgCk&index=5&list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9> ``` // Make connection var socket = io.connect('http://localhost:4000'); var timeout // Query DOM var message = document.getElementById('message'), handle = document.get...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
You can use timeouts to send "started typing" and "stopped typing" messages, like so: ``` var typing = false; var timeout = undefined; function timeoutFunction(){ typing = false; socket.emit(noLongerTypingMessage); } function onKeyDownNotEnter(){ if(typing == false) { typing = true socket.emit(typingMe...
Although this already answered and bit old, you might consider something to delay invoking function by user input using debounce function like from lodash: [\_.debounce](https://lodash.com/docs/4.17.15#debounce)
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just thought I'd add my variation on the very helpful answer given by abject\_error. This allows for the status of typing as well as stopped typing but message was entered. I'm not using socket.io but you get the idea. ``` var typingStatus=0; //0=Not typing: message blank, 1=typing, 2=typing: something there var typin...
Although this already answered and bit old, you might consider something to delay invoking function by user input using debounce function like from lodash: [\_.debounce](https://lodash.com/docs/4.17.15#debounce)
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
You can use timeouts to send "started typing" and "stopped typing" messages, like so: ``` var typing = false; var timeout = undefined; function timeoutFunction(){ typing = false; socket.emit(noLongerTypingMessage); } function onKeyDownNotEnter(){ if(typing == false) { typing = true socket.emit(typingMe...
``` function typingtimeoutFunction (){ socket.emit('typingMessage', 'stopped typing'); }, onKeyDownNotEnter: function (){ clearTimeout(this.typingtimeout); socket.emit('typingMessage', 'istyping'); this.typingtimeout = setTimeout(function() {ajaxChat.typ...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
You can use timeouts to send "started typing" and "stopped typing" messages, like so: ``` var typing = false; var timeout = undefined; function timeoutFunction(){ typing = false; socket.emit(noLongerTypingMessage); } function onKeyDownNotEnter(){ if(typing == false) { typing = true socket.emit(typingMe...
I think the best way here would be to use throttling, here is an example: ``` const throttle = (cb, delay = 300) => { let shouldWait = false; return (...args) => { if (shouldWait) return; cb(...args); shouldWait = true; setTimeout(() => { shouldWait = false; }, delay); ...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just adding my code here following this tutorial: <https://www.youtube.com/watch?v=FvArk8-qgCk&index=5&list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9> ``` // Make connection var socket = io.connect('http://localhost:4000'); var timeout // Query DOM var message = document.getElementById('message'), handle = document.get...
``` function typingtimeoutFunction (){ socket.emit('typingMessage', 'stopped typing'); }, onKeyDownNotEnter: function (){ clearTimeout(this.typingtimeout); socket.emit('typingMessage', 'istyping'); this.typingtimeout = setTimeout(function() {ajaxChat.typ...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just adding my code here following this tutorial: <https://www.youtube.com/watch?v=FvArk8-qgCk&index=5&list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9> ``` // Make connection var socket = io.connect('http://localhost:4000'); var timeout // Query DOM var message = document.getElementById('message'), handle = document.get...
I think the best way here would be to use throttling, here is an example: ``` const throttle = (cb, delay = 300) => { let shouldWait = false; return (...args) => { if (shouldWait) return; cb(...args); shouldWait = true; setTimeout(() => { shouldWait = false; }, delay); ...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just thought I'd add my variation on the very helpful answer given by abject\_error. This allows for the status of typing as well as stopped typing but message was entered. I'm not using socket.io but you get the idea. ``` var typingStatus=0; //0=Not typing: message blank, 1=typing, 2=typing: something there var typin...
I think the best way here would be to use throttling, here is an example: ``` const throttle = (cb, delay = 300) => { let shouldWait = false; return (...args) => { if (shouldWait) return; cb(...args); shouldWait = true; setTimeout(() => { shouldWait = false; }, delay); ...
16,766,488
I am trying to setup socket.io chat server. I have gotten it up to send and receive message from server and client. I was interested in showing users if some one is typing. I know i can emit when some is typing from client to server, I can also broadcast it to other users. But will it be efficient to do that on every k...
2013/05/27
[ "https://Stackoverflow.com/questions/16766488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/266598/" ]
Just thought I'd add my variation on the very helpful answer given by abject\_error. This allows for the status of typing as well as stopped typing but message was entered. I'm not using socket.io but you get the idea. ``` var typingStatus=0; //0=Not typing: message blank, 1=typing, 2=typing: something there var typin...
``` function typingtimeoutFunction (){ socket.emit('typingMessage', 'stopped typing'); }, onKeyDownNotEnter: function (){ clearTimeout(this.typingtimeout); socket.emit('typingMessage', 'istyping'); this.typingtimeout = setTimeout(function() {ajaxChat.typ...
5,650,307
I was actually making a module for phenny bot is called welcom.py and it welcomes every new guy who joins my channel Here is the code I used for that: ``` #!/usr/bin/python def welcome_message(phenny, input): phenny.say('Welcome to #example channel ' + input.nick + ' !') welcome_message.event = 'JOIN' welcome_...
2011/04/13
[ "https://Stackoverflow.com/questions/5650307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706162/" ]
After DoSnapshotset yu have to call the following function hr = pDoSnapshotSetResults->Wait(); if (!SUCCEEDED(hr)){ unLoadLibrary(); return 1; } ``` HRESULT hrDoSnapshotSetResults; hr = pDoSnapshotSetResults->QueryStatus(&hrDoSnapshotSetResults, NULL); if (!SUCCEEDED(hr)){ unLoadLibrary(); return 1; ...
VSS\_SNAPSHOT\_PROP instances are retrieved via a call to GetSnapshotProperties(). You need to create a new set by calling StartSnapshotSet() and then add the volume to the snapshot set via AddToSnapshotSet() before getting the properties.
27,154,000
How can I set up Common Lisp to work with sublime text 2. Is there a way to set it up so I can compile and run the code easily, I am new to both lisp and sublime text.
2014/11/26
[ "https://Stackoverflow.com/questions/27154000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4244819/" ]
For Sublime Text, I'd recommend [SublimeREPL](https://github.com/wuub/SublimeREPL) for the REPL. The default configuration for Common Lisp uses SBCL nowadays, I think (Previously it was CLISP). To download a binary of SBCL for Windows, just go to the [downloads page](http://sbcl.org/platform-table.html). I've never in...
You can't actually compile anything with Sublime Text, because it is just text editor. But there are plugin for sublime text 2/3 that claimed to properly indents lisp code: [lispindent](https://packagecontrol.io/packages/lispindent). So, you can write your CL program with it just by creating .lisp text-file. Then you...
19,549,852
I have an application that has a combobox with some double values. The user can select any of the values. The application has a "[TimeLine](http://docs.oracle.com/javafx/2/api/javafx/animation/Timeline.html)" attached to it that will print a statement on the console. The [sscce](http://sscce.org/) is below. What should...
2013/10/23
[ "https://Stackoverflow.com/questions/19549852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1539057/" ]
You can't bind a Timeline's duration to a property because the duration of a Keyframe in a Timeline is not a property and you can only bind properties to properties. What you need to do instead is to listen for changes in the value of the combo-box and trigger create new key frames with the new durations when the user...
All animations have a `rateProperty()` which can be changed on a **running animation!** This seems like a much cleaner solution: ``` private void createTimer(ComboBox<Double> timeOptions) { Timeline timer = new Timeline( new KeyFrame(Duration.seconds(1), evt-> System.out.println( ...
59,083,556
[![enter image description here](https://i.stack.imgur.com/lxrYi.png)](https://i.stack.imgur.com/lxrYi.png)I am trying to show items into shopping cart when i click add to card button but i am facing some errors How to fit it error Please see error Non-static method Gloudemans\Shoppingcart\Cart::add() should not be ...
2019/11/28
[ "https://Stackoverflow.com/questions/59083556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use this in your controller and pass data your in view ``` $cart_list = Cart::content(); $cart_data = []; foreach($cart_list as $cart){ $cart_data [] = [ //define keys as per your cart's content and pass $cart_data in your view ]; } }...
**EDIT:** Sorry i was reading the question wrong. Where is defined your function add() just add static ``` public static function add() { //..... } ``` or ``` static public function add() { // ...... } ``` **OLD POST** I don't see, where u're defining which cart is for which user, but I would do it in this ...
17,204,609
I'm converting from `mysql_` to `mysqli_` and still new to `mysqli_`. Here is my code: ``` $stmt = mysqli_prepare($con, "INSERT INTO test VALUES (?, ?)"); mysqli_stmt_bind_param($stmt, 'ss', $a, $b); $a=1; $b=1.5; mysqli_stmt_execute($stmt); ``` My question is: ``` $a has Integer value $b float ``` but the cor...
2013/06/20
[ "https://Stackoverflow.com/questions/17204609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404654/" ]
Wrap the random number generator to store the results in a set. When you generate a number if it exists in the set, do it again: Comments made by others about the for loops are also valid... pseudo code: ``` class MyRandomNums { Set<Integer> usedNums; public int getRandom() { int num = random.ne...
All of your for-loops loop once. Why: ``` for (int nbr = 1; nbr < 2; nbr++) { rndNumber = rndNumbers.nextInt(max); num1.setText(Integer.toString(rndNumber)); } ``` when you can just do: ``` rndNumber = rndNumbers.nextInt(max); num1.setText(Integer.toString(rndNumber)); ``` ?
17,204,609
I'm converting from `mysql_` to `mysqli_` and still new to `mysqli_`. Here is my code: ``` $stmt = mysqli_prepare($con, "INSERT INTO test VALUES (?, ?)"); mysqli_stmt_bind_param($stmt, 'ss', $a, $b); $a=1; $b=1.5; mysqli_stmt_execute($stmt); ``` My question is: ``` $a has Integer value $b float ``` but the cor...
2013/06/20
[ "https://Stackoverflow.com/questions/17204609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404654/" ]
Wrap the random number generator to store the results in a set. When you generate a number if it exists in the set, do it again: Comments made by others about the for loops are also valid... pseudo code: ``` class MyRandomNums { Set<Integer> usedNums; public int getRandom() { int num = random.ne...
``` int min = 0; int max = 100; List<Integer> randoms = new ArrayList<Integer>(); for(int i = min; i <= max; i++) randoms.add(i); Collections.shuffle(randoms); ``` Then you can use it like this: ``` int randomNumber = randoms.remove(0); ```
17,204,609
I'm converting from `mysql_` to `mysqli_` and still new to `mysqli_`. Here is my code: ``` $stmt = mysqli_prepare($con, "INSERT INTO test VALUES (?, ?)"); mysqli_stmt_bind_param($stmt, 'ss', $a, $b); $a=1; $b=1.5; mysqli_stmt_execute($stmt); ``` My question is: ``` $a has Integer value $b float ``` but the cor...
2013/06/20
[ "https://Stackoverflow.com/questions/17204609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404654/" ]
Wrap the random number generator to store the results in a set. When you generate a number if it exists in the set, do it again: Comments made by others about the for loops are also valid... pseudo code: ``` class MyRandomNums { Set<Integer> usedNums; public int getRandom() { int num = random.ne...
Here's one way to do all of the things you mentioned: ``` private static boolean arrayContainsInt(int array[], int val, int x) { for(int i = 0; i < x; i++) { if(array[i] == val) { return true; } } return false; } public static int[] randomNumbers(int count, int minInclusive, in...
17,204,609
I'm converting from `mysql_` to `mysqli_` and still new to `mysqli_`. Here is my code: ``` $stmt = mysqli_prepare($con, "INSERT INTO test VALUES (?, ?)"); mysqli_stmt_bind_param($stmt, 'ss', $a, $b); $a=1; $b=1.5; mysqli_stmt_execute($stmt); ``` My question is: ``` $a has Integer value $b float ``` but the cor...
2013/06/20
[ "https://Stackoverflow.com/questions/17204609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404654/" ]
Wrap the random number generator to store the results in a set. When you generate a number if it exists in the set, do it again: Comments made by others about the for loops are also valid... pseudo code: ``` class MyRandomNums { Set<Integer> usedNums; public int getRandom() { int num = random.ne...
for alpha numeric number try this ``` public String getRandomNum(int randomLength) { return new BigInteger(130, random).toString(32).toUpperCase().substring(0, randomLength); } ``` if you want only numeric random number try this ``` public String getRandomNum(int randomLength) { int value = (int)(Math.ra...
32,536,912
I run into an issue with the `ajaxComplete()` function of JQuery (latest). Here's the scenario: A form is shown in a lightbox to allow users to enter a shipping address. The submit button for that form is bound to a function in the `ajaxComplete()` section of the script (because the form itself is loaded using Ajax). T...
2015/09/12
[ "https://Stackoverflow.com/questions/32536912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If all you want is the tickets for a particular user: ``` var tickets = context.Users .Where(u => u.Id == userID) .SelectMany(u => u.Tickets); ``` Assuming that your model is database-backed, this will result in a single query that returns just a list of Ticket records. --- For the additional test of "not ...
Modifying @Corey answer basing on the update (try it, I just wrote it without testing): ``` var tickets = context.Users .Where(u => u.Id == userID) .SelectMany(u => u.Tickets) .Where(t => context.Tickets.All(t1 => !t1.Children.Contains(t))); ```
2,399
I've built [AA5TB's antenna coupler](http://www.aa5tb.com/coupler.html): ![enter image description here](https://i.stack.imgur.com/zmjIo.gif) I left out C2 because I didn't understand why I would need it - why would I? It works fine without. Unfortunately, when I started tuning for a 5W 20m transceiver, the LED was ...
2014/12/11
[ "https://ham.stackexchange.com/questions/2399", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/-1/" ]
C2 removes the AC component across the LED, and prevents the LED from being on when the antenna is matched to 50 ohms. You say the circuit works anyway -- probably at QRP levels it's not bright enough to see. I bet if you try it in a dark room, or with a higher power transmitter, you will see it. Anyway, consider how ...
The actual values of R4 and R5 are not important; what is important is their ratio, since in this configuration they are acting as a voltage divider. If you have a pretty good idea of what the "correct" tuning for your transmitter should be, try this: replace either R4 or R5 with a variable resistor or potentiometer. A...
19,234,070
I have a process which loads data from a file and then tries to insert the records in a table. If the file is too large, it takes a while to load all the data in the XYZ table. I am using batch to insert the records in the table. In the meantime, another process kicks in and tries to read data based on some condition...
2013/10/07
[ "https://Stackoverflow.com/questions/19234070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1507448/" ]
V4.5 is an antique, but even way back then, most normal DB operations do not require an exclusive lock on the file. I'm very surprised to hear that there's an object lock involved here. I'd suggest modifying the IBM side just a bit. Continue to use JDBC to load the rows into the DB2 table as happens now, but when the ...
You don't say what DB or libraries you are using but you should look at using transactions to control the simultaneous reading and writing. Process 1 should write chunk of data in a single transaction. None of this data will be visible to process 2 until it has all been written so you shouldn't get any conflicts betwee...