qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
86,979
I've used Ubuntu using WUBI for a couple of months and decided that this was not what I wanted and that Ubuntu should have its own partition. I have it set up like that now. My dilemma deals with what bootloader to use as the primary one. As it is now, after my laptop's splash screen, Grub 2 shows up and one of the o...
2011/12/11
[ "https://askubuntu.com/questions/86979", "https://askubuntu.com", "https://askubuntu.com/users/37536/" ]
Depends, both work well, use the one you feel most comfortable with. If you want support from the Linux / Ubuntu community , use grub. If you use the windows boot loader, your support will be either Microsoft or the Windows community.
The windows boot manager will show only the windows versions of os only but not the other Where as the GRUB will show all the operating systems present the hard disk my my advice is to use only GRUB.
86,979
I've used Ubuntu using WUBI for a couple of months and decided that this was not what I wanted and that Ubuntu should have its own partition. I have it set up like that now. My dilemma deals with what bootloader to use as the primary one. As it is now, after my laptop's splash screen, Grub 2 shows up and one of the o...
2011/12/11
[ "https://askubuntu.com/questions/86979", "https://askubuntu.com", "https://askubuntu.com/users/37536/" ]
I've been dual booting using grub on 7 systems (actually 5 different people / families) for a couple of years, have been through several upgrades. Some of them keep a version for 3 releases then have to do multiple upgrades at the same time. I have personally never had a problem and since all these systems just have th...
The windows boot manager will show only the windows versions of os only but not the other Where as the GRUB will show all the operating systems present the hard disk my my advice is to use only GRUB.
86,979
I've used Ubuntu using WUBI for a couple of months and decided that this was not what I wanted and that Ubuntu should have its own partition. I have it set up like that now. My dilemma deals with what bootloader to use as the primary one. As it is now, after my laptop's splash screen, Grub 2 shows up and one of the o...
2011/12/11
[ "https://askubuntu.com/questions/86979", "https://askubuntu.com", "https://askubuntu.com/users/37536/" ]
I personally would recommend GRUB to you as it automatically detects all installed OS (as you can see) and has more options (I mean possibilities to configure it as you want). By the way it definitely looks nicer, especially when you personalized it using Grub-customizer. It's a GUI tool for Ubuntu that makes the confi...
I've been dual booting using grub on 7 systems (actually 5 different people / families) for a couple of years, have been through several upgrades. Some of them keep a version for 3 releases then have to do multiple upgrades at the same time. I have personally never had a problem and since all these systems just have th...
86,979
I've used Ubuntu using WUBI for a couple of months and decided that this was not what I wanted and that Ubuntu should have its own partition. I have it set up like that now. My dilemma deals with what bootloader to use as the primary one. As it is now, after my laptop's splash screen, Grub 2 shows up and one of the o...
2011/12/11
[ "https://askubuntu.com/questions/86979", "https://askubuntu.com", "https://askubuntu.com/users/37536/" ]
I personally would recommend GRUB to you as it automatically detects all installed OS (as you can see) and has more options (I mean possibilities to configure it as you want). By the way it definitely looks nicer, especially when you personalized it using Grub-customizer. It's a GUI tool for Ubuntu that makes the confi...
The windows boot manager will show only the windows versions of os only but not the other Where as the GRUB will show all the operating systems present the hard disk my my advice is to use only GRUB.
3,998,312
The force acting on a body depends on the displacement $x(t)$ of the body from the origin. This dependence is given by $$ F(x) = \begin{cases} F\_0 - mg, &-L < &x < 0,\\ -mg,& &x > 0. \end{cases} $$ where $L$ is a positive number, $F\_0 > 0$ is a constant resting force and $g$ is the gravitational acceleration of Ea...
2021/01/24
[ "https://math.stackexchange.com/questions/3998312", "https://math.stackexchange.com", "https://math.stackexchange.com/users/337265/" ]
$$\int\frac{\cos t}{\sin^2 t-\cos^2 t}dt$$ Use $\cos^2 t = 1-\sin^2 t$ to modify the denominator $$\int\frac{\cos t}{2\sin^2 t-1}dt$$ Substitute $u=\sin t$, $du =\cos t \, dt$ $$\int\frac{1}{2u^2-1}du$$ Now integrate using partial fractions or otherwise.
Substitute $t^2= \frac{2x^2}{x^2+1}$ \begin{align} & \int\frac{1}{(x^2-1)\sqrt{x^2+1}}dx = \frac1{\sqrt2} \int \frac{1}{t^2-1} dt=\frac1{2\sqrt2} \ln|\frac{t-1}{t+1}|+C \end{align}
3,998,312
The force acting on a body depends on the displacement $x(t)$ of the body from the origin. This dependence is given by $$ F(x) = \begin{cases} F\_0 - mg, &-L < &x < 0,\\ -mg,& &x > 0. \end{cases} $$ where $L$ is a positive number, $F\_0 > 0$ is a constant resting force and $g$ is the gravitational acceleration of Ea...
2021/01/24
[ "https://math.stackexchange.com/questions/3998312", "https://math.stackexchange.com", "https://math.stackexchange.com/users/337265/" ]
**Other approach** Put $ x=\sinh(t) $ with $$dx=\cosh(t)dt$$ $$\sqrt{x^2+1}=\sqrt{\sinh^2(t)+1}=\cosh(t)$$ $$x^2-1=(\sinh^2(t)-1)$$ It becomes $$\int \frac{dt}{(\sinh(t)+1)(\sinh(t)-1)}$$ $$=\frac 12\int (\frac{1}{\sinh(t)-1}-\frac{1}{\sinh(t)+1})dt$$
Substitute $t^2= \frac{2x^2}{x^2+1}$ \begin{align} & \int\frac{1}{(x^2-1)\sqrt{x^2+1}}dx = \frac1{\sqrt2} \int \frac{1}{t^2-1} dt=\frac1{2\sqrt2} \ln|\frac{t-1}{t+1}|+C \end{align}
3,998,312
The force acting on a body depends on the displacement $x(t)$ of the body from the origin. This dependence is given by $$ F(x) = \begin{cases} F\_0 - mg, &-L < &x < 0,\\ -mg,& &x > 0. \end{cases} $$ where $L$ is a positive number, $F\_0 > 0$ is a constant resting force and $g$ is the gravitational acceleration of Ea...
2021/01/24
[ "https://math.stackexchange.com/questions/3998312", "https://math.stackexchange.com", "https://math.stackexchange.com/users/337265/" ]
$$\int\frac{\cos t}{\sin^2 t-\cos^2 t}dt$$ Use $\cos^2 t = 1-\sin^2 t$ to modify the denominator $$\int\frac{\cos t}{2\sin^2 t-1}dt$$ Substitute $u=\sin t$, $du =\cos t \, dt$ $$\int\frac{1}{2u^2-1}du$$ Now integrate using partial fractions or otherwise.
**Other approach** Put $ x=\sinh(t) $ with $$dx=\cosh(t)dt$$ $$\sqrt{x^2+1}=\sqrt{\sinh^2(t)+1}=\cosh(t)$$ $$x^2-1=(\sinh^2(t)-1)$$ It becomes $$\int \frac{dt}{(\sinh(t)+1)(\sinh(t)-1)}$$ $$=\frac 12\int (\frac{1}{\sinh(t)-1}-\frac{1}{\sinh(t)+1})dt$$
11,625,205
I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right. ``` <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <...
2012/07/24
[ "https://Stackoverflow.com/questions/11625205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713075/" ]
c is a pointer to a pointer. your method signature should be like `-(char *)mountLVparams:(signed char *)initData :(char **)obj :(signed char *)codeWard` ``` char c1[]={0x01}; char c2[]={0x02}; char c3[]={0x03}; char *c[3]; c[0] = c1; c[1] = c2; c[2] = c3;//if i pass this char array to the below method only c[0] is...
parameter `c` is the pointer pointing to your character array. The pointer will point the first address of the array hence it is by default `c[0]`. You can pass it as NSstring. `[NSString stringWithFormat:%s,c]`.
11,625,205
I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right. ``` <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <...
2012/07/24
[ "https://Stackoverflow.com/questions/11625205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713075/" ]
I have one solution by passing array to your function and then creating char \* ``` const char c1[]={0x01}; NSString *s1 = [[NSString alloc] initWithCString:c1 encoding:NSUTF8StringEncoding]; //convert into string const char c2[]={0x02}; NSString *s2 = [[NSString alloc] initWithCString:c2 encoding:...
parameter `c` is the pointer pointing to your character array. The pointer will point the first address of the array hence it is by default `c[0]`. You can pass it as NSstring. `[NSString stringWithFormat:%s,c]`.
11,625,205
I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right. ``` <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <...
2012/07/24
[ "https://Stackoverflow.com/questions/11625205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713075/" ]
perhaps, you would be looking for the following where you can pass the `NSString` object with the desired content as parameter: ``` NSString *_string = [NSString stringWithString:@"\x01\x02\x03"]; [self yourMethod:_string]; ``` and inside the `-yourMethod:` ``` - (void)yourMethod:(NSString *)stringWithChars { c...
parameter `c` is the pointer pointing to your character array. The pointer will point the first address of the array hence it is by default `c[0]`. You can pass it as NSstring. `[NSString stringWithFormat:%s,c]`.
11,625,205
I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right. ``` <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <...
2012/07/24
[ "https://Stackoverflow.com/questions/11625205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713075/" ]
c is a pointer to a pointer. your method signature should be like `-(char *)mountLVparams:(signed char *)initData :(char **)obj :(signed char *)codeWard` ``` char c1[]={0x01}; char c2[]={0x02}; char c3[]={0x03}; char *c[3]; c[0] = c1; c[1] = c2; c[2] = c3;//if i pass this char array to the below method only c[0] is...
I have one solution by passing array to your function and then creating char \* ``` const char c1[]={0x01}; NSString *s1 = [[NSString alloc] initWithCString:c1 encoding:NSUTF8StringEncoding]; //convert into string const char c2[]={0x02}; NSString *s2 = [[NSString alloc] initWithCString:c2 encoding:...
11,625,205
I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right. ``` <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <...
2012/07/24
[ "https://Stackoverflow.com/questions/11625205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713075/" ]
c is a pointer to a pointer. your method signature should be like `-(char *)mountLVparams:(signed char *)initData :(char **)obj :(signed char *)codeWard` ``` char c1[]={0x01}; char c2[]={0x02}; char c3[]={0x03}; char *c[3]; c[0] = c1; c[1] = c2; c[2] = c3;//if i pass this char array to the below method only c[0] is...
perhaps, you would be looking for the following where you can pass the `NSString` object with the desired content as parameter: ``` NSString *_string = [NSString stringWithString:@"\x01\x02\x03"]; [self yourMethod:_string]; ``` and inside the `-yourMethod:` ``` - (void)yourMethod:(NSString *)stringWithChars { c...
43,215,607
I was trying to compile a haskell game code, this code generates three thread, one for infinite loop, one for collecting user's interaction, one for triggering the events. However, the code cannot be compiled and I don't know why. Here's the code: ``` module Main where import Control.Concurrent import Control.Monad ...
2017/04/04
[ "https://Stackoverflow.com/questions/43215607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7816315/" ]
Variable names can not begin with uppercase letters, such as `Event`. Try renaming the variable to something like `event`.
In Haskell, all `if ... then ... else` blocks must have all their components; what would the result be otherwise? The problem is that the compiler was expecting an `else`, but it actually got `Event`. That said, you have more problems than a simple parse error. `return` does not do what you think it does. For example,...
8,261,727
In google app engine, you can do routing at 2 places: in your app.yaml, you can send requests to url's off to different scripts, and inside a script, when you work with wsgiApp, you can again do routing, and send different url's off to different handlers. Is there an advantage of doing your routing in either of these p...
2011/11/24
[ "https://Stackoverflow.com/questions/8261727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/675311/" ]
Generally the best approach is to use `app.yaml` for 'application level' routing - defining paths for static content, utilities like mapreduce, and your main application - and doing the routing for your app from within a single request handler. This avoids the overhead of defining multiple request handlers for each par...
You have to use both. Do the high level routing in app.yaml and the more fine grained routing in the wsgi. The important is that you get a god structure of what is routed in each place. I can not see any argument that the one is superior to the other.
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I was getting this error when working with the Entity Data Model instead of Linq to SQL. I had created the model from an existing SQL Server database. The problem was caused by selecting the wrong Data Context Class in the Add Controller dialog. That values needs to be the top level class, in my case the one with "Enti...
I got the same issue with EF. I am using the VS 2012 The reason for my case was.. this auto generation process (Scaffolding) seems not recognize the partial class concept. I used the model first approach and I have used inheritance with the entities. Ex: entity “B” and “C” is inherited from “A” So in my generated mod...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I was getting this error when working with the Entity Data Model instead of Linq to SQL. I had created the model from an existing SQL Server database. The problem was caused by selecting the wrong Data Context Class in the Add Controller dialog. That values needs to be the top level class, in my case the one with "Enti...
I am not sure if this is exactly what you were looking for.. but I noticed the same error myself.. Google was not much help and I wound up spotting the issue myself. Possible Solution: If you are creating a Model that contains an EF (Entity Framework) class that extends to another class.. make sure that you are exten...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I got this error message when I had mixed the "model class" and "data context class".
I am not sure if this is exactly what you were looking for.. but I noticed the same error myself.. Google was not much help and I wound up spotting the issue myself. Possible Solution: If you are creating a Model that contains an EF (Entity Framework) class that extends to another class.. make sure that you are exten...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
This dialog is confusing at first when using the Entity Framework Database first option. If you are using DB first then both the "model class" dropdown and the "data context class" dropdown will appear to have the same class names. If you are for instance, attempting to create a controller bound to a model of type "...
I debugged this problem in WinDbg and It's caused by the following `Microsoft.VisualStudio.Web.Mvc.Scaffolding.BuiltIn.EntityFrameworkServices` method: ``` internal static bool IsValidContextType(Type contextType) { return (typeof(ObjectContext).IsAssignableFrom(contextType) || ((contextType.BaseType != null) && ...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
This dialog is confusing at first when using the Entity Framework Database first option. If you are using DB first then both the "model class" dropdown and the "data context class" dropdown will appear to have the same class names. If you are for instance, attempting to create a controller bound to a model of type "...
I am not sure if this is exactly what you were looking for.. but I noticed the same error myself.. Google was not much help and I wound up spotting the issue myself. Possible Solution: If you are creating a Model that contains an EF (Entity Framework) class that extends to another class.. make sure that you are exten...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I was getting this error when working with the Entity Data Model instead of Linq to SQL. I had created the model from an existing SQL Server database. The problem was caused by selecting the wrong Data Context Class in the Add Controller dialog. That values needs to be the top level class, in my case the one with "Enti...
This dialog is confusing at first when using the Entity Framework Database first option. If you are using DB first then both the "model class" dropdown and the "data context class" dropdown will appear to have the same class names. If you are for instance, attempting to create a controller bound to a model of type "...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
This dialog is confusing at first when using the Entity Framework Database first option. If you are using DB first then both the "model class" dropdown and the "data context class" dropdown will appear to have the same class names. If you are for instance, attempting to create a controller bound to a model of type "...
I got this error message when I had mixed the "model class" and "data context class".
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I got this error message when I had mixed the "model class" and "data context class".
I got the same issue with EF. I am using the VS 2012 The reason for my case was.. this auto generation process (Scaffolding) seems not recognize the partial class concept. I used the model first approach and I have used inheritance with the entities. Ex: entity “B” and “C” is inherited from “A” So in my generated mod...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I got this error message when I had mixed the "model class" and "data context class".
I debugged this problem in WinDbg and It's caused by the following `Microsoft.VisualStudio.Web.Mvc.Scaffolding.BuiltIn.EntityFrameworkServices` method: ``` internal static bool IsValidContextType(Type contextType) { return (typeof(ObjectContext).IsAssignableFrom(contextType) || ((contextType.BaseType != null) && ...
9,116,601
I'm creating a new MVC 3 application. Steps taken: 1. Added new model by right clicking on Models and adding "LINQ to SQL Classes" 2. Dragged tables from Server Explorer to my new dbml layout and saved 3. Right click on Controllers->Add->Controller 4. Enter the following information: > > **Controller...
2012/02/02
[ "https://Stackoverflow.com/questions/9116601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523907/" ]
I was getting this error when working with the Entity Data Model instead of Linq to SQL. I had created the model from an existing SQL Server database. The problem was caused by selecting the wrong Data Context Class in the Add Controller dialog. That values needs to be the top level class, in my case the one with "Enti...
I got this error message when I had mixed the "model class" and "data context class".
1,278,048
Given two matrices $A$ and $C$ of order $n\times n$ and $m\times n$ respectively. We define the following matrix by block: $$ D=\left( \begin{matrix} C\\ CA\\ :\\ :\\ CA^{q-1} \end{matrix}\right) $$ where $q\in\mathbb N^\*$. My question is: is there any relation between $q$ and the rank of the matrix $D$? if so for wh...
2015/05/12
[ "https://math.stackexchange.com/questions/1278048", "https://math.stackexchange.com", "https://math.stackexchange.com/users/156519/" ]
\begin{align\*} \sum\_{k=1}^M k^2(D\_k-D\_{k+1}) &= \sum\_{k=1}^M k^2 D\_k - \sum\_{k=1}^M k^2 D\_{k+1} \\ &= \sum\_{k=1}^M k^2 D\_k - \sum\_{k=2}^{M+1} (k-1)^2 D\_k \\ &= D\_1 + \sum\_{k=2}^M (k^2-(k-1)^2) D\_k - M^2 D\_{M+1} \\ &= D\_1 + \sum\_{k=2}^M (2k-1) D\_k - M^2 D\_{M+1} \\ &= \sum\_{k=1}^M (2k-1) D\_k - M^2 D...
\begin{align\*} \frac{1}{M^2}\sum\_{k \leq M} \sigma^2\_k &\le \frac{1}{M^2} \sum\_{k=1}^M (2k-1) D\_k \\ &=\frac{1}{M^2} \left(D\_1 + 3D\_2 + 5D\_3 + 7D\_4 + \ldots \right)\\ &=\frac{1}{M^2} \left(\sum\_{n \geq 1}\frac{\sigma^2\_n}{n^2} + 3\sum\_{n \geq 2}\frac{\sigma^2\_n}{n^2} + 5\sum\_{n \geq 3}\frac{\sigma^2\_n}{...
9,342,178
I have an EditText and a TextView, Now what I want is to fetch the value that is in EditText dynamically (Whatever the user enters in the EditText should be written in TextView), I don't want to use a button.
2012/02/18
[ "https://Stackoverflow.com/questions/9342178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1147787/" ]
Try setting a [Key Listener](http://developer.android.com/reference/android/view/View.html#setOnKeyListener%28android.view.View.OnKeyListener%29) for the EditText. Whenever the user types a key, the event listener will get called. You can update the text in the TextView in that key Listener. Something like: ``` editTe...
Try this... ``` TextView text = (TextView) findViewById(R.id.papa); EditText edtext = (EditText) findViewById(R.id.pa); String content = edtext.getText().toString(); text.setText(content); ```
21,439,163
I Want to display POPUP specific position of RichTextBox in WPF . i have understood that there is a way to get the same in winforms RichTextBox with following lines of code. ``` Point point = richTextBox1.GetPositionFromCharIndex(richTextBox1.SelectionStart); ```
2014/01/29
[ "https://Stackoverflow.com/questions/21439163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1707818/" ]
I suppose it depends on when and what you are popping up. An example from MSDN shows how to position a `ContextMenu` with the location of the selected text within a `RichTextBox` control. [How to: Position a Custom Context Menu in a RichTextBox](http://msdn.microsoft.com/en-us/library/vstudio/ms752316%28v=vs.90%29.aspx...
``` static void tb_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.KeyStates == ((e.KeyStates ^ System.Windows.Input.KeyStates.Down)^System.Windows.Input.KeyStates.Down)) { if (e.Key == System.Windows.Input.Key.OemPeriod) { Tex...
15,503,973
I am struggling with the `StaleElementReferenceException` problem. I have seen quite a number of discussions on the topic but I haven't been able to find a solution to the issue that I am facing. The test is to get all the links on the footer of the web page and then verify whether the link is active or not by clickin...
2013/03/19
[ "https://Stackoverflow.com/questions/15503973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1376227/" ]
When you are storing all the links in the footer you are grabbing those elements as they are at that point in time. Upon navigating to a different page those particular elements no longer exist. When you return to the back these elements have been created anew. While the elements are the same via identifiers, they are...
I faced a similar issue, in my case when I type something into a text box it would navigate to another page, so while I come back on the previous page, that object gets stale. So this was causing the exception, I handled it by again initialising the elements as below - ``` PageFactory.initElements(driver, Test.class)...
15,503,973
I am struggling with the `StaleElementReferenceException` problem. I have seen quite a number of discussions on the topic but I haven't been able to find a solution to the issue that I am facing. The test is to get all the links on the footer of the web page and then verify whether the link is active or not by clickin...
2013/03/19
[ "https://Stackoverflow.com/questions/15503973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1376227/" ]
When you are storing all the links in the footer you are grabbing those elements as they are at that point in time. Upon navigating to a different page those particular elements no longer exist. When you return to the back these elements have been created anew. While the elements are the same via identifiers, they are...
You can handle going and coming to new tab as follows: String baseHandle = driver.getWindowHandle(); ``` Set<String> sr = driver.getWindowHandles(); if (sr.size()>1){ Set<String> sr1 = driver.getWindowHandles(); sr1.remove(baseHandle); ...
6,242
I want to buy a good all-purpose Chef's knife and also sharpen it myself. But I have no experience sharpening with a waterstone so I'm a little afraid of spending much money and then ruining the knife. What is the most basic type of knife in terms of materials and style which would allow me to effectively practice shar...
2010/08/28
[ "https://cooking.stackexchange.com/questions/6242", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/952/" ]
While you can learn how to sharpen on almost any straight blade knife, my recommendation is to start on one that: * Isn't expensive, (try yard sales, thrift stores, and pawn shops - the goal is to learn technique, not have a fancy knife) * Isn't very long, (6 inches max) * Is wide enough that wearing the blade away wo...
What about using the list of criteria developed in an [earlier question](https://cooking.stackexchange.com/questions/6158/what-should-i-look-for-in-a-good-multi-purpose-chefs-knife) and sharpening not with a waterstone, but with something easier for a novice sharpener to understand? Two-stage sharpeners like [this one ...
6,242
I want to buy a good all-purpose Chef's knife and also sharpen it myself. But I have no experience sharpening with a waterstone so I'm a little afraid of spending much money and then ruining the knife. What is the most basic type of knife in terms of materials and style which would allow me to effectively practice shar...
2010/08/28
[ "https://cooking.stackexchange.com/questions/6242", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/952/" ]
While you can learn how to sharpen on almost any straight blade knife, my recommendation is to start on one that: * Isn't expensive, (try yard sales, thrift stores, and pawn shops - the goal is to learn technique, not have a fancy knife) * Isn't very long, (6 inches max) * Is wide enough that wearing the blade away wo...
For the second purchase, get a reasonably traditional japanese knife (eg a user-quality kurouchi-style santoku/nakiri, should be $40 to $80. Made from a japanese carbon steel like SK-anything, or yellow or white paper steel). The reason being that these are usually not shipped with a factory edge meant to be used as-...
61,084,293
I have a Microsoft Excel (.xlsx) file which I would like to load into R. I've done this before and used `read.csv()`, which always worked fine, but with this file something strange happens. Something seems to go wrong with one column, which contains a row name and large numbers with values of 13 digits. This column is ...
2020/04/07
[ "https://Stackoverflow.com/questions/61084293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12799186/" ]
I solved this problem by using the `format` function, as proposed in another post by [rnso](https://stackoverflow.com/users/3522130/rnso) (see [How to prevent scientific notation in R?](https://stackoverflow.com/questions/25946047/how-to-prevent-scientific-notation-in-r/25946211)): ``` > xx = 100000000000 > xx [1] 1e+...
you could use the `as.bit64` function from the `bit64` package. Just make sure to not use 64bit numbers to reference other R objects. This solutions is good for numbers found in the `+-2^63` range.
61,084,293
I have a Microsoft Excel (.xlsx) file which I would like to load into R. I've done this before and used `read.csv()`, which always worked fine, but with this file something strange happens. Something seems to go wrong with one column, which contains a row name and large numbers with values of 13 digits. This column is ...
2020/04/07
[ "https://Stackoverflow.com/questions/61084293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12799186/" ]
I solved this problem by using the `format` function, as proposed in another post by [rnso](https://stackoverflow.com/users/3522130/rnso) (see [How to prevent scientific notation in R?](https://stackoverflow.com/questions/25946047/how-to-prevent-scientific-notation-in-r/25946211)): ``` > xx = 100000000000 > xx [1] 1e+...
One can just declare `options(scipen = 999)` and make sure that the environment does not change large numbers to exponential form.
577,152
> > Let $\pi$ denote a prime element in $\mathbb Z[i], \pi \notin \mathbb Z, i \mathbb Z$. Prove that $N(\pi)=2$ or $N(\pi)=p$, $p \equiv 1 \pmod 4, p$ is a prime. > > > I know that $\pi$ is prime in $\mathbb Z[i]$ implies it is irreducible. Also if $\pi$ has a prime norm, that is $N(\pi) = p$ then $\pi$ is irredu...
2013/11/22
[ "https://math.stackexchange.com/questions/577152", "https://math.stackexchange.com", "https://math.stackexchange.com/users/58349/" ]
> > By Fermat's Two Square theorem every prime number $\equiv 1 \pmod{4}$ can be written as a unique sum of two squares. > > > So you know that rational positive primes $\equiv 1 \pmod{4}$ (and also $2$) are reducible in $\mathbb{Z}[i]$. You also know, or can easily check, that $\mathbb{Z}[i]$ is a Euclidean ring,...
Well...there you did all, didn't you? I mean, *you* say you know $\;N(\pi)=a^2+b^2\;$ is a prime in $\;\Bbb Z\;$, and thus it either is $\;2\;$ or else an odd prime that can be expressed as the sum of two squares $\;\iff p\neq 3\pmod 4\iff p=1\pmod 4\;$ ....and voila! Now, it isn't true that $\;\alpha\in\Bbb Z[i]\;$ i...
71,324,155
I want to only see the times in the dictionary as it it currently being printed like [![dictionary](https://i.stack.imgur.com/YHmR2.jpg)](https://i.stack.imgur.com/YHmR2.jpg) How do i only see, for example the 17:00 - 18:00 part of the dictionary. ``` event_dates = {} #dictionary to store event dates and time df = p...
2022/03/02
[ "https://Stackoverflow.com/questions/71324155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14517667/" ]
For Child to Parent Interaction, you should pass a function as prop to the child from parent.. ``` export class Form extends React.Component<FormProps, { ..., isChecked?: boolean}> { constructor(props: FormProps) { super(props); this.state = { ..., isChecked:fal...
I guess you want to use `share` in your parent component and if that's the case you must set the state in the parent and pass it to your child as a prop just as you did with `isChecked`.
71,324,155
I want to only see the times in the dictionary as it it currently being printed like [![dictionary](https://i.stack.imgur.com/YHmR2.jpg)](https://i.stack.imgur.com/YHmR2.jpg) How do i only see, for example the 17:00 - 18:00 part of the dictionary. ``` event_dates = {} #dictionary to store event dates and time df = p...
2022/03/02
[ "https://Stackoverflow.com/questions/71324155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14517667/" ]
For Child to Parent Interaction, you should pass a function as prop to the child from parent.. ``` export class Form extends React.Component<FormProps, { ..., isChecked?: boolean}> { constructor(props: FormProps) { super(props); this.state = { ..., isChecked:fal...
Very easy to do you just need to pass a `handleChange` prop to your child component from the parent component and then utilize it in the child component. Checkout this [code-sandbox](https://codesandbox.io/s/flamboyant-wozniak-7jd8x8?file=/src/App.js)
63,707,017
In the Downloads tab of the My Account area in WooCommerce, by default the text says "No downloads available yet". I need to change this text to something more specific. I would rather not do this by copying plugin files to my child theme, but **would prefer to do it with code snippet**. If anyone can help, it would ...
2020/09/02
[ "https://Stackoverflow.com/questions/63707017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2663892/" ]
Oh, hey Waylon! Haha. Can you please post the entire stack trace that shows the error? I've copied your pipeline, and it visualizes just fine, for me, which means there are no circular dependencies. Perhaps there are other nodes that you have not listed here which are affecting your output? EDIT: Lim Hoang just poin...
The circular layer relationship you describe doesn't align with how data layers were originally designed, with restrictions on which layers feed to other layers: ``` | Layer | Input Layer | Output Layer | |--------------|-----------------...
59,963,609
I'm using [slick slider](https://kenwheeler.github.io/slick/) plugin, implementing the most basic examples that works at [jsfiddle](https://jsfiddle.net/hibbard_eu/5ox31m2a/) but doesn't work once I local run the slick slider. It seems once I run it locally I can't get the results if I'd run it in jsfiddle, but I don'...
2020/01/29
[ "https://Stackoverflow.com/questions/59963609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7359357/" ]
If you open the file normally on the browser, it won't work. Try serving the `index.html` file from `localhost`. It will solve the problem.
Add this to the css and try. Slide height is taking 100% height ```css .slick-slide { height:auto;} ```
6,421,855
I looked in the api docs but couldn't find much. I am stuck trying to create a clickable icon using the code below that displays a pop up box of information: ``` function initialize() { var myLatLng = new google.maps.LatLng(52.288, 0.78); var myOptions = { zoom: 8, center: myLatLng, mapTypeId: google...
2011/06/21
[ "https://Stackoverflow.com/questions/6421855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/594941/" ]
You are referencing the wrong object in addListener - using `marker` where you should be using `balloon`. The Marker object isn't added to the map. Change this: ``` google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,image_balloon); }); ``` to ``` google.maps.event.addListener(ball...
Not exactly sure what you're trying to accomplish but this may be of use. ``` var baseIcon = new GIcon(G_DEFAULT_ICON); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.info...
74,201,500
I have been trying to figure out the reason behind what could be wrong exactly. The basic HTML and CSS have been pre-written, but JavaScript is used to create the core elements (or items) meant to populate the DOM. In my script, I am trying to fetch product information to populate the browser interface with shopping ...
2022/10/26
[ "https://Stackoverflow.com/questions/74201500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19258933/" ]
The problem is, that you set the variable to `document.createElement('div').setAttribute('class', 'title')`, but `setAttribute('class', 'title')` doesn't return the created HTML element. You should do it like this: ``` // The parent const div_class_card = document.createElement('div') div_class_card.setAttribute('cla...
My preference is use HTML for HTML and then use javascript to manipulate/populate the HTML. From your code, the internal structure of your card is not immediately obvious. Use the `<template>` tag to structure your card. Then use javascript to populate a clone of the template, then add that to the DOM. Not only do I f...
30,537,654
I am fairly new to Angular an I am feeling lost in all of it's documentation. **Problem:** I am trying to create a button which has three phases: **Add User - Remove Request - Remove User** * So if you want to add a user you click on the **Add button**, which sends an ajax request to the server and if successful the...
2015/05/29
[ "https://Stackoverflow.com/questions/30537654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940025/" ]
What you want is the outerHTML of the svg Element but that is not really accessible in this way. Here [outerHTML of an SVG element](https://stackoverflow.com/questions/12592417/outerhtml-of-an-svg-element) is an idea of how to get the svg with content.
This will get you what you want in this case: ``` document.getElementById('container').getElementsByTagName('svg')[0].innerHTML; ```
30,537,654
I am fairly new to Angular an I am feeling lost in all of it's documentation. **Problem:** I am trying to create a button which has three phases: **Add User - Remove Request - Remove User** * So if you want to add a user you click on the **Add button**, which sends an ajax request to the server and if successful the...
2015/05/29
[ "https://Stackoverflow.com/questions/30537654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940025/" ]
What you want is the outerHTML of the svg Element but that is not really accessible in this way. Here [outerHTML of an SVG element](https://stackoverflow.com/questions/12592417/outerhtml-of-an-svg-element) is an idea of how to get the svg with content.
jquery ``` var container = $("#container").html().find('svg'); // or $("#container svg").html(); //return <rect></rect> you can use '<svg>'+container+'</svg>' ``` javascript ``` var container = document.getElementById('container'); var svg = container.getElementsByTagName('svg')[0].innerHTML; //return <rect></re...
30,537,654
I am fairly new to Angular an I am feeling lost in all of it's documentation. **Problem:** I am trying to create a button which has three phases: **Add User - Remove Request - Remove User** * So if you want to add a user you click on the **Add button**, which sends an ajax request to the server and if successful the...
2015/05/29
[ "https://Stackoverflow.com/questions/30537654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940025/" ]
This will get you what you want in this case: ``` document.getElementById('container').getElementsByTagName('svg')[0].innerHTML; ```
jquery ``` var container = $("#container").html().find('svg'); // or $("#container svg").html(); //return <rect></rect> you can use '<svg>'+container+'</svg>' ``` javascript ``` var container = document.getElementById('container'); var svg = container.getElementsByTagName('svg')[0].innerHTML; //return <rect></re...
35,584,687
I have a layout with ToolBar which has a close/back icon. Now I have created an another layout which is transparent and on top of previous layout. This layover layout also has a close/back icon. I need to align this icon EXACTLY on top of the icon beneath. Is there anyway to find the margins/paddings for this?
2016/02/23
[ "https://Stackoverflow.com/questions/35584687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/985213/" ]
Yes. You can look material design doc. <https://www.google.com/design/spec/layout/structure.html#structure-app-bar> App bar height: 56dp App bar left and right padding: 16dp App bar icon top, bottom, left padding: 16dp App bar title left padding: 72dp App bar title bottom padding: 20dp
The best way to fix this is having another ToolBar in the overlay fragment. In this way you can get icons exactly on top of other icon without doing any dirty work. At least that's how I resolved my issue.
25,608,913
I'm testing the execution time of some PHP scripts whose purpose is to serve web content on my web site. However I'm getting inconsistent results. The execution time is measured and logged to a text file. One of the scripts basically read a jpeg image from disk and serves it to the client. Here is a simplified vers...
2014/09/01
[ "https://Stackoverflow.com/questions/25608913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1579327/" ]
1. my other answer 2. there are more Caching systems. Your HDD, Your OS and PHP have all a caching system which are doing his job to optimize loading files. You can only see how long PHP needs to load your file. If you want to see how long your client need to load it, then you have to use JS. And dont forget, that yo...
You could try running the script from the command line to see if the connection lag is a factor. I suspect not though -- it's probably related to load on the server. If the disk or CPU is otherwise occupied at the time of the request, it will influence the execution time of your script.
25,608,913
I'm testing the execution time of some PHP scripts whose purpose is to serve web content on my web site. However I'm getting inconsistent results. The execution time is measured and logged to a text file. One of the scripts basically read a jpeg image from disk and serves it to the client. Here is a simplified vers...
2014/09/01
[ "https://Stackoverflow.com/questions/25608913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1579327/" ]
1. my other answer 2. there are more Caching systems. Your HDD, Your OS and PHP have all a caching system which are doing his job to optimize loading files. You can only see how long PHP needs to load your file. If you want to see how long your client need to load it, then you have to use JS. And dont forget, that yo...
Short and simple: flush(); doesnt wait for the client. Thats only the time, which PHP needed and not the network.
5,209,226
This problem is still not solved A video PHP tutorial I am following is building a file called initialize.php in which it is using the PHP pre-defined constant Directory\_Separator and then defining a site\_root. The site\_root is the *absolute file path (not the webserver path) for PHP to locate the files it needs*. ...
2011/03/06
[ "https://Stackoverflow.com/questions/5209226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577455/" ]
How about ``` defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__))); echo SITE_ROOT; ``` Instead of `define('SITE_ROOT', 'www.domain.com')` you should `define('SITE_ROOT', realpath(dirname(__FILE__))`. `www.domain.com` is the base url (of your site) while `realpath(dirname(__FILE__))` is th...
sorry, i have the answer for IMAGES not displaying in photograph.php, just remove DS ``` public function image_path() { return $this->upload_dir.$this->filename; } ``` working line is: ``` defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__)).DS."..".DS); ``` Thanks!
229,030
I have one copy for my Wii, but now my girlfriend would like to play co-op with me on our Wii U. I dont really want to go out and buy a second copy if we can't play over LAN together now that WiiConnect24 is no longer on service. Also, please don't recommend buying New Leaf. We already own it but want something we can...
2015/07/23
[ "https://gaming.stackexchange.com/questions/229030", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/42014/" ]
No, ACCF doesn't and has never worked over LAN. Why not Wiimmfi? It has full support for ACCF.
You can still play Animal Crossing city Folk or lets go to the City using the new WIIMMFI servers. They are private and created to replace the Nintendo WFC servers that closed down. All you need is a patched copy of ACCF or download the patcher for ACCF from WIIMMFI. You can google to find out all you need.
229,030
I have one copy for my Wii, but now my girlfriend would like to play co-op with me on our Wii U. I dont really want to go out and buy a second copy if we can't play over LAN together now that WiiConnect24 is no longer on service. Also, please don't recommend buying New Leaf. We already own it but want something we can...
2015/07/23
[ "https://gaming.stackexchange.com/questions/229030", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/42014/" ]
There is no local play. The only way to do this over LAN or Wifi is to hack your Wii. It's relatively simple and the only way to get continued support for this discontinued product. 1. Hack your Wii with LetterBomb ================================ <https://please.hackmii.com/> > > Instructions > > > 1. On Compute...
You can still play Animal Crossing city Folk or lets go to the City using the new WIIMMFI servers. They are private and created to replace the Nintendo WFC servers that closed down. All you need is a patched copy of ACCF or download the patcher for ACCF from WIIMMFI. You can google to find out all you need.
229,030
I have one copy for my Wii, but now my girlfriend would like to play co-op with me on our Wii U. I dont really want to go out and buy a second copy if we can't play over LAN together now that WiiConnect24 is no longer on service. Also, please don't recommend buying New Leaf. We already own it but want something we can...
2015/07/23
[ "https://gaming.stackexchange.com/questions/229030", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/42014/" ]
There is no local play. The only way to do this over LAN or Wifi is to hack your Wii. It's relatively simple and the only way to get continued support for this discontinued product. 1. Hack your Wii with LetterBomb ================================ <https://please.hackmii.com/> > > Instructions > > > 1. On Compute...
No, ACCF doesn't and has never worked over LAN. Why not Wiimmfi? It has full support for ACCF.
17,142
Is it possible to be able to delete a member without deleting his/her comments for posterity purposes such as retaining it for forums and the like?
2013/11/26
[ "https://expressionengine.stackexchange.com/questions/17142", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/636/" ]
If you're comfortable with SQL, you can update the database to *change* the member\_id on the comments to one that's not being deleted. So, you could create a 'past member' member, and then update the comments to use the member\_id of the 'past member'. This will disconnect those comments from the members you want to d...
To answer your direct question, it is not possible to delete a member and keep their comments using EE's native process of deleting members. Deleting a member from the control panel will delete the comments. I believe you can elect to have entries/comments moved to a different member.
32,998,386
I want to create an object based on the value of a variable. I hope the following code can explain better what I want: ``` $('.tariffCostState').each(function(){ var tariffCostObj = $(this).data('tariff-code-name'); /* How do I set the value of tariffCostObj as an object ? [EDIT] Imagine that var...
2015/10/07
[ "https://Stackoverflow.com/questions/32998386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/794035/" ]
Here's an idea of a possible solution you could try. Let the `Cow` and `Human` classes extend the `Entity` class. However, the `Entity` class would use a [factory](https://en.wikipedia.org/wiki/Factory_method_pattern) to instantiate the objects based on if the value was safe. Let's look at this in more detail: ``` /* ...
One thing you can do is create `Human` and `Cow` as subclasses of `Entity`. When you do `new Entity("Human")`, you can store a newly created `Human` object *inside* the `Entity` instance. Then you can use `__call` to redirect method calls to the "child element". ``` class Entity{ private $child; public funct...
22,828,972
I have seen many links for floating point number validation but none of them for precision. [only floating point number validation](https://stackoverflow.com/questions/12643009/regular-expression-for-floating-point-numbers) I want the field to display error if the input is 1234.31 or . but not for 123.5555555 or .34...
2014/04/03
[ "https://Stackoverflow.com/questions/22828972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3444788/" ]
Use this regex: ``` /^\d{0,3}\.\d+/ ``` But if you want to use your regex, modify it like this: ``` /^[^+-][0-9]{0,3}[.]?[0-9]+/ ``` Your original regex didn't work because you were making it to match only up to 2 decimal places. `+` in regex means 1 or many.
You pretty much had it ``` /^([0-9]{0,3})?\.[0-9]+|[0-9]+$/ ``` and use something like ``` if(!preg_match("^([0-9]{0,3})?\.[0-9]+|[0-9]+$/", $float)){} ```
28,636,112
In my Ruby on Rails application I am trying to display a three drop down menus in the \_form.html.erb which are rendered from the file \_booking\_lookup.html.erb and get there data from the drop down menu methods in the models. \_form.html.erb: ``` <%= render(:partial => '/booking_lookup', :locals=> {:film => @film =...
2015/02/20
[ "https://Stackoverflow.com/questions/28636112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It looks like `@films` is nil. Try setting `@films = Film.all` (instead of `@film = Film.all`) in \_form.html.erb. **Update**: I would recommend moving the queries to the controller action. In the Model-View-Controller pattern, Controllers should be asking Models for data, not Views. ``` # BookingLookupController de...
In Controller, select fields as you just want to display names in dropdown ``` def method_name @films = Film.select([:id, :title_info]) @showings = Showing.select([:id, :showing_times]) @seats = Seat.select([:id, :seats_available]) end ``` In page ``` <%= render(:partial => '/booking_lookup', :locals=> {:f...
65,858,077
I want to check if an object or variable is an instance of the specified class type, but using the name of this class, not its type. Something like this: ``` class A: pass class B(A): pass class C(B): pass c_inst = C() # Not working, isinstance expects the type: ok = isinstance(c_inst, 'A') ``` Are there any alt...
2021/01/23
[ "https://Stackoverflow.com/questions/65858077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/546205/" ]
Came up with this way, note: the class you are checking must be in globals though: ``` import inspect def isinstance_string(variable, string): cls = globals().get(string, None) if inspect.isclass(cls): return isinstance(variable, cls) return False class A: pass class B(A): pass class C(B): pass...
If you only have the class name as a string, you could do this ```py >>> class Foo:pass ... >>> foo = Foo() >>> foo.__class__.__name__ == 'Foo' True >>> foo.__class__.__name__ == 'Bar' False ``` However this isn't very reliable, because `Foo.__class__.__name__` is writeable ```py >>> foo.__class__.__name__ = 'Baz'...
9,531,036
I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page. Now I want that when I am clicking alphabet ('A') the list automatically show the label (...
2012/03/02
[ "https://Stackoverflow.com/questions/9531036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1138509/" ]
Based on Jan-Philip Gehrcke's response: ``` find . -type f -size -1024k -print0 | tar -czf --null -T - -f archive.tar.gz ``` for files less than 1M. Tested on OS X and Ubuntu Linux.
> > find ./myRep/ -type f -size -1024k | xargs tar cfvz myArchive.tar > > > In a word, first part of this expression construct a list of files that size is lower than 1024k recursively from ./myRep/ and second part create tar/gzip archive.
9,531,036
I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page. Now I want that when I am clicking alphabet ('A') the list automatically show the label (...
2012/03/02
[ "https://Stackoverflow.com/questions/9531036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1138509/" ]
The `...| tar c --null -T -` solution above is the best if you have adequate memory (i.e. the file list fits into your memory easily (in most cases, this is true)). However, xargs *does* have a place if you are memory-constrained, but you have to use it appropriately so that the multiple tar invocations have no ill eff...
> > find ./myRep/ -type f -size -1024k | xargs tar cfvz myArchive.tar > > > In a word, first part of this expression construct a list of files that size is lower than 1024k recursively from ./myRep/ and second part create tar/gzip archive.
9,531,036
I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page. Now I want that when I am clicking alphabet ('A') the list automatically show the label (...
2012/03/02
[ "https://Stackoverflow.com/questions/9531036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1138509/" ]
Based on Jan-Philip Gehrcke's response: ``` find . -type f -size -1024k -print0 | tar -czf --null -T - -f archive.tar.gz ``` for files less than 1M. Tested on OS X and Ubuntu Linux.
You could use a combination of find (with its -size flag) and xargs to pass it into tar. Something like: ``` find . -size -100k -print | xargs tar cvf archive.tar ``` for files less than 100k. See man find for the other size options
9,531,036
I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page. Now I want that when I am clicking alphabet ('A') the list automatically show the label (...
2012/03/02
[ "https://Stackoverflow.com/questions/9531036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1138509/" ]
The `...| tar c --null -T -` solution above is the best if you have adequate memory (i.e. the file list fits into your memory easily (in most cases, this is true)). However, xargs *does* have a place if you are memory-constrained, but you have to use it appropriately so that the multiple tar invocations have no ill eff...
You could use a combination of find (with its -size flag) and xargs to pass it into tar. Something like: ``` find . -size -100k -print | xargs tar cvf archive.tar ``` for files less than 100k. See man find for the other size options
9,531,036
I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page. Now I want that when I am clicking alphabet ('A') the list automatically show the label (...
2012/03/02
[ "https://Stackoverflow.com/questions/9531036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1138509/" ]
Based on Jan-Philip Gehrcke's response: ``` find . -type f -size -1024k -print0 | tar -czf --null -T - -f archive.tar.gz ``` for files less than 1M. Tested on OS X and Ubuntu Linux.
The `...| tar c --null -T -` solution above is the best if you have adequate memory (i.e. the file list fits into your memory easily (in most cases, this is true)). However, xargs *does* have a place if you are memory-constrained, but you have to use it appropriately so that the multiple tar invocations have no ill eff...
60,531,622
I'm trying to use `windows` system commands with a remote pc on `python3` and it doesn´t seem to work. When I try to type "dir" to list the commands from my remote pc it gives me an exception on my windows terminal. ``` raise TypeError('bytes args is not allowed on Windows') ``` I know I need to convert it in bytes...
2020/03/04
[ "https://Stackoverflow.com/questions/60531622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11851360/" ]
``` $ awk 'BEGIN{FS=OFS=" "} {gsub(/ /,0,$2)} 1' file ME45 P 131104113001.253 ME39 P 131104113007.700 ME38 P 131104113007.776 ME37 P 131104113008.285 ME36 P 131104113008.689 ME30 P 131104113010.252 ME26 P 131104113010.486 ME29 P 131104113009.598 ME28 P 131104113009.356 ME21 P 131104113009.911 ME20...
You can use a simple `sed` regex with 2 capture groups that match a digit separated by a single space: ``` sed -E 's/([0-9]) ([0-9])/\10\2/g' file ``` ``` ME45 P 131104113001.253 ME39 P 131104113007.700 ME38 P 131104113007.776 ME37 P 131104113008.285 ME36 P 131104113008.689 ME30 P 131104113010.252 ME26 P...
7,472,931
I wrote a Course class that has constructors that read from text and binary files and has methods to write to text and binary files. How do I write a junit test to test this class? see code below: ``` import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.PrintWriter; import java.util.Scanner...
2011/09/19
[ "https://Stackoverflow.com/questions/7472931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572207/" ]
Set mainViewController object as the delegate of an object of anotherViewController type. And use that delegate from AnotherViewController to pass messages to MainViewController. Inside MainViewController, when you create your AnotherViewController object do: ``` anotherVC.delegate = self; ``` And in AnotherViewCon...
I think you created an AnotherViewController pointer but did not set it. before you can access textEntered.TEXT, you should set you textEntered pointer to your AnotherViewController object. Here is how: on iGhalamViewController class, create a property for setting textEntered object like this in your interface decla...
42,640,555
Am working on AWS cluster re-assigning the replica shard in an AWS ES cluster of node 1. Where i want both primary and replica shards to be reside. But when a run the below command am getting an error ``` curl -XPOST 'http://AWS-CLuster-name.com/_cluster/allocation/reroute' -d '{ "commands": [{"allocate_replica":{"i...
2017/03/07
[ "https://Stackoverflow.com/questions/42640555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5439713/" ]
Correct, AWS does not allow you to control shard allocation directly, at least not in the usual way. I'm hoping it *can* be done in some other AWS-specific way, as I've got a yellow cluster that I'd really rather be green. :( *[Followup: it seems the Elasticsearch domain eventually realizes it can fix this itself. I...
This is not allowed in elasticsearch, since it would violate the concept as replicas for failover or distributed at all. <https://www.elastic.co/guide/en/elasticsearch/guide/master/replica-shards.html> Having the same primary and replica shard on the same node is useless and simpy not allowed. Has nothing to do with ...
42,640,555
Am working on AWS cluster re-assigning the replica shard in an AWS ES cluster of node 1. Where i want both primary and replica shards to be reside. But when a run the below command am getting an error ``` curl -XPOST 'http://AWS-CLuster-name.com/_cluster/allocation/reroute' -d '{ "commands": [{"allocate_replica":{"i...
2017/03/07
[ "https://Stackoverflow.com/questions/42640555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5439713/" ]
This is not allowed in elasticsearch, since it would violate the concept as replicas for failover or distributed at all. <https://www.elastic.co/guide/en/elasticsearch/guide/master/replica-shards.html> Having the same primary and replica shard on the same node is useless and simpy not allowed. Has nothing to do with ...
Elasticsearch cluster status becomes yellow or red due to multiple reasons. Sometimes it could so happen that, even after a considerable amount of time, the Elasticsearch domain doesn't fix the issue with the cluster status. This happens particularly when the maximum number of retries for shard allocation exceed the li...
42,640,555
Am working on AWS cluster re-assigning the replica shard in an AWS ES cluster of node 1. Where i want both primary and replica shards to be reside. But when a run the below command am getting an error ``` curl -XPOST 'http://AWS-CLuster-name.com/_cluster/allocation/reroute' -d '{ "commands": [{"allocate_replica":{"i...
2017/03/07
[ "https://Stackoverflow.com/questions/42640555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5439713/" ]
Correct, AWS does not allow you to control shard allocation directly, at least not in the usual way. I'm hoping it *can* be done in some other AWS-specific way, as I've got a yellow cluster that I'd really rather be green. :( *[Followup: it seems the Elasticsearch domain eventually realizes it can fix this itself. I...
Elasticsearch cluster status becomes yellow or red due to multiple reasons. Sometimes it could so happen that, even after a considerable amount of time, the Elasticsearch domain doesn't fix the issue with the cluster status. This happens particularly when the maximum number of retries for shard allocation exceed the li...
7,749,095
I have a app in the App Store compiled for 4.2 that is acting odd when running under iOS 5.0. I have tracked it down to `resignFirstResponder` being called twice under iOS 5.0 while it was only being called once under iOS 4.2 & 4.3. I have a derived a class from `UITextField` where I override `resignFirstResponder`. S...
2011/10/13
[ "https://Stackoverflow.com/questions/7749095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762089/" ]
Below is a work around that works for iOS 4.2, 4.3, and 5.0 It is not rocket science nor sexy, but it will work until I have better understanding of what is going on (Am I doing something wrong or is this a bug?). I am reporting this as a bug to Apple. BugTextField.h -------------- ``` #import <UIKit/UIKit.h> @inter...
One solution is to override `canResignFirstResponder` instead. This will only get called once. The problem is that this disagrees with the docs -- <https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIResponder_Class/Reference/Reference.html> -- so you're probably right: It's a bug.
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Like, say, [Scala](http://www.scala-lang.org/) or better yet Groovy which bills itself as a dynamic version of java?
Those things are mostly fluff. You need to solve some bigger issues like making concurrent code easy to design and reason about.
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Those things are mostly fluff. You need to solve some bigger issues like making concurrent code easy to design and reason about.
As much as I do feel that Java has become outdated, the truth is, I think we all know that as a language it still works pretty well. Sure, a lot of the newer stuff that we can find in other languages aren't there, but it still works! You can still do everything, it just sometimes takes longer and takes more work. I am ...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
If you were going to make big changes, wouldn't you want to start over again? There's lots of things that could do with fixing/removing in Java. You can't consider features individually - they do interact in unexpected ways. A big and complex language is probably a bad language (see C++).
As java is becoming open source, *you* can take the source(if it is all available) and make your own version of java. If this gets wide scale adoption then great, if not then it may not be a set of features that are needed.
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
I think the answer to "*Do we need a Java++?*" depends on who "*we*" are (and I'm not sure that "*we*" are all instances of one class ;-). This issue has been discussed on more than one occasion by [The Java Posse](http://www.javaposse.com/). Large corporate users of Java have a tendency to be more conservative. They ...
I actually really agree with your sentiment, having run into issues with Java that could be alleviated by your suggestions. In principle, you could write your own javac that works for this and uses the existing Hotspot JRE. However, you really can't make that happen without Sun's help. The problem is really twofold: ...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Currently in Java there are workarounds for many of these, which does make it harder to introduce more natural ways of doing these things. > > 1. First class functions, delegates. > > > Most cases are shorter using reflection. (But less natural) > > .4. Structs as value types distinct from classes, like C# and ...
Java can and should be improved, but I don't think that there needs to be one language to fit all needs. This is generally a bad idea, much like the death star. A lot of programmers are just lazy and don't want to learn new things. They rather stick with the one language they've been using for the last 10 years. If y...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Those things are mostly fluff. You need to solve some bigger issues like making concurrent code easy to design and reason about.
I suggest to have a look at [Beyond Java](http://oreilly.com/catalog/9780596100940/). There a good [review](http://www.joelonsoftware.com/items/2006/10/12.html) on [Joel on Software](http://www.joelonsoftware.com/).
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Wouldn't such an effort by Sun simply be called Java 7 (or 1.7 or 2.0)? Wouldn't such an effort by some other person/group be called something other than Java?
C++ is object oriented C. Java is already object oriented, so how would we go about another paradigm shift, making it Java++? In a way I think it is the other way around. Java is way ahead of C++. Java has high level libraries and frameworks, whereas C++ very often still is low-level and intermixed with ansi C (becaus...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Like, say, [Scala](http://www.scala-lang.org/) or better yet Groovy which bills itself as a dynamic version of java?
Currently in Java there are workarounds for many of these, which does make it harder to introduce more natural ways of doing these things. > > 1. First class functions, delegates. > > > Most cases are shorter using reflection. (But less natural) > > .4. Structs as value types distinct from classes, like C# and ...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Like, say, [Scala](http://www.scala-lang.org/) or better yet Groovy which bills itself as a dynamic version of java?
I actually really agree with your sentiment, having run into issues with Java that could be alleviated by your suggestions. In principle, you could write your own javac that works for this and uses the existing Hotspot JRE. However, you really can't make that happen without Sun's help. The problem is really twofold: ...
484,172
It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, **not** the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy ...
2009/01/27
[ "https://Stackoverflow.com/questions/484172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
Going to get downvoted by the Java fanboys for this but as someone who writes both Java and C# I'd say that C# is as close to Java ++ as you are going to get. C to C++ was a paradigm shift, from procedural to Object oriented, the only reason they retain the name is to woo C programmers into thinking that it was the sa...
Most of the features already exists. That language is: [![groovy](https://i.stack.imgur.com/dJcZg.png)](https://web.archive.org/web/20150324062712/http://groovy.codehaus.org:80/) (source: [codehaus.org](http://media.xircles.codehaus.org/_projects/groovy/_logos/medium.png)) = As for: > > *The ability to decla...
33,396,674
So in my program it should be able to solve our grade base on our school system. I have two textboxes , a single button and a single listbox, when I pressed the button it would get two different values from the textboxes and put it in a listbox. Now my problem is how do I get the two different values of summation fro...
2015/10/28
[ "https://Stackoverflow.com/questions/33396674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5421284/" ]
If you take a look at JavaDoc of `BaseFrameworkServlet#setDispatchOptionsRequest()` it contains following comment: > > Set whether this servlet should dispatch an HTTP OPTIONS request to the `#doService` method Default is "false", applying `javax.servlet.http.HttpServlet`'s default behavior (i.e. enumerating all stan...
For Spring Boot application add to the **application.properties** file the following property: ``` spring.mvc.dispatch-options-request=true ``` It will do the job.
43,340
This is kind of a frivolous bike question, but I am rebuilding a 1980s road bike to look like an old French porteur bike. The frame of my bike is a light silver blue color and I'd like to swap out the current saddle with a Brooks Aged B17 saddle. But I can't seem to find handlebar tape that matches the Brooks Aged sadd...
2016/10/22
[ "https://bicycles.stackexchange.com/questions/43340", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/22694/" ]
Brooks makes leather bar tape for some large amount of money (I think 75-100 USD), which matches their saddles. They also make a cotton bar tape in a similar color (for some large, but not as large amount of money).
Many people sew their own leather grips. It's easy enough to buy an old leather handbag, belt, or jacket at a thrift store that matches the color; cut it into strips; and sew it up using leather sewing thread or cord available at craft supply stores. [![Google search for DIY handlebar wrapping](https://i.stack.imgur....
43,340
This is kind of a frivolous bike question, but I am rebuilding a 1980s road bike to look like an old French porteur bike. The frame of my bike is a light silver blue color and I'd like to swap out the current saddle with a Brooks Aged B17 saddle. But I can't seem to find handlebar tape that matches the Brooks Aged sadd...
2016/10/22
[ "https://bicycles.stackexchange.com/questions/43340", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/22694/" ]
Brooks makes leather bar tape for some large amount of money (I think 75-100 USD), which matches their saddles. They also make a cotton bar tape in a similar color (for some large, but not as large amount of money).
As one answer suggests brooks makes their own handlebar tape and it is really nice with cork bar end plugs. As also noted it is not cheap. In addition as another answer suggests, you could make your own. That being said, if you don't feel overly creative you could let someone else make them, think [etsy.](https://www...
47,913,596
I am currently trying to create a clicker/money game and need some help. So basically the app consist of a button which gives +1 coins each time you click it. I would like to change the amount from +1 to +2 if you buy "double coins for 10 coins" as an example. [Click here to see how the app looks right now, it might ...
2017/12/20
[ "https://Stackoverflow.com/questions/47913596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6775648/" ]
Add a variable which keeps track of how many points you get when you tap the button, and when you buy the score multipliers, increase the variable accordingly, like so: ``` var scoreIncrease = 1 // this is how much the score increases when you tap // This is called when the "CLICK HERE" button is tapped @IBAction fun...
If I understand your problem correctly, you need some state variable to hold value of how much coins per click you need to add to overall score. You can do it like this: ```swift class GameViewController: UIViewController { // this is your state variables var coinsPerClick = 1 var score = 0 ov...
299,727
I want to make my Minecraft Skin Viewer not have to be put into the Terminal like ``` User@ChrUbuntu~$ Wine '/home/user/Documents/MCSV.exe' ``` I just want to be able to double click the .exe file and it will run. How can I do that?
2013/05/25
[ "https://askubuntu.com/questions/299727", "https://askubuntu.com", "https://askubuntu.com/users/155791/" ]
choose legacy mode on bios and then try [`boot-repair`](http://sourceforge.net/projects/boot-repair-cd/files/?source=navbar).
I've seen this on some new HP pc's.. Is yours a HP? FYI -- any new PC with the Win8 logo on it has Secure Boot.. It's in your BIOS, but every BIOS is different, so it could be hidden under a drop down sub-menu.. So far, there is no 100% sure-fire way to dual boot with a Win8 machine. Mine is even more difficult becau...
299,727
I want to make my Minecraft Skin Viewer not have to be put into the Terminal like ``` User@ChrUbuntu~$ Wine '/home/user/Documents/MCSV.exe' ``` I just want to be able to double click the .exe file and it will run. How can I do that?
2013/05/25
[ "https://askubuntu.com/questions/299727", "https://askubuntu.com", "https://askubuntu.com/users/155791/" ]
choose legacy mode on bios and then try [`boot-repair`](http://sourceforge.net/projects/boot-repair-cd/files/?source=navbar).
Try installing Boot Repair in a live CD/USB session. It can work miracles for a missing entry in grub.
299,727
I want to make my Minecraft Skin Viewer not have to be put into the Terminal like ``` User@ChrUbuntu~$ Wine '/home/user/Documents/MCSV.exe' ``` I just want to be able to double click the .exe file and it will run. How can I do that?
2013/05/25
[ "https://askubuntu.com/questions/299727", "https://askubuntu.com", "https://askubuntu.com/users/155791/" ]
choose legacy mode on bios and then try [`boot-repair`](http://sourceforge.net/projects/boot-repair-cd/files/?source=navbar).
Install Ubuntu (as in the OS, not the install) onto your USB. You could do that by setting up a virtual machine and running the iso of Ubuntu on it. When installing it, you might see your USB in the list of drives. Click on your USB and let it install Ubuntu. I've got a Lenovo Laptop and I was able to boot Ubuntu with...
20,936,058
I am working on some Forms and Report Builder written in Java which can run on Android as well. At least the Forms and Reports executer. Users can enter simple groovy scripts, which can change simple variables. Now my problems is that groovy won't really work on Android. Is any way that I use instead of Groovy another ...
2014/01/05
[ "https://Stackoverflow.com/questions/20936058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2871531/" ]
``` <document name="Index"> <entity name="c" transformer="TemplateTransformer" query="SELECT * FROM C"> <field column="Name" name="name"/> <field column="id" template="1"/> </entity> <entity name="p" transformer="TemplateTransformer" query="SELECT * FROM P"> <field column="Name" name="name"/> <fie...
You can add a column to your SQL query that contains static data like this: ```xml <document name="Index"> <entity name="c" query="SELECT *, 'foo' as NameFromC FROM C"> <field column="NameFromC" name="name"/> </entity> <entity name="p" query="SELECT *, 'bar' as NameFromP FROM P"> <field column="Na...
1,819,868
My web project (to be launched in a few months) is currently using CakePHP 1.2.5 / PHP 5.1.6 / MySQL 5.0.77. From a performance point of view, is it a good idea to upgrade to 1.3? Will it make it easier to later upgrade to the (PHP5-only) CakePHP 2?
2009/11/30
[ "https://Stackoverflow.com/questions/1819868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181222/" ]
I'd say it depends on when you expect to get your site out the door. 1.3 is currently in alpha status and probably won't be officially stable for a while. While the changes being made between 1.2 and 1.3 shouldn't have a huge impact on the overall stability, the new features being put in might still be buggy. The quest...
I think an upgrade is always a better opition IF you have time to do it. Im not into CataPHP but, i would do any upgraded if i have enough time before the release.
1,819,868
My web project (to be launched in a few months) is currently using CakePHP 1.2.5 / PHP 5.1.6 / MySQL 5.0.77. From a performance point of view, is it a good idea to upgrade to 1.3? Will it make it easier to later upgrade to the (PHP5-only) CakePHP 2?
2009/11/30
[ "https://Stackoverflow.com/questions/1819868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181222/" ]
I'd say it depends on when you expect to get your site out the door. 1.3 is currently in alpha status and probably won't be officially stable for a while. While the changes being made between 1.2 and 1.3 shouldn't have a huge impact on the overall stability, the new features being put in might still be buggy. The quest...
i'd upgrade early situation allows. if you haven't you might want to start using the cakephp/simpletest test to make sure things work just fine. i took my time upgrading from 1.1 to 1.2 and had a lot of 'fun' going through my codes. :)
13,639,193
I am using this: ``` var title = $('#input').val(); $('#titleset').click(function (){ $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ``` to try to get the value of an `input` box and then when the user clicks the button `#titleset`, overwrite the value from the input box to the `<h1>` element...
2012/11/30
[ "https://Stackoverflow.com/questions/13639193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1865231/" ]
You need to access the input's value within the click handler: ``` $('#titleset').click(function (){ var title = $('#input').val(); $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ```
you should use like this: ``` $('#titleset').click(function (){ $('#title').html('<h1>' + $('#input').val()+ '</h1>'); alert(title); }); ```
13,639,193
I am using this: ``` var title = $('#input').val(); $('#titleset').click(function (){ $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ``` to try to get the value of an `input` box and then when the user clicks the button `#titleset`, overwrite the value from the input box to the `<h1>` element...
2012/11/30
[ "https://Stackoverflow.com/questions/13639193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1865231/" ]
You need to access the input's value within the click handler: ``` $('#titleset').click(function (){ var title = $('#input').val(); $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ```
You can do it like this, ***Jquery code*** ``` <script language="javascript" type="text/javascript"> $(function(){ $('#titleset').click(function (){ $('h1').html($('#input').val()); }); }); </script> ``` ***Html code*** ``` <h1>hello</h1> <input name="" id="input" type="text" value="VALUE"/> <input...
13,639,193
I am using this: ``` var title = $('#input').val(); $('#titleset').click(function (){ $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ``` to try to get the value of an `input` box and then when the user clicks the button `#titleset`, overwrite the value from the input box to the `<h1>` element...
2012/11/30
[ "https://Stackoverflow.com/questions/13639193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1865231/" ]
You need to access the input's value within the click handler: ``` $('#titleset').click(function (){ var title = $('#input').val(); $('#title').html('<h1>' + title + '</h1>'); alert(title); }); ```
This is too simple (*just three lines of code*). Try this: ``` $('#titleset').click(function() { $('#title').html($('#input').val()); });​ ```
1,612
When a question is closed as being *off-topic* or *not a real question*, the question is automatically down-voted. This was instituted network-wide after some discussion [a couple of months ago](https://meta.stackexchange.com/q/84978/149432). It seems like this behavior should extend to *not constructive*, which is ar...
2011/05/20
[ "https://softwareengineering.meta.stackexchange.com/questions/1612", "https://softwareengineering.meta.stackexchange.com", "https://softwareengineering.meta.stackexchange.com/users/-1/" ]
There is a difference of intent. If a question is *off-topic*, that is akin to asking about tea on `coffee.stackexchange.com`. It's a blatant, obvious violation of the parameters of the site. Now, you could argue that users simply don't read, and I will agree with you, but ignorance of the law is not an excuse. But in...
I've never understood the difference between 'off-topic' and 'not constructive' - they're synonymous to me (i.e. a question that is deemed on-topic *is* constructive by nature of the requirements stated by the FAQ). So, no, I don't think there's any reason not to follow suit - 'not constructive' votes *should* incur ...
67,968
Hello I have a question about storage trie in Ethereum. I read many articles but there is no mention about what data is in storage trie. So, Please help me. Thanks.
2019/03/06
[ "https://ethereum.stackexchange.com/questions/67968", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/51200/" ]
The storage trie is where the smart contract data is stored, note that this is not part of the block (only the root of the storage root is stored in the block-header) because this data can be retrieved from the transactions. The article posted below by @Gabriel actually has an explanation of ethereum world state, incl...
I have to admit it is hard to find good explanations about what is stored in the Merkel Trie. [This article](https://medium.com/cybermiles/diving-into-ethereums-world-state-c893102030ed) was, to me, very useful I hope it help you as well "A storage trie is where all of the contract data lives. Each Ethereum account ha...
1,497,508
I need to buff out a line of text with a varying but large number of whitespace. I can figure out a janky way of doing a loop and adding whitespace to $foo, then splicing that into the text, but it is not an elegant solution.
2009/09/30
[ "https://Stackoverflow.com/questions/1497508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181759/" ]
I need a little more info. Are you just appending to some text or do you need to insert it? Either way, one easy way to get repetition is perl's 'x' operator, eg. ``` " " x 20000 ``` will give you 20K spaces. If have an existing string ($s say) and you want to pad it out to 20K, try ``` $s .= (" " x (20000 - leng...
use the 'x' operator: ``` print ' ' x 20000; ```
1,497,508
I need to buff out a line of text with a varying but large number of whitespace. I can figure out a janky way of doing a loop and adding whitespace to $foo, then splicing that into the text, but it is not an elegant solution.
2009/09/30
[ "https://Stackoverflow.com/questions/1497508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181759/" ]
I need a little more info. Are you just appending to some text or do you need to insert it? Either way, one easy way to get repetition is perl's 'x' operator, eg. ``` " " x 20000 ``` will give you 20K spaces. If have an existing string ($s say) and you want to pad it out to 20K, try ``` $s .= (" " x (20000 - leng...
If you always want the string to be a certain length you can use [`sprintf`](http://perldoc.perl.org/functions/sprintf.html): For example, to pad out `$var` with white space so it 20,000 characters long use: ``` $var = sprintf("%-20000s",$var); ```
1,497,508
I need to buff out a line of text with a varying but large number of whitespace. I can figure out a janky way of doing a loop and adding whitespace to $foo, then splicing that into the text, but it is not an elegant solution.
2009/09/30
[ "https://Stackoverflow.com/questions/1497508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181759/" ]
If you always want the string to be a certain length you can use [`sprintf`](http://perldoc.perl.org/functions/sprintf.html): For example, to pad out `$var` with white space so it 20,000 characters long use: ``` $var = sprintf("%-20000s",$var); ```
use the 'x' operator: ``` print ' ' x 20000; ```
40,518,147
Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code ``` import pandas as pd from pandas.stats.api import ols df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]}) res = ols(y=df['A'], x=df[['B']]) ``` How...
2016/11/10
[ "https://Stackoverflow.com/questions/40518147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6056160/" ]
What do you mean by "this doesn't work"? Is there an error? The following works as expected, as /server/main.js in a new meteor project: ``` import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo' Projects = new Mongo.Collection("projects"); Meteor.startup(() => { Projects.remove({}) ...
I think you need this: ``` Projects.update( {_id: projectId}, {$set: {"techInfo.equipInfo.1.quantity": 1000000} ); ```
40,518,147
Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code ``` import pandas as pd from pandas.stats.api import ols df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]}) res = ols(y=df['A'], x=df[['B']]) ``` How...
2016/11/10
[ "https://Stackoverflow.com/questions/40518147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6056160/" ]
I think you need this: ``` Projects.update( {_id: projectId}, {$set: {"techInfo.equipInfo.1.quantity": 1000000} ); ```
This should work, The `{` before `$set` needs to be closed ``` Projects.update( {_id: projectId}, {$set: {"techInfo.equipInfo.1.quantity": 1000000}} ); ```
40,518,147
Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code ``` import pandas as pd from pandas.stats.api import ols df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]}) res = ols(y=df['A'], x=df[['B']]) ``` How...
2016/11/10
[ "https://Stackoverflow.com/questions/40518147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6056160/" ]
What do you mean by "this doesn't work"? Is there an error? The following works as expected, as /server/main.js in a new meteor project: ``` import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo' Projects = new Mongo.Collection("projects"); Meteor.startup(() => { Projects.remove({}) ...
This should work, The `{` before `$set` needs to be closed ``` Projects.update( {_id: projectId}, {$set: {"techInfo.equipInfo.1.quantity": 1000000}} ); ```
40,518,147
Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code ``` import pandas as pd from pandas.stats.api import ols df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]}) res = ols(y=df['A'], x=df[['B']]) ``` How...
2016/11/10
[ "https://Stackoverflow.com/questions/40518147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6056160/" ]
What do you mean by "this doesn't work"? Is there an error? The following works as expected, as /server/main.js in a new meteor project: ``` import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo' Projects = new Mongo.Collection("projects"); Meteor.startup(() => { Projects.remove({}) ...
If you only want to update the first object of the array not depending on condition this is your solution ``` Projects.update({_id: projectId},{$set : {"techInfo.equipInfo.0.quantity" : 1000000}}) ``` If you want to traverse through the element find the array and update that,You can use this ``` Projects.update({_i...
40,518,147
Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code ``` import pandas as pd from pandas.stats.api import ols df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]}) res = ols(y=df['A'], x=df[['B']]) ``` How...
2016/11/10
[ "https://Stackoverflow.com/questions/40518147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6056160/" ]
If you only want to update the first object of the array not depending on condition this is your solution ``` Projects.update({_id: projectId},{$set : {"techInfo.equipInfo.0.quantity" : 1000000}}) ``` If you want to traverse through the element find the array and update that,You can use this ``` Projects.update({_i...
This should work, The `{` before `$set` needs to be closed ``` Projects.update( {_id: projectId}, {$set: {"techInfo.equipInfo.1.quantity": 1000000}} ); ```
555,631
I'm having a bit of trouble understanding how this logic level shift circuit works exactly. The design is from [Sparkfun](https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide/all). Hhere is the schematic: [![enter image description here](https://i.stack.imgur.com/yisiO.jpg)](https:...
2021/03/26
[ "https://electronics.stackexchange.com/questions/555631", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/232734/" ]
You'll need a linear current to voltage converter. ![schematic](https://i.stack.imgur.com/jvAa7.png) [simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fjvAa7.png) – Schematic created using [CircuitLab](https://www.circuitlab.com/) *Figure 1. Full schematic of a linear current to volta...
I do not know how your sensor output is, you do not give many information, but I would suggest you either a high or low side current sensing Op-amp. High side (more complex, but essential if you cannot place the Resistor for sensing (Shunt resistor) to the GND side: [High side Op-amp current sensing](https://www.ti.com...