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
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
I did it with 2 lines in powershell. ``` $versionText=(Get-Item MyProgram.exe).VersionInfo.FileVersion (Get-Content MySetup.vdproj.template).replace('${VERSION}', $($versionText)) | Set-Content MySetup.vdproj ``` Rename your existing .vdproj to be MySetup.vdproj.template and insert "${VERSION}" wherever you want to ...
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using WindowsInstaller; // cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Property`.`Value`='4.0.0.1' WHERE `Property`='ProductVersion'" // "SELECT `Property`.`ProductVer...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
Not sure whether you still require this or not but wanted answer this as we did similar kind of operation in the postbuild event. As far as the research I did this is not possible to set the file name as you want internally through setup process. You can do this in other way by naming the output file through an extern...
If you use a WIX project (as opposed to a VS Setup & Deployment project) then [this article](http://blog.tentaclesoftware.com/archive/2009/05/03/38.aspx) explains exactly how to achieve what you are after.
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
If you use a WIX project (as opposed to a VS Setup & Deployment project) then [this article](http://blog.tentaclesoftware.com/archive/2009/05/03/38.aspx) explains exactly how to achieve what you are after.
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using WindowsInstaller; // cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Property`.`Value`='4.0.0.1' WHERE `Property`='ProductVersion'" // "SELECT `Property`.`ProductVer...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
I didn't want to use the .exe method above and had a little time spare so I started diggind around. I'm using VS 2008 on Windows 7 64 bit. When I have a Setup project, lets call it MySetup all the details of the project can be found in the file $(ProjectDir)MySetup.vdproj. The product version will be found on a single...
If you use a WIX project (as opposed to a VS Setup & Deployment project) then [this article](http://blog.tentaclesoftware.com/archive/2009/05/03/38.aspx) explains exactly how to achieve what you are after.
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
Not sure whether you still require this or not but wanted answer this as we did similar kind of operation in the postbuild event. As far as the research I did this is not possible to set the file name as you want internally through setup process. You can do this in other way by naming the output file through an extern...
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using WindowsInstaller; // cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Property`.`Value`='4.0.0.1' WHERE `Property`='ProductVersion'" // "SELECT `Property`.`ProductVer...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
I didn't want to use the .exe method above and had a little time spare so I started diggind around. I'm using VS 2008 on Windows 7 64 bit. When I have a Setup project, lets call it MySetup all the details of the project can be found in the file $(ProjectDir)MySetup.vdproj. The product version will be found on a single...
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using WindowsInstaller; // cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Property`.`Value`='4.0.0.1' WHERE `Property`='ProductVersion'" // "SELECT `Property`.`ProductVer...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
Same concept as Jim Grimmett's answer, but with less dependencies: ``` FOR /F "tokens=2 delims== " %%V IN ('FINDSTR /B /R /C:" *\"ProductVersion\"" "$(ProjectDir)MySetupProjectName.vdproj"') DO FOR %%I IN ("$(BuiltOuputPath)") DO REN "$(BuiltOuputPath)" "%%~nI-%%~nxV%%~xI" ``` ### Some points of note: `MySetupProje...
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using WindowsInstaller; // cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Property`.`Value`='4.0.0.1' WHERE `Property`='ProductVersion'" // "SELECT `Property`.`ProductVer...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
Same concept as Jim Grimmett's answer, but with less dependencies: ``` FOR /F "tokens=2 delims== " %%V IN ('FINDSTR /B /R /C:" *\"ProductVersion\"" "$(ProjectDir)MySetupProjectName.vdproj"') DO FOR %%I IN ("$(BuiltOuputPath)") DO REN "$(BuiltOuputPath)" "%%~nI-%%~nxV%%~xI" ``` ### Some points of note: `MySetupProje...
I did it with 2 lines in powershell. ``` $versionText=(Get-Item MyProgram.exe).VersionInfo.FileVersion (Get-Content MySetup.vdproj.template).replace('${VERSION}', $($versionText)) | Set-Content MySetup.vdproj ``` Rename your existing .vdproj to be MySetup.vdproj.template and insert "${VERSION}" wherever you want to ...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
If you use a WIX project (as opposed to a VS Setup & Deployment project) then [this article](http://blog.tentaclesoftware.com/archive/2009/05/03/38.aspx) explains exactly how to achieve what you are after.
I did it with 2 lines in powershell. ``` $versionText=(Get-Item MyProgram.exe).VersionInfo.FileVersion (Get-Content MySetup.vdproj.template).replace('${VERSION}', $($versionText)) | Set-Content MySetup.vdproj ``` Rename your existing .vdproj to be MySetup.vdproj.template and insert "${VERSION}" wherever you want to ...
3,359,974
Is there a way to include the version number as part of the output.msi filename in a VS2008 Setup Project? I'd like for example an output file called: "myinstaller-1.0.13.msi" where the version part is automatically set based on the version number I have put in the deployment project properties.
2010/07/29
[ "https://Stackoverflow.com/questions/3359974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/311181/" ]
Same concept as Jim Grimmett's answer, but with less dependencies: ``` FOR /F "tokens=2 delims== " %%V IN ('FINDSTR /B /R /C:" *\"ProductVersion\"" "$(ProjectDir)MySetupProjectName.vdproj"') DO FOR %%I IN ("$(BuiltOuputPath)") DO REN "$(BuiltOuputPath)" "%%~nI-%%~nxV%%~xI" ``` ### Some points of note: `MySetupProje...
If you use a WIX project (as opposed to a VS Setup & Deployment project) then [this article](http://blog.tentaclesoftware.com/archive/2009/05/03/38.aspx) explains exactly how to achieve what you are after.
63,521
Because I write many document with office word 2007 + mathtype. I'm not request for libreoffice can edit mathtype's equations, but I want to know libreoffice can open all the office word 2007 documents or not?
2011/09/29
[ "https://askubuntu.com/questions/63521", "https://askubuntu.com", "https://askubuntu.com/users/23864/" ]
libreoffice and openoffice are just clones separated due to policy reasons. But as far as word 07 is concerned, LO or OO may sometimes may not be so faithful in reproducing the exact same effect as in Word 07. Some formatting mismatch you can always expect.
Well, to make sure that you can use Libre Office without any problems you can easy test for it if it will work without any issues (and maybe start moving out from MS Office in to LibreOffice) using the portable version of LibreOffice. No need for install, if it doesn't work just delete it and you are good. You can ge...
63,521
Because I write many document with office word 2007 + mathtype. I'm not request for libreoffice can edit mathtype's equations, but I want to know libreoffice can open all the office word 2007 documents or not?
2011/09/29
[ "https://askubuntu.com/questions/63521", "https://askubuntu.com", "https://askubuntu.com/users/23864/" ]
Yes, as others have stated, you can open Word 2007 documents with LibreOffice on Ubuntu. No one addressed MathType equations though, so let me mention that... You already realize you can't edit MathType equations on Ubuntu, so as you stated, you don't expect to. The best experience when going from Word 2007 to LibreOf...
Well, to make sure that you can use Libre Office without any problems you can easy test for it if it will work without any issues (and maybe start moving out from MS Office in to LibreOffice) using the portable version of LibreOffice. No need for install, if it doesn't work just delete it and you are good. You can ge...
63,521
Because I write many document with office word 2007 + mathtype. I'm not request for libreoffice can edit mathtype's equations, but I want to know libreoffice can open all the office word 2007 documents or not?
2011/09/29
[ "https://askubuntu.com/questions/63521", "https://askubuntu.com", "https://askubuntu.com/users/23864/" ]
libreoffice and openoffice are just clones separated due to policy reasons. But as far as word 07 is concerned, LO or OO may sometimes may not be so faithful in reproducing the exact same effect as in Word 07. Some formatting mismatch you can always expect.
Yes, as others have stated, you can open Word 2007 documents with LibreOffice on Ubuntu. No one addressed MathType equations though, so let me mention that... You already realize you can't edit MathType equations on Ubuntu, so as you stated, you don't expect to. The best experience when going from Word 2007 to LibreOf...
5,894,270
Maybe this is supposed to not work, but at least I'd like to understand why then. I am passing a simple val=somevalue in the `PUT` body but spring sends back a `400 Bad Request` as it does not seem to recognise the val parameter. Similar request works with `POST`. Could it be *SpringMVC* is not recognizing the `PUT` r...
2011/05/05
[ "https://Stackoverflow.com/questions/5894270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320938/" ]
I don't know of a work around at this point, but here is the bug report that is a "Won't Fix." I've been fighting the same issue <https://jira.springsource.org/browse/SPR-7414> Update: Here is my fix. I'm using RequestBody annotation. Then using MultiValueMap. <http://static.springsource.org/spring/docs/3.0.5.RELEA...
I don't have right solution for you, but in your case I try following: * create page with `form:form method="PUT"` * declare `HiddenHttpMethodFilter` in `web.xml` If this will works, then * change `type` from `PUT` to `POST` in ajax call * add needed params which client has with `form:form` tag (something like `_met...
5,894,270
Maybe this is supposed to not work, but at least I'd like to understand why then. I am passing a simple val=somevalue in the `PUT` body but spring sends back a `400 Bad Request` as it does not seem to recognise the val parameter. Similar request works with `POST`. Could it be *SpringMVC* is not recognizing the `PUT` r...
2011/05/05
[ "https://Stackoverflow.com/questions/5894270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320938/" ]
[Since](https://jira.springsource.org/browse/SPR-5628) Spring 3.1, this is resolved using [org.springframework.web.filter.HttpPutFormContentFilter](http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/web/filter/HttpPutFormContentFilter.html). ``` <filter> <filter-name>httpPutFormConten...
I don't have right solution for you, but in your case I try following: * create page with `form:form method="PUT"` * declare `HiddenHttpMethodFilter` in `web.xml` If this will works, then * change `type` from `PUT` to `POST` in ajax call * add needed params which client has with `form:form` tag (something like `_met...
5,894,270
Maybe this is supposed to not work, but at least I'd like to understand why then. I am passing a simple val=somevalue in the `PUT` body but spring sends back a `400 Bad Request` as it does not seem to recognise the val parameter. Similar request works with `POST`. Could it be *SpringMVC* is not recognizing the `PUT` r...
2011/05/05
[ "https://Stackoverflow.com/questions/5894270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320938/" ]
I don't know of a work around at this point, but here is the bug report that is a "Won't Fix." I've been fighting the same issue <https://jira.springsource.org/browse/SPR-7414> Update: Here is my fix. I'm using RequestBody annotation. Then using MultiValueMap. <http://static.springsource.org/spring/docs/3.0.5.RELEA...
This, as suggest above, seems to be a bug in `spring/servlet API`. In reality `PUT` requests are supposed to work on `Request Body (or payload)` and not on Request Parameters. In that sense, servlet API & spring's handling is correct. Having said that, a better and much easier workaround is to pass no data element fr...
5,894,270
Maybe this is supposed to not work, but at least I'd like to understand why then. I am passing a simple val=somevalue in the `PUT` body but spring sends back a `400 Bad Request` as it does not seem to recognise the val parameter. Similar request works with `POST`. Could it be *SpringMVC* is not recognizing the `PUT` r...
2011/05/05
[ "https://Stackoverflow.com/questions/5894270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320938/" ]
I don't know of a work around at this point, but here is the bug report that is a "Won't Fix." I've been fighting the same issue <https://jira.springsource.org/browse/SPR-7414> Update: Here is my fix. I'm using RequestBody annotation. Then using MultiValueMap. <http://static.springsource.org/spring/docs/3.0.5.RELEA...
[Since](https://jira.springsource.org/browse/SPR-5628) Spring 3.1, this is resolved using [org.springframework.web.filter.HttpPutFormContentFilter](http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/web/filter/HttpPutFormContentFilter.html). ``` <filter> <filter-name>httpPutFormConten...
5,894,270
Maybe this is supposed to not work, but at least I'd like to understand why then. I am passing a simple val=somevalue in the `PUT` body but spring sends back a `400 Bad Request` as it does not seem to recognise the val parameter. Similar request works with `POST`. Could it be *SpringMVC* is not recognizing the `PUT` r...
2011/05/05
[ "https://Stackoverflow.com/questions/5894270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320938/" ]
[Since](https://jira.springsource.org/browse/SPR-5628) Spring 3.1, this is resolved using [org.springframework.web.filter.HttpPutFormContentFilter](http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/web/filter/HttpPutFormContentFilter.html). ``` <filter> <filter-name>httpPutFormConten...
This, as suggest above, seems to be a bug in `spring/servlet API`. In reality `PUT` requests are supposed to work on `Request Body (or payload)` and not on Request Parameters. In that sense, servlet API & spring's handling is correct. Having said that, a better and much easier workaround is to pass no data element fr...
67,414,796
I created a parent class Repo which has methods for insert, delete, display and delete objects in a list. Repo is a generic class. I created a child classes for Repo (like DepartmentRepo class)and pass Department, Employee, etc.. classes. I want perform insert, delete, display and delete operations on any class objects...
2021/05/06
[ "https://Stackoverflow.com/questions/67414796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15850862/" ]
Have you considered using flask\_mail extension for flask. You could send an E-Mail as easy as that: ``` from flask_mail import Message from app import mail def send_email(subject, sender, recipients, html_body): msg = Message(subject, sender=sender, recipients=recipients) msg.html = html_body mail.send(m...
You have not revealed how this is failing; I would assume that the problem is that Gmail rejects the connection because you failed to do the `ehlo()` again after `startls()`. (Yes, it's a bit crazy that they require this; but they do.) Tangentially, you should probably update your `email` code to use the Python 3.6+ `...
18,239,617
I am trying to make a quiz app and I am new to IOS.I want to get 3 wrong answers from an array of 6 wrong answers for a specific question and there will be 1 correct answer for each question.I want to randomize the wrong options every time the question is shown.So every time the question is shown the app will choose 3 ...
2013/08/14
[ "https://Stackoverflow.com/questions/18239617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2498271/" ]
Pass the proper format string to `DATE_FORMAT` in your query: ``` SELECT *, DATE_FORMAT(start, '%d/%m/%Y %H:%i:%s') AS the_date FROM mystation ``` Then the formatted date will be available in a `the_date` column when you loop through your rows. The following formatting string ,suggested by Marty McVry b...
Beside the solution bellow, that *is* right: WHEN working with data - in your case passing a date using a REST-API or something - you usually don't want to apply formating. You should return the data AS RAW as possible, to allow the finally processing application to Format data as required. use the common Format '2013...
53,132,550
I have a list of lists. This is an example of how the list looks. ``` [[7]][[8]] Prtf_Return Quantile Date 2002-07-31 -0.08161658 8 2002-07-31 2003-07-31 0.05648458 8 2003-07-31 2004-07-30 0.24751328 8 2004-07-30 2005-07-29 0.26955881 8 2005-07-29 2006-07-31 0.08099...
2018/11/03
[ "https://Stackoverflow.com/questions/53132550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9055967/" ]
The trick is to `rbind` each of the `Quantile` dataframes in the sublists. Then call a plot function in a `lapply` loop. The plot function could be an anonymous function but I have written it separately for the sake of clarity. I also rotate the x axis labels. To do that function `rotate_x_text` from package `ggpubr...
I figured it out. Thanks to everybody that helped. The trick was to (like Rui mentioned) create a new column with the cumsums. ``` first_year_cumsum <- lapply(first_year, function(a) lapply(a, function(b) ddply(b, .(Quantile), transform, cumsum = cumsum(Prtf_Return)))) ``` With that, the function of Rui looks like:...
92,086
Which one is correct? > > 1. I met my future wife on this very American traditional occasion. > 2. I met my future wife during this very American traditional occasion. > > >
2012/11/23
[ "https://english.stackexchange.com/questions/92086", "https://english.stackexchange.com", "https://english.stackexchange.com/users/31284/" ]
***During*** is an unusual preposition in that it can only have an object that refers to a duration of [Time](http://www.umich.edu/~jlawler/3-Time.pdf) -- there are fewer than ten words in English that have exclusive time reference, and many of them come from the same root as *during*. It is also unusual in that it's a...
Both sentences are grammatical. There are two differences in usage, though slight. **Specificity** The first sentence is slightly ambiguous: > > I met my future wife **on** this very American traditional occasion > > > A traditional occasion is presumed, by definition, to be a recurring event. You may have m...
67,846,647
``` import numpy as np a = np.array([8.0,7.0,6.0],[5.0,4.0]) print(a) ``` I am trying to run this code but I get this error. (In Jupiter) --- ``` TypeError Traceback (most recent call last) <ipython-input-3-31ad187a1d2f> in <module> 1 import numpy as np ----> 2 a = np.array([8...
2021/06/05
[ "https://Stackoverflow.com/questions/67846647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15716044/" ]
It would help to know what you are trying to achieve with this code. Assuming you are trying to create a 2D array with numpy - you need to make sure your dimensions are correct (first row with 3 element and second row with 2 element cannot make a 2D array). And you need another [] around to make 2D array. Something l...
There are two mistakes here, i. another element has to be inserted into the second array / removed from the first array, ii. both of them have to be passed as first argument i.e. enclosed in braces. Rewriting the same: ``` import numpy as np a = np.array(([8.0,7.0,6.0],[5.0,4.0,3.0])) print(a) ```
67,846,647
``` import numpy as np a = np.array([8.0,7.0,6.0],[5.0,4.0]) print(a) ``` I am trying to run this code but I get this error. (In Jupiter) --- ``` TypeError Traceback (most recent call last) <ipython-input-3-31ad187a1d2f> in <module> 1 import numpy as np ----> 2 a = np.array([8...
2021/06/05
[ "https://Stackoverflow.com/questions/67846647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15716044/" ]
It would help to know what you are trying to achieve with this code. Assuming you are trying to create a 2D array with numpy - you need to make sure your dimensions are correct (first row with 3 element and second row with 2 element cannot make a 2D array). And you need another [] around to make 2D array. Something l...
``` 1 import numpy as np ``` ----> 2 a = np.array([8.0,7.0,6.0],[5.0,4.0]) 3 print(a) ANS : you need the "[ ]" around the Data like this below ``` 1 import numpy as np 2 a = np.array( [ [8.0,7.0,6.0],[5.0,4.0] ] ) 3 print(a) ```
67,846,647
``` import numpy as np a = np.array([8.0,7.0,6.0],[5.0,4.0]) print(a) ``` I am trying to run this code but I get this error. (In Jupiter) --- ``` TypeError Traceback (most recent call last) <ipython-input-3-31ad187a1d2f> in <module> 1 import numpy as np ----> 2 a = np.array([8...
2021/06/05
[ "https://Stackoverflow.com/questions/67846647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15716044/" ]
There are two mistakes here, i. another element has to be inserted into the second array / removed from the first array, ii. both of them have to be passed as first argument i.e. enclosed in braces. Rewriting the same: ``` import numpy as np a = np.array(([8.0,7.0,6.0],[5.0,4.0,3.0])) print(a) ```
``` 1 import numpy as np ``` ----> 2 a = np.array([8.0,7.0,6.0],[5.0,4.0]) 3 print(a) ANS : you need the "[ ]" around the Data like this below ``` 1 import numpy as np 2 a = np.array( [ [8.0,7.0,6.0],[5.0,4.0] ] ) 3 print(a) ```
6,444,987
Is there a better (built in?) way to mix observableArray and associative arrays? ``` viewModel = { a: ko.observableArray(), a_assoc: {}, add_item: function(i) { if (typeof this.a_assoc[i] == 'undefined') { this.a.push(i); this.a_assoc[i]=1; } } } viewModel.add_i...
2011/06/22
[ "https://Stackoverflow.com/questions/6444987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/657866/" ]
Typically, you would do something like this in Knockout: ``` var viewModel = { a: ko.observableArray(["a","b","c","d"]), add_item: function() { this.a.push("new" + this.a().length); } }; viewModel.a_assoc = ko.dependentObservable(function() { var result = {}; ko.utils.arrayForEach(this.a...
I think it is best to use an associative array under the hood for performance. You also (as you alluded to) need to use an observableArray to be able to track changes (because that's how knockout works). If you're seeking a 'knockout friendly' associative array you probably want a way to track changes to the item (an...
996,620
I am using Windows 10 and just setup Offline Files for 3 folders I'm currently working from (28 sub-folders, 550 files, 185MiB). I prefer working from local copies of the files for performance reasons although our network folders perform pretty well. I also want my work to sync with the network location the files come ...
2015/11/05
[ "https://superuser.com/questions/996620", "https://superuser.com", "https://superuser.com/users/396067/" ]
I too noticed that browsing the "Offline Files Folder" in Windows 10 can be extremely slow. After playing with the feature a bit, my conclusion is that you don't need it most of the time. First, to make clear what we're talking about, if you go to the Windows 10 Sync Center, click "Manage offline files", and then clic...
Offline Files saves data in C:\Windows\CSC directory which admins do not have access to without registry changes. This is a big issue for me as I want to work with the files and directories directly. I have chosen to try SyncToy or FreeFileSync as alternatives; [SyncToy download page](https://www.microsoft.com/en-us/...
70,289,996
So Im doing a project scraping different websites using multiple spiders. I want to make it so that the spiders run again when the user says "Yes" when asked to continue. ``` keyword = input("enter keyword: ") page_range = input("enter page range: ") flag = True while flag: process = CrawlProcess() process.cr...
2021/12/09
[ "https://Stackoverflow.com/questions/70289996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6363509/" ]
You can remove the `while` loop and use callbacks instead. Edit: Example added: ``` def callback_f(): # stuff # calling_f() def calling_f(): answer = input("Continue? (y/n)") if not answer == 'n': callback_f() callback_f() ```
``` from twisted.internet import reactor #only this is supposed to be here, we will be deleting the reactor after each run, using the main configure_logging() settings = get_project_settings() runner = CrawlerRunner(settings) d = runner.crawl('your spider class name') d.addBoth(lambda _: reactor.stop()) reactor.ru...
70,289,996
So Im doing a project scraping different websites using multiple spiders. I want to make it so that the spiders run again when the user says "Yes" when asked to continue. ``` keyword = input("enter keyword: ") page_range = input("enter page range: ") flag = True while flag: process = CrawlProcess() process.cr...
2021/12/09
[ "https://Stackoverflow.com/questions/70289996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6363509/" ]
**Method 1:** `scrapy` creates `Reactor` which can't be reused after `stop` but if you will run `Crawler` in separated process then new process will have to create new `Reactor`. ``` import multiprocessing def run_crawler(keyword, page_range): process = CrawlProcess() process.crawl(crawler1, keyword, page_rang...
``` from twisted.internet import reactor #only this is supposed to be here, we will be deleting the reactor after each run, using the main configure_logging() settings = get_project_settings() runner = CrawlerRunner(settings) d = runner.crawl('your spider class name') d.addBoth(lambda _: reactor.stop()) reactor.ru...
281,974
Given a conic $\Gamma$ that has the equation $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$, $\Gamma$ can be represented by the symmetric matrix $$\mathbf{C} = \begin{bmatrix} A & B/2 & D/2\\ B/2 & C & E/2\\ D/2 & E/2 & F \end{bmatrix}.$$ Suppose we have points $(x\_\text{c}, y\_\text{c})$, $(x\_-, y\_-)$, $(x\_+, y\_+)$ and $...
2013/01/19
[ "https://math.stackexchange.com/questions/281974", "https://math.stackexchange.com", "https://math.stackexchange.com/users/34473/" ]
generated by g means the set (which turns out to be a cyclic subgroup) {g, g+g, g+g+g, ...} until you get back to where you started. so {(6,10), (12, 20), (18, 30), (24, 40), ...} and written reduced that's {(6,10), (4, 5), (2, 0), (0, 10), ...}. A slightly easier way to do this is write out the group by 6 in Z\_8 th...
In example 2, the subgroup is generated by $1$ element. You start by writing $(6, 15)$ and its multiples (mod 8 and 15 of course) until you get $(0, 0)$. That seems efficient enough to me. In example 10, the group $\mathbb Z\_8 \times \mathbb Z\_{10}$ has $80$ elements. A group generated by 1 generator will have the s...
71,278,176
I have a navbar and two side menus which I use in multiple pages. But for a number of pages I don't want to have the side menu. I have tried using v-if with $router.name, but because I was using a grid system, the layout would break. Then also it was impossible to add more than one component to not render the side men...
2022/02/26
[ "https://Stackoverflow.com/questions/71278176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15024647/" ]
You need to mock `authenticationManager.authenticate` to throw BadCredentialsException to make it fails.
You have to mock the Authentication Manager and that can be done as below code snippet: ``` Mockito.doThrow(BadCredentialsException.class) .when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(loginDto.getEmail(), loginDto.getPassword()))); ``` This should work fine !!
71,278,176
I have a navbar and two side menus which I use in multiple pages. But for a number of pages I don't want to have the side menu. I have tried using v-if with $router.name, but because I was using a grid system, the layout would break. Then also it was impossible to add more than one component to not render the side men...
2022/02/26
[ "https://Stackoverflow.com/questions/71278176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15024647/" ]
You need to mock `authenticationManager.authenticate` to throw BadCredentialsException to make it fails.
It just turned out that I'm dumb and I forgot that I'm mocking the beans so there isn't actually a connection to the database. I just ended up moving the authentication code to UserService class inside an authenticate() method that returns a boolean, then I stubbed the method and tested the controller and everything is...
1,629,685
I have enabled the `-Wstack-protector` warning when compiling the project I'm working on (a commercial multi-platform C++ game engine, compiling on Mac OS X 10.6 with GCC 4.2). This flag warns about functions that will not be protected against stack smashing even though `-fstack-protector` is enabled. GCC emits some wa...
2009/10/27
[ "https://Stackoverflow.com/questions/1629685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123183/" ]
Stack-protection is a hardening strategy, not a debugging strategy. If your game is network-aware or otherwise has data coming from an uncontrolled source, turn it on. If it doesn't have data coming from somewhere uncontrolled, don't turn it on. Here's how it plays out: If you have a bug and make a buffer change based...
You indeed should not care about the warning for normal builds. It's really more of an informational message. I hope it's obvious that you do have an inherent security concern with variable-sized buffers on the stack; get the size calculation wrong and you're opening a big hole.
35,169,218
I am looking on how to get specific day from time given : let's say I have 2 dates : 1 Jan 2016 until 1 Jan 2017, I will need to know how many Mondays are there, or Tuesdays or any days that I select on the input I gave. Is there any best way to achieve this ?
2016/02/03
[ "https://Stackoverflow.com/questions/35169218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5677342/" ]
**UPDATED ANSWER** ``` <?php $count = 0; $days = array("Monday", "Friday"); foreach ($days as $day) { $startDate = '1 Jan 2016'; $endDate = '1 Jan 2017'; $endDate = strtotime($endDate); $i = ''; for ($i = strtotime($day, strtotime($startDate)); $i <= $endDate; $i = strtotime('+1 week', $i)) { ...
Try modify this example: ``` <?php //http://php.net/manual/en/class.dateperiod.php#109846 $begin = new DateTime( '2012-08-01' ); $end = new DateTime( '2012-08-31' ); $end = $end->modify( '+1 day' ); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($begin, $interval ,$end); foreach($daterange as $date...
35,169,218
I am looking on how to get specific day from time given : let's say I have 2 dates : 1 Jan 2016 until 1 Jan 2017, I will need to know how many Mondays are there, or Tuesdays or any days that I select on the input I gave. Is there any best way to achieve this ?
2016/02/03
[ "https://Stackoverflow.com/questions/35169218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5677342/" ]
**UPDATED ANSWER** ``` <?php $count = 0; $days = array("Monday", "Friday"); foreach ($days as $day) { $startDate = '1 Jan 2016'; $endDate = '1 Jan 2017'; $endDate = strtotime($endDate); $i = ''; for ($i = strtotime($day, strtotime($startDate)); $i <= $endDate; $i = strtotime('+1 week', $i)) { ...
get all days and loop through them all, get the first Monday after the start date and then iterate 7 days at a time: ``` $endDate = strtotime($endDate); for($i = strtotime('Monday', strtotime($startDate)); $i <= $endDate; $i =strtotime('+1 week', $i)) echo date('l Y-m-d', $i); ```
64,724,787
I am trying to make a customer and employee login and register page...however whenever I try to go to localhost:8000/customer register, I get a page not found error not found error. this is my urls.py file: ``` from django.contrib import admin from django.urls import path from accounts import views urlpatterns = [ ...
2020/11/07
[ "https://Stackoverflow.com/questions/64724787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14032045/" ]
1. Download and install Microsoft Visual Studio build tools from <https://visualstudio.microsoft.com/en/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16> 2. Reboot your computer 3. Upgrade pip with command `python -m pip install --upgrade pip` 4. Run your command `python -m pip install twint` to install the p...
Upgrade your pip with: `python -m pip install --upgrade pip` Upgrade your wheel with: `pip install --upgrade wheel` Upgrade your setuptools with: `pip install --upgrade setuptools` Close the terminal and try installing the package again.
20,036,182
What am I doing wrong? This is my code: ``` $.ajax({ type: "POST", url: "GetData.asmx/GetEventMembers", data: "{'ShulID': '" + ShulID + "','EventID': '" + EventID + "'}", contentType: "application/json; charset=utf-8", dataType: "jso...
2013/11/17
[ "https://Stackoverflow.com/questions/20036182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181421/" ]
This `(int *)arg` takes whatever type `arg` is and pretends it is a `int *` This `*((int *)arg)` takes the above pointer and deferences it, returning an `int`
You are casting `arg` to a pointer to int which is then dereferenced. Think of it this way: ``` void* arg; int* ptr = (int*) arg; int offset = *ptr; ```
20,036,182
What am I doing wrong? This is my code: ``` $.ajax({ type: "POST", url: "GetData.asmx/GetEventMembers", data: "{'ShulID': '" + ShulID + "','EventID': '" + EventID + "'}", contentType: "application/json; charset=utf-8", dataType: "jso...
2013/11/17
[ "https://Stackoverflow.com/questions/20036182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181421/" ]
Let's break this down: ``` (int *)arg; ``` This takes `arg` and casts it to an `int *`. The result of this expression is, of course, an `int *`. ``` *((int *)arg); ``` We're now just dereferencing that `int *` we just came up with — the result is the integer that the pointer was pointing to. ``` int offset = *((...
You are casting `arg` to a pointer to int which is then dereferenced. Think of it this way: ``` void* arg; int* ptr = (int*) arg; int offset = *ptr; ```
20,036,182
What am I doing wrong? This is my code: ``` $.ajax({ type: "POST", url: "GetData.asmx/GetEventMembers", data: "{'ShulID': '" + ShulID + "','EventID': '" + EventID + "'}", contentType: "application/json; charset=utf-8", dataType: "jso...
2013/11/17
[ "https://Stackoverflow.com/questions/20036182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181421/" ]
This `(int *)arg` takes whatever type `arg` is and pretends it is a `int *` This `*((int *)arg)` takes the above pointer and deferences it, returning an `int`
It's a cast followed by a dereference. Basically, you're telling the compiler, "Trust me. I know that `arg` points to an `int`, so read the `int` it's pointing to, and put it into `offset`.
20,036,182
What am I doing wrong? This is my code: ``` $.ajax({ type: "POST", url: "GetData.asmx/GetEventMembers", data: "{'ShulID': '" + ShulID + "','EventID': '" + EventID + "'}", contentType: "application/json; charset=utf-8", dataType: "jso...
2013/11/17
[ "https://Stackoverflow.com/questions/20036182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181421/" ]
Let's break this down: ``` (int *)arg; ``` This takes `arg` and casts it to an `int *`. The result of this expression is, of course, an `int *`. ``` *((int *)arg); ``` We're now just dereferencing that `int *` we just came up with — the result is the integer that the pointer was pointing to. ``` int offset = *((...
It's a cast followed by a dereference. Basically, you're telling the compiler, "Trust me. I know that `arg` points to an `int`, so read the `int` it's pointing to, and put it into `offset`.
20,036,182
What am I doing wrong? This is my code: ``` $.ajax({ type: "POST", url: "GetData.asmx/GetEventMembers", data: "{'ShulID': '" + ShulID + "','EventID': '" + EventID + "'}", contentType: "application/json; charset=utf-8", dataType: "jso...
2013/11/17
[ "https://Stackoverflow.com/questions/20036182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181421/" ]
Let's break this down: ``` (int *)arg; ``` This takes `arg` and casts it to an `int *`. The result of this expression is, of course, an `int *`. ``` *((int *)arg); ``` We're now just dereferencing that `int *` we just came up with — the result is the integer that the pointer was pointing to. ``` int offset = *((...
This `(int *)arg` takes whatever type `arg` is and pretends it is a `int *` This `*((int *)arg)` takes the above pointer and deferences it, returning an `int`
1,080,173
Let's say we have two normally distributed populations A and B, which have different means and standard deviations. We then pick one item from population A and one from population B. How could we analytically find out the probability that the item from population B is larger in value than the item from population A? I...
2014/12/24
[ "https://math.stackexchange.com/questions/1080173", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26944/" ]
Think of it as a three-dimensional anthole. If A and B are independent then this is the same as the Probability (A-B) > 0 coming from a distribution of (A-B) which has mean $\mu\_A - \mu\_B$ and $ var(A-B) = var(A)+var(B)$ Then you just have to work out the Z-score of 0 in that distribution. For instance, Let's say A ...
Lets say the joint pdf of A and B is $f(a,b)$. The analytical solution is: $\int\_{b\geq a} f(a,b) dadb$, this will just be the integral above the line $a=b$ on the domain of $f(a,b)$
1,077,576
How can I prove > > $$\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}...}}}}=2$$ > > > I don't know which method can be used for this?
2014/12/22
[ "https://math.stackexchange.com/questions/1077576", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187799/" ]
We can define $x=\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}...}}}}$ as follows: Let $x\_1 = \sqrt 2$ and $x\_{n+1} = (\sqrt 2)^{x\_{n}}$ We can show $x\_n \lt 2\ \forall n$ by induction, since if $y \lt 2$, then $(\sqrt 2)^y \lt 2$. And $x\_n$ is clearly monotonically increasing, so $x\_n \to x$. But $$x\_{n+1...
Define $x\_1=\sqrt{2}$ and $x\_{n+1}=\sqrt{2}^{x\_n}$. Prove by induction that $x\_n \leq x\_{n+1} \leq 2$. As the sequence is bounded and increasing, it is convergent, and the limit is between $x\_1=\sqrt{2}$ and $2$. Finish the proof by observing that $$\sqrt{2}^x=x$$ has an unique solution on the interval $[\sqr...
1,077,576
How can I prove > > $$\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}...}}}}=2$$ > > > I don't know which method can be used for this?
2014/12/22
[ "https://math.stackexchange.com/questions/1077576", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187799/" ]
We can define $x=\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}...}}}}$ as follows: Let $x\_1 = \sqrt 2$ and $x\_{n+1} = (\sqrt 2)^{x\_{n}}$ We can show $x\_n \lt 2\ \forall n$ by induction, since if $y \lt 2$, then $(\sqrt 2)^y \lt 2$. And $x\_n$ is clearly monotonically increasing, so $x\_n \to x$. But $$x\_{n+1...
**Step One.** Define the recursive sequence $$ a\_0=\sqrt{2}, \quad a\_{n+1}=\sqrt{2}^{a\_n},\,\,n\in\mathbb N. $$ **Step Two.** Show that $\{a\_n\}$ is increasing (inductively), and upper bounded by $2$ (also inductively). **Step Three.** Due to *Step Two* the sequence $\{a\_n\}$ is convergent. Let $a\_n\to x$. Clea...
1,077,576
How can I prove > > $$\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\sqrt{2}...}}}}=2$$ > > > I don't know which method can be used for this?
2014/12/22
[ "https://math.stackexchange.com/questions/1077576", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187799/" ]
**Step One.** Define the recursive sequence $$ a\_0=\sqrt{2}, \quad a\_{n+1}=\sqrt{2}^{a\_n},\,\,n\in\mathbb N. $$ **Step Two.** Show that $\{a\_n\}$ is increasing (inductively), and upper bounded by $2$ (also inductively). **Step Three.** Due to *Step Two* the sequence $\{a\_n\}$ is convergent. Let $a\_n\to x$. Clea...
Define $x\_1=\sqrt{2}$ and $x\_{n+1}=\sqrt{2}^{x\_n}$. Prove by induction that $x\_n \leq x\_{n+1} \leq 2$. As the sequence is bounded and increasing, it is convergent, and the limit is between $x\_1=\sqrt{2}$ and $2$. Finish the proof by observing that $$\sqrt{2}^x=x$$ has an unique solution on the interval $[\sqr...
45,341,326
This SP is called on by sp\_send\_dbmail, which is executed daily on a job. When this does not have any records to show on report, I do not want the section sent with '0 rows affected' I still want to report the sections that have records available. here is my sp it actually has 15 separate select statements, but for ...
2017/07/27
[ "https://Stackoverflow.com/questions/45341326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8088749/" ]
Your bitwise code is incorrect. Assume A = 0001 Assume B = 0010 A is first bit is set, B is 2nd bit is set x & ~A doesn't mean what you think. ~A doesn't mean first bit is off, it means 1110. So x & ~A would only be true if those 3 bits are set, not just if the first bit is off. If you want A is not set, that's ((x...
You need to think about what you're *trying* to do with the flags. Flags are usually not exclusive settings; they're used in combination. So let's examine your logic: For `TR1` ``` TR1 = ~(SB1) & ~(SB2), // BIT12 - 0 BIT13 - 0 ``` The result of which is: ``` 0011111111111 ``` Note that this has turned on eve...
74,530,022
The deviations of the mean should always sum up to 0. However, when the mean has a lot of digits, maybe infinitely like this one which is 20/7, R fails to calculate it. ``` x <- c(1,2,2,3,3,4,5) sum(x - mean(x)) [1] -4.440892e-16 ``` I am quite a newbie and have not found any information about this so far, maybe I ...
2022/11/22
[ "https://Stackoverflow.com/questions/74530022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19487551/" ]
In your entity, do not name properties with `id_*`. The client-Property in the Group(?) Entity should be named `$client`, not `$id_client`. Then, in your Form, name that field excactly like the property in the Group-Entity. Doctrine (as a DBAL should do) does that behind-the-scene relating of the object by the actual ...
simple solution is to use choice type, this way you dont need the relation and when you submit you will have the id of the client. If load the form for editing (loading the entity, it will show the selected value from the submit) ``` public function buildForm(FormBuilderInterface $builder, array $options): void { $b...
52,653
Ecclesiastes 7:26 > > I find more bitter than death the woman who is a snare, whose heart is a trap and whose hands are chains. The man who pleases God will escape her, but the sinner she will ensnare. > > > Solomon had many many wives and concubines. Some ensnared him. He knew this would go bad for him.
2020/10/28
[ "https://hermeneutics.stackexchange.com/questions/52653", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
Solomon was a very complex character who was (as with all humans) full of contradictions! * He was an astute observer of human nature (as Ecclesiastes reveals) * He was a victim of his own carnality as his biography reveals * He was a brilliant naturalist and amateur "scientist" * He was capable of being the human con...
A note about the authorship of Ecclesiastes. Scholars don't know who wrote Ecclesiastes so it would be tenuous to apply everything written to Solomon. Here is a quote from Michael V. Fox's commentary of Ecclesiastes (or Hebrew, *Qohelet* - which can mean 'teacher to the public'): > > "Koheleth was traditionally iden...
77,755
My bike has an 8-speed nexus hub and the plastic adjustment screw broke. Now I can't adjust the cable anymore and can't use some of the gears. My question is, can I use a normal thumb shifter on my nexus 8 speed since the nexus shifter (internal gear bike in general) is very uncommon where I live and I don't want to pa...
2021/07/12
[ "https://bicycles.stackexchange.com/questions/77755", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/57731/" ]
The ultimate marker of how durable a paint finish is is to see how easily it chips :) You can’t really predict how durable the paint will be. Since paint is a type of coating, it is subject to a vast variety of factors such as the cleanliness of the aluminum, surface roughness, primer choice, painting technique, etc. ...
I don't think you can tell to look at a paint job whether it will be durable. Perhaps a paint specialist can. There are a lot of different paint techniques and technologies. There are paints that are basically 2-stage epoxies, paints that are basically rubber, as well as powdercoat, enamel, etc. My most expensive bike...
77,755
My bike has an 8-speed nexus hub and the plastic adjustment screw broke. Now I can't adjust the cable anymore and can't use some of the gears. My question is, can I use a normal thumb shifter on my nexus 8 speed since the nexus shifter (internal gear bike in general) is very uncommon where I live and I don't want to pa...
2021/07/12
[ "https://bicycles.stackexchange.com/questions/77755", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/57731/" ]
Paint damage due to locks is a perennial problem. Another option aside from those above is to better cushion your lock. I assume it's the lock itself and attached few chain links that are loose and unprotected, so why not put them in a padded pouch? I would think neoprene wetsuit material would be a good choice and eas...
I don't think you can tell to look at a paint job whether it will be durable. Perhaps a paint specialist can. There are a lot of different paint techniques and technologies. There are paints that are basically 2-stage epoxies, paints that are basically rubber, as well as powdercoat, enamel, etc. My most expensive bike...
574,327
Clearly, if I'm spinning, I'll feel my arms lift away from my torso. But what sets the preferred angular momentum? Is there a preferred angular momentum in a vacuum? In Newtonian mechanics, I imagine one would appeal to the ether, so I suspect the answer lies in general relativity.
2020/08/19
[ "https://physics.stackexchange.com/questions/574327", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
If you're spinning you'll have intrinsic angular momentum, it doesn't need to have anything to do with extrinsic objects. If you're spinning You'll feel the force proportional to the distance from the axis of rotation pulling each part of your body away from the axis of rotation, and this force will be felt everywhere ...
Einstein thought about this and coined the term [Mach’s principle](https://en.m.wikipedia.org/wiki/Mach%27s_principle). The basic idea behind Mach’s principle is that very distant stars and galaxies (or maybe, in modern cosmology, the Cosmic Microwave Background Radiation) define a preferred reference frame against whi...
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
You can have an unlimited number of apps on your developer-unlocked phone from the Windows Store, but there is a limit of 10 developer apps that can be loaded onto a dev-unlocked phone at any time. Once you have reached that limit, you must remove at least one of them from your developer phone in order to load another ...
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
Check applications list and uninstall all other developer application.
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
I think this step worked for me. Try manually deleting all files in Bin and obj folders of your project (not just clean project in VS) Still having some issues with registering almost everyday the device as a developer. Do you experience this issue or only the error while deploying?
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
I just ran into this, and then realized I still had my Windows 7 phone registered with the same name. I deleted that registration at <https://dev.windowsphone.com/en-us/Account/Devices>, unregistered and re-registered the Phone 8, and it now works. YMMV
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
You can have an unlimited number of apps on your developer-unlocked phone from the Windows Store, but there is a limit of 10 developer apps that can be loaded onto a dev-unlocked phone at any time. Once you have reached that limit, you must remove at least one of them from your developer phone in order to load another ...
Check applications list and uninstall all other developer application.
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
You can have an unlimited number of apps on your developer-unlocked phone from the Windows Store, but there is a limit of 10 developer apps that can be loaded onto a dev-unlocked phone at any time. Once you have reached that limit, you must remove at least one of them from your developer phone in order to load another ...
Go to your applications list on your mobile and uninstall the developer applications, because you have limited developer apps on you phone.
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
You can have an unlimited number of apps on your developer-unlocked phone from the Windows Store, but there is a limit of 10 developer apps that can be loaded onto a dev-unlocked phone at any time. Once you have reached that limit, you must remove at least one of them from your developer phone in order to load another ...
I think this step worked for me. Try manually deleting all files in Bin and obj folders of your project (not just clean project in VS) Still having some issues with registering almost everyday the device as a developer. Do you experience this issue or only the error while deploying?
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
You can have an unlimited number of apps on your developer-unlocked phone from the Windows Store, but there is a limit of 10 developer apps that can be loaded onto a dev-unlocked phone at any time. Once you have reached that limit, you must remove at least one of them from your developer phone in order to load another ...
I just ran into this, and then realized I still had my Windows 7 phone registered with the same name. I deleted that registration at <https://dev.windowsphone.com/en-us/Account/Devices>, unregistered and re-registered the Phone 8, and it now works. YMMV
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
Go to your applications list on your mobile and uninstall the developer applications, because you have limited developer apps on you phone.
16,196,318
I started a Windows 8 phone application and am trying to use a NEW phone as the device for debugging. > > Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again. > > > I registered the device so I do not kn...
2013/04/24
[ "https://Stackoverflow.com/questions/16196318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834815/" ]
When you first use the Developer Registration Tool, it checks DevCenter for your permission level (there are different types of accounts that allow different amounts of unlocked devices and allowed installations). Then, the tool unlocks the device and sets those permissions. (make sure the device is connected to the i...
I have brand new Lumia 620 and have the same error. The reason was in different country I set in my phone. Country of your microsoft account and the phone must be the same, I think.
478,543
I'm trying to install a certificate into my windows 2008 but I'm not able to do it right. I have a .crt file and I click to install from contextual menu. It succeed to import but if I browse the certificate store (personal -> local computer) it is not there. I searched by thumbprint on all repositories and the cert i...
2013/02/13
[ "https://serverfault.com/questions/478543", "https://serverfault.com", "https://serverfault.com/users/55884/" ]
You're installing the certificate into your user account's certificate store. Use the "Import" functionality inside the Certificates MMC snap-in, targeted at the computer, to import the certificate into the computer's certificate store.
You have to import the certificate in the proper keystore. The wizard for the import has the option to chose the X509 certificates keystore. You have to chose the proper keystore for your application. What are you trying to import? * A host certificate for a CRQ you submited to be signed for your host * An exported ...
478,543
I'm trying to install a certificate into my windows 2008 but I'm not able to do it right. I have a .crt file and I click to install from contextual menu. It succeed to import but if I browse the certificate store (personal -> local computer) it is not there. I searched by thumbprint on all repositories and the cert i...
2013/02/13
[ "https://serverfault.com/questions/478543", "https://serverfault.com", "https://serverfault.com/users/55884/" ]
This is what you should do if you want to import a cert into the SYSTEM account certificate store: 1. fire up MMC by executing mmc.exe 2. choose *File* / *Add/Remove Snap-in* fom the menu 3. select the *"Certificates"* snap-in to add and use the "Local computer" as the destination 4. import the certificate using the w...
You have to import the certificate in the proper keystore. The wizard for the import has the option to chose the X509 certificates keystore. You have to chose the proper keystore for your application. What are you trying to import? * A host certificate for a CRQ you submited to be signed for your host * An exported ...
3,785,560
Consider the function I want to show that the function $F(x,y)=\frac{xy}{x^2+y^2}$ defined to be 0 at (0,0) Is continuous in each variable separately and then to show that the function is not continuous at 0 How do I show this topologically (inverse image of open sets)? If the denominator is not zero, then holding o...
2020/08/09
[ "https://math.stackexchange.com/questions/3785560", "https://math.stackexchange.com", "https://math.stackexchange.com/users/364333/" ]
I think your proof is essentially correct at this point. You should show that $f(a) = \sup f(r)$ where the sup is taken over rational numbers $r$ such that $r\leq a$. This follows from the monotonicity of $f\_n$ and taking limits. The reason we need $f(x) = \sup f(r)$ here is mostly in step (iv). We need $f(x)$ to have...
To prove part(b): To simplify notation, suppose that there exists a continuous function $f:\mathbb{R}\rightarrow[0,1]$ such that $f\_{n}\rightarrow f$ pointwisely. We go to show that $f\_{n}\rightarrow f$ uniformly on each compact subset of $\mathbb{R}$. Firstly, observe that $f$ is monotonic increasing. Let $M>0$ be...
3,785,560
Consider the function I want to show that the function $F(x,y)=\frac{xy}{x^2+y^2}$ defined to be 0 at (0,0) Is continuous in each variable separately and then to show that the function is not continuous at 0 How do I show this topologically (inverse image of open sets)? If the denominator is not zero, then holding o...
2020/08/09
[ "https://math.stackexchange.com/questions/3785560", "https://math.stackexchange.com", "https://math.stackexchange.com/users/364333/" ]
To prove part (a): (A) Firstly, we show that there exists a subsequence $(f\_{n\_{k}})\_{k}$ such that $\lim\_{k\rightarrow\infty}f\_{n\_{k}}(r)$ for each $r\in\mathbb{Q}$. The proof involves an important trick known as Cantor Diagonal Argument. Fix an enumeration $\mathbb{Q}=\{r\_{n}\mid n\in\mathbb{N}\}$. Since $(f\...
To prove part(b): To simplify notation, suppose that there exists a continuous function $f:\mathbb{R}\rightarrow[0,1]$ such that $f\_{n}\rightarrow f$ pointwisely. We go to show that $f\_{n}\rightarrow f$ uniformly on each compact subset of $\mathbb{R}$. Firstly, observe that $f$ is monotonic increasing. Let $M>0$ be...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
I guess something like this should work: ``` jQuery('#add_slider_image').click(function() { var count = jQuery("input[name='sliderbut']").length; if (count < 5){ jQuery('.form-table').append("<tr><td><input type='text' value='' name='slider[]' /><input type='button' name='sliderbut' value='Upload' /...
``` var i = 0 var plus = ++i; ``` This part means that `plus` will always be zero and `i == 1`, so your `rel` attribute always reads `0`. ``` var count = jQuery.('#button').attr('rel'); ``` You are using an ID selector. And ID can exist only once per page. As you use an ID selector, you get only the *first* matche...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
I guess something like this should work: ``` jQuery('#add_slider_image').click(function() { var count = jQuery("input[name='sliderbut']").length; if (count < 5){ jQuery('.form-table').append("<tr><td><input type='text' value='' name='slider[]' /><input type='button' name='sliderbut' value='Upload' /...
When you try to compare the "count" with the number 5 you have to use == instead. `count = 5` will set count to 5 and always return true if you use `count == 5` it will compare your variable with the number 5 and return true or false, depending on the value of the variable. Also I think you can easily count the numbe...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
I guess something like this should work: ``` jQuery('#add_slider_image').click(function() { var count = jQuery("input[name='sliderbut']").length; if (count < 5){ jQuery('.form-table').append("<tr><td><input type='text' value='' name='slider[]' /><input type='button' name='sliderbut' value='Upload' /...
Try this. ``` jQuery('#add_slider_image').click(function() { var myHTML = ""; var current_count = jQuery('.form-table tr').length(); if (current_count >= 5) return; for (var i = current_count; i <= 5; i++) { myHTML += "<tr><td><input type'text' value='' name='slider[]' /><input type='button' na...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
I guess something like this should work: ``` jQuery('#add_slider_image').click(function() { var count = jQuery("input[name='sliderbut']").length; if (count < 5){ jQuery('.form-table').append("<tr><td><input type='text' value='' name='slider[]' /><input type='button' name='sliderbut' value='Upload' /...
You have to put the counter variable outside the event handler, otherwise you will be starting over from zero each time. You should put the code that adds the elements inside the if statement, so that you either show a messare or add the elements. There is no point in reading the value from the button that you just a...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
When you try to compare the "count" with the number 5 you have to use == instead. `count = 5` will set count to 5 and always return true if you use `count == 5` it will compare your variable with the number 5 and return true or false, depending on the value of the variable. Also I think you can easily count the numbe...
``` var i = 0 var plus = ++i; ``` This part means that `plus` will always be zero and `i == 1`, so your `rel` attribute always reads `0`. ``` var count = jQuery.('#button').attr('rel'); ``` You are using an ID selector. And ID can exist only once per page. As you use an ID selector, you get only the *first* matche...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
``` var i = 0 var plus = ++i; ``` This part means that `plus` will always be zero and `i == 1`, so your `rel` attribute always reads `0`. ``` var count = jQuery.('#button').attr('rel'); ``` You are using an ID selector. And ID can exist only once per page. As you use an ID selector, you get only the *first* matche...
Try this. ``` jQuery('#add_slider_image').click(function() { var myHTML = ""; var current_count = jQuery('.form-table tr').length(); if (current_count >= 5) return; for (var i = current_count; i <= 5; i++) { myHTML += "<tr><td><input type'text' value='' name='slider[]' /><input type='button' na...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
You have to put the counter variable outside the event handler, otherwise you will be starting over from zero each time. You should put the code that adds the elements inside the if statement, so that you either show a messare or add the elements. There is no point in reading the value from the button that you just a...
``` var i = 0 var plus = ++i; ``` This part means that `plus` will always be zero and `i == 1`, so your `rel` attribute always reads `0`. ``` var count = jQuery.('#button').attr('rel'); ``` You are using an ID selector. And ID can exist only once per page. As you use an ID selector, you get only the *first* matche...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
When you try to compare the "count" with the number 5 you have to use == instead. `count = 5` will set count to 5 and always return true if you use `count == 5` it will compare your variable with the number 5 and return true or false, depending on the value of the variable. Also I think you can easily count the numbe...
Try this. ``` jQuery('#add_slider_image').click(function() { var myHTML = ""; var current_count = jQuery('.form-table tr').length(); if (current_count >= 5) return; for (var i = current_count; i <= 5; i++) { myHTML += "<tr><td><input type'text' value='' name='slider[]' /><input type='button' na...
7,253,612
I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5. I also need to increment the number to use as an ID. my code: ``` jQuery('#add_slider_image').click(function() { var i = 0 var plus = ++i; jQuery('.form-table').append("<tr><td><input type...
2011/08/31
[ "https://Stackoverflow.com/questions/7253612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1087234/" ]
You have to put the counter variable outside the event handler, otherwise you will be starting over from zero each time. You should put the code that adds the elements inside the if statement, so that you either show a messare or add the elements. There is no point in reading the value from the button that you just a...
Try this. ``` jQuery('#add_slider_image').click(function() { var myHTML = ""; var current_count = jQuery('.form-table tr').length(); if (current_count >= 5) return; for (var i = current_count; i <= 5; i++) { myHTML += "<tr><td><input type'text' value='' name='slider[]' /><input type='button' na...
67,064,995
I am using Gnuplot to show the precipitation measured during the last 13 monthts. Data is read from two data files, rain.dat and snow.dat. I use impulses, but on days with both rain and snow the impulses are plotted over each other. It had been better if the impulses were stacked. ``` #!/usr/bin/gnuplot -persist set x...
2021/04/12
[ "https://Stackoverflow.com/questions/67064995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12344958/" ]
As @Ethan already mentioned, `with impulses` will always start at `0`. If you don't mind some little extra effort, you can mimic "stacking" impulses if you first plot the sum of rain and snow with the "snow color", and then plot rain alone with the "rain color" on top of it. But how do you get the sum of rain and snow...
Impulses cannot be stacked. By definition they extend from y=0 to some non-zero y value. If the two data sets were sampled at the same set of x coordinates then you could use the stacked histogram plot mode, but that isn't the case here. How about back-to-back impulses rather than stacked impulses? ``` $RAIN << EOD ...
67,064,995
I am using Gnuplot to show the precipitation measured during the last 13 monthts. Data is read from two data files, rain.dat and snow.dat. I use impulses, but on days with both rain and snow the impulses are plotted over each other. It had been better if the impulses were stacked. ``` #!/usr/bin/gnuplot -persist set x...
2021/04/12
[ "https://Stackoverflow.com/questions/67064995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12344958/" ]
Impulses cannot be stacked. By definition they extend from y=0 to some non-zero y value. If the two data sets were sampled at the same set of x coordinates then you could use the stacked histogram plot mode, but that isn't the case here. How about back-to-back impulses rather than stacked impulses? ``` $RAIN << EOD ...
I have tried to make a simplification to @theozh's answer, but some of the pulses are slightly displaced in time. @theozh has a much better solution of my problem. ``` reset session $Rain <<EOD 16.02.2021 8 22.02.2021 6 04.03.2021 10 08.03.2021 13 14.03.2021 5 EOD $Snow <<EOD 19.02.2021 19 22.02.2021 10 04.03.2021 1...
67,064,995
I am using Gnuplot to show the precipitation measured during the last 13 monthts. Data is read from two data files, rain.dat and snow.dat. I use impulses, but on days with both rain and snow the impulses are plotted over each other. It had been better if the impulses were stacked. ``` #!/usr/bin/gnuplot -persist set x...
2021/04/12
[ "https://Stackoverflow.com/questions/67064995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12344958/" ]
As @Ethan already mentioned, `with impulses` will always start at `0`. If you don't mind some little extra effort, you can mimic "stacking" impulses if you first plot the sum of rain and snow with the "snow color", and then plot rain alone with the "rain color" on top of it. But how do you get the sum of rain and snow...
I have tried to make a simplification to @theozh's answer, but some of the pulses are slightly displaced in time. @theozh has a much better solution of my problem. ``` reset session $Rain <<EOD 16.02.2021 8 22.02.2021 6 04.03.2021 10 08.03.2021 13 14.03.2021 5 EOD $Snow <<EOD 19.02.2021 19 22.02.2021 10 04.03.2021 1...
21,024,186
I've been trying to make a selling program where the customer will be asked the quantity of items he will buy. For example, if he inputs `"5"`, the next window will ask him 5 questions. My problem is, I'm required to use array, so is there any way that I can change ``` string[] arrmerch = new string[6]; ``` the num...
2014/01/09
[ "https://Stackoverflow.com/questions/21024186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3173353/" ]
Of course, just do this: ``` int userInput = Convert.ToInt32(Console.ReadLine()); string[] arrmerch = new string[userInput]; ``` You will need to add input checking to ensure that what you have is an integer and not something else. Here's an example with input checking: ``` int arraySize = 0; if(Int32.TryParse(Con...
Change string[] arrmerch = new string[6]; to ``` string[] arrmerch = new string[Convert.ToInt32(Console.ReadLine())]; ``` which will take the users input and create and array of that size.
21,024,186
I've been trying to make a selling program where the customer will be asked the quantity of items he will buy. For example, if he inputs `"5"`, the next window will ask him 5 questions. My problem is, I'm required to use array, so is there any way that I can change ``` string[] arrmerch = new string[6]; ``` the num...
2014/01/09
[ "https://Stackoverflow.com/questions/21024186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3173353/" ]
Of course, just do this: ``` int userInput = Convert.ToInt32(Console.ReadLine()); string[] arrmerch = new string[userInput]; ``` You will need to add input checking to ensure that what you have is an integer and not something else. Here's an example with input checking: ``` int arraySize = 0; if(Int32.TryParse(Con...
How about: ``` int numberOfQuestions = Convert.ToInt32(Console.Readline()); string[] arrmerch = new string[numberOfQuestions]; for (int i = 0; i <= arrmerch.Length; i++) { Console.Write("Item choice: "); arrmerch[i] = Console.ReadLine(); ``` Will n...
21,024,186
I've been trying to make a selling program where the customer will be asked the quantity of items he will buy. For example, if he inputs `"5"`, the next window will ask him 5 questions. My problem is, I'm required to use array, so is there any way that I can change ``` string[] arrmerch = new string[6]; ``` the num...
2014/01/09
[ "https://Stackoverflow.com/questions/21024186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3173353/" ]
Of course, just do this: ``` int userInput = Convert.ToInt32(Console.ReadLine()); string[] arrmerch = new string[userInput]; ``` You will need to add input checking to ensure that what you have is an integer and not something else. Here's an example with input checking: ``` int arraySize = 0; if(Int32.TryParse(Con...
Also you can use `Generic Lists`.They are more flexible, if you want to change your array lenght in the future ``` int count = Convert.ToInt32(Console.ReadLine()); var list = new List<string>(); for (int i = 0; i <= count; i++) { Console.Write("Item choice: "); list.Add(Console.ReadLine()); } ```
59,797,191
I have two classes that have some identical methods, the method below should access the methods of one of the two classes based on which checkbox is ticked, However I am having issues passing the objects created within the IF statements into the main body of the method. Is there way to achieve this without copying the ...
2020/01/18
[ "https://Stackoverflow.com/questions/59797191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12287824/" ]
You have multiple beans of the same type and want to prevent `Bean2` from injecting. In some project inject `Bean1` and in others `Bean1Child`. There are multiple options. Override bean definition with `@Bean` ------------------------------------- Make `Bean1Child` bean definition the same as `Bean1` has using `@Bea...
You cannot have two beans specified with the same qualified name, as the error indicates: ``` Annotation-specified bean name 'bean1' for bean class [Bean1Child] conflicts with existing, non-compatible bean definition of same name and class [Bean1] ``` Giving a different qualifier name to Bean1Child should work. ``...
59,797,191
I have two classes that have some identical methods, the method below should access the methods of one of the two classes based on which checkbox is ticked, However I am having issues passing the objects created within the IF statements into the main body of the method. Is there way to achieve this without copying the ...
2020/01/18
[ "https://Stackoverflow.com/questions/59797191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12287824/" ]
If this is possible, you can change the way the beans are created by removing the `@Component` annotations: In the first project, the `BeanChild3` would be refactored to get the `bean` in the constructor ```java public class Bean3 { private final Bean bean; public Bean3(final Bean bean) { this.bean =...
You cannot have two beans specified with the same qualified name, as the error indicates: ``` Annotation-specified bean name 'bean1' for bean class [Bean1Child] conflicts with existing, non-compatible bean definition of same name and class [Bean1] ``` Giving a different qualifier name to Bean1Child should work. ``...
59,797,191
I have two classes that have some identical methods, the method below should access the methods of one of the two classes based on which checkbox is ticked, However I am having issues passing the objects created within the IF statements into the main body of the method. Is there way to achieve this without copying the ...
2020/01/18
[ "https://Stackoverflow.com/questions/59797191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12287824/" ]
You can easily achieve this using `@ConditionalOnMissingBean` feature. Modify your `Bean1` class as below ``` @Component("bean1") @ConditionalOnMissingBean(type = "bean1") public class Bean1 implements Bean { } ``` modify `Bean1Child` class as below ``` @Component @Qualifier("bean1") @Primary public class Bean1Chi...
You cannot have two beans specified with the same qualified name, as the error indicates: ``` Annotation-specified bean name 'bean1' for bean class [Bean1Child] conflicts with existing, non-compatible bean definition of same name and class [Bean1] ``` Giving a different qualifier name to Bean1Child should work. ``...
59,797,191
I have two classes that have some identical methods, the method below should access the methods of one of the two classes based on which checkbox is ticked, However I am having issues passing the objects created within the IF statements into the main body of the method. Is there way to achieve this without copying the ...
2020/01/18
[ "https://Stackoverflow.com/questions/59797191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12287824/" ]
If this is possible, you can change the way the beans are created by removing the `@Component` annotations: In the first project, the `BeanChild3` would be refactored to get the `bean` in the constructor ```java public class Bean3 { private final Bean bean; public Bean3(final Bean bean) { this.bean =...
You have multiple beans of the same type and want to prevent `Bean2` from injecting. In some project inject `Bean1` and in others `Bean1Child`. There are multiple options. Override bean definition with `@Bean` ------------------------------------- Make `Bean1Child` bean definition the same as `Bean1` has using `@Bea...
59,797,191
I have two classes that have some identical methods, the method below should access the methods of one of the two classes based on which checkbox is ticked, However I am having issues passing the objects created within the IF statements into the main body of the method. Is there way to achieve this without copying the ...
2020/01/18
[ "https://Stackoverflow.com/questions/59797191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12287824/" ]
You can easily achieve this using `@ConditionalOnMissingBean` feature. Modify your `Bean1` class as below ``` @Component("bean1") @ConditionalOnMissingBean(type = "bean1") public class Bean1 implements Bean { } ``` modify `Bean1Child` class as below ``` @Component @Qualifier("bean1") @Primary public class Bean1Chi...
You have multiple beans of the same type and want to prevent `Bean2` from injecting. In some project inject `Bean1` and in others `Bean1Child`. There are multiple options. Override bean definition with `@Bean` ------------------------------------- Make `Bean1Child` bean definition the same as `Bean1` has using `@Bea...
3,957,054
[![enter image description here](https://i.stack.imgur.com/u1bVt.jpg)](https://i.stack.imgur.com/u1bVt.jpg) In the below picture, angle A is obtuse, AD is a median. We are also given the relation $AB^2 = AF\*AC$. We want to prove that area of triangle $(ABC) = AB\*AD$. What I have tried: Area of triangle is $A = \fr...
2020/12/21
[ "https://math.stackexchange.com/questions/3957054", "https://math.stackexchange.com", "https://math.stackexchange.com/users/469488/" ]
As you have noted, the area $\cal A$ can be written as $AC\times BF/2$. Proving ${\cal A}=AB\times AD$ is equivalent to proving $$AB^2\times 4AD^2=AC^2\times BF^2\tag1$$ on squaring both sides. The median $AD$ has the property that $4AD^2=2AC^2+2AB^2-BC^2$ as shown [here](https://math.stackexchange.com/a/1850097/47188...
$BE$ parallel to $DA$, $E$ on the line $CA$ Let $AB=c$, $AC=b$, $BC=2a$ , $AD=d$ we have $BE=2d$ Given $AF = \frac{c^2}{b}$ We get $EF=b-\frac{c^2}{b}$, $CF=b+\frac{c^2}{b}$ using Pythagoras, express $BF^2$ in two different ways $4d^2-\left(b-\frac{c^2}{b}\right)^2=4a^2-\left(b+\frac{c^2}{b}\right)^2$ it follows...
60,620,257
Examples: **example.com/asd -> example.com/portal.php?id=asd** **example.com -> example.com/portal.php** **example.com/asd?document=new -> example.com/portal.php?id=asd&document=new** So far works only: *example.com -> example.com/portal.php* **This is what I have so far:** ``` server { listen 80; listen ...
2020/03/10
[ "https://Stackoverflow.com/questions/60620257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2047170/" ]
Unless you are able to modify such global variable, there is now way of restricting the scope of a global variable in C++.
The answer to this problem is: split the specialization into two parts: - part one: the definition of the specialization in the header file. - part two: the implementation of the specialization in the cpp file Part one(`InterruptVectorTable.hpp`): ```cpp template <> class InterruptVectorTable<DeviceAtmega328p,...
30,002,079
Problem :- In case i have more than 1 line in my edittext, the previous line goes out of the visible area. I was expecting it to grow downwards so that all lines are visible. Xml for my compound control which has this edittext:- ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns...
2015/05/02
[ "https://Stackoverflow.com/questions/30002079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1743554/" ]
For your particular calculation -- assuming the values are all positive -- just square the difference between the minimum and maximum values: ``` select power(max(prod_year) - min(prod_year), 2) from mediaitems mi; ``` This can easily be modified to handle negative values, but that seems unlikely in a column named `...
A `cross join` should do the trick - it pairs every item with every other item, giving the "nested loops" effect you wanted here. ``` SELECT MAX(POWER(a.prod_year - b.prod_year), 2) FROM MediaItems a CROSS JOIN MediaItems b ```
30,002,079
Problem :- In case i have more than 1 line in my edittext, the previous line goes out of the visible area. I was expecting it to grow downwards so that all lines are visible. Xml for my compound control which has this edittext:- ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns...
2015/05/02
[ "https://Stackoverflow.com/questions/30002079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1743554/" ]
For your particular calculation -- assuming the values are all positive -- just square the difference between the minimum and maximum values: ``` select power(max(prod_year) - min(prod_year), 2) from mediaitems mi; ``` This can easily be modified to handle negative values, but that seems unlikely in a column named `...
When comparing values with a single dimension the maximum distance comes just from the maximum and minimum elements. Any other pair will give you a lower distance so the best way to evaluate distance in your table is: ``` SELECT abs(MAX(prod_year) - MIN(prod_year)) FROM MediaItems ``` If you have only positive value...
15,575,663
Trying to rewrite former urls to the latter. Rewrite that doesn't work for some reason. How to fix? Thanks. www.example.com/example-example.html www.example.com/example-example/ ``` Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([a-z]+-?[a...
2013/03/22
[ "https://Stackoverflow.com/questions/15575663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2103958/" ]
x86\_64 does not use the stack for the first 6 args. You need to load them in the proper registers. Those are: ``` rdi, rsi, rdx, rcx, r8, r9 ``` The trick I use to remember the first two is to imagine the function is `memcpy` implemented as `rep movsb`,
You're calling a varargs function -- printf expects a variable number of arguments and you have to account for that in the argument stack. See here: <http://www.csee.umbc.edu/portal/help/nasm/sample.shtml#printf1>
11,013,899
in my PHP script I have a variable like the following: ``` $names = '<a href="%URL$%" rel="tag">Name Surname</a>, <a href="%URL$%" rel="tag">Name Surname</a>, <a href="%URL$%" rel="tag">Name Surname</a>'; ``` Is it possible to filter $names in order to have this result? ``` $names = '<a href="%URL$%" rel="tag">N. S...
2012/06/13
[ "https://Stackoverflow.com/questions/11013899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/225992/" ]
You could use `preg_replace_callback`: ``` $names = preg_replace_callback( '/(<a[^>]*>)(\w+)( \w+</a>)', function($matches) { return $matches[1] . substr($matches[2], 0, 1) . "." . $matches[3]; }, $names ); ```
Really short answer: Use a HTML parser (like <http://simplehtmldom.sourceforge.net/>) Regexes and HTML only work when you are sure you are only pulling apart a really predictable string of code.
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
store last char of your string at temp string and then check your temp string with regular exp `Regex lettersOnly = new Regex("^[a-zA-Z]$");` where * ^ means "begin matching at start of string" * [a-zA-Z] means "match lower case and upper case letters a-z" * $ means "only match if cursor is at end of string" ...
You can use this function and send your string as parameter to this ``` private bool IsAlphabet(string input) { bool alphabet = false; char ch = input[input.Length - 1]; if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) alphabet = true; return alphabet; ...
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
Here is a Regex solution: ``` Regex.IsMatch(name, "[a-zA-Z]$"); ```
You can use this function and send your string as parameter to this ``` private bool IsAlphabet(string input) { bool alphabet = false; char ch = input[input.Length - 1]; if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) alphabet = true; return alphabet; ...
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
There is a function in the Char class that does this already. ``` string name = "ajsbbc"; if (Char.IsLetter(name[name.Length - 1])) Console.WriteLine("True"); else Console.WriteLine("False"); ```
You can use this function and send your string as parameter to this ``` private bool IsAlphabet(string input) { bool alphabet = false; char ch = input[input.Length - 1]; if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) alphabet = true; return alphabet; ...
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
Here is a Regex solution: ``` Regex.IsMatch(name, "[a-zA-Z]$"); ```
store last char of your string at temp string and then check your temp string with regular exp `Regex lettersOnly = new Regex("^[a-zA-Z]$");` where * ^ means "begin matching at start of string" * [a-zA-Z] means "match lower case and upper case letters a-z" * $ means "only match if cursor is at end of string" ...
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
There is a function in the Char class that does this already. ``` string name = "ajsbbc"; if (Char.IsLetter(name[name.Length - 1])) Console.WriteLine("True"); else Console.WriteLine("False"); ```
store last char of your string at temp string and then check your temp string with regular exp `Regex lettersOnly = new Regex("^[a-zA-Z]$");` where * ^ means "begin matching at start of string" * [a-zA-Z] means "match lower case and upper case letters a-z" * $ means "only match if cursor is at end of string" ...
8,515,208
I would like to create obfuscated package of my j2me application for improving the size and performance.So, I have downloaded `proguard` from sourgeforge.net. I have put the `proguard.jar` into my `C:\WTK2.5.2_01\bin` folder. When I try to create obfuscated package from `project->package->Create Obfuscation package` i...
2011/12/15
[ "https://Stackoverflow.com/questions/8515208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452680/" ]
There is a function in the Char class that does this already. ``` string name = "ajsbbc"; if (Char.IsLetter(name[name.Length - 1])) Console.WriteLine("True"); else Console.WriteLine("False"); ```
Here is a Regex solution: ``` Regex.IsMatch(name, "[a-zA-Z]$"); ```
56,462
I was just wondering if it's possible for me to enter the United States with a US visa that is issued outside of India(My home country).I studied and worked in Canada for over 5 years and I applied for a US visitor visa in 2014 and I was approved and visited the US a few times for commercial deliveries and shopping. No...
2015/09/22
[ "https://travel.stackexchange.com/questions/56462", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/35509/" ]
If you have a multiple entry B1 (visitor) visa, and I believe they grant those for 10 years now, I don't see why they would refuse you entry (assuming there are no other red flags). A visa is a visa, if it's valid and your passport is valid, it should be no problem. You say you visited the US before, why is this a p...
Both my passport and my US visa were issued in a country in which I am not a resident, and which is not related to my nationality. It has made no difference to my entries to the US. A visa is a visa.
11,327,119
I try to integrate dotcmis and alfresco into my application. When creating my unit tests, I face this issue : - I set up my test environment by deleting "myfolder" if any - I create back myfolder and put a document into it then I try to find the document : - The first time (when myfolder does not exist before), Search...
2012/07/04
[ "https://Stackoverflow.com/questions/11327119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/896673/" ]
Are you using Alfresco 4.0 with Solr for indexing? The Solr index is eventually consistent, this means that it can take a while (up to 15 seconds in the default configuration) for updates to show up in search results. If you need updates to show up immediately you could switch to Lucene as the indexing subsystem.
I don't think the "eventually consistent" aspect of solr is an issue in production. It may be when testing, but I prefer having a better system in production and having some problems in debug than the other way round. To solve my issue in debug I first put a Thread.Sleep(20)... and it worked, but.. it's quite long whi...
68,915,689
i badly need help idk what this is- ``` matrix (c (1, 2, 1, 2, 2, 2), nrow= 2, ncol = 2, byrow = TRUE)) ``` idk if this is right
2021/08/25
[ "https://Stackoverflow.com/questions/68915689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16745835/" ]
It's probably easier to see what's happening if you replace the numbers with letters, e.g. ``` matrix(c("A", "B", "C", "D", "E", "F"), nrow= 2, ncol = 2, byrow = TRUE) #> [,1] [,2] #> [1,] "A" "B" #> [2,] "C" "D" ``` Basically, you are filling up a 2X2 matrix 'by row' and the last two elements in your vector...
Its a matrix that looks like this: ``` |1 2| |1 2| ``` In this example R fills numbers by row from the concatenated list of numbers until it runs out of space. In this case each row has 2 element with only 2 rows total meaning that R will drop the last 2 numbers. --- **Update:** Answer to your comment ``` mat...