qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
52,004,127
I am trying to call function on click, by passing `params`, but not happening. as soon as page loads all my functions are called. what is the correct way to handle the `onClick` with params? here is my code : ``` import React, { Component } from "react"; import { inject, observer } from "mobx-react"; @inject("store...
2018/08/24
[ "https://Stackoverflow.com/questions/52004127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/218349/" ]
There are a few ways, really. **Fast and easy, but less recommended:** This solution is the fastest, in terms of programming, because they are both one-liners. Their drawback is that anytime your component re-renders, you will be generating a new function (that's what `() => ...` does). This isn't a big deal normally...
``` <ul> {this.store.Store.todo.map(item => ( <li onClick={this.showItem.bind(this, item)}>{item}</li> //calls on page loads.. looking to call only on click!! ))} </ul> ``` or ``` <ul> {this.store.Store.todo.map(item => ( <li onClick={() => this.showItem(item)}>{item}<...
24,298,508
I'm currently writing C program, I'm using struct and pointer in the functions. Everything works well in Windows, but not linux debian. I'm having some errors when I try to compile my program in Linux Debian. ``` typedef struct human { char name[100],code[100]; }human; void hello(char* name, char* code) {} int main(...
2014/06/19
[ "https://Stackoverflow.com/questions/24298508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3691561/" ]
``` typedef struct human { char name[100], code[100]; } human; void hello(char* name, char* code) { } int main() { human human; hello(human.name, human.code); return 0; } ``` Remove the ampersands (`&`) when passing the `name` and `code` arrays. A `char` array is compatible with `char*`. When you s...
The error basically means that you are passing address of an array to a function which expects a `char` array. The type of `human.name` is `char [100]` i.e. `char` array of size 100. When you pass it as `human.name` to the function, it decays into base address of that array which has type `char*`. So, everything fine,...
3,189
This may be a weird question, because I already have this setup in my dotfiles somewhere, I just don't know how to tell a friend to set it up in their dotfiles. I want to know how to get a nice git diff displayed in your gitcommit file, whenever you compose a git commit message with vim. Here are [my dotfiles](https:/...
2015/05/07
[ "https://vi.stackexchange.com/questions/3189", "https://vi.stackexchange.com", "https://vi.stackexchange.com/users/226/" ]
This behavior seems to come from calling `git commit -v` or `git commit --verbose`. Not sure where you're doing that in your dotfiles, but I'd recommend telling him to set an alias in his git config that does that.
Additionally, Do try out [committia.vim](https://github.com/rhysd/committia.vim), a plugin for writing a commit message. When `git commit`ing, it splits the window and shows the diff and status window very nicely.
3,189
This may be a weird question, because I already have this setup in my dotfiles somewhere, I just don't know how to tell a friend to set it up in their dotfiles. I want to know how to get a nice git diff displayed in your gitcommit file, whenever you compose a git commit message with vim. Here are [my dotfiles](https:/...
2015/05/07
[ "https://vi.stackexchange.com/questions/3189", "https://vi.stackexchange.com", "https://vi.stackexchange.com/users/226/" ]
This behavior seems to come from calling `git commit -v` or `git commit --verbose`. Not sure where you're doing that in your dotfiles, but I'd recommend telling him to set an alias in his git config that does that.
Alternatively you can use Tim Pope's [fugitive.vim](https://github.com/tpope/vim-fugitive). It provides `:Gcommit` which is a wrapper around `git commit` (So you can do `:Gcommit --verbose`). Probably the more preferred way would be to use `:Gstatus` and execute `cvc`. Then just create your commit message and then sav...
23,662,380
Calling `getCanonicalFile` on a path such as `"/one/../../two"` returns `"/../two"`. Not all of the `".."` are resolved. In any other languages this would return `"/two"`. There are many potential problems with the Java behavior. Is there a Java method that behaves like other platforms? Do I have to do something wonky ...
2014/05/14
[ "https://Stackoverflow.com/questions/23662380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009908/" ]
Calculated fields will not add much overhead when you add them right into the query, since the data you're calculating on has already been read from disk. ``` SELECT SystemName, Caption, Label, Capacity, FreeSpace, 100*freespace/capacity [% of free space], capacity-freespace [used space] FROM CCS_Win32_V...
I think the question was the approach, not the actual T-SQL... Unless your query is used elsewhere and changing it might break something, then I would update your existing query. If it is used elsewhere and it's going to be a lot of work to update all the related processes/queries then I would create a separate query...
23,662,380
Calling `getCanonicalFile` on a path such as `"/one/../../two"` returns `"/../two"`. Not all of the `".."` are resolved. In any other languages this would return `"/two"`. There are many potential problems with the Java behavior. Is there a Java method that behaves like other platforms? Do I have to do something wonky ...
2014/05/14
[ "https://Stackoverflow.com/questions/23662380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009908/" ]
I think the question was the approach, not the actual T-SQL... Unless your query is used elsewhere and changing it might break something, then I would update your existing query. If it is used elsewhere and it's going to be a lot of work to update all the related processes/queries then I would create a separate query...
Just alias the computer values. Also, you should put the USE command first: ``` USE [CentralConfigurationStore] SELECT SystemName, Caption, Label, Capacity , FreeSpace, freespace/capacity AS FreeSpacePercent , capacity-freespace AS UsedSpace FROM CCS_Win32_Volume ORDER BY SystemName, Caption ```
23,662,380
Calling `getCanonicalFile` on a path such as `"/one/../../two"` returns `"/../two"`. Not all of the `".."` are resolved. In any other languages this would return `"/two"`. There are many potential problems with the Java behavior. Is there a Java method that behaves like other platforms? Do I have to do something wonky ...
2014/05/14
[ "https://Stackoverflow.com/questions/23662380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009908/" ]
Calculated fields will not add much overhead when you add them right into the query, since the data you're calculating on has already been read from disk. ``` SELECT SystemName, Caption, Label, Capacity, FreeSpace, 100*freespace/capacity [% of free space], capacity-freespace [used space] FROM CCS_Win32_V...
Just alias the computer values. Also, you should put the USE command first: ``` USE [CentralConfigurationStore] SELECT SystemName, Caption, Label, Capacity , FreeSpace, freespace/capacity AS FreeSpacePercent , capacity-freespace AS UsedSpace FROM CCS_Win32_Volume ORDER BY SystemName, Caption ```
5,982,930
Here's a [live demo](http://jsfiddle.net/oren_a/gFPY9/). I have the following html: ``` <div class="Q"> <div id="Q3"><span>1. </span>Which of the following is a string?</div> <div class="A"><input type="radio" id="Q3A1Correct" /></div> <div class="A"><input type="radio" id="Q3A2Correct"/></div> <div class="A"><i...
2011/05/12
[ "https://Stackoverflow.com/questions/5982930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/424952/" ]
not why it works for one but not the other but typically radio buttons have the same name and you make a choice so I started there so for html ``` <div class="Q"> <div id="Q3"><span>1. </span>Which of the following is a string?</div> <div class="A"><input type="radio" name="foo" /></div> <div class="A...
If no radio would checked my solution would be ``` var radioChecked; $element.bind('mousedown', function (event) { radioChecked = $element.is(':checked'); $element.one('click', function (event) { $element.prop('checked', radioChecked); return false; }); }); ``` since when no radio in a g...
5,615,546
I'm working on a **Rails 3** task demo project in which each instance of `Project` has many `tasks`, and instances of `Task` belong to one `project`. However, this latter relationship is optional, although it's defined in the `Task` model as `belongs_to :project`. Essentially, I want to be able to have routes like the...
2011/04/10
[ "https://Stackoverflow.com/questions/5615546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507475/" ]
This is actually more common than you think. Here is a solution: ``` class TasksController < ApplicationController before_filter :get_project before_filter :get_tasks private def get_project @project = Project.find(params[:project_id]) if params[:project_id] end def get_tasks @tasks = (@project) ? @...
The routes do not relate with associations. You can have any routes you like, even if you do not have any associations. And your routes seem good. The association is a convenience thing. It makes the programmer's life easier. If you even need to write something like : ``` task.projects ``` Then, you have to have a...
6,507,335
I can get partial matches on string fields with a query like this: ``` employees = context.Employees .Where(ee => ee.LastName.Contains(text)) .ToList(); ``` Is there any way to do the same for integer fields? I tried converting to a string on the fly but no luck: ``` employees = context.Employees .Where...
2011/06/28
[ "https://Stackoverflow.com/questions/6507335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12842/" ]
Well given that this is hypothetical, if EF doesn't support it directly, just force it to happen in-process: ``` employees = context.Employees .AsEnumerable() .Where(ee => ee.EmployeeID.ToString().Contains(text)) .ToList(); ``` Given that it's already a bad idea, pulling all the employee data isn't so mu...
I don't think this is a very good idea at all if you need to search like this you might as well have the searched column as a string. Otherwise what you are doing here is a table scan, regardless of your field is indexed. By doing so, as your table grows, the table scan will become more expensive.
432,639
I am not a Linux user, and was doing some homework, I blindly typed `sudo mkfs ext3 dev/sda2` (I had Ubuntu as Windows installation). I've done few more things, and turned Ubuntu off to switch on Windows back. No operating system installed - this is the message I'm getting. I plugged my HDD onto another computer and ...
2012/06/04
[ "https://superuser.com/questions/432639", "https://superuser.com", "https://superuser.com/users/138074/" ]
It seems you formatted the boot partition of Windows! No worries then. Before you continue, I advise you **always** to backup your precious data! What you need to do is restore the boot partition of Windows. Running the official recovery tool when booting Windows should do the trick. Other tools might be out there, but...
It's not too late to recover your files, since you probably only edited the partition table. It's important not to start using it though! What I suggest is to make sure the partition does not get mounted. A safe way to accomplish this is to boot with an operating system such as GParted Live or Parted Magic. The last t...
1,717,325
For some reason, I cannot think of a staircase function to satisfy the following set of points: {1,0} {2,0} {3,0} {4,0} {5,0} {6,0} {7,0} {8,1} The idea is that we want a function to express the week that correlates to a given day; e.g. 14 days is 1 week and 7 days, as opposed to 2 weeks and 0 days.
2016/03/28
[ "https://math.stackexchange.com/questions/1717325", "https://math.stackexchange.com", "https://math.stackexchange.com/users/326586/" ]
$\frac{4yy'}{(x^2+y^2)^2}=x$ then define $x^2+y^2=h^2 \Rightarrow 2hh'=2yy'+2x \Rightarrow y'=\frac{hh'-x}{y}$ then by substituting we get: $\frac{4(hh'-x)}{h^4}=x \Rightarrow4(hh'-x)=xh^4 \Rightarrow \frac{4hh'}{4+h^4}=x$ now define $g=h^2$ and solve the problem: $\Rightarrow g'=2hh'$ $$\frac{2g}{4+g^2}=x \Righta...
let $$ x^2 + y^2=k $$ then $$ y'=k'/2y-(x/y) $$ so $$ k'/2y-x/y=(k^2/4)x/y$$ => $$dk/(k^2/2+2)=xdx$$ => $$arctan(k/2)=x^2/2+c$$ so, $$ arctan(x^2/2+y^2/2)=x^2/2 + c$$
2,013,205
Find the sum of the infinite series \begin{equation} \sum\_{n=2}^\infty\frac{7n(n-1)}{3^{n-2}} \end{equation} I think it probably has something to do with a known Maclaurin series, but cannot for the life of me see which one.. Any hints would be appreciated! Edit: Using your hints, I was able to solve the problem. Sol...
2016/11/14
[ "https://math.stackexchange.com/questions/2013205", "https://math.stackexchange.com", "https://math.stackexchange.com/users/386094/" ]
Hint: Notice $$ \sum x^n = \frac{ 1}{1- x} $$ $$ \sum n x^{n-1} = \frac{1}{(1-x)^2} $$ $$ \sum n (n-1) x^{n-2} = \frac{2 }{(1-x)^3} $$ they all converge for $|x| < 1$
Hint. We have that for $x\not=1$, and $N\geq 2$, $$\frac{d^2}{dx^2}\left(\frac{1-x^{N+1}}{1-x}\right)=\frac{d^2}{dx^2}\left(\sum\_{n=0}^N x^n\right)=\sum\_{n=2}^N n(n-1)x^{n-2}.$$ P.S. for the downvoters. I considered a finite sum because it is not so straightforward to say that we can interchange the differentiation ...
2,013,205
Find the sum of the infinite series \begin{equation} \sum\_{n=2}^\infty\frac{7n(n-1)}{3^{n-2}} \end{equation} I think it probably has something to do with a known Maclaurin series, but cannot for the life of me see which one.. Any hints would be appreciated! Edit: Using your hints, I was able to solve the problem. Sol...
2016/11/14
[ "https://math.stackexchange.com/questions/2013205", "https://math.stackexchange.com", "https://math.stackexchange.com/users/386094/" ]
Hint: Notice $$ \sum x^n = \frac{ 1}{1- x} $$ $$ \sum n x^{n-1} = \frac{1}{(1-x)^2} $$ $$ \sum n (n-1) x^{n-2} = \frac{2 }{(1-x)^3} $$ they all converge for $|x| < 1$
You want $\sum\_{n=2}^{\infty} n(n-1) x^n $ for a certain value of $x$. Start with $\sum\_{n=2}^{\infty} x^n =\dfrac{x^2}{1-x} $ and differentiate it twice.
2,013,205
Find the sum of the infinite series \begin{equation} \sum\_{n=2}^\infty\frac{7n(n-1)}{3^{n-2}} \end{equation} I think it probably has something to do with a known Maclaurin series, but cannot for the life of me see which one.. Any hints would be appreciated! Edit: Using your hints, I was able to solve the problem. Sol...
2016/11/14
[ "https://math.stackexchange.com/questions/2013205", "https://math.stackexchange.com", "https://math.stackexchange.com/users/386094/" ]
Hint: Notice $$ \sum x^n = \frac{ 1}{1- x} $$ $$ \sum n x^{n-1} = \frac{1}{(1-x)^2} $$ $$ \sum n (n-1) x^{n-2} = \frac{2 }{(1-x)^3} $$ they all converge for $|x| < 1$
You can't just differentiate an infinite series term by term and expect the result to be the derivative. It is true that for a power series this process yields the expected result with the same radius of convergence, but it is a **non-trivial** fact. $ \def\lfrac#1#2{{\large\frac{#1}{#2}}} $ Furthermore, there is no n...
5,918,937
I'll try and make this clear; I've got two classes; `GPU(Object)`, for general access to GPU functionality, and `multifunc(threading.Thread)` for a particular function I'm trying to multi-device-ify. `GPU` contains most of the 'first time' processing needed for all subsequent usecases, so `multifunc` gets called from...
2011/05/07
[ "https://Stackoverflow.com/questions/5918937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/252556/" ]
The reason is context affinity. Every CUDA function instance is tied to a context, and they are not portable (the same applies to memory allocations and texture references). So each context must load the function instance separately, and then use the function handle returned by that load operation. If you are not usin...
Typical; as soon as I write the question I work it out. The issue was having the SourceModule operating outside of an active context. To fix it I moved the SourceModule invocation into the run function in the thread, below the cuda context setup. Leaving this up for a while because I'm sure someone else has a better...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
Did you install the JDK? When you install Ubuntu only the JRE is installed as part of the default packages. Unfortunately Ubuntu's package management names the directory as if the JRE were installed along with the JDK. The directory is named `java-6-openjdk` even though the JDK is not be present. Do the following: ...
--- Updated after noticing a small item in your output --- You have your `JAVA_HOME` set to the correct location for a **Java Runtime Environment**, which unsuprisingly will allow you to run Java programs, *but not develop them*. Shorten your `JAVA_HOME` to `/usr/lib/jvm/java-6-openjdk` (note the removal of the trail...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
--- Updated after noticing a small item in your output --- You have your `JAVA_HOME` set to the correct location for a **Java Runtime Environment**, which unsuprisingly will allow you to run Java programs, *but not develop them*. Shorten your `JAVA_HOME` to `/usr/lib/jvm/java-6-openjdk` (note the removal of the trail...
As Edwin Buck stated, check your $PATH for softlinks to /etc/alternatives/java in the /usr/bin/ directory. They are being read before your appended JAVA\_HOME variable. That was my problem: ``` ls -al /usr/bin/j* lrwxrwxrwx 1 root root 22 2012-05-07 13:26 /usr/bin/java -> /etc/alternatives/java lrwxrwxrwx 1 root ...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
--- Updated after noticing a small item in your output --- You have your `JAVA_HOME` set to the correct location for a **Java Runtime Environment**, which unsuprisingly will allow you to run Java programs, *but not develop them*. Shorten your `JAVA_HOME` to `/usr/lib/jvm/java-6-openjdk` (note the removal of the trail...
Changing JAVA\_HOME and PATH are insufficient. After installing the Java JDK version that you want (Java DEVELOPMENT Kit, not just Java Runtime Environment JRE), change your preferred version with `sudo update-alternatives --config java`. If you're on Ubuntu, you probably have 1.6 and 1.7 installed, and 1.8 is availab...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
Did you install the JDK? When you install Ubuntu only the JRE is installed as part of the default packages. Unfortunately Ubuntu's package management names the directory as if the JRE were installed along with the JDK. The directory is named `java-6-openjdk` even though the JDK is not be present. Do the following: ...
As Edwin Buck stated, check your $PATH for softlinks to /etc/alternatives/java in the /usr/bin/ directory. They are being read before your appended JAVA\_HOME variable. That was my problem: ``` ls -al /usr/bin/j* lrwxrwxrwx 1 root root 22 2012-05-07 13:26 /usr/bin/java -> /etc/alternatives/java lrwxrwxrwx 1 root ...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
Did you install the JDK? When you install Ubuntu only the JRE is installed as part of the default packages. Unfortunately Ubuntu's package management names the directory as if the JRE were installed along with the JDK. The directory is named `java-6-openjdk` even though the JDK is not be present. Do the following: ...
Changing JAVA\_HOME and PATH are insufficient. After installing the Java JDK version that you want (Java DEVELOPMENT Kit, not just Java Runtime Environment JRE), change your preferred version with `sudo update-alternatives --config java`. If you're on Ubuntu, you probably have 1.6 and 1.7 installed, and 1.8 is availab...
5,736,641
I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in bash while in the Project folder using this synax: ``` ./android create project --target 5 --name HelloCompile --path ../../Projects/Hello --activ...
2011/04/20
[ "https://Stackoverflow.com/questions/5736641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712997/" ]
As Edwin Buck stated, check your $PATH for softlinks to /etc/alternatives/java in the /usr/bin/ directory. They are being read before your appended JAVA\_HOME variable. That was my problem: ``` ls -al /usr/bin/j* lrwxrwxrwx 1 root root 22 2012-05-07 13:26 /usr/bin/java -> /etc/alternatives/java lrwxrwxrwx 1 root ...
Changing JAVA\_HOME and PATH are insufficient. After installing the Java JDK version that you want (Java DEVELOPMENT Kit, not just Java Runtime Environment JRE), change your preferred version with `sudo update-alternatives --config java`. If you're on Ubuntu, you probably have 1.6 and 1.7 installed, and 1.8 is availab...
44,082,551
This is the fiddle <http://jsfiddle.net/HGJb3/> HTML ``` <input class="anything" type="text"> <input type="text"> <input id="someid" type="text"> <input type="text"> <input id="someotherid" type="text"> <input type="text"> <input type ="text"> <br /> <br /> <br /> working one <input id="text" type="text"> ``` JS ...
2017/05/20
[ "https://Stackoverflow.com/questions/44082551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8007037/" ]
You can try this one to apply all input textbox: Fiddle [Working fiddle](http://jsfiddle.net/HGJb3/567/) [Fiddle example with popup](http://jsfiddle.net/HGJb3/568/) ``` $('input[type="text"]').keypress(function (e) { var regex = new RegExp("^[a-zA-Z0-9-]+$"); var str = String.fromCharCode(!e.charCode ? e.whic...
Like you said ( **Can't put all of their Ids same** ), this is not valid as per HTML because in a single page you cant use same Id for more than one element. Even though you will assign same Id to couple of elements but while fetching that element using id from client side, it will fetch the very first element found in...
44,082,551
This is the fiddle <http://jsfiddle.net/HGJb3/> HTML ``` <input class="anything" type="text"> <input type="text"> <input id="someid" type="text"> <input type="text"> <input id="someotherid" type="text"> <input type="text"> <input type ="text"> <br /> <br /> <br /> working one <input id="text" type="text"> ``` JS ...
2017/05/20
[ "https://Stackoverflow.com/questions/44082551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8007037/" ]
You can try this one to apply all input textbox: Fiddle [Working fiddle](http://jsfiddle.net/HGJb3/567/) [Fiddle example with popup](http://jsfiddle.net/HGJb3/568/) ``` $('input[type="text"]').keypress(function (e) { var regex = new RegExp("^[a-zA-Z0-9-]+$"); var str = String.fromCharCode(!e.charCode ? e.whic...
``` Just change your selector to "input:text" if you are using textbox $('input:text').keypress(function (e) { var regex = new RegExp("^[a-zA-Z0-9-]+$"); var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); if (regex.test(str)) { return true; } e.preventDefault(); return ...
194,032
I do not have much experience with VBA, and therefore need the help of this community for the following issue encountered. I used `Application.Volatile` in my code to run a series of calculation which slowed it down considerably. Without `Application.Volatile` the code is fast enough for my purposes, but does not calc...
2018/05/09
[ "https://codereview.stackexchange.com/questions/194032", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/169308/" ]
So with this you're building the string that matches a named range in the sheet and then using it, hence - > > > ``` > If RangeExists(rangesum) = False Then Exit For > > ``` > > being in *every* case, Right? You can just use the boolean as your boolean - ``` If Not RangeExists(rangesum) Then Exit For ``` But ...
`Application.Volatile` is only useful in UDFs and your image confirms this is how you are using it. `Application.Volatile` forces a recalculation whenever ***any*** cell in the worksheet is changed. A UDF will selectively calculate when a target cell in the signature is changed, but your UDF (according to your image) ...
56,358,605
I have a class inside a class. The outer class does some processing to generate an array of values. I want the inner class to be able to access the outer class' array. Is there a clean way to achieve this? I'm thinking to have a method in the outer class that calls a method in the inner class sending him the addres...
2019/05/29
[ "https://Stackoverflow.com/questions/56358605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2122995/" ]
Upon construction you can pass a reference of outer class to the constructor of the inner class. Using the reference you can call any function of the outer class. ``` // The actual definition of the inner class. class inner { public: inner(outer& o) : outer_(o) // Set the reference. { } // The fun...
C++ has a concept of the nested class. A nested class, which is declared in another enclosing class. It is a member and has the same access rights as any other member of the enclosing class. But the members of an enclosing class have no special access to members of a nested class.you can refer to this sample code. Hope...
56,358,605
I have a class inside a class. The outer class does some processing to generate an array of values. I want the inner class to be able to access the outer class' array. Is there a clean way to achieve this? I'm thinking to have a method in the outer class that calls a method in the inner class sending him the addres...
2019/05/29
[ "https://Stackoverflow.com/questions/56358605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2122995/" ]
Upon construction you can pass a reference of outer class to the constructor of the inner class. Using the reference you can call any function of the outer class. ``` // The actual definition of the inner class. class inner { public: inner(outer& o) : outer_(o) // Set the reference. { } // The fun...
Okay, here it is in full. Key points: * C++ has nested classes, however that's a 100% compile-time thing dealing with scoping and encapsulation, the class instances are 100% independent. * Therefore if you want either class to use the other in any way, it must either create an instance or accept one. * (and then, give...
214,600
i setup nginx for proxypass to docker registry, the protocol http works but if i set https i have: `400 The plain HTTP request was sent to HTTPS port` This is my nginx configuration file: ``` upstream docker-registry { server 127.0.0.1:5000; } server { listen 443 ssl; server_name docker-registry.mydomain.it; s...
2015/07/08
[ "https://unix.stackexchange.com/questions/214600", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/64116/" ]
Add: ``` proxy_set_header X-Forwarded-Proto $scheme; ```
Th problem was the docker-registry configuration, i have resolved adding the line `-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock --insecure-registry localhost:5000` to /etc/sysconfig/docker under `OPTIONS`
34,261,285
I've having some SQL issues today and duplicated a table's records several times trying to revert to a backup. Table is currently like the below: ``` id user col1 col2 col3 ... 1 3 0 9 3 ... 2 4 1 2 1 ... 3 2 1 9 2 ... ... 1 3 0 9 3 ... 2 4 1 2 1 ... 3 ...
2015/12/14
[ "https://Stackoverflow.com/questions/34261285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763652/" ]
You can easily delete duplicates just by grouping them up. like: ``` Select id,user,col1,col2,.... from the Table_name group by id,user,col1,col2,.... ``` This would remove duplicates at the level of all columns and hence solves your problem
The best way to delete the duplicate records is by using the CTE and `ROW_NUMBER()` over Partition by Column list. below is the syntax to delete the duplicate rows. ``` WITH CTE AS( SELECT [col1], [col2], [col3], [col4], [col5], [col6], [col7], RN = ROW_NUMBER()OVER(PARTITION BY col1 ORDER BY col1) FROM d...
13,497,851
I use this [dialog box](http://jqueryui.com/dialog/#default) I would prefer ask my question with [jsfiddle](http://jsfiddle.net/97LXc/3/) but i haven't it worked in jsfiddle. So i put here a [demo](http://www.olmasigereken.com/demo1/?url=dialog). If i don't use `visibility:hidden;` in `#dialog` block, when url paramet...
2012/11/21
[ "https://Stackoverflow.com/questions/13497851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075846/" ]
With extension method ``` public static IEnumerable<List<T>> ToBatches<T>(this List<T> list, int batchSize) { int index = 0; List<T> batch = new List<T>(batchSize); foreach (T item in list) { batch.Add(item); index++; if (index == batchSize) { index = 0...
[MoreLINQ](http://code.google.com/p/morelinq/) has a [`Batch` extension method](http://code.google.com/p/morelinq/source/browse/MoreLinq/Batch.cs) that would allow you to call ``` var listOfRecords = GetListOfRecordsFromDb( _connectionString ); var batchSize = Convert.ToInt32( ConfigurationManager.AppSettings["BatchSi...
882,379
I'm running into problems with SSSD and Active Directory integration. My AD is setup with a setup of 9 Domain Controllers, some of which are firewalled and inaccessible for various security reasons. Therefore, service discovery won't work with SSSD. This should be fine, as I should be able to explicitly define the URIs...
2017/11/08
[ "https://serverfault.com/questions/882379", "https://serverfault.com", "https://serverfault.com/users/443119/" ]
There are many ways to track file movement between systems and environments. However, this is not really a technology product situation. This is a business process and information security situation. Even if you buy a really expensive DLP, you need the policies, processes, and audits to make it meaningful. (See my clos...
You wouldn't be able to track a file from one server to another, but with Windows auditing you can see the access action on the source server and the creation action on the destination server. Enable '[Object Access](https://technet.microsoft.com/en-us/library/dn319056(v=ws.11).aspx)' auditing in the servers 'Advanced...
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
Another one for images that isn't supported very well but does work is [ImageField zip support](http://drupal.org/project/imagefield_zip)
**HTML5 Upload** <http://drupal.org/sandbox/z7/1348240> > > This modules should be regarded a streamlined solution for > batch-uploading of images (and other files) for Drupal 7 in modern > (HTML5 compliant) browser, nothing more. > > > Didn't try yet but the code is clear and compact.
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
We've had excellent luck with [Plupload](http://www.plupload.com/). It bends over backwards to achieve cross-browser compatibility, using Silverlight, Flash, HTML5, and falling back to classic HTML4 'select file' widgets depending on the browser's capabilities. The [Drupal integration module](http://drupal.org/project...
Another one for images that isn't supported very well but does work is [ImageField zip support](http://drupal.org/project/imagefield_zip)
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
We've had excellent luck with [Plupload](http://www.plupload.com/). It bends over backwards to achieve cross-browser compatibility, using Silverlight, Flash, HTML5, and falling back to classic HTML4 'select file' widgets depending on the browser's capabilities. The [Drupal integration module](http://drupal.org/project...
**HTML5 Upload** <http://drupal.org/sandbox/z7/1348240> > > This modules should be regarded a streamlined solution for > batch-uploading of images (and other files) for Drupal 7 in modern > (HTML5 compliant) browser, nothing more. > > > Didn't try yet but the code is clear and compact.
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
If you can put these files into a zip, and you want/have to use core Upload module, you can try [Multiple Upload Alone](http://drupal.org/project/multiuploadalone) (Drupal 6.x).
**HTML5 Upload** <http://drupal.org/sandbox/z7/1348240> > > This modules should be regarded a streamlined solution for > batch-uploading of images (and other files) for Drupal 7 in modern > (HTML5 compliant) browser, nothing more. > > > Didn't try yet but the code is clear and compact.
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
We've had excellent luck with [Plupload](http://www.plupload.com/). It bends over backwards to achieve cross-browser compatibility, using Silverlight, Flash, HTML5, and falling back to classic HTML4 'select file' widgets depending on the browser's capabilities. The [Drupal integration module](http://drupal.org/project...
Here's my comparison wiki in the Similar Module Review group. <http://groups.drupal.org/node/155764> Dumping the content here as it is now... **[Aurigma Mass Uploader for CCK](http://drupal.org/project/aurigma) (6.x-2.0)** The Aurigma Uploader for Imagefield module integrates the commercial Aurigma Image Uploader wit...
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
[clientside\_validation](http://drupal.org/project/clientside_validation) (drupal-6 and drupal-7) performs some additional client-side checks, including checks on uploaded file extensions (but not MIME Types). (And, as @tim.plunkett mentioned in the comments, [mimedetect](http://drupal.org/project/mimedetect) is useful...
**HTML5 Upload** <http://drupal.org/sandbox/z7/1348240> > > This modules should be regarded a streamlined solution for > batch-uploading of images (and other files) for Drupal 7 in modern > (HTML5 compliant) browser, nothing more. > > > Didn't try yet but the code is clear and compact.
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
We've had excellent luck with [Plupload](http://www.plupload.com/). It bends over backwards to achieve cross-browser compatibility, using Silverlight, Flash, HTML5, and falling back to classic HTML4 'select file' widgets depending on the browser's capabilities. The [Drupal integration module](http://drupal.org/project...
If you can put these files into a zip, and you want/have to use core Upload module, you can try [Multiple Upload Alone](http://drupal.org/project/multiuploadalone) (Drupal 6.x).
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
[clientside\_validation](http://drupal.org/project/clientside_validation) (drupal-6 and drupal-7) performs some additional client-side checks, including checks on uploaded file extensions (but not MIME Types). (And, as @tim.plunkett mentioned in the comments, [mimedetect](http://drupal.org/project/mimedetect) is useful...
Another one for images that isn't supported very well but does work is [ImageField zip support](http://drupal.org/project/imagefield_zip)
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
Here's my comparison wiki in the Similar Module Review group. <http://groups.drupal.org/node/155764> Dumping the content here as it is now... **[Aurigma Mass Uploader for CCK](http://drupal.org/project/aurigma) (6.x-2.0)** The Aurigma Uploader for Imagefield module integrates the commercial Aurigma Image Uploader wit...
**HTML5 Upload** <http://drupal.org/sandbox/z7/1348240> > > This modules should be regarded a streamlined solution for > batch-uploading of images (and other files) for Drupal 7 in modern > (HTML5 compliant) browser, nothing more. > > > Didn't try yet but the code is clear and compact.
188
We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?
2011/03/03
[ "https://drupal.stackexchange.com/questions/188", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/115/" ]
[clientside\_validation](http://drupal.org/project/clientside_validation) (drupal-6 and drupal-7) performs some additional client-side checks, including checks on uploaded file extensions (but not MIME Types). (And, as @tim.plunkett mentioned in the comments, [mimedetect](http://drupal.org/project/mimedetect) is useful...
If you can put these files into a zip, and you want/have to use core Upload module, you can try [Multiple Upload Alone](http://drupal.org/project/multiuploadalone) (Drupal 6.x).
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
You can create a new migration and [change just one column type](https://laravel.com/docs/5.2/migrations#modifying-columns): ```php public function up() { Schema::table('sometable', function (Blueprint $table) { $table->text('text')->change(); }); } ``` You need to install `doctrine/dbal` to make thi...
According to [Laravel Doc](https://laravel.com/docs/master/migrations#modifying-columns) You can do it like ``` Schema::table('yourTable', function (Blueprint $table) { $table->text('text')->change(); }); ``` > > be sure to add the doctrine/dbal dependency to your composer.json file > > >
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
You can create a new migration and [change just one column type](https://laravel.com/docs/5.2/migrations#modifying-columns): ```php public function up() { Schema::table('sometable', function (Blueprint $table) { $table->text('text')->change(); }); } ``` You need to install `doctrine/dbal` to make thi...
It's possible to do with a TABLE migration. As mentioned in other posts, be sure to run `composer require doctrine/dbal` from your project root. These are set up with: ``` php artisan make:migration alter_table_[yourtablenamehere]_change_[somecolumnname] --table=[yourtablenamehere] ``` from your project root. Fro...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
You can create a new migration and [change just one column type](https://laravel.com/docs/5.2/migrations#modifying-columns): ```php public function up() { Schema::table('sometable', function (Blueprint $table) { $table->text('text')->change(); }); } ``` You need to install `doctrine/dbal` to make thi...
If you get following error using `change()` > > Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. > > > this means that exists some column (not necessarily changed one) in your table which has enum type. So instead using `change()` you can use following function: ...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
You can create a new migration and [change just one column type](https://laravel.com/docs/5.2/migrations#modifying-columns): ```php public function up() { Schema::table('sometable', function (Blueprint $table) { $table->text('text')->change(); }); } ``` You need to install `doctrine/dbal` to make thi...
Following worked for me. Definitely you need to install **doctrine/dbal** to make this work, using following command in terminal. ``` composer require doctrine/dbal ``` Then create migration as mentioned here- <https://laravel.com/docs/master/migrations#generating-migrations> open your migration file and write dow...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
According to [Laravel Doc](https://laravel.com/docs/master/migrations#modifying-columns) You can do it like ``` Schema::table('yourTable', function (Blueprint $table) { $table->text('text')->change(); }); ``` > > be sure to add the doctrine/dbal dependency to your composer.json file > > >
If you get following error using `change()` > > Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. > > > this means that exists some column (not necessarily changed one) in your table which has enum type. So instead using `change()` you can use following function: ...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
According to [Laravel Doc](https://laravel.com/docs/master/migrations#modifying-columns) You can do it like ``` Schema::table('yourTable', function (Blueprint $table) { $table->text('text')->change(); }); ``` > > be sure to add the doctrine/dbal dependency to your composer.json file > > >
Following worked for me. Definitely you need to install **doctrine/dbal** to make this work, using following command in terminal. ``` composer require doctrine/dbal ``` Then create migration as mentioned here- <https://laravel.com/docs/master/migrations#generating-migrations> open your migration file and write dow...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
It's possible to do with a TABLE migration. As mentioned in other posts, be sure to run `composer require doctrine/dbal` from your project root. These are set up with: ``` php artisan make:migration alter_table_[yourtablenamehere]_change_[somecolumnname] --table=[yourtablenamehere] ``` from your project root. Fro...
If you get following error using `change()` > > Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. > > > this means that exists some column (not necessarily changed one) in your table which has enum type. So instead using `change()` you can use following function: ...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
It's possible to do with a TABLE migration. As mentioned in other posts, be sure to run `composer require doctrine/dbal` from your project root. These are set up with: ``` php artisan make:migration alter_table_[yourtablenamehere]_change_[somecolumnname] --table=[yourtablenamehere] ``` from your project root. Fro...
Following worked for me. Definitely you need to install **doctrine/dbal** to make this work, using following command in terminal. ``` composer require doctrine/dbal ``` Then create migration as mentioned here- <https://laravel.com/docs/master/migrations#generating-migrations> open your migration file and write dow...
37,724,150
I need to change with a migration column type of `$table->string('text');` to a text type, I have tried to do that in a few ways, but none of them worked. Is it possible to do it in one migration? I could I guess drop the column and then create it again with a new type, but I wonder if it is possible to do it in one mi...
2016/06/09
[ "https://Stackoverflow.com/questions/37724150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592083/" ]
If you get following error using `change()` > > Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. > > > this means that exists some column (not necessarily changed one) in your table which has enum type. So instead using `change()` you can use following function: ...
Following worked for me. Definitely you need to install **doctrine/dbal** to make this work, using following command in terminal. ``` composer require doctrine/dbal ``` Then create migration as mentioned here- <https://laravel.com/docs/master/migrations#generating-migrations> open your migration file and write dow...
16,159,195
I am trying to build an HTTP client. So far I have something that takes an ip address and prints the http response, no problem. But when I try to take that response and put it into a string the program hangs. So this works: ``` write(sockfd, sendBuff, strlen(sendBuff)); string s = ""; while((n = read(sockfd, recvBu...
2013/04/23
[ "https://Stackoverflow.com/questions/16159195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174472/" ]
A good approach might instead be to have a single reader that reads chunks and then hands each chunk off to a worker thread from a thread pool. Given that these will be inserted into a database the inserts will be by far the slow parts compared to reading the input so a single thread should suffice for reading. Below ...
I don't think you can read an InputStream concurrently. That is why the contract defines read, reset, and mark - the idea is that the stream keeps track internally what has been read and what has not. If you're reading a file, just open multiple streams. You could use the [skip()](http://docs.oracle.com/javase/7/docs/...
16,159,195
I am trying to build an HTTP client. So far I have something that takes an ip address and prints the http response, no problem. But when I try to take that response and put it into a string the program hangs. So this works: ``` write(sockfd, sendBuff, strlen(sendBuff)); string s = ""; while((n = read(sockfd, recvBu...
2013/04/23
[ "https://Stackoverflow.com/questions/16159195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174472/" ]
A good approach might instead be to have a single reader that reads chunks and then hands each chunk off to a worker thread from a thread pool. Given that these will be inserted into a database the inserts will be by far the slow parts compared to reading the input so a single thread should suffice for reading. Below ...
First of all, to read the file concurrently starting from different offsets you need *random access* to the file, this means reading a file from any position. Java allows this with RandomAccessFile in java.in or with SeekableByteChannel in java.nio: [Best Way to Write Bytes in the Middle of a File in Java](https://sta...
16,159,195
I am trying to build an HTTP client. So far I have something that takes an ip address and prints the http response, no problem. But when I try to take that response and put it into a string the program hangs. So this works: ``` write(sockfd, sendBuff, strlen(sendBuff)); string s = ""; while((n = read(sockfd, recvBu...
2013/04/23
[ "https://Stackoverflow.com/questions/16159195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174472/" ]
First of all, to read the file concurrently starting from different offsets you need *random access* to the file, this means reading a file from any position. Java allows this with RandomAccessFile in java.in or with SeekableByteChannel in java.nio: [Best Way to Write Bytes in the Middle of a File in Java](https://sta...
I don't think you can read an InputStream concurrently. That is why the contract defines read, reset, and mark - the idea is that the stream keeps track internally what has been read and what has not. If you're reading a file, just open multiple streams. You could use the [skip()](http://docs.oracle.com/javase/7/docs/...
10,290,927
I have created 6 view controllers in the following way: ``` Truck_Tracker_AppAppDelegate *delegate = (Truck_Tracker_AppAppDelegate *)UIApplication.sharedApplication.delegate; UIViewController *viewController1 = [[TrucksViewController alloc] initWithNibName:@"TrucksView" bundle:nil]; UIViewController *viewController2 =...
2012/04/24
[ "https://Stackoverflow.com/questions/10290927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1294227/" ]
Well, there's some things you have to understand about UINavigationController first. By using `UINavigationController * navigationController = [[UINavigationController alloc]initWithRootViewController:myViewController];`, you are actually creating the navigation controller for the class myViewController, which automati...
You create an NSArray containing pointers to the view controllers and assign the NSArray to the navigation controller's viewControllers property.
698,617
Multiple users are running java applications on a 60-core compute server (Linux/Ubuntu-based). There are different applications and most of them are not developed in-house. While the sysadmin thinks it is okay for a given user's Java process to use 10 cores at any given moment, she would like them not to use more than...
2015/06/12
[ "https://serverfault.com/questions/698617", "https://serverfault.com", "https://serverfault.com/users/288609/" ]
On the OS front: * I would say the the classical method is to set CPU affinity with `taskset`. * A better alternative is to use [`cgroups`](https://en.wikipedia.org/wiki/Cgroups). * And the buzz-word solution is to run your applications in [Docker](https://en.wikipedia.org/wiki/Docker_(software)) containers. However, ...
I would say, it is worth viewing this video. <https://vimeo.com/181900266> It gives a very good overview about Java vs. cgroups vs. containers, and how the JVM finds out e.g. the number of CPUs. Based on this I would say, that up to Java 8 the JVM determines the number of available CPUs on a way, that it always consi...
15,073,584
I have this code that uses an `inefficientProcess()` that consumes plenty of memory: My goal is to use some sort of `setTimeout(function(){...},0)` technique so the browser will not get stuck while executing the code. **How do I change the code so it will work with setTimeout?** ``` function powerOfTwo(num) { i...
2013/02/25
[ "https://Stackoverflow.com/questions/15073584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/657801/" ]
Javascript is single-threaded, and all your code is blocking. There is a new standard in HTML5, WebWorkers API, that will allow you to delegate your task to a different thread. You can then pass a callback function to be executed with the result. <https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers> Simple...
> > The HTML element allows you to define when the JavaScript > code in your page should start executing. The “async” and “defer” > attributes were added to WebKit early September. Firefox has been > supporting them quite a while already. > > > Saw that on this [Site](http://peter.sh/experiments/asynchronous-an...
15,073,584
I have this code that uses an `inefficientProcess()` that consumes plenty of memory: My goal is to use some sort of `setTimeout(function(){...},0)` technique so the browser will not get stuck while executing the code. **How do I change the code so it will work with setTimeout?** ``` function powerOfTwo(num) { i...
2013/02/25
[ "https://Stackoverflow.com/questions/15073584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/657801/" ]
As was mentioned in Andre's answer, there's a new HTML5 standard that will allow you to set off a task on a different thread. Otherwise, you can call setTimeout with a time of 0 to allow the current execution path to finish (and perhaps some UI changes to render) before the inefficientProcess is called. But whether yo...
> > The HTML element allows you to define when the JavaScript > code in your page should start executing. The “async” and “defer” > attributes were added to WebKit early September. Firefox has been > supporting them quite a while already. > > > Saw that on this [Site](http://peter.sh/experiments/asynchronous-an...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
For a web application, this is actually easy. Presumably there *is* functionality to edit these objects (e.g. for maintainers or admins), and this functionality must somehow map to a system state change when certain requests are received from the web app. All you have to do is verify that when the server side receives...
Negative requirements are always tricky. I know many places where they are forbidden because of the difficulty in qualification. Interestingly, the example you gave has already taken the step to turn it into a positive requirement. "x object should be read-only for users" is testable. You get object x, and you check t...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
A common approach for requirements of the form "this must never happen" is [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). The test case can be formulated like this: 1. Set up initial state. 2. Have a subroutine that verifies that the state of objects is as it should be. 3. Run a web application fuzzer for giv...
One option may be to test for the inverse, with functionality being considered a failure state. Let's break the requirement up, and look at its success and failure states: > > ##### Requirement: x is read-only for users. > > > `Success:` x is read-only. > > `Failure:` x is not read-only. > > > Of these, it t...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
One option may be to test for the inverse, with functionality being considered a failure state. Let's break the requirement up, and look at its success and failure states: > > ##### Requirement: x is read-only for users. > > > `Success:` x is read-only. > > `Failure:` x is not read-only. > > > Of these, it t...
I am assuming the functionality does not exist and you therefore can't test it. That means for example data stored as a plain old object with no public member or setter. However you need to prove it does not exists. From my experience with medical software you need to produce a document, probably a design review where...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
A common approach for requirements of the form "this must never happen" is [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). The test case can be formulated like this: 1. Set up initial state. 2. Have a subroutine that verifies that the state of objects is as it should be. 3. Run a web application fuzzer for giv...
It’s tricky if your code is designed so that the compiler doesn’t even compile a statement that would modify x. Say const int x = 3; x = 5; You can’t compile and run a unit test that tests this. I have at times collected such statements, commented them out with instructions that each of these statements should fail to...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
For a web application, this is actually easy. Presumably there *is* functionality to edit these objects (e.g. for maintainers or admins), and this functionality must somehow map to a system state change when certain requests are received from the web app. All you have to do is verify that when the server side receives...
Sometimes you can't actually test things. But you can verify them by inspection of the source code, build files, etc. If you can show that the software provides no method for the user to edit something, then it must be read only.
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
One option may be to test for the inverse, with functionality being considered a failure state. Let's break the requirement up, and look at its success and failure states: > > ##### Requirement: x is read-only for users. > > > `Success:` x is read-only. > > `Failure:` x is not read-only. > > > Of these, it t...
It’s tricky if your code is designed so that the compiler doesn’t even compile a statement that would modify x. Say const int x = 3; x = 5; You can’t compile and run a unit test that tests this. I have at times collected such statements, commented them out with instructions that each of these statements should fail to...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
Sometimes you can't actually test things. But you can verify them by inspection of the source code, build files, etc. If you can show that the software provides no method for the user to edit something, then it must be read only.
A lot of languages support [reflection](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/reflection). You can often use this to check for `readonly` or `final` modifiers.
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
A common approach for requirements of the form "this must never happen" is [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). The test case can be formulated like this: 1. Set up initial state. 2. Have a subroutine that verifies that the state of objects is as it should be. 3. Run a web application fuzzer for giv...
A lot of languages support [reflection](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/reflection). You can often use this to check for `readonly` or `final` modifiers.
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
A common approach for requirements of the form "this must never happen" is [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). The test case can be formulated like this: 1. Set up initial state. 2. Have a subroutine that verifies that the state of objects is as it should be. 3. Run a web application fuzzer for giv...
I am assuming the functionality does not exist and you therefore can't test it. That means for example data stored as a plain old object with no public member or setter. However you need to prove it does not exists. From my experience with medical software you need to produce a document, probably a design review where...
439,397
**Context**: we operate in a highly regulated industry (medical), and aim to have automated test cases to cover all of our requirements - allowing us to still release quickly, but safely. We have a requirement or acceptance criteria that reads something like: > > x object should be read-only for users > > > Edit...
2022/06/22
[ "https://softwareengineering.stackexchange.com/questions/439397", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416582/" ]
Sometimes you can't actually test things. But you can verify them by inspection of the source code, build files, etc. If you can show that the software provides no method for the user to edit something, then it must be read only.
One option may be to test for the inverse, with functionality being considered a failure state. Let's break the requirement up, and look at its success and failure states: > > ##### Requirement: x is read-only for users. > > > `Success:` x is read-only. > > `Failure:` x is not read-only. > > > Of these, it t...
29,189,619
I am using Bootstrap and am having trouble with the navbar. In my navbar, I have a few divs that I want to be the full height of the navbar, but the navbar constantly seems to be just a bit taller than the divs inside. I figured this was due to some padding on the navbar somewhere, but I can't find it. Check out this j...
2015/03/22
[ "https://Stackoverflow.com/questions/29189619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025963/" ]
I would not try and edit the bootstrap navbar css. In stead, why dont you just counter the padding by adding a negative margin bottom to your rhombus (and add an extra few pixels to the height) ``` .rhombus{ height:50px; /* + 5px */ width: 35px; -webkit-transform: skew(-20deg...
What about changing the height of `.rhombus` to `height:50px;`. It works for me. For HTML5, it's also necessary to add `margin-bottom:-5px` per Pevara.
29,189,619
I am using Bootstrap and am having trouble with the navbar. In my navbar, I have a few divs that I want to be the full height of the navbar, but the navbar constantly seems to be just a bit taller than the divs inside. I figured this was due to some padding on the navbar somewhere, but I can't find it. Check out this j...
2015/03/22
[ "https://Stackoverflow.com/questions/29189619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025963/" ]
I would not try and edit the bootstrap navbar css. In stead, why dont you just counter the padding by adding a negative margin bottom to your rhombus (and add an extra few pixels to the height) ``` .rhombus{ height:50px; /* + 5px */ width: 35px; -webkit-transform: skew(-20deg...
**Tested**: <https://jsfiddle.net/2fax4vme/3/> ``` .rhombus { height: 50px; } #navbar { line-height: 0; } ``` I found there are few elements set to 50px in Bootstrap, so probably also make yours to the same height is a good plan to avoid editing those default values.
25,449,008
I am working on an excel sheet.I need to find a value in column and then replace it from all above column value(comma seperated), where the string ocured last time. Here is an image of what i need(col 2). ``` col1 col2 12 12 34 34 45 45 65 65 FALSE 12,34,45,65 78 78 97 97 36 36 ...
2014/08/22
[ "https://Stackoverflow.com/questions/25449008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3968231/" ]
If you don't want to pass a parameter in the URL, you need to pass it in some other way. The only real way to do this is to use the session: set a session variable in the post view, and check it in the index one. ``` def process_post(request, ...): ... do whatever ... request.session['confirm'] = True retu...
I'm not really sure I understand the question. Are you essentially trying to do this? ``` (r'^your_app_view/(?P<app_value>.+)/$',views.your_view) ``` then in your\_view you can access app\_value do whatever you need and redirect to another view. Are you then asking how to get that argument to the second view that ...
11,285,181
``` #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> using namespace std; using namespace cv; /// Global Variables Mat img; Mat templ; Mat result; char* image_window = "Source Image"; char* result_window = "Result window"; int match_method; int max_...
2012/07/01
[ "https://Stackoverflow.com/questions/11285181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364914/" ]
I got the same error when I had given incorrect file names as image/templ. If you give incorrect file names, it wouldn't give an error, but the created Mat would be of size (0,0). Hence the assertion error. When I gave the correct image, the program was working well. My output (with correct image filenames) ![enter i...
The problem arises from result Mat size, when you use create method of Mat first parameter is **number of rows** and second one is **number of col**, so you should change `result.create( result_cols, result_rows, CV_32FC1 );` to `result.create( result_rows, result_cols, CV_32FC1 );`
11,285,181
``` #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> using namespace std; using namespace cv; /// Global Variables Mat img; Mat templ; Mat result; char* image_window = "Source Image"; char* result_window = "Result window"; int match_method; int max_...
2012/07/01
[ "https://Stackoverflow.com/questions/11285181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364914/" ]
The problem arises from result Mat size, when you use create method of Mat first parameter is **number of rows** and second one is **number of col**, so you should change `result.create( result_cols, result_rows, CV_32FC1 );` to `result.create( result_rows, result_cols, CV_32FC1 );`
I had the same problem - I could only get it to work after forceably changing both types, like so: ``` cvtColor(src,src,CV_8UC1); //channels need to match template cvtColor(template,template,CV_8UC1); //channels need to match template ```
11,285,181
``` #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> using namespace std; using namespace cv; /// Global Variables Mat img; Mat templ; Mat result; char* image_window = "Source Image"; char* result_window = "Result window"; int match_method; int max_...
2012/07/01
[ "https://Stackoverflow.com/questions/11285181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364914/" ]
I got the same error when I had given incorrect file names as image/templ. If you give incorrect file names, it wouldn't give an error, but the created Mat would be of size (0,0). Hence the assertion error. When I gave the correct image, the program was working well. My output (with correct image filenames) ![enter i...
I had the same problem - I could only get it to work after forceably changing both types, like so: ``` cvtColor(src,src,CV_8UC1); //channels need to match template cvtColor(template,template,CV_8UC1); //channels need to match template ```
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
For example: ``` abstract class Builder { public static function build() { return new static; } } class Member extends Builder { public function who_am_i() { echo 'Member'; } } Member::build()->who_am_i(); ```
Also, watch if you update static variables in child classes. I found this (somewhat) unexpected result where child B updates child C: ``` class A{ protected static $things; } class B extends A { public static function things(){ static::$things[1] = 'Thing B'; return static::$things; } } ...
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
You definitely need to read [Late Static Bindings](http://php.net/manual/en/language.oop5.late-static-bindings.php) in the PHP manual. However, I'll try to give you a quick summary. Basically, it boils down to the fact that the `self` keyword does not follow the same rules of inheritance. `self` always resolves to the...
Also, watch if you update static variables in child classes. I found this (somewhat) unexpected result where child B updates child C: ``` class A{ protected static $things; } class B extends A { public static function things(){ static::$things[1] = 'Thing B'; return static::$things; } } ...
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
From [PHP: Late Static Bindings - Manual](https://www.php.net/manual/en/language.oop5.late-static-bindings.php): > > As of PHP 5.3.0, PHP implements a feature called late static binding which can be used to reference the called class in the context of static inheritance. > > > > > Late static binding tries to so...
The simplest example to show the difference. Note, **self::$c** ``` class A { static $c = 7; public static function getVal() { return self::$c; } } class B extends A { static $c = 8; } B::getVal(); // 7 ``` Late static binding, note **static::$c** ``` class A { static $c = 7; ...
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
There is not very obvious behavior: The following code produces 'alphabeta'. ``` class alpha { function classname(){ return __CLASS__; } function selfname(){ return self::classname(); } function staticname(){ return static::classname(); } } class beta extends alpha ...
For example: ``` abstract class Builder { public static function build() { return new static; } } class Member extends Builder { public function who_am_i() { echo 'Member'; } } Member::build()->who_am_i(); ```
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
The simplest example to show the difference. Note, **self::$c** ``` class A { static $c = 7; public static function getVal() { return self::$c; } } class B extends A { static $c = 8; } B::getVal(); // 7 ``` Late static binding, note **static::$c** ``` class A { static $c = 7; ...
For example: ``` abstract class Builder { public static function build() { return new static; } } class Member extends Builder { public function who_am_i() { echo 'Member'; } } Member::build()->who_am_i(); ```
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
There is not very obvious behavior: The following code produces 'alphabeta'. ``` class alpha { function classname(){ return __CLASS__; } function selfname(){ return self::classname(); } function staticname(){ return static::classname(); } } class beta extends alpha ...
I'm quoting from the book: "PHP Master write cutting-edge code". > > Late static binding was a feature introduced with php 5.3. It allows > us to inherit static methods from a parent class, and to reference > the child class being called. > > > This means you can have an abstract class with static methods, and > re...
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
Looking at it from a "why would I use this?" perspective, it's basically a way to change the context from which the static method is being interpreted/run. With `self`, the context is the one where you defined the method originally. With `static`, it's the one you're calling it from.
Also, watch if you update static variables in child classes. I found this (somewhat) unexpected result where child B updates child C: ``` class A{ protected static $things; } class B extends A { public static function things(){ static::$things[1] = 'Thing B'; return static::$things; } } ...
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
The simplest example to show the difference. Note, **self::$c** ``` class A { static $c = 7; public static function getVal() { return self::$c; } } class B extends A { static $c = 8; } B::getVal(); // 7 ``` Late static binding, note **static::$c** ``` class A { static $c = 7; ...
Looking at it from a "why would I use this?" perspective, it's basically a way to change the context from which the static method is being interpreted/run. With `self`, the context is the one where you defined the method originally. With `static`, it's the one you're calling it from.
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
I'm quoting from the book: "PHP Master write cutting-edge code". > > Late static binding was a feature introduced with php 5.3. It allows > us to inherit static methods from a parent class, and to reference > the child class being called. > > > This means you can have an abstract class with static methods, and > re...
Looking at it from a "why would I use this?" perspective, it's basically a way to change the context from which the static method is being interpreted/run. With `self`, the context is the one where you defined the method originally. With `static`, it's the one you're calling it from.
1,912,902
What exactly are late static bindings in PHP?
2009/12/16
[ "https://Stackoverflow.com/questions/1912902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139459/" ]
There is not very obvious behavior: The following code produces 'alphabeta'. ``` class alpha { function classname(){ return __CLASS__; } function selfname(){ return self::classname(); } function staticname(){ return static::classname(); } } class beta extends alpha ...
The simplest example to show the difference. Note, **self::$c** ``` class A { static $c = 7; public static function getVal() { return self::$c; } } class B extends A { static $c = 8; } B::getVal(); // 7 ``` Late static binding, note **static::$c** ``` class A { static $c = 7; ...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
Here's what finally worked for me: In Android Studio (Mac OS X) open up AVD Manager. Click the triangle pointing downwards on the offending Android Virtual Device to get a drop-down menu. Then, *strike down upon* `Delete` *with great vengeance and furious anger*. With that out of the way, click `+ Create Virtual Devi...
Another option if the emulator just crashes before launching the main window on mac: as [varun](https://stackoverflow.com/a/44883876/2261980) mentioned, Docker running will be one culprit, and something else that uses vcpu’s, in my case - Virtualbox. Make sure to kill all vbox... processes.
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem...
After updating DisplayLink Manager to 1.1.0 with macOS Catalina (10.15.6) no emulator would start. The emulator didn't show up in a window it was just the icon on the menu bar. I checked all the previous solutions and nothing worked. **After I unplugged the docking station, the emulator started normal and I could plug...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem...
On my old Mac (mid 2010 2,8Ghz i5) I had same problem and I want to share my solution with community for future use: 1. Uninstall all AVD from list. 2. Download last version of HAXM <https://github.com/intel/haxm> [update 03.03.2019] 3. Install it manually (it will uninstall previous version automatically by request) ...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
You could also try launching the emulator from the command line. * cd $ANDROID\_SDK\_ROOT * tools/emulator -list-avds * tools/emulator @name\_of\_avd -verbose If you see any failures you can share the output of the last command. The ANDROID\_SDK\_ROOT environment value should point to the android SDK location. You c...
I had the same issue and was running El Capitan. I tried all of the above solutions listed but none of them worked and couldn't get the emulator to work. So then I looked up the error log and as expected it was due to incompatible libs. Here's a snapshot of the log: ``` Process: qemu-system-x86_64 [891]...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
Here's what finally worked for me: In Android Studio (Mac OS X) open up AVD Manager. Click the triangle pointing downwards on the offending Android Virtual Device to get a drop-down menu. Then, *strike down upon* `Delete` *with great vengeance and furious anger*. With that out of the way, click `+ Create Virtual Devi...
This worked for me; I am using OS EL-Capitan, I don't want to upgrade to High Sierra, I can't use android studio emulator after upgrade because of an error like this: > > Emulator: Sorry, "qemu-system-x86\_64" can not be run on this version > of macOS. Qt requires macOS 10.12.0 or later > > > Solved in 2 steps:...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
For me, changing the 'Graphics' from 'Automatic' to 'Software - GLES 2.0' in the Virtual Device Configuration , worked form me on my macOS Sierra
I've updated @Saneesh answer for Android studio 4+ 1. Delete all AVD's that you currently have. 2. Go to Preferences >> Appearance & Behavior >> System Settings >> Android SDK >> SDK Tools 3. Uninstall Android Emulator 4. Restart Android Studio. 5. Re-install Android Emulator from the same place. 6. Create a new emula...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem...
I got this problem when updated to MacOS Big Sur, what worked for me was to update Android Emulator in SDK Tools. Android Studio -> Preferences -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> Select Android Emulator -> OK
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
I got this problem when updated to MacOS Big Sur, what worked for me was to update Android Emulator in SDK Tools. Android Studio -> Preferences -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> Select Android Emulator -> OK
I've updated @Saneesh answer for Android studio 4+ 1. Delete all AVD's that you currently have. 2. Go to Preferences >> Appearance & Behavior >> System Settings >> Android SDK >> SDK Tools 3. Uninstall Android Emulator 4. Restart Android Studio. 5. Re-install Android Emulator from the same place. 6. Create a new emula...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
This one worked for me 1. Delete all AVD's that you currently have. 2. Go to Preferences >> Android SDK >> SDK Tools 3. Uninstall Android Emulator 4. Restart Android Studio. 5. Re-install Android Emulator from the same place. 6. Create a new emulator ! Hope this Helps.
I had the same issue and was running El Capitan. I tried all of the above solutions listed but none of them worked and couldn't get the emulator to work. So then I looked up the error log and as expected it was due to incompatible libs. Here's a snapshot of the log: ``` Process: qemu-system-x86_64 [891]...
42,848,328
I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features. The problems I am seeing are: * -Emulator doesn't run * -Android screen shows as if it's preparing to boot but doesn't * -When android ...
2017/03/17
[ "https://Stackoverflow.com/questions/42848328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7258865/" ]
This one worked for me 1. Delete all AVD's that you currently have. 2. Go to Preferences >> Android SDK >> SDK Tools 3. Uninstall Android Emulator 4. Restart Android Studio. 5. Re-install Android Emulator from the same place. 6. Create a new emulator ! Hope this Helps.
Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem...
178,024
It’s explained in the opening to the miniseries that the original robotic Cylons were created by humans on twelve colonies. Eventually, the Cylons rose against the humans leading to the first Cylon war. During the course of the war the robot Cylons began experimenting with the creation of biological Cylons but were u...
2018/01/03
[ "https://scifi.stackexchange.com/questions/178024", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/94593/" ]
In S03E02 (*Precipice*), Commander Adama is speaking to Lee and says: > > The Centurions can't distinguish [Sharon] from the other humanoid models. Did you know that? > > > They were deliberately programmed that way. The Cylons didn't want them becoming self-aware and suddenly resisting orders. They didn't want the...
If I were a Cavil, the way I would do it is through resurrection. Take control of the resurrection process, and ensure every new Centurion created has an inhibitor chip. Maybe make those chips inactive at first, or make the new Centurion appear normal despite the chip. Once you control any newly created Cylons, start s...
37,703,254
I've developed an application in .net MVC, it uses Google Maps and retrives user's latitude and longitude and provides plants info. The application on my local pc i.e. Visual Studio localhost works perfectly. I recently deployed the application to an online server where the map stopped showing up. [Here's the scree...
2016/06/08
[ "https://Stackoverflow.com/questions/37703254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6281489/" ]
Well i found a work around to the issue. Google requires you to have https if you're to use functions such as getCurrentPosition() etc. So to have google maps on your site, you can use this option <https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete> and get the user lat long ba...
Use https instead of http to load Google Maps API and also give a maps version as http request parameter. By default Google Maps SDK loaded is the development version. Prefer de stable version in your application.
59,893,950
I'm doing training of Mule4. In WT-5 of module 4 I have to add API from exchange. But I cannot find mule--> manage API option. Don't know what to do. Really appreciate the help. :)
2020/01/24
[ "https://Stackoverflow.com/questions/59893950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11089070/" ]
It is better to subscribe to the `paramMap` ``` ngOnInit() { this.route.paramMap.subscribe(params => { this.id= params.get('id'); }); } ```
Import Router in component. ``` import { Router } from '@angular/router'; ``` pass it in constructor ``` private router : Router ``` Now this will give router parameter ``` this.router.url; ```
59,893,950
I'm doing training of Mule4. In WT-5 of module 4 I have to add API from exchange. But I cannot find mule--> manage API option. Don't know what to do. Really appreciate the help. :)
2020/01/24
[ "https://Stackoverflow.com/questions/59893950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11089070/" ]
It is better to subscribe to the `paramMap` ``` ngOnInit() { this.route.paramMap.subscribe(params => { this.id= params.get('id'); }); } ```
``` this.route.params.forEach((params: Params) => { const id = +params['id']; // more stuff }); ```
59,893,950
I'm doing training of Mule4. In WT-5 of module 4 I have to add API from exchange. But I cannot find mule--> manage API option. Don't know what to do. Really appreciate the help. :)
2020/01/24
[ "https://Stackoverflow.com/questions/59893950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11089070/" ]
It is better to subscribe to the `paramMap` ``` ngOnInit() { this.route.paramMap.subscribe(params => { this.id= params.get('id'); }); } ```
First declare in your constructor from ActivatedRoute from '@angular/router'; ``` constructor ( private route: ActivatedRoute ){} ``` Then by using this code you will get your query params ``` this.route.queryParams.subscribe(params =>{ let Id = params ["Id"]; } ```
59,893,950
I'm doing training of Mule4. In WT-5 of module 4 I have to add API from exchange. But I cannot find mule--> manage API option. Don't know what to do. Really appreciate the help. :)
2020/01/24
[ "https://Stackoverflow.com/questions/59893950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11089070/" ]
It is better to subscribe to the `paramMap` ``` ngOnInit() { this.route.paramMap.subscribe(params => { this.id= params.get('id'); }); } ```
You need to unsubscribe from anything you subscribe to to prevent memory leaks. ``` paramsSubscription$: Subscription; id: string; constructor(private route: ActivatedRoute, private router: Router) {} ngOnInit() { this.paramsSubscription$ = this.route.paramMap.subscribe( (params: ParamMap) => { this.id ...
59,893,950
I'm doing training of Mule4. In WT-5 of module 4 I have to add API from exchange. But I cannot find mule--> manage API option. Don't know what to do. Really appreciate the help. :)
2020/01/24
[ "https://Stackoverflow.com/questions/59893950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11089070/" ]
``` this.route.params.forEach((params: Params) => { const id = +params['id']; // more stuff }); ```
Import Router in component. ``` import { Router } from '@angular/router'; ``` pass it in constructor ``` private router : Router ``` Now this will give router parameter ``` this.router.url; ```