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 |
|---|---|---|---|---|---|
1,203,646 | in the following indexer code block, why do we need:
```
public string this[int pos]
{
get
{
return myData[pos];
}
set
{
myData[pos] = value;
}
}
```
what exactly does "this" in this[int pos] do? Thanks
```
/// Indexer Code Block starts here
using System;
/// <summary>
/// ... | 2009/07/29 | [
"https://Stackoverflow.com/questions/1203646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133466/"
] | **From a c# syntax perspective:**
You need `this` because - how else would you declare it? Functionality on a class must have a name, or address, by which to reference it.
A method signature is:
```
[modifiers] [type] [name] (parameters)
public string GetString (Type myparam);
```
A property signature... | It means that you can use the indexer on the object itself (like an array).
```
class Foo
{
public string this[int i]
{
get { return someData[i]; }
set { someData i = value; }
}
}
// ... later in code
Foo f = new Foo( );
string s = f[0];
``` |
1,203,646 | in the following indexer code block, why do we need:
```
public string this[int pos]
{
get
{
return myData[pos];
}
set
{
myData[pos] = value;
}
}
```
what exactly does "this" in this[int pos] do? Thanks
```
/// Indexer Code Block starts here
using System;
/// <summary>
/// ... | 2009/07/29 | [
"https://Stackoverflow.com/questions/1203646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133466/"
] | It means that you can use the indexer on the object itself (like an array).
```
class Foo
{
public string this[int i]
{
get { return someData[i]; }
set { someData i = value; }
}
}
// ... later in code
Foo f = new Foo( );
string s = f[0];
``` | It allows your class to behave in a similar manner to an array. In this case, your indexer is allowing you to reference myData transparently from outside the IntIndexer class.
If you didn't have the indexer declared, the following code would fail:
```
myInd[1] = "Something";
``` |
1,203,646 | in the following indexer code block, why do we need:
```
public string this[int pos]
{
get
{
return myData[pos];
}
set
{
myData[pos] = value;
}
}
```
what exactly does "this" in this[int pos] do? Thanks
```
/// Indexer Code Block starts here
using System;
/// <summary>
/// ... | 2009/07/29 | [
"https://Stackoverflow.com/questions/1203646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133466/"
] | **From a c# syntax perspective:**
You need `this` because - how else would you declare it? Functionality on a class must have a name, or address, by which to reference it.
A method signature is:
```
[modifiers] [type] [name] (parameters)
public string GetString (Type myparam);
```
A property signature... | It allows your class to behave in a similar manner to an array. In this case, your indexer is allowing you to reference myData transparently from outside the IntIndexer class.
If you didn't have the indexer declared, the following code would fail:
```
myInd[1] = "Something";
``` |
21,403 | I am designing a 12VDC, 200mA transformerless power supply using 1N4007(diode) for rectification, a ceramic capacitor 475k and 10R resistor for limiting, a zener diode (1N4742A) for a regulated output. After the connections am not still getting the output current, the current is needed to drive a relay of 12VDC 160mA. | 2011/10/27 | [
"https://electronics.stackexchange.com/questions/21403",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/6291/"
] | **Summary**
* **ALWAYS remember that any part of this circuit MUST be considered to be live and that a user may die if they touch any part of this circuit.**
* If your circuit is half wave and operating at 110 VAC and 60 Hz then the capacitor needs to be about 10 uF.
* If your circuit is half wave and operating at 230... | 200mA is a lot for a capacitve dropper supply. If you're driving a relay, consider using one with a 24 or 48V coil instead of 12V, so less current is needed.
Take a look at Power Integrations Linkswitch-TN devices, which can be a good alternative to capacitor droppers when the current requirement is more than can be ... |
23,108 | One of my weaknesses as a PM is not being able to delegate and manage work assigned to others. What are ways you can tackle this? Granted I have high expectations of others, but sometimes they just don't meet the basic requirements.
Example:
I asked someone to do a task for me, and 2 hours before the deadline they pre... | 2017/12/19 | [
"https://pm.stackexchange.com/questions/23108",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/27570/"
] | A few suggestions:
Don't delegate & disappear until the deadline. Check in with them once or twice, just informally to ask how it's going, do they need any clarification from you, are they having any problems.
Be sure everyone is clear on what the priority of the delegated task is, especially if the people you've del... | To add to [Vicki](https://pm.stackexchange.com/users/11661/vicki-laidler)'s great [answer](https://pm.stackexchange.com/a/23112/4384):
Once you *train* people that you will redo sloppy work and fill in for them, they will rely on it.
As a general rule, a PM never does any work, a PM does PM.
How to do this? See [Vic... |
23,108 | One of my weaknesses as a PM is not being able to delegate and manage work assigned to others. What are ways you can tackle this? Granted I have high expectations of others, but sometimes they just don't meet the basic requirements.
Example:
I asked someone to do a task for me, and 2 hours before the deadline they pre... | 2017/12/19 | [
"https://pm.stackexchange.com/questions/23108",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/27570/"
] | A few suggestions:
Don't delegate & disappear until the deadline. Check in with them once or twice, just informally to ask how it's going, do they need any clarification from you, are they having any problems.
Be sure everyone is clear on what the priority of the delegated task is, especially if the people you've del... | You are only looking at the individual as a possible root cause of the mediocre performance. This is not unusual, unfortunately, but it is also not very effective. You need to look at the entire system: processes--including the supporting processes such as QA (@VickiLaidler's suggestion) and risk--tooling; knowledge--b... |
23,108 | One of my weaknesses as a PM is not being able to delegate and manage work assigned to others. What are ways you can tackle this? Granted I have high expectations of others, but sometimes they just don't meet the basic requirements.
Example:
I asked someone to do a task for me, and 2 hours before the deadline they pre... | 2017/12/19 | [
"https://pm.stackexchange.com/questions/23108",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/27570/"
] | A few suggestions:
Don't delegate & disappear until the deadline. Check in with them once or twice, just informally to ask how it's going, do they need any clarification from you, are they having any problems.
Be sure everyone is clear on what the priority of the delegated task is, especially if the people you've del... | It appears that you tend to be a perfectionist. Aren't you? Well, that's one of the challenge you got to face if you are a perfectionist. In adverse situations, the team members might also play games. That's natural in a highly political environment.
Is being perfectionist your problem? No. Then, how will you overcom... |
23,108 | One of my weaknesses as a PM is not being able to delegate and manage work assigned to others. What are ways you can tackle this? Granted I have high expectations of others, but sometimes they just don't meet the basic requirements.
Example:
I asked someone to do a task for me, and 2 hours before the deadline they pre... | 2017/12/19 | [
"https://pm.stackexchange.com/questions/23108",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/27570/"
] | A few suggestions:
Don't delegate & disappear until the deadline. Check in with them once or twice, just informally to ask how it's going, do they need any clarification from you, are they having any problems.
Be sure everyone is clear on what the priority of the delegated task is, especially if the people you've del... | Couple of comments for you:
>
> Granted I have high expectations of others, but sometimes they just
> don't meet the basic requirements.
>
>
>
* Spend more time thinking about your hiring / selection process
* Avoid becoming a policeman
* Read and think about [Setup to Fail](https://hbr.org/1998/03/the-set-up-to... |
23,108 | One of my weaknesses as a PM is not being able to delegate and manage work assigned to others. What are ways you can tackle this? Granted I have high expectations of others, but sometimes they just don't meet the basic requirements.
Example:
I asked someone to do a task for me, and 2 hours before the deadline they pre... | 2017/12/19 | [
"https://pm.stackexchange.com/questions/23108",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/27570/"
] | A few suggestions:
Don't delegate & disappear until the deadline. Check in with them once or twice, just informally to ask how it's going, do they need any clarification from you, are they having any problems.
Be sure everyone is clear on what the priority of the delegated task is, especially if the people you've del... | Work environments changed a lot since the apparition of emails and voice messaging, not so long ago. I remember a time when people had only the choice to answer the phone or not. More recently appeared "gaming" in work places, gaming like in video games, people choosing their avatar and playing it along the days, the w... |
116,322 | Which is correct? And is there a difference?
>
> 1. He became blind when he was at the age of 50 years.
> 2. He became blind at the age 50.
> 3. when he was at the age of 50 years, he became blind.
>
>
> | 2017/01/20 | [
"https://ell.stackexchange.com/questions/116322",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/46429/"
] | They are all technically correct, and your meaning would be easily understood by a native speaker, but each sounds a little odd, here's a breakdown:
>
> He became blind when he was at the age of 50 years.
>
>
>
This isn't ungrammatical, but sounds a little awkward. It sounds fine without "years" at the end. We un... | There is no difference in meaning. The one I prefer is #2 because it says the same as the others in less words. However, the word "the" was unnecessary and should have been left out. A native speaker would not have included it.
2a) He became blind at age 50.
Idiomatically, the most common way people refer to age is "... |
27,397,743 | I get this error in my iOS app using Parse SDK. The strange thing is that i only get this error when i'm NOT using wifi. On wifi it works just fine.
Could it be some bug with the Parse SDK version 1.5? Does anyone else get this error?
```
Error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was los... | 2014/12/10 | [
"https://Stackoverflow.com/questions/27397743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2965751/"
] | I experienced this with slow internet connections (3G especially) and when I had big sized objects like a table view with a lot high quality images. Sometimes it just happens without any serious reasons. I think it's a network issue not a Parse bug. Parse handles these situations very good, it tries to reconnect in eve... | I had similar issue, this is to do with internet speed. when signal is low, this issue occurs. Sometime by refreshing network or close/opening the xcode does help. |
22,211,624 | I have seen
```
2>&1
```
at the end of a bash command. What does this mean? Is it some kind of output redirection?
Thanks! | 2014/03/05 | [
"https://Stackoverflow.com/questions/22211624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/388325/"
] | Short: It redirects all output made on `STDERR` to `STDOUT`.
`>` is a redirection operator which will - in the simplest form - redirect all output on `STDOUT` into a file.
```
test.sh > file
```
If you prefix `>` with a number it uses the output from this specific file descriptor - 2 in your example. 1 is stdout, 2... | 1 is stdout. 2 is stderr.
`2>&1` simply points everything sent to stderr, to stdout instead.
You will get more info about this : [here](http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/) |
1,749,084 | Prove that an equilateral triangle allows for the greatest packing density when only packing one circle into a triangle.
I have though of starting with the unit circle inscribed in an equilateral triangle, then using the ratio of the area of the circle to the left over area of the triangle to construct the proof. I h... | 2016/04/19 | [
"https://math.stackexchange.com/questions/1749084",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/288003/"
] | The area of a triangle $\Delta = rs$, where $r$ is its inradius and $s$ is its semiperimeter. The area of the incircle is $\pi r^2$. We want to maximize the ratio of the circle's area to the triangle's area; namely, the ratio $$\begin{align}\frac{\pi r^2}{rs} &= \frac{\pi r}{s} \\[4pt] &\propto \frac{r}{s} \end{align}$... | Let's consider the dual problem: Find the triangle $\triangle$ of minimal area circumscribing the unit circle with center $O$. Let $C\_i$ $(1\leq i\leq3)$ be the points of contact. If $\angle(C\_{i-1}OC\_i)=2\phi\_i<\pi$ then area of the triangle is given by
$${\rm area}(\triangle)=\tan\phi\_1+\tan\phi\_2+\tan\phi\_3\ ... |
65,619,499 | I'm using ESLint in an Angular project.
I set-up the js files in the cypress folder (my e2e tests) to have different rules by anding overrides in the .eslintrc.js file, like so:
```
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: ["prettier", "prettier/@typescript-eslint",... | 2021/01/07 | [
"https://Stackoverflow.com/questions/65619499",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6196488/"
] | While not perfect this is pretty close. It adds the icon back when you minimize the window. It's a complete custom window with drag support.
I integrated and update some code made by others to work with Guizero 1.2.0.
```
from guizero import *
app = App(bg='white',title='Test',width=645,height=275)
#Removes window bor... | ```
# This works fine do not adjust code
# works with version 1.1.0
# This is no longer supposed to work with the latest version of guizero.
#
# I have tried with version 1.3.0 which is the
# latest version on 05/01/22
# and it still appears to work without any changes needed
# in comments below.
# You will need to u... |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want all records that have the minimum price over the whole table, one cross-database solution is to filter with a correlated subquery:
```
select r.*
from room r
where r.price = (select min(r1.price) from room r1)
```
Depending on your database, better solutions might be available. Typically, SQL Server has ... | ```
SELECT t.*
FROM Room t
LEFT JOIN Room t1 ON t1.Price < t.Price
WHERE t1.Id IS NULL
```
This assumes your table has an Id column - if it doesn't you can just use `WHERE t1.Price IS NULL` on the last line.
It returns all records for which no lower price exists. |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want all records that have the minimum price over the whole table, one cross-database solution is to filter with a correlated subquery:
```
select r.*
from room r
where r.price = (select min(r1.price) from room r1)
```
Depending on your database, better solutions might be available. Typically, SQL Server has ... | ```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;
```
this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want all records that have the minimum price over the whole table, one cross-database solution is to filter with a correlated subquery:
```
select r.*
from room r
where r.price = (select min(r1.price) from room r1)
```
Depending on your database, better solutions might be available. Typically, SQL Server has ... | If you want the rooms with the minimum price for each `hotel_no` then use `NOT EXISTS` like this:
```
select r.* from room r
where not exists (
select 1 from room
where hotel_no = r.hotel_no and price < r.price
)
```
If you want just the rooms with the minimum price:
```
select r.* from room r
where not exists... |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want all records that have the minimum price over the whole table, one cross-database solution is to filter with a correlated subquery:
```
select r.*
from room r
where r.price = (select min(r1.price) from room r1)
```
Depending on your database, better solutions might be available. Typically, SQL Server has ... | Alternatively you can try
SELECT \*
FROM room
WHERE price = ( SELECT MIN(price) FROM room ) |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want all records that have the minimum price over the whole table, one cross-database solution is to filter with a correlated subquery:
```
select r.*
from room r
where r.price = (select min(r1.price) from room r1)
```
Depending on your database, better solutions might be available. Typically, SQL Server has ... | The earlier answer i gave works in MSSQL, below will work in MYSQL
SELECT \* FROM `room` WHERE price=( SELECT MIN(price) FROM room ) |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | ```
SELECT t.*
FROM Room t
LEFT JOIN Room t1 ON t1.Price < t.Price
WHERE t1.Id IS NULL
```
This assumes your table has an Id column - if it doesn't you can just use `WHERE t1.Price IS NULL` on the last line.
It returns all records for which no lower price exists. | ```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;
```
this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | If you want the rooms with the minimum price for each `hotel_no` then use `NOT EXISTS` like this:
```
select r.* from room r
where not exists (
select 1 from room
where hotel_no = r.hotel_no and price < r.price
)
```
If you want just the rooms with the minimum price:
```
select r.* from room r
where not exists... | ```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;
```
this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | Alternatively you can try
SELECT \*
FROM room
WHERE price = ( SELECT MIN(price) FROM room ) | ```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;
```
this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc |
59,804,696 | I am practicing SQL queries using a hotel booking database in MYSQL.
There are 4 tables which are Guest, room, hotel and booking in the database.
I want to write a SQL query to retrieve details of hotel rooms which are having the lowest price. There are more than one record with the minimum price and the task is to ret... | 2020/01/18 | [
"https://Stackoverflow.com/questions/59804696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11829635/"
] | The earlier answer i gave works in MSSQL, below will work in MYSQL
SELECT \* FROM `room` WHERE price=( SELECT MIN(price) FROM room ) | ```
SELECT TOP 1 hotel.hotelnos, hotel.roomnos, hotel.roomtype, hotel.price
FROM hotel
ORDER BY hotel.price;
```
this might vary depending on the type of SQL, e.g Mysql,MSSQL,etc |
49,734,618 | I tried to upload my code to an Arduino Leonardo through theArduino IDE, but:
```
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butt... | 2018/04/09 | [
"https://Stackoverflow.com/questions/49734618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9582200/"
] | There are some tips:
--------------------
* This is very often error message when you using damaged cable to upload your code. Try it with another cable.
* If you are using *AVRISP mkII* try to switch to *USBasp*
* Check if you have current version of Arduino IDE.
* Check your circuit. It could effect the communicatio... | I had the same problem and it seems it was because the global variables were taking up too much memory space.
I managed the upload through the following actions:
1. Reduce sketch size (<60% dynamic memory is ok)
2. Connect the USB cable just before the upload starts.
Doing this, the problem went away.
(I am using a Leo... |
46,046,594 | There's an interesting [trending question](https://stackoverflow.com/questions/46043445/how-to-append-group-row-into-dataframe) in [r](/questions/tagged/r "show questions tagged 'r'"), it goes like this:
>
> I have this df1:
>
>
>
> ```
> A B C
> 1 2 3
> 5 7 9
>
> ```
>
> where `A B C` are columns names.
>
>
>... | 2017/09/05 | [
"https://Stackoverflow.com/questions/46046594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4909087/"
] | Per Ken-White's comment, you need to attach onto the SelectionChanged event
```
{
rtb.SelectionChanged += SelectionChangedEventHandler;
}
void SelectionChangedEventHandler(object sender, EventArgs ev)
{
RichTextBox rb = sender as RichTextBox;
Console.WriteLine(rb.SelectedText);
}
``` | Ryan's answer is correct. But you can do this with the designer as well.
* Select your RichTextBox
* Bring up Properties (F4 is the default)
* Click the [Events] button (green in image below)
* Double-click "SelectionChanged" (red in image below)
[](... |
2,476,499 | I've got a project running and we're using SVN as the version control. There are 3 devs on it.
Dev1 = OSX + Textmate
Dev2 = Windows 7 + Dreamweaver (plus tortoise svn)
Dev3 = OSX + Coda
**Case 1 (expected):**
Dev1 and dev3 work on a file called signup.php. They work on different parts of the file. Dev1 com... | 2010/03/19 | [
"https://Stackoverflow.com/questions/2476499",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/75613/"
] | You can work in work in source mode to configure the ObjectDataSource by I find it easier to use the smart tag from the control in design mode. If your data access dll is part of the project then you will be able to select it from the Choose A Business Object page of the Configure Data Source wizard(1st screen of the w... | for class use [DataObject] attribute. this should help you.
in tag refer class using TypeName.
```
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod=" ?????????? " TypeName="class with complete namespace">
</asp:ObjectDataSource>
``` |
2,476,499 | I've got a project running and we're using SVN as the version control. There are 3 devs on it.
Dev1 = OSX + Textmate
Dev2 = Windows 7 + Dreamweaver (plus tortoise svn)
Dev3 = OSX + Coda
**Case 1 (expected):**
Dev1 and dev3 work on a file called signup.php. They work on different parts of the file. Dev1 com... | 2010/03/19 | [
"https://Stackoverflow.com/questions/2476499",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/75613/"
] | You can work in work in source mode to configure the ObjectDataSource by I find it easier to use the smart tag from the control in design mode. If your data access dll is part of the project then you will be able to select it from the Choose A Business Object page of the Configure Data Source wizard(1st screen of the w... | Clarify your question please.
It is possible to use an ObjectDataSource from Select/Delete/etc. methods out of a dll.
Try to use the wizard of the ObjectDataSource to set the context property of the ODS. |
20,777,603 | I am getting the following error message:
```
[__NSCFString tableView:heightForHeaderInSection:]unrecognized selector sent to instance 0xdc7e610]
```
It happens after:
-Clicking a button that pushes to view2 where I have 5 text boxes. When you click in a box the keyboard pushes the view up so you can see what you'r... | 2013/12/25 | [
"https://Stackoverflow.com/questions/20777603",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1856829/"
] | Sounds like you have a zombie somewhere (an object that gets released while it's still in use. That can happen because a table view's delegate property is a weak link to the view controller.
If I had to guess I would guess that your view controller is being released, but your table view is not.
Run with the zombies ... | In this case adding the view as a subview has retained it, when you remove view controller, you still have a reference to the table view. but the view controller has been dealloc'd which is why the datasource (which is the view controller for UITableViewController) method is being sent to a deallocated instance.
I ha... |
61,593,044 | I´m new to Python and I´m having a problem. I have 2 lists containing the names of the columns of a dataset: one has all the columns names (columnas = total.columns.values.tolist()); and the other one has a subset of them ( in the form of "c = [a,b,c,d,c,e,...]".
I would like to know how could I check if each element ... | 2020/05/04 | [
"https://Stackoverflow.com/questions/61593044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13400164/"
] | Running your NodeJS as a Docker container in Elastic Beanstalk will definitely give you more control over your application.
However, it depends how much time you want to invest. Their maybe slightly more time in deploying with Docker, especially if you haven't used it before. | >
> In which situations is it more recomendable to use docker over a
> normal nodejs service? (Giving the fact that I will use Elastic
> beanstalk)
>
>
>
First, if you really interested to run docker container in AWS, then [ECS](https://aws.amazon.com/ecs/) is what you need to run your application, lot of reason... |
12,982,896 | A very unexpected behavior of the useful `data.frame` in R arises from keeping `character` columns as factor. This causes many problems if it is not considered. For example suppose the following code:
```
foo=data.frame(name=c("c","a"),value=1:2)
# name val
# 1 c 1
# 2 a 2
bar=matrix(1:6,nrow=3)
rownames(... | 2012/10/19 | [
"https://Stackoverflow.com/questions/12982896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1657511/"
] | This is a feature and R is working as documented. This can be dealt with generally in a few ways:
1. use the argument `stringsAsFactors = TRUE` in the call to `data.frame()`. See `?data.frame`
2. if you detest this behaviour so, set the option globally via
```
options(stringsAsFactors = FALSE)
```
3. (as noted by @J... | In the example data below, author and title are automatically converted to factor (unless you add the argument `stringsAsFactors = FALSE` when you are creating the data). What if we forgot to change the default setting and don't want to set the options globally?
Some code I found somewhere (most likely SO) uses `sappl... |
8,786 | Here is a question that has been bothering me for a while. Do right-handed fighter pilots use their right hand to hold the control stick? **And do left-handed fighter pilots use their left hand?**
Or is it the other way around? Or do they maybe use both hands a lot of the time? It also brings up the question as to wha... | 2014/09/27 | [
"https://aviation.stackexchange.com/questions/8786",
"https://aviation.stackexchange.com",
"https://aviation.stackexchange.com/users/3674/"
] | Most fighter pilots, regardless of their handedness, use their right hand to fly the stick, and their left hand to move the throttle(s)/PCL (Power Control Lever). This is just how most fighter cockpits are set up, with the power on the left side.

Th... | I am an ex-military pilot and retired airline pilot who is still an active pilot in general aviation. The simple answer is that single seat and tandem seat cockpits are set up with the throttle and trim on the left, so that the stick has to be handled with the right hand.
With a few exceptions side by side cockpits ha... |
8,786 | Here is a question that has been bothering me for a while. Do right-handed fighter pilots use their right hand to hold the control stick? **And do left-handed fighter pilots use their left hand?**
Or is it the other way around? Or do they maybe use both hands a lot of the time? It also brings up the question as to wha... | 2014/09/27 | [
"https://aviation.stackexchange.com/questions/8786",
"https://aviation.stackexchange.com",
"https://aviation.stackexchange.com/users/3674/"
] | Most fighter pilots, regardless of their handedness, use their right hand to fly the stick, and their left hand to move the throttle(s)/PCL (Power Control Lever). This is just how most fighter cockpits are set up, with the power on the left side.

Th... | Its not just fighter planes that have the stick in the right and power in the left. That's the way tandem (front-and-back seating) aircraft are set up in general. You can see the throttle on the left-hand wall in this Citabria:
[](https://i.stack.imgu... |
8,786 | Here is a question that has been bothering me for a while. Do right-handed fighter pilots use their right hand to hold the control stick? **And do left-handed fighter pilots use their left hand?**
Or is it the other way around? Or do they maybe use both hands a lot of the time? It also brings up the question as to wha... | 2014/09/27 | [
"https://aviation.stackexchange.com/questions/8786",
"https://aviation.stackexchange.com",
"https://aviation.stackexchange.com/users/3674/"
] | I am an ex-military pilot and retired airline pilot who is still an active pilot in general aviation. The simple answer is that single seat and tandem seat cockpits are set up with the throttle and trim on the left, so that the stick has to be handled with the right hand.
With a few exceptions side by side cockpits ha... | Its not just fighter planes that have the stick in the right and power in the left. That's the way tandem (front-and-back seating) aircraft are set up in general. You can see the throttle on the left-hand wall in this Citabria:
[](https://i.stack.imgu... |
36,190,433 | i'm trying to create RecycleView in my activity, but the app crashes at launch and the log says
```
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object referenc... | 2016/03/23 | [
"https://Stackoverflow.com/questions/36190433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6106901/"
] | I'd use transitions, they are widely supported now. This is based on the code you've provided:
```
.icon div:hover {
opacity: .5;
transition: opacity .5s ease-out;
-moz-transition: opacity .5s ease-out;
-webkit-transition: opacity .5s ease-out;
-o-transition: opacity .5s ease-out;
}
``` | this should do the trick, use opacity and transition <https://jsfiddle.net/d98sv4cy/1/>
```
.icon:hover {
opacity: .33;
transition-property: opacity;
transition-duration: .2s;
transition-timing-function: ease-in-out;
}
``` |
36,190,433 | i'm trying to create RecycleView in my activity, but the app crashes at launch and the log says
```
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object referenc... | 2016/03/23 | [
"https://Stackoverflow.com/questions/36190433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6106901/"
] | I'd use transitions, they are widely supported now. This is based on the code you've provided:
```
.icon div:hover {
opacity: .5;
transition: opacity .5s ease-out;
-moz-transition: opacity .5s ease-out;
-webkit-transition: opacity .5s ease-out;
-o-transition: opacity .5s ease-out;
}
``` | Is [CSS blend modes](https://css-tricks.com/basics-css-blend-modes/) something you'd consider? |
36,190,433 | i'm trying to create RecycleView in my activity, but the app crashes at launch and the log says
```
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object referenc... | 2016/03/23 | [
"https://Stackoverflow.com/questions/36190433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6106901/"
] | this should do the trick, use opacity and transition <https://jsfiddle.net/d98sv4cy/1/>
```
.icon:hover {
opacity: .33;
transition-property: opacity;
transition-duration: .2s;
transition-timing-function: ease-in-out;
}
``` | Is [CSS blend modes](https://css-tricks.com/basics-css-blend-modes/) something you'd consider? |
57,076,669 | I am trying to clear out the grids so that I can use the plot alone in a different process. I am trying to solve it using opencv. I have both actual and inverted image. I am not expert in python. Any help could be great.
Thanks in advance
Actual image
[ by first and second level of `MultiIndex`:
```
s = df.groupby(level=[0,1])['value2'].first()
print (s)
File no
A 0 34
1 38
B 0 35
C 0 32
Name: value2, dtype: int64
... | For the sake of completeness, I would like to add another method (which I would not have found without the answere by jezrael).
```
s = df.groupby(level=[0,1])['value2'].nth(0)
```
This can be generalized to finding any, not merely the first entry
```
t = df.groupby(level=[0,1])['value1'].nth(1)
```
Note that the... |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | That is pretty easy to do with sed and you not even need to use the hold space (the sed auxiliary buffer). Given the `input` file below:
```
$ cat input
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
you should use this command:
```
sed 's/@"\([^.]*\)\.png",/&\
@"\1",/' input
```
... | You don't have to get tricky with regular expressions and replacement strings: use sed's `p` command to print the line intact, then modify the line and let it print implicitly
```
sed 'p; s/\.png//'
``` |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | That is pretty easy to do with sed and you not even need to use the hold space (the sed auxiliary buffer). Given the `input` file below:
```
$ cat input
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
you should use this command:
```
sed 's/@"\([^.]*\)\.png",/&\
@"\1",/' input
```
... | Glenn jackman's response is OK, but it also doubles the rows which do not match the expression.
This one, instead, doubles only the rows which matched the expression:
```
sed -n 'p; s/\.png//p'
```
Here, -n stands for "print nothing unless explicitely printed", and the p in `s/\.png//p` forces the print if substitu... |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | That is pretty easy to do with sed and you not even need to use the hold space (the sed auxiliary buffer). Given the `input` file below:
```
$ cat input
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
you should use this command:
```
sed 's/@"\([^.]*\)\.png",/&\
@"\1",/' input
```
... | I prefer this over Carles Sala and Glenn Jackman's:
```
sed '/.png/p;s/.png//'
```
Could just say it's personal preference. |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | That is pretty easy to do with sed and you not even need to use the hold space (the sed auxiliary buffer). Given the `input` file below:
```
$ cat input
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
you should use this command:
```
sed 's/@"\([^.]*\)\.png",/&\
@"\1",/' input
```
... | or one can combine both versions and apply the duplication only on lines matching the required pattern
```
sed -e '/^@".*\.png",/{p;s/\.png//;}' input
``` |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | You don't have to get tricky with regular expressions and replacement strings: use sed's `p` command to print the line intact, then modify the line and let it print implicitly
```
sed 'p; s/\.png//'
``` | I prefer this over Carles Sala and Glenn Jackman's:
```
sed '/.png/p;s/.png//'
```
Could just say it's personal preference. |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | You don't have to get tricky with regular expressions and replacement strings: use sed's `p` command to print the line intact, then modify the line and let it print implicitly
```
sed 'p; s/\.png//'
``` | or one can combine both versions and apply the duplication only on lines matching the required pattern
```
sed -e '/^@".*\.png",/{p;s/\.png//;}' input
``` |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | Glenn jackman's response is OK, but it also doubles the rows which do not match the expression.
This one, instead, doubles only the rows which matched the expression:
```
sed -n 'p; s/\.png//p'
```
Here, -n stands for "print nothing unless explicitely printed", and the p in `s/\.png//p` forces the print if substitu... | I prefer this over Carles Sala and Glenn Jackman's:
```
sed '/.png/p;s/.png//'
```
Could just say it's personal preference. |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | Glenn jackman's response is OK, but it also doubles the rows which do not match the expression.
This one, instead, doubles only the rows which matched the expression:
```
sed -n 'p; s/\.png//p'
```
Here, -n stands for "print nothing unless explicitely printed", and the p in `s/\.png//p` forces the print if substitu... | or one can combine both versions and apply the duplication only on lines matching the required pattern
```
sed -e '/^@".*\.png",/{p;s/\.png//;}' input
``` |
7,369,047 | I have a file that looks like this:
```
@"Afghanistan.png",
@"Albania.png",
@"Algeria.png",
@"American_Samoa.png",
```
I want it to look like this
```
@"Afghanistan.png",
@"Afghanistan",
@"Albania.png",
@"Albania",
@"Algeria.png",
@"Algeria",
@"American_Samoa.png",
@"American_Samoa",
```
I thought I could use sed... | 2011/09/10 | [
"https://Stackoverflow.com/questions/7369047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/901588/"
] | I prefer this over Carles Sala and Glenn Jackman's:
```
sed '/.png/p;s/.png//'
```
Could just say it's personal preference. | or one can combine both versions and apply the duplication only on lines matching the required pattern
```
sed -e '/^@".*\.png",/{p;s/\.png//;}' input
``` |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | [PostRemoteLog](http://www.oriontransfer.co.nz/projects/admin-toolbox/post-remote-log/index) (free)
---------------------------------------------------------------------------------------------------
PostRemoteLog has Growl notifications support and it is free. | OS X has a Tail utility built right in.
Open a Terminal window, and the format would be
`tail -f filename.log`
The -f option would make sure to keep displaying new entries to the file as it's written to.
Of course, this is the basic Unix tail utility, so there aren't coloring options and the like... however you ca... |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | Only for the sake of completeness it shall be said, that there is a tool for Mac OS X with highlighting on keywords and some other features.
It's called [Logtastic](http://www.logtastic.net)
I know, this is an old post, but maybe someone finds this useful?! :) | OS X has a Tail utility built right in.
Open a Terminal window, and the format would be
`tail -f filename.log`
The -f option would make sure to keep displaying new entries to the file as it's written to.
Of course, this is the basic Unix tail utility, so there aren't coloring options and the like... however you ca... |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | I found a tool that can do this [GeekTool](http://projects.tynsoe.org/en/geektool/), it even has a version that works on Lion (see the forum).
It can be used to do just simple tails, without filtering or other stuff, so maybe someone has a better alternative. | [PostRemoteLog](http://www.oriontransfer.co.nz/projects/admin-toolbox/post-remote-log/index) (free)
---------------------------------------------------------------------------------------------------
PostRemoteLog has Growl notifications support and it is free. |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | You may try to use a combination of `multitail` and `ssh`.
* <https://serverfault.com/questions/53976/use-local-tools-to-monitor-remote-logs>
* <https://superuser.com/questions/320575/mac-os-x-logfile-viewer> | Might I suggest the [LogTail macOS app](https://itunes.apple.com/us/app/logtail/id1073404370?ls=1&mt=12) - it checks all the requirements you mentioned (except the notifications part). It has SSH based remote log viewing functionality and can tail the remote log file (configurable polling interval). You can setup multi... |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | You may try to use a combination of `multitail` and `ssh`.
* <https://serverfault.com/questions/53976/use-local-tools-to-monitor-remote-logs>
* <https://superuser.com/questions/320575/mac-os-x-logfile-viewer> | I found a tool that can do this [GeekTool](http://projects.tynsoe.org/en/geektool/), it even has a version that works on Lion (see the forum).
It can be used to do just simple tails, without filtering or other stuff, so maybe someone has a better alternative. |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | I found a tool that can do this [GeekTool](http://projects.tynsoe.org/en/geektool/), it even has a version that works on Lion (see the forum).
It can be used to do just simple tails, without filtering or other stuff, so maybe someone has a better alternative. | Might I suggest the [LogTail macOS app](https://itunes.apple.com/us/app/logtail/id1073404370?ls=1&mt=12) - it checks all the requirements you mentioned (except the notifications part). It has SSH based remote log viewing functionality and can tail the remote log file (configurable polling interval). You can setup multi... |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | Only for the sake of completeness it shall be said, that there is a tool for Mac OS X with highlighting on keywords and some other features.
It's called [Logtastic](http://www.logtastic.net)
I know, this is an old post, but maybe someone finds this useful?! :) | I was looking for something similar a few months back and discovered and excellent Linux appliance distribution called Security Onion: <https://security-onion-solutions.github.io/security-onion/>
I pretty much ignore the IDS and packet capturing (for now) and just use it for log analysis. It was pretty simple to set ... |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | You may try to use a combination of `multitail` and `ssh`.
* <https://serverfault.com/questions/53976/use-local-tools-to-monitor-remote-logs>
* <https://superuser.com/questions/320575/mac-os-x-logfile-viewer> | While I haven't used it myself yet, I recently discovered [Log.io](http://logio.org/). It appears to meet all your criteria. |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | I found a tool that can do this [GeekTool](http://projects.tynsoe.org/en/geektool/), it even has a version that works on Lion (see the forum).
It can be used to do just simple tails, without filtering or other stuff, so maybe someone has a better alternative. | While I haven't used it myself yet, I recently discovered [Log.io](http://logio.org/). It appears to meet all your criteria. |
16,778 | I am looking for a visual tail tool that can monitor several local or remote log files.
Optional features that interest me: color highlight based on log error level, coloring for special words, filtering of messages and/or notifications on new activity. | 2011/06/30 | [
"https://apple.stackexchange.com/questions/16778",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/1916/"
] | [PostRemoteLog](http://www.oriontransfer.co.nz/projects/admin-toolbox/post-remote-log/index) (free)
---------------------------------------------------------------------------------------------------
PostRemoteLog has Growl notifications support and it is free. | I was looking for something similar a few months back and discovered and excellent Linux appliance distribution called Security Onion: <https://security-onion-solutions.github.io/security-onion/>
I pretty much ignore the IDS and packet capturing (for now) and just use it for log analysis. It was pretty simple to set ... |
48,636,234 | For fust build project I use such command
```
gradle clean build -x checkstyleMain -x checkstyleTest -x findbugsMain -x findbugsTest -x test
```
How I can create short task for this?
Something like this
```
task short {
clean
// build-x checkstyleMain -x checkstyleTest -x findbugsMain -x findbugsTest -x test
}
... | 2018/02/06 | [
"https://Stackoverflow.com/questions/48636234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1460643/"
] | Unfortunately, usual [ways of skipping tasks](https://docs.gradle.org/current/userguide/more_about_tasks.html?_ga=2.186246569.1463708433.1517899817-467902555.1516197029#sec:skipping_tasks) won't work in your case just out of the box.
But you can use a [`TaskGraph`](https://docs.gradle.org/current/javadoc/org/gradle/ap... | You can add the following codes to skip the tasks,
```
gradle.startParameter.excludedTaskNames += "testClasses"
gradle.startParameter.excludedTaskNames += "test"
``` |
48,636,234 | For fust build project I use such command
```
gradle clean build -x checkstyleMain -x checkstyleTest -x findbugsMain -x findbugsTest -x test
```
How I can create short task for this?
Something like this
```
task short {
clean
// build-x checkstyleMain -x checkstyleTest -x findbugsMain -x findbugsTest -x test
}
... | 2018/02/06 | [
"https://Stackoverflow.com/questions/48636234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1460643/"
] | Gradle is not lifecycle based the way Maven is. Instead of asking for a task that includes all these other tasks you do not want to do, you are better off finding a task that does what you want *without* including all these others.
For example, assuming you are using the `java` plugin:
1. `assemble`: will create all ... | You can add the following codes to skip the tasks,
```
gradle.startParameter.excludedTaskNames += "testClasses"
gradle.startParameter.excludedTaskNames += "test"
``` |
21,483,193 | I'm trying to use an ArrayBlockingQueue but I cant seem to get the syntax right and I dont know what exactly I'm supposed to import to use it. I tried this:
```
BlockingQueue<int> Queue = new ArrayBlockingQueue<int>(100);
```
for the declaration but it says that there is an error with int "Dimensions expected after ... | 2014/01/31 | [
"https://Stackoverflow.com/questions/21483193",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824448/"
] | ```
BlockingQueue<int>
```
Java Generics do not cover primitive types. You'll have to use `Integer` instances.
This is an artifact of the *type erasure* approach taken by Java. You cannot erase an `int` to an `Object` and the actual bytecode needed to work with an `int` is entirely different. That would only be poss... | You can't use atomic types as as the element it needs to be an object, try Integer.
```
BlockingQueue<Integer> Queue = new ArrayBlockingQueue<Integer>();
``` |
57,070,419 | I have to create one service that will log any run-time error occurred in the application.
I have created a service named "ErrorHandlingService" and below given code is written
```
import { ErrorHandler } from '@angular/core';
export class ErrorhandlingService implements ErrorHandler {
handleError(error: any):... | 2019/07/17 | [
"https://Stackoverflow.com/questions/57070419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11757593/"
] | **this** in the function given to setInterval doesn't point to the class when it is called.
Use arrow function instead.
```js
setInterval(() => { this.getData(); }, 10000);
``` | You have used `this.getData`, it should be `this.getData()`
and you have to use an arrow function.
Try this:
```
setInterval(() => this.getData(), 10000);
``` |
57,070,419 | I have to create one service that will log any run-time error occurred in the application.
I have created a service named "ErrorHandlingService" and below given code is written
```
import { ErrorHandler } from '@angular/core';
export class ErrorhandlingService implements ErrorHandler {
handleError(error: any):... | 2019/07/17 | [
"https://Stackoverflow.com/questions/57070419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11757593/"
] | **this** in the function given to setInterval doesn't point to the class when it is called.
Use arrow function instead.
```js
setInterval(() => { this.getData(); }, 10000);
``` | Use of arrow function is a great response but you should be careful when using `setInterval`.
You should definitely prefer usage of RxJS in an Angular application context :
```
interval(10000).pipe(
mergeMap(() => this.getData())
).subscribe()
```
Bad practices usage of setInterval : <https://dev.to/akanksha_95... |
57,070,419 | I have to create one service that will log any run-time error occurred in the application.
I have created a service named "ErrorHandlingService" and below given code is written
```
import { ErrorHandler } from '@angular/core';
export class ErrorhandlingService implements ErrorHandler {
handleError(error: any):... | 2019/07/17 | [
"https://Stackoverflow.com/questions/57070419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11757593/"
] | You have used `this.getData`, it should be `this.getData()`
and you have to use an arrow function.
Try this:
```
setInterval(() => this.getData(), 10000);
``` | Use of arrow function is a great response but you should be careful when using `setInterval`.
You should definitely prefer usage of RxJS in an Angular application context :
```
interval(10000).pipe(
mergeMap(() => this.getData())
).subscribe()
```
Bad practices usage of setInterval : <https://dev.to/akanksha_95... |
10,828,212 | I have a situation where i need element id of div where action happened.
e.g i have list of dynamically generated answers, within answers there are comments. when i click on remove comment, i need to fetch id of answer, i can fetch id of comment. more detail via code.
e.g there is a core div which is generated dynam... | 2012/05/31 | [
"https://Stackoverflow.com/questions/10828212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1058171/"
] | [Here is the answer](http://sites.google.com/site/iprinceps/Home/embedded-system-and-operating-systems/linux/scripts-kconfig-mconf-c-of-linux-2-6-8-rc3-seems-to-have-a-bug)
just get rid of 'static' keyword from 'static struct menu \*current\_ment' line in scripts/kconfig/mconf.c | ‘current\_menu’ is declared static in mconf.c:91 but not in lkc.h:63, this may not be accepted by gcc of current version,gcc-2.95.3 is recommended according to README in 2.6.0 source,so try to downgrade your gcc version if you REALLY want to compile 2.6.0. |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | The layout\_align **[Top|Bottom|Left|Right]** attribute in RelativeLayout is used to align views based on their respective x and y values within the margin. The second ImageView will now be aligned to the top, bottom, left, and right of the first ImageView based on the margins. Padding is ignored in the alignment.
``... |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | Your code is perfect but either you have to remove `android:elevation` from `button_menu` or you have to add `android:elevation` in `warning_circle`.
I have updated my answer based on [@MikeM.](https://stackoverflow.com/users/2850651/mike-m) suggestion for use `RelativeLayout` instead of `ConstraintLayout`
**Solutio... |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | You can use FrameLayout to achieve this.. here is an example, you can modify this according to your need. In warning icon image view add gravity as bottom|end and in menu icon image view add margin of 10dp when using FrameLayout.
```
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap... |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | ```
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp">
<ImageView
android:layout_centerInParent="true"
android:id="@+id/warning_circle"
android:layout_width="wrap_cont... |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | ```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:sca... |
58,947,022 | My company is contemplating a move from SVN to TFS and are evaluating both Team Foundation Version Control and GIT. While Git offers excellent branching and merging functionality, an extreme cause of concern is the local cloning of the repository on a developer's machine. Source code security is paramount to company's ... | 2019/11/20 | [
"https://Stackoverflow.com/questions/58947022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975784/"
] | ```
<RelativeLayout
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<ImageView
... | You could try to search any ready-to-use solutions for badges like [ImageBadgeView](https://androidexample365.com/add-badge-with-counter-to-imageview-android/).
Or try to play with [BadgeDrawable](https://material.io/develop/android/components/badging/) from material lib.
I'd prefer to use `ViewOverlay` for such purp... |
41,629,975 | I got a coin flip CSS animation from `[https://www.html5andbeyond.com/coin-flip-application-html-css-and-jquery][1]` but its not working on my page. I tried to confirm by checking on fiddle but its not working there also. However, its working on the provider's website. Here is the fiddle link I created to check. [`http... | 2017/01/13 | [
"https://Stackoverflow.com/questions/41629975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The JavaScript code here relies on the jQuery library, so you need to include that as an external resource.
In jsFiddle, this can be achieved like this:
[](https://i.stack.imgur.com/ouPS4.png)
In your regular page, you'll want to either bundle jQuery with your HTML pag... | Jquery library is missing.
Insert below line in your code
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js">
```
<https://jsfiddle.net/aq0kw4Lq/> |
18,800,896 | I'm launching a product today and COMPLETELY OUT OF NOWHERE hotmail accounts can't receive email from my php mail() script.
I've searched around and found others with similar problems but haven't found a true solution
```
$Email = "my@email.com";
$Name = "My name";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .=... | 2013/09/14 | [
"https://Stackoverflow.com/questions/18800896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1027664/"
] | You need to setup playback rate to 1.0f even if documentation says it's 1.0 by default.
```
NSDictionary *mediaInfo = @{
MPMediaItemPropertyTitle: audio.title,
MPMediaItemPropertyArtist: audio.artist,
MPMediaItemPropertyPlaybackDuration: audio.duration,
MPNowPlayingInfoPropertyPlaybackRate: @(1.0)
};
... | They're all documented in the reference for [`MPNowPlayingInfoCenter`](https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPNowPlayingInfoCenter_Class/Reference/Reference.html). The currently playing properties are optional values that may or may not be set. The link to that is in the sentence ... |
18,800,896 | I'm launching a product today and COMPLETELY OUT OF NOWHERE hotmail accounts can't receive email from my php mail() script.
I've searched around and found others with similar problems but haven't found a true solution
```
$Email = "my@email.com";
$Name = "My name";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .=... | 2013/09/14 | [
"https://Stackoverflow.com/questions/18800896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1027664/"
] | They're all documented in the reference for [`MPNowPlayingInfoCenter`](https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPNowPlayingInfoCenter_Class/Reference/Reference.html). The currently playing properties are optional values that may or may not be set. The link to that is in the sentence ... | Just be warned: Apple's document never made this clear -- If you use MPMusicPlayerController, your music is played under the hood by the "music" app and you do NOT have any control of nowPlayingInfoCenter. And you will NOT receive remote control events generated by the user actions (such as play/pause) applied to the l... |
18,800,896 | I'm launching a product today and COMPLETELY OUT OF NOWHERE hotmail accounts can't receive email from my php mail() script.
I've searched around and found others with similar problems but haven't found a true solution
```
$Email = "my@email.com";
$Name = "My name";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .=... | 2013/09/14 | [
"https://Stackoverflow.com/questions/18800896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1027664/"
] | You need to setup playback rate to 1.0f even if documentation says it's 1.0 by default.
```
NSDictionary *mediaInfo = @{
MPMediaItemPropertyTitle: audio.title,
MPMediaItemPropertyArtist: audio.artist,
MPMediaItemPropertyPlaybackDuration: audio.duration,
MPNowPlayingInfoPropertyPlaybackRate: @(1.0)
};
... | Just be warned: Apple's document never made this clear -- If you use MPMusicPlayerController, your music is played under the hood by the "music" app and you do NOT have any control of nowPlayingInfoCenter. And you will NOT receive remote control events generated by the user actions (such as play/pause) applied to the l... |
25,436,734 | Domain Fields:
```
startDate: Date
length: Integer
perpetuity: Boolean
expiryDate: Transient (startDate + length (in years))
```
Domain methods - These methods are used for filtering on a big filter form for a user to search for the 4 different expiration status'.
```
Date getExpiryDate() {
if (this.startDate =... | 2014/08/21 | [
"https://Stackoverflow.com/questions/25436734",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1792663/"
] | I solved the problem by just making the expiration status and date in a view and linked it to the domain object. Works great! | You can not query against a transient property. Transient properties by definition are not present in your datasource and therefore can not be a part of the query executed by the datasource.
In order to accomplish what you are looking to do using a transient property you will need to create your own list of results wi... |
1,179,965 | I've recently bought BT Sony headset. When I switch it to A2DP profile everything works fine. But when I switch to HSP/HFP for videoconference the sound is so terrible that I cannot understand other participants. Is there anything that can be done about that? It's really annoying I cannot use my headset for conferences... | 2019/10/10 | [
"https://askubuntu.com/questions/1179965",
"https://askubuntu.com",
"https://askubuntu.com/users/411740/"
] | I have this problem for 6 months, when I bought my Sennheisers.
It seems the headset profile (HSP/HFP) defines at least 2 codecs, with 8KHz and 16KHz rates. Windows and Android can use 16KHz, whereas linux only uses 8KHz (and I assume a different compression, since lows are also terrible).
Searching on Google, all "low... | I am having the same issue, at this point i have worked around it so that after conference i can at lease switch to a2dp\_sink easily.
```
#!/bin/bash
bluetoothctl connect FC:58:FA:13:75:6F
DEFAULT_SINK=$(pactl list short sinks | grep "pci" | awk '{print $2}')
echo "Muting $DEFAULT_SINK"
pactl set-sink-mute "$DEFAULT_... |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | ```
print_r($_COOKIE)
``` | No, you can't. php can only locate cookies created from it self host. This security is from browser side. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | ```
print_r($_COOKIE)
``` | No, cookies are domain specific. You could get more protection against cookie hijacking by configuring your cookies as HttpOnly, supported in PHP since 5.2.0. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | ```
print_r($_COOKIE)
``` | Yes, you can get all the cookies that you have set by:
```
foreach($_COOKIE as $key => $value)
{
echo $key . " => " . $value;
}
```
Hope this helps! |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | ```
print_r($_COOKIE)
``` | Not from server side but a great tool for showing all cookies from the client side is [MAXA Cookie Manager:](http://www.naxa-tools.com/cookie.php). It shows advanced and browser independent cookies, too. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | No, you can't. php can only locate cookies created from it self host. This security is from browser side. | No, cookies are domain specific. You could get more protection against cookie hijacking by configuring your cookies as HttpOnly, supported in PHP since 5.2.0. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | No, you can't. php can only locate cookies created from it self host. This security is from browser side. | Not from server side but a great tool for showing all cookies from the client side is [MAXA Cookie Manager:](http://www.naxa-tools.com/cookie.php). It shows advanced and browser independent cookies, too. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | Yes, you can get all the cookies that you have set by:
```
foreach($_COOKIE as $key => $value)
{
echo $key . " => " . $value;
}
```
Hope this helps! | No, cookies are domain specific. You could get more protection against cookie hijacking by configuring your cookies as HttpOnly, supported in PHP since 5.2.0. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | No, cookies are domain specific. You could get more protection against cookie hijacking by configuring your cookies as HttpOnly, supported in PHP since 5.2.0. | Not from server side but a great tool for showing all cookies from the client side is [MAXA Cookie Manager:](http://www.naxa-tools.com/cookie.php). It shows advanced and browser independent cookies, too. |
1,127,358 | I guys.
Have worked around with cookies in PHP for some time. However something came to my mind.
Does its possible to gather all cookies (without knowing its names), or at least list all cookies names present in a browser?
Regards. | 2009/07/14 | [
"https://Stackoverflow.com/questions/1127358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114298/"
] | Yes, you can get all the cookies that you have set by:
```
foreach($_COOKIE as $key => $value)
{
echo $key . " => " . $value;
}
```
Hope this helps! | Not from server side but a great tool for showing all cookies from the client side is [MAXA Cookie Manager:](http://www.naxa-tools.com/cookie.php). It shows advanced and browser independent cookies, too. |
170,815 | After counting the number of conjugates of $h=(1 2 \ldots n-2)$ I get $n(n-1)(n-3)!$ which when plugged in to the orbit stabilizer theorem gives the centralizer to have order $n-2$ but this would show the opposite of what is asked?
Is it mine or the books mistake?
Never mind. Think I should have divided number of c... | 2012/07/14 | [
"https://math.stackexchange.com/questions/170815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/34854/"
] | If all you want is to show that the centralizer of $h=(1\ 2\ \dots\ n-2)$ in $S\_n$ is not the subgroup of $S\_n$ generated by $h$, then you are working much too hard if you try to count conjugates and use theorems. All you need to do is find *one element* of $S\_n$ which commutes with $h$ but is not a power of $h$, an... | **Hint.** Disjoint permutations commute. Can you find a nontrivial permutation in $S\_n$ that is disjoint from $h$? |
1,302,276 | Is it possible to run some javascript code (having perhaps an `NSString` as input) without using a `UIWebView`? I would like to run this code in a separate thread so UIWebView is not possible and I don't really want to render anything, just get back the results. | 2009/08/19 | [
"https://Stackoverflow.com/questions/1302276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/130444/"
] | I have not tried this, but here is one idea:
Write code to allocate an empty `UIWebView` but doesn't add it as a subview anywhere, and just directly call [`- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script`](http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/R... | I think Parmanoir's article [Taming JavascriptCore within and without WebView](http://parmanoir.com/Taming_JavascriptCore_within_and_without_WebView) may give you some advice. |
1,302,276 | Is it possible to run some javascript code (having perhaps an `NSString` as input) without using a `UIWebView`? I would like to run this code in a separate thread so UIWebView is not possible and I don't really want to render anything, just get back the results. | 2009/08/19 | [
"https://Stackoverflow.com/questions/1302276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/130444/"
] | I have not tried this, but here is one idea:
Write code to allocate an empty `UIWebView` but doesn't add it as a subview anywhere, and just directly call [`- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script`](http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/R... | ```
self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(getResults:) userInfo:nil repeats:YES];
-(void)getResults
{
NSString *value = [self.webView stringByEvaluatingJavaScriptFromString:@"javascript"];
}
```
Any reason you couldn't just do something like this. Shouldn't b... |
1,302,276 | Is it possible to run some javascript code (having perhaps an `NSString` as input) without using a `UIWebView`? I would like to run this code in a separate thread so UIWebView is not possible and I don't really want to render anything, just get back the results. | 2009/08/19 | [
"https://Stackoverflow.com/questions/1302276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/130444/"
] | I think Parmanoir's article [Taming JavascriptCore within and without WebView](http://parmanoir.com/Taming_JavascriptCore_within_and_without_WebView) may give you some advice. | ```
self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(getResults:) userInfo:nil repeats:YES];
-(void)getResults
{
NSString *value = [self.webView stringByEvaluatingJavaScriptFromString:@"javascript"];
}
```
Any reason you couldn't just do something like this. Shouldn't b... |
51,792 | Just like the title says. I have a work label marked with a exclamation point in front of it so that it's always at the top of my label list. The list looks something like this:
* !Work
* Alice
* Mark
* Zach
However, if I have the `!Work` label and a name tagged to a same message, `!Work` always displays last. So in ... | 2013/11/11 | [
"https://webapps.stackexchange.com/questions/51792",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/52931/"
] | Use another special character like underscore '\_'.
Exclamation point can be interpreted as code and may behave differently depending on the context the labels are displayed.
Underscore seems to work fine in this case, '\_Work' appears first in the list of folders (left hand side column) and the first in individual e... | By default, Gmail will place at the top of the list any labels that is bold, which means it contains unread emails in it. Labels that aren't bold sink at the bottom, and might even be hidden and only appear when you hover the bottom of the list and click on 'More'.
If you wish that one label you have appear regardless... |
169,125 | 
Can anyone help me figure out what this icon is for??? | 2017/02/14 | [
"https://android.stackexchange.com/questions/169125",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/209711/"
] | I believe that icon indicates a new notification from [Google Play Newsstand](https://play.google.com/store/apps/details?id=com.google.android.apps.magazines&hl=en).
**Edit:**
Confirmed my assumption this morning when a notification popped up:
[ in a browser extension to download a resource and compute a hash thereof. The following works (using [crypto](https://nodejs.org/api/crypto.html) through [Browserify](http://browserify.org/))
```
fetch(url).then(function(respo... | 2015/11/25 | [
"https://Stackoverflow.com/questions/33926399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/353337/"
] | Technically, yes the observable needs to register itself with the EventBus, that's why it's never receiving the ReceiverEvent. But registering an anonymous class with the event bus is messy at best. The bigger problem is with your architecture.
RxJava, EventBus and Observable's are all tools that solve the same proble... | see this tutorial: <http://code.tutsplus.com/tutorials/quick-tip-how-to-use-the-eventbus-library--cms-22694>
EventBus is a **singleton**, meaning that in the entire application only a single EventBus object exists. this object has to be refered by `getDefault()`
in your observable class the bus has to be refered to b... |
33,926,399 | I would like to use the [Fetch API](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) in a browser extension to download a resource and compute a hash thereof. The following works (using [crypto](https://nodejs.org/api/crypto.html) through [Browserify](http://browserify.org/))
```
fetch(url).then(function(respo... | 2015/11/25 | [
"https://Stackoverflow.com/questions/33926399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/353337/"
] | Technically, yes the observable needs to register itself with the EventBus, that's why it's never receiving the ReceiverEvent. But registering an anonymous class with the event bus is messy at best. The bigger problem is with your architecture.
RxJava, EventBus and Observable's are all tools that solve the same proble... | You can use `PublishSubject`. It's observable and observer simultaneously.
You can push events and subscribe to it same time.
```
PublishSubject<ReceiverEvent> channel = PublishSubject.create();
channel.subscribe(yourObserver);
```
In green robot receiver
```
public void onEvent(ReceiverEvent receiverEvent) {
c... |
55,230,627 | I have looked up this and not found anything usefule
So I want to take a unknown number (1-26) and convert it to its corrosponding letter.
Example:
```
import random
rand_let = random.randint(1,26)
print(rand_let)
#Insert the numb letter converter here
print(rand_let) # This is the changed version
output:
3
C
``` | 2019/03/18 | [
"https://Stackoverflow.com/questions/55230627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10808711/"
] | `chr()` is your converter function. There is an offset of 64, as the numbers to be used are from the ASCII table of characters (i.e.: A = 65, B = 66, ...):
```
# import random
# rand_let = random.randint(1,26)
# print(rand_let)
rand_let = chr(rand_let + 64)
# print(rand_let) # This is the changed version
``` | One way you could solve this problem is by making a bunch of if thens like so:
```
if rand_let == 1:
print("A")
```
Another simple way is to make a list of letters and then ask for the letter with a rand\_let - 1 index (because the 1st thing in a list has an index of 0.
```
LetterList = ["A", "B", "C", "D", "E"... |
55,230,627 | I have looked up this and not found anything usefule
So I want to take a unknown number (1-26) and convert it to its corrosponding letter.
Example:
```
import random
rand_let = random.randint(1,26)
print(rand_let)
#Insert the numb letter converter here
print(rand_let) # This is the changed version
output:
3
C
``` | 2019/03/18 | [
"https://Stackoverflow.com/questions/55230627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10808711/"
] | `chr()` is your converter function. There is an offset of 64, as the numbers to be used are from the ASCII table of characters (i.e.: A = 65, B = 66, ...):
```
# import random
# rand_let = random.randint(1,26)
# print(rand_let)
rand_let = chr(rand_let + 64)
# print(rand_let) # This is the changed version
``` | There are a couple ways to do this. First you can create a dictionary and assign letters as numbers. another way would be to find the chr() code number then use a random number generater to pick a char num. This is what I recommend.
```
# imports
import random
# pick a random number between the ord of 'a' and the ord ... |
64,017,515 | Is there a way in python to add an object to a list if some condition?
I want to do this:
```
middleware = ["a",
"b",
"c" if DEBUG,
"d"
]
```
Such that if `DEBUG` is False, the list will be ["a", "b", "d"]
My current best suggestion is this:
```
middleware = ["a",
"b"] + \
(["c"] if DEBUG else []) + \
["d"
]
```... | 2020/09/22 | [
"https://Stackoverflow.com/questions/64017515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | The closest you can get is using [the additional unpacking generalizations](https://www.python.org/dev/peps/pep-0448/) to unpack a variable length inner `tuple` (or `list`) based on the result of a conditional `if/else` operator:
```
middleware = ["a",
"b",
*(("c",) if DEBUG else ()), # Or if you like bracket... | I don't think there's any simpler inline way to do it.
Just write a straightforward `if` statement:
```
middleware = ["a", "b"]
if DEBUG:
middleware.append("c")
middleware.append("d")
```
or
```
middleware = ["a", "b", "d"]
if DEBUG:
middleware.insert(2, "c")
```
Another option would be to build the `mid... |
64,017,515 | Is there a way in python to add an object to a list if some condition?
I want to do this:
```
middleware = ["a",
"b",
"c" if DEBUG,
"d"
]
```
Such that if `DEBUG` is False, the list will be ["a", "b", "d"]
My current best suggestion is this:
```
middleware = ["a",
"b"] + \
(["c"] if DEBUG else []) + \
["d"
]
```... | 2020/09/22 | [
"https://Stackoverflow.com/questions/64017515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | I don't think there's any simpler inline way to do it.
Just write a straightforward `if` statement:
```
middleware = ["a", "b"]
if DEBUG:
middleware.append("c")
middleware.append("d")
```
or
```
middleware = ["a", "b", "d"]
if DEBUG:
middleware.insert(2, "c")
```
Another option would be to build the `mid... | If the objects in the list are all strings as they are in your question, a somewhat less ugly compromise would be to use an f-string with a `split` instead:
```
middleware = f'''
a
b
{'c' * DEBUG}
d
'''.split()
```
EDIT: Revised to use the multiply operator with inspiration from @superbrain's comment... |
64,017,515 | Is there a way in python to add an object to a list if some condition?
I want to do this:
```
middleware = ["a",
"b",
"c" if DEBUG,
"d"
]
```
Such that if `DEBUG` is False, the list will be ["a", "b", "d"]
My current best suggestion is this:
```
middleware = ["a",
"b"] + \
(["c"] if DEBUG else []) + \
["d"
]
```... | 2020/09/22 | [
"https://Stackoverflow.com/questions/64017515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | I don't think there's any simpler inline way to do it.
Just write a straightforward `if` statement:
```
middleware = ["a", "b"]
if DEBUG:
middleware.append("c")
middleware.append("d")
```
or
```
middleware = ["a", "b", "d"]
if DEBUG:
middleware.insert(2, "c")
```
Another option would be to build the `mid... | If the items in the list are all truthy values, you can use the `and` operator to set the item to `False` if `DEBUG` is `False`, and then filter the falsey items from the list afterwards:
```
middleware = [
"a",
"b",
DEBUG and "c",
"d"
]
middleware[:] = filter(None, middleware)
```
or,
```
*middlewa... |
64,017,515 | Is there a way in python to add an object to a list if some condition?
I want to do this:
```
middleware = ["a",
"b",
"c" if DEBUG,
"d"
]
```
Such that if `DEBUG` is False, the list will be ["a", "b", "d"]
My current best suggestion is this:
```
middleware = ["a",
"b"] + \
(["c"] if DEBUG else []) + \
["d"
]
```... | 2020/09/22 | [
"https://Stackoverflow.com/questions/64017515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | The closest you can get is using [the additional unpacking generalizations](https://www.python.org/dev/peps/pep-0448/) to unpack a variable length inner `tuple` (or `list`) based on the result of a conditional `if/else` operator:
```
middleware = ["a",
"b",
*(("c",) if DEBUG else ()), # Or if you like bracket... | If the objects in the list are all strings as they are in your question, a somewhat less ugly compromise would be to use an f-string with a `split` instead:
```
middleware = f'''
a
b
{'c' * DEBUG}
d
'''.split()
```
EDIT: Revised to use the multiply operator with inspiration from @superbrain's comment... |
64,017,515 | Is there a way in python to add an object to a list if some condition?
I want to do this:
```
middleware = ["a",
"b",
"c" if DEBUG,
"d"
]
```
Such that if `DEBUG` is False, the list will be ["a", "b", "d"]
My current best suggestion is this:
```
middleware = ["a",
"b"] + \
(["c"] if DEBUG else []) + \
["d"
]
```... | 2020/09/22 | [
"https://Stackoverflow.com/questions/64017515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | The closest you can get is using [the additional unpacking generalizations](https://www.python.org/dev/peps/pep-0448/) to unpack a variable length inner `tuple` (or `list`) based on the result of a conditional `if/else` operator:
```
middleware = ["a",
"b",
*(("c",) if DEBUG else ()), # Or if you like bracket... | If the items in the list are all truthy values, you can use the `and` operator to set the item to `False` if `DEBUG` is `False`, and then filter the falsey items from the list afterwards:
```
middleware = [
"a",
"b",
DEBUG and "c",
"d"
]
middleware[:] = filter(None, middleware)
```
or,
```
*middlewa... |
31,682,544 | How do I get the value of an object when I click on it from a list?
HTML Here:
```
<table class="ui table">
<thead>
<th class="header small">Operator:</th>
<th>Employee ID:</th>
<th>Category:</th>
<th>Number:</th>
<th>Team Group</th>
<th>Delete</th>
<th... | 2015/07/28 | [
"https://Stackoverflow.com/questions/31682544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2694637/"
] | You just need to put your click binding inside the `foreach` (at the row) and the first parameter to the click handler will be the row data.
```js
function AppViewModel() {
self.editop = ko.observableArray([]);
self.Operators = ko.observableArray([]);
//fn Gets JSON data
this.GetData = function() {
/... | This should give an onclick function to each of the cells in your table. If the cell is clicked it will output the value to the console. Hope this helps.
```
var table = document.getElementById('yourTable'),
cells = table.getElementsByTagName('td');
for (var i=0,len=cells.length; i<len; i++){
cells[i].onclick... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.