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 |
|---|---|---|---|---|---|
2,092,961 | [Pic.1 Sine curve example](https://i.stack.imgur.com/6c3dC.png)
Shown from Pic.1 is a example sine curve about my question. The precondition is there are two points, such as P1(x1, y1), P2(x2, y2), and I want to generate a sine curve between these two points.
The general equation of a sine curve is y = Asin(wx + φ) ... | 2017/01/11 | [
"https://math.stackexchange.com/questions/2092961",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396479/"
] | We are looking for an amplitude $A$ of an initial function (see graphic below) that can be described in a parametrical manner:
$$\cases{x(t)=t\\y(t)=A \sin(2 \pi t)} \ \ \ \ \text{for} \ \ 0 \leq t \leq 1$$
We desire to obtain parametric equations for the transformed curve, knowing that this curve results from the i... | You are short one constraint. The distance between the points sets $w$ as you seem to want one full cycle between the points. $\phi=0$ if you measure $x$ from one end and want the curve to go through the points because you want to start with the argument of $\sin$ equal to zero. You don't have anything to set the ampli... |
2,092,961 | [Pic.1 Sine curve example](https://i.stack.imgur.com/6c3dC.png)
Shown from Pic.1 is a example sine curve about my question. The precondition is there are two points, such as P1(x1, y1), P2(x2, y2), and I want to generate a sine curve between these two points.
The general equation of a sine curve is y = Asin(wx + φ) ... | 2017/01/11 | [
"https://math.stackexchange.com/questions/2092961",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396479/"
] | You are short one constraint. The distance between the points sets $w$ as you seem to want one full cycle between the points. $\phi=0$ if you measure $x$ from one end and want the curve to go through the points because you want to start with the argument of $\sin$ equal to zero. You don't have anything to set the ampli... | HINT:
Let ${ P\_1P\_2} $ cut $ x-$ axis at $O$ at an angle $\gamma$ to $x-$ axis
Inclination of ${ P\_1P\_2}$ is $ m = \dfrac{(y\_2-y\_1)}{(x\_2-x\_1)} $
Amplitude $ A = \dfrac {m \overline{\,P\_1P\_2} }{2\pi }$
Rotate by angle $ -\gamma$ . The rotated equation has form $$ y= A \sin { 2 \pi ( x+ OP\_1 \cos \gamma)... |
2,092,961 | [Pic.1 Sine curve example](https://i.stack.imgur.com/6c3dC.png)
Shown from Pic.1 is a example sine curve about my question. The precondition is there are two points, such as P1(x1, y1), P2(x2, y2), and I want to generate a sine curve between these two points.
The general equation of a sine curve is y = Asin(wx + φ) ... | 2017/01/11 | [
"https://math.stackexchange.com/questions/2092961",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396479/"
] | You are short one constraint. The distance between the points sets $w$ as you seem to want one full cycle between the points. $\phi=0$ if you measure $x$ from one end and want the curve to go through the points because you want to start with the argument of $\sin$ equal to zero. You don't have anything to set the ampli... | It seems to from the second diagram that what you want is a Bezier curve, rather than a sine curve. The Bezier curve is best suited for this because the parameters define the end point as well as the angle at which the curve leaves or enters the end points. Pl. take a look into them. |
2,092,961 | [Pic.1 Sine curve example](https://i.stack.imgur.com/6c3dC.png)
Shown from Pic.1 is a example sine curve about my question. The precondition is there are two points, such as P1(x1, y1), P2(x2, y2), and I want to generate a sine curve between these two points.
The general equation of a sine curve is y = Asin(wx + φ) ... | 2017/01/11 | [
"https://math.stackexchange.com/questions/2092961",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396479/"
] | We are looking for an amplitude $A$ of an initial function (see graphic below) that can be described in a parametrical manner:
$$\cases{x(t)=t\\y(t)=A \sin(2 \pi t)} \ \ \ \ \text{for} \ \ 0 \leq t \leq 1$$
We desire to obtain parametric equations for the transformed curve, knowing that this curve results from the i... | HINT:
Let ${ P\_1P\_2} $ cut $ x-$ axis at $O$ at an angle $\gamma$ to $x-$ axis
Inclination of ${ P\_1P\_2}$ is $ m = \dfrac{(y\_2-y\_1)}{(x\_2-x\_1)} $
Amplitude $ A = \dfrac {m \overline{\,P\_1P\_2} }{2\pi }$
Rotate by angle $ -\gamma$ . The rotated equation has form $$ y= A \sin { 2 \pi ( x+ OP\_1 \cos \gamma)... |
2,092,961 | [Pic.1 Sine curve example](https://i.stack.imgur.com/6c3dC.png)
Shown from Pic.1 is a example sine curve about my question. The precondition is there are two points, such as P1(x1, y1), P2(x2, y2), and I want to generate a sine curve between these two points.
The general equation of a sine curve is y = Asin(wx + φ) ... | 2017/01/11 | [
"https://math.stackexchange.com/questions/2092961",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396479/"
] | We are looking for an amplitude $A$ of an initial function (see graphic below) that can be described in a parametrical manner:
$$\cases{x(t)=t\\y(t)=A \sin(2 \pi t)} \ \ \ \ \text{for} \ \ 0 \leq t \leq 1$$
We desire to obtain parametric equations for the transformed curve, knowing that this curve results from the i... | It seems to from the second diagram that what you want is a Bezier curve, rather than a sine curve. The Bezier curve is best suited for this because the parameters define the end point as well as the angle at which the curve leaves or enters the end points. Pl. take a look into them. |
2,774,291 | At work, we are using SVN, CVS, and GIT because there any many projects that were started at various times. Anyway, a common sequence that occurs is as follows:
1. Working on task A, making changes to project
2. Has new task B, some bug or functionality needs to be done on project, independent of task A but may affect... | 2010/05/05 | [
"https://Stackoverflow.com/questions/2774291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/202757/"
] | svn and cvs don't have any easy built-in ways to do this without creating and managing patch files yourself.
git uses [quilt](https://stackoverflow.com/questions/766759/what-is-a-quilt-patchset) to achieve this (similar to mercurials mq extensions), and it's quite useful | Based on SVN.
You would create a branch off of the trunk for Task A.
Then when you get Task B, you create a branch off of the trunk for this as well.
You switch between the two branches to work on one thing or the other. (This is fairly quick as it only updates the differences)
When one task is finished, you update... |
2,774,291 | At work, we are using SVN, CVS, and GIT because there any many projects that were started at various times. Anyway, a common sequence that occurs is as follows:
1. Working on task A, making changes to project
2. Has new task B, some bug or functionality needs to be done on project, independent of task A but may affect... | 2010/05/05 | [
"https://Stackoverflow.com/questions/2774291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/202757/"
] | **Git only**
Git encourages you to use branches for this kind of workflows.
Branches are very cheap in git, so you should use them extensively. What you are asking are called "topic branches", and these are nothing more than a normal branch, but dedicated to a given topic (rather than a development state).
With git ... | Based on SVN.
You would create a branch off of the trunk for Task A.
Then when you get Task B, you create a branch off of the trunk for this as well.
You switch between the two branches to work on one thing or the other. (This is fairly quick as it only updates the differences)
When one task is finished, you update... |
35,947,026 | I just opened a free Azure trial account and went through the various forms to create a test web app. I would like to edit the source files locally with Visual Studio 2015 however. Is it possible to download the files generated during sign-up, and if so, how? Thanks for any help! | 2016/03/11 | [
"https://Stackoverflow.com/questions/35947026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4959018/"
] | Web apps are accessible via ftp, so you can download/upload individual files.
[](https://i.stack.imgur.com/BoCWz.png)
However: The idea is that you should be editing locally, then pushing your changes *to* your web app deployment, not pulling *from*. To facilitate thi... | Ok I decided to just delete the app I created while signing up and re-create it from within Visual Studio; worked fine. |
35,947,026 | I just opened a free Azure trial account and went through the various forms to create a test web app. I would like to edit the source files locally with Visual Studio 2015 however. Is it possible to download the files generated during sign-up, and if so, how? Thanks for any help! | 2016/03/11 | [
"https://Stackoverflow.com/questions/35947026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4959018/"
] | You can download your project file using KUDU site: <https://blogs.msdn.microsoft.com/benjaminperkins/2014/03/24/using-kudu-with-windows-azure-web-sites/>
Select Debug console -> CMD
from there you can go inside site -> wwwroot and select download button to the left of any folder:
[](https://i.stack.imgur.com/BoCWz.png)
However: The idea is that you should be editing locally, then pushing your changes *to* your web app deployment, not pulling *from*. To facilitate thi... |
35,947,026 | I just opened a free Azure trial account and went through the various forms to create a test web app. I would like to edit the source files locally with Visual Studio 2015 however. Is it possible to download the files generated during sign-up, and if so, how? Thanks for any help! | 2016/03/11 | [
"https://Stackoverflow.com/questions/35947026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4959018/"
] | Web apps are accessible via ftp, so you can download/upload individual files.
[](https://i.stack.imgur.com/BoCWz.png)
However: The idea is that you should be editing locally, then pushing your changes *to* your web app deployment, not pulling *from*. To facilitate thi... | From azure console or kudo console , you can push using git to your azure devops repository or any repository
```
git init
git remote add <url>
git add .
git push origin master
``` |
35,947,026 | I just opened a free Azure trial account and went through the various forms to create a test web app. I would like to edit the source files locally with Visual Studio 2015 however. Is it possible to download the files generated during sign-up, and if so, how? Thanks for any help! | 2016/03/11 | [
"https://Stackoverflow.com/questions/35947026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4959018/"
] | You can download your project file using KUDU site: <https://blogs.msdn.microsoft.com/benjaminperkins/2014/03/24/using-kudu-with-windows-azure-web-sites/>
Select Debug console -> CMD
from there you can go inside site -> wwwroot and select download button to the left of any folder:
[ all of them at once.
What if I did not want to do this processing, ... | 2022/06/17 | [
"https://unix.stackexchange.com/questions/706602",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/520658/"
] | Turns out for my particular use case, the solution is to forgo sleep entirely as I think Dell ACPI just does not like Linux. Properly implementing hibernate worked. Thanks to waltinator for sparking my memory!
Here are my steps (All stolen from [ArchWiki hibernate](https://wiki.archlinux.org/title/Power_management/Sus... | Install [Tweaks](https://helpmanual.io/packages/apt/gnome-tweaks/), and slide the suspend off.
See [Why does my computer turn off when I close the lid?](https://help.ubuntu.com/stable/ubuntu-help/power-closelid.html.en) for details. |
73,131,783 | So I'm having some trouble comparing two times, and I wanted to see if someone might be able to assist me:
So I have the following first modified date/time:
```
Debug::dump($global_post->modified);
```
Which returns:
```
string(19) "2022-07-26T18:06:42"
```
---
Then I have my second modified time which is this:... | 2022/07/27 | [
"https://Stackoverflow.com/questions/73131783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19034864/"
] | Simply by doing this, for example:
```
$date1 = new DateTime('2022-07-26T18:06:42');
$date2 = new DateTime("2022-07-26 18:06:41");
dd($date1 == $date2); //boolean
``` | I will create new dates from character strings:
```
$date = new DateTime('2022-07-26T18:06:42');
echo $date->format('Y-m-d H:i:s').PHP_EOL;
$date2 = new DateTime('2022-07-26 18:06:41');
echo $date2->format('Y-m-d H:i:s').PHP_EOL;
```
Then:
```
if( $date->format('Y-m-d H:i:s') == $date2->format('Y-m-d H:i:s') ) {
... |
42,232,120 | From the inspiration of Hans Rosling,
<https://www.ted.com/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen#t-103612>
I am trying to represent statistical information in an easily understood and entertaining graphical form. As a step to doing this I would like to solve this problem.
Given an interger `X`, I w... | 2017/02/14 | [
"https://Stackoverflow.com/questions/42232120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1169210/"
] | This works for your example and might work in general
```
# get the first dimension
dim1 <- floor(sqrt(len1))
# fill out the second dimension
dim2 <- (len1 %/% dim1 + (len1 %% dim1 != 0))
```
---
To test, put this into a function
```
dimGet <- function(x) {
dim1 <- floor(sqrt(x))
dim2 <- (x %/% dim1 + (x %% di... | I'm not quite clear what you want but this may work
```
getrect = function(x = 7){
f = floor(sqrt(x))
if(f^2 == x){
return(c(f,f))
}
d = max(2,(f - 500)):(f + 500) #decrease 500 to improve speed, increase 500 to improve accuracy
d = data.frame(t(combn(d,2)))
d$M = d$X1 * d$X2
d =... |
4,633,949 | First off: I know that AES is a block cipher and not a hashing function. However, I'm stuck with a micro controller with very little RAM and flash memory, and AES-128 is already implemented on it and used for its intended purpose - encryption.
Unfortunately, I'll also have to implement a hashing function for file inte... | 2011/01/08 | [
"https://Stackoverflow.com/questions/4633949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/568014/"
] | It sounds like you want to use [AES-CMAC](http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf), an authentication algorithm based in AES. | Most emphatically *yes* you can make a hash function out of AES. In fact, a number of the submissions for the NIST SHA3 contest, which will decide the next US-government-approved hash function, do [exactly that](http://crypto.rd.francetelecom.com/ECHO/sha3/AES/).
A traditional hash function is just a [cascaded compres... |
4,633,949 | First off: I know that AES is a block cipher and not a hashing function. However, I'm stuck with a micro controller with very little RAM and flash memory, and AES-128 is already implemented on it and used for its intended purpose - encryption.
Unfortunately, I'll also have to implement a hashing function for file inte... | 2011/01/08 | [
"https://Stackoverflow.com/questions/4633949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/568014/"
] | It sounds like you want to use [AES-CMAC](http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf), an authentication algorithm based in AES. | Your proposed algorithm does not have second pre-image resistance (which also implies that it does not have collision resistance either), so it is not a cryptographically strong hash.
If I have a message `P0 P1 P2` which hashes to `H`, then I can easily construct a second message `Q0 Q1 Q2 QX` that also hashes to `H` ... |
4,633,949 | First off: I know that AES is a block cipher and not a hashing function. However, I'm stuck with a micro controller with very little RAM and flash memory, and AES-128 is already implemented on it and used for its intended purpose - encryption.
Unfortunately, I'll also have to implement a hashing function for file inte... | 2011/01/08 | [
"https://Stackoverflow.com/questions/4633949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/568014/"
] | Most emphatically *yes* you can make a hash function out of AES. In fact, a number of the submissions for the NIST SHA3 contest, which will decide the next US-government-approved hash function, do [exactly that](http://crypto.rd.francetelecom.com/ECHO/sha3/AES/).
A traditional hash function is just a [cascaded compres... | Your proposed algorithm does not have second pre-image resistance (which also implies that it does not have collision resistance either), so it is not a cryptographically strong hash.
If I have a message `P0 P1 P2` which hashes to `H`, then I can easily construct a second message `Q0 Q1 Q2 QX` that also hashes to `H` ... |
49,357,534 | I am trying to create a docker Image for tensforflow serving like [here](https://github.com/llSourcell/How-to-Deploy-a-Tensorflow-Model-in-Production/blob/master/demo.ipynb).
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[.
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[.
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[ looked like this:
```
GIT_SHA = $(git rev-parse HEAD)
docker build -t user/myimage:$GIT_SHA
```
Then, I got error saying
```
deplo... |
49,357,534 | I am trying to create a docker Image for tensforflow serving like [here](https://github.com/llSourcell/How-to-Deploy-a-Tensorflow-Model-in-Production/blob/master/demo.ipynb).
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[.
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[ looked like this:
```
GIT_SHA = $(git rev-parse HEAD)
docker build -t user/myimage:$GIT_SHA
```
Then, I got error saying
```
deplo... |
49,357,534 | I am trying to create a docker Image for tensforflow serving like [here](https://github.com/llSourcell/How-to-Deploy-a-Tensorflow-Model-in-Production/blob/master/demo.ipynb).
When i try to pull docker image with all the required dependencies(pip dependencies, bazel, grpc)
[ looked like this:
```
GIT_SHA = $(git rev-parse HEAD)
docker build -t user/myimage:$GIT_SHA
```
Then, I got error saying
```
deplo... |
61,860,183 | Hello i have an app that was working fine till yesterday i update flutter SDK .
after the update is finished i tried to build for ios and it fails every time
with this error :
[](https://i.stack.imgur.com/tmrxh.png)
i have tried the following :
pod d... | 2020/05/17 | [
"https://Stackoverflow.com/questions/61860183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10164456/"
] | I had the same issue both on `flutter channel stable` with version **1.17.1** and on `flutter channel beta` with version **1.18.0-11.1.pre**.
I copied the `App.framework` from another project under `ios/Flutter` directory and successfully built an iOS release version.
Update 19/May/2020
I opened a issue in flutter si... | The solution for me was:
Inside: Xcode > Runner > Build Phases tab > Run Script section
a) When deploying to the emulator: **disable** 'Run script only when installing'
b) When deploying a real release: **enable** 'Run script only when installing' [this is only if you get an error]
[](https://i.stack.imgur.com/tmrxh.png)
i have tried the following :
pod d... | 2020/05/17 | [
"https://Stackoverflow.com/questions/61860183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10164456/"
] | I had the same issue both on `flutter channel stable` with version **1.17.1** and on `flutter channel beta` with version **1.18.0-11.1.pre**.
I copied the `App.framework` from another project under `ios/Flutter` directory and successfully built an iOS release version.
Update 19/May/2020
I opened a issue in flutter si... | Not sure if it's related to the original question, but I found a very similar issue when I'm using Bitrise.io as my CI/CD tool for the Flutter project. Turned out I need to make sure that `cocoapods` is already installed.
```sh
gem install cocoapods
```
My complete story can be seen at my Gist here <https://gist.git... |
61,860,183 | Hello i have an app that was working fine till yesterday i update flutter SDK .
after the update is finished i tried to build for ios and it fails every time
with this error :
[](https://i.stack.imgur.com/tmrxh.png)
i have tried the following :
pod d... | 2020/05/17 | [
"https://Stackoverflow.com/questions/61860183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10164456/"
] | The solution for me was:
Inside: Xcode > Runner > Build Phases tab > Run Script section
a) When deploying to the emulator: **disable** 'Run script only when installing'
b) When deploying a real release: **enable** 'Run script only when installing' [this is only if you get an error]
[ and [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/), respectively if you find yourself in need of some \*nix goodness on Windows. | Assuming you have `scp` installed on your Windows machine, you can use:
```
scp username@remotehost:~/path/to/remote/file ~/path/to/local/file
```
If you don't have scp installed, you can use [Cygwin](http://www.cygwin.com/) to install SCP for Windows. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | WinSCP has windows binding for the scp protocol. I haven't used it in a long time, but I recall it being easy to use.
<http://winscp.net/eng/index.php> | You won't find scp or ssh natively on Windows. But you can always download [WinSCP](http://winscp.net/) and [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/), respectively if you find yourself in need of some \*nix goodness on Windows. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | You won't find scp or ssh natively on Windows. But you can always download [WinSCP](http://winscp.net/) and [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/), respectively if you find yourself in need of some \*nix goodness on Windows. | Install cygwin. It has an ssh and scp client. You'll have to initiate the copy from windows, but it'll work.
Alternatively, it might be possible to install an ssh daemon with cygwin, but I've never explored that. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | You won't find scp or ssh natively on Windows. But you can always download [WinSCP](http://winscp.net/) and [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/), respectively if you find yourself in need of some \*nix goodness on Windows. | Install [PSCP](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) on your Windows machine by placing it inside your Windows folder (where notepad.exe is located), open the Windows Command line (**cmd**) and enter:
```
pscp urlToYourRemoteLinuxMachine:pathToYourFile pathToLocalWindowsMachineFile
``` |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | WinSCP has windows binding for the scp protocol. I haven't used it in a long time, but I recall it being easy to use.
<http://winscp.net/eng/index.php> | Assuming you have `scp` installed on your Windows machine, you can use:
```
scp username@remotehost:~/path/to/remote/file ~/path/to/local/file
```
If you don't have scp installed, you can use [Cygwin](http://www.cygwin.com/) to install SCP for Windows. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | Assuming you have `scp` installed on your Windows machine, you can use:
```
scp username@remotehost:~/path/to/remote/file ~/path/to/local/file
```
If you don't have scp installed, you can use [Cygwin](http://www.cygwin.com/) to install SCP for Windows. | Install cygwin. It has an ssh and scp client. You'll have to initiate the copy from windows, but it'll work.
Alternatively, it might be possible to install an ssh daemon with cygwin, but I've never explored that. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | Assuming you have `scp` installed on your Windows machine, you can use:
```
scp username@remotehost:~/path/to/remote/file ~/path/to/local/file
```
If you don't have scp installed, you can use [Cygwin](http://www.cygwin.com/) to install SCP for Windows. | Install [PSCP](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) on your Windows machine by placing it inside your Windows folder (where notepad.exe is located), open the Windows Command line (**cmd**) and enter:
```
pscp urlToYourRemoteLinuxMachine:pathToYourFile pathToLocalWindowsMachineFile
``` |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | WinSCP has windows binding for the scp protocol. I haven't used it in a long time, but I recall it being easy to use.
<http://winscp.net/eng/index.php> | Install cygwin. It has an ssh and scp client. You'll have to initiate the copy from windows, but it'll work.
Alternatively, it might be possible to install an ssh daemon with cygwin, but I've never explored that. |
267,214 | I'm on ssh accessing my user account at school. I'm trying to download a particular file from my linux account to my current windows file system that Im on right now. Can i use scp? If yes Id really appreciate if you could give an example of how to download a file from a remote server to windows | 2011/04/06 | [
"https://superuser.com/questions/267214",
"https://superuser.com",
"https://superuser.com/users/-1/"
] | WinSCP has windows binding for the scp protocol. I haven't used it in a long time, but I recall it being easy to use.
<http://winscp.net/eng/index.php> | Install [PSCP](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) on your Windows machine by placing it inside your Windows folder (where notepad.exe is located), open the Windows Command line (**cmd**) and enter:
```
pscp urlToYourRemoteLinuxMachine:pathToYourFile pathToLocalWindowsMachineFile
``` |
36,039,950 | I'm building a Java EE application that one of its requirements is to send messages for registered e-mails (around 1000 to 2000). The access to that application is limited and in any time there will be less than 2 user logged in.
For sending e-mails I'm using JavaMail, a @Stateless bean and @Asynchronous method.
My p... | 2016/03/16 | [
"https://Stackoverflow.com/questions/36039950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1140980/"
] | Your performance problem is probably due to [creating a new connection to send each message](http://www.oracle.com/technetwork/java/javamail/faq/index.html#rptsend), as described in the JavaMail FAQ. Your code needs to be able to cache and reuse the connection to the mail server. A better approach for sending the messa... | You need to configure the async thread pool size inside your container, default size is usually 15 parallel threads. There isn't one thread per bean instance but if the pool fills up there will be a queue and max 15 sending at a time. |
286,498 | There are commands that look like pressing a button in MS Word(I have Windows...). For example `\textbf{small bold text}` compared with `{\bf lengthly bold text }` My question is : Is it posible to define a new command in a declarative way like `\bf` or redifine an old one in this style? | 2016/01/07 | [
"https://tex.stackexchange.com/questions/286498",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/11905/"
] | Yes you can, you simply need not to define arguments. Although different methods might be in order depending on the command. For the sake of the question, here's a command that turns the text **bold** and *italics*, together.
Note the `{}` around the command and the text. Without those, the bold and italics will conti... | Imagine you have some command `\mycommand{...}` and you insist on using a syntax `{\mybutton ...}` rather. You can try this. Will not always work (for example for verbatim-like commands). The outer braces are **mandatory**, and `\foo{\mybutton ...}` will not work, use `\foo{{\mybutton...}}` (and keep fingers crossed.)
... |
14,824,516 | So I'm kind of a Javascript newbie and having trouble figuring out how to pass a variable from my HTML template to Javascript.
I want to pass the search query that a user enters to javascript.
Here's my template to get the search query.
```
<form class="well-whatsnext form-search" style="text-align:center; border-ra... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14824516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1328021/"
] | In a .h file put this outside of any @interface
```
typedef void(^MyBlockType)(void);
```
In your .m file, you could use somthing like this
```
+(void)doAsyncWithBlock:(MyBlockType)asyncBlock andSyncBlock:(MyBlockType)syncBlock
{
dispatch_queue_t aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAUL... | Yes, it's possible to do this, and the main advantage I see is that you can remove a dependence on GCD and keep most of your code agnostic of your primary concurrency technology.
I think it's reasonable to start a new class that has the responsibility for managing the dispatch of your asynchronous work units and coord... |
14,824,516 | So I'm kind of a Javascript newbie and having trouble figuring out how to pass a variable from my HTML template to Javascript.
I want to pass the search query that a user enters to javascript.
Here's my template to get the search query.
```
<form class="well-whatsnext form-search" style="text-align:center; border-ra... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14824516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1328021/"
] | In a .h file put this outside of any @interface
```
typedef void(^MyBlockType)(void);
```
In your .m file, you could use somthing like this
```
+(void)doAsyncWithBlock:(MyBlockType)asyncBlock andSyncBlock:(MyBlockType)syncBlock
{
dispatch_queue_t aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAUL... | I typically define these two functions. They make the code more compact, and follow the pattern I use where you don't want to block the main thread (hence the RUN\_ON\_BACKGROUND\_THREAD call is asynchronous) but it's OK to block a background thread in order to update the main thread (hence the RUN\_ON\_UI\_THREAD) cal... |
13,300,317 | Basically I have this div container which holds two divs. When scrolled down and the div container is passed by the window it sticks to the top of the screen and follows the screen however when I keep scrolling down, the divs inside the container div overlap the footer.
I cant seem to figure out how to stop the foote... | 2012/11/09 | [
"https://Stackoverflow.com/questions/13300317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1301430/"
] | To run a script in the main ipython namespace:
```
ipython script.py
```
Of course this just runs and exits. If you want to run the script in the main ipython namespace and then drop into the REPL:
```
ipython -i script.py
```
If you're already inside ipython and you want to run the script in the existing main ip... | What you seem to want is to break scoping for dev purposes, making locals into globals, which may not be the best idea.
As a possible alternative, do you know about [ipdb](http://pypi.python.org/pypi/ipdb)? |
24,026,073 | I have a question that is very similar to [algorithm to find longest non-overlapping sequences](https://stackoverflow.com/questions/4593583/algorithm-to-find-longest-non-overlapping-sequences).
The only difference to the linked question is that instead of finding the set of non-overlapping tuples that represent the **... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24026073",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/368896/"
] | Here is an **O(nlog n)-time, O(n)-space** algorithm. First, sort the array of tuples by their starting position if they are not already in this order. I'll assume zero-based array indices.
Let's call the beginning position of tuple i b(i) and the ending position e(i), so that its total length is e(i) - b(i) + 1. Also ... | The algorithm below works by recursively retrieving the largest non-overlapping set that each element is the leftmost member of and then returning the one with the largest coverage. See comments in the code.
Implemented in PHP. You can test it here <http://viper-7.com/xowTRF>
I think this algorithm's complexity is `O... |
264,175 | I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.
Now, since the underlying implementation (and since SQL Server... | 2008/11/05 | [
"https://Stackoverflow.com/questions/264175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28413/"
] | It is worth noting that Entity Framework has (at least) three ways of being consumed:
* LINQ to Entities over Object Services over Entity Client
* Entity SQL over Object Services over Entity Client
* Entity SQL using Entity Client command objects (most similar to classic ADO.NET)
Entity Client ultimately spits out a ... | A big difference between Linq to SQL and Entity Framework is that EF implements the Entity Data Model specification (EDM), and there are other products that are built around the EDM, like ADO.NET Data Services (aka Astoria).
The EDM is now being used to extend the AtomPub in a new spec called Open Data Protocol (OData... |
264,175 | I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.
Now, since the underlying implementation (and since SQL Server... | 2008/11/05 | [
"https://Stackoverflow.com/questions/264175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28413/"
] | It is worth noting that Entity Framework has (at least) three ways of being consumed:
* LINQ to Entities over Object Services over Entity Client
* Entity SQL over Object Services over Entity Client
* Entity SQL using Entity Client command objects (most similar to classic ADO.NET)
Entity Client ultimately spits out a ... | Actually, the EF does not generate EntitySQL when translating LINQ queries. In the EF we have a data structure-based representation for all queries called CQT or canonical query trees. Both the LINQ translator and the EntitySQL parser produce CQTs, and the rest of the query translation pipeline uses CQTs (and other int... |
264,175 | I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.
Now, since the underlying implementation (and since SQL Server... | 2008/11/05 | [
"https://Stackoverflow.com/questions/264175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28413/"
] | Actually, the EF does not generate EntitySQL when translating LINQ queries. In the EF we have a data structure-based representation for all queries called CQT or canonical query trees. Both the LINQ translator and the EntitySQL parser produce CQTs, and the rest of the query translation pipeline uses CQTs (and other int... | A big difference between Linq to SQL and Entity Framework is that EF implements the Entity Data Model specification (EDM), and there are other products that are built around the EDM, like ADO.NET Data Services (aka Astoria).
The EDM is now being used to extend the AtomPub in a new spec called Open Data Protocol (OData... |
21,259 | I have exploring several books on English language and some of them mix two notions: an infinitive and "basic form of a verb".
I would like to ask, if there are any difference between them or there is only an infinitive, which is a verb without face, time and number? | 2014/04/14 | [
"https://ell.stackexchange.com/questions/21259",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/5754/"
] | The same form of the verb is used in infinitive, subjunctive, and imperative constructions. Your options are to treat this as wide-scale syncretism (all three forms exist but are identical for all verbs) or claim that there is only one form used in all three types of construction.
*The Cambridge Grammar of the Englis... | I think the infinitive form of a verb is the verb in its basic form only! To make it even simple to understand, this is the verb's version we find in a dictionary!
The infinite form of verb generally follows *to* (for instance, *to work, to study, to eat...and so on*). However, it's not always (I must *learn* English)... |
21,259 | I have exploring several books on English language and some of them mix two notions: an infinitive and "basic form of a verb".
I would like to ask, if there are any difference between them or there is only an infinitive, which is a verb without face, time and number? | 2014/04/14 | [
"https://ell.stackexchange.com/questions/21259",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/5754/"
] | The same form of the verb is used in infinitive, subjunctive, and imperative constructions. Your options are to treat this as wide-scale syncretism (all three forms exist but are identical for all verbs) or claim that there is only one form used in all three types of construction.
*The Cambridge Grammar of the Englis... | The link above (# 18705) does not mention the term base form. There are various grammar terms in use for the verb form you find in dictionaries:
1 infinitive - the standard Latin term
2 plain form
3 base form - not very precise because we normally have three base forms, some verbs have more, e.g. to be and to do.
... |
448,312 | Suppose I have data and I want to fit a two component Gaussian mixture to
it. I don't know how to do it in python but worse than that
is that I have an additional constraint that the mean of one component should be less than zero and the mean of the other component should be greater than or equal to zero.
Does anyone ... | 2020/02/07 | [
"https://stats.stackexchange.com/questions/448312",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/64098/"
] | Here's an alternate method that you'll have more control over. The idea is to use scipy's `minimize` + autograd to do the heavy lifting for you.
1. We define our *negative* log-likelihood, which we wish to *minimize*. Note that I'm going to optimize the scale parameters in log-space, as this is much easier. (Take the ... | Take a look at the sklearn implementation of [Gaussian mixture modeling](https://scikit-learn.org/stable/modules/mixture.html). Assuming it uses something like EM, the mean of the components spanning the origin shouldn't be an issue. |
56,896,296 | Currently i've been adding textview progmatically in my code.
what i want is to put a button beside of 'anothertextview' programatically
here is my current code:
```
void addSubCat(){
final TextView subCat = new TextView(EncodeGroupActivity.this);
subCat.setLayoutParams(new LinearLayout.LayoutParam... | 2019/07/05 | [
"https://Stackoverflow.com/questions/56896296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | 1.=> Hi! First take one LinearLayout with Vertical orientation in Your XML file like..
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical"
android:id="@+id/mainLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
... | Try this
```
void addSubCat(){
final TextView subCat = new TextView(EncodeGroupActivity.this);
subCat.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT));
subCat.setT... |
416,970 | Does the Hibernate API support object result sets in the form of a collection other than a List?
For example, I have process that runs hundreds of thousands of iterations in order to create some data for a client. This process uses records from a Value table (for example) in order to create this output for each itera... | 2009/01/06 | [
"https://Stackoverflow.com/questions/416970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318/"
] | If I understand correctly, you load a bunch of data from the database to memory and then use them locally by looking for certain objects in that list.
If this is the case, I see 2 options.
1. Dont load all the data, but for each iteration access the database with a query returning only the specific record that you ne... | From [Java Persistence with Hibernate](http://www.amazon.ca/Java-Persistence-Hibernate-Christian-Bauer/dp/1932394885/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1231256183&sr=8-1):
* A java.util.Map can be mapped with
`<map>`, preserving key and value
pairs. Use a `java.util.HashMap` to
initialize a property.
* A `java.util.S... |
416,970 | Does the Hibernate API support object result sets in the form of a collection other than a List?
For example, I have process that runs hundreds of thousands of iterations in order to create some data for a client. This process uses records from a Value table (for example) in order to create this output for each itera... | 2009/01/06 | [
"https://Stackoverflow.com/questions/416970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318/"
] | I assume you are referring to the [`Query.list()`](http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Query.html#list()) method. If so: no, there is no way to return top-level results other than a `List`. If you are receiving too many results, why not issue a more constrained query to the database? If the query is ... | From [Java Persistence with Hibernate](http://www.amazon.ca/Java-Persistence-Hibernate-Christian-Bauer/dp/1932394885/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1231256183&sr=8-1):
* A java.util.Map can be mapped with
`<map>`, preserving key and value
pairs. Use a `java.util.HashMap` to
initialize a property.
* A `java.util.S... |
416,970 | Does the Hibernate API support object result sets in the form of a collection other than a List?
For example, I have process that runs hundreds of thousands of iterations in order to create some data for a client. This process uses records from a Value table (for example) in order to create this output for each itera... | 2009/01/06 | [
"https://Stackoverflow.com/questions/416970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318/"
] | If I understand correctly, you load a bunch of data from the database to memory and then use them locally by looking for certain objects in that list.
If this is the case, I see 2 options.
1. Dont load all the data, but for each iteration access the database with a query returning only the specific record that you ne... | Yes, that can be done.
However, you'll probably have to have your domain class implement `Comparable`; I don't think you can do it using a Comparator.
**Edit:**
It seems like I misunderstood the question. If you're talking about the result of an ad hoc query, then the above will not help you. It might be possible to ... |
416,970 | Does the Hibernate API support object result sets in the form of a collection other than a List?
For example, I have process that runs hundreds of thousands of iterations in order to create some data for a client. This process uses records from a Value table (for example) in order to create this output for each itera... | 2009/01/06 | [
"https://Stackoverflow.com/questions/416970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318/"
] | I assume you are referring to the [`Query.list()`](http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Query.html#list()) method. If so: no, there is no way to return top-level results other than a `List`. If you are receiving too many results, why not issue a more constrained query to the database? If the query is ... | Yes, that can be done.
However, you'll probably have to have your domain class implement `Comparable`; I don't think you can do it using a Comparator.
**Edit:**
It seems like I misunderstood the question. If you're talking about the result of an ad hoc query, then the above will not help you. It might be possible to ... |
416,970 | Does the Hibernate API support object result sets in the form of a collection other than a List?
For example, I have process that runs hundreds of thousands of iterations in order to create some data for a client. This process uses records from a Value table (for example) in order to create this output for each itera... | 2009/01/06 | [
"https://Stackoverflow.com/questions/416970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318/"
] | I assume you are referring to the [`Query.list()`](http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Query.html#list()) method. If so: no, there is no way to return top-level results other than a `List`. If you are receiving too many results, why not issue a more constrained query to the database? If the query is ... | If I understand correctly, you load a bunch of data from the database to memory and then use them locally by looking for certain objects in that list.
If this is the case, I see 2 options.
1. Dont load all the data, but for each iteration access the database with a query returning only the specific record that you ne... |
56,807,078 | I'm able to split every words from string using below code:
```
string s = TextBox1.Text.Trim().ToString(); // a b c d e f g h
string[] words = s.Split(' ');
foreach (string word in words)
{
TextBox1.Text += "\n"+word.ToString();
}
```
this code return output like
a
b
c
d
e
f
g
h
i wa... | 2019/06/28 | [
"https://Stackoverflow.com/questions/56807078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4811266/"
] | You have to convert your foreach to a for loop and use index
```
string s = TextBox1.Text.Trim().ToString(); //a b c d e f g h
string[] words = s.Split(' ');
for (int i = 0; i < words.Length - 1; i++)
{
TextBox1.Text += $"\n{words[i]} {words[i + 1]}";
}
```
if we have "a b c" it will show
```
a b
b c
```
an... | The best way is to use `Regex` (Regular Expressions):
```
foreach(var s in (new System.Text.RegularExpressions.Regex(@"[^ ]+ [^ ]+")).Matches("a b c d e f"))
TextBox1.Text += s.ToString()+"\n";
```
you can see the result here :
<https://dotnetfiddle.net/rJ8NEQ> |
41,979,777 | My website competitionmantra.com works fine on mobile while scrolling down.
But, on desktop it does not scroll.
Here are two screenshots of it.
[](https://i.stack.imgur.com/X8SOm.png)
[. The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | If you are not limited to just a camera which wasn't in one of your constraints perhaps you can move to using a range sensor like the Xbox [Kinect](http://en.wikipedia.org/wiki/Kinect). With this you can perform depth and colour based matched segmentation of the image. This allows for faster separation of objects in th... | I like your question, regardless of whether it's off topic or not :P
An interesting aside; I've just completed a subject in my degree where we covered robotics and computer vision. Our project for the semester was incredibly similar to the one you describe.
We had to develop a robot that used an Xbox Kinect to detect... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | I would detect red rectangles: RGB -> HSV, filter red -> binary image, [close](http://undergraduate.csse.uwa.edu.au/units/CITS4240/Lectures/morphology.pdf) (dilate then erode, known as `imclose` in matlab)
Then look through rectangles from largest to smallest. Rectangles that have smaller rectangles in a known positio... | There are a bunch of color descriptors used to recognise objects, the paper below compares a lot of them. They are specially powerful when combined with SIFT or SURF. SURF or SIFT alone are not very useful in a coca cola can image because they don't recognise a lot of interest points, you need the color information to ... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | **Looking at shape**
Take a gander at the shape of the red portion of the can/bottle. Notice how the can tapers off slightly at the very top whereas the bottle label is straight. You can distinguish between these two by comparing the width of the red portion across the length of it.
**Looking at highlights**
One way... | I'm not aware of OpenCV but looking at the problem logically I think you could differentiate between bottle and can by changing the image which you are looking for i.e. Coca Cola. You should incorporate till top portion of can as in case of can there is silver lining at top of coca cola and in case of bottle there will... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | I really like [Darren Cook's](https://stackoverflow.com/a/10168923/517815) and [stacker's answers](https://stackoverflow.com/a/10169025/517815) to this problem. I was in the midst of throwing my thoughts into a comment on those, but I believe my approach is too answer-shaped to not leave here.
In short summary, you've... | Hmm, I actually think I'm onto *something* (this is like the most interesting question ever - so it'd be a shame not to continue trying to find the "perfect" answer, even though an acceptable one has been found)...
Once you find the logo, your troubles are half done. Then you only have to figure out the differences be... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | I like your question, regardless of whether it's off topic or not :P
An interesting aside; I've just completed a subject in my degree where we covered robotics and computer vision. Our project for the semester was incredibly similar to the one you describe.
We had to develop a robot that used an Xbox Kinect to detect... | As alternative to all these nice solutions, you can train your own classifier and make your application robust to errors. As example, you can use [Haar Training](http://note.sonots.com/SciSoftware/haartraining.html), providing a good number of positive and negative images of your target.
It can be useful to extract on... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | Isn't it difficult even for humans to distinguish between a bottle and a can in the second image (provided the transparent region of the bottle is hidden)?
They are almost the same except for a very small region (that is, width at the top of the can is a little small while the wrapper of the bottle is the same width t... | The first things I would look for are color - like RED , when doing Red eye detection in an image - there is a certain color range to detect , some characteristics about it considering the surrounding area and such as distance apart from the other eye if it is indeed visible in the image.
1: First characteristic is co... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | This may be a very naive idea (or may not work at all), but the dimensions of all the coke cans are fixed. So may be if the same image contains both a can and a bottle then you can tell them apart by size considerations (bottles are going to be larger). Now because of missing depth (i.e. 3D mapping to 2D mapping) its p... | **Deep Learning**
Gather at least a few hundred images containing cola cans, annotate the bounding box around them as positive classes, include cola bottles and other cola products label them negative classes as well as random objects.
Unless you collect a very large dataset, perform the trick of using deep learning ... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | An alternative approach would be to extract features (keypoints) using the [scale-invariant feature transform](https://en.wikipedia.org/wiki/Scale-invariant_feature_transform) (SIFT) or [Speeded Up Robust Features](https://en.wikipedia.org/wiki/Speeded_up_robust_features) (SURF).
You can find a nice `OpenCV` code exam... | Hmm, I actually think I'm onto *something* (this is like the most interesting question ever - so it'd be a shame not to continue trying to find the "perfect" answer, even though an acceptable one has been found)...
Once you find the logo, your troubles are half done. Then you only have to figure out the differences be... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | **Looking at shape**
Take a gander at the shape of the red portion of the can/bottle. Notice how the can tapers off slightly at the very top whereas the bottle label is straight. You can distinguish between these two by comparing the width of the red portion across the length of it.
**Looking at highlights**
One way... | Maybe too many years late, but nevertheless a theory to try.
The ratio of bounding rectangle of red logo region to the overall dimension of the bottle/can is different. In the case of Can, should be 1:1, whereas will be different in that of bottle (with or without cap).
This should make it easy to distinguish between... |
10,168,686 | One of the most interesting projects I've worked on in the past couple of years was a project about [image processing](https://en.wikipedia.org/wiki/Image_processing). The goal was to develop a system to be able to recognize Coca-Cola **'cans'** (note that I'm stressing the word 'cans', you'll see why in a minute). You... | 2012/04/16 | [
"https://Stackoverflow.com/questions/10168686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332690/"
] | As alternative to all these nice solutions, you can train your own classifier and make your application robust to errors. As example, you can use [Haar Training](http://note.sonots.com/SciSoftware/haartraining.html), providing a good number of positive and negative images of your target.
It can be useful to extract on... | There is a computer vision package called HALCON from [MVTec](http://www.mvtec.com) whose demos could give you good algorithm ideas. There is plenty of examples similar to your problem that you could run in demo mode and then look at the operators in the code and see how to implement them from existing OpenCV operators... |
16,686,336 | I am working on proxy with PHP. In my php code I am sending proper required headers and expected to get response body and headers. However I am getting response body correctly as I want but not getting headers properly (supposed to get Status 200 but getting 401). When i traced with firefox I found that SAP URL itsself... | 2013/05/22 | [
"https://Stackoverflow.com/questions/16686336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1806296/"
] | Solved!
-------
The following solution fixed this issue for me. Add the class below to `src/java` (this class cannot be written in Groovy)
```
package org.example;
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration;
import org.hibernate.MappingException;
import org.hibernate.mapping.Jo... | Hibernate ensures the data integrity in case of table per subclass. In case of table per subclass, subclass maintains a primary key association with superclass. Have a look at [Hibernate Table per subclass](http://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/inheritance.html#inheritance-tablepersubclass). To v... |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | You got the order of the for-loops wrong. It should be
```
all_pics = [(d, f)
for d in os.listdir(pics)
for f in os.listdir(os.path.join(pics, d))]
```
Outermost loop first, innermost loop last.
I wonder why you didn't get a `NameError` for `d`. | ```
l = [ [(d, f) for f in os.listdir(os.path.join(pics, d))] for d in os.listdir(pics) ]
l = sum(l, []) # flatten list of lists => list
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | You got the order of the for-loops wrong. It should be
```
all_pics = [(d, f)
for d in os.listdir(pics)
for f in os.listdir(os.path.join(pics, d))]
```
Outermost loop first, innermost loop last.
I wonder why you didn't get a `NameError` for `d`. | You simply need to flatten your output list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = reduce(lambda xs,ys: xs+ys, [(d, os.listdir(d)) for d in os.listdir(pics)])
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | You got the order of the for-loops wrong. It should be
```
all_pics = [(d, f)
for d in os.listdir(pics)
for f in os.listdir(os.path.join(pics, d))]
```
Outermost loop first, innermost loop last.
I wonder why you didn't get a `NameError` for `d`. | List comprehensions work as a mapping from one list to another. As another poster pointed it you can do it by nesting them, but are you sure you really want to? You should favour readability over everything else, in all most all cases - and I don't consider the nested comprehension to be easily understandable.
```
Wha... |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | You got the order of the for-loops wrong. It should be
```
all_pics = [(d, f)
for d in os.listdir(pics)
for f in os.listdir(os.path.join(pics, d))]
```
Outermost loop first, innermost loop last.
I wonder why you didn't get a `NameError` for `d`. | Using `os.walk` is a better idea:
```
all_pics = [(dir,file)
for dir,sub,files in os.walk(pics)
for file in files]
```
So why is it a better idea?
* it works with deeper trees, too (`subdir/subdir/pic.jpg`)
* it doesn't break if you put a file in `~/Pictures` (If you call `os.listdir` on fi... |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | List comprehensions work as a mapping from one list to another. As another poster pointed it you can do it by nesting them, but are you sure you really want to? You should favour readability over everything else, in all most all cases - and I don't consider the nested comprehension to be easily understandable.
```
Wha... | ```
l = [ [(d, f) for f in os.listdir(os.path.join(pics, d))] for d in os.listdir(pics) ]
l = sum(l, []) # flatten list of lists => list
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | Using `os.walk` is a better idea:
```
all_pics = [(dir,file)
for dir,sub,files in os.walk(pics)
for file in files]
```
So why is it a better idea?
* it works with deeper trees, too (`subdir/subdir/pic.jpg`)
* it doesn't break if you put a file in `~/Pictures` (If you call `os.listdir` on fi... | ```
l = [ [(d, f) for f in os.listdir(os.path.join(pics, d))] for d in os.listdir(pics) ]
l = sum(l, []) # flatten list of lists => list
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | List comprehensions work as a mapping from one list to another. As another poster pointed it you can do it by nesting them, but are you sure you really want to? You should favour readability over everything else, in all most all cases - and I don't consider the nested comprehension to be easily understandable.
```
Wha... | You simply need to flatten your output list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = reduce(lambda xs,ys: xs+ys, [(d, os.listdir(d)) for d in os.listdir(pics)])
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | Using `os.walk` is a better idea:
```
all_pics = [(dir,file)
for dir,sub,files in os.walk(pics)
for file in files]
```
So why is it a better idea?
* it works with deeper trees, too (`subdir/subdir/pic.jpg`)
* it doesn't break if you put a file in `~/Pictures` (If you call `os.listdir` on fi... | You simply need to flatten your output list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = reduce(lambda xs,ys: xs+ys, [(d, os.listdir(d)) for d in os.listdir(pics)])
``` |
5,485,135 | In Python, I want to list all files in a set of directories. The best I'd like to get is a list. But at most I managed to make a nested list:
```
pics = os.path.expanduser('~/Pictures')
all_pics = [(d, os.listdir(d)) for d in os.listdir(pics)]
```
result:
```
[('folder1', ['file1', 'file2', ...]), ('folder2', ['fil... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/171278/"
] | Using `os.walk` is a better idea:
```
all_pics = [(dir,file)
for dir,sub,files in os.walk(pics)
for file in files]
```
So why is it a better idea?
* it works with deeper trees, too (`subdir/subdir/pic.jpg`)
* it doesn't break if you put a file in `~/Pictures` (If you call `os.listdir` on fi... | List comprehensions work as a mapping from one list to another. As another poster pointed it you can do it by nesting them, but are you sure you really want to? You should favour readability over everything else, in all most all cases - and I don't consider the nested comprehension to be easily understandable.
```
Wha... |
243,213 | I know extension is quite possible using the `hpacucli` utility, but is there an easy way to reduce the size of an existing logical drive (not array)?
The controller is a P410i in a ProLiant DL360 G6 server. I'd like to reduce logicaldrive 1 from 72GB to 40GB.
```
=> ctrl all show config detail
Smart Array P410i in ... | 2011/03/04 | [
"https://serverfault.com/questions/243213",
"https://serverfault.com",
"https://serverfault.com/users/13325/"
] | [Page 41 of the SA Configuration Guide](http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c02289065/c02289065.pdf) says no. You can only create, delete, extend, and migrate (plus some information and recovery commands). | Can you try to boot from [Parted Magic](http://distrowatch.com/table.php?distribution=partedmagic) and see if you can resize down? I have found it to be very helpful.
If it is not the boot drive, back up the data and make a new partition. |
10,240,365 | i am validation of login page is done by server side.i create one checkbox for remember username and password.if check box is checked it remembers the username and password.But the problem is even if check box unchecked also it finds stored username and password. now i want if checkbox is unchecked means it cannot reme... | 2012/04/20 | [
"https://Stackoverflow.com/questions/10240365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1289949/"
] | There is no such guarantee don't rely on it.
A string literal is allocated memory somewhere in the read-only implementation defined region there is no way to know what that will be in a portable manner and hence you should not make any assumptions about it. | The situation is even "worse" than you imagine. Comparison is only defined for pointers that point into the same object (or just to the byte beyond). So generally for two different objects (be they statically allocated as a string literal or dynamically with `malloc` or so) you can't even ask whether or not one has an ... |
10,240,365 | i am validation of login page is done by server side.i create one checkbox for remember username and password.if check box is checked it remembers the username and password.But the problem is even if check box unchecked also it finds stored username and password. now i want if checkbox is unchecked means it cannot reme... | 2012/04/20 | [
"https://Stackoverflow.com/questions/10240365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1289949/"
] | There is no such guarantee don't rely on it.
A string literal is allocated memory somewhere in the read-only implementation defined region there is no way to know what that will be in a portable manner and hence you should not make any assumptions about it. | Not only are there no guarantees, systems where the opposite is true are pretty common. On MacOS (my laptop), for instance:
```
#include <stdio.h>
#include <stdlib.h>
void pr_addr(const char *name, void *addr) {
printf("%s: %p\n", name, addr);
}
int main(void) {
pr_addr("literal", "literal");
pr_addr("he... |
10,240,365 | i am validation of login page is done by server side.i create one checkbox for remember username and password.if check box is checked it remembers the username and password.But the problem is even if check box unchecked also it finds stored username and password. now i want if checkbox is unchecked means it cannot reme... | 2012/04/20 | [
"https://Stackoverflow.com/questions/10240365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1289949/"
] | There is no such guarantee don't rely on it.
A string literal is allocated memory somewhere in the read-only implementation defined region there is no way to know what that will be in a portable manner and hence you should not make any assumptions about it. | For fun, I wrote an attempt that tries to guess based on addresses of other literals. It works by comparing the address of the potential literal with another known literal, a stack address, and a heap address. If the potential address is closer to the literal than the others, it assumes that the potential address is a ... |
10,240,365 | i am validation of login page is done by server side.i create one checkbox for remember username and password.if check box is checked it remembers the username and password.But the problem is even if check box unchecked also it finds stored username and password. now i want if checkbox is unchecked means it cannot reme... | 2012/04/20 | [
"https://Stackoverflow.com/questions/10240365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1289949/"
] | The situation is even "worse" than you imagine. Comparison is only defined for pointers that point into the same object (or just to the byte beyond). So generally for two different objects (be they statically allocated as a string literal or dynamically with `malloc` or so) you can't even ask whether or not one has an ... | Not only are there no guarantees, systems where the opposite is true are pretty common. On MacOS (my laptop), for instance:
```
#include <stdio.h>
#include <stdlib.h>
void pr_addr(const char *name, void *addr) {
printf("%s: %p\n", name, addr);
}
int main(void) {
pr_addr("literal", "literal");
pr_addr("he... |
10,240,365 | i am validation of login page is done by server side.i create one checkbox for remember username and password.if check box is checked it remembers the username and password.But the problem is even if check box unchecked also it finds stored username and password. now i want if checkbox is unchecked means it cannot reme... | 2012/04/20 | [
"https://Stackoverflow.com/questions/10240365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1289949/"
] | The situation is even "worse" than you imagine. Comparison is only defined for pointers that point into the same object (or just to the byte beyond). So generally for two different objects (be they statically allocated as a string literal or dynamically with `malloc` or so) you can't even ask whether or not one has an ... | For fun, I wrote an attempt that tries to guess based on addresses of other literals. It works by comparing the address of the potential literal with another known literal, a stack address, and a heap address. If the potential address is closer to the literal than the others, it assumes that the potential address is a ... |
205,926 | I want to remove apache as if it was never installed, no config files left behind. I intend to reinstall apache2 fresh. I have tried various combinations of apt-get options to no success.
```
apt-get remove apache2
apt-get remove --purge apache2
apt-get purge apache2
apt-get autoremove apache2
```
None of these tot... | 2010/11/25 | [
"https://serverfault.com/questions/205926",
"https://serverfault.com",
"https://serverfault.com/users/50590/"
] | `apache2` does not contain real config files. Try
```
dpkg --purge apache2-common
```
From its description:
```
Apache HTTP Server common files
<...>
This package contains the configuration and support scripts. <...>
``` | dpkg --purge apache2 |
205,926 | I want to remove apache as if it was never installed, no config files left behind. I intend to reinstall apache2 fresh. I have tried various combinations of apt-get options to no success.
```
apt-get remove apache2
apt-get remove --purge apache2
apt-get purge apache2
apt-get autoremove apache2
```
None of these tot... | 2010/11/25 | [
"https://serverfault.com/questions/205926",
"https://serverfault.com",
"https://serverfault.com/users/50590/"
] | `apache2` does not contain real config files. Try
```
dpkg --purge apache2-common
```
From its description:
```
Apache HTTP Server common files
<...>
This package contains the configuration and support scripts. <...>
``` | ```
sudo apt-get remove --purge $(dpkg -l apache* | grep ii | awk '{print $2}')
``` |
48,182,709 | I have created a library, and added as a module in my app. My library does not have any `activity class`, all classes are core java classes, so i don't have access to `context`.
This is what i did;
* My library class is `singleton`
* I have created a static variable like this; `static Context myGlobalContext`
* I cre... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48182709",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4977669/"
] | there are a few options that can be used to set the range of an axis...
```
{hAxis,vAxis,hAxes.*,vAxes.*}.ticks
{hAxis,vAxis,hAxes.*,vAxes.*}.minValue
{hAxis,vAxis,hAxes.*,vAxes.*}.maxValue
{hAxis,vAxis,hAxes.*,vAxes.*}.viewWindowMode
```
however, none are supported by *Material* charts...
*Material* = `google.ch... | I got it fixed like this:
```
var options = {
title: 'Trust Self-Assessment',
width: 800,
legend: { position: 'none' },
chart: { title: 'Trust Self-Assessment',
subtitle: '' },
bars: 'horizontal', // Required for Material Bar Charts.
... |
9,895,952 | How can I set my XAML Metro application to use the light theme (as shown in VS 11 Beta Platform Dock)
It defaults to the dark theme which I don't like
Thanks | 2012/03/27 | [
"https://Stackoverflow.com/questions/9895952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296393/"
] | You can set the theme in app.xaml like this:
```
<Application
..
RequestedTheme="Light">
``` | This link can be helpful if you haven't check [this](http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx#creating_a_consistent_look_with_styles) yet. |
9,895,952 | How can I set my XAML Metro application to use the light theme (as shown in VS 11 Beta Platform Dock)
It defaults to the dark theme which I don't like
Thanks | 2012/03/27 | [
"https://Stackoverflow.com/questions/9895952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296393/"
] | This link can be helpful if you haven't check [this](http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx#creating_a_consistent_look_with_styles) yet. | You can also do this programatically by setting `App.Current.RequestedTheme` in the constructor of `app.xaml.cs`. Example::
```
public App()
{
this.InitializeComponent();
App.Current.RequestedTheme = ApplicationTheme.Light;
}
```
Setting it at a later point in time throws an exception tho... |
9,895,952 | How can I set my XAML Metro application to use the light theme (as shown in VS 11 Beta Platform Dock)
It defaults to the dark theme which I don't like
Thanks | 2012/03/27 | [
"https://Stackoverflow.com/questions/9895952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296393/"
] | You can set the theme in app.xaml like this:
```
<Application
..
RequestedTheme="Light">
``` | You can also do this programatically by setting `App.Current.RequestedTheme` in the constructor of `app.xaml.cs`. Example::
```
public App()
{
this.InitializeComponent();
App.Current.RequestedTheme = ApplicationTheme.Light;
}
```
Setting it at a later point in time throws an exception tho... |
45,880,735 | My website works properly in my pc without no error. I tested it on ubuntu and also on windows. It looks like [this](https://i.stack.imgur.com/HZ0mF.jpg) when I open it in my pc, but after uploading it to my host service it doesn't look properly [like this](https://i.stack.imgur.com/YLHyc.jpg)
I added all images, boot... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45880735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7128725/"
] | you said that your folder called "source" but in href your folder called "Sources"
try like this:
```
<link rel="shortcut icon" href="/Sources/Pictures/logo4.png" type="image/ico">
<link rel="stylesheet" href="/Sources/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="/Sources/boots... | Make sure you have the right paths. Href atribute is 100% case-sensitive. So double check your paths again.
Then you can use chrome dev tools or firebug to check for the paths its trying to take to the files. |
45,880,735 | My website works properly in my pc without no error. I tested it on ubuntu and also on windows. It looks like [this](https://i.stack.imgur.com/HZ0mF.jpg) when I open it in my pc, but after uploading it to my host service it doesn't look properly [like this](https://i.stack.imgur.com/YLHyc.jpg)
I added all images, boot... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45880735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7128725/"
] | you said that your folder called "source" but in href your folder called "Sources"
try like this:
```
<link rel="shortcut icon" href="/Sources/Pictures/logo4.png" type="image/ico">
<link rel="stylesheet" href="/Sources/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="/Sources/boots... | ```
<link rel="shortcut icon" href="../source/Pictures/logo4.png" type="image/ico">
<link rel="stylesheet" href="../source/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="../source/bootstrap-3.3.7-dist/css/bootstrap.css">
<link rel="stylesheet" href="../source/jquery-ui-1.12.1/jq... |
45,880,735 | My website works properly in my pc without no error. I tested it on ubuntu and also on windows. It looks like [this](https://i.stack.imgur.com/HZ0mF.jpg) when I open it in my pc, but after uploading it to my host service it doesn't look properly [like this](https://i.stack.imgur.com/YLHyc.jpg)
I added all images, boot... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45880735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7128725/"
] | Firstly, I think it is less likely that you have a path problem, as images are displayed correctly but none of the CSS is "kicking in".
Secondly, using a mix of upper and lower can cause problems (better to use all lowercase) particularly when developing on a Windows machine (doesn't distinguish between upr and lwr) an... | you said that your folder called "source" but in href your folder called "Sources"
try like this:
```
<link rel="shortcut icon" href="/Sources/Pictures/logo4.png" type="image/ico">
<link rel="stylesheet" href="/Sources/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="/Sources/boots... |
45,880,735 | My website works properly in my pc without no error. I tested it on ubuntu and also on windows. It looks like [this](https://i.stack.imgur.com/HZ0mF.jpg) when I open it in my pc, but after uploading it to my host service it doesn't look properly [like this](https://i.stack.imgur.com/YLHyc.jpg)
I added all images, boot... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45880735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7128725/"
] | Firstly, I think it is less likely that you have a path problem, as images are displayed correctly but none of the CSS is "kicking in".
Secondly, using a mix of upper and lower can cause problems (better to use all lowercase) particularly when developing on a Windows machine (doesn't distinguish between upr and lwr) an... | Make sure you have the right paths. Href atribute is 100% case-sensitive. So double check your paths again.
Then you can use chrome dev tools or firebug to check for the paths its trying to take to the files. |
45,880,735 | My website works properly in my pc without no error. I tested it on ubuntu and also on windows. It looks like [this](https://i.stack.imgur.com/HZ0mF.jpg) when I open it in my pc, but after uploading it to my host service it doesn't look properly [like this](https://i.stack.imgur.com/YLHyc.jpg)
I added all images, boot... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45880735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7128725/"
] | Firstly, I think it is less likely that you have a path problem, as images are displayed correctly but none of the CSS is "kicking in".
Secondly, using a mix of upper and lower can cause problems (better to use all lowercase) particularly when developing on a Windows machine (doesn't distinguish between upr and lwr) an... | ```
<link rel="shortcut icon" href="../source/Pictures/logo4.png" type="image/ico">
<link rel="stylesheet" href="../source/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<link rel="stylesheet" href="../source/bootstrap-3.3.7-dist/css/bootstrap.css">
<link rel="stylesheet" href="../source/jquery-ui-1.12.1/jq... |
8,950 | Use Case - There is Javascript execute button on Account page layout named 'Update Account' -
```
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
//JSsript code which updates account based on some logic
...
..
//40 or 50 lines of Code
```
Problem with above button is ... | 2013/02/26 | [
"https://salesforce.stackexchange.com/questions/8950",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/405/"
] | Each of your custom buttons could be written as so, letting 'RequireScript' determine whether your static resource script has already been loaded into the page (by another button).
If you can abstract the functions into a static resource file, the resource will only be loaded once and the button action can then call ... | You could create a VF page that contains all the logic you need, then pass whatever parameters you need from the Account page to this VF page when the user clicks your button. After the actions have taken place, send the user back to the Account record.
Is there a specific reason you need to execute Javascript? Or can... |
12,030,199 | Sometimes I get myself using different types of trees in Haskell and I don't know what they are called or where to get more information on algorithms using them or class instances for them, or even some pre-existing code or library on hackage.
Examples:
Binary trees where the labels are on the leaves or the branches... | 2012/08/19 | [
"https://Stackoverflow.com/questions/12030199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114388/"
] | The names I've heard:
* `BinTree1` is a [binary tree](http://en.wikipedia.org/wiki/Binary_tree)
* `BinTree2` don't know a name but you can use such a tree to represent a prefix-free code like huffman coding for example
* `Tree1` is a [Rose tree](http://en.wikipedia.org/wiki/Rose_Tree)
* `Tree2` is isomoprhic to `[Tree... | A binary tree that only has labels in the leaves (`BinTree2`) is usually used for hash maps, because the tree structure itself doesn't offer any information other than the binary position of the leaves.
So, if you have 4 values with the following hash codes:
```none
...000001 A
...000010 B
...000011 C
...000010 D
``... |
12,817,753 | So, I have the autobuild plugin. But, it is annoying that if there are errors, on each save, the messages box with errors keeps popping up. Yes, I know there are errors. Let me take care of them myself. In between I might save. So, leave me alone.
I save to update the errors in the editor. But, I do not need the messa... | 2012/10/10 | [
"https://Stackoverflow.com/questions/12817753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/961018/"
] | The JavaScript SDK is officially supported by Parse, so you could not go wrong choosing that. However, if you'd like a server-side framework, check out the [3rd party libraries for the REST API](https://parse.com/docs/api_libraries). Depending on your language preference, you should find something suitable to your need... | You can use Parse for this. Parse provides both a [REST API](https://parse.com/docs/rest) and a [JavaScript SDK](https://parse.com/docs/js_guide) which you can use to create a companion web site for your mobile app. |
904,170 | I updated my python interpreter, but I think the old one is still called. When I check for the version I get:
```
$ python -V
Python 3.0.1
```
But I believe the old interpreter is still being called. When I run the command:
```
python myProg.py
```
The script runs properly. But when I invoke it with the command
... | 2009/05/24 | [
"https://Stackoverflow.com/questions/904170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/74660/"
] | It's very possibly what you suspect, that the shebang line is calling the older version. Two things you might want to check:
1) what version is the interpreter at /usr/bin/python:
```
/usr/bin/python -V
```
2) where is the python 3 interpreter you installed:
```
which python
```
If you get the correct one from t... | It may be a bit odd providing a Perl script to answer a Python question, but it works for Python just as well as it does for Perl. This is a script called '`fixin`', meaning 'fix interpreter'. It changes the shebang line to the correct string for your current PATH.
```
#!/Users/jleffler/perl/v5.10.0/bin/perl
#
# @(#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.