qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
48,282,608
``` $con=mysqli_connect($localhost,$username,$password,'db'); $query = 'SELECT `SN` FROM `list` WHERE `Floor` LIKE "LP60" AND `type`LIKE "pc"'; $result = mysqli_query($con,$query) or die(mysqli_error()); foreach ($result as $SN) { $get = mysqli_query($con,'SELECT * FROM pc WHERE pcSN LIKE '.$SN.'ORD...
2018/01/16
[ "https://Stackoverflow.com/questions/48282608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8080663/" ]
You are trying to access the values in an associative array using numeric indexes. Use the column names instead. `mysqli_fetch_assoc()` returns an associative array. Instead of this, ``` $get_row[1] ``` Try to use this, ``` $get_row['column_name'] ``` **Edit** As per your comment about still getting an error tr...
Instead of using ``` $get=mysqli_fetch_assoc... ``` Use ``` $get=mysqli_fetch_array... ``` Then you'll be able to get the data like this: ``` echo $get[0]; ```
29,163,423
``` program int main() { int a=0xabcd; char *p=&a; while(p) { if(*p=='c') { printf("i got %c\n",*p); return; } p++; } } ``` 1)why i got always an answer like **"i got c"**. 2)no matter how many times i execute this program, why i got **%...
2015/03/20
[ "https://Stackoverflow.com/questions/29163423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352695/" ]
* `int a=0xabcd` on a 32 bit machine will give you `0x0000abcd`. If you try to read the contents of this integer as a character, you'll either get 0x00 or 0xcd, depending on endianess. Neither is a printable ASCII character. This doesn't make any sense. * `while(p)` means "while p points at an address which is not zero...
1) You get `i got c` because your program has a pointer `p` that points on each bytes of 0xabcd in sequence and beyond ! At some point, the pointer will point on the byte 0x63 which is 'c'. Since this is the `if` condition, the print statement prints the char pointed by *p* and you see the message `i got c`. 2) becau...
29,163,423
``` program int main() { int a=0xabcd; char *p=&a; while(p) { if(*p=='c') { printf("i got %c\n",*p); return; } p++; } } ``` 1)why i got always an answer like **"i got c"**. 2)no matter how many times i execute this program, why i got **%...
2015/03/20
[ "https://Stackoverflow.com/questions/29163423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352695/" ]
* `int a=0xabcd` on a 32 bit machine will give you `0x0000abcd`. If you try to read the contents of this integer as a character, you'll either get 0x00 or 0xcd, depending on endianess. Neither is a printable ASCII character. This doesn't make any sense. * `while(p)` means "while p points at an address which is not zero...
Apart from the nice answer by Mr. **@Lundin**, just to clarify the logic for the *print* s, > > 1)why i got always an answer like "i got c". > > > Because, you wrote the code to do so. Keeping away the programmatic errors, if you check the logic, you wrote the code so that the `printf()` will only be executed if ...
29,163,423
``` program int main() { int a=0xabcd; char *p=&a; while(p) { if(*p=='c') { printf("i got %c\n",*p); return; } p++; } } ``` 1)why i got always an answer like **"i got c"**. 2)no matter how many times i execute this program, why i got **%...
2015/03/20
[ "https://Stackoverflow.com/questions/29163423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352695/" ]
* `int a=0xabcd` on a 32 bit machine will give you `0x0000abcd`. If you try to read the contents of this integer as a character, you'll either get 0x00 or 0xcd, depending on endianess. Neither is a printable ASCII character. This doesn't make any sense. * `while(p)` means "while p points at an address which is not zero...
You don't seem to know what you're doing. Closest working exaple would look like this: ``` #include <stdio.h> int main() { int a[2] = {0x0a0b0c0d, 0}; char *p = (char *) a; while (*p) { if (*p == 0x0c) { printf("i got c\n"); return 0; } p++; ...
29,163,423
``` program int main() { int a=0xabcd; char *p=&a; while(p) { if(*p=='c') { printf("i got %c\n",*p); return; } p++; } } ``` 1)why i got always an answer like **"i got c"**. 2)no matter how many times i execute this program, why i got **%...
2015/03/20
[ "https://Stackoverflow.com/questions/29163423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352695/" ]
1) You get `i got c` because your program has a pointer `p` that points on each bytes of 0xabcd in sequence and beyond ! At some point, the pointer will point on the byte 0x63 which is 'c'. Since this is the `if` condition, the print statement prints the char pointed by *p* and you see the message `i got c`. 2) becau...
You don't seem to know what you're doing. Closest working exaple would look like this: ``` #include <stdio.h> int main() { int a[2] = {0x0a0b0c0d, 0}; char *p = (char *) a; while (*p) { if (*p == 0x0c) { printf("i got c\n"); return 0; } p++; ...
29,163,423
``` program int main() { int a=0xabcd; char *p=&a; while(p) { if(*p=='c') { printf("i got %c\n",*p); return; } p++; } } ``` 1)why i got always an answer like **"i got c"**. 2)no matter how many times i execute this program, why i got **%...
2015/03/20
[ "https://Stackoverflow.com/questions/29163423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352695/" ]
Apart from the nice answer by Mr. **@Lundin**, just to clarify the logic for the *print* s, > > 1)why i got always an answer like "i got c". > > > Because, you wrote the code to do so. Keeping away the programmatic errors, if you check the logic, you wrote the code so that the `printf()` will only be executed if ...
You don't seem to know what you're doing. Closest working exaple would look like this: ``` #include <stdio.h> int main() { int a[2] = {0x0a0b0c0d, 0}; char *p = (char *) a; while (*p) { if (*p == 0x0c) { printf("i got c\n"); return 0; } p++; ...
21,566,596
I'm to write a script which will grab all the text from a file (`/tmp/pidfile.txt`) which is just a pid number, and then store that as a variable (say `pidvar`) or something and execute the following: ``` kill -2 pidvar ``` Seems simple enough I just don't know how to grab the pid from the .txt file. I have python ...
2014/02/05
[ "https://Stackoverflow.com/questions/21566596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3191163/" ]
The literal answer to your question (using a bash extension to be slightly more efficient) would be ``` kill -2 "$(</tmp/pidfile.txt)" ``` ...or, to be compatible with POSIX sh but slightly less efficient... ``` kill -2 "$(cat /tmp/pidfile.txt)" ``` ...but don't do it either of those ways. --- pidfiles are pron...
It is generally easier to ask uwsgi to kill itself. You can do this by using the "master-fifo" option in your config, and then send a "q" to the fifo. This is described here: <http://uwsgi-docs.readthedocs.org/en/latest/MasterFIFO.html>.
48,013,933
New to using API's (and kotlin for that matter) and I'm having some trouble figuring out how to pull data from an API into model objects and was hoping someone could point me in the right direction. Sample code below. ``` val request = Request.Builder().header("X-Mashape-Key", keyVal).url(url).build() //make r...
2017/12/28
[ "https://Stackoverflow.com/questions/48013933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7280906/" ]
It seems the server is not providing the correct data format `vue-tables-2` is requiring as stated in the docs: > > You need to return a JSON object with two properties: > > > * data : array - An array of row objects with identical keys. > * count: number - Total count before limit. > > > If you can't change w...
> > If you can't change what the server returns, you probably have to use > the client table where you can grab the data with axios. > > > Not necessarily. You can stick with the server component and use the `requestAdapter` and `responseAdapter` options to mould the request and the response to the expected forma...
9,821,106
I've been trying to create a new project using the files provided at [ActionBarSherlock](http://actionbarsherlock.com). Here is what I did, step by step: 1. Create new Android Project 2. Create Project from Existing Source 3. Locate the /library folder in the ActionBarSherlock directory 4. Choose 4.03 as SDK target. 5...
2012/03/22
[ "https://Stackoverflow.com/questions/9821106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1126097/" ]
Go to your `project properties` (right click on your project) > `Java Compiler` and switch the compliance level from 1.5 to 1.6. I struggled quite a few hours with this as well.. ![ActionBar Sherlock compliance level](https://i.stack.imgur.com/dzU9B.png)
Check your project dependencies.
70,245
> > I am a continent's outermost point, > > an island pair by a rough strait made disjoint. > > Once held by natives, a land owned by right, > > my population is now mostly white. > > > Named after compass points, "new" just in name, > > a nearby sea's named for a Dutch traveler's fame. > > Cold...
2018/08/21
[ "https://puzzling.stackexchange.com/questions/70245", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
> > New Zealand? > > > I am a continent's outermost point, > > Although not part of Austrlian continent, New Zealand is part of the sumberged Zealandia continent > > > an island pair by a rough strait made disjoint. > > It consists of two islands > > > Once held by natives, a land owned by right, ...
I just saw this and thought I’d have a guess Is it > > Newfoundland? > > > I am a continents outermost point > > North America > > > New just in name > > NEWfoundland > > >
70,245
> > I am a continent's outermost point, > > an island pair by a rough strait made disjoint. > > Once held by natives, a land owned by right, > > my population is now mostly white. > > > Named after compass points, "new" just in name, > > a nearby sea's named for a Dutch traveler's fame. > > Cold...
2018/08/21
[ "https://puzzling.stackexchange.com/questions/70245", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
I think you're > > New South Wales > > > I am a continent's outermost point, > > Easternmost point of Australia > > > an island pair by a rough strait made disjoint. > > Australia and Tasmania, separated by the Bass Strait? > > > Once held by natives, a land owned by right, > > Used to be owned ...
I just saw this and thought I’d have a guess Is it > > Newfoundland? > > > I am a continents outermost point > > North America > > > New just in name > > NEWfoundland > > >
70,245
> > I am a continent's outermost point, > > an island pair by a rough strait made disjoint. > > Once held by natives, a land owned by right, > > my population is now mostly white. > > > Named after compass points, "new" just in name, > > a nearby sea's named for a Dutch traveler's fame. > > Cold...
2018/08/21
[ "https://puzzling.stackexchange.com/questions/70245", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
I thought you might be > > Novaya Zemlya, maybe? > > > I am a continent's outermost point, > > Before the Soviet's annexation of Frans Jozefland, this was the Northernmost point of Asia/Europe > > > an island pair by a rough strait made disjoint. > > Novaya Zemlya consists of two islands, separated by ...
I just saw this and thought I’d have a guess Is it > > Newfoundland? > > > I am a continents outermost point > > North America > > > New just in name > > NEWfoundland > > >
70,245
> > I am a continent's outermost point, > > an island pair by a rough strait made disjoint. > > Once held by natives, a land owned by right, > > my population is now mostly white. > > > Named after compass points, "new" just in name, > > a nearby sea's named for a Dutch traveler's fame. > > Cold...
2018/08/21
[ "https://puzzling.stackexchange.com/questions/70245", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
I thought you might be > > Novaya Zemlya, maybe? > > > I am a continent's outermost point, > > Before the Soviet's annexation of Frans Jozefland, this was the Northernmost point of Asia/Europe > > > an island pair by a rough strait made disjoint. > > Novaya Zemlya consists of two islands, separated by ...
> > New Zealand? > > > I am a continent's outermost point, > > Although not part of Austrlian continent, New Zealand is part of the sumberged Zealandia continent > > > an island pair by a rough strait made disjoint. > > It consists of two islands > > > Once held by natives, a land owned by right, ...
70,245
> > I am a continent's outermost point, > > an island pair by a rough strait made disjoint. > > Once held by natives, a land owned by right, > > my population is now mostly white. > > > Named after compass points, "new" just in name, > > a nearby sea's named for a Dutch traveler's fame. > > Cold...
2018/08/21
[ "https://puzzling.stackexchange.com/questions/70245", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
I thought you might be > > Novaya Zemlya, maybe? > > > I am a continent's outermost point, > > Before the Soviet's annexation of Frans Jozefland, this was the Northernmost point of Asia/Europe > > > an island pair by a rough strait made disjoint. > > Novaya Zemlya consists of two islands, separated by ...
I think you're > > New South Wales > > > I am a continent's outermost point, > > Easternmost point of Australia > > > an island pair by a rough strait made disjoint. > > Australia and Tasmania, separated by the Bass Strait? > > > Once held by natives, a land owned by right, > > Used to be owned ...
153,182
I am creating LSDS modal to create a Task so I have an attribute of "Task" in component and using to bind the fields of Task. When I run lightning component using Lightning Application then it shows the task fields as Input but when I add my component in Lightning Experience by putting component on Home component then ...
2016/12/20
[ "https://salesforce.stackexchange.com/questions/153182", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/11642/" ]
However, you can create a visualforce case detail page and then customize the case comment section according to your business requirement. Below is the VF component for the New Case Comment: ``` <apex:componentBody > <apex:form > <apex:pageBlock title="Case Comments" > <apex:pageBlockButtons ...
Unfortunately you cannot override new case comment button. Please upvote this idea so that salesforce allow this feature soon. <https://success.salesforce.com/ideaview?id=08730000000IBFrAAO> Or else you can create a new case comment custom object and override the button with vf page.
20,711,144
Suppose there are three classes: Grandfather, Father, and Son Assume the following conditions: * Father extends Grandfather * Son extends Father Does Son inherit all members in Grandfather or just the members in Father?
2013/12/20
[ "https://Stackoverflow.com/questions/20711144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865175/" ]
`Son` will inherit members from `Father`, but since `Father`'s members include those it inherited from `Grandfather`, `Son` will also have them. > > Unless redeclared in the derived class, members of a base class are also considered to be members of the derived class. > > >
Its obvious that Son inherit all members in Grandfather too.
20,711,144
Suppose there are three classes: Grandfather, Father, and Son Assume the following conditions: * Father extends Grandfather * Son extends Father Does Son inherit all members in Grandfather or just the members in Father?
2013/12/20
[ "https://Stackoverflow.com/questions/20711144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865175/" ]
Its obvious that Son inherit all members in Grandfather too.
A child will inherit all of the parents members and functions. This is also recursive. The only thing you have to worry about it is its accessibility. The parent might make some functions or members private and so it will be out of the reach of the child. You can read more about it [here](http://en.wikipedia.org/wiki...
20,711,144
Suppose there are three classes: Grandfather, Father, and Son Assume the following conditions: * Father extends Grandfather * Son extends Father Does Son inherit all members in Grandfather or just the members in Father?
2013/12/20
[ "https://Stackoverflow.com/questions/20711144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865175/" ]
`Son` will inherit members from `Father`, but since `Father`'s members include those it inherited from `Grandfather`, `Son` will also have them. > > Unless redeclared in the derived class, members of a base class are also considered to be members of the derived class. > > >
A child will inherit all of the parents members and functions. This is also recursive. The only thing you have to worry about it is its accessibility. The parent might make some functions or members private and so it will be out of the reach of the child. You can read more about it [here](http://en.wikipedia.org/wiki...
26,725,278
The input stream I am parsing with [Jackson](http://jackson.codehaus.org) contains latitude and longitude values such as here: ```json { "name": "product 23", "latitude": "52,48264", "longitude": "13,31822" } ``` For some reason the server uses **commas** as the decimal separator which produces an `Inval...
2014/11/03
[ "https://Stackoverflow.com/questions/26725278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356895/" ]
I came up with the following solution: ``` public class FlexibleFloatDeserializer extends JsonDeserializer<Float> { @Override public Float deserialize(JsonParser parser, DeserializationContext context) throws IOException { String floatString = parser.getText(); if (floatString.cont...
With all respect to accepted answer, there is a way to get rid of those `@JsonDeserialize` annotations. You need to register the custom deserializer in the ObjectMapper. Following the tutorial [from official web-site](http://wiki.fasterxml.com/JacksonHowToCustomDeserializers) you just do something like: ``` Obj...
26,725,278
The input stream I am parsing with [Jackson](http://jackson.codehaus.org) contains latitude and longitude values such as here: ```json { "name": "product 23", "latitude": "52,48264", "longitude": "13,31822" } ``` For some reason the server uses **commas** as the decimal separator which produces an `Inval...
2014/11/03
[ "https://Stackoverflow.com/questions/26725278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356895/" ]
I came up with the following solution: ``` public class FlexibleFloatDeserializer extends JsonDeserializer<Float> { @Override public Float deserialize(JsonParser parser, DeserializationContext context) throws IOException { String floatString = parser.getText(); if (floatString.cont...
A more general solution than the other proposed answers, which require registering individual deserializers for each type, is to provide a customized `DefaultDeserializationContext` to `ObjectMapper`. The following implementation (which is inspired by `DefaultDeserializationContext.Impl`) worked for me: ``` class Loc...
16,068,400
Hi Im using Socialengine 4.5 and I'm getting the following error. Can someone help me determine the reason, based on the error message and the stack trace? Error: ``` Error Code: 8094cd exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Friends' was not found in the registry; used paths: Mes...
2013/04/17
[ "https://Stackoverflow.com/questions/16068400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292206/" ]
Trial and error proves out that the issue is a mix of syntax and period placement errors. This did the trick to provide the expected output. ``` identification division. program-id. quick. environment division. data division. working-storage section. 01 temp-val1 pic 9 value 1. 01 temp-val2 ...
To spell it out bluntly ``` display "2". end_if. ``` the '.' after "2" ends the if statement, then you have another end\_if and . which Open-Cobol is probably taking as end of procedure - probably not the best interpretation. As Nick said \*\*Do not mix coding styles. personnaly I would put one '.' on a lin...
16,068,400
Hi Im using Socialengine 4.5 and I'm getting the following error. Can someone help me determine the reason, based on the error message and the stack trace? Error: ``` Error Code: 8094cd exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Friends' was not found in the registry; used paths: Mes...
2013/04/17
[ "https://Stackoverflow.com/questions/16068400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292206/" ]
There are 2 problems with the code. One is the period just before the `end-if`. The other is that `end_if` is not the same as `end-if`. Only `end-if` is used in Cobol. The `end_if` is being taken as a paragraph name. Therefore, it does not (and should not) produce a compiler warning message.
Trial and error proves out that the issue is a mix of syntax and period placement errors. This did the trick to provide the expected output. ``` identification division. program-id. quick. environment division. data division. working-storage section. 01 temp-val1 pic 9 value 1. 01 temp-val2 ...
16,068,400
Hi Im using Socialengine 4.5 and I'm getting the following error. Can someone help me determine the reason, based on the error message and the stack trace? Error: ``` Error Code: 8094cd exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Friends' was not found in the registry; used paths: Mes...
2013/04/17
[ "https://Stackoverflow.com/questions/16068400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292206/" ]
There are 2 problems with the code. One is the period just before the `end-if`. The other is that `end_if` is not the same as `end-if`. Only `end-if` is used in Cobol. The `end_if` is being taken as a paragraph name. Therefore, it does not (and should not) produce a compiler warning message.
To spell it out bluntly ``` display "2". end_if. ``` the '.' after "2" ends the if statement, then you have another end\_if and . which Open-Cobol is probably taking as end of procedure - probably not the best interpretation. As Nick said \*\*Do not mix coding styles. personnaly I would put one '.' on a lin...
70,423,743
I'm new in python and programming in general. I have this project to create a simple library to add new authors and upload books. I must also display the uploaded book details(total words, most common words, different words, etc.) when I open the book. Now to do this I know that I first must open the uploaded book in r...
2021/12/20
[ "https://Stackoverflow.com/questions/70423743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17725025/" ]
``` <v-btn class="mr-4" :loading="saveLoading == index" @click="submit(item, index)" > data: () => ({ valid: true, saveLoading: -1, }) submit (formItem, index) { this.saveLoading = index console.log(formItem) // POST the formItem and make the saveLoading false in async then(),...
If you are generating the forms from the api response, mean that in some way you are attaching the response to the Vue Data property. If so, you could easily enrich the objects of the array (the forms object) to have a isLoading property. So the result will be something like: ``` API RESPONSE [ { form_name: ...
70,423,743
I'm new in python and programming in general. I have this project to create a simple library to add new authors and upload books. I must also display the uploaded book details(total words, most common words, different words, etc.) when I open the book. Now to do this I know that I first must open the uploaded book in r...
2021/12/20
[ "https://Stackoverflow.com/questions/70423743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17725025/" ]
The problem is that you have only one variable. You could do `saveLoading1` to `saveLoadingN` but that's not very useful. ```js var forms = [ { form_name: 'Form One', name: 'Peter', email: 'peter@email.com' }, { form_name: 'Form Two', name: 'John', email: 'john@email.com...
If you are generating the forms from the api response, mean that in some way you are attaching the response to the Vue Data property. If so, you could easily enrich the objects of the array (the forms object) to have a isLoading property. So the result will be something like: ``` API RESPONSE [ { form_name: ...
49,952,223
I am having very hard time to get text from **h2** tag. I want **"Product successfully added to your shopping cart"** text. My Code : ``` WebDriver driver = new FirefoxDriver(); driver.get("http://automationpractice.com"); . . . System.out.println(driver.findElement(By.xpath("//*[@id='layer_cart']/div[1]/div[1]/h2"))...
2018/04/21
[ "https://Stackoverflow.com/questions/49952223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2508422/" ]
Yeah, you shouldn't be using `re.search`... actually, you shouldn't be using `re` AT ALL. Why not just `str.startswith`? ``` count = 0 with open('test.conf', 'r') as rf: for line in rf: if line.startswith('#'): count += 1 ``` ``` print(count) 4 ``` If you're hell bent on using regex, then, ...
Your approach and your description of the problem seems slightly different. To clarify, which of the bottom 2 options is what you want? 1. find any lines with # before it 2. find any words with # before it? if its (1), I believe that coldspeed's answer will serve the purpose. if its (2), then the steps are as follo...
48,762,257
I know that `constexpr` functions don't have to be evaluated at compile time, but they are if it is possible. Is the condition of the following `if` evaluated at compile time or not? ``` template <typename T> inline std::string toString(const T& arg, int decPlaces) { if (!std::is_same<T, float>::value && !std::i...
2018/02/13
[ "https://Stackoverflow.com/questions/48762257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4696802/" ]
Consider this slightly modified version of your code (so that the control flow cannot reach the end of such a non-`void` function): ``` template <typename T> inline std::string toString(const T& arg, int decPlaces) { if (!std::is_same<T, float>::value && !std::is_same<T, double>::value) return std::to_st...
If you want to be sure, inspect the generated assembly. However, it's extremely that likely the compiler will indeed replace the `if` by an unconditional `return` (if `T` is a `float` or `double`), or remove it altogether (otherwise). This is a fairly basic optimisation.
48,762,257
I know that `constexpr` functions don't have to be evaluated at compile time, but they are if it is possible. Is the condition of the following `if` evaluated at compile time or not? ``` template <typename T> inline std::string toString(const T& arg, int decPlaces) { if (!std::is_same<T, float>::value && !std::i...
2018/02/13
[ "https://Stackoverflow.com/questions/48762257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4696802/" ]
Consider this slightly modified version of your code (so that the control flow cannot reach the end of such a non-`void` function): ``` template <typename T> inline std::string toString(const T& arg, int decPlaces) { if (!std::is_same<T, float>::value && !std::is_same<T, double>::value) return std::to_st...
You will need to make sure all code paths for `T` being `float` or `double` and others will need to be valid at the same time for it to compile. If the code in the `if` and `else` would not be valid for a specific type, you run into errors. For the exact optimisations applied, you would need to inspect the assembly co...
74,592,719
So I'm Using `Getx`'s routing in Flutter. I have a Product class that accepts an argument of the type `Product` ``` const Produkt({ required this.product, }); ``` I handle the navigation through GetPages, like: ``` GetPage( name: Produkt.route, page: () => Produkt( product: Get.arguments['p...
2022/11/27
[ "https://Stackoverflow.com/questions/74592719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14775496/" ]
Instead of returning single element `getElementsByClassName()` returns collection of elements.That's why we have to loop that collection of elements or simply you can overcome this problem by adding `document.getElementsByClassName('form-control')[0]` Here,I rewrite the code: ` ``` document.getElementsByClassName("f...
The reason why you are getting this error is because getElementsByClassName returns an array of elements but you need to have a single element in order to add an event listener. If you want to add event listener to all elements, you can simply loop through the array as shown below. ``` document.getElementsByClassName(...
310,653
I use an iPhone 8 and my 12 year-old daughter had an iPhone 6 just purchased. I'm worried about Internet sites mainly and would like to monitor text messages of certain friends she has been in trouble with at school. I have spoken to her about this and it was one of the conditions she was allowed her own phone. Can my...
2017/12/30
[ "https://apple.stackexchange.com/questions/310653", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/269991/" ]
Parental controls are more so about restriction rather than monitoring. Although your intentions seem honest and reasonable, someone could maliciously use a feature like this to spy on friends or significant others. Explore Apple's robust iOS Parental Controls instead. [Parental Controls](https://support.apple.com/en...
You could use a 3rd party restrictions service like Qustodio or curbi. These are profile based and allow you some monitoring.
310,653
I use an iPhone 8 and my 12 year-old daughter had an iPhone 6 just purchased. I'm worried about Internet sites mainly and would like to monitor text messages of certain friends she has been in trouble with at school. I have spoken to her about this and it was one of the conditions she was allowed her own phone. Can my...
2017/12/30
[ "https://apple.stackexchange.com/questions/310653", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/269991/" ]
Parental controls are more so about restriction rather than monitoring. Although your intentions seem honest and reasonable, someone could maliciously use a feature like this to spy on friends or significant others. Explore Apple's robust iOS Parental Controls instead. [Parental Controls](https://support.apple.com/en...
In iOS you can only use to set up rules in parental controls but Apple do not allow any monitoring even if you have any 3rd party software unless you jailbreak
310,653
I use an iPhone 8 and my 12 year-old daughter had an iPhone 6 just purchased. I'm worried about Internet sites mainly and would like to monitor text messages of certain friends she has been in trouble with at school. I have spoken to her about this and it was one of the conditions she was allowed her own phone. Can my...
2017/12/30
[ "https://apple.stackexchange.com/questions/310653", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/269991/" ]
You could use a 3rd party restrictions service like Qustodio or curbi. These are profile based and allow you some monitoring.
In iOS you can only use to set up rules in parental controls but Apple do not allow any monitoring even if you have any 3rd party software unless you jailbreak
15,650,276
How does one convert an integer to a string using the Nasm preprocessor? For example, consider the following code: ``` %define myInt 65 %define myString 'Sixty-five is ', myInt ``` The symbol `myString` will evaluate to `Sixty-five is A`. The desired result is `Sixty-five is 65`. How can I achieve this? It seems lik...
2013/03/27
[ "https://Stackoverflow.com/questions/15650276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213870/" ]
This code ``` %define myInt 65 %define quot " %define stringify(x) quot %+ x %+ quot %strcat myString 'Sixty-five is ', stringify(myInt) bits 32 db myString ``` produces the following listing file: ``` 1 %define myInt 65 2 %define quot " 3 ...
At the moment can't test this with NASM, but this works at least in YASM (I added a Linux x86-64 printing code to make testing easier): ``` [bits 64] %define myInt 65 %define myTens myInt/10 + 48 %define myOnes myInt-(myInt/10)*10 + 48 %define myString 'Sixty-five is ', myTens, myOnes section .text global _start _...
15,650,276
How does one convert an integer to a string using the Nasm preprocessor? For example, consider the following code: ``` %define myInt 65 %define myString 'Sixty-five is ', myInt ``` The symbol `myString` will evaluate to `Sixty-five is A`. The desired result is `Sixty-five is 65`. How can I achieve this? It seems lik...
2013/03/27
[ "https://Stackoverflow.com/questions/15650276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213870/" ]
You should use %defstr macro. ``` %define myInt 65 %defstr strInt myInt %define myString 'Sixty-five is ', strInt ``` <https://www.nasm.us/xdoc/2.15.05/html/nasmdoc4.html#section-4.1.9>
At the moment can't test this with NASM, but this works at least in YASM (I added a Linux x86-64 printing code to make testing easier): ``` [bits 64] %define myInt 65 %define myTens myInt/10 + 48 %define myOnes myInt-(myInt/10)*10 + 48 %define myString 'Sixty-five is ', myTens, myOnes section .text global _start _...
15,650,276
How does one convert an integer to a string using the Nasm preprocessor? For example, consider the following code: ``` %define myInt 65 %define myString 'Sixty-five is ', myInt ``` The symbol `myString` will evaluate to `Sixty-five is A`. The desired result is `Sixty-five is 65`. How can I achieve this? It seems lik...
2013/03/27
[ "https://Stackoverflow.com/questions/15650276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213870/" ]
This code ``` %define myInt 65 %define quot " %define stringify(x) quot %+ x %+ quot %strcat myString 'Sixty-five is ', stringify(myInt) bits 32 db myString ``` produces the following listing file: ``` 1 %define myInt 65 2 %define quot " 3 ...
You should use %defstr macro. ``` %define myInt 65 %defstr strInt myInt %define myString 'Sixty-five is ', strInt ``` <https://www.nasm.us/xdoc/2.15.05/html/nasmdoc4.html#section-4.1.9>
26,230,042
I am using `four` **Strings** in my code. The `first` String contains "`http://`", the `second` String contains user host URL (entered by user), the `third` contains "`/musics/a.mp3`" and the `fourth` String contains complete URL, by combining the previous Strings, like this: ``` String fourth = first+second+third; `...
2014/10/07
[ "https://Stackoverflow.com/questions/26230042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3585072/" ]
If the host part of the URL comes from the user, you must validate it before using it to construct a URL. Don't call `new JSONAsyncTask().execute(fourth);` if `second` is null.
If you're calling `etTextToSave.getText()` in `onCreate()`, the returned text will be whatever there's by default in the layout and not what was entered by the user. The code doesn't show if you're using an onclick listener or similar but if you are, move the `getText()` to the click handler.
4,581,749
I have an exiting ASP.NET website that already has user accounts in it. I would now like to simplify logon and considering the use of Janrain. Is this a recommended product? Any alternatives you have used? What do I do with my existing users (I assume I need to extend my membership db to select between them and Janrain...
2011/01/03
[ "https://Stackoverflow.com/questions/4581749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/560780/" ]
Pulling in a single commit would be a cherry-pick and would rewrite the commit ID (and mark you as the committer while retaining the author). The process is pretty straightforward, though: ``` git fetch git://github.com/user/project.git git cherry-pick <SHA-COMMIT-ID> ``` You get the SHA from the repository log, for...
Try to use the /forkqueue on github. There you can merge commits to your fork. Or go to the tab "Network" and select "Forkqueue"
4,581,749
I have an exiting ASP.NET website that already has user accounts in it. I would now like to simplify logon and considering the use of Janrain. Is this a recommended product? Any alternatives you have used? What do I do with my existing users (I assume I need to extend my membership db to select between them and Janrain...
2011/01/03
[ "https://Stackoverflow.com/questions/4581749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/560780/" ]
Pulling in a single commit would be a cherry-pick and would rewrite the commit ID (and mark you as the committer while retaining the author). The process is pretty straightforward, though: ``` git fetch git://github.com/user/project.git git cherry-pick <SHA-COMMIT-ID> ``` You get the SHA from the repository log, for...
There is an awesome tool which is called [hub](https://github.com/github/hub), which provides useful tools to clean up pull requests and generally "helps you win at git". One useful command in this context is: `git am -3 <url>` This allows you to grab the changes from a url and apply its commits/changes to your curr...
4,581,749
I have an exiting ASP.NET website that already has user accounts in it. I would now like to simplify logon and considering the use of Janrain. Is this a recommended product? Any alternatives you have used? What do I do with my existing users (I assume I need to extend my membership db to select between them and Janrain...
2011/01/03
[ "https://Stackoverflow.com/questions/4581749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/560780/" ]
There is an awesome tool which is called [hub](https://github.com/github/hub), which provides useful tools to clean up pull requests and generally "helps you win at git". One useful command in this context is: `git am -3 <url>` This allows you to grab the changes from a url and apply its commits/changes to your curr...
Try to use the /forkqueue on github. There you can merge commits to your fork. Or go to the tab "Network" and select "Forkqueue"
43,172,788
I have my main activity which contains 2 fragments: MainActivity ``` public class MainActivity extends AppCompatActivity implements FragmentOne.OnFragmentOneInteractionListener, FragmentTwo.OnFragmentTwoInteractionListener{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate...
2017/04/02
[ "https://Stackoverflow.com/questions/43172788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2924127/" ]
i am assuming you are using ActionBar. Try adding this in your activity: ``` @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return false; } @Override public void onBackPr...
1) You should make your toolbar back button call onBackPressed() from your activity, so they both share the same functionality. See onSupportNavegationUp() in the main activity. 2) Have your Main Activity control what happens with the fragment, but let the fragments handle any back press if they must. I hope this is...
14,738,451
**How do exceptions work from an Operating System's perspective?** Coming from C++, I can understand exceptions from a programmer's perspective. When an exception gets thrown, the stack begins to unwind, and each activation record has the opportunity to catch and handle the exception. **But whose responsibility ...
2013/02/06
[ "https://Stackoverflow.com/questions/14738451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/908939/" ]
C++ exceptions are part of the language, defined by the language standard, and implemented by the compiler and runtime library. There are other `exceptions` that are detected by the CPU, like divide by zero or dereferencing a NULL pointer, both are examples of [Undefined Behavior](http://blog.regehr.org/archives/213) i...
You're talking about two completely different exception processes. The first is provided by the OS. In Windows you can use [`__try` and `__except`](http://msdn.microsoft.com/en-us/library/s58ftw19(v=vs.80).aspx) to handle them. The second is provided by the C++ compiler and doesn't involve the OS in any way.
14,738,451
**How do exceptions work from an Operating System's perspective?** Coming from C++, I can understand exceptions from a programmer's perspective. When an exception gets thrown, the stack begins to unwind, and each activation record has the opportunity to catch and handle the exception. **But whose responsibility ...
2013/02/06
[ "https://Stackoverflow.com/questions/14738451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/908939/" ]
C++ exceptions are part of the language, defined by the language standard, and implemented by the compiler and runtime library. There are other `exceptions` that are detected by the CPU, like divide by zero or dereferencing a NULL pointer, both are examples of [Undefined Behavior](http://blog.regehr.org/archives/213) i...
Since I'm only aware of one or two OS's written in C++, and the one I know better, doesn't officially use exceptions at all, that pretty much rules out exceptions being thrown by the OS. The three main OS's (Linux, Windows, MacOS X), along with all forms of Unix (AIX, Solaris, HP-UX, etc) are written in C, along with...
45,340,163
I have a list in this format, **some\_list=['com', 'kill', 'someone', 'get', 'caught']** And i need this to be written on to a text file as, **com kill someone get caught** Basically i need spaces between words. However, i have tried methods such as, ``` for f in some_list: f.write(' '.join(str(s) for s in f) + ...
2017/07/27
[ "https://Stackoverflow.com/questions/45340163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8373304/" ]
``` f = open('myfile', 'w') some_list = ['com', 'kill', 'someone', 'get', 'caught'] f.write(" ".join(some_list)) ```
you have a list containing a number of values in your cause you have ['com', 'kill', 'someone', 'get', 'caught'] ``` temp="" for f in some_list: temp= temp+f+' ' #now save your text into a file #now we have temp="com kill someone get caught" ```
45,340,163
I have a list in this format, **some\_list=['com', 'kill', 'someone', 'get', 'caught']** And i need this to be written on to a text file as, **com kill someone get caught** Basically i need spaces between words. However, i have tried methods such as, ``` for f in some_list: f.write(' '.join(str(s) for s in f) + ...
2017/07/27
[ "https://Stackoverflow.com/questions/45340163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8373304/" ]
This should work, **f** is your text file ``` your_list = ['com', 'kill', 'someone', 'get', 'caught'] f.write(' '.join(str(s) for s in your_list)) ``` Output: **com kill someone get caught**
you have a list containing a number of values in your cause you have ['com', 'kill', 'someone', 'get', 'caught'] ``` temp="" for f in some_list: temp= temp+f+' ' #now save your text into a file #now we have temp="com kill someone get caught" ```
20,402,997
Having Django 1.6 running on Python 2.7 I'm a bit confused how to print sub numbers. E.g. On CO₂ (not sure whether this is even the correct one). On HTML I'd do a `<sub>2</sub>`, but this is not working. When using ₂ I'm getting `Non-ASCII character '\xe2' in file ...` My field for the form look like ``` class RTFo...
2013/12/05
[ "https://Stackoverflow.com/questions/20402997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915834/" ]
Add this line on top of module: ``` # -*- coding: utf-8 -*- ```
Define [source code encoding](http://www.python.org/dev/peps/pep-0263/) at the top level in your `forms.py` file: ``` #!/usr/bin/python # -*- coding: utf-8 -*- ```
31,064,617
I am new to Azure. I have data being entered into an Azure Table Storage via sensors every 10 minutes. I want to display the results in a graph via Power BI. My knowledge thus far suggests that Stream analytics only takes data from Event hubs or Blob storage. Is it possible to connect my azure table storage (in Azure...
2015/06/26
[ "https://Stackoverflow.com/questions/31064617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5032786/" ]
**In Joomla 3.2.0:** see file :wwwroot\joomla3.1\administrator\modules\mod\_status\mod\_status.php (on line:56 you will see the sql to Get the number of frontend logged in users ) ``` // Get the number of frontend logged in users. $query->clear() ->select('COUNT(session_id)') ->from('#__session...
You can easily modify Who’s Online module and get the required data [You tube link](https://www.youtube.com/watch?v=eBxEjwZf6L0)
28,354,217
![enter image description here](https://i.stack.imgur.com/lfdUs.gif) This is the example i am talking about, how can you do this?
2015/02/05
[ "https://Stackoverflow.com/questions/28354217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97893/" ]
I usually, on Mac, do this task with <https://www.cockos.com/licecap/> (source: <https://github.com/justinfrankel/licecap>). It also runs on Windows. > > LICEcap can capture an area of your desktop and save it directly to .GIF (for viewing in web browsers, etc). > > > GUI is simple but effective, and it's really...
It depends on your platform, and there are a bunch of ways to do it. On Mac OSX, there is a built-in QuickTime screen recorder. 1. Launch QuickTime Player 2. File menu -> New Screen Recording 3. Use the tool of your choice (such as ffmpeg) to convert the recording to a gif. Here's an example of how to convert a reco...
43,626,497
Here im using Bootstrap Div for creating User Page Here my two textbox(Name And Email) are touching each other please suggest me how can i write without touch each other and table-border table-hover in div ``` <div class="container-fluid"> <div class="row "> <div class="form-group"> <div class...
2017/04/26
[ "https://Stackoverflow.com/questions/43626497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
when we use the jar in diffrent project,the resources path should like of this: classpath\*:myPluginConfig.properties
Answer to my question is: 1. In maven plugin project **before spring context is initialized** modify classpath adding maven runtime classpath to system context classpath [original solution on how to do this](https://stackoverflow.com/a/16263482/1235977) and bellow my slightly modified one This should be called my mav...
3,803,229
I tried. Kilbas says that $\int\_{-\infty}^{+\infty} \Gamma(x+yi) \Gamma(x-yi) \, dy=(2\pi)^{3/2}$$\_2F\_1(1/2,1/2,1/2;-1)$. In this case, to the function $\_2F(a,b.c;z)$, we have $z=-1 \ (|z|=1)$ and a conditionally convergence if $-1<\Re(c-a-b)\leq 0$. There is a better way to solve this integral? Thanks for helping...
2020/08/25
[ "https://math.stackexchange.com/questions/3803229", "https://math.stackexchange.com", "https://math.stackexchange.com/users/707922/" ]
First we evaluate a symmetric integral: $$\int\_0^{\infty } \frac{\cosh (a x)}{\cosh ^v(b x)} \, dx=2^{v-1} \int\_0^1 \frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \, dt=2^{v-1} \int\_1^\infty \frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \, dt\\=2^{v-2} \int\_0^\infty\frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \,...
By the [beta function identity](https://en.wikipedia.org/wiki/Beta_function#Other_identities_and_formulas), we may write \begin{align\*} \Gamma(x+iy)\Gamma(x-iy) &= \Gamma(2x) \int\_{0}^{\infty} \frac{t^{x+iy-1}}{(1+t)^{2x}} \, \mathrm{d}t \\ &= 2 \Gamma(2x) \int\_{-\infty}^{\infty} \frac{e^{2isy}}{(e^{s} + e^{-s})^{2...
3,803,229
I tried. Kilbas says that $\int\_{-\infty}^{+\infty} \Gamma(x+yi) \Gamma(x-yi) \, dy=(2\pi)^{3/2}$$\_2F\_1(1/2,1/2,1/2;-1)$. In this case, to the function $\_2F(a,b.c;z)$, we have $z=-1 \ (|z|=1)$ and a conditionally convergence if $-1<\Re(c-a-b)\leq 0$. There is a better way to solve this integral? Thanks for helping...
2020/08/25
[ "https://math.stackexchange.com/questions/3803229", "https://math.stackexchange.com", "https://math.stackexchange.com/users/707922/" ]
First we evaluate a symmetric integral: $$\int\_0^{\infty } \frac{\cosh (a x)}{\cosh ^v(b x)} \, dx=2^{v-1} \int\_0^1 \frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \, dt=2^{v-1} \int\_1^\infty \frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \, dt\\=2^{v-2} \int\_0^\infty\frac{t^{-a}+t^a}{t \left(t^{-b}+t^b\right)^v} \,...
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \new...
3,803,229
I tried. Kilbas says that $\int\_{-\infty}^{+\infty} \Gamma(x+yi) \Gamma(x-yi) \, dy=(2\pi)^{3/2}$$\_2F\_1(1/2,1/2,1/2;-1)$. In this case, to the function $\_2F(a,b.c;z)$, we have $z=-1 \ (|z|=1)$ and a conditionally convergence if $-1<\Re(c-a-b)\leq 0$. There is a better way to solve this integral? Thanks for helping...
2020/08/25
[ "https://math.stackexchange.com/questions/3803229", "https://math.stackexchange.com", "https://math.stackexchange.com/users/707922/" ]
By the [beta function identity](https://en.wikipedia.org/wiki/Beta_function#Other_identities_and_formulas), we may write \begin{align\*} \Gamma(x+iy)\Gamma(x-iy) &= \Gamma(2x) \int\_{0}^{\infty} \frac{t^{x+iy-1}}{(1+t)^{2x}} \, \mathrm{d}t \\ &= 2 \Gamma(2x) \int\_{-\infty}^{\infty} \frac{e^{2isy}}{(e^{s} + e^{-s})^{2...
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \new...
20,746,606
How can I ensure non-repetition of the first occurrences of idtag column? Example: The first 4 (size of values ​​within the IN clause) idtag occurrences can not be 85,85,85,90 DB Schema: <http://sqlfiddle.com/#!2/0a683/2> I dont use group by, because sometime i need to limit more than number of ids inside IN clause....
2013/12/23
[ "https://Stackoverflow.com/questions/20746606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501950/" ]
The proper way would be to use aggregation: ``` SELECT min(tr.idreceita), tr.idtag FROM tagreceita tr WHERE tr.idtag IN (85,88,90) group by tr.idtag; ``` EDIT: I see, sometimes you want more things that are in the `in` list. In that case, probably the easiest approach is to randomize the results: ``` select tr.idr...
> > The first 4 (size of values ​​within the IN clause) idtag occurrences can not be 85,85,85,90 > > > erm, you've repeated 85 three times there. Taking a simpler case where you don't want 85,90 to appear in the first 2 entries.... ``` SELECT tr.idreceita, tr.idtag FROM tagreceita tr WHERE tr.idtag IN (85,88,90) ...
44,180
I have a batch process that closes cases after 30 days of inactivity. Is it possible to write test code that would create a case that is over 30 days old?
2014/07/15
[ "https://salesforce.stackexchange.com/questions/44180", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/9950/" ]
Not without request modifiable audit fields (not recommended). Instead, make the "days older than" variable so it can be set by the test method: ``` global class CloseOldCases implements Database.batchable<Case> { global static Integer daysOlderThan; static { daysOlderThan = 30; } global Data...
Take a look at [Unit testing code which has logic around the CreatedDate](https://salesforce.stackexchange.com/questions/62/unit-testing-code-which-has-logic-around-the-createddate) where SObjects loaded via `JSON.deserialize` or via `Test.loadData` can have a specific (e.g. in the past) CreatedDate set. I assume the ...
14,481,310
I am trying to bypass this error: `ItemNotFoundError: insufficient items with name u'No_Thanks'` error by using try..except statement. However, I am getting another error saying: `NameError: name 'ItemNotFoundError' is not defined`. I am not sure why is this happening. Thanks. Here is the code that I am using ``` br =...
2013/01/23
[ "https://Stackoverflow.com/questions/14481310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm guessing the exception is defined by `mechanize`. Try: `except mechanize.ItemNotFoundError` --- It appears that this is correct after installing mechanize: ``` >>> import mechanize >>> print mechanize.ItemNotFoundError <class 'mechanize._form.ItemNotFoundError'> >>> print mechanize.__version__ (0, 2, 5, None, No...
If you run your code without the try..except you may get: ``` ClientForm.ItemNotFoundError: insufficient items with name u'No_Thanks' ``` So the error is defined in the `ClientForm` module. So you could catch it with ``` import ClientForm .... try: br.form['allowance']=[data,] except Cli...
14,481,310
I am trying to bypass this error: `ItemNotFoundError: insufficient items with name u'No_Thanks'` error by using try..except statement. However, I am getting another error saying: `NameError: name 'ItemNotFoundError' is not defined`. I am not sure why is this happening. Thanks. Here is the code that I am using ``` br =...
2013/01/23
[ "https://Stackoverflow.com/questions/14481310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm guessing the exception is defined by `mechanize`. Try: `except mechanize.ItemNotFoundError` --- It appears that this is correct after installing mechanize: ``` >>> import mechanize >>> print mechanize.ItemNotFoundError <class 'mechanize._form.ItemNotFoundError'> >>> print mechanize.__version__ (0, 2, 5, None, No...
You need to import the module or the class defintion for ItemNotFoundError. It's not a standard Python exception, I guess it's an exception that is defined somewhere in the Beautifulsoup implementation but I'm not sure. ``` from some.module import ItemNotFoundError .... except ItemNotFoundError: continue ```
14,481,310
I am trying to bypass this error: `ItemNotFoundError: insufficient items with name u'No_Thanks'` error by using try..except statement. However, I am getting another error saying: `NameError: name 'ItemNotFoundError' is not defined`. I am not sure why is this happening. Thanks. Here is the code that I am using ``` br =...
2013/01/23
[ "https://Stackoverflow.com/questions/14481310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm guessing the exception is defined by `mechanize`. Try: `except mechanize.ItemNotFoundError` --- It appears that this is correct after installing mechanize: ``` >>> import mechanize >>> print mechanize.ItemNotFoundError <class 'mechanize._form.ItemNotFoundError'> >>> print mechanize.__version__ (0, 2, 5, None, No...
I needed to upgrade mechanize (python-mechanize) > > > > > > > > > > > > print mechanize.**version** > > > (0, 2, 5, None, None) > > > the imports working are now > > > > > > > > > > > > > > > > > > Let's import some exceptions we'll need to catch later:: ``` >>> from mechanize import LinkNotFoundErr...
14,481,310
I am trying to bypass this error: `ItemNotFoundError: insufficient items with name u'No_Thanks'` error by using try..except statement. However, I am getting another error saying: `NameError: name 'ItemNotFoundError' is not defined`. I am not sure why is this happening. Thanks. Here is the code that I am using ``` br =...
2013/01/23
[ "https://Stackoverflow.com/questions/14481310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you run your code without the try..except you may get: ``` ClientForm.ItemNotFoundError: insufficient items with name u'No_Thanks' ``` So the error is defined in the `ClientForm` module. So you could catch it with ``` import ClientForm .... try: br.form['allowance']=[data,] except Cli...
You need to import the module or the class defintion for ItemNotFoundError. It's not a standard Python exception, I guess it's an exception that is defined somewhere in the Beautifulsoup implementation but I'm not sure. ``` from some.module import ItemNotFoundError .... except ItemNotFoundError: continue ```
14,481,310
I am trying to bypass this error: `ItemNotFoundError: insufficient items with name u'No_Thanks'` error by using try..except statement. However, I am getting another error saying: `NameError: name 'ItemNotFoundError' is not defined`. I am not sure why is this happening. Thanks. Here is the code that I am using ``` br =...
2013/01/23
[ "https://Stackoverflow.com/questions/14481310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you run your code without the try..except you may get: ``` ClientForm.ItemNotFoundError: insufficient items with name u'No_Thanks' ``` So the error is defined in the `ClientForm` module. So you could catch it with ``` import ClientForm .... try: br.form['allowance']=[data,] except Cli...
I needed to upgrade mechanize (python-mechanize) > > > > > > > > > > > > print mechanize.**version** > > > (0, 2, 5, None, None) > > > the imports working are now > > > > > > > > > > > > > > > > > > Let's import some exceptions we'll need to catch later:: ``` >>> from mechanize import LinkNotFoundErr...
246,373
I am looking for a word that describes someone that exhibits nurturing qualities (as in wants those around him/her to improve and get better) but has high expectations for those same people. Essentially a parental figure, but in a more business-sense. My current working word is `coach`, but I think I could do better. T...
2015/05/14
[ "https://english.stackexchange.com/questions/246373", "https://english.stackexchange.com", "https://english.stackexchange.com/users/121664/" ]
I think you want the word 'disciplinarian'. It sounds a bit clinical, but it effectively conveys the meaning of "willing to provide adequate corrective action without undue harshness". Although it comes from the world of martial arts, 'sensei' is also often used even in non-martial-arts contexts to mean "learned guide...
An article titled ["The 3 Types of Parenting Styles"](http://www.livestrong.com/article/76463-types-parenting-styles/) describes parents as being either *authoritative*, *authoritarian*, or *permissive*. The description of someone who's **authoritative** sounds like what you're looking for: > > Authoritative parents ...
21,517,355
I'm trying to set cookie in javascript with two values. Each of theses have a different expiration date. For example : ``` var now = new Date(); now.setDate( now.getDate() + 2 ); document.cookie = "bar=foo;"; document.cookie = "expires=" + now.toUTCString() + ";" now = new Date(); now.setDate( now.getDate() + 30 ); ...
2014/02/02
[ "https://Stackoverflow.com/questions/21517355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1729211/" ]
I think that approach is correct. Based on: [How can I set a cookie to expire after x days with this code I have?](https://stackoverflow.com/questions/6561687/how-can-i-set-a-cookie-to-expire-after-x-days-with-this-code-i-have) : ``` function createCookie(name,value,days) { if (days) { var date = new Date...
Ok, i found my reply here with the function "setCookie". I've specify differents values and it's working. <http://www.w3schools.com/js/js_cookies.asp>
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
**Hint:** The [Carmichael function](https://en.wikipedia.org/wiki/Carmichael_function) of $100$ is $20$, so if $\gcd(a,100)=1$ then $a^{20}\equiv1\bmod100$, so $a^{100}=(a^{20})^5\equiv1\bmod 100$.
Yet an other answer, that leads to the result (without using the Euler indicator function). Explicit computations. * Working modulo $4$, i.e. in $\Bbb Z/4$, we have $7^{100}-3^{100}=3^{100}-3^{100}=0$. * Working modulo $25$, i.e. in $\Bbb Z/25$, note that $1/7=18$ (because of $7\cdot 18=126=1$), so we have $18^{100}(7...
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
$\textbf{Hint:}$ Calculate $7^{100}-3^{100}$ separately for modulo $5^2$ and $2^2$.Then,combine them using chinese remainder theorem.It will be easier to calculate I think
For $7$ we have the cycle modulo $100$ with $7, 49, 43, 1$. Then $7^{20}= (7^4)^{5}\equiv 1$.
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Yet an other answer, that leads to the result (without using the Euler indicator function). Explicit computations. * Working modulo $4$, i.e. in $\Bbb Z/4$, we have $7^{100}-3^{100}=3^{100}-3^{100}=0$. * Working modulo $25$, i.e. in $\Bbb Z/25$, note that $1/7=18$ (because of $7\cdot 18=126=1$), so we have $18^{100}(7...
This is my try. As being a high school student, I don't have any idea about $\text{mod}$. $$7^{100}=(10-3)^{100}=\sum\_{r=0}^{100} {{100}\choose{r}}(10)^{100-r}(-3)^r$$ Now, since we want only last two digits, we are interested in terms with index of $10$ less than $2$ as other terms will terminate with unnecessary ze...
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
**Hint:** The [Carmichael function](https://en.wikipedia.org/wiki/Carmichael_function) of $100$ is $20$, so if $\gcd(a,100)=1$ then $a^{20}\equiv1\bmod100$, so $a^{100}=(a^{20})^5\equiv1\bmod 100$.
This is my try. As being a high school student, I don't have any idea about $\text{mod}$. $$7^{100}=(10-3)^{100}=\sum\_{r=0}^{100} {{100}\choose{r}}(10)^{100-r}(-3)^r$$ Now, since we want only last two digits, we are interested in terms with index of $10$ less than $2$ as other terms will terminate with unnecessary ze...
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
**Hint:** The [Carmichael function](https://en.wikipedia.org/wiki/Carmichael_function) of $100$ is $20$, so if $\gcd(a,100)=1$ then $a^{20}\equiv1\bmod100$, so $a^{100}=(a^{20})^5\equiv1\bmod 100$.
$\textbf{Hint:}$ Calculate $7^{100}-3^{100}$ separately for modulo $5^2$ and $2^2$.Then,combine them using chinese remainder theorem.It will be easier to calculate I think
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
$\textbf{Hint:}$ Calculate $7^{100}-3^{100}$ separately for modulo $5^2$ and $2^2$.Then,combine them using chinese remainder theorem.It will be easier to calculate I think
This is my try. As being a high school student, I don't have any idea about $\text{mod}$. $$7^{100}=(10-3)^{100}=\sum\_{r=0}^{100} {{100}\choose{r}}(10)^{100-r}(-3)^r$$ Now, since we want only last two digits, we are interested in terms with index of $10$ less than $2$ as other terms will terminate with unnecessary ze...
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Yet an other answer, that leads to the result (without using the Euler indicator function). Explicit computations. * Working modulo $4$, i.e. in $\Bbb Z/4$, we have $7^{100}-3^{100}=3^{100}-3^{100}=0$. * Working modulo $25$, i.e. in $\Bbb Z/25$, note that $1/7=18$ (because of $7\cdot 18=126=1$), so we have $18^{100}(7...
For $7$ we have the cycle modulo $100$ with $7, 49, 43, 1$. Then $7^{20}= (7^4)^{5}\equiv 1$.
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Alternatively, notice:$$(10-3)^{100}-3^{100} = \sum\_{k=0}^{99}\binom{100}{k}10^{100-k}(-3)^k \equiv0 \pmod {100}$$
**Hint:** The [Carmichael function](https://en.wikipedia.org/wiki/Carmichael_function) of $100$ is $20$, so if $\gcd(a,100)=1$ then $a^{20}\equiv1\bmod100$, so $a^{100}=(a^{20})^5\equiv1\bmod 100$.
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Alternatively, notice:$$(10-3)^{100}-3^{100} = \sum\_{k=0}^{99}\binom{100}{k}10^{100-k}(-3)^k \equiv0 \pmod {100}$$
$\textbf{Hint:}$ Calculate $7^{100}-3^{100}$ separately for modulo $5^2$ and $2^2$.Then,combine them using chinese remainder theorem.It will be easier to calculate I think
3,781,897
> > Find the last two digits of $7^{100}-3^{100}$ > > > From Euler's theorem one gets that $\phi(100) = 40 \Rightarrow 7^{40} \equiv 1 \pmod{100}, 3^{40} \equiv 1 \pmod{100}.$ I couldn't really work this out without using a calculator to compute the powers. How can I continue from here? I could write the expressi...
2020/08/06
[ "https://math.stackexchange.com/questions/3781897", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
**Hint:** The [Carmichael function](https://en.wikipedia.org/wiki/Carmichael_function) of $100$ is $20$, so if $\gcd(a,100)=1$ then $a^{20}\equiv1\bmod100$, so $a^{100}=(a^{20})^5\equiv1\bmod 100$.
For $7$ we have the cycle modulo $100$ with $7, 49, 43, 1$. Then $7^{20}= (7^4)^{5}\equiv 1$.
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
By shifting $A$ and $\lambda$, you want to show that if $B$ is positive definite, then $A$ is nonnegative definite iff all the roots of $\det(A-\lambda B)$ are nonnegative. Since $B$ is positive definite, it admits a Cholesky factorization $B=LL^{\dagger}$ where $L$ and $L^{\dagger}$ are invertible. Now, the roots of ...
We assume that $A,B$ are real symmetric and $B>0$. $A-B\geq 0\Leftrightarrow B^{-1/2}AB^{-1/2}\geq I\Leftrightarrow inf(spectrum(B^{-1/2}AB^{-1/2}))\geq 1$. $\det(A-\lambda B)=0\Leftrightarrow \det(B^{-1/2}AB^{-1/2}-\lambda I)=0\Leftrightarrow \lambda\in spectrum(B^{-1/2}AB^{-1/2})$. Finally $A-B\geq 0\Leftrightarro...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
By shifting $A$ and $\lambda$, you want to show that if $B$ is positive definite, then $A$ is nonnegative definite iff all the roots of $\det(A-\lambda B)$ are nonnegative. Since $B$ is positive definite, it admits a Cholesky factorization $B=LL^{\dagger}$ where $L$ and $L^{\dagger}$ are invertible. Now, the roots of ...
$$\begin{array}{rl} p (s) := \det \left( \mathrm A - s \mathrm B \right) &= \det \left( (\mathrm A - \mathrm B) - (s-1) \,\mathrm B \right)\\ &= \det \left( \mathrm B^{\frac 12} \left( \mathrm B^{-\frac 12} (\mathrm A - \mathrm B) \,\mathrm B^{-\frac 12} - (s-1) \,\mathrm I \right) \mathrm B^{\frac 12} \right)\\ &= \de...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
By shifting $A$ and $\lambda$, you want to show that if $B$ is positive definite, then $A$ is nonnegative definite iff all the roots of $\det(A-\lambda B)$ are nonnegative. Since $B$ is positive definite, it admits a Cholesky factorization $B=LL^{\dagger}$ where $L$ and $L^{\dagger}$ are invertible. Now, the roots of ...
Let $\langle\cdot,\cdot\rangle$ be the usual product in $\mathbb{R}^n$. First assume that $B$ is positive definite and $A-B$ is non-negative definite or equivalently positive semi-definite. This implies for all $x\in\mathbb{R}^n$ $$\langle (A-B)x,x\rangle\geqslant 0\Leftrightarrow \langle Ax,x\rangle\geqslant \langle B...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
By shifting $A$ and $\lambda$, you want to show that if $B$ is positive definite, then $A$ is nonnegative definite iff all the roots of $\det(A-\lambda B)$ are nonnegative. Since $B$ is positive definite, it admits a Cholesky factorization $B=LL^{\dagger}$ where $L$ and $L^{\dagger}$ are invertible. Now, the roots of ...
You can finish your own proof with the expression $QD$ using [this](https://math.stackexchange.com/questions/113842/is-the-product-of-symmetric-positive-semidefinite-matrices-positive-definite) answer. Since $Q$ is p.d., $QD$ has the same eigenvalues as $Q^{1/2}DQ^{1/2}$. Since $x^TQ^{1/2}DQ^{1/2} x = (Q^{1/2}x)^TD(Q^{...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
We assume that $A,B$ are real symmetric and $B>0$. $A-B\geq 0\Leftrightarrow B^{-1/2}AB^{-1/2}\geq I\Leftrightarrow inf(spectrum(B^{-1/2}AB^{-1/2}))\geq 1$. $\det(A-\lambda B)=0\Leftrightarrow \det(B^{-1/2}AB^{-1/2}-\lambda I)=0\Leftrightarrow \lambda\in spectrum(B^{-1/2}AB^{-1/2})$. Finally $A-B\geq 0\Leftrightarro...
$$\begin{array}{rl} p (s) := \det \left( \mathrm A - s \mathrm B \right) &= \det \left( (\mathrm A - \mathrm B) - (s-1) \,\mathrm B \right)\\ &= \det \left( \mathrm B^{\frac 12} \left( \mathrm B^{-\frac 12} (\mathrm A - \mathrm B) \,\mathrm B^{-\frac 12} - (s-1) \,\mathrm I \right) \mathrm B^{\frac 12} \right)\\ &= \de...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
We assume that $A,B$ are real symmetric and $B>0$. $A-B\geq 0\Leftrightarrow B^{-1/2}AB^{-1/2}\geq I\Leftrightarrow inf(spectrum(B^{-1/2}AB^{-1/2}))\geq 1$. $\det(A-\lambda B)=0\Leftrightarrow \det(B^{-1/2}AB^{-1/2}-\lambda I)=0\Leftrightarrow \lambda\in spectrum(B^{-1/2}AB^{-1/2})$. Finally $A-B\geq 0\Leftrightarro...
Let $\langle\cdot,\cdot\rangle$ be the usual product in $\mathbb{R}^n$. First assume that $B$ is positive definite and $A-B$ is non-negative definite or equivalently positive semi-definite. This implies for all $x\in\mathbb{R}^n$ $$\langle (A-B)x,x\rangle\geqslant 0\Leftrightarrow \langle Ax,x\rangle\geqslant \langle B...
2,671,111
I am trying to prove the following statement: > > Let $A,B\in M(n,\mathbb{R})$. > > > If $B$ is positive definite and $(A-B)$ is non-negative definite, then $\det(A-\lambda B)=0$ has all its roots $\lambda\geqslant1$ and conversely, if all roots $\lambda\geqslant 1$, then $(A-B)$ is non-negative definite. > > > ...
2018/02/28
[ "https://math.stackexchange.com/questions/2671111", "https://math.stackexchange.com", "https://math.stackexchange.com/users/321264/" ]
We assume that $A,B$ are real symmetric and $B>0$. $A-B\geq 0\Leftrightarrow B^{-1/2}AB^{-1/2}\geq I\Leftrightarrow inf(spectrum(B^{-1/2}AB^{-1/2}))\geq 1$. $\det(A-\lambda B)=0\Leftrightarrow \det(B^{-1/2}AB^{-1/2}-\lambda I)=0\Leftrightarrow \lambda\in spectrum(B^{-1/2}AB^{-1/2})$. Finally $A-B\geq 0\Leftrightarro...
You can finish your own proof with the expression $QD$ using [this](https://math.stackexchange.com/questions/113842/is-the-product-of-symmetric-positive-semidefinite-matrices-positive-definite) answer. Since $Q$ is p.d., $QD$ has the same eigenvalues as $Q^{1/2}DQ^{1/2}$. Since $x^TQ^{1/2}DQ^{1/2} x = (Q^{1/2}x)^TD(Q^{...
53,373,683
I'm trying to access a system preference (`com.apple.menuextra.clock DateFormat` specifically) from my Swift app using UserDefaults. Using terminal, `defaults read com.apple.menuextra.clock` returns ``` { DateFormat = "EEE MMM d h:mm:ss a"; FlashDateSeparators = 0; IsAnalog = 0; } ``` However, if I do t...
2018/11/19
[ "https://Stackoverflow.com/questions/53373683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8457833/" ]
To anyone else who has this question in the future: I fixed it by turning off App Sandbox.
You were not searching in the right domain. When you call `dictionary(forKey:)`, `bool(forKey:)`, `integer(forKey:)`, etc, you are searching through a [hierarchy of domains](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/AboutPreferenceDomains/AboutPreferenceDomains.html#//apple...
25,954,227
I have a bootstrap navbar like follows ``` <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="/br/nd"><i class="fa fa-upload"></i>link1</a></li> <li><a href="/brand/all/show">link2</a></li> <li><a href="/trans_t"><i class="fa fa-random"></i>link3...
2014/09/20
[ "https://Stackoverflow.com/questions/25954227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/663011/" ]
So that it didn't interfere with the flow, on small viewports the element is position absolute, that's because the link in the navbar is a block and I didn't want to mess with it. On larger viewports, it centers below the text. Needs a wrapper to do this. Demo: <http://jsbin.com/gozumi/1/> ----------------------------...
it's simple! put your label inside your ancor: from: ``` <li><a href="/trans_t"><i class="fa fa-random"></i>link3</a><span class="label label-info">1</span></li> ``` to: ``` <li><a href="/trans_t"><i class="fa fa-random"></i>link3 <span class="label label-info">1</span></a></li> ``` <http://jsfiddle.net/cfvbea1...
158,759
How to format a text containing underscore (like for instance **"A\_B"**) to italic style ? Here's an example which fails in parsing somehow (from a quick test just on underscore): *A\_B*
2012/12/14
[ "https://meta.stackexchange.com/questions/158759", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/179541/" ]
I have changed (almost rewritten) the Markdown regular expressions for bold and italics: [client-side change](https://code.google.com/p/pagedown/source/detail?r=39afe9b2d865cce8e1aa0652215259167169006c), [server-side change](https://code.google.com/p/markdownsharp/source/detail?r=fb4e4b17de52d404e6c4d3f7fefd712f3b44feb...
Use a HTML tag (`<i>`), ``` <i>**A_B**</i> ``` produces ***A\_B***. The underscore makes Markdown fail to interpret the markup as intended.
284,252
I am working with rasters in arcpy and I am not able to access individual bands using the Raster class. The same code that worked about a year ago no longer works. I should be able to access a single band of a raster like so: `Band3 = Raster(raster_filename + "/Band_3")` But the resulting Band3 variable has all 6 b...
2018/05/25
[ "https://gis.stackexchange.com/questions/284252", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/121400/" ]
It depends on whether your band names are actually "Band\_1" to "Band\_N" or something else like 'CoastalAerosol', 'Blue', 'Green', 'Red', etc... If you want to access the bands by index, use the [Make Raster Layer (Data Management)](http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/make-raster-la...
You can acess the individual bandnames using the Describe's children property. ``` desc = arcpy.Describe(raster) for rband in desc.children: print rband.name ```
284,252
I am working with rasters in arcpy and I am not able to access individual bands using the Raster class. The same code that worked about a year ago no longer works. I should be able to access a single band of a raster like so: `Band3 = Raster(raster_filename + "/Band_3")` But the resulting Band3 variable has all 6 b...
2018/05/25
[ "https://gis.stackexchange.com/questions/284252", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/121400/" ]
It depends on whether your band names are actually "Band\_1" to "Band\_N" or something else like 'CoastalAerosol', 'Blue', 'Green', 'Red', etc... If you want to access the bands by index, use the [Make Raster Layer (Data Management)](http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/make-raster-la...
Hey I found that you actually need a backslash, in the python console the syntax looks something like: ``` out_raster = arcpy.ia.FocalStatistics(r"C:\Users\BigBoy\BigBoyTif.tif\Band_1",... ``` Meanwhile in geoprocessing it should be that the Input raster is C:\Users\BigBoy\BigBoyTif.tif\Band\_1
284,252
I am working with rasters in arcpy and I am not able to access individual bands using the Raster class. The same code that worked about a year ago no longer works. I should be able to access a single band of a raster like so: `Band3 = Raster(raster_filename + "/Band_3")` But the resulting Band3 variable has all 6 b...
2018/05/25
[ "https://gis.stackexchange.com/questions/284252", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/121400/" ]
You can acess the individual bandnames using the Describe's children property. ``` desc = arcpy.Describe(raster) for rband in desc.children: print rband.name ```
Hey I found that you actually need a backslash, in the python console the syntax looks something like: ``` out_raster = arcpy.ia.FocalStatistics(r"C:\Users\BigBoy\BigBoyTif.tif\Band_1",... ``` Meanwhile in geoprocessing it should be that the Input raster is C:\Users\BigBoy\BigBoyTif.tif\Band\_1
24,776
Consider the inner product by $\langle f,g \rangle\_{H^1} = \langle f, g \rangle\_{L^2} + \sum\_{|\alpha|=1} \langle D^\alpha f, D^\alpha g \rangle\_{L^2}$ where $\alpha$ is a multi-index and $D$ denotes the weak derivative. Define $H^1(\Omega)$ as the space of functions that are finite under the norm induced from this...
2011/03/03
[ "https://math.stackexchange.com/questions/24776", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1736/" ]
$L^2(\Omega)$ is a subspace of $H^{-1}(\Omega)$, the dual of $H^1(\Omega)$. Thus, a sequence converging weakly in $H^1$ converges weakly in $L^2$ to the same limit. In general, nothing can be said about strong convergence in $L^2$.
I don't see how a simple statement '$L^2(\Omega)$ is a subspace of $H^{-1}(\Omega)$' proves that the weakly converging sequence in $H^1$ converges to the same limit in $L^2$ because the inner products on $L^2$ and $H^1$ are different. Here is my attempt: Let $(u\_n)\_n$ be a sequence converging weakly to $u$ in $H^1$,...
5,338,604
I have a kinda awful problem with my WPF application right now... I have a custom UserControl used to edit details of a component. It should start by being not enabled, and become enabled as soon as the user chose a component to edit. The problem is: the IsEnabled property does not even change. Here is my code: ```...
2011/03/17
[ "https://Stackoverflow.com/questions/5338604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/664237/" ]
You should add a DependencyProperty for the binding to work properly. [See here for more information.](http://msdn.microsoft.com/en-us/library/ms752914.aspx) Code-behind: ``` public static readonly DependencyProperty EditorEnabledDependencyProperty = DependencyProperty.Register("EditorEnabled", typeof(bool), typeof(U...
The issue I think is that there is a binding on the DataContext property of the user control. Which means the EditorEnabled property should be a property in the VmComponent object. At least that's what my problem was. To get around it, I specified a proper source to the binding of IsEnabled. Once I did that the contr...
5,338,604
I have a kinda awful problem with my WPF application right now... I have a custom UserControl used to edit details of a component. It should start by being not enabled, and become enabled as soon as the user chose a component to edit. The problem is: the IsEnabled property does not even change. Here is my code: ```...
2011/03/17
[ "https://Stackoverflow.com/questions/5338604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/664237/" ]
You should add a DependencyProperty for the binding to work properly. [See here for more information.](http://msdn.microsoft.com/en-us/library/ms752914.aspx) Code-behind: ``` public static readonly DependencyProperty EditorEnabledDependencyProperty = DependencyProperty.Register("EditorEnabled", typeof(bool), typeof(U...
Encapsulating your control in a DockPanel (for example) will remove the need for a DependencyProperty. You can then simply do your binding with the dockpanel instead of the custom control. Setting the variable bound to IsEnabled on the Dockpanel will automatically enable or disable the items contained in the Dockpanel...
5,338,604
I have a kinda awful problem with my WPF application right now... I have a custom UserControl used to edit details of a component. It should start by being not enabled, and become enabled as soon as the user chose a component to edit. The problem is: the IsEnabled property does not even change. Here is my code: ```...
2011/03/17
[ "https://Stackoverflow.com/questions/5338604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/664237/" ]
The issue I think is that there is a binding on the DataContext property of the user control. Which means the EditorEnabled property should be a property in the VmComponent object. At least that's what my problem was. To get around it, I specified a proper source to the binding of IsEnabled. Once I did that the contr...
Encapsulating your control in a DockPanel (for example) will remove the need for a DependencyProperty. You can then simply do your binding with the dockpanel instead of the custom control. Setting the variable bound to IsEnabled on the Dockpanel will automatically enable or disable the items contained in the Dockpanel...
24,216,616
This is an architecture problem. Programmers encounter this encapsulation problem quite often, but I haven't yet seen a complete and clean solution. Related questions: [readonly class design when a non-readonly class is already in place](https://stackoverflow.com/questions/10014984/readonly-class-design-when-a-non-re...
2014/06/14
[ "https://Stackoverflow.com/questions/24216616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1497385/" ]
There are several sub-problems that have to be solved. 1. How to allow the "private API" code to access the private data without allowing the outside code to call it? 2. How to give the "private API" access to the object creator? 3. How to establish the two-way communication between the object and the code using the p...
How I do it =========== The question is quite interesting. I'm not in any way an expert in OOP (God! I wish I would!), but here is how I do it: ``` public interface IReadOnlyFoo { int SomeValue { get; } } public class Foo: IReadOnlyFoo { public int SomeValue { get; set; ...
50,908,898
I'm trying to maintain a huge iOS project which has more than a hundred of classes and cocoapods as dependence manager. When I try to do a "Find Call Hierarchy" on a function which has some uses, it doesn't show the uses of the function. Instead of showing anything, it plays a "beep" sound. No errors displayed. Mayb...
2018/06/18
[ "https://Stackoverflow.com/questions/50908898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479886/" ]
These features in Xcode are in general very very buggy so it is not weird at all for them not to work. I would suggest not to rely on Xcode and have a second window with for instance Appcode or VSCode on the project and do your searches in that.
After "Clean Build Folder" Xcode needs to re-index the project. Give Xcode some time to finish the indexing, after that "Find call hierarchy" should work again. Builds/Tests/etc may interrupt the indexing, so prepare for a coffee break.
4,879,897
I want to make a program that zip by backup files, but the program hangs when zipping files. I tried to use backgroundworker to execute the work. this is my code so far: ``` private: System::Void threadTest_Click(System::Object^ sender, System::EventArgs^ e) { debug->Text = L"Zipping..."; zip->Run...
2011/02/02
[ "https://Stackoverflow.com/questions/4879897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/228507/" ]
if RefreshAll make changes to GUI, you have to take care to the following rule: Never change the GUI from another thread than the main thread where the Gui was created. In you case you have to use Form::Invoke method to switch to the main thread like that ``` this->Invoke(gcnew RefreshAllDelegate(), new Object[] { m...
Delete all the code after RunWorkerAsync(), it will only make your app crash when the user closes the form while zipping is in progress. In the DoWork() method, use the bgw's ReportProgress() method to report progress. You can write an event handler for the event to update the UI. Move refreshAll() into the bgw's RunWo...
33,469,571
I have table view with a custom header view. In the header view I have a subview that is a UIImage. On rotation, the header view and it's subviews don't update to where they should be. Instead, they retain their positions until the user either presses a button, moves to a different page, etc. Essentially, their positio...
2015/11/02
[ "https://Stackoverflow.com/questions/33469571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5150474/" ]
Although it seems like overkill, this works well: ``` - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator { [coordinator animateAlongsideTransition: ^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) { [_myTableView relo...
in your rotation func: ``` self.view.layoutIfNeeded() ```
33,469,571
I have table view with a custom header view. In the header view I have a subview that is a UIImage. On rotation, the header view and it's subviews don't update to where they should be. Instead, they retain their positions until the user either presses a button, moves to a different page, etc. Essentially, their positio...
2015/11/02
[ "https://Stackoverflow.com/questions/33469571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5150474/" ]
in viewForHeaderInSection add a container like UIVIEW and then in container add childview like label then add this line ``` label.autoresizingMask = .flexibleWidth ```
in your rotation func: ``` self.view.layoutIfNeeded() ```
33,469,571
I have table view with a custom header view. In the header view I have a subview that is a UIImage. On rotation, the header view and it's subviews don't update to where they should be. Instead, they retain their positions until the user either presses a button, moves to a different page, etc. Essentially, their positio...
2015/11/02
[ "https://Stackoverflow.com/questions/33469571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5150474/" ]
in viewForHeaderInSection add a container like UIVIEW and then in container add childview like label then add this line ``` label.autoresizingMask = .flexibleWidth ```
Although it seems like overkill, this works well: ``` - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator { [coordinator animateAlongsideTransition: ^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) { [_myTableView relo...
16,154
I have an old Swiss Army Knife on which I can only open one blade; the rest are locked in place. How should I clean this, and is there anything else I should do to refurbish it, like oiling, after I clean it? This knife has been part of my daily carry for over a decade, and I carry it when I exercise, so I'm sure the ...
2017/05/16
[ "https://outdoors.stackexchange.com/questions/16154", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/13134/" ]
When mine gets too bad I use WD40 to free it up, then clean with soapy water and a brush. Mine also goes through the dishwasher sometimes, with the blades partially open. If it gets gummed up with sugary stuff (your candy, or cutting up fruit) a good soak in hot water will free up the blades. After cleaning it is a g...
The producer offers a page of care instructions on their website ([here](https://www.victorinox.com/de/en/Service/Swiss-Army-Knives/Swiss-Army-Knives-Care-Tips/cms/service-swiss-army-knife-care-tips)) (PDF). The gist is: * don't use a dishwasher, that might be too aggressive * open and close the blade multiple times i...
53,018,525
I know very little SQL and have been asked to fix a problem in existing code. The code is PHP but the SQL causing the problem is: ``` $sql = "INSERT INTO Intranet.dbo.DailyBilling (Date, JobCode, SubJob, TotalTTC, TotalATTC, CompletedBillableHours, WIP, CurrencyCode, ContractValue, Invoiced, BillableTotal, BillableTod...
2018/10/27
[ "https://Stackoverflow.com/questions/53018525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2259575/" ]
The line ``` <param-value>com.javapapers.webservices.rest.jersey</param-value> ``` should read ``` <param-value>com.login</param-value> ``` which is where you have your root resource...
You have to declare the package name of controller class in servlet.xml like ``` <context:component-scan base-package="com.dibyendu.controller"></context:component- scan> and use @Controller or @RestController in the LoginPage class so that it can be considered as Controller. ```
11,703,964
Text Selection Highlighting too much on either side because of padding. ![Text Selection Example](https://i.stack.imgur.com/zfAtB.png) <http://jsfiddle.net/JamesKyle/pA7BJ/> How do I fix this using CSS? I've tried a bunch of different things, none of which seem to work. (i.e. trying to use margin and other propertie...
2012/07/28
[ "https://Stackoverflow.com/questions/11703964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/847126/" ]
This is strange. However, changing CSS position seems to work, e.g.: ``` div.sizing-container { padding: 75px; position: relative; } ``` <http://jsfiddle.net/LJLdW/> Don't know if that is possible in your situation.
Changing the padding of `div.sizing-container` to `75px 0px 75px 0px` would fix this issue. The highlight is so large because of the padding on this element. Then you need to change add: ``` width: 93%; padding-left: 3%; ``` To the body. And then add 10px padding to `.sizing-container` That fixes it for me. Thats...
57,131,662
i have created a webview app for android studio. but didn't load the web url. the error is net::ERR\_ACCESS\_DENIED. can anyone help with this
2019/07/21
[ "https://Stackoverflow.com/questions/57131662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10005586/" ]
Remember if you need internet, you'll need to set the permission in the manifest, in the top add the Tag uses-permission like this ``` <uses-permission android:name="android.permission.INTERNET"/> ```
Here is a more likely scenario (than the one in the accepted answer) in which this error may appear if you're trying to access a file using `file://` in `WebView`. The default value of `setAllowFileAccess` was changed from `true` to `false` from Android 11. > > The default value is true for apps targeting `Build.VER...
57,131,662
i have created a webview app for android studio. but didn't load the web url. the error is net::ERR\_ACCESS\_DENIED. can anyone help with this
2019/07/21
[ "https://Stackoverflow.com/questions/57131662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10005586/" ]
In my case, it happened after upgrading my app to SDK 30. And the solution was: ``` WebSettings settings = webView.getSettings(); settings.setAllowFileAccess(true); ``` The default setting was true before but with SDK 30 it's false. So you explicitly need to allow access.
1. Provide permission in Android Manifest. `<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />` 2.Add `android:usesCleartextTraffic="true"` in <application tag in AndroidManifest File. 3.Add this Two Line in Class File where your ...
57,131,662
i have created a webview app for android studio. but didn't load the web url. the error is net::ERR\_ACCESS\_DENIED. can anyone help with this
2019/07/21
[ "https://Stackoverflow.com/questions/57131662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10005586/" ]
Remember if you need internet, you'll need to set the permission in the manifest, in the top add the Tag uses-permission like this ``` <uses-permission android:name="android.permission.INTERNET"/> ```
If not basic permissions, this can also happen if you're trying to load SSL encrypted webpage (starting with https://) and it throws any error. To take care of that, you can add: ```java // Ignoring SSL certificate errors @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError er) { ...
57,131,662
i have created a webview app for android studio. but didn't load the web url. the error is net::ERR\_ACCESS\_DENIED. can anyone help with this
2019/07/21
[ "https://Stackoverflow.com/questions/57131662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10005586/" ]
For me the problem was a bit silly, I had originally forgot to add `android:usesCleartextTraffic="true"` in the manifest and launched the app. After I added `android:usesCleartextTraffic="true"` it still gave `ERR_ACCESS_DENIED`. I then cleared the data, un-installed the app, re-installed it and bam, the error is gone.
If not basic permissions, this can also happen if you're trying to load SSL encrypted webpage (starting with https://) and it throws any error. To take care of that, you can add: ```java // Ignoring SSL certificate errors @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError er) { ...