qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
9,386,595 | We have a whole bunch of websites with very similar web.config files.
Can you centralise the duplicate configs in 1 config file before the root directory of each website? Or is the only option machine.config?
We are looking to centralise an assembly reference in the GAC.
Structure:
* Containing Directory
+ Website... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9386595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972457/"
] | The content inside your `try` block is the interesting stuff, so that should be in functions. Then just select which function you want, and call it, wrapped by your exceptions. You could even write the exception code as a function, and pass the selected function to this as an argument. e.g.
```
def foo():
num=rand... | If those are your actual functions it would be easy to generalize them.
You could create one general function
```
def general(bottom_num, top_num):
num=random.random()
try:
if num>top_num: print 'OK'
elif num>bottom_num: raise NameError('Too Small')
else: raise KeyboardInterrupt
except NameError:
... |
9,386,595 | We have a whole bunch of websites with very similar web.config files.
Can you centralise the duplicate configs in 1 config file before the root directory of each website? Or is the only option machine.config?
We are looking to centralise an assembly reference in the GAC.
Structure:
* Containing Directory
+ Website... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9386595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972457/"
] | The content inside your `try` block is the interesting stuff, so that should be in functions. Then just select which function you want, and call it, wrapped by your exceptions. You could even write the exception code as a function, and pass the selected function to this as an argument. e.g.
```
def foo():
num=rand... | I ran into the same scenario recently, in my case I have some custom exceptions based on which I need to log or raise the Exception further. I have created a decorator method to handle the exceptions as per type.
```
try:
obj.some_method()
except Exception as e:
catch_and_log_exception(e)
def catch_and_log_exc... |
9,386,595 | We have a whole bunch of websites with very similar web.config files.
Can you centralise the duplicate configs in 1 config file before the root directory of each website? Or is the only option machine.config?
We are looking to centralise an assembly reference in the GAC.
Structure:
* Containing Directory
+ Website... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9386595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972457/"
] | The answer above does not apply for Functions that take arguments - for the later case, I think you would want something like this:
```
def handleError(f):
def handleProblems(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
print "Oh noes"
return handl... | If those are your actual functions it would be easy to generalize them.
You could create one general function
```
def general(bottom_num, top_num):
num=random.random()
try:
if num>top_num: print 'OK'
elif num>bottom_num: raise NameError('Too Small')
else: raise KeyboardInterrupt
except NameError:
... |
9,386,595 | We have a whole bunch of websites with very similar web.config files.
Can you centralise the duplicate configs in 1 config file before the root directory of each website? Or is the only option machine.config?
We are looking to centralise an assembly reference in the GAC.
Structure:
* Containing Directory
+ Website... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9386595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972457/"
] | If those are your actual functions it would be easy to generalize them.
You could create one general function
```
def general(bottom_num, top_num):
num=random.random()
try:
if num>top_num: print 'OK'
elif num>bottom_num: raise NameError('Too Small')
else: raise KeyboardInterrupt
except NameError:
... | I ran into the same scenario recently, in my case I have some custom exceptions based on which I need to log or raise the Exception further. I have created a decorator method to handle the exceptions as per type.
```
try:
obj.some_method()
except Exception as e:
catch_and_log_exception(e)
def catch_and_log_exc... |
9,386,595 | We have a whole bunch of websites with very similar web.config files.
Can you centralise the duplicate configs in 1 config file before the root directory of each website? Or is the only option machine.config?
We are looking to centralise an assembly reference in the GAC.
Structure:
* Containing Directory
+ Website... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9386595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972457/"
] | The answer above does not apply for Functions that take arguments - for the later case, I think you would want something like this:
```
def handleError(f):
def handleProblems(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
print "Oh noes"
return handl... | I ran into the same scenario recently, in my case I have some custom exceptions based on which I need to log or raise the Exception further. I have created a decorator method to handle the exceptions as per type.
```
try:
obj.some_method()
except Exception as e:
catch_and_log_exception(e)
def catch_and_log_exc... |
72,471,843 | I've got an array that has a structure. Problem is that I can't output the array number and the structure data in the same loop, but if I have two different loops, the data will show without any errors.
The code below has two different loops showing how I can access the array number and structure data separately.
How... | 2022/06/02 | [
"https://Stackoverflow.com/questions/72471843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328798/"
] | Simplifying your code a bit, and adding local scope (assuming you're in a function), here's another way to do this, too:
```
<cfset local.arrayRe = [
{"id": "14", "title": "Title Fourteen"}
, {"id": "15", "title": "Title Fifteen"}
] />
<cfloop array="#local.arrayRe#" index="local.i" item="local.stItem">
<... | Just figured it out.
```
<cfloop array ="#arryRe#" item="item" index="i">
<cfoutput>
#i# #item.id# #item.title#<br />
</cfoutput>
</cfloop>
``` |
41,218,125 | I am training PTB dataset for predicting characters (i.e. character-level LSTM).
The dimension for training batches is [len(dataset) x vocabulary\_size]. Here, vocabulary\_size = 27 (26+1[for unk tokens and spaces or fullstops.]).
This is the code for converting to one\_hot for both batches input(arrX) and label... | 2016/12/19 | [
"https://Stackoverflow.com/questions/41218125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6211276/"
] | The issue was related to the fact that my browser had cached my old CSS file, therefore wouldn't show any updates. It was hard for me to solve the issue because I didn't really understand the problem.
The solution was quiet simple:
>
> Ctrl + Shift + Del
>
>
>
In Chrome, you can use the above command to delete t... | Are you sure you got the CSS selector right? Go to inspect element, select your element and click copy selector. That will give you an insight about the Css selector of your input elements. |
41,218,125 | I am training PTB dataset for predicting characters (i.e. character-level LSTM).
The dimension for training batches is [len(dataset) x vocabulary\_size]. Here, vocabulary\_size = 27 (26+1[for unk tokens and spaces or fullstops.]).
This is the code for converting to one\_hot for both batches input(arrX) and label... | 2016/12/19 | [
"https://Stackoverflow.com/questions/41218125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6211276/"
] | The issue was related to the fact that my browser had cached my old CSS file, therefore wouldn't show any updates. It was hard for me to solve the issue because I didn't really understand the problem.
The solution was quiet simple:
>
> Ctrl + Shift + Del
>
>
>
In Chrome, you can use the above command to delete t... | You need to use quotes in css selector: e.g. input[type="text"] |
41,218,125 | I am training PTB dataset for predicting characters (i.e. character-level LSTM).
The dimension for training batches is [len(dataset) x vocabulary\_size]. Here, vocabulary\_size = 27 (26+1[for unk tokens and spaces or fullstops.]).
This is the code for converting to one\_hot for both batches input(arrX) and label... | 2016/12/19 | [
"https://Stackoverflow.com/questions/41218125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6211276/"
] | The issue was related to the fact that my browser had cached my old CSS file, therefore wouldn't show any updates. It was hard for me to solve the issue because I didn't really understand the problem.
The solution was quiet simple:
>
> Ctrl + Shift + Del
>
>
>
In Chrome, you can use the above command to delete t... | Django will not serve static content (i.e. CSS changes) when Debug is False.
Ensure Debug=True in your settings.py file |
1,469,408 | Does anyone have any experience with the following fluent config error?
>
> faultString = "An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
>
>
>
I have no problems on my development box, but when the dlls are p... | 2009/09/24 | [
"https://Stackoverflow.com/questions/1469408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/135687/"
] | I think this is close to this question about trust:
[NHibernate 2 + Fluent Nhibernate medium trust](https://stackoverflow.com/questions/710903/nhibernate-2-fluent-nhibernate-medium-trust)
The issue isn't about fluent NHibernate, but Castle Dynamic Proxy 2. I personally have full trust on the environments I deploy to ... | See the answer to this question:
[assembly does not allow partially trusted callers](https://stackoverflow.com/questions/1469820/assembly-does-not-allow-partially-trusted-callers)
Your development machine is likely running full trust, while your production machine is likely running medium trust. |
607,947 | I have `iptables` setup on 2 `servers`.
`Server#1` is public and `Server#2` only allows the `ip address` of `Server#1` to have `ACCESS`.
`Server#2` has a `mySQL` database that `Server#1` queries.
I ran a query and it took a long time to complete.
I found that after I ran `service iptables restart` on `Server#2` th... | 2014/06/25 | [
"https://serverfault.com/questions/607947",
"https://serverfault.com",
"https://serverfault.com/users/227958/"
] | This sounds as if the two events are unconnected to me.
You've probably run the query, then it got stored in the query cache, so when you re-run the query the results are fetched from cache rather than scanning the tables to retrieve the data. | it might be helpful if you actually listed the iptables.. I agree it's probably not related but if you have some kind of qos/traffic limiting it may be interesting to see. you can also try running an strace -f on the mysql process while you query both times to see what's going on. |
182,430 | Is it possible for someone to hack into my django admin app, if I do not create a user for it, by executing:
```
python manage.py createsuperuser
```
For example, is there a default username-password pair that someone could use to gain access to django admin? | 2018/03/27 | [
"https://security.stackexchange.com/questions/182430",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/72027/"
] | Is it possible to login with default credentials
================================================
There is no default user, and [the docs](https://docs.djangoproject.com/en/2.0/ref/django-admin/#cmdoption-createsuperuser-username) state:
>
> The username and email address for the new account can be supplied by using... | I think your question boils down to this, right?
>
> is there a default username-password pair
>
>
>
If so, the answer is "no." Here's the [documentation](https://docs.djangoproject.com/en/2.0/ref/django-admin/#createsuperuser) for `createsuperuser`
Of course, you need to also be vigilant about the general secu... |
41,994,185 | 1. Node is Updated to latest stable version v7.4.0
This is the error message I get when trying to install browser-sync:
```
sudo npm install -g browser-sync
```
>
> 'npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/local/bin/node"
> "/usr/local/bin/npm" "install" "-g" "browser-sync" npm ERR! node
> v7.4.0 np... | 2017/02/02 | [
"https://Stackoverflow.com/questions/41994185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7503924/"
] | This problem occurs when you are installing a old module(as written in your package.json) but it is not available on git due to update in their version.
for solving this issue.
```
1.Need to install the project’s local dependencies (that’s where it’s looking for browser-sync). To do that,
2.cd into the projec... | You're going to need to upgrade `npm` also (currently `npm@next` – `npm -g install npm@next` if you have it installed globally. |
41,994,185 | 1. Node is Updated to latest stable version v7.4.0
This is the error message I get when trying to install browser-sync:
```
sudo npm install -g browser-sync
```
>
> 'npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/local/bin/node"
> "/usr/local/bin/npm" "install" "-g" "browser-sync" npm ERR! node
> v7.4.0 np... | 2017/02/02 | [
"https://Stackoverflow.com/questions/41994185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7503924/"
] | I have Solved the issue:
NPM Module was not supported by node v7:
So I downgraded to node v6.4.0 and it allowed me install browser-sync with no problems!
```
sudo npm cache clean -f
sudo npm install -g n
sudo n 6.9.5
``` | You're going to need to upgrade `npm` also (currently `npm@next` – `npm -g install npm@next` if you have it installed globally. |
14,325,266 | I have a quick question regarding SSIS. I am developing a package that performs a Data Flow task from an Excel Source into OLE DB Connection. The columns in the database should allow nulls. However there is a problem in that when I enter bad data into the numeric columns in the excel spreadsheet, it will not cause the ... | 2013/01/14 | [
"https://Stackoverflow.com/questions/14325266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1146501/"
] | This meets the stated requirement (last full week of previous two months):
```
SET DATEFIRST 1;
DECLARE @s DATE = GETDATE(), @s1 DATE, @s2 DATE;
SET @s = GETDATE();
-- last day of last month:
SET @s1 = DATEADD(DAY, -DAY(@s), @s);
-- last day of previous month:
SET @s = DATEADD(MONTH, -1, @s);
SET @s2 = DATEADD(DAY,... | This is somewhat dependent on your sql server. This example is similar to Oracle. Each server has its own functions, like SYSDATE and NOW.
For example.
```
SELECT * from blah WHERE TO_CHAR(TRUNC(data), MM/DD/YYYY) < '01/14/2013'
``` |
14,325,266 | I have a quick question regarding SSIS. I am developing a package that performs a Data Flow task from an Excel Source into OLE DB Connection. The columns in the database should allow nulls. However there is a problem in that when I enter bad data into the numeric columns in the excel spreadsheet, it will not cause the ... | 2013/01/14 | [
"https://Stackoverflow.com/questions/14325266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1146501/"
] | ```
declare @blah table (ID int, [Date] datetime)
INSERT INTO @blah (ID, [Date])
select 123, '20121112'
union select 124, '20121130'
union select 125, '20121128'
union select 126, '20121201'
union select 127, '20121230'
union select 128, '20121225'
union select 129, '20121226'
select ID, [Date], datepart(week, [Date])... | This is somewhat dependent on your sql server. This example is similar to Oracle. Each server has its own functions, like SYSDATE and NOW.
For example.
```
SELECT * from blah WHERE TO_CHAR(TRUNC(data), MM/DD/YYYY) < '01/14/2013'
``` |
14,325,266 | I have a quick question regarding SSIS. I am developing a package that performs a Data Flow task from an Excel Source into OLE DB Connection. The columns in the database should allow nulls. However there is a problem in that when I enter bad data into the numeric columns in the excel spreadsheet, it will not cause the ... | 2013/01/14 | [
"https://Stackoverflow.com/questions/14325266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1146501/"
] | This works in Oracle - may give you some ideas and hopefully helps:
```
-- Last weeks of last two months --
SELECT mydate
, TRUNC(mydate, 'iw') wk_starts
, TRUNC(mydate, 'iw') + 7 - 1/86400 wk_ends
, TO_NUMBER (TO_CHAR (mydate, 'IW')) ISO_wk#
FROM
( -- Last week = Last day of the year (hardcoded) - 1 week ... | This is somewhat dependent on your sql server. This example is similar to Oracle. Each server has its own functions, like SYSDATE and NOW.
For example.
```
SELECT * from blah WHERE TO_CHAR(TRUNC(data), MM/DD/YYYY) < '01/14/2013'
``` |
14,325,266 | I have a quick question regarding SSIS. I am developing a package that performs a Data Flow task from an Excel Source into OLE DB Connection. The columns in the database should allow nulls. However there is a problem in that when I enter bad data into the numeric columns in the excel spreadsheet, it will not cause the ... | 2013/01/14 | [
"https://Stackoverflow.com/questions/14325266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1146501/"
] | This meets the stated requirement (last full week of previous two months):
```
SET DATEFIRST 1;
DECLARE @s DATE = GETDATE(), @s1 DATE, @s2 DATE;
SET @s = GETDATE();
-- last day of last month:
SET @s1 = DATEADD(DAY, -DAY(@s), @s);
-- last day of previous month:
SET @s = DATEADD(MONTH, -1, @s);
SET @s2 = DATEADD(DAY,... | ```
declare @blah table (ID int, [Date] datetime)
INSERT INTO @blah (ID, [Date])
select 123, '20121112'
union select 124, '20121130'
union select 125, '20121128'
union select 126, '20121201'
union select 127, '20121230'
union select 128, '20121225'
union select 129, '20121226'
select ID, [Date], datepart(week, [Date])... |
14,325,266 | I have a quick question regarding SSIS. I am developing a package that performs a Data Flow task from an Excel Source into OLE DB Connection. The columns in the database should allow nulls. However there is a problem in that when I enter bad data into the numeric columns in the excel spreadsheet, it will not cause the ... | 2013/01/14 | [
"https://Stackoverflow.com/questions/14325266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1146501/"
] | This meets the stated requirement (last full week of previous two months):
```
SET DATEFIRST 1;
DECLARE @s DATE = GETDATE(), @s1 DATE, @s2 DATE;
SET @s = GETDATE();
-- last day of last month:
SET @s1 = DATEADD(DAY, -DAY(@s), @s);
-- last day of previous month:
SET @s = DATEADD(MONTH, -1, @s);
SET @s2 = DATEADD(DAY,... | This works in Oracle - may give you some ideas and hopefully helps:
```
-- Last weeks of last two months --
SELECT mydate
, TRUNC(mydate, 'iw') wk_starts
, TRUNC(mydate, 'iw') + 7 - 1/86400 wk_ends
, TO_NUMBER (TO_CHAR (mydate, 'IW')) ISO_wk#
FROM
( -- Last week = Last day of the year (hardcoded) - 1 week ... |
9,488,970 | I have recently inherited an application, written using ZF, which has various fields encrypted in the db. There are many models extending Zend\_Db\_Table\_Abstract with code similar to this example -
```php
<?php
class Partner extends Zend_Db_Table_Abstract {
protected $_name = 'partner', $_primary = 'id';
p... | 2012/02/28 | [
"https://Stackoverflow.com/questions/9488970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1191247/"
] | How about
```
public function createPartner( $mobile ){
$id = $this->insert( array(
'mobile' => new Zend_Db_Expr($this->getAdapter()->quoteInto("AES_ENCRYPT(?, 'random_key')", $mobile)),
'createdOn' => date('Y-m-d H:i:s', mktime())
) );
$res = $this->fi... | use prepared statement in this case :
```
$mobile = new Zend_Db_Expr("AES_ENCRYPT('$mobile', 'random_key')");
$date = date('Y-m-d H:i:s', mktime());
$stmt = $this->getAdapter()->prepare('INSERT INTO'.$this->_name.'(mobile, createdOn) VALUES (?, ?)');
$stmt->execute(array($mobile, $date));
``` |
34,703,091 | In Hadoop, if we have not set number of reducers, then how many number of reducers will be created?
Like number of mappers is dependent on **(total data size)/(input split size)**,
E.g. if data size is 1 TB and input split size is 100 MB. Then number of mappers will be (1000\*1000)/100 = 10000(Ten thousand).
The n... | 2016/01/10 | [
"https://Stackoverflow.com/questions/34703091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1163723/"
] | ***How Many Reduces?*** ( From [official documentation)](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
**The right number of reduces seems to be 0.95 or 1.75 multiplied by
(no. of nodes) \* (no. of maximum containers per node**).
>
> With 0.95 all... | By default the no of reducers is set to 1.
You can change it by adding a parameter
`mapred.reduce.tasks` in the command line or in the Driver code or in the conf file that you pass.
e.g: Command Line Argument: `bin/hadoop jar ... -Dmapred.reduce.tasks=<num reduce tasks>`
or, in Driver code as: `conf.setNumReduceTas... |
47,287 | I am doing a self-study using Artin's algebra. There is a problem which asks us to prove that adjoining an element to a ring doesn't do anything if that element was already in the ring.
More formally, say that $\alpha=a$ where $a\in R$. We want to show that $R\approx R[\alpha]$. (Where $\approx$ means "isomorphic to".... | 2011/06/23 | [
"https://math.stackexchange.com/questions/47287",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/2549/"
] | Your proof doesn't show that adjoining any element keeps the ring the same, because if $\alpha$ isn't in $R$, then $x-\alpha$ is not in $R[x]$, so the quotient $R[x]/(x-\alpha)$ doesn't make sense. | How have you defined $R[\alpha]$? I usually define it as the smallest ring containing $R$ and $\alpha$, in which case, if $\alpha$ is in $R$, it's clear that $R[\alpha]=R$ (and if $\alpha$ is not in $R$, it's clear that $R[\alpha]\ne R$). |
47,287 | I am doing a self-study using Artin's algebra. There is a problem which asks us to prove that adjoining an element to a ring doesn't do anything if that element was already in the ring.
More formally, say that $\alpha=a$ where $a\in R$. We want to show that $R\approx R[\alpha]$. (Where $\approx$ means "isomorphic to".... | 2011/06/23 | [
"https://math.stackexchange.com/questions/47287",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/2549/"
] | **HINT** $\ $ If $\rm\:\alpha \not\in R\:$ then $\rm\:x\mapsto \alpha$ is an evaluation homomorphism from $\rm\:R[x]\:$ to $\rm\:R[\alpha]\:,\:$ not to $\rm\:R\:.\:$ | How have you defined $R[\alpha]$? I usually define it as the smallest ring containing $R$ and $\alpha$, in which case, if $\alpha$ is in $R$, it's clear that $R[\alpha]=R$ (and if $\alpha$ is not in $R$, it's clear that $R[\alpha]\ne R$). |
1,206,141 | Is it possible to use an msbuild task to build a smart device project into a cab file for deployment.
I've seen a couple of pages on the web:
<http://guystarbuck.blogspot.com/#115584006223003606>
<http://blog.opennetcf.com/ctacke/2008/09/18/AutomatingCABFileGenerationWithMSBUILD.aspx>
but I can't believe that you ha... | 2009/07/30 | [
"https://Stackoverflow.com/questions/1206141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/99860/"
] | It is that difficult and, yes, that is lame. | You can use [CAB42](https://bitbucket.org/adambrengesjo/cab42/) in order to automate the build process of device CAB-files. This tool is great when using at build servers and automated processes where it is necessary with multiple CAB-file configurations for example. The tool gives you options to define your own config... |
68,032,665 | so my fileupload is as following:
```
ApiController]
[Route("[controller]")]
public class FilController : Controller
{
private IWebHostEnvironment iwebHostEnvironment;
public void DemoController(IWebHostEnvironment _iwebHostEnvironment)
{
iwebHostEnvironment = _iwebHost... | 2021/06/18 | [
"https://Stackoverflow.com/questions/68032665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Since Bootstrap 5 added a **new XXL breakpoint** at `1400px`, the widest container breakpoint increased from `1140px` (Bootstrap 4) to `1320px` (Bootstrap 5).
Therefore, if you want the same container width behavior as Bootstrap 4, override the `.container` max-width CSS for the XXL breakpoint...
```
@media (min-widt... | Bootstrap 5 includes six default breakpoints.
[](https://i.stack.imgur.com/M9T8b.png)
These breakpoints are customizable via Sass. You’ll find them in bootstrap's **\_variables.scss** stylesheet.
```
$container-max-widths: (
sm: 540px,
md: 720px... |
17,271 | Baseband version: **I9020XXKF1**
Current software build number is **GRK39F** on Android 2.3.6
I seem to have a pretty much unrecognised baseband version of the Nexus S. I brought mine carrier-free in the UK.
There are a bunch of updates listed in this thread on XDA: <http://forum.xda-developers.com/showthread.php?t... | 2011/12/21 | [
"https://android.stackexchange.com/questions/17271",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/3868/"
] | My baseband is ever so slightly different from yours: it is I9020XXKI1 (I think; it's hard to read). I upgraded by following the steps at <http://www.androidcentral.com/how-manually-update-your-gsm-nexus-s-ice-cream-sandwich>; I am pretty sure that you can't go wrong doing the same. At worst, your phone will refuse to ... | The correct build was [here](http://android.clients.google.com/packages/ota/google_crespo/VQ8PQk_V.zip). It's listed in incremental updates 2.3.6 - 4.0.3. |
48,844,619 | I am trying to make a very simple java script quiz to try and learn the language.
```
var result = document.getElementById("result");
var rightAnswer = document.getElementById("correct").addEventListener("click",correctAnswer);
function correctAnswer(){
result.innerText="Correct";
};
var wrongAnswer = document.get... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48844619",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8353991/"
] | The timeout operator is used to throw an error after a certain time has passed, thus killing the Observable. This is not the desired outcome for your case, if I understood your question correctly.
If indeed all you want is to notify the user twice - after 5, and 10 seconds, I would use an interval Observable, with an ... | ```
import { of,interval } from 'rxjs';
import { groupBy, mergeMap, toArray, map,merge, reduce, concatMap, delay, concat, timeout, catchError, take } from 'rxjs/operators';
const obs$ = of('coucou');
const obs2$ = interval(5000).pipe(take(1), map(() => of('hello')));
const obs3$ = interval(5000).pipe(take(1), map(() =... |
138,641 | $$ \large{ \text{Here are some instructions from the original question: } \ \\ } $$
$$ \large{ k \in \mathbb{Z} \ \ \land \\ f(x)=x^{2}-3x+k \ \ \land \ \ g(x)=x-2 \ \\ \text{And, there is NO any intersection point between $f(x)$ and $g(x)$. } \ \\ k\_{(min) \, }= \;? } \ \\ $$
$$ \large{ \text{Here is just an exampl... | 2012/04/29 | [
"https://math.stackexchange.com/questions/138641",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/24217/"
] | You want the quadratic, $\Delta$, to have no solution. That means you want its discriminant, which is $4^2-4(k+2)$, to be negative. In particular, you want the smallest integer $k$ that makes it negative. Can you take it from there? | Hint: You want $\Delta \gt 0$ as it measures the distance $f$ is above $g$ at any given $x$. If $k$ is large enough, $\Delta$ will be a perfect square plus something and squares cannot be negative. |
138,641 | $$ \large{ \text{Here are some instructions from the original question: } \ \\ } $$
$$ \large{ k \in \mathbb{Z} \ \ \land \\ f(x)=x^{2}-3x+k \ \ \land \ \ g(x)=x-2 \ \\ \text{And, there is NO any intersection point between $f(x)$ and $g(x)$. } \ \\ k\_{(min) \, }= \;? } \ \\ $$
$$ \large{ \text{Here is just an exampl... | 2012/04/29 | [
"https://math.stackexchange.com/questions/138641",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/24217/"
] | You want the quadratic, $\Delta$, to have no solution. That means you want its discriminant, which is $4^2-4(k+2)$, to be negative. In particular, you want the smallest integer $k$ that makes it negative. Can you take it from there? | Since it seems like a Homework question i'd rather give a hint. You got the distance between the graphs of f and g as: $$d(f,x)=f(x)-g(x)=x^2-3x+k-(x-2)=x^2-4x+2+k$$This must always be POSITIVE and not negative since $G\_f$ is above $G\_g$ for all $x\in R$.Therefore the equation shouldn't have any real roots, in other ... |
12,198 | I just got a 2000 BMW R1100RT and the previous owner told me the battery is 7 years old so I figure it's time to go.
I saw this video <https://www.youtube.com/watch?v=XEBjekqUV9c> and the guy points out that the battery sits right next to the engine and gel batteries deal with the heat better, and the current battery i... | 2014/09/07 | [
"https://mechanics.stackexchange.com/questions/12198",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/1149/"
] | A typical lead acid battery require occasional maintenance. As the battery is recharged the acid outgasses. It essentially evaporates. This gas is corrosive and an explosion hazard if it concentrated in an enclosed container. Many motorcycles utilize a covered battery box. They may also use a drain hose to remove any a... | I got this from Craig Hansen of <http://www.hansensmc.com/>
Stu,
You can put in a acid battery, but most times the ABS system will fault on
cold mornings. The BMW Gel battery doesn't normally doesn't have this
issue. |
12,198 | I just got a 2000 BMW R1100RT and the previous owner told me the battery is 7 years old so I figure it's time to go.
I saw this video <https://www.youtube.com/watch?v=XEBjekqUV9c> and the guy points out that the battery sits right next to the engine and gel batteries deal with the heat better, and the current battery i... | 2014/09/07 | [
"https://mechanics.stackexchange.com/questions/12198",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/1149/"
] | A typical lead acid battery require occasional maintenance. As the battery is recharged the acid outgasses. It essentially evaporates. This gas is corrosive and an explosion hazard if it concentrated in an enclosed container. Many motorcycles utilize a covered battery box. They may also use a drain hose to remove any a... | To have this discussion, it is important to understand a few different lead acid battery types:
A **wet flooded cell** battery is a lead acid battery that, among other traits, makes use of case vents. This is one of the oldest battery technologies and is relatively high maintenance because the water in the battery wil... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | Your workplace is disorganized
------------------------------
It sounds like your workplace is disorganized. If your co-worker can jump on items saying "I've already done that" then you probably don't have an issue tracking system in place.
Also, the idea behind DevOps is that developers and operations are not separa... | **Fundamentally, you are being taken advantage of.** Your coworker has no interest in playing fair with you. He wants to do all of the fun/interesting jobs. Your manager has no interest in changing the status quo. Right now, he has two DevOps people who are specializing in ways that he personally finds quite useful. Yo... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | **Fundamentally, you are being taken advantage of.** Your coworker has no interest in playing fair with you. He wants to do all of the fun/interesting jobs. Your manager has no interest in changing the status quo. Right now, he has two DevOps people who are specializing in ways that he personally finds quite useful. Yo... | I suggest when such a task becomes visible to work on, you tell the co-worker that you've got this one. Ideally in a way (group slack channel? group email?) where both boss and co-worker can see you've claimed it, so he won't decide to do it anyway.
Also, keep in mind that studies have shown that working fewer hours (... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | >
> I feel very bad that I'm not getting the same opportunity
>
>
>
You *are* being given the same opportunities, it's just that you are choosing to prioritize other, "boring", work. At the end of the day your manager doesn't care who does the tasks, only that they get done and done well. If you want to do some of... | There's several sides to this issues that I've seen and even have done myself. I'll talk about a few of them, but there's more than I can cover as well as variations and combination of things that are far too many for even think about.
Insecurity
==========
The other dev could be insecure about their abilities, so th... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | >
> Whenever there is a nice/important task, he does it without consulting the team if there is another one who would like to work on it.
>
>
>
Frankly, this is just a poor team work culture. Someone could argue that you could rush to grab the cool tasks for yourself too, but why prolong that culture? The team sho... | There's several sides to this issues that I've seen and even have done myself. I'll talk about a few of them, but there's more than I can cover as well as variations and combination of things that are far too many for even think about.
Insecurity
==========
The other dev could be insecure about their abilities, so th... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | **Fundamentally, you are being taken advantage of.** Your coworker has no interest in playing fair with you. He wants to do all of the fun/interesting jobs. Your manager has no interest in changing the status quo. Right now, he has two DevOps people who are specializing in ways that he personally finds quite useful. Yo... | You could raise the issue that the "bus number" of particular areas of knowledge (the development side) is one.
Bus number: *how many people need to be run over by a bus for a critical peace of knowledge to disappear*
When the bus number is 1, only one person knows it. This is poor organisation for any team, and a **... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | Your workplace is disorganized
------------------------------
It sounds like your workplace is disorganized. If your co-worker can jump on items saying "I've already done that" then you probably don't have an issue tracking system in place.
Also, the idea behind DevOps is that developers and operations are not separa... | You could raise the issue that the "bus number" of particular areas of knowledge (the development side) is one.
Bus number: *how many people need to be run over by a bus for a critical peace of knowledge to disappear*
When the bus number is 1, only one person knows it. This is poor organisation for any team, and a **... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | >
> I feel very bad that I'm not getting the same opportunity
>
>
>
You *are* being given the same opportunities, it's just that you are choosing to prioritize other, "boring", work. At the end of the day your manager doesn't care who does the tasks, only that they get done and done well. If you want to do some of... | I suggest when such a task becomes visible to work on, you tell the co-worker that you've got this one. Ideally in a way (group slack channel? group email?) where both boss and co-worker can see you've claimed it, so he won't decide to do it anyway.
Also, keep in mind that studies have shown that working fewer hours (... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | There's several sides to this issues that I've seen and even have done myself. I'll talk about a few of them, but there's more than I can cover as well as variations and combination of things that are far too many for even think about.
Insecurity
==========
The other dev could be insecure about their abilities, so th... | I suggest when such a task becomes visible to work on, you tell the co-worker that you've got this one. Ideally in a way (group slack channel? group email?) where both boss and co-worker can see you've claimed it, so he won't decide to do it anyway.
Also, keep in mind that studies have shown that working fewer hours (... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | >
> I feel very bad that I'm not getting the same opportunity
>
>
>
You *are* being given the same opportunities, it's just that you are choosing to prioritize other, "boring", work. At the end of the day your manager doesn't care who does the tasks, only that they get done and done well. If you want to do some of... | You could raise the issue that the "bus number" of particular areas of knowledge (the development side) is one.
Bus number: *how many people need to be run over by a bus for a critical peace of knowledge to disappear*
When the bus number is 1, only one person knows it. This is poor organisation for any team, and a **... |
151,585 | I'm a DevOps. In my team, we do many "boring" tasks such as replying to client emails that are related to technical issues, and maintaining the system, cleaning DB. But we also do some development.
I have a problem with one of my colleagues. He always works on the nice development tasks, leaving the support for me. He... | 2020/01/20 | [
"https://workplace.stackexchange.com/questions/151585",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/113757/"
] | Your workplace is disorganized
------------------------------
It sounds like your workplace is disorganized. If your co-worker can jump on items saying "I've already done that" then you probably don't have an issue tracking system in place.
Also, the idea behind DevOps is that developers and operations are not separa... | I suggest when such a task becomes visible to work on, you tell the co-worker that you've got this one. Ideally in a way (group slack channel? group email?) where both boss and co-worker can see you've claimed it, so he won't decide to do it anyway.
Also, keep in mind that studies have shown that working fewer hours (... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | Whatever is the best solution depends IMHO on more than just the table, but also how this is used elsewhere in the application.
Assuming that the comments are all associated with some other object, lets say you extract all the comments from that object. In your proposed design, extracting all the comments require sele... | If the comments are general for several objects you could create a table for each object:
```
user_comments (user_id, comment_id)
profile_comments (profile_id, comment_id)
```
Then you do not have to have any empty columns in your comments table. It will also make it easy to add new comment-source-objects in the fut... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | If the comments are general for several objects you could create a table for each object:
```
user_comments (user_id, comment_id)
profile_comments (profile_id, comment_id)
```
Then you do not have to have any empty columns in your comments table. It will also make it easy to add new comment-source-objects in the fut... | Here's another approach, which allows you to maintain referential integrity through foreign keys, manage centrally, and provide the highest performance using standard database tools such as indexes and if you really need, partitioning etc:
```
create table actor_master_table(
type char(1) not null, /* e.g. 'u' or 'p... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | Whatever is the best solution depends IMHO on more than just the table, but also how this is used elsewhere in the application.
Assuming that the comments are all associated with some other object, lets say you extract all the comments from that object. In your proposed design, extracting all the comments require sele... | Another way to solve is to always denormalize (copy) the name of the commenter on the comment and also store a reference back to the commenter via a type and an id field. That way you have a unified comments table where on you can search, sort and trim quickly. The drawback is that there isn't any real FK relationship ... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | Another way to solve is to always denormalize (copy) the name of the commenter on the comment and also store a reference back to the commenter via a type and an id field. That way you have a unified comments table where on you can search, sort and trim quickly. The drawback is that there isn't any real FK relationship ... | Here's another approach, which allows you to maintain referential integrity through foreign keys, manage centrally, and provide the highest performance using standard database tools such as indexes and if you really need, partitioning etc:
```
create table actor_master_table(
type char(1) not null, /* e.g. 'u' or 'p... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | Whatever is the best solution depends IMHO on more than just the table, but also how this is used elsewhere in the application.
Assuming that the comments are all associated with some other object, lets say you extract all the comments from that object. In your proposed design, extracting all the comments require sele... | In the past I have used a centralized comments table and had a field for the fk\_table it is referencing.
eg:
```
comments(id,fk_id,fk_table,comment_text)
```
That way you can use UNION queries to concatenate the data from several sources.
```
SELECT c.comment_text FROM comment c JOIN user u ON u.id=c.fk_id WHERE... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | In the past I have used a centralized comments table and had a field for the fk\_table it is referencing.
eg:
```
comments(id,fk_id,fk_table,comment_text)
```
That way you can use UNION queries to concatenate the data from several sources.
```
SELECT c.comment_text FROM comment c JOIN user u ON u.id=c.fk_id WHERE... | Here's another approach, which allows you to maintain referential integrity through foreign keys, manage centrally, and provide the highest performance using standard database tools such as indexes and if you really need, partitioning etc:
```
create table actor_master_table(
type char(1) not null, /* e.g. 'u' or 'p... |
2,918,811 | I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app.
My original thinking was that the table would have both user\_id and profile\_id fields, so if a user submits a comment, it gives the user\_id leaves the profile\_id blank
... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2918811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/270797/"
] | Whatever is the best solution depends IMHO on more than just the table, but also how this is used elsewhere in the application.
Assuming that the comments are all associated with some other object, lets say you extract all the comments from that object. In your proposed design, extracting all the comments require sele... | Here's another approach, which allows you to maintain referential integrity through foreign keys, manage centrally, and provide the highest performance using standard database tools such as indexes and if you really need, partitioning etc:
```
create table actor_master_table(
type char(1) not null, /* e.g. 'u' or 'p... |
29,239,533 | The input is
```
name number number
```
like the example
```
bank 1 10
```
I need to read input into a matrix n lines by 3 columns like the next example
```
{ bank, 1, 10,
bank2, 2, 15,
bank3, 3, 20 }
```
My main difficulty is reading the name and storing into the matrix. The name can vary from 1 to... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29239533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3653480/"
] | You are trying to read a string one character at a time, but using the edit descriptor for reading a whole string. You're trying to make it harder than it needs to be.
Also, the term "matrix" is normally understood to mean a 2-dimensional array of elements all the same type, whereas it sounds like you want a 1-dimensi... | In this example I have interpreted your "matrix" requirement, such that each line of the input fills in a `struct` having different field types, so we end up with a 1-D array of the `struct` instead of a 2-D array of differing data types.
And instead of entering the data from the keyboard, which is so boring every tim... |
29,239,533 | The input is
```
name number number
```
like the example
```
bank 1 10
```
I need to read input into a matrix n lines by 3 columns like the next example
```
{ bank, 1, 10,
bank2, 2, 15,
bank3, 3, 20 }
```
My main difficulty is reading the name and storing into the matrix. The name can vary from 1 to... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29239533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3653480/"
] | You are trying to read a string one character at a time, but using the edit descriptor for reading a whole string. You're trying to make it harder than it needs to be.
Also, the term "matrix" is normally understood to mean a 2-dimensional array of elements all the same type, whereas it sounds like you want a 1-dimensi... | Since you are working with a collection of different types of information (e.g. `char*`, `int`, `int`), the proper way to collect this information is in a structure (or `struct`). You have two choices on how to create space for any array or array of struct, (1) statically allocate on stack, or (2) dynamically allocate ... |
7,188,361 | I'd like to insert in a website a video...The problem is:
* It must be accessible from IE6
* It must be accessible from IPad and apple devices (NO FLASH and no mediaplayer activex)
Anibody knows 'bout a solution to my problem?
The library or the code must be free!
Thank you very much!
Solved: using Hybrid approach... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7188361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/530384/"
] | There is no player that satisfies your conditions. You'll have to take a hybrid approach, with a combination of Flash and HTML 5 video. | Use HTML5!
example:
```
<video src="movie.ogg" width="320" height="240" controls="controls">
Your browser does not support the video tag.
</video>
```
You just need to tweak it a little. Here is a little help: <http://html5doctor.com/how-to-get-html5-working-in-ie-and-firefox-2/> |
27,470,917 | I have a piece of code that runs fine on iOS7, but has issues in iOS8.
It is a popup, that is initialized from a nib and immediately after, it's show method is called.
The problem is, that the initFromNib in iOS8 returns immediately, before calling viewDidLoad.
Consequently all IBOutlets, that the code relies on in... | 2014/12/14 | [
"https://Stackoverflow.com/questions/27470917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2198470/"
] | The problem is that you were *always* doing this wrong. iOS 8 has merely exposed the problem. Keep in mind what `viewDidLoad` *means*. It means that this view has loaded and that any outlets are now connected. Nothing more. It exists, but that is all. In particular, it is *not* in the interface yet. So what you were do... | Behavior for popovers has changed in iOS8. I'm not sure about regular view lifecycle thought. One would think that viewDidLoad will be called in a sync manner when you instantiate view from a XIB file, but judging by your comments it's not the case.
If I were on your place - I would try to create a sample small projec... |
27,470,917 | I have a piece of code that runs fine on iOS7, but has issues in iOS8.
It is a popup, that is initialized from a nib and immediately after, it's show method is called.
The problem is, that the initFromNib in iOS8 returns immediately, before calling viewDidLoad.
Consequently all IBOutlets, that the code relies on in... | 2014/12/14 | [
"https://Stackoverflow.com/questions/27470917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2198470/"
] | The problem is that you were *always* doing this wrong. iOS 8 has merely exposed the problem. Keep in mind what `viewDidLoad` *means*. It means that this view has loaded and that any outlets are now connected. Nothing more. It exists, but that is all. In particular, it is *not* in the interface yet. So what you were do... | I have found a solution to the problem.
I have changed the code to set the height of the tableview contained in the popup in the `viewWillAppear` method:
```
const CGFloat height = contentTableView.rowHeight* possibleValues.count;
CGFloat screenHeight = screenRect.size.height;
[popover setPopoverContentSize:CGSizeMak... |
73,164,974 | I am doing some unit tests and I would like to have a way to have tasks that are already running waiting on given values that the task doing the tests could change at will.
So I have multiple tasks that start running and doing their stuff, then I want to interrupt them midway so that other threads can be at the same s... | 2022/07/29 | [
"https://Stackoverflow.com/questions/73164974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9848484/"
] | Based on description sounds like an appropriate place to use [`Barrier`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.barrier?view=net-6.0):
```cs
var barrier = new Barrier(3);
var task1 = Task.Run(() =>
{
Console.WriteLine("before sync 1");
barrier.SignalAndWait();
Console.WriteLine("aft... | There is [ManualResetEvent(Slim)](https://learn.microsoft.com/en-us/dotnet/api/system.threading.manualreseteventslim?view=net-6.0) that can be used to provide signaling between threads. These can be used in pairs to get fine grained control over the execution:
```
var signalX= new ManualResetEventSlim(false);
var wait... |
1,873,879 | I ran into this question when writing a program. I need to generate two matrices, and calculate their product.
However, I must ensure all entries are within 8-bit signed integer range, i.e. $[-128, 128)$. Is there a way to algorithmically achieve this?
Furthermore, what if I need every intermediate result during calc... | 2016/07/28 | [
"https://math.stackexchange.com/questions/1873879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/18451/"
] | Let $D$ be the dimension of the matrices. For each row of $A$, simply choose $127$ of them at random to equal $1$ and set the rest to $0$. Do the same for each column of $B$. You are then guaranteed that the entries of $AB$ are nonnegative and at most $127$.
For a more random approach, choose each entry of $A$ and $B$... | With Python...
```
import numpy as np
low = -128
high = 128
size = (5,5)
dt = np.dtype('i1')
A = np.random.randint(low, high,size, dtype= dt)
B = np.random.randint(low, high, size, dtype=dt)
C = np.dot(A,B)
```
The entries can't be outside your range because the representation doesn't exist.
```
array([[-124, -9... |
23,255,309 | So I am learning how instances work and how to set them and such and I am wondering if I can output the variables of an instance without to output them separately.
Ex//
```
class Program
{
static void Main(string[] args)
{
Person Ryan = new Person();
Ryan.Age = 16;
Ryan.Name = "Rynoh97... | 2014/04/23 | [
"https://Stackoverflow.com/questions/23255309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3530423/"
] | You can override ToString in the Person class and make it output however you want it to when you call ToString.
There's an example here:
<http://msdn.microsoft.com/en-us/library/ms173154.aspx> | Apart from overriding ToString, you can also use String.Format:
```
string personDescription = String.Format("Name: {0}, Age: {1}", Ryan.Age, Ryan.Name);
Console.WriteLine(personDescription);
```
Console.WriteLine even comes with an overload to do this for you:
```
Console.WriteLine("Name: {0}, Age: {1}", Ryan.Age,... |
23,255,309 | So I am learning how instances work and how to set them and such and I am wondering if I can output the variables of an instance without to output them separately.
Ex//
```
class Program
{
static void Main(string[] args)
{
Person Ryan = new Person();
Ryan.Age = 16;
Ryan.Name = "Rynoh97... | 2014/04/23 | [
"https://Stackoverflow.com/questions/23255309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3530423/"
] | You can override ToString in the Person class and make it output however you want it to when you call ToString.
There's an example here:
<http://msdn.microsoft.com/en-us/library/ms173154.aspx> | You can override the toString method to make it display whatever you want.
Something like this.
```
public override string ToString()
{
return "Name: " + Name + " Age: " + Age;
}
```
Then whenever you call the Ryan.toString() method, this will be displayed instead. Hope this helps. |
23,255,309 | So I am learning how instances work and how to set them and such and I am wondering if I can output the variables of an instance without to output them separately.
Ex//
```
class Program
{
static void Main(string[] args)
{
Person Ryan = new Person();
Ryan.Age = 16;
Ryan.Name = "Rynoh97... | 2014/04/23 | [
"https://Stackoverflow.com/questions/23255309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3530423/"
] | Apart from overriding ToString, you can also use String.Format:
```
string personDescription = String.Format("Name: {0}, Age: {1}", Ryan.Age, Ryan.Name);
Console.WriteLine(personDescription);
```
Console.WriteLine even comes with an overload to do this for you:
```
Console.WriteLine("Name: {0}, Age: {1}", Ryan.Age,... | You can override the toString method to make it display whatever you want.
Something like this.
```
public override string ToString()
{
return "Name: " + Name + " Age: " + Age;
}
```
Then whenever you call the Ryan.toString() method, this will be displayed instead. Hope this helps. |
19,171,195 | Alright, so the code is pretty straight forward. Generic class ourSet, that takes in some elements, puts it in a LinkedList, and does some functions on the two sets.
My problem is actually quite unrelated the general concept of the project, its more in the "user input interface" I've created. I want it to take in som... | 2013/10/04 | [
"https://Stackoverflow.com/questions/19171195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2844764/"
] | The reason is, you're calling `input.nextLine()` *twice*:
```
do {
set1.add(input.nextLine());
}
while (!"EXIT".equals(input.nextLine()));
```
A much easier way than do-while is while:
```
while (!(String in = input.nextLine()).equals("EXIT")) {
set1.add(in);
}
``` | You ask for input twice
```
do {
set1.add(input.nextLine()); // you enter a number
}
while (!"EXIT".equals(input.nextLine())); // what if you enter another number?
// it'll just loop again, skipping that number
```
You need to ask for input once and use that either to stop or add it to your set. |
19,171,195 | Alright, so the code is pretty straight forward. Generic class ourSet, that takes in some elements, puts it in a LinkedList, and does some functions on the two sets.
My problem is actually quite unrelated the general concept of the project, its more in the "user input interface" I've created. I want it to take in som... | 2013/10/04 | [
"https://Stackoverflow.com/questions/19171195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2844764/"
] | The reason is, you're calling `input.nextLine()` *twice*:
```
do {
set1.add(input.nextLine());
}
while (!"EXIT".equals(input.nextLine()));
```
A much easier way than do-while is while:
```
while (!(String in = input.nextLine()).equals("EXIT")) {
set1.add(in);
}
``` | You loop is doing exactly what you've told it to...
* Read a line of text and add it to `set1`
* Read a line of text and check to see if it equals `"EXIT"`
* Repeat as required...
So, every second request is being used to check for the exit state. Instead, you should assign the text from the input to a variable and u... |
18,342,341 | Now i try to use adapter . But i dont understand how to set value from data .Becuase in friends = db.selectall ,value in friend have 3 value(fname,lname,nickname).So my question is How to set value(fname/lname/nickname OR one or the other) My code NOW look like this ::::
```
package com.example.sqlite;
import java.ut... | 2013/08/20 | [
"https://Stackoverflow.com/questions/18342341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2452021/"
] | This notation isn't actually special; it's just how the array slice, arrayref, `..`, and `$#` notations work, and you're putting them all together straightforwardly. But to answer your question, yes, it works in Perl 5.8.8:
```
$ perl -v | grep . | head -1
This is perl, v5.8.8 built for Linux-2.6c2.5-x86_64-64int
$ p... | `$#array` returns the last index of array `@array`. Similarly, `$#{ $aref }` returns the last index of the array referenced by `$aref`. This can be shortened to `$#$aref`.
`$x .. $y` is the range operator. It returns the numbers from `$x` up to `$y` inclusively. (It works for some strings too.) For example, `-3 .. 5`... |
18,342,341 | Now i try to use adapter . But i dont understand how to set value from data .Becuase in friends = db.selectall ,value in friend have 3 value(fname,lname,nickname).So my question is How to set value(fname/lname/nickname OR one or the other) My code NOW look like this ::::
```
package com.example.sqlite;
import java.ut... | 2013/08/20 | [
"https://Stackoverflow.com/questions/18342341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2452021/"
] | This notation isn't actually special; it's just how the array slice, arrayref, `..`, and `$#` notations work, and you're putting them all together straightforwardly. But to answer your question, yes, it works in Perl 5.8.8:
```
$ perl -v | grep . | head -1
This is perl, v5.8.8 built for Linux-2.6c2.5-x86_64-64int
$ p... | The `$#` syntax (used to get the index of the last element in an array) has been part of Perl's syntax since the dawn of the 5.x line. Actually, the `$#array` syntax has been around since at least Perl 4 but references (and thus the `$#$aref` syntax) didn't exist until Perl 5.
While it isn't trivially searchable, if y... |
133 | Do you consider questions about community management of a website to be on-topic or off-topic? | 2010/07/20 | [
"https://webmasters.meta.stackexchange.com/questions/133",
"https://webmasters.meta.stackexchange.com",
"https://webmasters.meta.stackexchange.com/users/9301/"
] | There are several community management questions already:
[How do you handle Suicide Threats?](https://webmasters.stackexchange.com/questions/1031/how-do-you-handle-suicide-threats)
[Where do you draw the line on hate speech in user generated content?](https://webmasters.stackexchange.com/questions/1298/where-do-you-d... | Community management should be on-topic. For example, *[Is there any way to really ban people from a website?](https://webmasters.stackexchange.com/questions/720/is-there-any-way-to-really-ban-people-from-a-website/731)* is a great question, and is a community manaegment question.
Obviously "on-topic" is on a case by ... |
70,982,447 | I'm trying to use Lottie Library in jetpack compose
For animating image, I made animating svg file.
But in <https://lottiefiles.com/svg-to-lottie>, the animating svg file converted to static json file which I didn't intent.
How could I convert animating svg file to animating json file? | 2022/02/04 | [
"https://Stackoverflow.com/questions/70982447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13919587/"
] | You can use [this](https://javiercbk.github.io/json_to_dart/) tool to convert your json to dart. It also supports null safety and complex lists. | just go to browser and type quick type that is the best for converting json to any model class.copy your json code and paste it over there it will generate your model class. |
70,982,447 | I'm trying to use Lottie Library in jetpack compose
For animating image, I made animating svg file.
But in <https://lottiefiles.com/svg-to-lottie>, the animating svg file converted to static json file which I didn't intent.
How could I convert animating svg file to animating json file? | 2022/02/04 | [
"https://Stackoverflow.com/questions/70982447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13919587/"
] | You can use [this](https://javiercbk.github.io/json_to_dart/) tool to convert your json to dart. It also supports null safety and complex lists. | There is no way to do that perfectly. JSON does not contain type information of the kind you need for null safety.
For example, there is no way to know, whether there are fields that are nullable, because it would be perfectly fine to just not have them in the JSON data at all. There also is no way to know whether a f... |
10,459,984 | I have a uiview that has all my buttons, that has its controller. How can I include the button view in all my uiviews using the interface builder? The buttons must work when click. The purpose is to increase maintainability. | 2012/05/05 | [
"https://Stackoverflow.com/questions/10459984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2514963/"
] | You can create a custom UIView in interface builder like this:
[Loading custom UIView from nib, all subviews contained in nib are nil?](https://stackoverflow.com/questions/7588066/loading-custom-uiview-from-nib-all-subviews-contained-in-nib-are-nil)
Then add your custom view to other views in IB by adding a normal UIV... | [Try this](https://stackoverflow.com/questions/2945910/build-xib-interface-builder-and-load-them-as-subview-in-iphone). I'm not sure that adding UIView in Interface Builder will work, but adding subview programmatically always works. |
2,985,926 | I want to Show the following:
$\ln(x) = o (e^{\sqrt{\ln x}})$ (Little-o Notation).
So I need to Show that: $\displaystyle{\lim\_{x \rightarrow \infty} \frac{\ln(x)}{e^{\sqrt{\ln x}}}=0}.$
Can you help me, please? | 2018/11/05 | [
"https://math.stackexchange.com/questions/2985926",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/557847/"
] | As $r$ and $s$ are rationals, for every rational $t$, $T(t)=r+(s-r)t$ is a rational, right ?
Now if $t$ is irrational, $T(t)=r+(s-r)t$ can't be rational. Otherwise,
$$t=\frac{T(t)-r}{s-r}$$
would be a rational too, which is excluded.
Hence, $T$ maps rationals to rationals, and irrationals to irrationals. | Let $d \in \mathbb{Q}$ and $d>0$.
We claim that if $r \in \mathbb{Q}$ and $t \in \mathbb{Q}$, then $r+dt \in \mathbb{Q}$, this is due to rational numbers are closed under multiplication and addition.
Also, $r \in \mathbb{Q}$ and $t \notin \mathbb{Q}$, then $r+dt \notin \mathbb{Q}$, suppose on the contrary that $x=r+d... |
44,394,273 | As i mentioned in the title, i want to export information: RGB video, position,rotation of Tango and set of data point cloud, its depth as well into a file to analyse after.
I can separately extract these information following this guide:
<https://github.com/googlesamples/tango-examples-c>
but I don't know how to col... | 2017/06/06 | [
"https://Stackoverflow.com/questions/44394273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6264812/"
] | You don't return from the myUser method, so there's nothing to wait for but `undefined`. As @JoelCDoyle commented:
>
> Your resolve method must return a promise. $http method returns a promise.
>
>
>
```
resolve: {
myUser:function($http){
// return here!
return $http.get("/irods-c... | After feedback from @JoelCDoyle and @baao, I used a different approach.
I simply created a service that handled the GET request and used that in my resolve.
More on this can be viewed [here](https://blog.brunoscopelliti.com/show-route-only-after-all-promises-are-resolved/) |
15,476,055 | I want to Converted a Double to a string.
And display only the decimal places.
On this way:
```
Double: 123.465
String: 46
Double: 1123.465
String: 46
Double: 123.46555987
String: 46
```
Now is my question how can i do that and what is the best way? | 2013/03/18 | [
"https://Stackoverflow.com/questions/15476055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2067766/"
] | ```
def upload_handler(source):
# this is creating a temp file and returning an os handle and name
fd, filepath = tempfile.mkstemp(prefix=source.name, dir=MEDIA_ROOT)
# this next line just clears the file you just made (which is already empty)
with open(filepath, 'wb') as dest:
# this is a stra... | The name is random-generated because it's the purpose of `tempfile.mkstemp`. The file with that name is created because it's how `tempfile.mkstemp` works. It is also opened and the file descriptor is returned to you in `fd` which you ignore. You don't seem to understand how `tempfile.mkstemp` should be used and you pro... |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | You can use the [htmlentities() function](http://us3.php.net/htmlentities). This will replace all special characters with their HTML equivalent. It should do the job. | try htmlentities() |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | You can use the [htmlentities() function](http://us3.php.net/htmlentities). This will replace all special characters with their HTML equivalent. It should do the job. | [htmlentities](http://de3.php.net/manual/en/function.htmlentities.php).
But you probably don't need to. Serve your page in an encoding that includes them (UTF-8, ISO-8859-1) and you can include those as literal, unescaped characters. |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | You can use the [htmlentities() function](http://us3.php.net/htmlentities). This will replace all special characters with their HTML equivalent. It should do the job. | The answer is already given: use `htmlentities()`. In addition, the use of UTF-8 has been suggested, which of course is a really good idea. However, if you're planning on using `htmlentities()` on UTF-8 strings, use the following code (or you'll get weirdly encoded characters):
```
htmlentities($str, ENT_COMPAT, 'UTF-... |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | [htmlentities](http://de3.php.net/manual/en/function.htmlentities.php).
But you probably don't need to. Serve your page in an encoding that includes them (UTF-8, ISO-8859-1) and you can include those as literal, unescaped characters. | try htmlentities() |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | The answer is already given: use `htmlentities()`. In addition, the use of UTF-8 has been suggested, which of course is a really good idea. However, if you're planning on using `htmlentities()` on UTF-8 strings, use the following code (or you'll get weirdly encoded characters):
```
htmlentities($str, ENT_COMPAT, 'UTF-... | try htmlentities() |
724,926 | We've got some fraction information stored in the database, e.g. ¾ ½
Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? | 2009/04/07 | [
"https://Stackoverflow.com/questions/724926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45350/"
] | [htmlentities](http://de3.php.net/manual/en/function.htmlentities.php).
But you probably don't need to. Serve your page in an encoding that includes them (UTF-8, ISO-8859-1) and you can include those as literal, unescaped characters. | The answer is already given: use `htmlentities()`. In addition, the use of UTF-8 has been suggested, which of course is a really good idea. However, if you're planning on using `htmlentities()` on UTF-8 strings, use the following code (or you'll get weirdly encoded characters):
```
htmlentities($str, ENT_COMPAT, 'UTF-... |
15,953 | just 1 click ..and it duplicates ALL content, settings, css, plugins..
im looking for a plugin that adds a new link to Sites admin;
Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | **DUPLICATE**...
it should copy ALL settings/configs.
and create a new subdomain instance in the **existing** Multis... | 2011/04/29 | [
"https://wordpress.stackexchange.com/questions/15953",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/4992/"
] | if you want a plugin that can have a default setup when you create a new sub-site then give this a shot [WPMUDEV New Blog Template](http://premium.wpmudev.org/project/new-blog-template) do not let the name fool you it does what your somewhat looking for minus the Duplicate button but that would be no longer necessary. | There are a number of plugins that backup the database as well as WordPress files.
Looking at the [plugins associated with the backup tag](http://wordpress.org/extend/plugins/tags/backup), the following look useful:
* BackupWordPress
* XCloner
* Backup and Move Plugin |
15,953 | just 1 click ..and it duplicates ALL content, settings, css, plugins..
im looking for a plugin that adds a new link to Sites admin;
Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | **DUPLICATE**...
it should copy ALL settings/configs.
and create a new subdomain instance in the **existing** Multis... | 2011/04/29 | [
"https://wordpress.stackexchange.com/questions/15953",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/4992/"
] | A quick edit option for |Delete|Visit|DUPLICATE seems a bit too tailor made.
Nonetheless, this plugin does exactly what you want with 2 clicks (on its own screen).
<http://wordpress.org/extend/plugins/add-cloned-sites-for-wpmu-batch/> | There are a number of plugins that backup the database as well as WordPress files.
Looking at the [plugins associated with the backup tag](http://wordpress.org/extend/plugins/tags/backup), the following look useful:
* BackupWordPress
* XCloner
* Backup and Move Plugin |
15,953 | just 1 click ..and it duplicates ALL content, settings, css, plugins..
im looking for a plugin that adds a new link to Sites admin;
Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | **DUPLICATE**...
it should copy ALL settings/configs.
and create a new subdomain instance in the **existing** Multis... | 2011/04/29 | [
"https://wordpress.stackexchange.com/questions/15953",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/4992/"
] | Late to the party here but wanted to mention for the benefit of future searchers that we had the same need and built a plugin for cloning/duplicating with all settings intact just like the OP describes.
It is called the [NS Cloner](http://wordpress.org/plugins/ns-cloner-site-copier), and it doesn't add a "Duplicate" a... | There are a number of plugins that backup the database as well as WordPress files.
Looking at the [plugins associated with the backup tag](http://wordpress.org/extend/plugins/tags/backup), the following look useful:
* BackupWordPress
* XCloner
* Backup and Move Plugin |
15,953 | just 1 click ..and it duplicates ALL content, settings, css, plugins..
im looking for a plugin that adds a new link to Sites admin;
Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | **DUPLICATE**...
it should copy ALL settings/configs.
and create a new subdomain instance in the **existing** Multis... | 2011/04/29 | [
"https://wordpress.stackexchange.com/questions/15953",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/4992/"
] | A quick edit option for |Delete|Visit|DUPLICATE seems a bit too tailor made.
Nonetheless, this plugin does exactly what you want with 2 clicks (on its own screen).
<http://wordpress.org/extend/plugins/add-cloned-sites-for-wpmu-batch/> | if you want a plugin that can have a default setup when you create a new sub-site then give this a shot [WPMUDEV New Blog Template](http://premium.wpmudev.org/project/new-blog-template) do not let the name fool you it does what your somewhat looking for minus the Duplicate button but that would be no longer necessary. |
15,953 | just 1 click ..and it duplicates ALL content, settings, css, plugins..
im looking for a plugin that adds a new link to Sites admin;
Edit | Dashboard | Deactivate | Archive | Spam | Delete | Visit | **DUPLICATE**...
it should copy ALL settings/configs.
and create a new subdomain instance in the **existing** Multis... | 2011/04/29 | [
"https://wordpress.stackexchange.com/questions/15953",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/4992/"
] | A quick edit option for |Delete|Visit|DUPLICATE seems a bit too tailor made.
Nonetheless, this plugin does exactly what you want with 2 clicks (on its own screen).
<http://wordpress.org/extend/plugins/add-cloned-sites-for-wpmu-batch/> | Late to the party here but wanted to mention for the benefit of future searchers that we had the same need and built a plugin for cloning/duplicating with all settings intact just like the OP describes.
It is called the [NS Cloner](http://wordpress.org/plugins/ns-cloner-site-copier), and it doesn't add a "Duplicate" a... |
6,441,682 | What regular expression would one use to remove a domain from a string? I tried several combinations and the closet I come up with works expect removes everything afterwards when a match as been found more than once.
```
$string = 'The quick brown fox <img src="http://domain.com/images/fox.jpg"> jumps over the lazy do... | 2011/06/22 | [
"https://Stackoverflow.com/questions/6441682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/804550/"
] | Your `.*` is greedy. It will consume as many characters as it can to satisfy the match. Put a `?` after it to make it non-greedy like this:
```
preg_replace('/http:\/\/(.*?)domain\.com/', '', $string);
``` | You need to escape fullstops ...
```
/http:\/\/[a-z\.]+domain\.com/
``` |
6,566,537 | SO I have a setup with a few links as follows
```
<a class="someclass" href="http://www.google.com" id="link01">Google</a>
<a class="someclass" href="http://www.yahoo.com" id="link02">Yahoo</a>
<a class="someclass" href="http://www.cnn.com" id="link03">CNN</a>
<a class="someclass" href="http://www.facebook.com" id="li... | 2011/07/04 | [
"https://Stackoverflow.com/questions/6566537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/826511/"
] | Make a synchronous AJAX request so that it completes first:
```
$.ajax({
type: "POST",
async: false,
url: "clearance.php",
data: data,
success: function(msg){
}
});
``` | Another solution without making the request synchronous:
```
$(".someclass").click(function() {
var currentId = $(this).attr('id');
var data = "do=clearthis&id=" + currentId;
var linkUrl = $(this).attr("href");
$.ajax({
type: "POST",
url: "clearance.php",
... |
19,715,225 | Previously, when I had floatings blocks, and i will stop the float, i used ;
```
<div style="clear:both"></div>
```
But now, i'm solve this problem with pseudo class :
```
.last_floating_div:after {
content: "";
display: table;
clear: both;
}
```
I has always works perfectly. But today... It doesn't work...... | 2013/10/31 | [
"https://Stackoverflow.com/questions/19715225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2606853/"
] | Sure - you could clear it via an `:after` clearfix, however the most optimal, lightweight solution would just be to set `overflow:hidden` on the parent, achiving the desired effect with much less coding.
```
#mention {
overflow: hidden;
}
```
[**jsFiddle here**](http://jsfiddle.net/JSuGN/)
To answer the questio... | I think you need a #mention:after to do what you are looking for.
**For Instance,**
```
#mention:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
#mention { display: inline-block; }
* html #mention{ height: 1%; } /* for older ie */
#... |
19,715,225 | Previously, when I had floatings blocks, and i will stop the float, i used ;
```
<div style="clear:both"></div>
```
But now, i'm solve this problem with pseudo class :
```
.last_floating_div:after {
content: "";
display: table;
clear: both;
}
```
I has always works perfectly. But today... It doesn't work...... | 2013/10/31 | [
"https://Stackoverflow.com/questions/19715225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2606853/"
] | Sure - you could clear it via an `:after` clearfix, however the most optimal, lightweight solution would just be to set `overflow:hidden` on the parent, achiving the desired effect with much less coding.
```
#mention {
overflow: hidden;
}
```
[**jsFiddle here**](http://jsfiddle.net/JSuGN/)
To answer the questio... | If you just add the `:after` to the id `mention` you will get the desired effect.
```
#mention:after {
content: "";
display: table;
clear: both;
}
```
[JSFIDDLE](http://jsfiddle.net/YsueS/3/) |
2,149,293 | Let $M$ be a $n\times n$ matrix whose coefficients depend on some parameters (the number of parameters does not really matter). For some values of the parameters, $M$ is non-singular. Enforcing $\mathrm{rank}(M)\leq n-1$ requires solving a single equation: $\det M =0$.
My question is, how many equations are needed to... | 2017/02/17 | [
"https://math.stackexchange.com/questions/2149293",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/36578/"
] | For real matrices, the answer is one, because any set of $k$ polynomial equations $p\_1=\cdots=p\_k=0$ is equivalent to the single equation $p\_1^2+\cdots+p\_k^2=0$. Yet, we can explicitly construct the polynomial equation we need here:
>
> When $n\ge2$, a real $n\times n$ matrix $A$ has rank $\le n-2$ if and only if... | In the paper
>
> [W. Bruns and R. Schwänzl. The number of equations defining a determinantal variety. Bull. London Math. Soc. 22 (1990), no. 5, 439-445.](http://www.home.uni-osnabrueck.de/wbruns/brunsw/pdf-article/NumbEqDet.published.pdf)
>
>
>
you will find that over an algebraically closed field, the set of $n ... |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | Use the [Java Concurrency API](http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/package-summary.html). Usage of `BlockingQueue`s, `Future<>` will help you.
Note: This is a classic producer-consumer problem. This can be achieved having a shared queue to hold data where one thread will push data in... | Java doesn't have a direct mechanism for a specific thread to send a message to another SPECIFIC thread.
But there are indirect ways of achieving this though. For example, you can define a message queue object on one thread and then pass a reference to that queue to the second thread. The second thread can insert mes... |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | Use the [Java Concurrency API](http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/package-summary.html). Usage of `BlockingQueue`s, `Future<>` will help you.
Note: This is a classic producer-consumer problem. This can be achieved having a shared queue to hold data where one thread will push data in... | This is maybe an overengineered aproach for this case, but nonetheless you could use [EventBus](http://eventbus.org/) - each Thread could publish and be subsrcibed to events.
An example is [here](http://bwinterberg.blogspot.com/2009/05/eventbus-library.html). |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | I using [Executor](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html)/[ExecutorService](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html), output from these methods starting [java.swing.Action](http://download.oracle.com/javase/tutorial/uiswing/misc/a... | Use the [Java Concurrency API](http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/package-summary.html). Usage of `BlockingQueue`s, `Future<>` will help you.
Note: This is a classic producer-consumer problem. This can be achieved having a shared queue to hold data where one thread will push data in... |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | Java doesn't have a direct mechanism for a specific thread to send a message to another SPECIFIC thread.
But there are indirect ways of achieving this though. For example, you can define a message queue object on one thread and then pass a reference to that queue to the second thread. The second thread can insert mes... | This is maybe an overengineered aproach for this case, but nonetheless you could use [EventBus](http://eventbus.org/) - each Thread could publish and be subsrcibed to events.
An example is [here](http://bwinterberg.blogspot.com/2009/05/eventbus-library.html). |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | I using [Executor](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html)/[ExecutorService](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html), output from these methods starting [java.swing.Action](http://download.oracle.com/javase/tutorial/uiswing/misc/a... | Java doesn't have a direct mechanism for a specific thread to send a message to another SPECIFIC thread.
But there are indirect ways of achieving this though. For example, you can define a message queue object on one thread and then pass a reference to that queue to the second thread. The second thread can insert mes... |
7,185,668 | I want to make a background task in one thread and send information from that thread to another thread which runs the main program and update the information each period of time.
Thread1:
```
public void doTask()
{
// ...
someData = ...;
}
```
Thread2:
```
SwingUtilities.invokeLater(new Runnable()
{
pu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7185668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597657/"
] | I using [Executor](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html)/[ExecutorService](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html), output from these methods starting [java.swing.Action](http://download.oracle.com/javase/tutorial/uiswing/misc/a... | This is maybe an overengineered aproach for this case, but nonetheless you could use [EventBus](http://eventbus.org/) - each Thread could publish and be subsrcibed to events.
An example is [here](http://bwinterberg.blogspot.com/2009/05/eventbus-library.html). |
24,417,949 | I am trying to add hover functionality to a checkbox element but as you can see in [This Demo](http://jsfiddle.net/V5dKq/) it is not working.
can you please let me know why this is happening?
```
input[type="checkbox"] {
display:none;
}
input[type="checkbox"] + label span {
display:inline-block;
width:19px... | 2014/06/25 | [
"https://Stackoverflow.com/questions/24417949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3649067/"
] | Your code is replacing the actual checkbox with your own graphical representation added to the beginning of the label. The checkbox itself is actually hidden from view, and so your hover state doesn't work. Your hover needs to be on the label instead.
[JSFiddle Demo](http://jsfiddle.net/V5dKq/2/)
Change this selector... | Use this
```
input[type="checkbox"]:hover + label span:hover {
background:url(https://cdn.tutsplus.com/webdesign/uploads/legacy/tuts/391_checkboxes/check_radio_sheet.png) -19px top no-repeat;
}
``` |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Yeah - select the variable name - then use Alt-Shift-R, then rename.
Only variable names can be changed that way. | I do not know if my contribution will be of any help this late but anyway. In Sublime Text 3, highlight the word by double clicking on it, then hit Alt + F3. This highlights all instances of that word with cursors on each. Type over them and they all get changed, plus you could move the pointer in any direction across ... |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Yeah - select the variable name - then use Alt-Shift-R, then rename.
Only variable names can be changed that way. | Press ctrl + f for windows computer. Then under FIND, type what you want to find. Then in REPLACE WITH, type in what you want to replace it with. Then click REPLACE ALL. |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Yeah - select the variable name - then use Alt-Shift-R, then rename.
Only variable names can be changed that way. | just highlight the context and press ALT+SHIFT+R |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Yeah - select the variable name - then use Alt-Shift-R, then rename.
Only variable names can be changed that way. | You can use *Cmd-Alt-R* in macOS with the cursor inside the word, no need to select the whole thing. This brings up a small refactor window. Select "Options" and type the new name. This works with constructs like variable, packages and so on.
In Windows I assume it's *Ctrl-Alt-R*, but if not go to Settings and General... |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | just highlight the context and press ALT+SHIFT+R | I do not know if my contribution will be of any help this late but anyway. In Sublime Text 3, highlight the word by double clicking on it, then hit Alt + F3. This highlights all instances of that word with cursors on each. Type over them and they all get changed, plus you could move the pointer in any direction across ... |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can use *Cmd-Alt-R* in macOS with the cursor inside the word, no need to select the whole thing. This brings up a small refactor window. Select "Options" and type the new name. This works with constructs like variable, packages and so on.
In Windows I assume it's *Ctrl-Alt-R*, but if not go to Settings and General... | I do not know if my contribution will be of any help this late but anyway. In Sublime Text 3, highlight the word by double clicking on it, then hit Alt + F3. This highlights all instances of that word with cursors on each. Type over them and they all get changed, plus you could move the pointer in any direction across ... |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | just highlight the context and press ALT+SHIFT+R | Press ctrl + f for windows computer. Then under FIND, type what you want to find. Then in REPLACE WITH, type in what you want to replace it with. Then click REPLACE ALL. |
17,694,532 | What I wan't to know is if it is possible to **SELECT** all of the occurrences of the same word in a Java Program. I know that it is possible in Sublime Text 3 but I wan't to know if it Will work in Eclipse. And I don't mean highlight, I already know Mark Occurrences, I want it to like, select the word here is a exampl... | 2013/07/17 | [
"https://Stackoverflow.com/questions/17694532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can use *Cmd-Alt-R* in macOS with the cursor inside the word, no need to select the whole thing. This brings up a small refactor window. Select "Options" and type the new name. This works with constructs like variable, packages and so on.
In Windows I assume it's *Ctrl-Alt-R*, but if not go to Settings and General... | Press ctrl + f for windows computer. Then under FIND, type what you want to find. Then in REPLACE WITH, type in what you want to replace it with. Then click REPLACE ALL. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.