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
47,580,313
I've searched around but couldn't find a solution for how to unstack and reorder a pandas dataframe. Suppose I have the following dataframe: ``` df = pd.DataFrame({'type': [1, 2, 2, 1, 2, 1, 2, 1, 2, 2], 'band': ['A', 'B', 'C', 'C', 'B', 'B', 'A', 'A', 'B', 'C'], 'val': [0.18, 0....
2017/11/30
[ "https://Stackoverflow.com/questions/47580313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5858851/" ]
It seems like you want [`sort_index`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort_index.html) on the columns: ``` df.groupby(['type', 'band']).mean().unstack(level=1)\ .sort_index(axis=1, ascending=False) ``` Result: ``` val band C B A type ...
The output of `df.groupby(['type', 'band']).mean().unstack(level=1)` is another DataFrame. You can do the following: ``` df = df.groupby(['type', 'band']).mean().unstack(level=1) df = df.reindex_axis(sorted(df.columns, reverse=True), axis=1) ```
47,125,274
i am try to display nested list using Laravel. ``` class Person extends Model { public function father() { return $this->belongsTo('App\Person', 'father_id'); } } ``` I can access Data manually like bellow. ``` user = \App\Person::find(5); $this->tree_string .= "<li>"; $this->tree_string ...
2017/11/05
[ "https://Stackoverflow.com/questions/47125274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82457/" ]
Two options: 1. You can prepare your data in advance in controller and then just iterate over prepared data in Blade template using `foreach` loop: ```php @foreach ($users as $user) <ul> <li> <label> {{ $user->name }} </label> <li> </ul> @endforeach ``` 2. You can use `include` t...
Hope to understand your question correct. You want to foreach (for example) in your blade, go like this ``` @foreach ($users as $user) <p>This is user {{ $user->id }}</p> @endforeach ```
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
A counterexample is given in Section II.5.3, p. 111 of T. Kato, Perturbation Theory for Linear Operators, 2nd ed.
Consider the symmetric matrices associated to orthogonal reflections of the Euclidean plane. Since a line comes back to itself after a half-turn, you get a family indexed by $[0,\pi]$ describing a closed path in the set of symmetric matrices. A corresponding eigenvector of eigenvalue $1$ and norm $1$, deformed continuo...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
A counterexample is given in Section II.5.3, p. 111 of T. Kato, Perturbation Theory for Linear Operators, 2nd ed.
Set $c:=\cos\frac1t$ and $s:=\sin\frac1t$. Choose a function $\phi$ that is flat at $t=0$ ($\phi$ and all its derivatives vanish at $t=0$). Then set $$A(t):=\begin{pmatrix} \phi c^2 & -\phi sc \\\\ -\phi sc & \phi s^2 \end{pmatrix}.$$ This symmetric matrix is a $\mathcal C^\infty$-function of $t$. Yet its eigenvectors ...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
A counterexample is given in Section II.5.3, p. 111 of T. Kato, Perturbation Theory for Linear Operators, 2nd ed.
The answer is yes for real analytic or quasi-analytic parametrizations, see the following paper, also for an overview on different types of parametrizations: Andreas Kriegl, Peter W. Michor, Armin Rainer: Denjoy-Carleman differentiable perturbation of polynomials and unbounded operators. Integral Equations and Operator...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
Set $c:=\cos\frac1t$ and $s:=\sin\frac1t$. Choose a function $\phi$ that is flat at $t=0$ ($\phi$ and all its derivatives vanish at $t=0$). Then set $$A(t):=\begin{pmatrix} \phi c^2 & -\phi sc \\\\ -\phi sc & \phi s^2 \end{pmatrix}.$$ This symmetric matrix is a $\mathcal C^\infty$-function of $t$. Yet its eigenvectors ...
Consider the symmetric matrices associated to orthogonal reflections of the Euclidean plane. Since a line comes back to itself after a half-turn, you get a family indexed by $[0,\pi]$ describing a closed path in the set of symmetric matrices. A corresponding eigenvector of eigenvalue $1$ and norm $1$, deformed continuo...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
The question is whether you want to diagonalize an endomorphism or a bilinear form. Both problems are not equivalent (unfortunately sometimes confused in weaker linear algebra textbooks), diagonalizing bilinear forms is much easier. If the forms are positive definite, then the Gram-Schmidt process works with smooth fam...
Consider the symmetric matrices associated to orthogonal reflections of the Euclidean plane. Since a line comes back to itself after a half-turn, you get a family indexed by $[0,\pi]$ describing a closed path in the set of symmetric matrices. A corresponding eigenvector of eigenvalue $1$ and norm $1$, deformed continuo...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
The answer is yes for real analytic or quasi-analytic parametrizations, see the following paper, also for an overview on different types of parametrizations: Andreas Kriegl, Peter W. Michor, Armin Rainer: Denjoy-Carleman differentiable perturbation of polynomials and unbounded operators. Integral Equations and Operator...
Consider the symmetric matrices associated to orthogonal reflections of the Euclidean plane. Since a line comes back to itself after a half-turn, you get a family indexed by $[0,\pi]$ describing a closed path in the set of symmetric matrices. A corresponding eigenvector of eigenvalue $1$ and norm $1$, deformed continuo...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
The question is whether you want to diagonalize an endomorphism or a bilinear form. Both problems are not equivalent (unfortunately sometimes confused in weaker linear algebra textbooks), diagonalizing bilinear forms is much easier. If the forms are positive definite, then the Gram-Schmidt process works with smooth fam...
Set $c:=\cos\frac1t$ and $s:=\sin\frac1t$. Choose a function $\phi$ that is flat at $t=0$ ($\phi$ and all its derivatives vanish at $t=0$). Then set $$A(t):=\begin{pmatrix} \phi c^2 & -\phi sc \\\\ -\phi sc & \phi s^2 \end{pmatrix}.$$ This symmetric matrix is a $\mathcal C^\infty$-function of $t$. Yet its eigenvectors ...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
Set $c:=\cos\frac1t$ and $s:=\sin\frac1t$. Choose a function $\phi$ that is flat at $t=0$ ($\phi$ and all its derivatives vanish at $t=0$). Then set $$A(t):=\begin{pmatrix} \phi c^2 & -\phi sc \\\\ -\phi sc & \phi s^2 \end{pmatrix}.$$ This symmetric matrix is a $\mathcal C^\infty$-function of $t$. Yet its eigenvectors ...
The answer is yes for real analytic or quasi-analytic parametrizations, see the following paper, also for an overview on different types of parametrizations: Andreas Kriegl, Peter W. Michor, Armin Rainer: Denjoy-Carleman differentiable perturbation of polynomials and unbounded operators. Integral Equations and Operator...
60,533
This question is related to [another question](https://mathoverflow.net/questions/43124/conditions-for-smooth-dependence-of-the-eigenvalues-and-eigenvectors-of-a-matrix), but it is definitely not the same. **Is it always possible to diagonalize (at least locally around each point) a family of symmetric real matrices $...
2011/04/04
[ "https://mathoverflow.net/questions/60533", "https://mathoverflow.net", "https://mathoverflow.net/users/10095/" ]
The question is whether you want to diagonalize an endomorphism or a bilinear form. Both problems are not equivalent (unfortunately sometimes confused in weaker linear algebra textbooks), diagonalizing bilinear forms is much easier. If the forms are positive definite, then the Gram-Schmidt process works with smooth fam...
The answer is yes for real analytic or quasi-analytic parametrizations, see the following paper, also for an overview on different types of parametrizations: Andreas Kriegl, Peter W. Michor, Armin Rainer: Denjoy-Carleman differentiable perturbation of polynomials and unbounded operators. Integral Equations and Operator...
1,402,327
My scenario: ``` $exTime = get_cfg_var("session.gc_maxlifetime")?get_cfg_var("session.gc_maxlifetime"):1440; ``` I'd like it to be like mysql: ``` $exTime = isnull(get_cfg_var("session.gc_maxlifetime"),1440); ``` or something like it that would also test for FALSE ideally. That way I'd only have to call the funct...
2009/09/09
[ "https://Stackoverflow.com/questions/1402327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146406/" ]
As of PHP 5.3 you could also use the [short ternary operator](http://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary): ``` $exTime = get_cfg_var("session.gc_maxlifetime") ?: 1440; ``` This is basically your anticipated functionality but without having to declare the func...
How about adding this small function? ``` function isnull($var, $default=null) { return is_null($var) ? $default : $var; } ``` I don't know of any function that does what you want, but since it's not *that* hard to implement you might as well do that if you use it a lot.
48,939,630
I am trying to use the following code in Powershell to get the Active Directory groups for the current user so I can perform specific actions based on what groups the user belongs to. Here is the code: ``` $id = [Security.Principal.WindowsIdentity]::GetCurrent() $groups = $id.Groups | foreach-object { $_.Translate([S...
2018/02/23
[ "https://Stackoverflow.com/questions/48939630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9399275/" ]
You can use the `System.DirectoryServices.AccountManagement` namespace like this: ``` [System.Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices.AccountManagement") [System.DirectoryServices.AccountManagement.UserPrincipal]::get_Current().GetAuthorizationGroups() ```
Here are few ways to attack this effort. Using DOS commands, but then you have to turn them into object and extract what you are after. ``` gpresult /V /user $env:USERNAME whoami /GROUPS net user $env:USERNAME /Domain ``` PoSh, just doing something like the following... This gets all users, but you can of course fi...
73,279,870
I've written a small script to append a character to the end of each line of a text file, "," in my case. This will be shared with my team, so rather than have them update the script itself I thought it would be easier to simply define a variable at the start they can change. However, it takes 'char' as a literal str...
2022/08/08
[ "https://Stackoverflow.com/questions/73279870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16690173/" ]
You were passing variable name as string instead of passing the variable. Try this: ``` file = 'test.txt' # file to append text to, keep the '' char = ',' newf="" with open(file,'r') as f: for line in f: newf+=line.strip()+char+'\n' f.close() with open(file,'w') as f: f.write(newf) f.close() ```
As `char` is a variable you have to place it outside the quotation marks, otherwise it is interpreted as a string. ``` file = 'test.txt' # file to append text to, keep the '' char = ',' newf="" with open(file,'r') as f: for line in f: newf+=line.strip()+ char + '\n' with open(file,'w') as f: f.write(...
218,435
We are putting a sign and several lights in our parking lot and need a 60 amp panel to be located 400 feet from the breaker box. Allowing for the voltage drop, what size wire do we need to run? Thank you. North America is the location. The sign is 120 volt, 20 AMP in a dedicated circuit There will be three 120 volt, 3...
2021/03/10
[ "https://diy.stackexchange.com/questions/218435", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/131386/" ]
Do we care about *money* here? ------------------------------ An oddity of wire economics is that 2-2-2-4 "MH Feeder" (90A; 100A if service) is about the same cost as 10-3 UF-B cable (30A). The difference is aluminum, which is absolutely fine for large feeders of #2 size. (not so good for #10, but not our problem). B...
Assuming since this is commercial that it is probably 208v 3Ø, and that whoever told you you needed a 60A panel knew that signs and lights were rated as continuous loads, and they told you 60A panel based on 125% of actual load, and your voltage drop tolerance is 3%, then you are looking at about #2 awg copper or 2/0 a...
218,435
We are putting a sign and several lights in our parking lot and need a 60 amp panel to be located 400 feet from the breaker box. Allowing for the voltage drop, what size wire do we need to run? Thank you. North America is the location. The sign is 120 volt, 20 AMP in a dedicated circuit There will be three 120 volt, 3...
2021/03/10
[ "https://diy.stackexchange.com/questions/218435", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/131386/" ]
Do we care about *money* here? ------------------------------ An oddity of wire economics is that 2-2-2-4 "MH Feeder" (90A; 100A if service) is about the same cost as 10-3 UF-B cable (30A). The difference is aluminum, which is absolutely fine for large feeders of #2 size. (not so good for #10, but not our problem). B...
You really don't need a 60A subpanel. You generally don't (but technically could) put in a subpanel for 20A. 60A is a standard size and the usual minimum size. In fact, you may not *need* a subpanel at all. However, you likely **do** need a shutoff switch (which the main breaker in a subpanel provides). You can also, ...
3,422,557
We have production Tomcat (6.0.18) server which runs with the following settings: ``` -server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -...
2010/08/06
[ "https://Stackoverflow.com/questions/3422557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/298182/" ]
Seems that this problem was caused by a very high number of page faults JVM had. Most likely when Sun's JVM experiences a lot of page faults it starts to allocate additional virtual memory (still don't know why) which may in turn increase IO pressure even more and so on. As a result we got a very high virtual memory co...
You might want to try to hook up a JConsole to your JVM and look at the memory allocation... Maybe your Perm space is taking this extra 2GB... Heap is only a portion of what your VM needs to be alive...
3,422,557
We have production Tomcat (6.0.18) server which runs with the following settings: ``` -server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -...
2010/08/06
[ "https://Stackoverflow.com/questions/3422557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/298182/" ]
> > -Xms7000M -Xmx7000M > > > That to me is saying to the JVM "allocate 7gb as an initial heap size with a maximum of 7gb". So the process will always be 7gb to the OS as that's what the JVM has asked for via the Xms flag. What it's actually using internal to the JVM is what is being reported as the heap size of ...
You might want to try to hook up a JConsole to your JVM and look at the memory allocation... Maybe your Perm space is taking this extra 2GB... Heap is only a portion of what your VM needs to be alive...
3,422,557
We have production Tomcat (6.0.18) server which runs with the following settings: ``` -server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -...
2010/08/06
[ "https://Stackoverflow.com/questions/3422557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/298182/" ]
Seems that this problem was caused by a very high number of page faults JVM had. Most likely when Sun's JVM experiences a lot of page faults it starts to allocate additional virtual memory (still don't know why) which may in turn increase IO pressure even more and so on. As a result we got a very high virtual memory co...
> > -Xms7000M -Xmx7000M > > > That to me is saying to the JVM "allocate 7gb as an initial heap size with a maximum of 7gb". So the process will always be 7gb to the OS as that's what the JVM has asked for via the Xms flag. What it's actually using internal to the JVM is what is being reported as the heap size of ...
3,422,557
We have production Tomcat (6.0.18) server which runs with the following settings: ``` -server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -...
2010/08/06
[ "https://Stackoverflow.com/questions/3422557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/298182/" ]
Seems that this problem was caused by a very high number of page faults JVM had. Most likely when Sun's JVM experiences a lot of page faults it starts to allocate additional virtual memory (still don't know why) which may in turn increase IO pressure even more and so on. As a result we got a very high virtual memory co...
I'm not familiar with jconsole, but are you sure the JVM is using the extra 2Gb? It looks to me like it's the OS or other processes that bring the total up to 9Gb. Also, a common explanation for a JVM using significantly more virtual memory than the -Xmx param allows is that you have memory-mapped-files (MappedByteBuf...
3,422,557
We have production Tomcat (6.0.18) server which runs with the following settings: ``` -server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -...
2010/08/06
[ "https://Stackoverflow.com/questions/3422557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/298182/" ]
> > -Xms7000M -Xmx7000M > > > That to me is saying to the JVM "allocate 7gb as an initial heap size with a maximum of 7gb". So the process will always be 7gb to the OS as that's what the JVM has asked for via the Xms flag. What it's actually using internal to the JVM is what is being reported as the heap size of ...
I'm not familiar with jconsole, but are you sure the JVM is using the extra 2Gb? It looks to me like it's the OS or other processes that bring the total up to 9Gb. Also, a common explanation for a JVM using significantly more virtual memory than the -Xmx param allows is that you have memory-mapped-files (MappedByteBuf...
57,945,637
I'm using Amazon Linux with Python 2.7.16 preinstalled. Currently, I'm doing a cron job, trying to run python in a shell script using Python 3.7.3. I have it available at `/usr/local/bin/python3.7` and `alias python=python3.7` in `~/.bashrc`. However, when I call `which python` in the shell script. I'm getting `/usr/b...
2019/09/15
[ "https://Stackoverflow.com/questions/57945637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6549481/" ]
Not sure where you were expecting the error, but I would recommend adding the `State` type to the input as well since the first argument should also follow that type (and the `initialState`). Here is a full example: ```js type State = { foo: string; }; const initialState: State = { foo: "bar" } function reducer...
There is a `Reducer` export from `redux` whose type arguments are `<State, Actions>`, use that.
46,522,317
I have 2 csv files, these are their contents. **file1(23 fields)** ``` data11,data12,ID1,data14... data21,data22,ID2,data24... data31,data32,ID3,data34... ``` **file2 (22 fields)** ``` ID1,value12,value13,... ID1,value22,value23,... ID1,value32,value33,... ID2,value42,value43,... ID3,value52,value53,... ``...
2017/10/02
[ "https://Stackoverflow.com/questions/46522317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use `join` ..Specify the column order required for output after `-o` eg: 1.1 refers 1st column of 1st (`file1`) file. It is also required to pre-sort the input files ``` join -t "," -1 3 -2 1 -o 1.1,1.2,1.3,1.4,2.2,2.3 <( sort -t "," -k3 /tmp/file1 ) <( sort -t "," -k1 /tmp/file2 ) ```
Sorry, my fault to misunderstand ur problem, try the following cmd, it should be what u want: ``` for line1 in `cat file1`;do id=`echo $line1|awk -F ',' '{print $3}'`;\ awk -v id=$id -v line1=$line1 -F ',' '($1==id){print line1","$0}' file2;done ``` the output of this cmd is ``` data11,data12,ID1,data14...,ID1,valu...
21,055,135
I'm trying to have several views access the same variable. I guess the easy solution would be to have a controller store the variable for views. But is there anyway to declare static variables in ember?
2014/01/10
[ "https://Stackoverflow.com/questions/21055135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1043993/" ]
Solution is to reopen class and add in the static variable like so. [What is the ember.js idiomatic way to create static variables in model?](https://stackoverflow.com/questions/15489247/what-is-the-ember-js-idiomatic-way-to-create-static-variables-in-model)
You also can define an view and set the static variables in it, and other views extend this view.
21,055,135
I'm trying to have several views access the same variable. I guess the easy solution would be to have a controller store the variable for views. But is there anyway to declare static variables in ember?
2014/01/10
[ "https://Stackoverflow.com/questions/21055135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1043993/" ]
Solution is to reopen class and add in the static variable like so. [What is the ember.js idiomatic way to create static variables in model?](https://stackoverflow.com/questions/15489247/what-is-the-ember-js-idiomatic-way-to-create-static-variables-in-model)
There are two ways to define variable to behave like static variable in Ember object. One way is in reopenClass function and another way is to define variable when defining the class in extend function of Ember.Object. The example bellow show these two ways. ``` App.Person = Ember.Object.extend({ data2: "Boban", /...
21,055,135
I'm trying to have several views access the same variable. I guess the easy solution would be to have a controller store the variable for views. But is there anyway to declare static variables in ember?
2014/01/10
[ "https://Stackoverflow.com/questions/21055135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1043993/" ]
There are two ways to define variable to behave like static variable in Ember object. One way is in reopenClass function and another way is to define variable when defining the class in extend function of Ember.Object. The example bellow show these two ways. ``` App.Person = Ember.Object.extend({ data2: "Boban", /...
You also can define an view and set the static variables in it, and other views extend this view.
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
> > How would one go about using php include() with GET paramters on the end of the included path? > > > You *could* write into `$_GET`: ``` $_GET["id"] = 5; // Don't do this at home! include("....."); ``` but that feels kludgy and wrong. If at all possible, make the included file accept normal variables: ``...
You don't, `include` loads files via the local filesystem.
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
You don't, `include` loads files via the local filesystem.
If you really wanted to, you could just do this, which would have the same result. ``` <?php $_GET['id'] = 5; include "/home/site/public_html/script.php"; ?> ``` but then you might as well just define the variable and include it ``` <?php $id = 5; include "/home/site/public_html/script.php"; ?> ``...
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
You don't, `include` loads files via the local filesystem.
Well you could use: ``` include("http://localhost/include/that/thing.php?id=554&y=16"); ``` But that's very seldomly useful. It **might** be possible to write a [stream wrapper](http://php.net/manual/en/function.stream-wrapper-register.php) for that, so it becomes possible for local scripts too. ``` include("withv...
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
> > How would one go about using php include() with GET paramters on the end of the included path? > > > You *could* write into `$_GET`: ``` $_GET["id"] = 5; // Don't do this at home! include("....."); ``` but that feels kludgy and wrong. If at all possible, make the included file accept normal variables: ``...
If you really wanted to, you could just do this, which would have the same result. ``` <?php $_GET['id'] = 5; include "/home/site/public_html/script.php"; ?> ``` but then you might as well just define the variable and include it ``` <?php $id = 5; include "/home/site/public_html/script.php"; ?> ``...
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
> > How would one go about using php include() with GET paramters on the end of the included path? > > > You *could* write into `$_GET`: ``` $_GET["id"] = 5; // Don't do this at home! include("....."); ``` but that feels kludgy and wrong. If at all possible, make the included file accept normal variables: ``...
Well you could use: ``` include("http://localhost/include/that/thing.php?id=554&y=16"); ``` But that's very seldomly useful. It **might** be possible to write a [stream wrapper](http://php.net/manual/en/function.stream-wrapper-register.php) for that, so it becomes possible for local scripts too. ``` include("withv...
4,987,990
How would one go about using php include() with GET paramters on the end of the included path? IE: ``` include("/home/site/public_html/script.php?id=5"); ```
2011/02/14
[ "https://Stackoverflow.com/questions/4987990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518513/" ]
If you really wanted to, you could just do this, which would have the same result. ``` <?php $_GET['id'] = 5; include "/home/site/public_html/script.php"; ?> ``` but then you might as well just define the variable and include it ``` <?php $id = 5; include "/home/site/public_html/script.php"; ?> ``...
Well you could use: ``` include("http://localhost/include/that/thing.php?id=554&y=16"); ``` But that's very seldomly useful. It **might** be possible to write a [stream wrapper](http://php.net/manual/en/function.stream-wrapper-register.php) for that, so it becomes possible for local scripts too. ``` include("withv...
206,216
[![enter image description here](https://i.stack.imgur.com/JiHCT.jpg)](https://i.stack.imgur.com/JiHCT.jpg) When users hover over the like column, they can see all the likers (users who liked the item.) I wonder where does SharePoint store those information "likedby", and how can I retrieve it? For example, if I adde...
2017/01/26
[ "https://sharepoint.stackexchange.com/questions/206216", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/50394/" ]
First problem I see is that you are incorrectly selecting your elements. None of them are H3 elements, so that was your primary issue. Their classes had h3' in them, so I can see the confusion. Anyways - heres some code that works. ``` <script type="text/javascript" language="javascript"> $(document).ready(functio...
Why code? --------- Use CSS pseudo selectors to check if the first option is checked and add content after the label ``` input[type="radio"]:nth-child(1):checked+label:after{ color:green; content:'Was Hidden'; } ```
206,216
[![enter image description here](https://i.stack.imgur.com/JiHCT.jpg)](https://i.stack.imgur.com/JiHCT.jpg) When users hover over the like column, they can see all the likers (users who liked the item.) I wonder where does SharePoint store those information "likedby", and how can I retrieve it? For example, if I adde...
2017/01/26
[ "https://sharepoint.stackexchange.com/questions/206216", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/50394/" ]
First problem I see is that you are incorrectly selecting your elements. None of them are H3 elements, so that was your primary issue. Their classes had h3' in them, so I can see the confusion. Anyways - heres some code that works. ``` <script type="text/javascript" language="javascript"> $(document).ready(functio...
Messed around some more and got it to work. Had to add the line with "Operations". ``` <script type="text/javascript" language="javascript"> $(document).ready(function() { $('H3.ms-standardheader:contains("Was Hidden")').closest("tr").hide();//Hide the text box $('H3.ms-standardheader:contains("Operations")')....
59,463,798
In my project I have run into some issues regarding returning nested JSON data using Kotlin, Retrofit and RxJava inside an MVVM pattern. I'm relatively new to RxJava, MVVM and Retrofit and am quite confused still, but I would like to end up with having a list of a a select category that is currently nested inside a JS...
2019/12/24
[ "https://Stackoverflow.com/questions/59463798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11312112/" ]
You don't actually seem to use Retrofit here. Here is how to do it in Retrofit and Coroutines - you might need to study coroutines if you are not familiar with the subject: ``` data class ApiResultModel ( val totalResults : Int ) data class Story ( val source : Source, val author : String, val title ...
please try this ``` interface StoriesApi { @GET("v2/top-headlines?country=us&apiKey=###MYKEY###") fun getStories(): Single<Story> /* change this */ } class StoriesService { @Inject lateinit var api: StoriesApi init { DaggerApiComponent.create().inject(this) } /* Change this*/ ...
59,463,798
In my project I have run into some issues regarding returning nested JSON data using Kotlin, Retrofit and RxJava inside an MVVM pattern. I'm relatively new to RxJava, MVVM and Retrofit and am quite confused still, but I would like to end up with having a list of a a select category that is currently nested inside a JS...
2019/12/24
[ "https://Stackoverflow.com/questions/59463798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11312112/" ]
You don't actually seem to use Retrofit here. Here is how to do it in Retrofit and Coroutines - you might need to study coroutines if you are not familiar with the subject: ``` data class ApiResultModel ( val totalResults : Int ) data class Story ( val source : Source, val author : String, val title ...
Step :1 Create Retrofit Singleton class ``` object RetrofitClient { var loggingInterceptor = HttpLoggingInterceptor() .setLevel(HttpLoggingInterceptor.Level.BASIC) var okHttpClient = OkHttpClient.Builder() .addInterceptor(loggingInterceptor) .build() var service: ApiInterface init { val retrofit = Ret...
40,724,520
I'm trying to parse the end of a url and redirect depending on it's ending. For example, if I'm going to `www.something.com/foo/1/` I want to redirect to `www.something.com/foo/1/bar`. The 1 in this case can be any positive integer. What I've been trying with but can't get to work is: `if (window.location.href.end...
2016/11/21
[ "https://Stackoverflow.com/questions/40724520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1140623/" ]
In your code [`endsWith('/foo/\d/')`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith) check the string is ending with that particular string argument and won't work as a regex. For checking using regex use [`RegExp#test`](https://developer.mozilla.org/en-US/docs/Web/JavaS...
You can regex match for the end of string instead, ``` /.*foo\d/$/ ``` My regex might be wrong, but you can use the $ to denote end of string and just do a regular regex.test
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
When `pip` tries to install a package, it looks for `setup.py`, which `dbus-python` doesn't have, so you'll have to [download the source](http://dbus.freedesktop.org/releases/dbus-python/) and compile it manually. Shouldn't be too hard: ``` PYTHON=python3.3 ./configure --prefix=/tmp/dbus-python make make install ``` ...
@TheMeaningfulEngineer thank so much, i have being having a few problem to install dbus through pip and that was what i needed i hope you have a good day wherever you are ;) to check if there is in local - `sudo apt list --installed | grep package-name` ``` sudo apt-get install libdbus-glib-1-dev libdbus-1-dev ``` ...
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
The OP appears to have opened a [ticket on freedesktop.org](https://bugs.freedesktop.org/show_bug.cgi?id=55439) for this, which remains open; however there is a [patch attached to that ticket](https://bugs.freedesktop.org/attachment.cgi?id=80061) that could be applied to most any version of python-dbus and then repacka...
@TheMeaningfulEngineer thank so much, i have being having a few problem to install dbus through pip and that was what i needed i hope you have a good day wherever you are ;) to check if there is in local - `sudo apt list --installed | grep package-name` ``` sudo apt-get install libdbus-glib-1-dev libdbus-1-dev ``` ...
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
When `pip` tries to install a package, it looks for `setup.py`, which `dbus-python` doesn't have, so you'll have to [download the source](http://dbus.freedesktop.org/releases/dbus-python/) and compile it manually. Shouldn't be too hard: ``` PYTHON=python3.3 ./configure --prefix=/tmp/dbus-python make make install ``` ...
Another workaround is to just manually copy the `dbus` files/libraries directly to your virtualenv: ``` cp -r /usr/lib/pythonX.X/{site or dist}-packages/dbus myvirtenv/usr/lib/pythonX.X/site-packages/ cp -r /usr/lib/pythonX.X/{site or dist}-packages/_dbus_*.so myvirtenv/usr/lib/pythonX.X/site-packages/ ```
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
@TheMeaningfulEngineer thank so much, i have being having a few problem to install dbus through pip and that was what i needed i hope you have a good day wherever you are ;) to check if there is in local - `sudo apt list --installed | grep package-name` ``` sudo apt-get install libdbus-glib-1-dev libdbus-1-dev ``` ...
For Python as **dbus-python** is now obsolete, you should be using **pydbus**: --- ``` pip install pydbus ``` This have worked for me.
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
When `pip` tries to install a package, it looks for `setup.py`, which `dbus-python` doesn't have, so you'll have to [download the source](http://dbus.freedesktop.org/releases/dbus-python/) and compile it manually. Shouldn't be too hard: ``` PYTHON=python3.3 ./configure --prefix=/tmp/dbus-python make make install ``` ...
For Python as **dbus-python** is now obsolete, you should be using **pydbus**: --- ``` pip install pydbus ``` This have worked for me.
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
When `pip` tries to install a package, it looks for `setup.py`, which `dbus-python` doesn't have, so you'll have to [download the source](http://dbus.freedesktop.org/releases/dbus-python/) and compile it manually. Shouldn't be too hard: ``` PYTHON=python3.3 ./configure --prefix=/tmp/dbus-python make make install ``` ...
The OP appears to have opened a [ticket on freedesktop.org](https://bugs.freedesktop.org/show_bug.cgi?id=55439) for this, which remains open; however there is a [patch attached to that ticket](https://bugs.freedesktop.org/attachment.cgi?id=80061) that could be applied to most any version of python-dbus and then repacka...
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
Another workaround is to just manually copy the `dbus` files/libraries directly to your virtualenv: ``` cp -r /usr/lib/pythonX.X/{site or dist}-packages/dbus myvirtenv/usr/lib/pythonX.X/site-packages/ cp -r /usr/lib/pythonX.X/{site or dist}-packages/_dbus_*.so myvirtenv/usr/lib/pythonX.X/site-packages/ ```
For Python as **dbus-python** is now obsolete, you should be using **pydbus**: --- ``` pip install pydbus ``` This have worked for me.
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
Another workaround is to just manually copy the `dbus` files/libraries directly to your virtualenv: ``` cp -r /usr/lib/pythonX.X/{site or dist}-packages/dbus myvirtenv/usr/lib/pythonX.X/site-packages/ cp -r /usr/lib/pythonX.X/{site or dist}-packages/_dbus_*.so myvirtenv/usr/lib/pythonX.X/site-packages/ ```
@TheMeaningfulEngineer thank so much, i have being having a few problem to install dbus through pip and that was what i needed i hope you have a good day wherever you are ;) to check if there is in local - `sudo apt list --installed | grep package-name` ``` sudo apt-get install libdbus-glib-1-dev libdbus-1-dev ``` ...
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
When `pip` tries to install a package, it looks for `setup.py`, which `dbus-python` doesn't have, so you'll have to [download the source](http://dbus.freedesktop.org/releases/dbus-python/) and compile it manually. Shouldn't be too hard: ``` PYTHON=python3.3 ./configure --prefix=/tmp/dbus-python make make install ``` ...
My suggestion is to install the system package for the Python DBUS bindings and then create the *virtualenv* with the `--system-site-packages` command line option to enable access to the system-wide Python packages (including the `dbus` package) from the activated *virtualenv*. For example on Debian/Ubuntu (or a derive...
13,365,697
I am running an application in a virtual environment that needs access to DBus (to interact with the Network Manager, mainly). I tried to install Dbus-Python with easyinstall and pip, but both fail. When I try to do this: ``` (myvirtualenv)borrajax@borrajax-computer:~/Documents/Projects/VirtualEnvs/current_env$ bin/...
2012/11/13
[ "https://Stackoverflow.com/questions/13365697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289011/" ]
The OP appears to have opened a [ticket on freedesktop.org](https://bugs.freedesktop.org/show_bug.cgi?id=55439) for this, which remains open; however there is a [patch attached to that ticket](https://bugs.freedesktop.org/attachment.cgi?id=80061) that could be applied to most any version of python-dbus and then repacka...
For Python as **dbus-python** is now obsolete, you should be using **pydbus**: --- ``` pip install pydbus ``` This have worked for me.
37,023,835
I need to find the dot between two quotation marks, and substitute it with a comma. I'm trying with this ``` \".*?\" ``` but it finds everything between the quotation marks. I need to transform something like this "100,21$" into this "100.21$"
2016/05/04
[ "https://Stackoverflow.com/questions/37023835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2611435/" ]
In general, you can *match* quoted substrings first with a ``` "[^"]+" ``` and then replace the `.` with `,` in the matched block (in a callback, or a post-process method/function). Alternatively, you might use capturing + backreferences: ``` "(\d*),(\d+\$)" ``` to replace with `"$1.$2"` (where `$1` is the text ...
If your string is simple like your exemple : `"100,21$"` You can simple use this code : ``` str = str.replace(/,/g,'.'); ``` If it's a little bit more complex like : ``` Here is an "example" of "100,21$" price, I am a string ``` You can use this : ``` str = str.replace(/"(\d+),(\d+)(.*?)"/g,'"$1.$2$3") ``` ...
66,436,161
I don't really what's going on. I keep getting the error... ``` /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure you can run `$ bundle ex...
2021/03/02
[ "https://Stackoverflow.com/questions/66436161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8050183/" ]
How about using the [jython evaluator](https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Processors/Jython.html) and 'state' object. You can (carefully) use the state object for a cache and just add a field to a record before sending to elastic.
In the end I just gave up (even streamsets consultants didnt know) and wrote it myself in threaded java using ElasticSearch API classes
66,436,161
I don't really what's going on. I keep getting the error... ``` /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure you can run `$ bundle ex...
2021/03/02
[ "https://Stackoverflow.com/questions/66436161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8050183/" ]
How about using the [jython evaluator](https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Processors/Jython.html) and 'state' object. You can (carefully) use the state object for a cache and just add a field to a record before sending to elastic.
You can also setup JDBC driver for elasicsearch. <https://www.elastic.co/guide/en/elasticsearch/reference/master/sql-jdbc.html> And then use JDBC lookup stage in your pipeline. JDBC lookup stage supports providing a JDBC driver class. <https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGu...
29,614,943
I am working through the golang tour and I am stuck in one of the exercises. I am not sure why the following does not work for a String() function: ``` type IPAddr [4]byte func (addr IPAddr) String() string { return string(addr[0]) + "." + string(addr[1]) + "." + string(addr[2]) + "." + string(addr[3]) } func ma...
2015/04/13
[ "https://Stackoverflow.com/questions/29614943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/269106/" ]
What's happening there is that you're passing the byte e.g. 127 directly into string and expecting it to represent that byte as the integer 127 before converting it into a string. Instead what it's doing is interpreting it as a character with the byte value 127. Instead you should convert that byte value into an integ...
A more efficient implementation with less temporary memory allocations: ``` func (addr IPAddr) String() string { buf := make([]byte, 0, 3+1+3+1+3+1+3) return string( strconv.AppendInt( append( strconv.AppendInt( append( strconv.App...
23,096,876
**Bottom Line** I have inherited a sizeable InstallShield InstallScript installer, and in working through its InstallScript (`*.rul`) source files, I notice that variable and parameter data types' casing varies - for what *appear* to be the same data types. For example, I see variables and parameters of type `number` ...
2014/04/16
[ "https://Stackoverflow.com/questions/23096876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810429/" ]
The answers are *sometimes* and *it depends*. The InstallScript Language Reference's [Data Types and Predefined Structures](http://helpnet.installshield.com/installshield18helplib/mergedProjects/installshield18langref/LangrefData_types.htm) section outlines the rules for data-type casing and indicates "that some data ...
Let me just add this as a separate answer to list some good information sources. Check for common Installshield runtime errors and bugs here: <http://consumer.installshield.com/common.asp?source=all> . As I said, Basic MSI is quite OK, it is just the Installscript MSI that should be avoided. The Installshield communi...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
According to these solution [code](https://stackoverflow.com/questions/7469139/what-is-equivalent-to-getch-getche-in-linux) you must manually use open source code for getch() and getche() function as described the code is as following . ``` #include <termios.h> #include <stdio.h> static struct termios old, new; /* I...
conio.h is only in Dos, for linux, use ``` sudo apt-get install libncurses-dev ``` & then ``` -lncurses ``` // In IDE, you have to link it: for example: codeblocks, Setting -> Compiler -> Linker setting, and add 'ncurses'
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
According to these solution [code](https://stackoverflow.com/questions/7469139/what-is-equivalent-to-getch-getche-in-linux) you must manually use open source code for getch() and getche() function as described the code is as following . ``` #include <termios.h> #include <stdio.h> static struct termios old, new; /* I...
You can also use system command to control the terminal in linux like this ``` char getch() { char c; system("stty raw -echo"); c = getchar(); system("stty -raw echo"); return c; } ``` This function does not requires the user to press enter and takes input from the us...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
`[getch()](http://www.mkssoftware.com/docs/man3/curs_getch.3.asp)` seems to be included in [curses library](http://en.wikipedia.org/wiki/Curses_%28programming_library%29).
You can also use system command to control the terminal in linux like this ``` char getch() { char c; system("stty raw -echo"); c = getchar(); system("stty -raw echo"); return c; } ``` This function does not requires the user to press enter and takes input from the us...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
If echoing to the screen is not a problem, you could try using `getchar()` from `stdio.h`.
If, for any reasons, you can't use curses, try this: ``` # include <stdio.h> # include <stdlib.h> # include <string.h> # include <ctype.h> # include <termios.h> /* get a single char from stdin */ int getch(void) { struct termios oldattr, newattr; int ch; tcgetattr(0, &oldattr); newattr=oldattr; newa...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
Try this `conio.h` file: ``` #include <termios.h> #include <unistd.h> #include <stdio.h> /* reads from keypress, doesn't echo */ int getch(void) { struct termios oldattr, newattr; int ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON | ECHO ); tcsetattr( ...
`[getch()](http://www.mkssoftware.com/docs/man3/curs_getch.3.asp)` seems to be included in [curses library](http://en.wikipedia.org/wiki/Curses_%28programming_library%29).
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
You can use `getch()` equivalent from [libcaca](http://caca.zoy.org/): ``` __extern int caca_conio_getch (void) ```
In Unix, `getch()` is part of the ncurses library. But I wrote a workaround for [this question](https://stackoverflow.com/questions/7410447/why-getch-returns-before-press-any-key) that lets you use getch-like functionality without the rest of the curses baggage.
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
Check out curses: <http://en.wikipedia.org/wiki/Curses_%28programming_library%29>
If, for any reasons, you can't use curses, try this: ``` # include <stdio.h> # include <stdlib.h> # include <string.h> # include <ctype.h> # include <termios.h> /* get a single char from stdin */ int getch(void) { struct termios oldattr, newattr; int ch; tcgetattr(0, &oldattr); newattr=oldattr; newa...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
If, for any reasons, you can't use curses, try this: ``` # include <stdio.h> # include <stdlib.h> # include <string.h> # include <ctype.h> # include <termios.h> /* get a single char from stdin */ int getch(void) { struct termios oldattr, newattr; int ch; tcgetattr(0, &oldattr); newattr=oldattr; newa...
If you want to use `conio.h` on Ubuntu, then follow these steps:- 1. Open terminal 2. `sudo apt-get install git` 3. `git clone https://github.com/zoelabbb/conio.h.git` 4. `cd conio.h` 5. `sudo mv conio.h /usr/include/` 6. Close your IDE and open again. Done. If you are in trouble then follow this link: [enter link de...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
You can use `getch()` equivalent from [libcaca](http://caca.zoy.org/): ``` __extern int caca_conio_getch (void) ```
You can also use system command to control the terminal in linux like this ``` char getch() { char c; system("stty raw -echo"); c = getchar(); system("stty -raw echo"); return c; } ``` This function does not requires the user to press enter and takes input from the us...
3,276,546
In TurboC++, I can use the `getch()` function from `conio.h`. But in Linux, gcc doesn't provide `conio.h`. How can I get the functionality of `getch()`?
2010/07/18
[ "https://Stackoverflow.com/questions/3276546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395269/" ]
Try this `conio.h` file: ``` #include <termios.h> #include <unistd.h> #include <stdio.h> /* reads from keypress, doesn't echo */ int getch(void) { struct termios oldattr, newattr; int ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON | ECHO ); tcsetattr( ...
According to these solution [code](https://stackoverflow.com/questions/7469139/what-is-equivalent-to-getch-getche-in-linux) you must manually use open source code for getch() and getche() function as described the code is as following . ``` #include <termios.h> #include <stdio.h> static struct termios old, new; /* I...
3,151,193
Consider the following question:- $$\lim\_{x \to 3} \frac{\ln(x+4)-\ln(7)}{x-3}$$ I would classify this question as "not knowing where to begin" so I cannot provide my detailed attempt. The only clue I was able to notice was that $x+4=x-3+7$ which maybe can be exploited in some way. Also, note that the answer is n...
2019/03/17
[ "https://math.stackexchange.com/questions/3151193", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Simply apply L'Hopital's rule once to get the answer. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln 7}{x-3}=\lim\_{x\to 3}\dfrac{\frac{1}{x+4}}{1}=\dfrac{1}{7}$$ --- **Aliter $1$**: Set $h=x-3$. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln7}{x-3}=\lim\_{h\to 0}\dfrac{\ln(h+7)-\ln7}{h}=\dfrac{\mathrm d}{\mathrm dh}\left(\ln(h+7)\right...
You are working $$y=\frac{\log (x+4)-\log (7)}{x-3}$$ when $x\to 3$. To make life simpler, let $x=3+t$ to make $$y=\frac{\log \left(1+\frac{t}{7}\right)}{t}\sim \frac {\frac t7 }t={\frac 17 }$$
3,151,193
Consider the following question:- $$\lim\_{x \to 3} \frac{\ln(x+4)-\ln(7)}{x-3}$$ I would classify this question as "not knowing where to begin" so I cannot provide my detailed attempt. The only clue I was able to notice was that $x+4=x-3+7$ which maybe can be exploited in some way. Also, note that the answer is n...
2019/03/17
[ "https://math.stackexchange.com/questions/3151193", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Simply apply L'Hopital's rule once to get the answer. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln 7}{x-3}=\lim\_{x\to 3}\dfrac{\frac{1}{x+4}}{1}=\dfrac{1}{7}$$ --- **Aliter $1$**: Set $h=x-3$. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln7}{x-3}=\lim\_{h\to 0}\dfrac{\ln(h+7)-\ln7}{h}=\dfrac{\mathrm d}{\mathrm dh}\left(\ln(h+7)\right...
For fun: 1) Let $x \rightarrow 3^+$. $\log (\frac{x+4}{7})^{\small{\frac{1}{x-3}}}.$ Set $y= \frac{1}{x-3}.$ Then $\lim\_{y \rightarrow \infty}\log (1+\frac{1}{7y})^y=\log (e^{1/7})=1/7.$ 2) Can you do $x \rightarrow 3^-$? Used: $\lim\_{x \rightarrow \infty} (1+\frac{a}{x})^x=e^a$, $a$ real.
3,151,193
Consider the following question:- $$\lim\_{x \to 3} \frac{\ln(x+4)-\ln(7)}{x-3}$$ I would classify this question as "not knowing where to begin" so I cannot provide my detailed attempt. The only clue I was able to notice was that $x+4=x-3+7$ which maybe can be exploited in some way. Also, note that the answer is n...
2019/03/17
[ "https://math.stackexchange.com/questions/3151193", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Simply apply L'Hopital's rule once to get the answer. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln 7}{x-3}=\lim\_{x\to 3}\dfrac{\frac{1}{x+4}}{1}=\dfrac{1}{7}$$ --- **Aliter $1$**: Set $h=x-3$. $$\lim\_{x\to 3}\dfrac{\ln(x+4)-\ln7}{x-3}=\lim\_{h\to 0}\dfrac{\ln(h+7)-\ln7}{h}=\dfrac{\mathrm d}{\mathrm dh}\left(\ln(h+7)\right...
This is figuratively the definition of a derivative in disguise. With a moustache. First substitute h = x - 3 $$\lim\_{h \to 0} \frac{\ln(7 + h)-\ln(7)}{h}$$ Where have I seen this before? $$\frac{dy}{dx} \text{ at } x = 7 =\lim\_{h\to 0}\frac{f(7 + h)-f(7)}{h}$$ Therefore your limit must be the derivative of the n...
290,683
What's the past tense for cast away? Is it right to say 'I was cast away 3 months ago'? I am a bit confused about this after reading this: [Can "casted" be the past tense of "cast"?](https://english.stackexchange.com/questions/94565/can-casted-be-the-past-tense-of-cast)
2015/11/30
[ "https://english.stackexchange.com/questions/290683", "https://english.stackexchange.com", "https://english.stackexchange.com/users/148268/" ]
Yes, you are correct. "Cast" is an irregular verb that is written and pronounced exactly the same in all tenses. Here's a somewhat silly, yet very useful, article on irregular verbs, featuring a complete list of those: <https://en.wikipedia.org/wiki/English_irregular_verbs>
*Is it right to say 'I was cast away 3 months ago'?* It's grammatically okay ("cast" being fine in all the tenses), but logically it is not a very compelling sentence (unless you have recently returned to civilisation and you are describing what happened to you). Also "3" should be "three" in most written forms.
40,295,804
So here is my program. I have to make an object of type Student, then have the Student "check out" an item. And I am using an overloaded addition operator to make the user check out that item. main.cpp: ``` #include <iostream> #include "Student.h" using namespace std; int main() { Student s(54000, "JOHN", "DOE...
2016/10/27
[ "https://Stackoverflow.com/questions/40295804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6128284/" ]
Your actual `operator+` looks correct. But there are bugs in your copy-constructor and assignment-operator that would cause it to malfunction: * The copy-constructor does not set `size`, `id`, or the names. * The copy-constructor should allocate `[size]` items, not `[itemsCheckedOut]`. * The assignment operator does n...
You should replace your string\* array with a std::vector. It will handle the memory management for you, make your code far easier and less error prone than the manual memory management you are currently using. You can reserve an initial size of 10 if you are worried about it doing allocations when adding items (althou...
40,295,804
So here is my program. I have to make an object of type Student, then have the Student "check out" an item. And I am using an overloaded addition operator to make the user check out that item. main.cpp: ``` #include <iostream> #include "Student.h" using namespace std; int main() { Student s(54000, "JOHN", "DOE...
2016/10/27
[ "https://Stackoverflow.com/questions/40295804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6128284/" ]
It calls copy constructor: ``` Student(const Student &other) { itemsCheckedOut = other.itemsCheckedOut; array = new string[itemsCheckedOut]; for (int i = 0; i < itemsCheckedOut; i++) { array[i] = other.array[i]; } } ``` but you forget to copy all Student's fields in its body. You override...
You should replace your string\* array with a std::vector. It will handle the memory management for you, make your code far easier and less error prone than the manual memory management you are currently using. You can reserve an initial size of 10 if you are worried about it doing allocations when adding items (althou...
86,890
I have been experiencing this problem for a while now. My keyboard is not working properly: usually I have input languages in Korean and Japanese and English, and I can just slide the space bar and the input language changes. Then, after software upgrade, I can't slide the space bar anymore and I can't use the other la...
2014/11/06
[ "https://android.stackexchange.com/questions/86890", "https://android.stackexchange.com", "https://android.stackexchange.com/users/79080/" ]
I have a galaxy note 2 (Android 4.4.2) with build number KOT49H.N7100XXUFNL1 and it is still working the same way it used to work previously. Check that other languages are downloaded or not. Here is screenshot highlighted in red showing scrollable languages. ![enter image description here](https://i.stack.imgur.co...
For Me the solution was different. I had nothing under the accessibility options excepted "Talkback" turned off. I turned it on then off and VOILA! it brought back the arrows.
47,674,469
I have a localized properties file with a list of key-value pairs. I want to write property values in japanese,chinese,german etc. to the file and also want to save the already existing file layout with comments and spaces. Need to write these languages in its own native form. I tried to add a new property ("key = アカウ...
2017/12/06
[ "https://Stackoverflow.com/questions/47674469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9061293/" ]
Got a solution for the question. Customize PropertiesConfiguration and PropertiesConfigurationLayout classes for to meet the requirement. Rewrite the **escapeValue()** method in PropertiesConfiguration in such a way to return the property value itself without escape characters. Override the **save** method in Proper...
If its only about adding properties to existing file then you can just add it: ``` Properties props = new Properties(); OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("file", true), "UTF-8"); props.put("key", "アカウント ナビゲーション コンポーネント"); props.store(out, null); ```
47,674,469
I have a localized properties file with a list of key-value pairs. I want to write property values in japanese,chinese,german etc. to the file and also want to save the already existing file layout with comments and spaces. Need to write these languages in its own native form. I tried to add a new property ("key = アカウ...
2017/12/06
[ "https://Stackoverflow.com/questions/47674469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9061293/" ]
Got a solution for the question. Customize PropertiesConfiguration and PropertiesConfigurationLayout classes for to meet the requirement. Rewrite the **escapeValue()** method in PropertiesConfiguration in such a way to return the property value itself without escape characters. Override the **save** method in Proper...
Just set JupIOFactory instance with unicode option as false to disable unicode escaping. ``` PropertiesConfiguration config = new PropertiesConfiguration() config.setIOFactory(new PropertiesConfiguration.JupIOFactory(false)) ```
58,797,300
I am trying to update a django ModelForm with email as a field. In the create form, I am checking if the field is already present in database, if so raise validation error. That part is working as expected. however, if I use the same check in update form, it throws validation error as the existing record has the given...
2019/11/11
[ "https://Stackoverflow.com/questions/58797300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2156667/" ]
For this you need to exclude the current user from the queryset like this . ``` def clean_email(self): email = self.cleaned_data.get('email') email_match = MyObj.objects.filter(email=email).exclude(pk=self.instance.pk) if self.instance and self.instance.pk and not email_match: ...
You need to remove the validation in update class. You can simply return the email without validation. ``` def clean_email(self): return self.cleaned_data.get('email') ``` However, if you want to check if the user already has the new email,then you can use following validation method: ``` def clean_email(self):...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
I presume that by "classical logic", you mean first-order logic. First-order logic is complete, meaning that anything that is true in the model is derivable from the axioms. No system powerful enough to do arithmetic is complete (where "arithmetic" means something at least as powerful as Peano arithmetic), therefore, ...
Recently I had a similar question. Since I am a software developer, I wondered if there is any kind of logic calculus to handle state. Classical logic is state-less, or as one could say time-less and therefore inadequate to express the state in a system with memory. As far as i knew, only differential equations are suf...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
I presume that by "classical logic", you mean first-order logic. First-order logic is complete, meaning that anything that is true in the model is derivable from the axioms. No system powerful enough to do arithmetic is complete (where "arithmetic" means something at least as powerful as Peano arithmetic), therefore, ...
There are two answers, one practical and one theoretical. Practically speaking, since *no* known (and likely no possible) system of axioms (in any logic, classical or otherwise) that can express all true statements in arithmetic is complete, our choices are: 1. Use an incomplete system of axioms. 2. Stop using number...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
I presume that by "classical logic", you mean first-order logic. First-order logic is complete, meaning that anything that is true in the model is derivable from the axioms. No system powerful enough to do arithmetic is complete (where "arithmetic" means something at least as powerful as Peano arithmetic), therefore, ...
Godel's first incompleteness theorem is as such: Suppose F is an (omega) consistent, recursively axiomatizable formal system in which PA (really, we only need Q), holds. Then, there exists some undecidable sentence. In particular, Godel constructs this undecidable sentence. He does not assume its nonexistence and the...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
You seem to be asking specifically, why do *mathematicians* use classical logic? I think the answer simply resides in the simplicity and power of classical logic. It has a nice simple boolean algebra. It is provably sound and complete with respect to standard model theory. It provides a particularly simple understandin...
I presume that by "classical logic", you mean first-order logic. First-order logic is complete, meaning that anything that is true in the model is derivable from the axioms. No system powerful enough to do arithmetic is complete (where "arithmetic" means something at least as powerful as Peano arithmetic), therefore, ...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
I presume that by "classical logic", you mean first-order logic. First-order logic is complete, meaning that anything that is true in the model is derivable from the axioms. No system powerful enough to do arithmetic is complete (where "arithmetic" means something at least as powerful as Peano arithmetic), therefore, ...
> > Often people don't realize that Godel Theorem do not apply in a constructive logic. Actually, the theorem could be written but it only proves something about classical logic. > > > Those statements [don't seem to be correct](https://plato.stanford.edu/entries/logic-intuitionistic/). > > HA and PA are proof-t...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
You seem to be asking specifically, why do *mathematicians* use classical logic? I think the answer simply resides in the simplicity and power of classical logic. It has a nice simple boolean algebra. It is provably sound and complete with respect to standard model theory. It provides a particularly simple understandin...
Recently I had a similar question. Since I am a software developer, I wondered if there is any kind of logic calculus to handle state. Classical logic is state-less, or as one could say time-less and therefore inadequate to express the state in a system with memory. As far as i knew, only differential equations are suf...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
You seem to be asking specifically, why do *mathematicians* use classical logic? I think the answer simply resides in the simplicity and power of classical logic. It has a nice simple boolean algebra. It is provably sound and complete with respect to standard model theory. It provides a particularly simple understandin...
There are two answers, one practical and one theoretical. Practically speaking, since *no* known (and likely no possible) system of axioms (in any logic, classical or otherwise) that can express all true statements in arithmetic is complete, our choices are: 1. Use an incomplete system of axioms. 2. Stop using number...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
You seem to be asking specifically, why do *mathematicians* use classical logic? I think the answer simply resides in the simplicity and power of classical logic. It has a nice simple boolean algebra. It is provably sound and complete with respect to standard model theory. It provides a particularly simple understandin...
Godel's first incompleteness theorem is as such: Suppose F is an (omega) consistent, recursively axiomatizable formal system in which PA (really, we only need Q), holds. Then, there exists some undecidable sentence. In particular, Godel constructs this undecidable sentence. He does not assume its nonexistence and the...
92,420
It seems to me very crazy that mathematicians reactions to Godël incompleteness theorem have been mostly to agree that there are statements of the language which can neither be proved nor disproved but to continue to use such a language without any matter of conscience. The only good interpretation of Godel Theorem is...
2022/07/22
[ "https://philosophy.stackexchange.com/questions/92420", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/14121/" ]
You seem to be asking specifically, why do *mathematicians* use classical logic? I think the answer simply resides in the simplicity and power of classical logic. It has a nice simple boolean algebra. It is provably sound and complete with respect to standard model theory. It provides a particularly simple understandin...
> > Often people don't realize that Godel Theorem do not apply in a constructive logic. Actually, the theorem could be written but it only proves something about classical logic. > > > Those statements [don't seem to be correct](https://plato.stanford.edu/entries/logic-intuitionistic/). > > HA and PA are proof-t...
9,231,105
I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the `<body>` tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. ``` Ext.onReady(function(...
2012/02/10
[ "https://Stackoverflow.com/questions/9231105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202368/" ]
If you're asking how you'd put the nested `params` object in there, you'd probably do: ``` JSONObject params = new JSONObject(); params.put("media", "music"); obj.put("params", params); ``` --- To use an array (per your comments below), you'd do something like this: ``` JSONArray properties = new JSONArray(); pro...
You have two choices. You can create another object that holds `"media":"music"` and then put that in the original `JSONObject` or you can just pass this whole string into the `JSONObject` constructor and have it parse it for you.
9,231,105
I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the `<body>` tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. ``` Ext.onReady(function(...
2012/02/10
[ "https://Stackoverflow.com/questions/9231105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202368/" ]
If you're asking how you'd put the nested `params` object in there, you'd probably do: ``` JSONObject params = new JSONObject(); params.put("media", "music"); obj.put("params", params); ``` --- To use an array (per your comments below), you'd do something like this: ``` JSONArray properties = new JSONArray(); pro...
``` JSONOjbect obj = new JSONObject().put("jsonrpc", "2.0") .put("method", "Files.GetSources").put("id", 1) .put("params", new JSONObject().put("media", "music")); ``` Chaining .put() like this is possible because put() returns the object it was called on - for this exact purpose.
9,231,105
I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the `<body>` tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. ``` Ext.onReady(function(...
2012/02/10
[ "https://Stackoverflow.com/questions/9231105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202368/" ]
If you're asking how you'd put the nested `params` object in there, you'd probably do: ``` JSONObject params = new JSONObject(); params.put("media", "music"); obj.put("params", params); ``` --- To use an array (per your comments below), you'd do something like this: ``` JSONArray properties = new JSONArray(); pro...
Well, if you do have the string before hand, you can simply do ``` JSONObject object = JSONObject.getJSONObject("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\":{\"media\":\"music\"}, \"id\": 1}"); ```
9,231,105
I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the `<body>` tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. ``` Ext.onReady(function(...
2012/02/10
[ "https://Stackoverflow.com/questions/9231105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202368/" ]
``` JSONOjbect obj = new JSONObject().put("jsonrpc", "2.0") .put("method", "Files.GetSources").put("id", 1) .put("params", new JSONObject().put("media", "music")); ``` Chaining .put() like this is possible because put() returns the object it was called on - for this exact purpose.
You have two choices. You can create another object that holds `"media":"music"` and then put that in the original `JSONObject` or you can just pass this whole string into the `JSONObject` constructor and have it parse it for you.
9,231,105
I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the `<body>` tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. ``` Ext.onReady(function(...
2012/02/10
[ "https://Stackoverflow.com/questions/9231105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202368/" ]
``` JSONOjbect obj = new JSONObject().put("jsonrpc", "2.0") .put("method", "Files.GetSources").put("id", 1) .put("params", new JSONObject().put("media", "music")); ``` Chaining .put() like this is possible because put() returns the object it was called on - for this exact purpose.
Well, if you do have the string before hand, you can simply do ``` JSONObject object = JSONObject.getJSONObject("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\":{\"media\":\"music\"}, \"id\": 1}"); ```
75,567
I am installing quiet warm in floor mats in a small room.We installed a four breaker sub panel.The thermostat for the floors heating pads has a built in gfci,but just shows neutral and hot connections and no ground connection.Do you think this means they are using the neutral wire from the thermostat as ground?Would th...
2015/10/03
[ "https://diy.stackexchange.com/questions/75567", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/44197/" ]
GFCI does not require a ground connection to function. It checks for an imbalance between the HOT and NEUTRAL lead current, assuming that any difference is escaping to ground, possibly through a human body. This is why it is legal to use a GFCI outlet without a ground connected, assuming you are installing it on an ol...
NO, they are not using the neutral as a ground. If all you are talking about is the thermostat then it is likely all plastic and does not need a ground. The cable for the floor heat element is typically shielded where the shield is the ground. As previously stated, the GFI function of the thermostat will operate fine ...
178,213
> > When Wiz posted a picture of his son Sebastian waiting for the bus to school on his first day of kindergarten, the father of one had his hand up for a high five and was looking super proud. Wiz even made a point to note that Sebastian “RODE THE BUS AND **ERE THANG**!” But, it didn’t take long for commenters to chi...
2018/09/01
[ "https://ell.stackexchange.com/questions/178213", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/59517/" ]
Firstly, you should not use "yesterday" with the present perfect. Either use the perfect "I have delivered the file (already)." or the past tense "I delivered the file yesterday". To "be delivered" is a passive form. It is rather odd, but I would understand "I have been delivered the file" as an odd way of saying "Som...
Both sentences are incorrect. "I have delivered the file yesterday" Should be: *I delivered the file yesterday* or *I had delivered the file yesterday* - if the context requires the past perfect tense. "I have been delivered the file yesterday" Should be: *The file was delivered to me yesterday* or *I received the...
38,270,497
Wordpress Redirects My client has a WP website with a very bad permalinks structure and few hundreds "product" pages that they created as simple posts with bunch of HTML. For example: ``` http://www.website.com/article/sony-tv-42-inch http://www.website.com/article/iphone-5-2-black http://www.website.com/article/sams...
2016/07/08
[ "https://Stackoverflow.com/questions/38270497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6414274/" ]
It'd be fairly easy for you to re-write from ``` http://www.website.com/product/sony-tv-42-inch ``` to ``` http://www.website.com/product/sony-tv-42-inch ``` but that extra / is going to present a problem. As mentioned by some others you certainly want a 301 for SEO purposes, so here is what I would do. **Step ...
For SEO, i suggest you use 301 - redirect in your .htaccess You can use regexp for redirect. Example: ``` RewriteEngine on RewriteRule ^/users/(.*)$ http://www.example.com/profiles/$1 [R=301,L] ```
67,535,013
I am working with a lot of mathematical operations, mostly with divisions, and its really important that after all calculations has been done, all the numbers match with the initial state. For example I am testing the following code for doubles in C#: ``` double total = 1000; double numberOfParts = 6; ...
2021/05/14
[ "https://Stackoverflow.com/questions/67535013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6995366/" ]
If you are looking for *exact* result you have to work with *rational* numbers; there are [plenty of assemblies](https://www.nuget.org/packages?q=Rational) which implement `BigRational` type; say, you can try using my own [HigherArithmetics](https://github.com/Dmitry-Bychenko/HigherArithmetics) (it's for .Net 5): ``` ...
This is more of human perception than actually a numeric problem. Almost *every* floating point number is inaccurate due to machine precision. Mathematically the difference between 1000.0 and 999.99999999999997 is sufficient for most operations. The solution might seem odd to you, but it works to solve the inaccuracy ...
25,045,128
When I click a button "click Me" on my page. I want to know that the button is clicked and an alert should pop up saying hi.Here is my code which is not working. ``` <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(functio...
2014/07/30
[ "https://Stackoverflow.com/questions/25045128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3885720/" ]
Move the `alert` to inside the handler: ``` $("#btn").click(function(){ $(this).data('clicked', true); if($(this).data('clicked')) { alert("HI"); } }); ``` That `if` statement doesn't automatically run (well it does on page load since it's in your DOM ready event) - it has to be within an event.
You could drop the if statement at all. It's key to put your alert() call in the click Callback function. ``` $(document).ready(function(){ $("#btn").click(function(){ alert("HI"); }); }); ```
6,079,474
JavaScript noob here. I'm working on a website and I'm trying to change the z-index of a set of frames using buttons. I can't quite get it to work. So far this is what I have. ``` function changeZIndex(i,id) { document.getElementById(id).style.zIndex=i; } ``` And in the body ``` <A HREF="#" onclick='changeZIndex...
2011/05/21
[ "https://Stackoverflow.com/questions/6079474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/763645/" ]
Make sure your quotes are escaped correctly. try: ``` <a href="#" onclick="changeZIndex(1,'aboutus')"><img name="one" src="button1.bmp"></a> <a href="#" onclick="changeZIndex(1,'contactus')"><img name="two" src="button2.bmp"></a> ``` note the double quotes around the onclick
Your quotation marks are wrong - look at the syntax highlighting: ``` <A HREF="#" onclick='changeZIndex(1,'aboutus')'><IMG NAME="one" SRC="button1.bmp"></A> <A HREF="#" onclick='changeZIndex(1,'contactus')'><IMG NAME="two" SRC="button2.bmp"></A> ``` This is how you could do it: ``` <A HREF="#" onclick="changeZIndex...
6,079,474
JavaScript noob here. I'm working on a website and I'm trying to change the z-index of a set of frames using buttons. I can't quite get it to work. So far this is what I have. ``` function changeZIndex(i,id) { document.getElementById(id).style.zIndex=i; } ``` And in the body ``` <A HREF="#" onclick='changeZIndex...
2011/05/21
[ "https://Stackoverflow.com/questions/6079474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/763645/" ]
Make sure your quotes are escaped correctly. try: ``` <a href="#" onclick="changeZIndex(1,'aboutus')"><img name="one" src="button1.bmp"></a> <a href="#" onclick="changeZIndex(1,'contactus')"><img name="two" src="button2.bmp"></a> ``` note the double quotes around the onclick
look at your quotes, then if you change zindex for 'aboutus' to 1, don't forget to change zindex for 'contactus' to 0. otherwise if you change zindex for 'contactus' to 1, don't forget to change zindex for 'aboutus' to 0. ``` <A HREF="#" onclick="changeZIndex(1,'aboutus');changeZIndex(0,'contactus');"><IMG NAME="o...
28,538
The [Stab in the Back Myth](http://www.dailystormer.com/the-german-revolution-of-1918-and-the-stab-in-the-back-myth/) Among claims that need context and checking: > > The Jewish Lord Rothschild used his connections with American Jewry to get America into the war. This was, of course, very easy for the Jews there, w...
2016/04/30
[ "https://history.stackexchange.com/questions/28538", "https://history.stackexchange.com", "https://history.stackexchange.com/users/13486/" ]
I think this article is a very sinister form of hatred propaganda. It is sinister because it makes a statement which is virtually impossible to debunk. Consider the fact that there are many million Jews around the world. Among these you will find some that are communists, other that are capitalists, and so on. That is ...
When dealing with the "causes" of events there are no facts. You are in the world of interpretation and opinion. Characterizing the American entry into the war as the sole product of a Rothschild PR campaign is as ridiculous as it is unprovable. Your statement that the revolutions were having no effect on the war see...
28,538
The [Stab in the Back Myth](http://www.dailystormer.com/the-german-revolution-of-1918-and-the-stab-in-the-back-myth/) Among claims that need context and checking: > > The Jewish Lord Rothschild used his connections with American Jewry to get America into the war. This was, of course, very easy for the Jews there, w...
2016/04/30
[ "https://history.stackexchange.com/questions/28538", "https://history.stackexchange.com", "https://history.stackexchange.com/users/13486/" ]
I think this article is a very sinister form of hatred propaganda. It is sinister because it makes a statement which is virtually impossible to debunk. Consider the fact that there are many million Jews around the world. Among these you will find some that are communists, other that are capitalists, and so on. That is ...
The stab in the back idea held by Hitler, retorts to the signing of the Versailles treaty. If you listen to Benjamin Freedmon who was at Versailles, he states that 129 dignitaries from the German side were Jewish and the signatories on the actual treaty were of German-Jewish descent. Hitler vowed that his work was to d...
28,538
The [Stab in the Back Myth](http://www.dailystormer.com/the-german-revolution-of-1918-and-the-stab-in-the-back-myth/) Among claims that need context and checking: > > The Jewish Lord Rothschild used his connections with American Jewry to get America into the war. This was, of course, very easy for the Jews there, w...
2016/04/30
[ "https://history.stackexchange.com/questions/28538", "https://history.stackexchange.com", "https://history.stackexchange.com/users/13486/" ]
I think this article is a very sinister form of hatred propaganda. It is sinister because it makes a statement which is virtually impossible to debunk. Consider the fact that there are many million Jews around the world. Among these you will find some that are communists, other that are capitalists, and so on. That is ...
"The stab in the back" hypothesis came from General Ludendorff not Hitler...and was directed at the German people not any particular ethnic group per se. Hitler turned it into "the Jews" most likely out of political convenience. Not only were many Jews at the Vanguard of Marxist/Leninism thus literally invading Poland...
28,538
The [Stab in the Back Myth](http://www.dailystormer.com/the-german-revolution-of-1918-and-the-stab-in-the-back-myth/) Among claims that need context and checking: > > The Jewish Lord Rothschild used his connections with American Jewry to get America into the war. This was, of course, very easy for the Jews there, w...
2016/04/30
[ "https://history.stackexchange.com/questions/28538", "https://history.stackexchange.com", "https://history.stackexchange.com/users/13486/" ]
When dealing with the "causes" of events there are no facts. You are in the world of interpretation and opinion. Characterizing the American entry into the war as the sole product of a Rothschild PR campaign is as ridiculous as it is unprovable. Your statement that the revolutions were having no effect on the war see...
The stab in the back idea held by Hitler, retorts to the signing of the Versailles treaty. If you listen to Benjamin Freedmon who was at Versailles, he states that 129 dignitaries from the German side were Jewish and the signatories on the actual treaty were of German-Jewish descent. Hitler vowed that his work was to d...
28,538
The [Stab in the Back Myth](http://www.dailystormer.com/the-german-revolution-of-1918-and-the-stab-in-the-back-myth/) Among claims that need context and checking: > > The Jewish Lord Rothschild used his connections with American Jewry to get America into the war. This was, of course, very easy for the Jews there, w...
2016/04/30
[ "https://history.stackexchange.com/questions/28538", "https://history.stackexchange.com", "https://history.stackexchange.com/users/13486/" ]
When dealing with the "causes" of events there are no facts. You are in the world of interpretation and opinion. Characterizing the American entry into the war as the sole product of a Rothschild PR campaign is as ridiculous as it is unprovable. Your statement that the revolutions were having no effect on the war see...
"The stab in the back" hypothesis came from General Ludendorff not Hitler...and was directed at the German people not any particular ethnic group per se. Hitler turned it into "the Jews" most likely out of political convenience. Not only were many Jews at the Vanguard of Marxist/Leninism thus literally invading Poland...
38,351
A graph is called vertex and edge transitive if the automorphism group is transitive on both vertices and edges. The spectrum of a graph is the collection (with multiplicities) of eigenvalues of the incidence matrix. Supposedly, it is conjectured that almost all graphs have the property that they are the unique graph...
2010/09/10
[ "https://mathoverflow.net/questions/38351", "https://mathoverflow.net", "https://mathoverflow.net/users/622/" ]
Actually a graph is called half-transitive if it is vertex and edge transitive, but not arc-transitive. I am going to assume here that the term means what you chose it to mean. Van Dam and Koolen construct distance-regular graphs with the same parameters (and hence the same spectrum) as the Grassmann graphs. They show...
As Chris said, the answer is most probably no, and most likely there are known such examples. There are many examples and constructions of non isomorphic graphs with the same spectrum and some of these examples are Cayley graphs and other very symmetric graphs. Cayley graphs are always vertex transitive and quite often...
26,490,952
I have the following entities: ``` public class User { public User() { Roles = new ObservableCollection<Role>(); } public int UserId { get; set; } public string Name { get; set; } public DateTime DateOfBirth { get; set; } public virtual ICollection<Role> Roles { get; set; } } pub...
2014/10/21
[ "https://Stackoverflow.com/questions/26490952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1092181/" ]
Assuming that you want to "check" roles that `SelectedUser` has. First we answer the question, "What data does this depend on?" The answer is pretty simple, it depends on the role itself, so we write: ``` <CheckBox Content="{Binding Name}" IsChecked="{Binding .}"/> ``` Now clearly, that isn't a bool; so we will nee...
you can use MultipleBinding and MultipleValueVonverter as below ``` <Grid> <Grid.Resources> <local:RoleValueConverter x:Key="converter"></local:RoleValueConverter> </Grid.Resources> <ListBox ItemsSource="{Binding AllRoles}" > <ListBox.ItemTemplate> <Da...