qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
24,688,897
Apologies for the confusing question title, I wasn't sure how to describe the problem. Background and objectives: I have a large dataset in Excel, near 1 Million rows. I have a key field (not primary cause there's duplicates). The key field will become the primary key field in a new table. For every row with the same ...
2014/07/11
[ "https://Stackoverflow.com/questions/24688897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3448738/" ]
i had the same issue, try this : open a new file and check the color mode at the beginning. then open up your file again!
The export for web uses sRGB. You use US Web Coated. Change your document to RGB mode and sRGB profile. The sRGB color is the smallest RGB color space. You typically always work in the smallest space, even if your screen allows a wider RGB.
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Second to testing if the variable is set using `isset()` before you try to access its value. You can even be more direct in your syntax and write the string concatenation in: ``` $var = isset( $_POST[ 'fname_' . $guest_identifier]) ? $_POST[ 'fname_' . $guest_identifier] : 'default_value' ``` Your post m...
Replace all calls to `$_POST[...` with `@$_POST[...` to repress the errors. Or check the value before using it like `isset($_POST[...]) ? $_POST[...]` ... Or suppress PHP warnings by calling [error\_reporting(E\_ALL ^ E\_NOTICE)](http://php.net/manual/en/function.error-reporting.php)
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Just use the operator like: `$_POST["fname_".$guest_identifier]`
Replace all calls to `$_POST[...` with `@$_POST[...` to repress the errors. Or check the value before using it like `isset($_POST[...]) ? $_POST[...]` ... Or suppress PHP warnings by calling [error\_reporting(E\_ALL ^ E\_NOTICE)](http://php.net/manual/en/function.error-reporting.php)
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
I'm thinking that your approach is a bit overly complicated, but your issue is not in the array index concatenation: there are no syntax errors in your code as you've presented it. For example, this works like a charm: ``` $a = array("foo"=>1); $o = "o"; print $a["fo$o"]; // prints 1 ``` Your issue is that the `$...
Replace all calls to `$_POST[...` with `@$_POST[...` to repress the errors. Or check the value before using it like `isset($_POST[...]) ? $_POST[...]` ... Or suppress PHP warnings by calling [error\_reporting(E\_ALL ^ E\_NOTICE)](http://php.net/manual/en/function.error-reporting.php)
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
GOT IT! (Facepalm) Simple spelling error in my argument so it was not being passed. I had identfier. Missing the i. I should pay more attention to the browser spellcheck when posting code hahaha! ``` function compile_guests_for_hcp($guest_identfier){ return function($hcp_id) use ($guest_identfier){ ```
Replace all calls to `$_POST[...` with `@$_POST[...` to repress the errors. Or check the value before using it like `isset($_POST[...]) ? $_POST[...]` ... Or suppress PHP warnings by calling [error\_reporting(E\_ALL ^ E\_NOTICE)](http://php.net/manual/en/function.error-reporting.php)
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
This will help you in making dynamic insertion of `n` number of product. ``` $loopLength=$_POST['ProudctSize']; for ($i=1; $i <=$loopLength; $i++) { $productid=$_POST['P'.$i]; $quatity=$_POST['Q'.$i]; $rate=$_POST['R'.$i]; $Insert=mysql_query("INSERT INTO saledisplay ( `saleid`, `productid`, `quantit...
Replace all calls to `$_POST[...` with `@$_POST[...` to repress the errors. Or check the value before using it like `isset($_POST[...]) ? $_POST[...]` ... Or suppress PHP warnings by calling [error\_reporting(E\_ALL ^ E\_NOTICE)](http://php.net/manual/en/function.error-reporting.php)
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Second to testing if the variable is set using `isset()` before you try to access its value. You can even be more direct in your syntax and write the string concatenation in: ``` $var = isset( $_POST[ 'fname_' . $guest_identifier]) ? $_POST[ 'fname_' . $guest_identifier] : 'default_value' ``` Your post m...
Just use the operator like: `$_POST["fname_".$guest_identifier]`
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Second to testing if the variable is set using `isset()` before you try to access its value. You can even be more direct in your syntax and write the string concatenation in: ``` $var = isset( $_POST[ 'fname_' . $guest_identifier]) ? $_POST[ 'fname_' . $guest_identifier] : 'default_value' ``` Your post m...
I'm thinking that your approach is a bit overly complicated, but your issue is not in the array index concatenation: there are no syntax errors in your code as you've presented it. For example, this works like a charm: ``` $a = array("foo"=>1); $o = "o"; print $a["fo$o"]; // prints 1 ``` Your issue is that the `$...
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Second to testing if the variable is set using `isset()` before you try to access its value. You can even be more direct in your syntax and write the string concatenation in: ``` $var = isset( $_POST[ 'fname_' . $guest_identifier]) ? $_POST[ 'fname_' . $guest_identifier] : 'default_value' ``` Your post m...
GOT IT! (Facepalm) Simple spelling error in my argument so it was not being passed. I had identfier. Missing the i. I should pay more attention to the browser spellcheck when posting code hahaha! ``` function compile_guests_for_hcp($guest_identfier){ return function($hcp_id) use ($guest_identfier){ ```
7,975,647
Having trouble with this. I want to reference the post superglobal using a key which is generated by the concatenation of a string literal and a string variable. ``` $guests = array(); $guest_data = $this->compile_guests_for_hcp('g1'); array_push($guests, $guest_data($hcp_id)); function compile_guests_for_hcp($guest_...
2011/11/02
[ "https://Stackoverflow.com/questions/7975647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384117/" ]
Second to testing if the variable is set using `isset()` before you try to access its value. You can even be more direct in your syntax and write the string concatenation in: ``` $var = isset( $_POST[ 'fname_' . $guest_identifier]) ? $_POST[ 'fname_' . $guest_identifier] : 'default_value' ``` Your post m...
This will help you in making dynamic insertion of `n` number of product. ``` $loopLength=$_POST['ProudctSize']; for ($i=1; $i <=$loopLength; $i++) { $productid=$_POST['P'.$i]; $quatity=$_POST['Q'.$i]; $rate=$_POST['R'.$i]; $Insert=mysql_query("INSERT INTO saledisplay ( `saleid`, `productid`, `quantit...
2,646,221
I want to find $$\int \int\_ R \sin\left(\frac{x-y}{x+y}\right)dA$$ where $R$ is the trapezoid with vertices $(1,1)$, $(2,2)$, $(4,0)$ and $(2,0$). I've seen some examples with similar integrals in my calculus book using triangles instead, but I'm confused as to what happens when we decide to use some other geometric f...
2018/02/11
[ "https://math.stackexchange.com/questions/2646221", "https://math.stackexchange.com", "https://math.stackexchange.com/users/477187/" ]
Since you have to have $1$ blue and $1$ yellow marble, the problem comes down to finding the number of different subsets of: $3$ red, $1$ blue, $3$ yellow, and $1$ white marble Now, you can choose $0,1,2$, or $3$ red marbles, so $4$ possibilities there. Same for the yellow ones of course. Then, you can either add a bl...
Use generating functions. Subtracting 1 blue and 1 yellow, the generating function here is $(1+x)^2(1+x+x^2+x^3)^2$ or $x^8 + 4 x^7 + 8 x^6 + 12 x^5 + 14 x^4 + 12 x^3 + 8 x^2 + 4 x + 1$. Adding the coefficients gives the answer, i.e. 64.
51,528,387
I have several **arrays of string** and given a specific **input key** string I'm trying to return the corresponding key. For example if the input value is 'a1' it should return 'aa' because 'a1' is part of the array values of key 'aa'. ``` inputKey = 'a1'; dict = { 'aa': ['a1', 'a2'], 'bb' : ['b1', 'b4', '...
2018/07/25
[ "https://Stackoverflow.com/questions/51528387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10135932/" ]
Run Foreach on fields and concat each field with incremented number, and concat these ``` $i=1;$par=''; Foreach($fields as $k=>$v) { $par.="$k=:param$i"; $i++; } ``` Concat this into query string. Then loop through fields again calling bind param ``` $i=1;$par=''; Foreach($fields as $k=>$v) { $stn->bindParam ("...
Run array\_values on update\_fields, then build your query dynamicaly accessing keys obtained from array\_values to get field values.
51,528,387
I have several **arrays of string** and given a specific **input key** string I'm trying to return the corresponding key. For example if the input value is 'a1' it should return 'aa' because 'a1' is part of the array values of key 'aa'. ``` inputKey = 'a1'; dict = { 'aa': ['a1', 'a2'], 'bb' : ['b1', 'b4', '...
2018/07/25
[ "https://Stackoverflow.com/questions/51528387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10135932/" ]
If you're using PHP5.6 or later, you could use [argument unpacking](http://php.net/manual/en/migration56.new-features.php) to deal with the bind\_param which is the hardest part of the problem. Try something like this: ``` $update_fields = json_decode($_POST['myform']['update_fields'], true); $sql_fields = array(); $b...
Run array\_values on update\_fields, then build your query dynamicaly accessing keys obtained from array\_values to get field values.
51,528,387
I have several **arrays of string** and given a specific **input key** string I'm trying to return the corresponding key. For example if the input value is 'a1' it should return 'aa' because 'a1' is part of the array values of key 'aa'. ``` inputKey = 'a1'; dict = { 'aa': ['a1', 'a2'], 'bb' : ['b1', 'b4', '...
2018/07/25
[ "https://Stackoverflow.com/questions/51528387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10135932/" ]
If you're using PHP5.6 or later, you could use [argument unpacking](http://php.net/manual/en/migration56.new-features.php) to deal with the bind\_param which is the hardest part of the problem. Try something like this: ``` $update_fields = json_decode($_POST['myform']['update_fields'], true); $sql_fields = array(); $b...
Run Foreach on fields and concat each field with incremented number, and concat these ``` $i=1;$par=''; Foreach($fields as $k=>$v) { $par.="$k=:param$i"; $i++; } ``` Concat this into query string. Then loop through fields again calling bind param ``` $i=1;$par=''; Foreach($fields as $k=>$v) { $stn->bindParam ("...
185,199
Looking for info on a book I found as a kid. It was a scifi anthology from the 70s-80s. I remember a story about a space war and time dilation, with the main character coming back to find a note from his lover in an old archive and waiting for her return. Another story used eagle and deer metaphors, and another was abo...
2018/04/09
[ "https://scifi.stackexchange.com/questions/185199", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/98923/" ]
Yes, definitely. From LotR: Introduction: > > Thus began the Shire-reckoning, for the year of the crossing of the Brandywine (as the Hobbits turned the name) became Year One of the Shire... There for a thousand years they were little troubled by wars, and they prospered and multiplied after the Dark Plague (S.R. 37)...
The Evil Breath --------------- The "Evil Breath" was an epidemic that caused many children to get sick and die towards the end of the First Age. > > ‘Ever will some new evil be hatched in Angband beyond the guess of Elves and Men,’ they said. And in the autumn of that year, to point their words, **there came an ill...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
[`std::tolower()`](https://en.cppreference.com/w/cpp/string/byte/tolower) and [`std::toupper()`](https://en.cppreference.com/w/cpp/string/byte/toupper) functions return value is int. And `std::cout` print the exact value that appears to it. So `cout<< tolower(s[i])<<endl` print ASCII value of the characters. But when ...
cout prints the value, and in C++ a tolower returns a int (ASCII) so what you get is that, if you want to yell the actual character you need to convert manually the output. ``` cout<<static_cast<char>((s[i]))<<endl; ``` [Online editor to C++ (example)](http://cpp.sh/7k47k)
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
[`std::tolower()`](https://en.cppreference.com/w/cpp/string/byte/tolower) and [`std::toupper()`](https://en.cppreference.com/w/cpp/string/byte/toupper) functions return value is int. And `std::cout` print the exact value that appears to it. So `cout<< tolower(s[i])<<endl` print ASCII value of the characters. But when ...
Just to add that this is a false comparison. The C++ equivalent of `putchar` is [`ostream::put`](https://en.cppreference.com/w/cpp/io/basic_ostream/put), like this: ``` std::cout.put(std::tolower(s[i])); ``` Because both this and `putchar` take a `char`, an implicit conversion is performed. This is necessary becaus...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
The reason behind this is the `tolower()`. The return type of `tolower()` is int. That means its equivalent to printing an integer, rather than a character. If you want to show it correctly, use this: ``` cout << static_cast<char>(tolower(s[i])) << "\n"; ```
In this case: ``` if(sm>c) { for(i=0;i<strlen(s);i++) { cout<<tolower(s[i])<<endl; } } ``` yes you should expect an ASCII value. This is because tolower is a function that returns an integer and cout outputs directly what it is given, it doesnt carry out an...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
The reason behind this is the `tolower()`. The return type of `tolower()` is int. That means its equivalent to printing an integer, rather than a character. If you want to show it correctly, use this: ``` cout << static_cast<char>(tolower(s[i])) << "\n"; ```
cout prints the value, and in C++ a tolower returns a int (ASCII) so what you get is that, if you want to yell the actual character you need to convert manually the output. ``` cout<<static_cast<char>((s[i]))<<endl; ``` [Online editor to C++ (example)](http://cpp.sh/7k47k)
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
From the cplusplus.com reference for [`tolower`](http://www.cplusplus.com/reference/cctype/tolower/): > > The value is returned as an int value that can be implicitly casted to char. > > > However printing the returned int will not convert it to a char. You can explicitly cast it: ``` std::cout<< (char) tolower(...
In this case: ``` if(sm>c) { for(i=0;i<strlen(s);i++) { cout<<tolower(s[i])<<endl; } } ``` yes you should expect an ASCII value. This is because tolower is a function that returns an integer and cout outputs directly what it is given, it doesnt carry out an...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
[`std::tolower()`](https://en.cppreference.com/w/cpp/string/byte/tolower) and [`std::toupper()`](https://en.cppreference.com/w/cpp/string/byte/toupper) functions return value is int. And `std::cout` print the exact value that appears to it. So `cout<< tolower(s[i])<<endl` print ASCII value of the characters. But when ...
The reason behind this is the `tolower()`. The return type of `tolower()` is int. That means its equivalent to printing an integer, rather than a character. If you want to show it correctly, use this: ``` cout << static_cast<char>(tolower(s[i])) << "\n"; ```
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
Just to add that this is a false comparison. The C++ equivalent of `putchar` is [`ostream::put`](https://en.cppreference.com/w/cpp/io/basic_ostream/put), like this: ``` std::cout.put(std::tolower(s[i])); ``` Because both this and `putchar` take a `char`, an implicit conversion is performed. This is necessary becaus...
In this case: ``` if(sm>c) { for(i=0;i<strlen(s);i++) { cout<<tolower(s[i])<<endl; } } ``` yes you should expect an ASCII value. This is because tolower is a function that returns an integer and cout outputs directly what it is given, it doesnt carry out an...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
Just to add that this is a false comparison. The C++ equivalent of `putchar` is [`ostream::put`](https://en.cppreference.com/w/cpp/io/basic_ostream/put), like this: ``` std::cout.put(std::tolower(s[i])); ``` Because both this and `putchar` take a `char`, an implicit conversion is performed. This is necessary becaus...
From the cplusplus.com reference for [`tolower`](http://www.cplusplus.com/reference/cctype/tolower/): > > The value is returned as an int value that can be implicitly casted to char. > > > However printing the returned int will not convert it to a char. You can explicitly cast it: ``` std::cout<< (char) tolower(...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
[`std::tolower()`](https://en.cppreference.com/w/cpp/string/byte/tolower) and [`std::toupper()`](https://en.cppreference.com/w/cpp/string/byte/toupper) functions return value is int. And `std::cout` print the exact value that appears to it. So `cout<< tolower(s[i])<<endl` print ASCII value of the characters. But when ...
From the cplusplus.com reference for [`tolower`](http://www.cplusplus.com/reference/cctype/tolower/): > > The value is returned as an int value that can be implicitly casted to char. > > > However printing the returned int will not convert it to a char. You can explicitly cast it: ``` std::cout<< (char) tolower(...
53,960,430
I was trying to write a program which will convert every word(either upper or lower case) in the upper or lower case(depending on which case is max).So here is my program ``` #include<iostream> #include<cstring> #include<cctype> #include<cstdio> using namespace std; int main() { char s[101]; int c=0, sm=0, i; ...
2018/12/28
[ "https://Stackoverflow.com/questions/53960430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9771202/" ]
The reason behind this is the `tolower()`. The return type of `tolower()` is int. That means its equivalent to printing an integer, rather than a character. If you want to show it correctly, use this: ``` cout << static_cast<char>(tolower(s[i])) << "\n"; ```
From the cplusplus.com reference for [`tolower`](http://www.cplusplus.com/reference/cctype/tolower/): > > The value is returned as an int value that can be implicitly casted to char. > > > However printing the returned int will not convert it to a char. You can explicitly cast it: ``` std::cout<< (char) tolower(...
266,263
We have some databases with index fragmentation that is > 95%. As best I can tell the indexes have never been rebuilt much less reorganized. In years. (In fairness, these tables do seem to have auto-updated statistics enabled. Also in fairness, he is diligent about backups: full daily and trx logs hourly.) When I ask...
2011/05/04
[ "https://serverfault.com/questions/266263", "https://serverfault.com", "https://serverfault.com/users/64837/" ]
Rebuilding a database index should not cause any data loss. It will however probably cause a substantial performance degradation as the indexes being rebuilt will normally not be available for use until the rebuild finishes. For that reason it should be done during off-hours when the affected systems are idle. Paranoi...
Reorganizing the indexes will take less time, and less effort from the SQL server thus they can be done in a weeknight type of instances. If you what you are saying is true, even reorganizing the indexes that have never been, may cause a larger impact on the server as well. Rebuilding the indexes will take a substantia...
266,263
We have some databases with index fragmentation that is > 95%. As best I can tell the indexes have never been rebuilt much less reorganized. In years. (In fairness, these tables do seem to have auto-updated statistics enabled. Also in fairness, he is diligent about backups: full daily and trx logs hourly.) When I ask...
2011/05/04
[ "https://serverfault.com/questions/266263", "https://serverfault.com", "https://serverfault.com/users/64837/" ]
Rebuilding a database index should not cause any data loss. It will however probably cause a substantial performance degradation as the indexes being rebuilt will normally not be available for use until the rebuild finishes. For that reason it should be done during off-hours when the affected systems are idle. Paranoi...
There is no risk of data loss from rebuilding or defragging indexes.
266,263
We have some databases with index fragmentation that is > 95%. As best I can tell the indexes have never been rebuilt much less reorganized. In years. (In fairness, these tables do seem to have auto-updated statistics enabled. Also in fairness, he is diligent about backups: full daily and trx logs hourly.) When I ask...
2011/05/04
[ "https://serverfault.com/questions/266263", "https://serverfault.com", "https://serverfault.com/users/64837/" ]
There is no risk of data loss from rebuilding or defragging indexes.
Reorganizing the indexes will take less time, and less effort from the SQL server thus they can be done in a weeknight type of instances. If you what you are saying is true, even reorganizing the indexes that have never been, may cause a larger impact on the server as well. Rebuilding the indexes will take a substantia...
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
Sorry, given your constraints (client-side Javascript only), there is no way to connect to a plain old SSH server. WebSockets is not plain TCP. It's a framed protocol with a HTTP-like handshake between the client and server that includes origin policy. Flash can make plain TCP connections, but it also has origin poli...
You can take a look at [serfish](http://www.serfish.com/console/). It's a solution to access a SSH server. But if you're hosting your web application on the same server as your ssh, there are other solutions such as [shell in a box](http://code.google.com/p/shellinabox/).
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
You can take a look at [serfish](http://www.serfish.com/console/). It's a solution to access a SSH server. But if you're hosting your web application on the same server as your ssh, there are other solutions such as [shell in a box](http://code.google.com/p/shellinabox/).
For those still searching, **[paramikojs](http://www.mozdev.org/source/browse/fireftp/src/content/js/connection/paramikojs/)** could be the answer. I'm currently having a similar issue:I need a SSH JS client-side implementation, and I need it to be BSD licensed. Alas paramikojs seems to be GPL licensed.
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
You can take a look at [serfish](http://www.serfish.com/console/). It's a solution to access a SSH server. But if you're hosting your web application on the same server as your ssh, there are other solutions such as [shell in a box](http://code.google.com/p/shellinabox/).
It's definitely possible using a Linux emulator with full network support like the great OpenRISC emulator [jor1k](https://s-macke.github.io/jor1k/demos/main.html). Note that I've created [browser-tools.net](https://browser-tools.net), a collection of in-browser tools from number of different projects.
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
You can take a look at [serfish](http://www.serfish.com/console/). It's a solution to access a SSH server. But if you're hosting your web application on the same server as your ssh, there are other solutions such as [shell in a box](http://code.google.com/p/shellinabox/).
Yes you can 1. Install SSH server on your server 2. Write a server side program (could be in PHP) that uses SSH client in the background 3. Redirect messages between the SSH client (that probably has been residing in the same server as SSH server) and the JavaScript program in the web browser other side of the interne...
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
Sorry, given your constraints (client-side Javascript only), there is no way to connect to a plain old SSH server. WebSockets is not plain TCP. It's a framed protocol with a HTTP-like handshake between the client and server that includes origin policy. Flash can make plain TCP connections, but it also has origin poli...
For those still searching, **[paramikojs](http://www.mozdev.org/source/browse/fireftp/src/content/js/connection/paramikojs/)** could be the answer. I'm currently having a similar issue:I need a SSH JS client-side implementation, and I need it to be BSD licensed. Alas paramikojs seems to be GPL licensed.
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
Sorry, given your constraints (client-side Javascript only), there is no way to connect to a plain old SSH server. WebSockets is not plain TCP. It's a framed protocol with a HTTP-like handshake between the client and server that includes origin policy. Flash can make plain TCP connections, but it also has origin poli...
It's definitely possible using a Linux emulator with full network support like the great OpenRISC emulator [jor1k](https://s-macke.github.io/jor1k/demos/main.html). Note that I've created [browser-tools.net](https://browser-tools.net), a collection of in-browser tools from number of different projects.
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
Sorry, given your constraints (client-side Javascript only), there is no way to connect to a plain old SSH server. WebSockets is not plain TCP. It's a framed protocol with a HTTP-like handshake between the client and server that includes origin policy. Flash can make plain TCP connections, but it also has origin poli...
Yes you can 1. Install SSH server on your server 2. Write a server side program (could be in PHP) that uses SSH client in the background 3. Redirect messages between the SSH client (that probably has been residing in the same server as SSH server) and the JavaScript program in the web browser other side of the interne...
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
For those still searching, **[paramikojs](http://www.mozdev.org/source/browse/fireftp/src/content/js/connection/paramikojs/)** could be the answer. I'm currently having a similar issue:I need a SSH JS client-side implementation, and I need it to be BSD licensed. Alas paramikojs seems to be GPL licensed.
It's definitely possible using a Linux emulator with full network support like the great OpenRISC emulator [jor1k](https://s-macke.github.io/jor1k/demos/main.html). Note that I've created [browser-tools.net](https://browser-tools.net), a collection of in-browser tools from number of different projects.
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
For those still searching, **[paramikojs](http://www.mozdev.org/source/browse/fireftp/src/content/js/connection/paramikojs/)** could be the answer. I'm currently having a similar issue:I need a SSH JS client-side implementation, and I need it to be BSD licensed. Alas paramikojs seems to be GPL licensed.
Yes you can 1. Install SSH server on your server 2. Write a server side program (could be in PHP) that uses SSH client in the background 3. Redirect messages between the SSH client (that probably has been residing in the same server as SSH server) and the JavaScript program in the web browser other side of the interne...
3,897,649
I know there is an implementation of VNC using WebSockets (http://novnc.com) but that still requires a server. I am looking to create a simple client-side JavaScript only (no Flash) connection to a port running SSH. I am guessing WebSockets is the only way to go since it does TCP. Any example code? Any other way?
2010/10/09
[ "https://Stackoverflow.com/questions/3897649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471136/" ]
It's definitely possible using a Linux emulator with full network support like the great OpenRISC emulator [jor1k](https://s-macke.github.io/jor1k/demos/main.html). Note that I've created [browser-tools.net](https://browser-tools.net), a collection of in-browser tools from number of different projects.
Yes you can 1. Install SSH server on your server 2. Write a server side program (could be in PHP) that uses SSH client in the background 3. Redirect messages between the SSH client (that probably has been residing in the same server as SSH server) and the JavaScript program in the web browser other side of the interne...
46,317,087
I am trying to replace version number (like `00.00.00-00`) in a file with actual version number in shell. For this I use the following command: ``` sed -i 's/[0-9]*\.+[0-9]*\.+[0-9]*\-+[0-9]*/MyNewVersion/g' file.txt ``` Example of the file.txt: ``` Some text Bla Bla Bla-00.00.00-00.x86_SomeOtherInterestingThings ...
2017/09/20
[ "https://Stackoverflow.com/questions/46317087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316502/" ]
First of all, you would need `-r` flag in order to mark the pattern as a regular expression. Next, you would need to move the quantifier `+` next to the number ranges, so I believe you should be using this command: ``` sed -i -r 's/[0-9]+\.[0-9]+\.[0-9]+-[0-9]+/MyNewVersion/g' file.txt ```
based on the example input/pattern, this line should help: ``` sed 's/[-0-9.]\+\([.]x86_\)/-NEW\1/' ```
32,702,882
I have an array of objects which first array looks like [![enter image description here](https://i.stack.imgur.com/9NMor.png)](https://i.stack.imgur.com/9NMor.png) now in client side I want to create an index array and store the value projects in there but I am getting 8 `undefined` in the array ``` var roadsArr =[]...
2015/09/21
[ "https://Stackoverflow.com/questions/32702882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1066197/" ]
This: ``` roadsArr.push(data[1].ecolo_roads_Projects_Step_+[i]); ``` You can't construct an immediate property name like that, you'd need: ``` roadsArr.push(data[1]['ecolo_roads_Projects_Step_' + i]); ``` That aside, if you have an ordered sequence of object members, consider using an actual array instead of an a...
Perhaps `data[1].ecolo_roads_Projects_Step_+[i]` should be: `data[1].ecolo_roads_Projects_Step_+i`
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
There's two kinds of antonyms: opposites (left and right) and present/absent (light and dark, where dark describes the absence of light). Capitalism is basically the default economic system. It has both good and bad aspects to it. Even in total anarchy, you'll find Capitalism in some form. Nobody establishes Capitalis...
Capitalism is not a form of government, or even a governmental ideology. It is an economic ideology. Democracy is the governmental ideology behind most capitalist nations.
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
Capitalism is not a form of government, or even a governmental ideology. It is an economic ideology. Democracy is the governmental ideology behind most capitalist nations.
Short answer : because capitalism is a **transversal** marker and because most countries **take for granted** that they're capitalists. Why would you need to state that you're capitalistic when you feel like it's the default setting? (so much so that they sometimes don't even realize that they are -- just like you when...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
Out of [195 US recognized states](https://www.state.gov/s/inr/rls/4250.htm), it seems there are these types, based solely on names: 1. Republic * 81 use the word *Republic*. * 9 use the word *Democratic*, but all of those also use the word *Republic* * 2 use the word *Socialist*, but again all also use the word *Re...
Apart from all the other answers, no nation should call itself "Capitalist Republic of ..." because there isn't currently any nation which is purely capitalistic. We mostly live in **mixed** economic systems, a mix of capitalistic and socialist rules, so we don't starve to death if we are poor or have to redistribute a...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
Capitalism as we currently understand it in the modern sense is a political philosophy that requires the government to institute policies to create capitalist markets. For example, there is no way to create a joint-stock company without laws to establish them as legal entities and to regulate them. Read [Debt: The Firs...
Apart from all the other answers, no nation should call itself "Capitalist Republic of ..." because there isn't currently any nation which is purely capitalistic. We mostly live in **mixed** economic systems, a mix of capitalistic and socialist rules, so we don't starve to death if we are poor or have to redistribute a...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
Short answer : because capitalism is a **transversal** marker and because most countries **take for granted** that they're capitalists. Why would you need to state that you're capitalistic when you feel like it's the default setting? (so much so that they sometimes don't even realize that they are -- just like you when...
Apart from all the other answers, no nation should call itself "Capitalist Republic of ..." because there isn't currently any nation which is purely capitalistic. We mostly live in **mixed** economic systems, a mix of capitalistic and socialist rules, so we don't starve to death if we are poor or have to redistribute a...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
> > Why few/no countries claim capitalism as their ideology? > > > Why no country ever claims capitalism as their state ideology? > > > *Capitalism* is an economic system[1](https://en.wikipedia.org/wiki/Capitalism),[2](https://www.britannica.com/topic/capitalism), it's not an ideology per se (it could be treate...
Apart from all the other answers, no nation should call itself "Capitalist Republic of ..." because there isn't currently any nation which is purely capitalistic. We mostly live in **mixed** economic systems, a mix of capitalistic and socialist rules, so we don't starve to death if we are poor or have to redistribute a...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
Capitalism is not a form of government, or even a governmental ideology. It is an economic ideology. Democracy is the governmental ideology behind most capitalist nations.
Out of [195 US recognized states](https://www.state.gov/s/inr/rls/4250.htm), it seems there are these types, based solely on names: 1. Republic * 81 use the word *Republic*. * 9 use the word *Democratic*, but all of those also use the word *Republic* * 2 use the word *Socialist*, but again all also use the word *Re...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
There's two kinds of antonyms: opposites (left and right) and present/absent (light and dark, where dark describes the absence of light). Capitalism is basically the default economic system. It has both good and bad aspects to it. Even in total anarchy, you'll find Capitalism in some form. Nobody establishes Capitalis...
Apart from all the other answers, no nation should call itself "Capitalist Republic of ..." because there isn't currently any nation which is purely capitalistic. We mostly live in **mixed** economic systems, a mix of capitalistic and socialist rules, so we don't starve to death if we are poor or have to redistribute a...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
There's two kinds of antonyms: opposites (left and right) and present/absent (light and dark, where dark describes the absence of light). Capitalism is basically the default economic system. It has both good and bad aspects to it. Even in total anarchy, you'll find Capitalism in some form. Nobody establishes Capitalis...
> > Why few/no countries claim capitalism as their ideology? > > > Why no country ever claims capitalism as their state ideology? > > > *Capitalism* is an economic system[1](https://en.wikipedia.org/wiki/Capitalism),[2](https://www.britannica.com/topic/capitalism), it's not an ideology per se (it could be treate...
29,892
Think about it: capitalism has brought so much prosperity to so many people. Yet no country claims our national ideology is capitalism - none that I know of. Americans can proudly claim they are capitalists. Well. First. Not so much. And then, it's not technically the American national ideology. There are "Socialist...
2018/03/27
[ "https://politics.stackexchange.com/questions/29892", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/5894/" ]
> > Why few/no countries claim capitalism as their ideology? > > > Why no country ever claims capitalism as their state ideology? > > > *Capitalism* is an economic system[1](https://en.wikipedia.org/wiki/Capitalism),[2](https://www.britannica.com/topic/capitalism), it's not an ideology per se (it could be treate...
Capitalism is not a form of government, or even a governmental ideology. It is an economic ideology. Democracy is the governmental ideology behind most capitalist nations.
20,948,978
I have the timestamp format such as "**2014-01-06T00:39:45.001+0000**" but I don't know exactly what this timestamp format is. So I can't convert it to datetime as I desired. How can I convert it with Python?
2014/01/06
[ "https://Stackoverflow.com/questions/20948978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680338/" ]
Use [`dateutil.parser.parse`](http://labix.org/python-dateutil): ``` >>> import dateutil.parser >>> dateutil.parser.parse("2014-01-06T00:39:45.001+0000") datetime.datetime(2014, 1, 6, 0, 39, 45, 1000, tzinfo=tzutc()) ```
You can parse dates and times in arbitrary formats using [`datetime.strptime(date_string, format)`](http://docs.python.org/2/library/datetime.html#datetime-objects), with the grammar for defining `format` presented [here](http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior). In this case: ``...
11,501,714
How to find the **web root** (www, html\_public, etc) of a hosting to upload files automatically via the PHP ftp\_put() function ? > > The purpose is to propose the installation of a PHP script via a form > or the users could send their FTP login. > > > Then, with a function PHP would upload and install the script...
2012/07/16
[ "https://Stackoverflow.com/questions/11501714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/785515/" ]
Have you check [$\_SERVER](http://php.net/manual/en/reserved.variables.server.php) ? Try this, ``` echo $_SERVER["DOCUMENT_ROOT"]; ```
Not 100% sure what you are trying to do here, but by uploading a file in your webroot with this content: ``` echo dirname(__FILE__); ``` You could receive the full root path on your server.
34,707,972
In my Swift app, I want to point rear camera at object, then click a button. In my view controller, I'm trying to pick up the UIButton press for the programatically placed button, positioned over a cameraOverlayView. I don't need to take a picture - I'm just using camera to point at object, then click button. Compile...
2016/01/10
[ "https://Stackoverflow.com/questions/34707972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5770227/" ]
I think I've cracked it and post this if it helps others. This [SO post](https://stackoverflow.com/questions/3996425/cameraoverlayview-buttons) was the clue. The problem was the button on the cameraOverlay on the UIImagePickerController showed on-screen, but didn't register touches. As @Dia Kharrat noted in that post,...
Maybe you have to add `@IBAction` in front of `func buttonAction(sender: UIButton!)`
34,707,972
In my Swift app, I want to point rear camera at object, then click a button. In my view controller, I'm trying to pick up the UIButton press for the programatically placed button, positioned over a cameraOverlayView. I don't need to take a picture - I'm just using camera to point at object, then click button. Compile...
2016/01/10
[ "https://Stackoverflow.com/questions/34707972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5770227/" ]
I think I've cracked it and post this if it helps others. This [SO post](https://stackoverflow.com/questions/3996425/cameraoverlayview-buttons) was the clue. The problem was the button on the cameraOverlay on the UIImagePickerController showed on-screen, but didn't register touches. As @Dia Kharrat noted in that post,...
I looked around at other SO posts for this similar case, and there are some. [This post](https://stackoverflow.com/questions/23631208/uibutton-is-not-responding-when-added-to-a-uiimageview) does something similar, and the answers recommend setting `userInteractionEnabled` on the `imageView`. The [documentation](https:/...
5,913,709
Does anyone knows how to kill a batch file w/in another batch file? Scenario: batch file #1 is running (or looping) in the background. While #1 is on the background, a separate (not w/in batch file #1) batch file is activated manually with a code inside killing batch file #1. It's like the opposite of call (I guess)....
2011/05/06
[ "https://Stackoverflow.com/questions/5913709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742063/" ]
`Taskkill` Command can end a process `Tasklist` Command will list out all the process Also you may use `find` command to find the process that wanted to kill
You can kill a batch file from another batch by querying the window title. See this blog for more info: <http://dotnetcrunch.wordpress.com/2014/04/24/kill-batch-file-script/>
51,284,268
I'm programming in python 3.4.4 (32 bits), in windows 8. I'm running an app with PyQt5, the app was working well, but since i installed pywinauto 0.6.4 to set the focus on other app with: ``` other_app = pywinauto.Application().connect(process=int(code)) other_app.top_window().set_focus() ``` if i run `My_app = QApp...
2018/07/11
[ "https://Stackoverflow.com/questions/51284268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10058479/" ]
According to this [post](https://github.com/pywinauto/pywinauto/issues/472) a workaround is to use `sys.coinit_flags = 2` and warning module. ``` import sys import warnings warnings.simplefilter("ignore", UserWarning) sys.coinit_flags = 2 import pywinauto from PyQt5.QtWidgets import QApplication, QMainWindow def main...
Try to import in this way: ``` from PyQt5 import QtWidgets ... app = QtWidgets.QApplication(sys.argv) w = QMainWindow() w.show() app.exec_() ``` This works for me.
70,511,712
I'm trying to form a Container with Text objects in Flutter. The data for those Text objects are coming from a List. I'm relatively new to Dart and Flutter, so i can't figure out why i can only pass strings in a map() method and not maps. ``` child: Column( children: tasks.map((value) => ColumnChild(value['ti...
2021/12/28
[ "https://Stackoverflow.com/questions/70511712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17783487/" ]
Instead of using the .map(), You could loop through the list and use the Strings directly ``` Column( children: [ for(var a in tasks) Text(a) ), ``` Or You use a listView.builder ``` ListView.builder( itembuilder: (context,index){ return Text(tasks[index]) ...
`ColumnChild` asks for a string called `title`. If you give it a map, flutter gets confused. Imagine maps are dictionaries and strings are words. Your widget `ColumnChild` asked for a word and you gave it the whole dictionary, without teaching it how to look up a word. Let's teach it how to look up a word: ``` class...
34,607,695
Here are my PHP abstraction classes. The bottom most class is one of the classes that will extend the abstract class and leave some of the complex calculation logic to the parent implementation. The point of the interface class (the top most abstraction) is to force those lower implementations have their own `static p...
2016/01/05
[ "https://Stackoverflow.com/questions/34607695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1364793/" ]
"self" is reference to "MyAbstraction" class (itself). So it try to search `MyAbstraction::id()`, and got an error. 1. You shoud use "static" keyword `static::id();` 2. You cannot use $this in static method `($this->id)`. 3. All of your methods are static, so You do not need instantiate an object. You can do the same ...
Try to replace your `self::id()` by `static::id()`. You use the [Late Static Bindings](http://php.net/manual/en/language.oop5.late-static-bindings.php) of PHP here.
34,607,695
Here are my PHP abstraction classes. The bottom most class is one of the classes that will extend the abstract class and leave some of the complex calculation logic to the parent implementation. The point of the interface class (the top most abstraction) is to force those lower implementations have their own `static p...
2016/01/05
[ "https://Stackoverflow.com/questions/34607695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1364793/" ]
1. All methods declared in an interface must be public; this is the nature of an interface. [Reference - PHP interface](http://php.net/manual/en/language.oop5.interfaces.php) 2. You are using `self::id()` in `MyAbstraction` class, `self` always refers same class. [reference self vs static](https://stackoverflow.com/que...
Try to replace your `self::id()` by `static::id()`. You use the [Late Static Bindings](http://php.net/manual/en/language.oop5.late-static-bindings.php) of PHP here.
64,825,871
Adding new elements into array `evento` works fine when checking the checkbox, but how can I delete an element when I uncheck the checkbox? Play with it: <https://codesandbox.io/s/heuristic-currying-uqib1?file=/index.html> `v-model` is not an option because I'm working with a very complex structure that comes from Gr...
2020/11/13
[ "https://Stackoverflow.com/questions/64825871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999525/" ]
The array `evento` is completely replaced because of the association in this line: ``` v-on:input="evento = $event.target._value" ``` So just a quick workaround is to create a method to update the array properly and call it instead of making aboves association: ``` v-on:input="updateArray(lang)" ``` Where the con...
*The best solution =>* ``` deleteUsers() { this.users = this.users.filter(user => { if (user.selected === false) { return user; } }); ``` In my case, for deleting by checkbox, this helped me ... in the users array there is a line **selected : false.** ``` for (let i = 0; ...
64,825,871
Adding new elements into array `evento` works fine when checking the checkbox, but how can I delete an element when I uncheck the checkbox? Play with it: <https://codesandbox.io/s/heuristic-currying-uqib1?file=/index.html> `v-model` is not an option because I'm working with a very complex structure that comes from Gr...
2020/11/13
[ "https://Stackoverflow.com/questions/64825871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999525/" ]
Id use the bog-standard toggle technique with a click event and a indexOf/splice: ``` <input type="checkbox" :checked="evento.includes(lang)" @click="toggleLang(lang)" /> ``` ``` toggleLang(lang) { if (!this.evento.includes(lang)) { this.evento.push(lang) } else { this.evento.splice(this.evento.ind...
*The best solution =>* ``` deleteUsers() { this.users = this.users.filter(user => { if (user.selected === false) { return user; } }); ``` In my case, for deleting by checkbox, this helped me ... in the users array there is a line **selected : false.** ``` for (let i = 0; ...
39,966,491
Consider the following object: ``` var content = [ { id: 'tab1', langCode: 'en', title: 'rocket' }, { id: 'tab1', langCode: 'da', title: 'raket' }, { id: 'tab2', langCode: 'en', title: 'factory' }, { id:...
2016/10/10
[ "https://Stackoverflow.com/questions/39966491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/830134/" ]
I would reduce everything into an object keyed by ID to enable easy lookups without those extra `_.find` calls: ``` const targetLang = 'da'; const fallbackLang = 'en'; const itemsByKey = content.reduce((allItems, item) => { if (item.langCode === targetLang || (!(item.id in allItems) && item.langCode === fall...
You could use a tree and filter the wanted items. ```js var content = [{ id: 'tab1', langCode: 'en', title: 'rocket' }, { id: 'tab1', langCode: 'da', title: 'raket' }, { id: 'tab2', langCode: 'es', title: 'boligrafo' }, { id: 'tab2', langCode: 'en', title: 'pen' }], object = Object.create(null); content.forEach...
39,966,491
Consider the following object: ``` var content = [ { id: 'tab1', langCode: 'en', title: 'rocket' }, { id: 'tab1', langCode: 'da', title: 'raket' }, { id: 'tab2', langCode: 'en', title: 'factory' }, { id:...
2016/10/10
[ "https://Stackoverflow.com/questions/39966491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/830134/" ]
I would reduce everything into an object keyed by ID to enable easy lookups without those extra `_.find` calls: ``` const targetLang = 'da'; const fallbackLang = 'en'; const itemsByKey = content.reduce((allItems, item) => { if (item.langCode === targetLang || (!(item.id in allItems) && item.langCode === fall...
I would do as follows. ```js var content = [ { id: 'tab1', langCode: 'en', title: 'rocket' }, { id: 'tab1', langCode: 'da', title: 'raket' }, { id: 'tab2', langCode: 'es', title: 'boligrafo' }, { ...
55,622,383
In iOS 12.2, apple added a new “feature” where motion and orientation access in safari is disabled by default. Is there a way to use JavaScript to access this option (or trigger a system pop-up that the user can say yes or no to that will enable access) so the user doesn’t have to manually enable it?
2019/04/10
[ "https://Stackoverflow.com/questions/55622383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11343115/" ]
Not yet. "The only solution right now is to show a message to user to go to Settings and enable feature before some of the events are started (such as deviceorientation). There is an API coming to request permission per site, but the WebKit team didn’t have time to get it done for this release. Chris Dumez from Apple...
theres no official way yet, but you can probably do something like this (user will still have to manually enable it but at least you can tell them whats going on): <https://github.com/w3c/deviceorientation/issues/57>
2,633,532
I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that ...
2010/04/13
[ "https://Stackoverflow.com/questions/2633532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/256828/" ]
It should always be the root controller according to Apple. > > The split view controller’s view > should always be installed as the root > view of your application window. You > should never present a split view > inside of a navigation or tab bar > interface. > > >
Check out the [Multiple Detail Views](https://developer.apple.com/library/content/samplecode/MultipleDetailViews/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009775 "Multiple Detail Views") sample app on Apple's Documentation, this could give you a good idea on how to deal with navigation structure and how to displ...
2,633,532
I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that ...
2010/04/13
[ "https://Stackoverflow.com/questions/2633532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/256828/" ]
It should always be the root controller according to Apple. > > The split view controller’s view > should always be installed as the root > view of your application window. You > should never present a split view > inside of a navigation or tab bar > interface. > > >
You can use a UISplitViewController in a UITabBarController without any problems. I have not attempted to push a UISplitViewController into an UINavigationController however.
2,633,532
I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that ...
2010/04/13
[ "https://Stackoverflow.com/questions/2633532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/256828/" ]
It should always be the root controller according to Apple. > > The split view controller’s view > should always be installed as the root > view of your application window. You > should never present a split view > inside of a navigation or tab bar > interface. > > >
(At least) with iOS 8 (which runs on any ipad except the first one) it's possible to use a "present modally"-segue to display a splitviewcontroller. Drawback is that an existing navigation bar isn't displayed.
37,688,564
Version: Rails 5b3 I have a folder located at `<rails root>/app/liquid`. Inside that are more directories and `.rb` files. All the `.rb` files are simple classes with no includes or requires It's very inconvenient to have to restart the server each time I make a change to a file in this directory, so I want these cl...
2016/06/07
[ "https://Stackoverflow.com/questions/37688564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5665799/" ]
I solved this by adding `config.autoload_paths += Dir[ Rails.root.join('app', 'liquid', '**/',) ]` to application.rb
Try toggling liquid's cache\_classes configuration so that classes are not cached in your development environment: ``` Liquid.cache_classes = false ``` source: <https://github.com/Shopify/liquid/wiki/liquid-for-programmers#caching-of-classes>
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
**Yes**, but the orbit will drift over time. This may be possible if and only if there are no other (major) planets in your solar system. They won't be tidally locked, but the smaller one might be mostly in the shade. Consider a [Halo orbit](https://en.wikipedia.org/wiki/Halo_orbit) or [Lissajous orbit](https://en.wik...
There is a non-orbital solution as well. We've not got the technology to build it but 40k is considerably more advanced in many ways. Have the larger planet orbiting at it's natural orbit. Have the smaller planet orbiting in the shadow of the larger one further away from the larger planet. As already discussed there...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
**Yes**, but the orbit will drift over time. This may be possible if and only if there are no other (major) planets in your solar system. They won't be tidally locked, but the smaller one might be mostly in the shade. Consider a [Halo orbit](https://en.wikipedia.org/wiki/Halo_orbit) or [Lissajous orbit](https://en.wik...
This sort of configuration may be possible if the smaller planet is located at the L1 or L2 [Lagrange point](https://en.wikipedia.org/wiki/Lagrangian_point) of the larger. I doubt this would work out in real life (and haven't done the math to determine how close or far apart they'd need to be if it did), but, fortunate...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
Yes, but only for a few moments or hours before they crash into each other. In the absence of a mutual orbit, there is no force to prevent their mutual gravitational attraction from pulling them into each other, and this will happen very quickly.
This sort of configuration may be possible if the smaller planet is located at the L1 or L2 [Lagrange point](https://en.wikipedia.org/wiki/Lagrangian_point) of the larger. I doubt this would work out in real life (and haven't done the math to determine how close or far apart they'd need to be if it did), but, fortunate...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
This sort of configuration may be possible if the smaller planet is located at the L1 or L2 [Lagrange point](https://en.wikipedia.org/wiki/Lagrangian_point) of the larger. I doubt this would work out in real life (and haven't done the math to determine how close or far apart they'd need to be if it did), but, fortunate...
There is a non-orbital solution as well. We've not got the technology to build it but 40k is considerably more advanced in many ways. Have the larger planet orbiting at it's natural orbit. Have the smaller planet orbiting in the shadow of the larger one further away from the larger planet. As already discussed there...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
**TL;DR** It's not possible. **Ye Be Warned** Really bad MSPaint skills were involved in the making of this answer. Many artists turned over in their graves. Also, the real physics are a bit more complex, but I'm not a real astronomer so this will have to do for a first-order approximation. **What is Tidal Lock...
Yes, but only for a few moments or hours before they crash into each other. In the absence of a mutual orbit, there is no force to prevent their mutual gravitational attraction from pulling them into each other, and this will happen very quickly.
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
Yes, but only for a few moments or hours before they crash into each other. In the absence of a mutual orbit, there is no force to prevent their mutual gravitational attraction from pulling them into each other, and this will happen very quickly.
If the two planets are close to the same size, it would be possible to give them each a relative velocity such that neither is technically orbiting the other, but rather both are orbiting a point in space between the two. Such an orbit could easily be stable as long as there aren't too many other large bodies passing b...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
**TL;DR** It's not possible. **Ye Be Warned** Really bad MSPaint skills were involved in the making of this answer. Many artists turned over in their graves. Also, the real physics are a bit more complex, but I'm not a real astronomer so this will have to do for a first-order approximation. **What is Tidal Lock...
If the two planets are close to the same size, it would be possible to give them each a relative velocity such that neither is technically orbiting the other, but rather both are orbiting a point in space between the two. Such an orbit could easily be stable as long as there aren't too many other large bodies passing b...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
**TL;DR** It's not possible. **Ye Be Warned** Really bad MSPaint skills were involved in the making of this answer. Many artists turned over in their graves. Also, the real physics are a bit more complex, but I'm not a real astronomer so this will have to do for a first-order approximation. **What is Tidal Lock...
There is a non-orbital solution as well. We've not got the technology to build it but 40k is considerably more advanced in many ways. Have the larger planet orbiting at it's natural orbit. Have the smaller planet orbiting in the shadow of the larger one further away from the larger planet. As already discussed there...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
This sort of configuration may be possible if the smaller planet is located at the L1 or L2 [Lagrange point](https://en.wikipedia.org/wiki/Lagrangian_point) of the larger. I doubt this would work out in real life (and haven't done the math to determine how close or far apart they'd need to be if it did), but, fortunate...
If the two planets are close to the same size, it would be possible to give them each a relative velocity such that neither is technically orbiting the other, but rather both are orbiting a point in space between the two. Such an orbit could easily be stable as long as there aren't too many other large bodies passing b...
36,822
What I want to know is if it is possible for two planets to be close enough together to tidally lock each other (as in both planets are tidally locked), but in such a manner that they don't orbit each other. More specifically, could this happen in such a manner that the one further from their star would be perpetually ...
2016/02/26
[ "https://worldbuilding.stackexchange.com/questions/36822", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/18538/" ]
Yes, but only for a few moments or hours before they crash into each other. In the absence of a mutual orbit, there is no force to prevent their mutual gravitational attraction from pulling them into each other, and this will happen very quickly.
There is a non-orbital solution as well. We've not got the technology to build it but 40k is considerably more advanced in many ways. Have the larger planet orbiting at it's natural orbit. Have the smaller planet orbiting in the shadow of the larger one further away from the larger planet. As already discussed there...
13,551,772
Fairly ignorant about efficient animation, so all help appreciated! I'm using libgdx in java, and have 128px water tiles in my game that need to be animated. I currently am using 19 frames for the animation, but I have changed that number from 2-19 and I'm going from over 60fps (capped at 60) to 20fps. The only thing...
2012/11/25
[ "https://Stackoverflow.com/questions/13551772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1291820/" ]
Use a profiler to find out where the time is being spent. You can either use a profiling tool, or just litter your code with timestamp (I used java.lang.System.nanotime()) checks, and keep a histogram to print regularly or print "outliers" or even draw the results on screen. While you or I may be able to guess where t...
The answer to use a profiler is good advice. However, if you are not already packing your textures then it is a good idea to do so, as that will reduce the number of textures that are in use, which in turn will reduce the number of (relatively expensive) texture switches. Given that you have square textures you could j...
13,769,378
Is is possible to call functions on (send messages to) an object if the functions are stored in a variable as a lambda? Say I have an array like `%w(a b c)` I can then chain methods like: ``` %w(a b c).reverse.map(&:upcase) # => ["C", "B", "A"] ``` Is it possible to extract the chained method calls to a variable ...
2012/12/07
[ "https://Stackoverflow.com/questions/13769378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167614/" ]
I see at least two approaches: 1) You seem to like to write lambdas with an implicit receiver (I wouldn't recommend it, `self` obviously changes), you have [instance\_exec](http://www.ruby-doc.org/core-1.9.3/BasicObject.html#method-i-instance_exec) for that: ``` transform = -> { reverse.map(&:upcase) } ["a", "b", "c"...
``` class Array def transform; reverse.map(&:upcase) end end %w(a b c).send(:transform) ```
69,438,240
I am trying to render two different components based on the click event that gets passed the text of the button in React. I know how to do it in the function, but how do I render the DOM element based on the click event? so far I have: ``` const Popup: React.FunctionComponent = () => { const [visible, setVisible]...
2021/10/04
[ "https://Stackoverflow.com/questions/69438240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4323982/" ]
This is fairly straightforward `join` logic: Query ===== ``` declare @t table(Class int,Teacher varchar(10),Subject varchar(10)); insert into @t values (1,'Adam','English') ,(2,'Bill','Maths') ,(3,'Carl','Maths') ,(4,'Dave','Science') ,(5,'Evan','Maths') ; select c.Class ,s.Teacher ,s.Subject from @t as...
**Use below code** ``` SELECT TBL.CLASS,ISNULL(X.TEACHER,TBL.TEACHER) TEACHER,TBL.SUBJECTS FROM TeachingSets as TBL LEFT JOIN ( SELECT * FROM TeachingSets WHERE SUBJECTS='MATHS' )X ON TBL.SUBJECTS=X.SUBJECTS ```
16,580,381
I have a large number of files to be renamed to a fixed pattern on my Windows 8 computer. I am looking for a way so that I can rename the files in a quick way, any way: like any software that does it or any command on command window. Following is what I need to do: Original file name: Body Begger Power.docx.htm Need ...
2013/05/16
[ "https://Stackoverflow.com/questions/16580381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459573/" ]
From the root directory you can try this: `Get-ChildItem -Force -Recurse | Move-Item -Destination {$_.FullName.ToLower() -replace ' ', '-'}` I don't see any pattern for removing the extension. If all files are docx.html and you want them changed to html, you could simply do another replace like this: `Get-ChildItem ...
``` for /r %i in (.) do if exist "%i\body begger power.docx.htm" ECHO ren "%i\body begger power.docx.htm" body-begger-power.html ``` from the prompt will scan the tree from `.` (the current directory - or substitute the directoryname from which you want to start). This will simply ECHO the filenames detected to the s...
37,000,387
when I set a point light at a `THREE.BoxGeometry` object it looks like this: [THREE.BoxGeometry with point light](http://i.stack.imgur.com/yLae1.png) ``` var light = new THREE.PointLight (0xffffff, 1, 100); light.position.set (10, 10, 10); scene.add (light); var geometry = new THREE.BoxGeometry (1, 1, 1); var material...
2016/05/03
[ "https://Stackoverflow.com/questions/37000387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6284888/" ]
Since the specs define the `id` attribute as unique per document, you should refactor the IDs or use an alternative, e.g. embedding via `img` or `object` tag. ``` <img src="my.svg" height="100" alt="alternative Text"> <object type="image/svg+xml" data="my.svg" width="100" height="100"></object> ```
You can't write multiple id attribute in your html. Id attribute must be unique in html document. > > The id attribute specifies its element's unique identifier (ID). The value must be unique amongst all the IDs in the element's. > > > <https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#the-id-attribute> > ...
37,000,387
when I set a point light at a `THREE.BoxGeometry` object it looks like this: [THREE.BoxGeometry with point light](http://i.stack.imgur.com/yLae1.png) ``` var light = new THREE.PointLight (0xffffff, 1, 100); light.position.set (10, 10, 10); scene.add (light); var geometry = new THREE.BoxGeometry (1, 1, 1); var material...
2016/05/03
[ "https://Stackoverflow.com/questions/37000387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6284888/" ]
If you need the SVGs to be inline you should consider using an SVG injector, which changes the IDs to unique strings when inserting the SVGs into the HTML document [SVGInject](https://github.com/iconfu/svg-inject) adds a random string to the end of the ID for elements defined in the `<defs>` section. For example, `svg...
You can't write multiple id attribute in your html. Id attribute must be unique in html document. > > The id attribute specifies its element's unique identifier (ID). The value must be unique amongst all the IDs in the element's. > > > <https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#the-id-attribute> > ...
37,000,387
when I set a point light at a `THREE.BoxGeometry` object it looks like this: [THREE.BoxGeometry with point light](http://i.stack.imgur.com/yLae1.png) ``` var light = new THREE.PointLight (0xffffff, 1, 100); light.position.set (10, 10, 10); scene.add (light); var geometry = new THREE.BoxGeometry (1, 1, 1); var material...
2016/05/03
[ "https://Stackoverflow.com/questions/37000387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6284888/" ]
Since the specs define the `id` attribute as unique per document, you should refactor the IDs or use an alternative, e.g. embedding via `img` or `object` tag. ``` <img src="my.svg" height="100" alt="alternative Text"> <object type="image/svg+xml" data="my.svg" width="100" height="100"></object> ```
If you need the SVGs to be inline you should consider using an SVG injector, which changes the IDs to unique strings when inserting the SVGs into the HTML document [SVGInject](https://github.com/iconfu/svg-inject) adds a random string to the end of the ID for elements defined in the `<defs>` section. For example, `svg...
367,444
I forgot my apple id and email that associated with this apple id, but i know the password of my apple id. how can i find my apple id? note that this apple id doesn't set on any other devices.
2019/08/24
[ "https://apple.stackexchange.com/questions/367444", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/343243/" ]
You can’t typically brute force a missing email through <https://forgot.apple.com> website for several reasons. If I understand your question correctly, to rephrase the situation, you have the pin code to get to your voicemail but you forgot the telephone number. It may not make sense to start dialing every number poss...
You can go through Apple's "Find my Apple ID" process at <https://iforgot.apple.com/appleid#!&section=appleid> Hope this helps!
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
Prakhar, this is really the hardest kind of question. There are so many things that could make an OS run badly, that it would be impossible to give you a direct answer. For starters, you could try: cold boot, and as soon as you log in, open GEdit (or any text editor you might use), open /var/log/syslog and copy it on ...
One of possible solutions: Install previous Ubuntu version (for instance, starting from 9.10) then gradually upgrade to the latest one. In many cases it works fine. Anyway you will see how perfomance is changing from previous version to next one.
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
Prakhar, this is really the hardest kind of question. There are so many things that could make an OS run badly, that it would be impossible to give you a direct answer. For starters, you could try: cold boot, and as soon as you log in, open GEdit (or any text editor you might use), open /var/log/syslog and copy it on ...
It is most likely due to a bad VGA driver. You can easily confirm this by selecting Ubuntu 2D before you log in by pressing the button next to the password field. If that gives you a fast desktop, then you need to get some drivers for your VGA. If you need help doing that, you should open a new question.
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
Prakhar, this is really the hardest kind of question. There are so many things that could make an OS run badly, that it would be impossible to give you a direct answer. For starters, you could try: cold boot, and as soon as you log in, open GEdit (or any text editor you might use), open /var/log/syslog and copy it on ...
Maybe there is a problem with your ACPI. y'know, i installed Ubuntu on My computer and my friend's. we have **exactly the same hardware** on **different Motherboards**. It didn't installed normally on my pc, i used the '*ACPI Workarounds*' option to make it go, but on her PC everything was okay. Ubuntu runs perfectly s...
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
I suspect it is the graphics card slowing you down (it is a low end model) - what driver are you using for the card? You should install the Nvidia restricted driver for the best possible performance. Also you mention no issues on Win7 - does it work on the aero interface OK?
One of possible solutions: Install previous Ubuntu version (for instance, starting from 9.10) then gradually upgrade to the latest one. In many cases it works fine. Anyway you will see how perfomance is changing from previous version to next one.
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
I suspect it is the graphics card slowing you down (it is a low end model) - what driver are you using for the card? You should install the Nvidia restricted driver for the best possible performance. Also you mention no issues on Win7 - does it work on the aero interface OK?
It is most likely due to a bad VGA driver. You can easily confirm this by selecting Ubuntu 2D before you log in by pressing the button next to the password field. If that gives you a fast desktop, then you need to get some drivers for your VGA. If you need help doing that, you should open a new question.
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
I suspect it is the graphics card slowing you down (it is a low end model) - what driver are you using for the card? You should install the Nvidia restricted driver for the best possible performance. Also you mention no issues on Win7 - does it work on the aero interface OK?
Maybe there is a problem with your ACPI. y'know, i installed Ubuntu on My computer and my friend's. we have **exactly the same hardware** on **different Motherboards**. It didn't installed normally on my pc, i used the '*ACPI Workarounds*' option to make it go, but on her PC everything was okay. Ubuntu runs perfectly s...
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
One of possible solutions: Install previous Ubuntu version (for instance, starting from 9.10) then gradually upgrade to the latest one. In many cases it works fine. Anyway you will see how perfomance is changing from previous version to next one.
Maybe there is a problem with your ACPI. y'know, i installed Ubuntu on My computer and my friend's. we have **exactly the same hardware** on **different Motherboards**. It didn't installed normally on my pc, i used the '*ACPI Workarounds*' option to make it go, but on her PC everything was okay. Ubuntu runs perfectly s...
18,108
I'm running ubuntu lucid lynx on the following config: * 2GB DDR2 Ram * 1.50Ghz Core2Duo * Nvidia 128MB 8400GS GFX Card Due to some reason the entire operating system feels laggy. The window manager, firefox and rhythmbox and almost all apps feel a bit slow. There is almost a second time lag between the time I press ...
2010/12/19
[ "https://askubuntu.com/questions/18108", "https://askubuntu.com", "https://askubuntu.com/users/6956/" ]
It is most likely due to a bad VGA driver. You can easily confirm this by selecting Ubuntu 2D before you log in by pressing the button next to the password field. If that gives you a fast desktop, then you need to get some drivers for your VGA. If you need help doing that, you should open a new question.
Maybe there is a problem with your ACPI. y'know, i installed Ubuntu on My computer and my friend's. we have **exactly the same hardware** on **different Motherboards**. It didn't installed normally on my pc, i used the '*ACPI Workarounds*' option to make it go, but on her PC everything was okay. Ubuntu runs perfectly s...
60,908,298
``` if session['dp'] := current_user.avatar : ^ SyntaxError: cannot use assignment expressions with subscript ``` Why Python forbids this use of walrus operator?
2020/03/28
[ "https://Stackoverflow.com/questions/60908298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5033247/" ]
Because, as the alternative name (named expressions) suggests, [the left hand side of the walrus operator is to be a `NAME`](https://www.python.org/dev/peps/pep-0572/). Therefore, by definition such expressions as noted in your question as well as, for instance, function calls are not allowed to be assigned in this for...
There is some justification for the decision to disallow more complex assignments in assignment expressions given on the python-dev mailing list. In particular, from Chris Angelico: > > Assignment to arbitrary targets > would also mean permitting iterable unpacking, which is not desired > ("x, y := 3, 4"??), and the...
5,527,223
I would like to do some text conversion, such as reading in from a text file: ``` CONTENTS 1. INTRODUCTION 1.1 The Linear Programming Problem 2 1.2 Examples of Linear Problems 7 ``` and writing to another text file: ``` ("CONTENTS" "#") ("1. INTRODUCTION" "#") ("1.1 The Linear Programming Problem 2" "#11") ("1....
2011/04/03
[ "https://Stackoverflow.com/questions/5527223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/156458/" ]
With your regex you are searching for a line that ends with a number (and maybe trailing whitespace). You could make the number optional: `^(.+?(\d+)?) *$` and make sure your group 2 reference inside `zaa` can handle an empty string. ``` def zaa(mat): return '("%s" "#%s")' % (mat.group(1), (str(int(mat.group(2))+...
> > But in my code, its usage is `pat.sub(zaa,line)`, which seems to me not consistent to the quoted description. > > > The difference is in the `sub` call; the documentation you quote is to the `re.sub` *function*, but what is being used here is the `sub` *method* of a compiled [regular expression object](http://...
5,527,223
I would like to do some text conversion, such as reading in from a text file: ``` CONTENTS 1. INTRODUCTION 1.1 The Linear Programming Problem 2 1.2 Examples of Linear Problems 7 ``` and writing to another text file: ``` ("CONTENTS" "#") ("1. INTRODUCTION" "#") ("1.1 The Linear Programming Problem 2" "#11") ("1....
2011/04/03
[ "https://Stackoverflow.com/questions/5527223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/156458/" ]
This tested script generates the desired output: ```py import re infilename = "infile.txt" outfilename = "outfile.txt" infile = open(infilename) outfile = open(outfilename, "w") pat = re.compile('^(.+?(\d*)) *$',re.M) def zaa(mat): if mat.group(2): return '("%s" "#%s")' % (mat.group(1),str(int(mat.group(...
With your regex you are searching for a line that ends with a number (and maybe trailing whitespace). You could make the number optional: `^(.+?(\d+)?) *$` and make sure your group 2 reference inside `zaa` can handle an empty string. ``` def zaa(mat): return '("%s" "#%s")' % (mat.group(1), (str(int(mat.group(2))+...
5,527,223
I would like to do some text conversion, such as reading in from a text file: ``` CONTENTS 1. INTRODUCTION 1.1 The Linear Programming Problem 2 1.2 Examples of Linear Problems 7 ``` and writing to another text file: ``` ("CONTENTS" "#") ("1. INTRODUCTION" "#") ("1.1 The Linear Programming Problem 2" "#11") ("1....
2011/04/03
[ "https://Stackoverflow.com/questions/5527223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/156458/" ]
This tested script generates the desired output: ```py import re infilename = "infile.txt" outfilename = "outfile.txt" infile = open(infilename) outfile = open(outfilename, "w") pat = re.compile('^(.+?(\d*)) *$',re.M) def zaa(mat): if mat.group(2): return '("%s" "#%s")' % (mat.group(1),str(int(mat.group(...
> > But in my code, its usage is `pat.sub(zaa,line)`, which seems to me not consistent to the quoted description. > > > The difference is in the `sub` call; the documentation you quote is to the `re.sub` *function*, but what is being used here is the `sub` *method* of a compiled [regular expression object](http://...
445,995
I had a program `msfeedssync.exe` as a scheduled task on my machine. Wondering what is this for and how did it get scheduled on my Windows 7 machine?
2012/07/07
[ "https://superuser.com/questions/445995", "https://superuser.com", "https://superuser.com/users/28114/" ]
What is Msfeedssync.exe: It is the Microsoft Feeds Synchronization task found on PCs with Internet Explorer and which automatic RSS Feeds synchronization turned ON. This task starts up at the intervals specified in Internet Explorer and checks for updates to your RSS feeds. Once it has updated your RSS feeds, it termi...
It is supposed to be the RSS feed updater for IE / whatever you're using RSS feeds for. There is also a little virus going around camoflaging msfeedssync.exe, so make sure that the scheduled task resides in a folder such as /system32. If you're not using any feeds, it's okay to disable this task.
59,359,758
My dirctory is `D:\\Main`. I want to create a file named `file.js` in the directory only i.e. `D:\\Main`. I use the code `type nul > file.js`. It creates the file but also displayes an error message saying that `nul` folder wasn't found. Am I doing something wrong? How do I improve the code to stop the error message?
2019/12/16
[ "https://Stackoverflow.com/questions/59359758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12546477/" ]
What you attempted to use is valid for CMD.EXE, but in PowerShell, `type` is an alias for `Get-Content`, which expects a valid device or file. However, the null device is *not* available in PowerShell, although a *variable* `$null` will return the desired value. You should instead use ``` New-Item -Path . -Name "file....
I didn't get a satisfactory answer so I searched the command list for PowerShell on Microsoft's website. Use ``` Set-Content -path D:\\Main\file.js ``` Then it will ask for values \*(e.g. [-Value0], [-Value1], ...)." Values are what what you want to type in the file e.g. [-Value0] will contain what will be in the ...