qid int64 1 74.7M | question stringlengths 0 70k | date stringlengths 10 10 | metadata list | response stringlengths 0 115k |
|---|---|---|---|---|
1,245,376 | Hey Exchange community,
We have finite-dimensional vector spaces $V$ and $W$ with ordered bases $B$ and $A$ respectively.
Is it true/false that $L(V,W)=L(W,V)$?
Just wondering if someone could articulate what the difference is between the two notations. Having someone write it down as if they were verbally explainin... | 2015/04/21 | [
"https://math.stackexchange.com/questions/1245376",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/233092/"
] | The symbols $\mathcal{L}(V,W)$ indicates the linear transformations from vector space $V$ into vector space $W$, and the analogous statement is made for $\mathcal{L}(W,V)$. If $V$ and $W$ are not the same space (e.g. isomorphic) then you don't in general have the same maps going from $V$ to $W$ as you do from $W$ to $V... |
35,527,163 | I created a simple Jekyll blog by following the instructions in the Quick-start guide in <http://jekyllrb.com/docs/quickstart/>.
I changed the blog a little bit to suit my needs and was able to successfully implement these changes and view them locally. But, as soon as I deployed the blog on Github Pages, I get this
... | 2016/02/20 | [
"https://Stackoverflow.com/questions/35527163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3649966/"
] | By going off the assumption that you mean the styling is off.
I opened the dev console in your website and noticed there was this error
```
http://palpen.github.io/palpen_articles/palpen_articles/css/main.css Failed to load resource: the server responded with a status of 404 (Not Found)
```
Notice that it's attempt... |
676,357 | My Ubuntu Linux server has an mdadm array (RAID 5) with four 2TB SATA disks that keeps "loosing" two disks from time to time. Rebooting and re-assembling the arrays has worked out fine up until now.
Hardware is a Dell PowerEdge T20 with an Exsys EX-3400 card that provides four additional SATA ports. Two of the fours d... | 2015/03/18 | [
"https://serverfault.com/questions/676357",
"https://serverfault.com",
"https://serverfault.com/users/276935/"
] | You have these three commands
```
mkdir test_dir test_dir1 test_dir2 test_dir3
touch file1 file2 file3
cp -v file* test_dir*/
```
Assuming no other files or directories in `.` before the example is started, the wildcards in that last line get expanded thus:
```
cp -v file1 file2 file3 test_dir/ test_dir1/ test_dir2... |
571,389 | I have the following MWE of a table:
```
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx, multirow, booktabs}
\usepackage{amsmath}
\begin{document}
\begin{table}[t]
\begin{tabularx}{\linewidth}{l@{\extracolsep{\fill}}*1c@{}*1c@{}*1c@{}*1c@{}*1c@{}*1c@{}*1c@{}*1c@{}}
\toprule
&\multicolumn{2}{... | 2020/11/18 | [
"https://tex.stackexchange.com/questions/571389",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/183675/"
] | You can use the special `discard` layer after you've set it up with
```
\pgfdeclarelayer{discard}
```
When it is declared as the layer to be used with `pgfonlayer`,
the content will be placed on that layer but since you don't set it with
```
\pgfsetlayers{discard, main}
```
it won't show up in the picture. (Only ... |
9,898,773 | I realize there are similar posts to this out there, but rest assured, this isn't a duplicate post!
I have a site on a godaddy server. I DO NOT have access to the outside of the root of my server (everything is public).
I have a file delete.php that needs to run on CRON, and only by CRON. The file should not execute ... | 2012/03/27 | [
"https://Stackoverflow.com/questions/9898773",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/910737/"
] | Checking for the `cli` SAPI is sufficient; a user executing it via apache (be it mod\_php or fastcgi or cgi) will never cause PHP to be called through the CLI sapi. You can get rid of the ugly `else {}` around your real code though; if you `exit;` at the end of the *then* block there is no need for an *else* block.
Ho... |
41,346,681 | i have a set of code that i copied from someone on youtube and i completely understand and there is some unused logic in there but basically at the moment all it is meant to do is grab the rocket.show function and draw a rectangle and i cannot for the life of me work out why it is not doing so. it is throwing out no er... | 2016/12/27 | [
"https://Stackoverflow.com/questions/41346681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6308045/"
] | You should check for the *first* property that might not exist: so don't check the `coconut.color` property before you are sure that `coconut` exists.
If the property you check for should be an object (which is your case) then you can do so with the `!` operator:
```
if (!myObj.fruits.coconut) myObj.fruits.coconut =... |
6,658 | В чем их отличие?
Согласно некоторым источникам "просветительская" - принадлежащая тому, кто просвещает, - просветителю. "Просветительная" - направленная на просвещение. Путаница, да и только.
Например, просветительная работа для родителей. Думаю, этот вариант верен. | 2012/07/19 | [
"https://rus.stackexchange.com/questions/6658",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/653/"
] | >
>
> >
> >
> > >
> > > Согласно некоторым источникам "просветительская" - принадлежащая тому, кто просвещает, - просветителю. "Просветительная" - направленная на просвещение.
> > >
> > >
> > >
> >
> >
> >
>
>
>
Всё так. Никакой путаницы. Другое дело, что во многих случаях подходят оба варианта.
"Просвет... |
46,808,446 | I'm working on a responsive website. I have tried EVERYTHING and my footer won't stay down. It's because I used float:left. I don't want it to be fixed, i want it only to appear when i scroll to the bottom of the page. This is my code:
EDIT: ok so i took position:absolute out and now it works on the pages it didn't be... | 2017/10/18 | [
"https://Stackoverflow.com/questions/46808446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7906130/"
] | `random.randint` only takes two arguments, a start and an end. The third argument mentioned by Python is `self`, which is done automatically.
To pick a number between 1 and 3, just do `random.randint(1,3)`.
Those `if` statements don't make any sense, by the way; they should look something like:
```
if userInput == "... |
52,914,982 | I'm trying to implement my own TabBar design in flutter. I was able to get a pretty good result. However, when I tap another tab to change the tab, there is a highlight create by default as shown in the image [here](https://i.stack.imgur.com/XBwMg.png). I'm wondering if there is any way I can get rid of the square high... | 2018/10/21 | [
"https://Stackoverflow.com/questions/52914982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4914834/"
] | That's the ripple effect. You can remove it by wrapping it in a `Container` and giving transparent color to it. |
22,329,950 | I want to share multi images with caption on Facebook using Intent. I tried some ways but it doesn't work. I can share photos but not the caption. Can you help me, please? Thanks!!!
My share function
```
private void share(String nameApp, ArrayList<String> imagePath, String text) {
try {
List<Inte... | 2014/03/11 | [
"https://Stackoverflow.com/questions/22329950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2714606/"
] | ```
SELECT Car, Shop, Prices
FROM `Car List`
WHERE Car = 'Mercedes'
```
Depending on your DB engine you need to escape tables names containing spaces differently. |
24,366,351 | I have a string that contains an exe full path and exe name like so:
```
mainExePath = "c:\Folder1\Folder2\MyProgram.exe"
```
I want to get jus the path like so:
```
"c:\Folder1\Folder2\"
```
I have tried this:
```
string mainPath = System.IO.Path.GetFullPath(mainExePath);
```
but this returned the same strin... | 2014/06/23 | [
"https://Stackoverflow.com/questions/24366351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | Use `Path.GetDirectoryName(mainExePath)` |
29,094 | How does one set a flash message in the templates? I can't find any documentation about this, only for plugins or getting the message.
My use-case is, I am checking if a user is allowed to access a certain page and if they cannot I want to set a flash message, then redirect them to another page. I prefer this than to... | 2019/01/12 | [
"https://craftcms.stackexchange.com/questions/29094",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4993/"
] | You can set [flash messages](https://www.yiiframework.com/doc/guide/2.0/en/runtime-sessions-cookies#flash-data) using [yii\web\Session::setFlash()](https://www.yiiframework.com/doc/api/2.0/yii-web-session#setFlash()-detail).
The `session` component is available to templates via `craft.app.session`.
```
{% do craft.ap... |
212,569 | Following a previous discussion about **I would like** vs **I would have liked**, I have a similar question.
What is the difference between
>
> I wanted to come to your party but I couldn't
>
>
> I would have liked to come to your party but I couldn't.
>
>
> | 2019/05/28 | [
"https://ell.stackexchange.com/questions/212569",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/96204/"
] | I've answered essentially the same question over at english.stackexchange.com: [Why is “our today's meeting” wrong?](https://english.stackexchange.com/questions/251561/why-is-our-todays-meeting-wrong)
Usually, a noun phrase in English must have exactly one determiner: you can say "I drove this car" or "I drove my car"... |
73,829,087 | I've created a control and it has a bindable property, but when I try to set its value, it does not set, when I check its setter, it's not getting hit while debugging, not sure what am I doing wrong.
```
public decimal MetricValue
{
get => (decimal)GetValue(MetricValueProperty);
set => ... | 2022/09/23 | [
"https://Stackoverflow.com/questions/73829087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6155965/"
] | ```
LiteDB `5.x` is .NET Framework 4.5 and .NET Standard 2.0 compatible. You can work with LiteDB in any target framework that .NE TStantard 2.0 is compatible, like:
- .NET 5
- .NET Core 2+
- .NET Framework 4.6.1
- Mono 5.4
- Xamarin.iOS 10.14
- Xamarin.Mac 3.8
- Xamarin.Android 8
- UWP 10.0.16299
- Unity 2018.1
http... |
6,413,842 | >
> **Possible Duplicate:**
>
> [What's the @ in front of a string for .NET?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-for-net)
>
>
>
I understand using the `@` symbol is like an escape character for a string.
However, I have the following line as a path to store a file to a m... | 2011/06/20 | [
"https://Stackoverflow.com/questions/6413842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/51649/"
] | It is used for two things:
* create "verbatim" strings (ignores the escape character): `string path = @"C:\Windows"`
* escape language keywords to use them as identifiers: `string @class = "foo"`
In your case you need to do this:
```
String location = args[0] + id + @"\\";
``` |
6,625,598 | My iPhone app badly leaks when flipping back and forth between a main uiviewcontroller and a help uiviewcontroller .
Here is the source of the main view, followed by source of the help view.
MAIN VIEW - FLIP TO HELP.....................
```
// Changes from operational view to Help view.
- (IBAction)showHelp:(id)send... | 2011/07/08 | [
"https://Stackoverflow.com/questions/6625598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/746100/"
] | You are creating a controller with ref count of 1 and a local reference each time `showHelp:` is called:
```
HelpView *controller = [[HelpView alloc] initWithNibName:@"HelpView" bundle:nil];
```
you are losing your reference to it at the end of this method.
You happen to have references to it in `done:` (self) and ... |
69,474,555 | ---
**Thanks everyone, especially Mr.Drew Reese. If you are newbie as me, see his [answer](https://stackoverflow.com/a/69474833/14745811).**
---
I don't know why but when I console log state **data** if I use **useEffect**, it always rerender although state **generalInfo** not change :/ so someone can help me to fix... | 2021/10/07 | [
"https://Stackoverflow.com/questions/69474555",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14745811/"
] | >
> the initial state in redux and state in component is an empty array.
> so I want to GET data from API. and I push it to redux's state. then I
> useState it. I want to use useEffect because I want to update state
> when I PUT the data and update local state after update.
>
>
>
Ok, so I've gathered that you want... |
53,497,455 | I have default laravel `users` table and my custom `educations` table in my database. In `educations` table users can save education histories.
Example `educations` data:
```
------------------------------------------------------------
id | user_id | university | speciality | finish_year | level
--------------------... | 2018/11/27 | [
"https://Stackoverflow.com/questions/53497455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7496039/"
] | Considering that you have a `educations` method in your User model that represents a `HasMany` association, you can use eloquent's `has` (or `whereHas`) method:
```
$users = App\User::whereHas('educations', function ($query) {
$query->where('level', 4);
})->get();
```
Here's a link to the [docs](https://laravel.... |
5,059,506 | I am trying to clean up some of my projects, and one of the things that are puzzling me is how to deal with header files in static libraries that I have added as "project dependencies" (by adding the project file itself). The basic structure is like this:
```
MyProject.xcodeproj
Contrib
thirdPartyLibrary.xcodep... | 2011/02/20 | [
"https://Stackoverflow.com/questions/5059506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/292477/"
] | If I understand correctly, I believe you want to add a path containing $(BUILT\_PRODUCTS\_DIR) to the HEADER\_SEARCH\_PATHS in your projects build settings.
As an example, I took an existing iOS project which contains a static library, which is included just in the way you describe, and set the libraries header files ... |
53,719,824 | Say I have an array of objects like so:
```
[{"taco":"","burrito":"","scone":"","beans":"true"},
{"taco":"true","burrito":"","scone":"true","beans":""},
{"taco":"true","burrito":"","scone":"","beans":""},
{"taco":"true","burrito":"","scone":"","beans":"true"}]
```
I need to count the occurrence of each element an... | 2018/12/11 | [
"https://Stackoverflow.com/questions/53719824",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9633658/"
] | **You can try this**
You can do it with `reduce()`.
What i have done is first i check is the **`object property of current element`** if it is already in **`output object`**. If it's present than i check the value of **`current element property`**. if it is true than i increment the property of **`output object`** by... |
23,241 | I'm sure there will be variation depending on what the contaminated item or surface is made of - linens, I could imagine, would remain dangerous for longer than a door-knob. But if the items are not decontaminated in some way, how long can the virus survive outside a host? | 2014/10/17 | [
"https://biology.stackexchange.com/questions/23241",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/9817/"
] | This really depends on the environment, one study (listed below as reference 1) found that the Ebola virus can survive under ideal conditions on flat surfaces in the dark for up to six days - see the figure from the same publication.

However, the v... |
42,232,606 | I'm using Django 1.10 and trying to catch all exceptions with exception middleware.
The code below causes an internal server error:
```
mw_instance = middleware(handler)
TypeError: object() takes no parameters
```
views.py
```
from django.http import HttpResponse
def my_view(request):
x = 1/0 # cause an excep... | 2017/02/14 | [
"https://Stackoverflow.com/questions/42232606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/984003/"
] | Since you are using the new `MIDDLEWARE` settings, your Middleware class must accept a `get_response` argument: <https://docs.djangoproject.com/en/1.10/topics/http/middleware/#writing-your-own-middleware>
You could write your class like this:
```
from django.http import HttpResponse
class ExceptionMiddleware(object)... |
59,278,991 | Alright I'm trying to allow user input to include only letters, numbers, and dashes. Any other characters would be invalid. I also only want the characters to be 1-9 characters in length.
Here is what I have so far:
```
def main():
tag = input("Please enter your ID Tag: ")
while(not rSeriesValidate(tag)):
... | 2019/12/11 | [
"https://Stackoverflow.com/questions/59278991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If you don't want to use regular expressions, try simply going character by character:
```
def rSeriesValidate(tag):
if len(tag) < 1 or len(tag) > 9:
return False
for currChar in tag:
if not currChar.isalnum() and currChar != "-":
return False
return True
```
This first che... |
5,485,338 | What version of Eclipse do I need for Google Web Toolkit? I see about 7 versions, but none make any references to GWT. Google doesn't mention it to. I did install the PHP version. | 2011/03/30 | [
"https://Stackoverflow.com/questions/5485338",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/340761/"
] | Definitely the Java EE version. The regular java version doesn't seem to work with the google plugin. |
24,378,233 | Can't find an answer anywhere in Docs... is there a way to make it so that the placeholder value for a `number_field_tag` or whatever is the value that is submitted to the `value` if the user doesn't enter anything else?
I.e., in my code below:
```
<%= number_field_tag "transaction[][#{thing}]", :quantity, min: 0, pl... | 2014/06/24 | [
"https://Stackoverflow.com/questions/24378233",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2731253/"
] | i was able to do it using `freopen(..);`:
<http://www.cplusplus.com/reference/cstdio/freopen/> |
1,441,063 | I have some code like:
```
Lookup(Of String)("Testing")
Lookup(Of Integer)("Testing")
```
And both of those Lookups work great. What I'm trying to is call the appropriate LookUp based on the type of another variable. Something that would look like...
```
Lookup(Of GetType(MyStringVariable))("Testing")
```
I've tr... | 2009/09/17 | [
"https://Stackoverflow.com/questions/1441063",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/73381/"
] | You do not specify the full signature for the method that you're calling, but my psychic powers tell me that it is this:
```
Function Lookup(Of T)(key As String) As T
```
And you want to avoid having to repeat `Integer` twice as in the example below:
```
Dim x As Integer
x = Lookup(Of Integer)("foo");
```
The pro... |
49,649,819 | I am currently using this code to screen capture the panel I created, but whenever I am saving it, the quality is bad. Is there any way to maintain the good quality when saving it?
I tried resizing the panel but the result is still the same.
I tried doing a normal screen shot with the snipping tool and it also has the... | 2018/04/04 | [
"https://Stackoverflow.com/questions/49649819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7899801/"
] | This is what I use to save a screenshot:
```
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
private void SaveControlAsImage(Control control, string path)
{
Bitmap bitmap = new Bitmap(control.Width, control.Height);
control.DrawToBitmap(bitmap, control.Bounds);
using (FileStream fs = n... |
57,554,043 | In my head section of my `form.layout.blade.php` I have the following:
```
<head>
<script src="/js/main.js"></script>
<head>
```
This is layout file is loaded before all pages are loaded. Is there a way to *not* load `main.js` for a specific route? | 2019/08/19 | [
"https://Stackoverflow.com/questions/57554043",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5272159/"
] | you can use if statement like this. main.js will not load on this page
```
@if(!Request::is('subpage/url'))
<script src="/js/main.js"></script>
@endif
``` |
1,886,096 | ```
L->|
A -> B ^ |
|__> C -> D-> G->X--| |
K |_> T | |_>Z
|___________|
```
I hope this small drawing helps convey what I'm trying to do.
I have a list of 7,000 locations, each with an undefined, but small number of doors. Each door is a bridge between bot... | 2009/12/11 | [
"https://Stackoverflow.com/questions/1886096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/88770/"
] | Represent your locations as nodes and the doors as edges in a graph. Then apply some rather standard [shortest path algorithm(s)](http://en.wikipedia.org/wiki/Shortest_path_problem) and you're done. |
1,772,475 | I'm running a LAMP box with PHP running as fcgid. APC is installed and working well. However, each PHP process gets its own cache. This is a problem, because it would make far more sense to have 10 PHP processes with 300MB shared APC cache than 10 PHP processes, each with a redundant 30MB unshared APC cache.
There was... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1772475",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/199475/"
] | As far as I know it's still not possible to use shared memory cache with any PHP cacher amongst multiple processes... anyway, unless you're under extremely heavy load you should be fine with separate caches, I suppose, since they'll be filled pretty quickly. And hey, RAM is cheap nowadays! |
2,465,656 | is this a valid JQuery usage pattern to :
```
<script type="text/javascript">
$("body").prepend('<input type="hidden" id="error" value="show">');
</script>
```
That is using Jquery to manipulate / insert HTML Tags **when the Document has NOT YET been loaded** (by not using document.ready for the... | 2010/03/17 | [
"https://Stackoverflow.com/questions/2465656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/293513/"
] | Yes, you can do that, but:
* You have to place the script somewhere after the closing tag of the element that you add elements to. That means that the body element is not a good candidate to prepend anything to.
* Make sure that the HTML code is valid. If you are using XHTML you should self close the input element.
C... |
50,790 | The following theorem has been mentioned (and partially proved) in the book Functions of Bounded Variation and Free Discontinuity Problems by Luigi Ambrosio et. al.
Let $\mu,\nu$ be positive measures on $(X,\mathcal{E})$. Assume that they are equal on a collection of sets $\mathcal{G}$ which is closed under finite int... | 2011/07/11 | [
"https://math.stackexchange.com/questions/50790",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/13199/"
] | The collection of $A \in \mathcal{E}$ such that $\mu(A \cap X\_h) = \nu(A \cap X\_h)$ for all $h$ forms a $\sigma$-algebra containing $\sigma(G)$. |
24,630,720 | Is there any equivalent of strict mocks in python? Some mechanism to report unintended call of mocked methods (action.step2() in this example), just like this in GoogleMock framework.
```
class Action:
def step1(self, arg):
return False
def step2(self, arg):
return False
def algorithm(action)... | 2014/07/08 | [
"https://Stackoverflow.com/questions/24630720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/407981/"
] | Looks like it's not supported out of the box. However there are at least two approaches on how to achieve the same result.
Passing list of allowed members
-------------------------------
According to mock documentation
>
> *spec*: This can be either a **list of strings** or an existing object (a class or instance) ... |
20,531,272 | In my php program, I have to insert variables into one of my sql tables. Every time I go to test this out though, the values don't get posted to the table. Is there something wrong with these statements? or is the problem bigger than these 2 lines
```
$sqli = mySQLi_connect("localhost","root","root","myProject");
mys... | 2013/12/11 | [
"https://Stackoverflow.com/questions/20531272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3093085/"
] | Look at [my white paper on Drools Design Patterns](http://www.google.at/url?q=http://www.redhat.com/rhecm/rest-rhecm/jcr/repository/collaboration/sites%2520content/live/redhat/web-cabinet/home/resourcelibrary/whitepapers/brms-design-patterns/rh%3apdfFile.pdf) especially the section on Data Validation.
The section expl... |
24,768,747 | I don't quite understand how escape the character works in .awk scripts.
I have this line in the file I want to read:
```
#Name Surname City Company State Probability Units Price Amount
```
If I just write:
```
awk < test.txt '/\#/ {print $1}'
```
in the command line, then everything is fine and the output is #... | 2014/07/15 | [
"https://Stackoverflow.com/questions/24768747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3614293/"
] | Join your queries with a `UNION`. The way you've got it now, it'll return two results sets.
```
SELECT [col1], [col2] FROM Contact
UNION ALL
SELECT [col1], [col2] FROM Numar_contact
```
As DJ KRAZE pointed out in a comment, it might not be a bad idea to wrap this in a sproc or a TVF. But this will work too.
**Edit:... |
48,302,244 | I can transpose a square matrix, but now I'd like to transpose a non square matrix (in my code 3\*2) with user input.
Other sources recommended me to create a new matrix first, which I have done. I manage to make the matrix, but when transposing, it stops from the 4th value.
I have looked at other topics but I can'... | 2018/01/17 | [
"https://Stackoverflow.com/questions/48302244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9229665/"
] | So, at the beginning you load a matrix with fields : "i,j" => "row, column"
On the last step, you try accessing the matrix with a "j,i" => "column, row" order.
You're inverting the i,j indexes.-
Let me help you by just changing the variable names :
//const
```
const int ROWS = 3;
const int COLS = 2;
... |
65,235,190 | I am thinking of setting up a bitnami mongodb replicaset in K8s, as explained [here](https://github.com/bitnami/charts/tree/master/bitnami/mongodb#architecture).
However, as a note they mention this while upgrading:
>
> Note: An update takes your MongoDB replicaset offline if the Arbiter is enabled and the number of... | 2020/12/10 | [
"https://Stackoverflow.com/questions/65235190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3848107/"
] | Bitnami developer here
>
> Is it that, while performing the upgrade, the replicaset will have
> only one mongodb server working, while both, the other mongo db server
> and arbiter, are offline and being upgraded?
>
>
>
That will depend on how many replicas you have. If you install the chart with 2 replicas + 1 a... |
8,968,133 | I have added a view to a layout which occupies a part of my screen. To this layout I want to add another layout which will be transparent. On this layout there should be only two lines which will scroll over the background layout. This I am doing so that my background layout is not invalidated and only the foreground i... | 2012/01/23 | [
"https://Stackoverflow.com/questions/8968133",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463039/"
] | Use `FrameLayout` as a parent layout and stack it up with as many layouts as you want. Thats one part of the answer. To make a layer (a layout in this case) transparent, set the alpha value in its background (a color) to 0. For instance `android:background="#00777777"` sets a background which is translucent with a dull... |
229,878 | This is part of a series of questions.
*Context*: a friend of mine is writing a novel about a rogue planet around the mass of Mars passing by the solar system before continuing its journey in interstellar space (it must not be captured by the Sun). Given sufficient heads-ups, Earth sends a research mission to land on ... | 2022/05/12 | [
"https://worldbuilding.stackexchange.com/questions/229878",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/76461/"
] | "Passing through the solar system" I guess means in this case "passing through the inner solar system". If it only passes the Kuiper belt or the Oort cloud, there would be no serious perturbations (no "showering the inner solar system" or the like").
When passing through the inner solar system there will be no perturb... |
29,457,315 | I have 3 tables, like so:
```
release (release_id, name, ...)
medium (medium_id, release_id, name, ...)
track (track_id, medium_id, title, ...)
```
Having only the release\_id, i want to be able delete both the track and the medium associated with that release\_id in one shot using one query.
Is it possible? If y... | 2015/04/05 | [
"https://Stackoverflow.com/questions/29457315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888139/"
] | Strictly speaking, yes, you need three separate delete statements.
However, if you always want the associated rows deleted from the other two tables when you delete a row from the 'release' table, you can use foreign keys and an ON DELETE CASCADE constraint on the 'release' table.
See, e.g. <http://www.mysqltutorial.... |
61,338,861 | I'm trying to increment an index in a loop for but my program does not work. I have a simple array with 10 elements and I want to sum all elements of this array. I'm having problem, because I consider two loop, first I want to calculate the five first elements and than the five last, but my counter i\_i does not change... | 2020/04/21 | [
"https://Stackoverflow.com/questions/61338861",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6457422/"
] | You used the wrong variable in the second loop, it is `ii`, not `i`. Secondly the last loop must go from `i_i` to `i_j` so your range is also wrong:
```
import numpy as np
from matplotlib.pylab import *
x = [1, 2, 3, 4, 5, 6, 7, 8 ,9 ,10]
i_i = 0
i_j = 5
sum_t = 0.0
for i in range(2):
for ii in range(i_i, i_j):... |
8,147,696 | I can't find this information online or in the documentation, does anyone know what versions of Android and iOS the AIR 3.0 captive runtime is compatible with? I'm assuming there is some restriction there, but short of actually compiling a program and trying it on iPhone for example, which I don't have, how can I tell ... | 2011/11/16 | [
"https://Stackoverflow.com/questions/8147696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/997477/"
] | System requirements using captive runtime are the same as without - in other words, quoting from the [reqs page](http://www.adobe.com/products/air/tech-specs.html):
* Android™ 2.2, 2.3, 3.0, 3.1, and 3.2
* iPod touch (3rd generation) 32 GB and 64 GB model, iPod touch 4, iPhone 3GS, iPhone 4, iPad, iPad 2
* iOS 4 and a... |
28,762,226 | i need sql query for report from table item per day(fix day1-day31 as column) of the month when i input **month and year**.
This is my table (item)
ID | NAME | DATE
---------------------------------------------------
1 | ITEM A | 2015-2-25 13:37:49
2 | ITEM A | 2015-2-25 14:37:4... | 2015/02/27 | [
"https://Stackoverflow.com/questions/28762226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4613455/"
] | You can do this using a PIVOT in your query
```
SELECT name,
[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9],
[10],
[11],
[12],
[13],
[14],
[15],
[16],
[17],
[18],
[19],
[20],
... |
13,695,522 | I am having trouble trying to loop through a multidimensional array using PHP. When I use the `print_r()` function, here is my output:
```
Array ( [0] => Array ( [fname] => [sname] => [address] => [address2] => [city] => [state] => Select State [zip] => [county] => United States [phone] => [fax] => [email] => [use_ema... | 2012/12/04 | [
"https://Stackoverflow.com/questions/13695522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/317740/"
] | easiest would just use a foreach statement:
```
foreach($yourarray as $array_element) {
$address = $array_element['address'];
$fname = $array_element['fname'];
...
}
``` |
310,807 | I have a malfunctioning hard drive that is full of thousands of files. All the files are still shown as 'there' when explored (with both Windows and Linux). Some of the files can be recovered by moving them to another hard drive, files with CRC errors cannot be moved.
Everything that can be recovered has been moved; t... | 2011/07/15 | [
"https://superuser.com/questions/310807",
"https://superuser.com",
"https://superuser.com/users/90368/"
] | You can resize it but thats all that you can do
Go to the space between the the address bar and the search bar to resize
Or you can disable both explorer and start menu by following [this](http://www.howtogeek.com/howto/10246/how-to-disable-search-in-windows-7/) (Though i understand that this isn't what you really wa... |
4,274,388 | ```
string = "Jack and Jill went up the hill to fetch a pail of water. Jack fell down and broke his crown. And Jill came tumbling after. "
d = string.match(/(jack|jill)/i) # -> MatchData "Jill" 1:"Jill"
d.size # -> 1
```
This only match the first occurrence it seems.
`string.scan` does the job partially but it doe... | 2010/11/25 | [
"https://Stackoverflow.com/questions/4274388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/499097/"
] | You can use `.scan` and `$`` global variable, which means *The string to the left of the last successful match*, but it doesn't work inside usual `.scan`, so you need this *hack* (stolen from [this answer](https://stackoverflow.com/a/2257073/322020)):
```ruby
string = "Jack and Jill went up the hill to fetch a pail of... |
10,458,660 | I'm trying to compare these three but it seems only `array_map` works.
```
$input = array( ' hello ','whsdf ',' lve you',' ');
$input2 = array( ' hello ','whsdf ',' ... | 2012/05/05 | [
"https://Stackoverflow.com/questions/10458660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1099531/"
] | [`array_walk`](http://php.net/manual/en/function.array-walk.php) doesn't look at what result function gives. Instead it passes callback a reference to item value. So your code for it to work needs to be
```
function walk_trim(&$value) {
$value = trim($value);
}
```
`foreach` doesn't store changed values itself e... |
524,086 | I would appreciate if somebody could help me with the following problem
Q. Finding ~~maximum~~ minimum
$$\frac{x+y}{z}+\frac{x+z}{y}+\frac{y+z}{x}(\text{where} ~~x,y,z>0)$$ | 2013/10/13 | [
"https://math.stackexchange.com/questions/524086",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/59343/"
] | By letting $u = \frac xy$ , $v = \frac yz$, and $w = \frac zx$ , our expression becomes $(u + \frac1u) + (v + \frac1v) + (w + \frac1w)$ , whose minimum is thrice that of $f(t) = t + \frac1t$ , which is to be found among the roots of its first order derivative: $f'(t) = 1 - \frac1{t^2}$ , which vanishes for $t = \pm1$ .... |
2,193,984 | [This page](http://www.ironruby.net/Documentation/.NET/Assemblies) on the IronRuby help website talks about being able to 'require' some well-known assemblies such as System.Windows.Forms without needing to crank out the entire '*ah-come-on-gimme-a-break-here-you-cannot-be-serious*' strong name of the assembly.
In the... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2193984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25457/"
] | Well, it *was* a setup problem - there were two copies of ir.exe in the IronRuby download, and I was using the wrong one. |
7,231,649 | Let me use an example for what I'm looking for. On my phone I have a music player widget, when active and the phone times out, the player continues working (iPod style I get that).
BUT when you turn the phone back on, the player is visible and active above the unlocking slide bar.
Is this easy to do in java? giving ... | 2011/08/29 | [
"https://Stackoverflow.com/questions/7231649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/693526/"
] | This is a contentious issue:
* There are apps that do this. See [How to customize Android's LockScreen?](https://stackoverflow.com/questions/5829671/how-to-customize-androids-lockscreen) e.g. [WidgetLocker](https://play.google.com/store/apps/details?id=com.teslacoilsw.widgetlocker) - so it is not entirely impossible.
... |
34,143,385 | I'm trying to set the `textSize` in sp to `textView` to be seen correctly on all devices. This is my code:
```
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
... | 2015/12/07 | [
"https://Stackoverflow.com/questions/34143385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5246885/"
] | After taking a short walk and then a fresh look at the code the problem / answer is the linkage of the **mock**/**spy** calls to setup the `doReturn`.
Instead of:
`spy(new SomeMod())`
Use:
`PowerMockito.spy(new SomeMod())`
This will setup the test(s) according to the docs. |
35,479,494 | I'm editing a file in vim and my function looks like this:
```
function arrForeignCharacterMapping()
{
return array(
'<8a>'=>'S', '<9a>'=>'s', 'Ð'=>'Dj','<8e>'=>'Z', '<9e>'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A',
'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'... | 2016/02/18 | [
"https://Stackoverflow.com/questions/35479494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1058739/"
] | you can google "unicode character map", its pretty common so I'm sure you will find many tools and one you would like.
this was one of the first results for me: <http://charmap.online-toolz.com/tools/character-map.php>
look at the unicode character value, as such:
[:
new = ''
for i in string:
if i in 'aeiou':
new += i*4
else:
new += i
return new + '!'
``` |
65,307,874 | Hello I am looking for a way to implement a hierarchical graph in JavaFX, as is the case with a company organization.
Ideally, the graph should be in a scrollable pane and the individual nodes of the graph should be able to be displayed (in a different pane) in order to get more information about an employee, etc. The... | 2020/12/15 | [
"https://Stackoverflow.com/questions/65307874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11895027/"
] | That depends on what you mean by "graph". If a tree view is sufficient, you can use a JavaFX Tree control to display the hierarchical graph - like a directory structure in an explorer window. If a TreeView is not sufficient, you will have to implement some control yourself.
If the information for each node in the grap... |
97,092 | I am in the process of building myself a fancy schmancy Raspberry Pi "laptop", and am trying to power it with a single cord/power supply. My strategy is to put together a small project box with 120VAC inputs, and the innards from a couple wall warts to provide 5VDC and 12VDC power. Before I start wiring crap together, ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97092",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/10660/"
] | I think this is not a good idea. You should use a 120V power cord attached to a fused power entry module <http://www.digikey.com/product-search/en/connectors-interconnects/power-entry-connectors-inlets-outlets-modules/1442743>, in turn connected to the right 5V/12V AC to DC converter rated for the currents you're inter... |
34,659,636 | i'm new to meteor framework
I want to fetch single from the collection
```
AccountNames = new Mongo.Collection("AccountTypeMaster");
```
I created a collection using
```
db.createCollection("AccountTypeMaster")
this.helpers({
AccountNames: () => {
return AccountNames.find({}, {fields: {name: 1}}); ... | 2016/01/07 | [
"https://Stackoverflow.com/questions/34659636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5220060/"
] | You need to change how you instantiate your collection. The correct Meteor syntax would be:
```
AccountNames = new Mongo.Collection("AccountTypeMaster");
```
Helpers also need to be attached to a template. Remember, helpers only run on client-side code.
```
if (Meteor.isClient) {
// This code only runs on the cli... |
17,605,290 | I have the following 3 tables. This is just a small section of the data, I left out most rows and other columns that I'm not querying against. If it would be helpful to include the full table(s) let me know and I can figure out how to post them.
**infocoms**
```
id items_id itemtype value
1735 21 ... | 2013/07/11 | [
"https://Stackoverflow.com/questions/17605290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2573866/"
] | Comment (because I do not have the reputation) : "value" and "name" should be encased in back-ticks (``) because they are reserved words.
But looking at your code a little closer I find that you are grouping by location.name even though many of the values are duplicated when you do an `JOIN ON peripherals.locations_id... |
414,465 | Is every $ \mathbb{R}P^{2n} $ bundle over the circle trivial?
Are there exactly two $ \mathbb{R}P^{2n+1} $ bundles over the circle?
This is a cross-post of (part of) my MSE question
<https://math.stackexchange.com/questions/4349052/diffeomorphisms-of-spheres-and-real-projective-spaces>
which has been up for a coupl... | 2022/01/23 | [
"https://mathoverflow.net/questions/414465",
"https://mathoverflow.net",
"https://mathoverflow.net/users/387190/"
] | As Sam Hopkins commented, 8 vertices are enough. Let $Q$ be the pentagon from the picture and let $\pi$ be the plane containing it. Now we can define the triangle $P$ as a triangle of less diameter than the black segment and intersecting $\pi$ at two points: one point $a\_0$ in the open blue region $B$ and one point $b... |
58,252 | I am currently doing a 3-month paid internship program - it started 3 weeks ago and will be conclusive in 3 months. This company does not promise to provide me with a position afterwards.
Now I've received a full-time job offer from another company.
* If it ethical to jump ship?
* What might some possible consequenc... | 2015/11/24 | [
"https://workplace.stackexchange.com/questions/58252",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/44326/"
] | Is it a ***nice*** thing to do? **No.**
Is it a ***good*** thing to do? **Depends who you're asking.**
Make no mistake, you are screwing your boss over by quitting. However, as you yourself have said, the company you're with right now is offering no guarantees whatsoever. That job offer, on the other hand, is **a cer... |
3,672,853 | The problem?
```
<UI:PanelBrowser Margin="12,27,12,32"></UI:PanelBrowser>
```
WPF is ridiculous in that not manually specifying properties (Such as Width and Height) in this case causes them to have the values `Doulbe.NaN`. The problem is that I need to know this number. I'm not going to manually set a width and hei... | 2010/09/09 | [
"https://Stackoverflow.com/questions/3672853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/369345/"
] | Try using the [FrameworkElement.ActualWidth](http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.actualwidth.aspx) and [ActualHeight](http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.actualheight.aspx) properties, instead. |
54,442,972 | I write my API documentation with Spring REST Docs.
Code example:
```
@Override
public void getById(String urlTemplate, PathParametersSnippet pathParametersSnippet, Object... urlVariables) throws Exception {
resultActions = mockMvc.perform(get(urlTemplate, urlVariables)
.principal(principal)
... | 2019/01/30 | [
"https://Stackoverflow.com/questions/54442972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10499368/"
] | If you're not in a position to configure your application to produce pretty-printed responses, you can have REST Docs do it for you prior to them being documented. This is described in the [Customizing Requests and Responses](https://docs.spring.io/spring-restdocs/docs/2.0.x/reference/html5/#customizing-requests-and-re... |
239,478 | I have the following tables:
[](https://i.stack.imgur.com/M6teW.png)
Each `ProductLine` will encompass many `Part`s. For this reason, it initially seemed to me that the `Part` table is a child of the `ProductLine` table. However, a part is not simp... | 2019/05/30 | [
"https://dba.stackexchange.com/questions/239478",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/180524/"
] | If the business requirement is
>
> a business rule, every part must belong to exactly one product line.
>
>
>
So if the rule is, **each part belongs to one product line** the other side of that relationship is **each product line contains zero-to-many parts** which should convince you this is a clear instance of ... |
36,318,280 | I'm trying to create a runnable JAR from <https://bitbucket.org/madsen953/ethervisu> in Eclipse. When I try to run it I get:
```
Exception in thread "Monitor" java.lang.UnsatisfiedLinkError: no jnetpcap in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
at java.lang.Runtime.loadLi... | 2016/03/30 | [
"https://Stackoverflow.com/questions/36318280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259288/"
] | You need to use a WHERE clause in your update statement.
```
UPDATE wp_posts
SET post_content = replace(post_content, 'free', 'free3' )
WHERE post_content LIKE '%blue%'
``` |
16,469,150 | We are supposed to use the code below to print out the parameters listed in it, currently however we are unable to do so and are using a round about method. This is supposed to print out things instead of what we print out in the Game class in the playturn function
```
def __str__(self):
x = self.name + ":\t"... | 2013/05/09 | [
"https://Stackoverflow.com/questions/16469150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2321264/"
] | The problem is that, in at least some places, you're trying to print a `list`.
While printing anything, including a `list`, calls `str` on it, the `list.__str__` method calls `repr` on its elements. (If you don't know the difference between `str` and `rep`, see [Difference between `__str__` and `__repr__` in Python](h... |
65,753,830 | I'm trying to train Mask-R CNN model from cocoapi(<https://github.com/cocodataset/cocoapi>), and this error code keep come out.
```
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-83356bb9cf95> in <module>
19 sys.path.append(os.path.join(ROOT_DIR, "samples/... | 2021/01/16 | [
"https://Stackoverflow.com/questions/65753830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14258016/"
] | The answer is summarise from [these](https://github.com/cocodataset/cocoapi/issues/172) [three](https://github.com/cocodataset/cocoapi/issues/168) [GitHub issues](https://github.com/cocodataset/cocoapi/issues/141#issuecomment-386606299)
1.whether you have installed cython in the correct version. Namely, you should ins... |
73,039,121 | With great help from @pratik-wadekar I have the following working text animation.
Now my problem is that when I test it on different screen sizes/mobile the animated word `plants` breaks into pieces. For example PLA and in the next line NTS. How can I avoid this? So it always keeps as one full word.
First I tried to a... | 2022/07/19 | [
"https://Stackoverflow.com/questions/73039121",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Ok I got it. I had to make the animation as own component and add the `<AnimatedTypography>` the `component={"span"}` type and `white-space: nowrap`.
Additionally to my `const AnimatedTypography = styled(Typography)` I had to cast the resulting component with `as typeof Typograph`y so Typescript does not throws errors.... |
23,423,572 | As title says, why does Rails prefer to use the @params variable inside of a Controller action when you are responding to the action instead of passing the individual parameters through the function arguments when we call the function?
Other frameworks use this (i.e, ASP MVC) and I was just wondering if there was a re... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23423572",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1073868/"
] | The Maven command `mvn eclipse:eclipse` generate the eclipse project files from POM.
The "-D" prefix in the argument means that it's a system property.
System property are defined like `http://docs.oracle.com/javase/jndi/tutorial/beyond/env/source.html#SYS`
`mvn eclipse:eclipse -Dwtpversion=2.0` command convert the w... |
40,925,951 | In our WPF software, we used a `ControlTemplate` which defines a `ToggleButton` that causes the window to shrink/extend. The definition of `ToggleButton` is given below:
```xml
<ToggleButton ToolTip="Standard/Extended" Grid.Column="0"
x:Name="PART_MaximizeToggle" VerticalAlignment="Top"
HorizontalAlignment="Ri... | 2016/12/02 | [
"https://Stackoverflow.com/questions/40925951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/68304/"
] | You could assign ([and register](https://msdn.microsoft.com/en-us/library/system.windows.frameworkcontentelement.registername.aspx)) the names automatically via an [AttachedProperty](https://msdn.microsoft.com/en-us/library/ms749011(v=vs.110).aspx) that increments a counter for each prefix.
(This is just a proof of con... |
20,810,059 | Is it good practice to declare variables to be used across a program in a Module then populate them in one form and use what you have populated to these variables in another form?
I plan on closing the population form after the data has been populated to the variables so I see this as the only method that would work. ... | 2013/12/28 | [
"https://Stackoverflow.com/questions/20810059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2177940/"
] | I guess it **depends** on your application and the kind of data you're talking about.
Think of a `User Login form` that saves the user information after logging in. You can then keep this information in a Module shared across your entire application because it's not expected to change during the session. So you can q... |
60,803,621 | I'm having a little trouble figuring out a nested for loop here. Here's the problem:
>
> 3. The population of Ireland is 4.8 million and growing at a rate of 7% per year. Write a program to determine and display the population
> in 10 years time. Your program should also display a count of the
> number of years th... | 2020/03/22 | [
"https://Stackoverflow.com/questions/60803621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13105750/"
] | Look at your inner loop.
```
for (int j = 0; pop >5; j++)
{
years += j;
}
```
Your condition being `pop > 5`, you need `pop` to shrink if you ever want to exit the loop. But the body of the loop never alters `pop`, so if it's greater than 5, you'll loop forever.
The problem definition suggests t... |
16,688,245 | I'm trying to deploy my app on heroku. But everytime I try to push my database, I get the following error:
```
heroku db:push
Sending schema
Schema: 100% |==========================================| Time: 00:00:16
Sending indexes
refinery_page: 100% |==========================================| Time: 00:00:02
re... | 2013/05/22 | [
"https://Stackoverflow.com/questions/16688245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1458773/"
] | I too had same problem, but i solved with these lines. To my knowledge we cannot request a session for new permissions which is already opened.
```
Session session = new Session(this);
Session.setActiveSession(session);
session.openForRead(new Session.OpenRequest(this).setCallback(callback).setPermissions(Arra... |
15,469,904 | I need to set up a listener that can call a method every time a `show()` method is invoked to display a window. How can I do this? | 2013/03/18 | [
"https://Stackoverflow.com/questions/15469904",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2172496/"
] | You'd probably be interested in `WindowListener`.
From [the tutorial, "How to Write Window Listeners"](http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html):
>
> The following window activities or states can precede a window event:
>
>
> * Opening a window — Showing a window for the first time... |
60,747,796 | I have a simple table
```
**targeted_url_redirect targeted_countries msg_type non_targeted_url**
http://new.botweet.com india,nepal,philippines NEW http://twisend.com
http://expapers.com United States,Canada OLD http://all.twisend.com
https://tweeasy.com india,england ... | 2020/03/18 | [
"https://Stackoverflow.com/questions/60747796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2014130/"
] | One option uses `not exists`:
```
SELECT t.*
FROM tweeasy_website_redirection t
WHERE
t.message_type = 'OLD'
AND (
t.targeted_countries LIKE '%@country%'
OR NOT EXISTS (
SELECT 1
FROM tweeasy_website_redirection t1
WHERE t1.targeted_countries LIKE '%@coun... |
42,549,008 | what is the best way to maintain global variable in `angular2`. I am unable to find a way to maintain a global variable through out the application. After user logged into the application I need `User` object which has user details and `isLoggedIn` values in all other components. Here is what I am doing ...
```
@Injec... | 2017/03/02 | [
"https://Stackoverflow.com/questions/42549008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1653027/"
] | Simply, follow the instructions given in the error:
Download miniconda, then run the script file by typing following command: `bash <file_name.sh>` e.g.
`bash Miniconda3-latest-Linux-x86_64.sh`.
Now reopen the terminal for the changes to take effect.
If conda is already installed on your system, you can reinstall it... |
56,197,545 | I have Tab navigator that handles data changing of itself and other two sibling component.
**Main parent Component** that does data fetching and manipulation based on three sentiments: positive, negative and neutral as request body parameter in *http post request*.
**Second parent component** that stores all positiv... | 2019/05/18 | [
"https://Stackoverflow.com/questions/56197545",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11349591/"
] | You need **urgently** research about SQL injection, and **STOP USING** string concatenation for building your SQL insert statement **RIGHT NOW**.
You need to use the proper technique - **parametrized queries** -- always - **NO** exceptions!
And also, it's a commonly accepted Best Practice to list the columns in your ... |
72,862,776 | I am trying to put together a diagram in CSS of a flow chart. I have attached below a picture. Is there a simple way to do this? I've been Googling around quite a bit looking for examples, but I don't know what to call this.
Can you please let me know how to do this? Or if this is something common, what I can Google t... | 2022/07/04 | [
"https://Stackoverflow.com/questions/72862776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7053813/"
] | By using [CSS Flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) you could achieve something like:
```css
body {font: 16px/1.4 sans-serif;}
.chart-row,
.chart-col {
display: flex;
gap: 1em;
}
.chart-row {
flex-direction: row;
}
.chart-col {
flex-direction: column;
}
.chart-pill,
.chart-rect{
p... |
41,318,581 | I'm using a random number generator and IF Statements to switch between activities. It iterates through the first if statement and stops there. I don't think my random number generator is generating any random numbers. Thanks in advance.
```
package app.com.example.android.oraclethedeciscionmaker;
import android.cont... | 2016/12/25 | [
"https://Stackoverflow.com/questions/41318581",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6191311/"
] | The only thing I did was instead of using a path like
```
c:\xyz\desktop\practice
```
and starting http-server, I did the following:
step 1:
```
c:\
```
step 2:
```
http-server c:\xyz\desktop\practice
```
It started working. Thanks for everyone's help. |
1,451,281 | I'm just starting, and yes, i haven't written any tests yet (I'm not a fundamentalist, I don't like compile errors just because there is no test), but I'm wondering where to get started on doing a project that parses fixed length flat file records according to an XML mapping, into a class that represents the superset o... | 2009/09/20 | [
"https://Stackoverflow.com/questions/1451281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8741/"
] | It's all about decomposing the problem into parts. Some examples:
* File/stream reader
* Input mapper
* Input mapper loader
* File layout
* File layout collection
* Data access layer
Try to give each class a single responsibility, determine its dependencies, and inject those in. That, with the help of mocks/stubs, wi... |
71,793,245 | Is there a standard algorithm in the library that does the job of the following for-loop?
```
#include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>
int main( )
{
const char oldFillCharacter { '-' };
std::vector<char> vec( 10, oldFillCharacter ); // construct with 10 chars
// modif... | 2022/04/08 | [
"https://Stackoverflow.com/questions/71793245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13407802/"
] | This loop will replace every occurrence of `oldFillCharacter` with `newFillCharacter`. If you don't want to do something more fancy [`std::replace`](https://en.cppreference.com/w/cpp/algorithm/replace) looks good:
```
std::replace(std::begin(vec), std::end(vec), oldFillCharacter, newFillCharacter);
```
Or a bit simp... |
1,648,939 | i ran jconsole, i see some live threads count and daemon threads count .... i run no other java app/classes .... i could see the list of live threads but not daemon thread .... is there a way to know what is the list of deamon threads ? | 2009/10/30 | [
"https://Stackoverflow.com/questions/1648939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can create a thread dump (using the `jstack` tool), which will show for each thread whether it is a daemon or not.
Instead of using `jstack` on the command line, you can also trigger a thread dump using visualvm (<http://visualvm.dev.java.net>), and look at the threads over time. |
64,601,439 | I am new to HTML and CSS. I want to achieve rounded-corner for my table and it is not working. Any ideas how can I make it work?
Here is my CSS for table:
```
table {
border: 1px solid #CCC;
border-collapse: collapse;
font-size:13px;
color:white;
}
td {
border: none... | 2020/10/30 | [
"https://Stackoverflow.com/questions/64601439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11471461/"
] | You can make the rounded table using the `border-radius` CSS attribute based on `border-collapse: separate` as follows.
```css
table {
border: 1px solid #CCC;
font-size: 13px;
color: white;
background: red;
border-collapse: separate;
border-radius: 10px;
-moz-border-radius: 10px;
}
td {
border: none... |
16,875,356 | I am successfully detecting faces using JavaCV, it's not totally accurate but good enough for the moment.
However, for testing purposes and with a look at the future (this is only part of a bigger group project), I want to write rectangles onto the faces using BufferedImage and Graphics.drawRect().
I am aware of the ... | 2013/06/01 | [
"https://Stackoverflow.com/questions/16875356",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1342579/"
] | Quoting from the [paperjs.org tutorial on rasters](http://paperjs.org/tutorials/images/working-with-rasters/):
>
> Images need to already be loaded when they are added to a Paper.js project. Working with local images or images hosted on other websites may throw security exceptions on certain browsers.
>
>
>
So yo... |
12,907,167 | >
> **Possible Duplicate:**
>
> [How can I pass command-line arguments in IronPython?](https://stackoverflow.com/questions/5949735/how-can-i-pass-command-line-arguments-in-ironpython)
>
>
>
I am new to ironpython and sharpdevelop and I am trying to run the following code,
```
from sys import argv
script, fir... | 2012/10/16 | [
"https://Stackoverflow.com/questions/12907167",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/523960/"
] | In [SharpDevelop](http://www.icsharpcode.net/opensource/sd/) you
* *right-click* on the python *project*
* choose *Properties* in the context-menu
* choose the *Debug*-tab
* append your arguments in the *Command line arguments* field |
13,728,084 | I have made a website (php) and it connects to a database so it can have users and post material. Imagine it like a forum. Now how would I go about making an iPhone app that connects to the same database. I am already teaching myself c++ to make the app, but am not sure how I will connect it to the database. | 2012/12/05 | [
"https://Stackoverflow.com/questions/13728084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1879764/"
] | To do web-based databases, the best practice\*\*\* is to use HTTP requests to a PHP script. That way you will not have to establish a database connection from the app, leaving Usernames and Passwords excluded from the actual project. Create some PHP scripts that will do what you need by sending POST and GET variables.
... |
133,107 | How can I reduce the size of a `\psdiabox`, for instance:
```
\documentclass[10pt,a4paper,twoside]{scrbook}
\usepackage{pstricks}
\usepackage{pst-all}
\begin{document}
\psset{unit=0.35}
\begin{pspicture}(9.261250,-52.662503)(52.977702,-0.950000)
\begin{psmatrix}[rowsep=1cm,colsep=.5cm]
& \rput[tc](30.5,-19.5)... | 2013/09/13 | [
"https://tex.stackexchange.com/questions/133107",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/35541/"
] | Your best bet would be to convert the pdf to a series of images probably using [imagemagick](http://www.imagemagick.org/script/index.php)'s convert routine, then use [ffmpeg](http://www.ffmpeg.org/) to assemble them into a video. Both tools are free and cross-platform.
[Stack Overflow has more detail](https://stackove... |
2,333,897 | **EDIT** - Rewrote my original question to give a bit more information
---
**Background info**
At my work I'm working on a ASP.Net web application for our customers. In our implementation we use technologies like Forms authentication with MembershipProviders and RoleProviders. All went well until I ran into some d... | 2010/02/25 | [
"https://Stackoverflow.com/questions/2333897",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136819/"
] | What you are seeking from the various posts that I see, is a custom role mechanism or said another way, a custom Authorization mechanism. Authentication can still use the standard SqlMembershipProvider.
I'm not sure that the standard role provider will provide you with what you want as authorization requires that you... |
57,972,255 | I'm convinced someone else must have had this same issue before but I just can't find anything.
Given a table of data:
```
DECLARE @Table TABLE
(
[COL_NAME] nvarchar(30) NOT NULL,
[COL_AGE] int NOT NULL
);
INSERT INTO @Table
SELECT N'Column 1', 4 UNION ALL
SELECT N'Col2', 2 UNION ALL
SELECT N'Col 3', 56 UNIO... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57972255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1538480/"
] | I just used a quick CROSS APPLY to get the length of the buffer you want to use:
```
select
N'''' + LEFT(
[COL_NAME] + SPACE( t2.MLEN )
, t2.MLEN
) + N''''
from @Table
CROSS APPLY ( SELECT MAX(LEN([COL_NAME])) MLEN FROM @Table ) t2
``` |
27,188,342 | I have a random crash in UIKit that happend a couple of times already.
It crashes with `EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000d`
```
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x30e08f46 objc_msgSend + 5
1 UIKit 0x26d1790d -[_UIWebViewScrollViewDeleg... | 2014/11/28 | [
"https://Stackoverflow.com/questions/27188342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4206060/"
] | I think that
```
height: auto;
```
in you CSS declaration could do what you want.
Updated fiddle: <http://jsfiddle.net/3122mts4/4/> |
12,992,432 | thanks for looking at my question.
Basically what I'm trying to do is find all images that look like the first and the third image here: <http://imgur.com/a/IhHEC>
and remove all the ones that don't look like that (2,4).
I've tried several libraries to no avail.
Another acceptable way to do this is to check if the... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12992432",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679184/"
] | If those are the actual images you're going to use, it looks like histogram similarity will do the job. The first and third are very contrasty, the second and fourth, especially the fourth, have a wide range of different intensities.
You could easily make a histogram of the shades of grey in the image and then apply ... |
1,952,126 | How do I prove that
$\displaystyle{\sum\_{i=1}^{\infty}{\frac{2^n(n!)^2}{(2n)!}}=1+\frac{\pi}{2}}$ | 2016/10/03 | [
"https://math.stackexchange.com/questions/1952126",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/166193/"
] | Challenging question. You may notice that $\frac{n!^2}{(2n)!}=\binom{2n}{n}^{-1}$, then prove that by integration by parts and induction we have
$$ \int\_{0}^{\pi/2}\sin(x)^{2n-1}\,dx = \frac{4^n}{2n\binom{2n}{n}} \tag{1}$$
It follows that
$$ S=\sum\_{n\geq 1}2^n\binom{2n}{n}^{-1} = \int\_{0}^{\pi/2}\sum\_{n\geq 1}\fr... |
5,841,740 | I am trying to do some **method inspection** (in Squeak - Smalltalk).
I wanted to ask what is the way **to check if a method is an abstract method**?
Meaning I want to write,
A method which gets a **class** and a **symbol** and will check if there is such a symbol in
the list of methods in an object which is of this c... | 2011/04/30 | [
"https://Stackoverflow.com/questions/5841740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/550413/"
] | A method is abstract (in the sense Java or C++ people mean) if it looks like this:
```
myMethod
self subclassResponsibility.
```
So all you need to do to answer "is `MyObject>>#myMethod` abstract?" is to answer "is `MyObject>>#myMethod` a sender of `#subclassResponsibility`?"
You can answer *that* question by add... |
1,089,644 | I've just upgraded from Outlook 2013. When I opened my To-Do List view, all flagged emails were displayed in a narrow list on the left hand side. The currently selected email were opened in a reading pane on the right hand side.
Now, after the upgrade to Outlook 2016, the previously narrow list view takes up the whole... | 2016/06/15 | [
"https://superuser.com/questions/1089644",
"https://superuser.com",
"https://superuser.com/users/389544/"
] | Couple suggestions:
1) Ensure the Reading Pane is enabled for the Tasks/To-Do view. Check *View* tab -> *Reading Pane* -> Ensure it's set to something other than "*Off*".
2) Try *View* tab -> *Reset View* while looking a the Tasks/To-Do list. |
44,881,991 | Currently I'm coding a project which has a BunifuProgressBar, but I'm having trouble coding it. Basically it says: `'Increment' is not a member of 'BunifuProgressBar'`, any ideas how to fix that issue (Please put the code in the comment section, which will make it so I don't get that error and the prog bar will work.)
... | 2017/07/03 | [
"https://Stackoverflow.com/questions/44881991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7898892/"
] | `BunifuProgressBar` does not have a `Increment` method,see the [reference page](https://devtools.bunifu.co.ke/bunifu-ui-winforms-docs/). What it does have is a `Value` property, so what you probably need to do is just:
```
BunifuProgressBar1.Value+=1
``` |
14,494,293 | I found this question [How to store and retrieve different types of Vertices with the Tinkerpop/Blueprints graph API?](https://stackoverflow.com/questions/8142613/how-to-store-and-retrieve-different-types-of-vertices-with-the-tinkerpop-bluepri)
But it's not a clear answer for me.
How do I query the 10 most recent art... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14494293",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1255825/"
] | Answering my own question to this - The answer is indices.
<https://github.com/tinkerpop/blueprints/wiki/Graph-Indices> |
6,301,506 | I need a working script for prohibiting users from saving images on their machine. (Is it only possible through disabling right-click?)
Yes, I know that it is impossible, and yes I know that it is a bad practice.
Yes, I also know that I am an idiot. But I need this solution for some specific purposes.
Thanks! | 2011/06/10 | [
"https://Stackoverflow.com/questions/6301506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194076/"
] | You could try to replace all the `<img>` elements with `<div>` elements that have the same size and use the image as a background:
```
$('img').each(function() {
var $img = $(this);
var $div = $('<div>').css({
width: $img.width(),
height: $img.height(),
backgroundImag... |
65,224,241 | It is my first time using PHP. I am using XAMPP on a mac.
MySQL, Apache, and localhost:8080 are all working right now.
I created this file called test.php and saved it inside lampp/htdocs:
```
<!DOCTYPE html>
<html lang="en">
<head>
<title>Connection</title>
</head>
<body>
<?php
$servername = "localhost:8080";
... | 2020/12/09 | [
"https://Stackoverflow.com/questions/65224241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14545805/"
] | Okay, partially my bad.
I did re-compile the **EMPTY** sample project and found that despite the compiler error, the solution does build.
```
1>------ Rebuild All started: Project: Microdesk.BIMrxCommon.Infrastructure, Configuration: Debug2020 Any CPU ------
1> Microdesk.BIMrxCommon.Infrastructure -> C:\Work\Microdes... |
15,343,487 | I have a css conflict, so I have to go against an absolute positioning property that deals with some class `.myclass`. But in one case, I want a div with `.myclass` class to have a no absolute positioning. So I put `position: initial`, which works in Chrome, but is it cross-browser? I googled it and found nothing reall... | 2013/03/11 | [
"https://Stackoverflow.com/questions/15343487",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1275959/"
] | The default for position is `position: static;` |
39,583,980 | I am making a listing system that updates checking new data from a json file every **3 seconds** by appending the **response.list[i].firstname** to document.getElementById("list"). but i am getting unlimited loop.
**output:**
name1
name2
name1
name2
name1
name2
(to infinity..)
```
<script>
list()... | 2016/09/20 | [
"https://Stackoverflow.com/questions/39583980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6246854/"
] | This is happening because every 3 seconds you read JSON file and append it to the already rendered (with all the data appended in previous runs) list with
```
document.getElementById("list").appendChild(newElement);
```
If you want to show only the content of the file once, then you should clean the target list div... |
36,572,968 | I'm trying to write a program to return the amount of rows and columns in a csv file. Below is the code I currently have:
```
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
string line;
ifstream myfile("ETF_Corrsv2.csv");
if (myfile.is_open(... | 2016/04/12 | [
"https://Stackoverflow.com/questions/36572968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4845418/"
] | In fact you can reference the corresponding `ElementRef` using `@ViewChild`. Something like that:
```
@Component({
(...)
template: `
<div #someId>(...)</div>
`
})
export class Render {
@ViewChild('someId')
elt:ElementRef;
ngAfterViewInit() {
let domElement = this.elt.nativeElement;
}
}
```
`el... |
73,787 | 1. I couldn't afford that **big a** car.
2. It was so **warm a** day that I could hardly work.
The sentences stated above have been taken from *Practical English Usage* by Michael Swan. If I write-
3. I couldn't afford that big car.
4. It was so warm day that I could hardly work.
These make sense. But placement of a... | 2015/11/20 | [
"https://ell.stackexchange.com/questions/73787",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/-1/"
] | **Short answer**
----------------
If an adjective is being modified by a deictic degree adverb such as *so, too, as, this* or *that* then the adjective and adverb must go before, not after, the indefinite article. They can also appear as a postmodifier after the noun:
* a day so warm
**Full answer**
---------------
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.